$npx -y skills add keep-starknet-strange/starknet-agentic --skill starknet-network-factsStarknet network-level constraints and protocol facts that impact contract safety and agent reasoning.
| 1 | # Starknet Network Facts |
| 2 | |
| 3 | ## When to Use |
| 4 | |
| 5 | - Reasoning about chain behavior assumptions in contract logic. |
| 6 | - Validating time, fee, and transaction-version dependencies. |
| 7 | |
| 8 | ## When NOT to Use |
| 9 | |
| 10 | - Contract implementation details unrelated to chain behavior. |
| 11 | |
| 12 | ## Quick Start |
| 13 | |
| 14 | 1. Identify assumptions in code about tx versions, fee tokens, and timing. |
| 15 | 2. Verify assumptions against current network behavior before release. |
| 16 | 3. Add tests for boundary behavior tied to block timing or tx metadata. |
| 17 | |
| 18 | ## Core Focus |
| 19 | |
| 20 | - transaction version expectations |
| 21 | - fee token and bounds assumptions |
| 22 | - block-time-sensitive logic |
| 23 | - sequencer and inclusion model implications |
| 24 | |
| 25 | ## Workflow |
| 26 | |
| 27 | - Main network-facts workflow: [default workflow](workflows/default.md) |
| 28 | |
| 29 | ## References |
| 30 | |
| 31 | - Module index: [references index](references/README.md) |
| 32 | |
| 33 | ## starknet.js Example |
| 34 | |
| 35 | ```ts |
| 36 | import { RpcProvider } from "starknet"; |
| 37 | |
| 38 | const provider = new RpcProvider({ nodeUrl: process.env.STARKNET_RPC! }); |
| 39 | const latest = await provider.getBlock("latest"); |
| 40 | |
| 41 | console.log({ |
| 42 | blockNumber: latest.block_number, |
| 43 | l1GasPrice: latest.l1_gas_price, |
| 44 | l2GasPrice: latest.l2_gas_price, |
| 45 | }); |
| 46 | ``` |
| 47 | |
| 48 | ## Error Codes and Recovery |
| 49 | |
| 50 | | Code | Meaning | Recovery | |
| 51 | | --- | --- | --- | |
| 52 | | `SNF-001` | RPC/network fact unavailable | Retry with a fallback RPC and compare outputs before acting. | |
| 53 | | `SNF-002` | Conflicting tx-version assumption | Re-check references and update guards/tests for current tx version behavior. | |
| 54 | | `SNF-003` | Fee-token assumption mismatch | Add explicit fee-token checks and fee-bound regression tests. | |