This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

Diamond Standard Facet Deployer

Developer Tools · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — nothing to install.
CategoryDeveloper Tools
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

Diamond Standard Facet Deployer is a developer tool that deploys facets and cuts them into diamond contracts (EIP-2535). It reads the diamond contract address, facet bytecode and metadata, facet selector functions (function signatures), an optional diamond factory address, deployment gas estimates, account nonce, the current facet list on the diamond, chain ID, and previous deployment records. The tool then guides you through deploying the facet contract, cutting the facet into the diamond (adding or replacing functions), updating the diamond storage, verifying the facet deployment on-chain, and syncing facet status across chains.

HOW TO USE

Connect your wallet via the built-in connector. Select the network where the diamond contract is deployed. Enter the diamond contract address, the facet bytecode, the function selectors (comma-separated hex values, e.g., "0x12345678,0x90abcdef"), an optional diamond factory address, and the payment token address (use address(0) for native token). The tool will read on-chain data and display a preview including: diamond address, facet bytecode, selectors, factory address, payment token, account nonce, current facets on the diamond, estimated gas, and deployment status. Review all details carefully. Click "deploy facet & cut" to deploy the facet and cut it into the diamond. The tool will guide you through four steps: deploying the facet contract, cutting the facet into the diamond, updating diamond storage, and verifying the deployment.

TECHNICAL MECHANISM

The tool uses ethers.js v5.7.2 to interact with the diamond contract and facet factory. It reads the current facet list using `diamond.facetAddresses()` and `diamond.facetFunctionSelectors(facetAddress)` to check for existing selectors. The account nonce is read via `provider.getTransactionCount(deployer)` and gas estimates are calculated using `estimateGas` on the diamond's `diamondCut()` method with EIP-1559 fee data from `feeData`. The tool deploys the facet contract by sending a transaction with the facet bytecode. After deployment, it constructs a `FacetCut` struct containing the facet address, action (add/replace), and function selectors. The diamondCut transaction calls `diamondCut(facetCuts, init, initData)` on the diamond contract, which updates the diamond's function registry. For factory-based deployments, the tool calls the factory's `deployAndCut()` method which combines both steps. Gas estimates are calculated using `estimateGas` with EIP-1559 fee data from `feeData`. All transactions are built with EIP-1559 fee data, and the tool uses `effectiveGasPrice` from receipts for accurate cost accounting. The tool also verifies the facet deployment by checking the bytecode at the deployed address.

WHAT IT CANNOT SEE

This tool cannot verify that the facet is secure or free from vulnerabilities—it only deploys and cuts the facet. It cannot detect if the facet will conflict with existing functions—selectors must be unique. It cannot guarantee that the diamond will function correctly after the cut—this depends on the facet's implementation and storage layout. It cannot ensure that the facet is compatible with the diamond's storage layout—facets must use the same storage structure. It cannot validate that the facet's selectors are correct—you must provide the correct function signatures. It cannot detect if the diamond contract has been modified. It cannot verify that the facet matches the intended implementation. It cannot predict gas costs for deployment.

PLEASE NOTE

This tool is EVM-only and supports Ethereum, Polygon, BNB Chain, Arbitrum, Optimism, and Avalanche. Facet deployment and diamond cut transactions are signed by the connected wallet, and the user pays gas fees. Diamond cuts are irreversible—ensure the facet is correct before deploying. Always test on testnet before using on mainnet. The tool does not store or transmit any deployment data.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.