Try it: deploy from your browser
You do not need a local toolchain. Compile and deploy a contract to Sei Testnet directly from the browser. The Remix sandbox below preloads a minimalCounter.sol.
First, add Sei Testnet to your wallet:
Then, in Remix:
- Compile the contract on the Solidity Compiler tab.
- Open the Deploy & Run tab.
- Set Environment to Injected Provider - MetaMask.
- Click Deploy.
Deploying with viem or ethers
Deploying with Foundry
Foundry works against Sei with the standard--rpc-url flag.
Without
--broadcast, forge create only simulates the deployment. Put --constructor-args last, because it takes every value after it.Deploying with Hardhat
Add the Sei networks to yourhardhat.config.ts (Hardhat 3). Keep the toolbox in the plugins array. It comes with projects that npx hardhat --init creates, and it includes Hardhat Ignition for deployments:
ignition/modules/MyContract.ts:
Verifying contracts
The Sei block explorer is Seiscan. The recommended verification method is Sourcify. It does not require an API key.Foundry
Verify the contract after you deploy it:--chain-id 1328 and --rpc-url https://evm-rpc-testnet.sei-apis.com.
Hardhat
If you use a Hardhat toolbox (as in the config above),hardhat-verify is already bundled and active. Skip ahead to the verify command. Without a toolbox, install the plugin:
plugins array in hardhat.config.ts. Sourcify verification is enabled by default in hardhat-verify and does not need an API key:
sourcify subtask, npx hardhat verify tries to verify the contract on all enabled providers (Etherscan, Blockscout, and Sourcify) in a single run.