katour
v1.0.1
Published
Multi-chain Solidity contract deployment CLI — compile, deploy, verify, interact
Downloads
104
Maintainers
Readme
⛓ Katour CLI
Multi-chain Solidity deployment CLI — compile, deploy, verify, and interact with contracts in one tool.
Installation
# Clone / copy the project
cd katour
npm install
npm link # makes `katour` available globallyQuick Start
# 1. Initialize a project
katour init
# 2. Edit .env — add your PRIVATE_KEY and API keys
# 3. Compile contracts
katour compile
# 4. Deploy
katour deploy
# 5. Interact with deployed contract
katour interact <address>Commands
katour init
Scaffolds the project structure:
contracts/ ← put your .sol files here
artifacts/ ← compiled output (auto-generated)
deployments/ ← deployment records per network
.env ← config (private key, RPC, API keys)katour compile
Compiles all contracts in ./contracts/.
katour compile # compile all
katour compile -f contracts/Token.sol # specific file
katour compile -o ./out # custom output dirkatour deploy
Deploys a compiled contract. Interactive prompts if no flags set.
katour deploy # interactive
katour deploy -c Token -n sepolia # specific contract + network
katour deploy -c Token -n mainnet --verify # deploy + auto verify
katour deploy -c Token -n sepolia --dry-run # simulate only
katour deploy -c Token -n polygon --args "MyToken" "MTK" 1000000katour verify
Verifies a deployed contract on the block explorer.
katour verify 0xAbC... -c Token -n sepolia
katour verify 0xAbC... -c Token -n mainnet --args "MyToken" "MTK" 1000000katour interact
Interactive REPL to call any contract function.
katour interact 0xAbC... # interactive network + contract selection
katour interact 0xAbC... -n polygon -c TokenLists all read (view/pure) and write functions with prompts for arguments.
Supported Networks
| Key | Name | Explorer |
|---------------|-----------------------|----------------------|
| mainnet | Ethereum Mainnet | etherscan.io |
| sepolia | Sepolia Testnet | sepolia.etherscan.io |
| polygon | Polygon Mainnet | polygonscan.com |
| mumbai | Polygon Mumbai | mumbai.polygonscan |
| bsc | BNB Smart Chain | bscscan.com |
| bscTestnet | BSC Testnet | testnet.bscscan.com |
| arbitrum | Arbitrum One | arbiscan.io |
| optimism | Optimism | optimistic.etherscan |
| avalanche | Avalanche C-Chain | snowtrace.io |
| base | Base | basescan.org |
| baseSepolia | Base Sepolia | sepolia.basescan.org |
.env Reference
# Required
PRIVATE_KEY=your_wallet_private_key
# Optional - custom RPC endpoints
ETH_MAINNET_RPC=https://eth.llamarpc.com
ETH_SEPOLIA_RPC=https://rpc.sepolia.org
POLYGON_RPC=https://polygon-rpc.com
BSC_RPC=https://bsc-dataseed.binance.org
# For verification (get free keys from each explorer)
ETHERSCAN_API_KEY=...
POLYGONSCAN_API_KEY=...
BSCSCAN_API_KEY=...
ARBISCAN_API_KEY=...
BASESCAN_API_KEY=...Deployment Records
Every successful deployment is saved to ./deployments/<network>.json:
{
"MyContract": {
"address": "0x...",
"txHash": "0x...",
"constructorArgs": ["Hello", "42"],
"deployedAt": "2024-01-01T00:00:00.000Z"
}
}