Reviews Starknet account abstraction contracts for validate/execute path correctness, nonce/signature handling, replay protection, and session policy security.
npx claudepluginhub keep-starknet-strange/starknet-agentic --plugin starknet-agentic-skillsThis skill is limited to using the following tools:
- Reviewing account contract validation and execution paths.
Build Starknet dApps with starknet.js v9 SDK: contract interactions, account management, transactions, fee estimation, wallet and paymaster integration.
Provides expertise in ERC-4337 account abstraction: smart contract wallets, paymasters, bundlers, user operations, social recovery, session keys, gas sponsorship, wallet SDKs.
Scans Cairo/StarkNet smart contracts for 6 critical vulnerabilities: felt252 arithmetic overflow, L1-L2 messaging issues, address conversion problems, signature replay, and storage collisions.
Share bugs, ideas, or general feedback.
__validate__ enforces lightweight, bounded checks.__execute__ enforces policy and selector boundaries.cairo-auditor for final AA/security pass before merge.__validate__ constraints and DoS resistance.__execute__ policy enforcement correctness.import { Account, CallData, RpcProvider } from "starknet";
const provider = new RpcProvider({ nodeUrl: process.env.STARKNET_RPC! });
const account = new Account(provider, process.env.ACCOUNT_ADDRESS!, process.env.PRIVATE_KEY!);
// Validate preview (debug-only): inspect __validate__ behavior with the current nonce.
const nonce = await account.getNonce();
const call = { contractAddress: process.env.TARGET!, entrypoint: "set_limit", calldata: CallData.compile({ value: 7 }) };
await provider.callContract({
contractAddress: account.address,
entrypoint: "__validate__",
calldata: CallData.compile({ calls: [call], nonce }),
});
// Execute path: real transaction that triggers __execute__ and nonce checks.
const tx = await account.execute([call]);
await provider.waitForTransaction(tx.transaction_hash);
| Code | Condition | Recovery |
|---|---|---|
AA-001 | __validate__ is too expensive or stateful | Remove heavy logic from validation; add a test that caps validation steps. |
AA-002 | __execute__ allows blocked selectors/self-calls | Enforce selector filters and self-call checks; add authorized/unauthorized regression tests. |
AA-003 | Nonce or domain mismatch causes replay risk | Normalize nonce source/hash domain; add replay and cross-domain tests. |
AA-999 | Unexpected runtime panic | Capture calldata + caller context, reproduce in unit tests, then escalate to cairo-auditor. |