battlechain-tutorial

Generate Forge deployment and agreement scripts for BattleChain testnet.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/ToXMon/tolu --skill battlechain-tutorial-toxmon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: battlechain-tutorial
Source: https://github.com/ToXMon/tolu/tree/main/skills/battlechain-tutorial
Command: npx skills add https://github.com/ToXMon/tolu --skill battlechain-tutorial-toxmon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the manual, error-prone work of preparing a Foundry project for BattleChain or alternative L2 deployment by scanning existing contracts and scripts, collecting deployment choices via a guided interview, and generating the necessary Forge/Foundry deployment and agreement scripts.

Core Features & Use Cases

  • Repository pre-scan: Detects deployment scripts, source contracts, constructor arguments, post-deploy calls, and external dependencies.
  • Interactive guided flow: Asks a sequenced set of deployment and Safe Harbor questions (14 steps) and adapts when answers overlap.
  • Script generation: Produces chain-aware Forge scripts that modify existing Deploy scripts, plus CreateAgreement and RequestAttackMode scripts, and adds seeding and logging logic for BattleChain.
  • Use case: A smart contract team wants to deploy audited contracts to BattleChain testnet with a Safe Harbor agreement and scripted attack-mode workflow while preserving original deployment logic.

Quick Start

Ask the assistant to "deploy battlechain", allow it to scan your repository, and answer the guided questions to generate BattleChain-ready Forge scripts.

Frequently Asked Questions about battlechain-tutorial

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prepare a Foundry project for BattleChain deployment?

To prepare a Foundry project for BattleChain deployment, you need Forge-compatible scripts that adapt contract addresses to chain constants, handle constructor arguments, and generate Safe Harbor agreement and attack-mode request scripts. This automates that entire preparation process by scanning your repository and generating the required files.

What is a Safe Harbor agreement in smart contract testing?

A Safe Harbor agreement in smart contract testing is a formal request enabling pre-mainnet security testing on networks like BattleChain. It allows audited contracts to undergo scripted attack-mode workflows while preserving original deployment logic, ensuring controlled vulnerability discovery before mainnet launch.

Can I use Forge scripts to automate Safe Harbor and attack-mode requests on BattleChain?

Yes, Forge scripts can automate Safe Harbor and attack-mode requests on BattleChain. The guided flow generates chain-aware CreateAgreement and RequestAttackMode Forge scripts, adds seeding and logging logic, and modifies existing Deploy scripts to integrate with BattleChain testnet requirements.

Does Foundry support scanning existing Solidity sources and deployment scripts for constructor arguments?

Foundry itself does not scan sources for constructor arguments, but this guided deployment process does. It pre-scans existing Solidity source files and deployment scripts to extract constructor arguments and post-deploy calls, then uses that data to generate adapted Forge scripts for BattleChain.

What's the best way to deploy audited contracts to BattleChain testnet while preserving original deployment logic?

The best way to deploy audited contracts to BattleChain testnet while preserving original logic is using a guided deployment preparation tool. It scans your repository, collects parameters through an interactive interview, and generates chain-aware Forge scripts that modify existing Deploy scripts without overwriting your original deployment workflows.

Why does my BattleChain deployment require CreateAgreement and RequestAttackMode scripts?

BattleChain deployments require CreateAgreement and RequestAttackMode scripts to formalize Safe Harbor testing and enable attack-mode workflows. These scripts log deployment metadata, add seeding logic, and ensure your contracts follow the correct pre-mainnet security testing protocols on the BattleChain testnet.