// NOTE: this reference will expose the compose "Chain" type
/// <reference types="../../.compose/types.d.ts" />
export async function main(
{ evm }: TaskContext,
_args: any
) {
// custom chain spec
export 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);
}