diff --git a/src/actions/ens.ts b/src/actions/ens.ts index f0a9392..15cc838 100644 --- a/src/actions/ens.ts +++ b/src/actions/ens.ts @@ -24,12 +24,12 @@ export const ensAction = async ( cid: string, domain: string, { - chain: chainName, safe: safeAddress, operationType - }: { chain: ChainName; } & Partial<{ safe: Address | EIP3770Address, operationType: OperationType }>, + chain: chainName, safe: safeAddress, operationType, rpcUrl + }: { chain: ChainName; } & Partial<{ safe: Address | EIP3770Address, operationType: OperationType; rpcUrl:string }>, ) => { const chain = chainName === 'mainnet' ? mainnet : goerli const publicClient = createPublicClient({ - transport: http(chain.id === 1 ? 'https://rpc.ankr.com/eth' : 'https://rpc.ankr.com/eth_goerli'), + transport: http(rpcUrl ?? chain.id === 1 ? 'https://rpc.ankr.com/eth' : 'https://rpc.ankr.com/eth_goerli'), chain }) diff --git a/src/cli.ts b/src/cli.ts index 772fe83..5331b75 100755 --- a/src/cli.ts +++ b/src/cli.ts @@ -5,9 +5,9 @@ import { cac } from 'cac' import { ensAction } from './actions/ens.js' import { statusAction } from './actions/status.js' import { deployAction } from './actions/deploy.js' -import { OperationType } from '@stauro/piggybank/types' import './polyfills/fetch.js' +import { OperationType } from '@stauro/piggybank/types' const cli = cac('blumen') @@ -19,11 +19,13 @@ cli .option('--name ', 'Name of the distribution (without file extension)') .option('--dist ', 'Directory to store the distribution file') .action(deployAction) + .example('blumen deploy --strict ./dist') cli .command('status ', 'Check IPFS pinning status') .option('--providers ', 'List providers to check status from') .action(statusAction) + .example('blumen status bafybeibp54tslsez36quqptgzwyda3vo66za3rraujksmsb3d5q247uht4 --providers web3.storage') cli .command( @@ -33,9 +35,9 @@ cli .option('--chain ', 'Chain to use', { default: 'mainnet' }) .option('--safe ', 'Deploy using a Safe multisig wallet') .option('--operation-type ', 'Operation type to use for a Safe multisig wallet (0 - Call, 1 - DelegateCall)', { default: OperationType.Call }) + .option('--rpc-url ', 'Custom Ethereum RPC') .action(ensAction) cli.help() -cli.version('0.0.0-dev.1') -cli.example('blumen deploy --strict ./dist') +cli.version('0.1.0') cli.parse()