Sei: Deploy Contract
AI-generatedOverview
This node enables deploying smart contracts to the Sei blockchain or any EVM-compatible network. It supports deploying custom contracts by providing ABI and bytecode, as well as quickly deploying standard ERC-20 tokens or ERC-721 NFT collections using predefined contract templates.
Common scenarios include:
- Launching a new ERC-20 token with specified name, symbol, decimals, and initial supply.
- Creating an ERC-721 NFT collection with a given name and symbol.
- Deploying any custom smart contract by supplying its compiled bytecode, ABI, and constructor arguments.
Practical examples:
- A developer wants to create their own fungible token on Sei testnet for a decentralized app.
- An artist launches an NFT collection on Sei mainnet.
- A project deploys a custom DeFi contract with specific constructor parameters.
Properties
| Name | Meaning |
|---|---|
| Blockchain | Target Sei EVM network. Options: "Sei Mainnet EVM (Pacific-1)", "Sei Testnet EVM (Atlantic-2)", or "Custom". Default RPC endpoints are highly throttled; using a custom RPC URL is recommended for better reliability. |
| Custom RPC | Custom Sei EVM RPC endpoint URL. Required if "Blockchain" is set to "Custom". |
| Contract Type | Type of contract to deploy. Options: "Custom", "ERC-20 Token", "ERC-721 NFT". |
| Contract ABI | JSON ABI for the custom contract. Required if "Contract Type" is "Custom". |
| Contract Bytecode | Compiled bytecode (hex string starting with 0x) for the custom contract. Required if "Contract Type" is "Custom". |
| Constructor Arguments | List of constructor argument values for the custom contract. Multiple values allowed. Required if "Contract Type" is "Custom". |
| Token Name | Full name of the ERC-20 token. Shown if "Contract Type" is "ERC-20 Token". |
| Token Symbol | Symbol/ticker of the ERC-20 token. Shown if "Contract Type" is "ERC-20 Token". |
| Decimals | Number of decimal places for the ERC-20 token (usually 18). Shown if "Contract Type" is "ERC-20 Token". |
| Initial Supply | Initial token supply for the ERC-20 token. This value will be multiplied by 10^decimals. Shown if "Contract Type" is "ERC-20 Token". |
| Collection Name | Name of the NFT collection. Shown if "Contract Type" is "ERC-721 NFT". |
| Collection Symbol | Symbol of the NFT collection. Shown if "Contract Type" is "ERC-721 NFT". |
Output
The node outputs an array of JSON objects, one per input item, each containing:
contractAddress: The deployed contract's address on the blockchain.transactionHash: The transaction hash of the deployment transaction.contractType: The type of contract deployed ("custom", "erc20", or "erc721").constructorArgs: Array of constructor argument values used during deployment.abi: The contract ABI used.bytecode: The contract bytecode used.rpcUrl: The RPC endpoint URL used for deployment.chainId: Identifier of the target blockchain network.timestamp: ISO timestamp of when the deployment occurred.success: Boolean indicating whether deployment succeeded.- If deployment failed, includes:
error: trueerrorMessage: Error message describing the failure.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential with private key access to sign transactions on the Sei blockchain or compatible EVM chain.
- Uses the
etherslibrary to interact with the blockchain via JSON-RPC. - Supports default RPC URLs for Sei mainnet and testnet but recommends using a custom RPC endpoint due to throttling.
- Includes precompiled contract ABIs and bytecodes for standard ERC-20 and ERC-721 contracts bundled internally.
Troubleshooting
- Missing Custom RPC URL: When selecting "Custom" blockchain, a custom RPC URL must be provided. Otherwise, the node throws an error.
- Unknown Network: Selecting a blockchain network not recognized by the node results in an error.
- Deployment Failures: Errors during contract deployment (e.g., invalid bytecode, incorrect constructor args, insufficient funds) will cause the node to output an error object with details.
- Throttling Issues: Using default RPC endpoints may lead to rate limiting; switching to a dedicated RPC provider can resolve timeouts or slow responses.
- Invalid ABI or Bytecode: For custom contracts, ensure the ABI is valid JSON and bytecode is a proper hex string starting with "0x".
- Constructor Arguments Mismatch: Providing incorrect number or types of constructor arguments can cause deployment to fail.