diff --git a/.agents/skills/controller-presets/SKILL.md b/.agents/skills/controller-presets/SKILL.md index 335e1dc..d959377 100644 --- a/.agents/skills/controller-presets/SKILL.md +++ b/.agents/skills/controller-presets/SKILL.md @@ -24,7 +24,7 @@ Ask: Explain: - Sepolia is paymastered by default — no paymaster setup needed for testnet. -- Mainnet requires a Cartridge paymaster (see `cartridge-paymaster` skill) to sponsor transactions. +- Mainnet requires a Slot paymaster (see `slot-paymaster` skill) to sponsor transactions. ### Phase 2: Origin Configuration @@ -254,7 +254,7 @@ Teams often include both chains in a single preset — use separate contract add → Policies are selected by chain ID at runtime. Verify the chain ID in your config matches what your RPC returns. Use `SN_MAIN`/`SN_SEPOLIA`, not hex chain IDs. **"Paymaster not sponsoring on mainnet"** -→ Sepolia is auto-sponsored. Mainnet requires creating a Cartridge paymaster, funding it, and adding matching policies. See `cartridge-paymaster` skill. +→ Sepolia is auto-sponsored. Mainnet requires creating a Slot paymaster, funding it with credits, and adding matching policies. See `slot-paymaster` skill. **"AASA validation failing"** → Team ID must be exactly 10 uppercase alphanumeric chars. Bundle ID must be reverse DNS. Pattern: `ABCDE12345.com.example.app`. diff --git a/.agents/skills/slot-deploy/SKILL.md b/.agents/skills/slot-deploy/SKILL.md new file mode 100644 index 0000000..b54067b --- /dev/null +++ b/.agents/skills/slot-deploy/SKILL.md @@ -0,0 +1,134 @@ +--- +name: slot-deploy +description: Create, update, and manage Slot deployments for Katana and Torii services. +--- + +# Slot Deploy + +Manage the lifecycle of Slot deployments — Katana (execution layer) and Torii (indexer). + +## Prerequisites + +Install the Slot CLI: + +```sh +curl -L https://slot.cartridge.sh | bash +``` + +Authenticate: + +```sh +slot auth login +``` + +For CI/scripts, generate a token and set the `SLOT_AUTH` env var: + +```sh +slot auth token +``` + +## Creating Deployments + +### Katana + +```sh +slot deployments create katana +``` + +### Torii + +Torii requires a TOML configuration file: + +```sh +slot deployments create torii --config +``` + +Minimal `torii.toml`: + +```toml +rpc = "https://api.cartridge.gg/x/starknet/mainnet" +world_address = "0x3fa481f41522b90b3684ecfab7650c259a76387fab9c380b7a959e3d4ac69f" +``` + +Extended config options: + +```toml +[indexing] +allowed_origins = ["*"] +index_pending = true +index_transactions = false +polling_interval = 1000 +contracts = [ + "erc20:", + "erc721:" +] + +[events] +raw = true +historical = ["namespace-EventName"] +``` + +When you create a service with a new project name, a team is automatically created. + +## Updating Deployments + +```sh +slot deployments update torii --version v1.0.0 +slot deployments update torii --config +slot deployments update torii --replicas 3 +``` + +## Deleting Deployments + +```sh +slot deployments delete +``` + +## Inspecting Deployments + +```sh +# List all deployments +slot deployments list + +# View configuration +slot deployments describe + +# Read logs +slot deployments logs + +# View predeployed Katana accounts +slot deployments accounts katana +``` + +## Transferring Services + +Transfer a service to another team: + +```sh +slot d transfer +``` + +## Observability + +Enable Prometheus and Grafana monitoring ($10/month per deployment). + +### On creation + +```sh +slot deployments create --observability katana +slot deployments create --observability torii --config +``` + +### On existing deployment + +```sh +slot deployments update --observability katana +slot deployments update --observability torii +``` + +### Accessing dashboards + +- Prometheus: `https:///prometheus` +- Grafana: `https:///grafana` + +Both are protected by username/password credentials provided when observability is enabled. diff --git a/.agents/skills/cartridge-paymaster/SKILL.md b/.agents/skills/slot-paymaster/SKILL.md similarity index 94% rename from .agents/skills/cartridge-paymaster/SKILL.md rename to .agents/skills/slot-paymaster/SKILL.md index 7a89f74..5f7dee2 100644 --- a/.agents/skills/cartridge-paymaster/SKILL.md +++ b/.agents/skills/slot-paymaster/SKILL.md @@ -1,9 +1,9 @@ --- -name: cartridge-paymaster -description: Set up and manage Cartridge paymasters to sponsor transaction fees for gasless user experiences. +name: slot-paymaster +description: Set up and manage Slot paymasters to sponsor transaction fees for gasless user experiences. --- -# Cartridge Paymaster +# Slot Paymaster Manage paymasters that sponsor transaction fees, enabling gasless experiences for users. Zero integration required — when enabled, eligible transactions are automatically sponsored. @@ -11,7 +11,7 @@ Zero integration required — when enabled, eligible transactions are automatica ## Availability - **Testnet**: Automatically enabled, no setup required -- **Mainnet**: Self-served via the CLI +- **Mainnet**: Self-served via Slot CLI ## Creating a Paymaster diff --git a/.agents/skills/cartridge-rpc/SKILL.md b/.agents/skills/slot-rpc/SKILL.md similarity index 98% rename from .agents/skills/cartridge-rpc/SKILL.md rename to .agents/skills/slot-rpc/SKILL.md index 2c4a2a6..f3122d4 100644 --- a/.agents/skills/cartridge-rpc/SKILL.md +++ b/.agents/skills/slot-rpc/SKILL.md @@ -1,9 +1,9 @@ --- -name: cartridge-rpc +name: slot-rpc description: Configure Cartridge RPC endpoints with API token authentication and CORS whitelisting. --- -# Cartridge RPC +# Slot RPC Cartridge provides dedicated RPC endpoints for Starknet with authentication and CORS support. diff --git a/.agents/skills/slot-scale/SKILL.md b/.agents/skills/slot-scale/SKILL.md new file mode 100644 index 0000000..83ef022 --- /dev/null +++ b/.agents/skills/slot-scale/SKILL.md @@ -0,0 +1,79 @@ +--- +name: slot-scale +description: Scale Slot deployments with paid tiers, replicas, and multi-region support. +--- + +# Slot Scale + +Scale deployments from development to production with paid tiers, replicas, and multi-region. + +## Instance Tiers + +| Tier | Specs | Storage | Cost | +|-----------|----------------------|---------|------------| +| Basic | Limited CPU & memory | 1GB | $10/month | +| Pro | 2 vCPU, 4GB RAM | auto | $50/month | +| Epic | 4 vCPU, 8GB RAM | auto | $100/month | +| Legendary | 8 vCPU, 16GB RAM | auto | $200/month | + +First 3 Basic tier deployments are free. +Storage on premium tiers: $0.20/GB/month (auto-scaling). + +### Basic tier behavior + +- Scaled down automatically after a few hours of inactivity +- Revived on first request +- Deleted if unused for 30+ days + +### Premium tiers (Pro+) + +- Never scaled down or deleted while the team has credits +- Auto storage scaling (never runs out of disk space) + +## Replicas + +Torii supports multiple replicas on premium tiers: + +```sh +slot d create --tier epic my-project torii --replicas 3 +``` + +Billed per replica (3 replicas = 3× tier cost). +Katana does not support replicas. + +## Regions + +| Region | +|---------------| +| `us-east` | +| `europe-west` | + +Deploy in multiple regions with `--regions`: + +```sh +# Torii: multi-region with replicas +slot d create --tier pro my-project torii --regions us-east,europe-west + +# Katana: single region only +slot d create --tier pro my-project katana --regions europe-west +``` + +Billing: tier cost × regions × replicas. + +## Creating Paid Tier Deployments + +Ensure the team has credits (see `slot-teams` skill), then: + +```sh +slot d create --tier epic --team my-team my-instance torii +``` + +## Upgrading an Existing Deployment + +Tiers can only be upgraded, not downgraded: + +```sh +slot d update --tier epic my-instance torii +``` + +The team that owns the deployment must have sufficient credits. diff --git a/.agents/skills/slot-teams/SKILL.md b/.agents/skills/slot-teams/SKILL.md new file mode 100644 index 0000000..ca12a14 --- /dev/null +++ b/.agents/skills/slot-teams/SKILL.md @@ -0,0 +1,93 @@ +--- +name: slot-teams +description: Manage Slot teams, billing, credits, and collaborators. +--- + +# Slot Teams + +Teams are the billing entity in Slot. +They own credits used to pay for deployments, paymasters, RPC requests, and other services. + +## Credit System + +- Prepaid credits, deducted automatically +- 1 CREDIT = $0.01 USD +- Daily billing cycle (minimum 1-day charge) +- Fund via credit card or cryptocurrency + +## Creating a Team + +```sh +slot teams create --email [--address "address"] [--tax-id "id"] +``` + +A team is also auto-created when you create a deployment with a new project name. + +## Funding + +```sh +slot auth fund +``` + +Opens a browser interface to select a team and add credits. +Direct URL: `https://x.cartridge.gg/slot/fund` + +## Team Info + +```sh +# View balance and details +slot teams info + +# View billing history +slot teams invoices + +# Update billing info +slot teams update [--email ] [--address "address"] [--tax-id "id"] +``` + +## Collaborators + +```sh +# List members +slot teams list + +# Add a member (by controller username) +slot teams add + +# Remove a member +slot teams remove +``` + +## What Uses Credits + +| Service | Cost | +|----------------------|-----------------------------------------------| +| Basic deployment | $10/month (first 3 free) | +| Pro deployment | $50/month | +| Epic deployment | $100/month | +| Legendary deployment | $200/month | +| Storage (premium) | $0.20/GB/month | +| Paymaster budget | Funded from team credits | +| RPC requests | Free 1M/month, then $5/1M | +| Multi-region | Tier cost × regions × replicas | +| Observability | $10/month per deployment | + +## Troubleshooting + +### Insufficient credits + +```sh +# Check balance +slot teams info + +# Fund the team +slot auth fund + +# Retry your operation +``` + +### Service not starting + +- Verify team has credits: `slot teams info` +- Ensure service was created with `--team ` +- Check that you're a member of the team diff --git a/.agents/skills/cartridge-vrng/SKILL.md b/.agents/skills/slot-vrng/SKILL.md similarity index 98% rename from .agents/skills/cartridge-vrng/SKILL.md rename to .agents/skills/slot-vrng/SKILL.md index 1f6cd78..3bf383b 100644 --- a/.agents/skills/cartridge-vrng/SKILL.md +++ b/.agents/skills/slot-vrng/SKILL.md @@ -1,9 +1,9 @@ --- -name: cartridge-vrng +name: slot-vrng description: Integrate Cartridge's verifiable random number generator (vRNG) into onchain games. --- -# Cartridge vRNG +# Slot vRNG Cartridge's Verifiable Random Number Generator provides cheap, atomic, verifiable randomness for onchain games. Randomness is generated and verified within a single transaction. diff --git a/AGENTS.md b/AGENTS.md index 691d686..f3322dc 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,5 +1,5 @@ -[Agent Skills Index]|root: ./agents|IMPORTANT: Prefer retrieval-led reasoning over pre-training for any tasks covered by skills.|skills|cartridge-paymaster:{cartridge-paymaster.md},cartridge-rpc:{cartridge-rpc.md},cartridge-vrng:{cartridge-vrng.md},controller-presets:{controller-presets.md},create-a-plan:{create-a-plan.md},create-pr:{create-pr.md} +[Agent Skills Index]|root: ./agents|IMPORTANT: Prefer retrieval-led reasoning over pre-training for any tasks covered by skills.|skills|controller-presets:{controller-presets.md},create-a-plan:{create-a-plan.md},create-pr:{create-pr.md},slot-deploy:{slot-deploy.md},slot-paymaster:{slot-paymaster.md},slot-rpc:{slot-rpc.md},slot-scale:{slot-scale.md},slot-teams:{slot-teams.md},slot-vrng:{slot-vrng.md} # Repository Guidelines diff --git a/src/components/Homepage.tsx b/src/components/Homepage.tsx index 6270845..c5df0d7 100644 --- a/src/components/Homepage.tsx +++ b/src/components/Homepage.tsx @@ -1,7 +1,7 @@ import Arcade from "../public/arcade.svg?react"; import Controller from "../public/controller.svg?react"; import Sensei from "../public/sensei.png"; -import Services from "../public/services.svg?react"; +import Slot from "../public/slot.svg?react"; const cardContent = [ { @@ -12,11 +12,11 @@ const cardContent = [ "Providing seamless player onboarding with self-custodial embedded wallets with Passkeys, Session Tokens, Paymaster and more. Start playing games in seconds!", }, { - title: "Build with", - icon: , - link: "/services/overview", + title: "Scale with", + icon: , + link: "/slot/getting-started", description: - "Platform services for onchain games: paymaster sponsorship for gasless transactions, dedicated Starknet RPC endpoints, and verifiable randomness via vRNG.", + "Horizontally scalable execution sharding for ephemeral and persistent rollups. Providing low latency execution contexts with fixed costs.", }, { title: "Discover with", diff --git a/src/pages/arcade/marketplace.md b/src/pages/arcade/marketplace.md index 7211c9d..f283034 100644 --- a/src/pages/arcade/marketplace.md +++ b/src/pages/arcade/marketplace.md @@ -51,7 +51,7 @@ controller = new Controller({ ``` :::info -See the [Torii documentation](https://book.dojoengine.org/toolchain/torii) for more information about running your own Torii instance. +See the [Slot docs](/slot/getting-started) for more information about creating Torii instances with Slot. ::: :::warning diff --git a/src/pages/controller/configuration.md b/src/pages/controller/configuration.md index d24df4b..caf5bbc 100644 --- a/src/pages/controller/configuration.md +++ b/src/pages/controller/configuration.md @@ -40,7 +40,7 @@ export type ControllerOptions = { // Customization options preset?: string; // Preset name for custom themes and verified policies - slot?: string; // Torii instance URL for custom asset indexing + slot?: string; // Slot project name for custom indexing }; ``` @@ -63,7 +63,7 @@ Controller provides default Cartridge RPC endpoints for Starknet mainnet and sep When you provide custom chains via the `chains` option, they take precedence over the default Cartridge chains if they specify the same network. This allows you to: - Use custom RPC endpoints for mainnet or sepolia -- Add support for additional networks (like local Katana instances) +- Add support for additional networks (like Slot katana instances) - Override default chain configurations - Programmatically switch chains for connected external wallets (MetaMask, Rabby, WalletConnect) @@ -304,7 +304,7 @@ The configuration options are organized into several categories: - [**Session Options**](/controller/sessions): Session policies, transaction-related settings, and error handling - **Performance Options**: Lazy loading and other performance optimizations - **Keychain Options**: Authentication, signup flow, and keychain-specific settings -- **Customization Options**: [Presets](/controller/presets) for themes and verified policies, [Torii indexing](/controller/inventory) for custom assets +- **Customization Options**: [Presets](/controller/presets) for themes and verified policies, [Slot](/controller/inventory) for custom indexing ## Error Display Modes diff --git a/src/pages/controller/inventory.md b/src/pages/controller/inventory.md index 964974b..adfd666 100644 --- a/src/pages/controller/inventory.md +++ b/src/pages/controller/inventory.md @@ -10,7 +10,7 @@ Controller provides Inventory modal to manage account assets (`ERC-20`, `ERC-721 ## Configure tokens -By default, commonly used tokens are indexed and automatically shown. Full list of default tokens are listed in [`torii-config/public-tokens/mainnet.toml`](https://github.com/cartridge-gg/controller/blob/main/packages/torii-config/public-tokens/mainnet.toml). This list can be extended by running your own Torii instance with a custom indexing config. +By default, commonly used tokens are indexed and automatically shown. Full list of default tokens are listed in [`torii-config/public-tokens/mainnet.toml`](https://github.com/cartridge-gg/controller/blob/main/packages/torii-config/public-tokens/mainnet.toml). This list can be extended by configuring Torii hosted on Slot. ### Configure additional token to index @@ -24,13 +24,15 @@ contracts = [ ] ``` -### Run a Torii instance +### Create or update Torii instance on Slot -Self-host Torii against your indexing config. See the [Torii documentation](https://book.dojoengine.org/toolchain/torii/configuration#indexing-configuration) for setup and configuration options. +```bash +slot d create torii --config +``` ### Configure Controller -Provide your Torii instance URL to `ControllerOptions`. For detailed configuration options, see [configuration](./configuration). +Provide Slot project name to `ControllerOptions`. For detailed configuration options, see [configuration](./configuration). ```typescript const controller = new Controller({ diff --git a/src/pages/controller/starter-packs.md b/src/pages/controller/starter-packs.md index b347c92..6df9feb 100644 --- a/src/pages/controller/starter-packs.md +++ b/src/pages/controller/starter-packs.md @@ -332,4 +332,4 @@ If you encounter issues with purchase integration: - Learn about [Sessions](/controller/sessions) for gasless gaming experiences - Explore [Controller Configuration](/controller/configuration) options - Set up [External Wallet Integration](/controller/signer-management) -- Review [Paymaster Configuration](/services/paymaster) for gasless transactions +- Review [Paymaster Configuration](/slot/paymaster) for gasless transactions diff --git a/src/pages/services/overview.md b/src/pages/services/overview.md deleted file mode 100644 index c863ea0..0000000 --- a/src/pages/services/overview.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -showOutline: 1 -description: Cartridge platform services - Paymaster, RPC, and vRNG. -title: Services Overview ---- - -# Services - -Cartridge offers a set of platform services for onchain games and applications: - -- **[Paymaster](/services/paymaster)** — sponsor transaction fees so your users don't need to hold STRK for gas. -- **[RPC](/services/rpc)** — Starknet RPC endpoints for mainnet and Sepolia, with API token and CORS-based authentication. -- **[vRNG](/services/vrng)** — atomic, verifiable randomness for fully onchain games via EC-VRF on the Stark curve. - -Each service is self-served via the CLI and can be used independently or together. diff --git a/src/pages/slot/billing.md b/src/pages/slot/billing.md new file mode 100644 index 0000000..a2c1b36 --- /dev/null +++ b/src/pages/slot/billing.md @@ -0,0 +1,198 @@ +--- +showOutline: 1 +description: Learn how to manage billing for Slot services through team-based credit management. +title: Billing +--- + +# Billing + +All billing in Slot is managed through teams. Teams are the billing entity that owns credits, which are used to pay for deployments, paymasters, RPC requests, and other Slot services. + +## Overview + +Slot uses a prepaid credit system where: +- All costs are charged to a **team's credit balance** +- Teams can be funded via credit card or cryptocurrency +- Credits are deducted automatically as you use services +- You can monitor spending through invoices and team balance + +## Setting Up Billing + +### 1. Create a Team + +First, create a team with an email address for billing notifications: + +```bash +slot teams create --email [--address "your address"] [--tax-id "abc123"] +``` + +**Example:** +```bash +slot teams my-game create --email developer@mygame.com --address "123 Main St, City, Country" --tax-id "TAX123456" +``` + +:::info +If you create a deployment before creating a team explicitly, a team with the same name as your project will be created automatically. +::: + +### 2. Fund Your Team + +To add credits to your team, use the `slot auth fund` command which opens a browser interface: + +```bash +slot auth fund +``` + +This will: +1. Open your browser to the funding interface +2. Display a list of your teams +3. Allow you to select the team you want to fund +4. Provide payment options: + - **Credit card**: Direct card payment for credits + - **Crypto**: Fund with USDC via StarkNet wallets (Argent or Braavos) +5. Complete the purchase and add credits to the selected team + +**Web Interface:** +You can also navigate directly to `https://x.cartridge.gg/slot/fund` to fund teams through the web interface. + +:::info +For crypto funding, you'll need a StarkNet wallet (Argent or Braavos) with USDC. Connect your wallet, specify the amount, and approve the transfer. The credits will be added to your team after the transaction is confirmed on StarkNet. +::: + +## Managing Teams + +### Update Team Information + +Update the billing email, address, or tax ID for an existing team: + +```bash +slot teams update [--email ] [--address "your address"] [--tax-id "abc123"] +``` + +### Check Team Balance + +View your team's current credit balance and information: + +```bash +slot teams info +``` + +### View Invoices + +Check billing history and invoices for your team: + +```bash +slot teams invoices +``` + +This command displays: +- Past billing periods +- Credits consumed +- Services used +- Total charges + +### Team Collaborators + +Add or remove team members who can manage the team's resources: + +```bash +# List current team members +slot teams list + +# Add a collaborator +slot teams add + +# Remove a collaborator +slot teams remove +``` + +:::info +The username is the Cartridge Controller username used to login. Before managing team resources, you'll need to authenticate with [getting-started.md](./getting-started). +::: + +## What Uses Credits? + +Credits are consumed by various Slot services: + +### Deployments +- **Basic tier**: $10/month (first 3 are free) +- **Pro tier**: $50/month (2 vCPU, 4GB RAM) +- **Epic tier**: $100/month (4 vCPU, 8GB RAM) +- **Legendary tier**: $200/month (8 vCPU, 16GB RAM) +- **Storage**: $0.20/GB/month (auto-scaling for premium tiers) +- Billed daily with minimum 1-day charge + +### Paymasters +- Transaction fees are deducted from the paymaster's budget +- Paymaster budgets are funded from team credits +- 1 CREDIT = $0.01 USD + +### RPC Requests +- Free tier: 1M requests/month +- Additional requests: $5 per 1M requests +- Charged to the team associated with your RPC endpoint + +### Multi-Region Deployments +- Cost multiplied by number of regions × replicas +- Example: 2 replicas in 3 regions = 6× base tier cost + +## Billing Cycle + +Slot uses a **daily billing model**: +- Charges are calculated and deducted daily +- Minimum charge period is 1 day +- If you delete a resource after 1 hour, you're still charged for the full day +- Credits are deducted automatically from your team balance + +## Best Practices + +### Monitor Your Spending +- Regularly check `slot teams info` to view credit balance +- Review invoices monthly with `slot teams invoices` +- Set up email notifications by ensuring your team has a valid email + +### Keep Sufficient Balance +- Maintain adequate credits to avoid service interruptions +- Premium tier deployments (Pro and above) remain active as long as the team has credits +- Basic tier deployments are auto-scaled down after inactivity but won't be deleted if funded + +### Team Organization +- Use separate teams for different projects or environments +- Add billing email to receive low-balance alerts +- Limit team membership to necessary collaborators + +## Troubleshooting + +### Insufficient Credits Error + +If you encounter insufficient credits when creating services: + +```bash +# Check your team's current balance +slot teams info + +# Fund the team +slot auth fund + +# Retry your operation +``` + +### Service Not Starting + +If a premium tier deployment isn't starting: +- Verify team has sufficient credits with `slot teams info` +- Ensure the service was created with `--team ` flag +- Check that you're a member of the team + +### Invoice Questions + +For billing inquiries or invoice details: +- Review `slot teams invoices` for detailed history +- Contact support through Discord if you have questions about charges +- Ensure your team email is up-to-date for billing communications + +## Related Documentation + +- [Scale](/slot/scale) - Learn about deployment tiers and pricing +- [Paymaster](/slot/paymaster) - Manage paymaster budgets and policies +- [RPC](/slot/rpc) - Understand RPC pricing and free tiers diff --git a/src/pages/slot/getting-started.md b/src/pages/slot/getting-started.md new file mode 100644 index 0000000..34ecf5e --- /dev/null +++ b/src/pages/slot/getting-started.md @@ -0,0 +1,136 @@ +--- +showOutline: 1 +description: Get started with Slot, the execution layer of Dojo that provides low latency, dedicated, provable execution contexts for blockchain applications. +title: Slot Getting Started +--- + +# Getting Started + +Slot is the execution layer of Dojo, supporting rapid provisioning of low latency, dedicated, provable execution contexts, bringing horizontal scalability to the blockchain. It manages the sequencing, proving, and efficient settlement of its execution. + +## Installation + +Install slotup to manage slot installations and follow the outputted directions. + +```bash +curl -L https://slot.cartridge.sh | bash +``` + +## Usage + +Authenticate with Cartridge + +```bash +slot auth login +``` + +## Programmatic usage + +First, authenticate as mentioned above. Then, run: + +```bash +slot auth token +``` + +Follow instructions and save the output to set the SLOT_AUTH env var. +You can set this environment variable in CI, scripts, or deployment platforms to run slot without having to login. + +### Create service deployments + +```bash +slot deployments create katana +slot deployments create torii --config +``` + +Torii requires a TOML configuration file. +A minimal config specifies the RPC endpoint and world address: + +```toml +# torii.toml +rpc = "https://api.cartridge.gg/x/starknet/mainnet" +world_address = "0x3fa481f41522b90b3684ecfab7650c259a76387fab9c380b7a959e3d4ac69f" +``` + +The config file also supports additional indexing and event options: + +```toml +[indexing] +allowed_origins = ["*"] +index_pending = true +index_transactions = false +polling_interval = 1000 +contracts = [ + "erc20:", + "erc721:" +] + +[events] +raw = true +historical = ["namespace-EventName"] +``` + +:::info +When you create a service with a project name that didn't exist before, a new team is automatically created. +::: + +### Update a service + +```bash +slot deployments update torii --version v1.0.0 +slot deployments update torii --config +slot deployments update torii --replicas 3 +``` + +### Delete a service + +```bash +slot deployments delete torii +``` + +### Transfer a service to another team + +```bash +slot d transfer +``` + +### Read service logs + +```bash +slot deployments logs +``` + +### List all deployments + +```bash +slot deployments list +``` + +### View deployments configuration + +```bash +slot deployments describe +``` + +### View predeployed accounts + +```bash +slot deployments accounts katana +``` + +### Manage collaborators with teams + +The name of the team is the same as the project name used to create a service. A team is automatically created when you create a new project. + +```bash +slot teams list +slot teams add +slot teams remove +``` + +:::info +The account name can also be called Cartridge Controller username. The one used to login on controller. +::: + +## Billing + +Teams need credits to run paid services and paymasters. See the [Billing](/slot/billing) documentation for information on funding teams and managing credits. diff --git a/src/pages/slot/observability.md b/src/pages/slot/observability.md new file mode 100644 index 0000000..efb5150 --- /dev/null +++ b/src/pages/slot/observability.md @@ -0,0 +1,65 @@ +--- +showOutline: 1 +description: Monitor your Slot deployments with integrated Prometheus metrics and Grafana dashboards. +title: Slot Observability +--- + +# Observability + +Slot provides built-in observability features for your deployments, enabling you to monitor performance metrics and visualize system behavior through integrated Prometheus and Grafana instances. + +## Overview + +The `--observability` flag enables monitoring capabilities for both Katana and Torii deployments. When enabled, Slot provisions: + +- A dedicated Prometheus instance to scrape and store metrics +- A Grafana dashboard for visualization and analysis +- Secure access via username/password authentication + +**Cost**: $10/month flat rate per deployment with observability enabled. + +## Enabling Observability + +### On Deployment Creation + +Enable observability when creating a new deployment: + +```bash +# For Katana +slot deployments create --observability katana + +# For Torii +slot deployments create --observability torii --world 0x3fa481f41522b90b3684ecfab7650c259a76387fab9c380b7a959e3d4ac69f +``` + +### On Deployment Update + +Add observability to an existing deployment: + +```bash +# For Katana +slot deployments update --observability katana + +# For Torii +slot deployments update --observability torii +``` + +## Accessing Dashboards + +Once observability is enabled, you can access the monitoring interfaces at the following paths on your deployment URL: + +### Prometheus +``` +https:///prometheus +``` + +Access raw metrics, query using PromQL, and explore time-series data. + +### Grafana +``` +https:///grafana +``` + +:::info +Both Prometheus and Grafana are protected by username/password authentication. Credentials are provided when you enable observability on your deployment. +::: diff --git a/src/pages/services/paymaster.md b/src/pages/slot/paymaster.md similarity index 93% rename from src/pages/services/paymaster.md rename to src/pages/slot/paymaster.md index 629a03b..d02db63 100644 --- a/src/pages/services/paymaster.md +++ b/src/pages/slot/paymaster.md @@ -1,12 +1,12 @@ --- showOutline: 1 -description: Manage Cartridge paymasters to sponsor transaction fees for your applications. -title: Paymaster +description: Manage Slot paymasters to sponsor transaction fees for your applications. +title: Paymaster Management --- -# Paymaster +# Paymaster Management -The Cartridge Paymaster sponsors transaction fees on behalf of your users, eliminating the need for them to hold STRK for gas. Manage budgets, policies, and monitor usage through the CLI. +Paymasters in Slot allow you to sponsor transaction fees for your applications, enabling gasless experiences for your users. The Cartridge Paymaster is a powerful feature that enables gasless transactions for your users, creating a more seamless Web3 experience. When enabled, the paymaster automatically covers transaction fees on behalf of your users, eliminating the need for them to hold STRK for gas fees. You can manage budgets, policies, and monitor usage through the Slot CLI. ## Availability @@ -16,7 +16,8 @@ The paymaster service is available across all networks with different activation - Automatically enabled, no additional setup required - **Mainnet** - - Available and fully self-served via the CLI + - Available and fully self-served + - Manage everything through the Slot CLI - Define your own usage scopes and spending limits ## Integration @@ -25,7 +26,7 @@ One of the key benefits of the Cartridge Paymaster is that it requires zero addi ## Prerequisites -Authenticate with the CLI: +Make sure you are authenticated with Slot. For complete authentication setup, see [Getting Started](/slot/getting-started): ```bash slot auth login @@ -33,7 +34,7 @@ slot auth login ## Team Setup -Before creating a paymaster, you need a team with sufficient balance in the unit you plan to fund (USD or STRK). +Before creating a paymaster, you need a team with sufficient balance in the unit you plan to fund (USD or STRK). See the [Billing](/slot/billing) documentation for detailed information on setting up teams and funding. ## Checking Team Balance @@ -163,7 +164,7 @@ Predicates are optional. Policies without predicates will always sponsor matchin ### vRNG Integration -Paymasters can sponsor vRNG operations, providing gasless random number generation for your games. When configuring policies for vRNG-enabled contracts, the paymaster will automatically handle both the initial request and callback transactions. For detailed vRNG setup and usage, see [vRNG](/services/vrng). +Paymasters can sponsor vRNG operations, providing gasless random number generation for your games. When configuring policies for vRNG-enabled contracts, the paymaster will automatically handle both the initial request and callback transactions. For detailed vRNG setup and usage, see [vRNG](/slot/vrng). ### Add Policies from Preset (Recommended) @@ -562,7 +563,8 @@ slot paymaster my-game-pm transactions --filter REVERTED --last 24hr ### Setting up a new game paymaster ```bash -# Create the paymaster (the team must already have a USD or STRK balance) +# Set up billing first (see /slot/billing for details) +# Then create paymaster slot paymaster my-game-pm create --team my-team --budget 10 --unit USD # Add game contract policies @@ -587,4 +589,4 @@ slot paymaster my-game-pm budget increase --amount 5 --unit USD ``` ### Insufficient Balance Error -If you encounter an insufficient balance error when creating or funding a paymaster, run `slot teams balance` to see the team's USD and STRK pools, then top up the relevant pool as needed. +If you encounter an insufficient balance error when creating or funding a paymaster, run `slot teams balance` to see the team's USD and STRK pools, then top up via the [Billing](/slot/billing) flow as needed. diff --git a/src/pages/services/rpc.md b/src/pages/slot/rpc.md similarity index 92% rename from src/pages/services/rpc.md rename to src/pages/slot/rpc.md index 577aae7..19f1f4b 100644 --- a/src/pages/services/rpc.md +++ b/src/pages/slot/rpc.md @@ -10,7 +10,7 @@ Cartridge provides dedicated RPC endpoints for Starknet networks with built-in a ## Pricing -Cartridge RPC is free for up to 1M requests per month. Additional requests are charged at $5 per 1M requests, billed to the team that owns the API token. +Cartridge RPC is free for up to 1m requests per month. Additional requests are charged at $5/1m requests to the related slot team. ## Endpoints @@ -67,15 +67,11 @@ const response = await fetch('https://api.cartridge.gg/x/starknet/mainnet', { Requests from whitelisted domains without an API token are rate limited per IP address. ::: -## Setup via CLI +## Setup with Slot CLI ### Prerequisites -Authenticate with the CLI: - -```bash -slot auth login -``` +For authentication setup and team management, see [Getting Started](./getting-started). ### Managing API Tokens diff --git a/src/pages/slot/scale.md b/src/pages/slot/scale.md new file mode 100644 index 0000000..3d1cffd --- /dev/null +++ b/src/pages/slot/scale.md @@ -0,0 +1,85 @@ +--- +showOutline: 1 +description: Scale your slot deployments by upgrading to paid instances. +title: Scale your deployments +--- + +# Scale your deployments + +Slot instances are launched with the `basic` instance by default. This instance type is only suitable for testing and +development purposes and comes with limited CPU & memory. 3 deployments of the basic tier are free. + +To prepare your deployments for production, you can set up billing and upgrade to a paid instance tier. + +## Instances + +| Tier | Description | Storage | Cost | +|-----------|-----------------------------------|---------|------------| +| Basic | First 3 are free. for dev & tests | 1GB | $10/month | +| Pro | 2 vCPU and 4GB RAM | auto | $50/month | +| Epic | 4 vCPU and 8GB RAM | auto | $100/month | +| Legendary | 8 vCPU and 16GB RAM | auto | $200/month | + +Note: basic instances are scaled down automatically after a few hours of no activity. To revive deployments, simply send a single request to the instance URL, and it'll be revived on the spot. If unused without any activity for more than 30 days, it will get deleted. + +### Premium tiers + +Pro and higher tiers are never scaled down or deleted as long as there are enough credits on the related team. +They also come with auto storage scaling, which means your deployment can never run out of disk space. +Premium tiers also include advanced [observability features](/slot/observability) for monitoring and debugging your deployments. + +Storage is billed at $0.20/GB/month. + +## Replicas + +For Torii, with premium tiers, you can choose to deploy your instances with multiple replicas using the `--replicas ` flag. + +```bash +slot d create --tier epic my-project torii --replicas 3 +``` + +Replicas are billed as how many replicas you have. For example, if you have 3 replicas, you will be billed 3 times the monthly cost of the tier you are using. + +## Regions + +The default for all regions is us-east, but you can choose to deploy your instances in a different or even multiple regions. + +| Region | +|-------------------| +| `us-east` | +| `europe-west` | + +To deploy a Slot service in multiple regions, you can use the `--regions` flag. + +```bash +# torii supports multiple versions - billed per replica per region +slot d create --tier pro my-project torii --regions us-east,europe-west +# or +slot d create --tier pro my-project katana --regions europe-west +``` + +Katana can be only launched in a single region, while Torii uses replicas and routes global users to the nearest one. + +Multi-region deployments are billed based on the number of regions you choose and the tier you are using by multiplying the monthly cost of the tier by the number of regions times replicas. For example, if you have two replicas in three regions, you will be billed six times the monthly cost of the tier you are using. + +## Billing + +Before creating paid tier deployments, you need to set up billing for your team. See the [Billing](/slot/billing) documentation for detailed information on creating teams, funding, and managing credits. + +## Create an instance with a paid tier + +Make sure to use the team flag of the team you previously transferred credits to. + +```bash +slot d create --tier epic --team my-team my-instance torii +``` + +## Update an existing instance to a paid tier + +Note that you can only upgrade tiers; downgrading to a lower tier is not possible. + +Make sure that you created this instance with the team flag of the team you previously transferred credits to, or make sure the team it belongs to has credits available. + +```bash +slot d update --tier epic my-instance torii +``` diff --git a/src/pages/services/vrng/how-it-works.md b/src/pages/slot/vrng/how-it-works.md similarity index 97% rename from src/pages/services/vrng/how-it-works.md rename to src/pages/slot/vrng/how-it-works.md index e18a3d6..20ee62e 100644 --- a/src/pages/services/vrng/how-it-works.md +++ b/src/pages/slot/vrng/how-it-works.md @@ -26,7 +26,7 @@ A sequencer that can predict outcomes breaks the game's integrity. ## The Core Idea -The [Cartridge Paymaster](/services/paymaster) already acts as an offchain executor — it wraps player transactions for gas sponsorship and submits them onchain via Starknet's [SNIP-9](https://github.com/starknet-io/SNIPs/blob/main/SNIPS/snip-9.md) `execute_from_outside` protocol. +The [Cartridge Paymaster](/slot/paymaster) already acts as an offchain executor — it wraps player transactions for gas sponsorship and submits them onchain via Starknet's [SNIP-9](https://github.com/starknet-io/SNIPs/blob/main/SNIPS/snip-9.md) `execute_from_outside` protocol. The vRNG extends this existing role. In addition to sponsoring gas, the paymaster holds a **secret key** and uses it to generate a verifiable random number as part of the same execution flow. diff --git a/src/pages/services/vrng/index.md b/src/pages/slot/vrng/index.md similarity index 98% rename from src/pages/services/vrng/index.md rename to src/pages/slot/vrng/index.md index 2bd6ba3..27ae376 100644 --- a/src/pages/services/vrng/index.md +++ b/src/pages/slot/vrng/index.md @@ -27,7 +27,7 @@ The vRNG was previously referred to as the Verifiable Random Function, and most 1. A game calls `request_random(caller, source)` as the first call in their multicall. 2. A game contract calls `consume_random(source)` on the vRNG contract. 3. The vRNG server generates a random value using the vRNG algorithm for the provided entropy source. -4. The [Cartridge Paymaster](/services/paymaster) wraps the players multicall with a `submit_random` and `assert_consumed` call. +4. The [Cartridge Paymaster](/slot/paymaster) wraps the players multicall with a `submit_random` and `assert_consumed` call. 5. The `submit_random` call submit a vRNG Proof for the request, the vRNG Proof is verified onchain, ensuring the integrity of the random value which is immediately available and must be used within the same transaction. 6. The `assert_consumed` call ensures that `consume_random(source)` has been called, it also reset the storage used to store the random value during the transaction to 0. diff --git a/src/public/llms.txt b/src/public/llms.txt index dd241f9..ff04506 100644 --- a/src/public/llms.txt +++ b/src/public/llms.txt @@ -64,10 +64,12 @@ For example, the Controller overview at `/controller/overview` has its source at - [Setup](https://docs.cartridge.gg/arcade/setup): Register, configure, and index your game with Arcade. - [Marketplace](https://docs.cartridge.gg/arcade/marketplace): Set up your game's Marketplace for onchain assets. -## Services - -- [Overview](https://docs.cartridge.gg/services/overview): Cartridge platform services - Paymaster, RPC, and vRNG. -- [Paymaster](https://docs.cartridge.gg/services/paymaster): Manage Cartridge paymasters to sponsor transaction fees for your applications. -- [RPC](https://docs.cartridge.gg/services/rpc): Cartridge RPC endpoints for Starknet mainnet and Sepolia testnet. -- [vRNG](https://docs.cartridge.gg/services/vrng): Verifiable Random Number Generator for cheap, atomic, and verifiable onchain randomness. -- [vRNG: How It Works](https://docs.cartridge.gg/services/vrng/how-it-works): Technical deep-dive into EC-VRF on the Stark curve. +## Slot + +- [Getting Started](https://docs.cartridge.gg/slot/getting-started): Get started with Slot, providing low latency, dedicated, provable execution contexts. +- [Billing](https://docs.cartridge.gg/slot/billing): Manage billing for Slot services through team-based credit management. +- [Scale](https://docs.cartridge.gg/slot/scale): Scale your Slot deployments by upgrading to paid instances. +- [Paymaster](https://docs.cartridge.gg/slot/paymaster): Manage Slot paymasters to sponsor transaction fees for your applications. +- [vRNG](https://docs.cartridge.gg/slot/vrng): Verifiable Random Number Generator for cheap, atomic, and verifiable onchain randomness. +- [RPC](https://docs.cartridge.gg/slot/rpc): Cartridge RPC endpoints for Starknet mainnet and Sepolia testnet. +- [Observability](https://docs.cartridge.gg/slot/observability): Monitor deployments with integrated Prometheus metrics and Grafana dashboards. diff --git a/src/public/services.svg b/src/public/slot.svg similarity index 100% rename from src/public/services.svg rename to src/public/slot.svg diff --git a/vocs.config.ts b/vocs.config.ts index 56fc5a4..f12f07c 100644 --- a/vocs.config.ts +++ b/vocs.config.ts @@ -230,22 +230,26 @@ export default defineConfig({ }, ], - // Services sidebar - "/services": [ + // Slot sidebar + "/slot": [ { - text: "Services", + text: "Slot", items: [ { - text: "Overview", - link: "/services/overview", + text: "Getting Started", + link: "/slot/getting-started", }, { - text: "Paymaster", - link: "/services/paymaster", + text: "Billing", + link: "/slot/billing", }, { - text: "RPC", - link: "/services/rpc", + text: "Scale", + link: "/slot/scale", + }, + { + text: "Paymaster", + link: "/slot/paymaster", }, { text: "vRNG", @@ -253,14 +257,22 @@ export default defineConfig({ items: [ { text: "Overview", - link: "/services/vrng", + link: "/slot/vrng", }, { text: "How It Works", - link: "/services/vrng/how-it-works", + link: "/slot/vrng/how-it-works", }, ], }, + { + text: "RPC", + link: "/slot/rpc", + }, + { + text: "Observability", + link: "/slot/observability", + }, ], }, ],