Private key of the account that will be used to deploy the chain. You might wanna put this in an environment variable!
Your chain's unique identifier. It differentiates your chain from others in the ecosystem.
This name provides a way for people to distinguish your Arbitrum chain from other Arbitrum chains. You'll want to make this a name that you can easily remember, and that your users and developers will recognize.
Account address responsible for deploying, owning, and managing your Arbitrum chain's base contracts on its parent chain.
// ============================================
// Arbitrum Rollup Deployment Script
// Generated by Arbitrum Chain Configurator
// Chain: My Orbit Chain (ID: 333333)
// Type: rollup | Gas Token: ETH
// ============================================
import { Chain, createPublicClient, http } from 'viem';
import { arbitrumSepolia } from 'viem/chains';
import { privateKeyToAccount } from 'viem/accounts';
import {
prepareChainConfig,
createRollupPrepareDeploymentParamsConfig,
createRollup,
setValidKeysetPrepareTransactionRequest
} from '@arbitrum/chain-sdk';
function getBlockExplorerUrl(chain: Chain) {
return chain.blockExplorers?.default.url;
}
const parentChain = arbitrumSepolia;
const parentChainPublicClient = createPublicClient({
chain: parentChain,
transport: http(),
});
const deployer = privateKeyToAccount("");
const chainId = 333333;
async function main() {
try {
const createRollupConfig = createRollupPrepareDeploymentParamsConfig(parentChainPublicClient, {
chainId: BigInt(chainId),
owner: deployer.address,
chainConfig: prepareChainConfig({
chainId,
arbitrum: {
InitialChainOwner: deployer.address,
DataAvailabilityCommittee: false,
},
}),
});
const rollup = await createRollup({
params: {
config: createRollupConfig
},
account: deployer,
parentChainPublicClient,
});
console.log("Rollup created: ", rollup.coreContracts.rollup);
} catch (error) {
console.error(`Rollup deployment failed with error: ${error}`);
}
}
main();