import { TaskContext, Chain } from "compose";
export async function main({ evm, env }: TaskContext) {
// custom chain spec
const myCustomChain: Chain = {
id: 480,
name: "My Custom Chain",
testnet: false,
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
rpcUrls: {
default: { http: [`https://mycustomchain-mainnet.g.alchemy.com/v2/${env.MY_CUSTOM_CHAIN_API}`] },
public: { http: ["https://mycustomchain-mainnet.g.alchemy.com/public"] },
},
blockExplorers: {
default: { name: "myCustomChainScan", url: "https://myCustomChainScan.org" },
},
};
// you can now use the myCustomChain const anywhere you'd use a built-in chain (see Wallets and Smart Contracts for details)
console.log(myCustomChain);
}