Local Deployment Script Runner
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
Local Deployment Script Runner is a read-only developer tool that generates deployment scripts for Hardhat, Foundry, and Ethers from contract bytecode. It reads the current chain state (block number, gas price, chain ID) to estimate deployment costs and timing, validates the contract bytecode, and produces ready-to-use deployment scripts for three popular development frameworks. The tool helps developers quickly generate deployment boilerplate, estimate gas costs before deployment, and prepare scripts for local fork testing without manually writing deployment code. It is essential for developers who frequently deploy contracts and need consistent, well-structured deployment scripts.
HOW TO USE
Connect your EVM-compatible wallet via the BGWallet bridge and select the network where you plan to deploy. Enter the contract name, paste the contract bytecode (hex string starting with 0x), and optionally provide ABI-encoded constructor arguments. Click "Simulate Deployment" to generate deployment scripts. Results include bytecode size, chain ID, block number, gas price, estimated gas, estimated deployment cost in ETH, and three scripts: Hardhat (JavaScript), Foundry (Solidity), and Ethers (JavaScript). Each script includes the contract name, placeholder arguments, and deployment logic. The tool also provides copy buttons for easy integration into your project. All analysis is read-only—no signatures or transactions are submitted.
TECHNICAL MECHANISM
The tool uses ethers.js v5.7.2 to fetch current chain state via the provider. It retrieves the block number via provider.getBlockNumber(), chain ID via provider.getNetwork(), and gas price via provider.getGasPrice(). The bytecode is validated for length and format (must start with 0x). Gas estimation is calculated as 100,000 + (bytecode_length_in_bytes * 200), based on typical deployment gas costs. Total deployment cost is calculated as gas_used * gas_price and displayed in both wei and ETH. The script generator produces three outputs: (1) Hardhat script using hre.ethers.getContractFactory with deployment and logging; (2) Foundry script using forge-std/Script.sol with vm.startBroadcast and console.log; (3) Ethers script using ethers.ContractFactory with a wallet and provider. Each script includes placeholder constructor arguments that the user must modify. The tool also provides a bytecode size display and cost estimate to help developers budget for deployment.
WHAT IT CANNOT SEE
This tool has fundamental limitations that users must understand. It cannot actually execute deployment scripts—the tool is a script generator only and does not interact with any deployment infrastructure. It cannot guarantee deployment scripts will work without manual adjustment—the generated scripts are templates and may require modification for specific project structures or configurations. It cannot sign or send transactions—the tool does not handle private keys or wallet integration beyond reading state. It cannot handle complex deployment dependencies or multi-contract deployments automatically—the tool generates single-contract scripts only. It cannot deploy to live networks without additional user configuration—the user must provide RPC URLs, private keys, and environment setup. It cannot manage constructor arguments beyond simple placeholders—the user must fill in actual arguments. It cannot estimate exact gas costs for complex constructors or large bytecode—the estimation is approximate. It cannot handle custom deployment patterns like proxies or upgradeable contracts. It cannot validate that the bytecode corresponds to the correct contract name. The generated scripts are for development and testing only and should be reviewed before production use.
PLEASE NOTE
This tool only supports EVM-compatible blockchains (Ethereum, Polygon, BSC, Avalanche C-Chain, Optimism, Arbitrum, and their testnets). Solana, Tron, Starknet, SUI, TON, Aptos, Bitcoin, Cosmos, and XRP are not supported. The tool is free, open-source, requires no API keys, and uses the wallet's native provider for all read operations. Always review generated deployment scripts before executing them to ensure they match your deployment requirements and security practices.