import { createPublicClient, createWalletClient, http } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import { sei } from 'viem/chains';
const account = privateKeyToAccount('0xYourPrivateKey');
const publicClient = createPublicClient({ chain: sei, transport: http() });
const walletClient = createWalletClient({ account, chain: sei, transport: http() });
const hash = await walletClient.deployContract({
abi: CONTRACT_ABI,
bytecode: '0x608060...',
args: [/* constructor args */],
});
const { contractAddress } = await publicClient.waitForTransactionReceipt({ hash });
console.log('Deployed at:', contractAddress);