Deploy a Contract
Prerequisites
Scaffold a project
forge init xenea-dapp-sandbox
cd xenea-dapp-sandboxConfigure Foundry
[profile.default]
src = "src"
out = "out"
libs = ["lib"]
evm_version = "paris"
[rpc_endpoints]
xenea_ubusuna = "https://rpc-ubusuna.xeneascan.com/"
# xenea_mainnet = "<RPC_URL>"Prepare a deployer wallet
Build and test
Deploy
Using forge script instead
Confirm deployment
Interact with the contract
Verify the contract
1. Generate Standard JSON Input
2. Look up the compiler version
3. Submit on XENEA Scan
Field
Value
Troubleshooting
cast code returns 0x
Deployment reverts with opcode errors
Verification fails on the explorer
Appendix: Command cheatsheet
Command
Purpose
Last updated