Skip to main content

Deploy a Solidity contract

Khromosome is a standard EVM, so deploy with the tools you already use. Point them at the Khromosome RPC and chain 777001.

Foundry

forge create \
--rpc-url https://rpc.khromosome.xyz \
--private-key $PRIVATE_KEY \
src/MyContract.sol:MyContract

Hardhat

hardhat.config.ts:

import type { HardhatUserConfig } from 'hardhat/config';

const config: HardhatUserConfig = {
solidity: '0.8.24',
networks: {
khromosome: {
url: 'https://rpc.khromosome.xyz',
chainId: 777001,
accounts: [process.env.PRIVATE_KEY!],
},
},
};

export default config;
npx hardhat run scripts/deploy.ts --network khromosome

After deploy, open the contract address in the explorer to confirm the creation tx.