@@ -105,6 +105,11 @@ export async function executeDeploy(options: DeployOptions): Promise<DeploymentR
105105 String ( networkConfig . chain_id ) ,
106106 ] ;
107107
108+ // Add legacy flag early if needed
109+ if ( options . legacy || networkConfig . legacy ) {
110+ displayArgs . push ( "--legacy" ) ;
111+ }
112+
108113 let constructorArgs = options . constructorArgs ;
109114 if ( constructorArgs . length === 0 ) {
110115 const template = getTemplate ( options . alias ) ;
@@ -123,10 +128,6 @@ export async function executeDeploy(options: DeployOptions): Promise<DeploymentR
123128 displayArgs . push ( "--constructor-args" , ...constructorArgs ) ;
124129 }
125130
126- if ( options . salt ) {
127- displayArgs . push ( "--salt" , options . salt ) ;
128- }
129-
130131 const actualForgeArgs = [ ...displayArgs , "--json" ] ;
131132
132133 const maskedCommand = formatCommand ( "forge" , maskSensitiveArgs ( displayArgs ) ) ;
@@ -233,7 +234,9 @@ export function registerDeployCommand(program: Command): void {
233234 . option ( "--constructor-arg <value>" , "Constructor argument" , collectArgs , [ ] )
234235 . option ( "--salt <salt>" , "Deterministic deployment salt" )
235236 . option ( "--dry-run" , "Print command without executing" )
236- . action ( async ( alias : string , cmdOptions ) => {
237+ . option ( "--legacy" , "Use legacy transactions instead of EIP1559" )
238+
239+ . action ( async ( alias : string , cmdOptions ) => {
237240 const network = cmdOptions . network ?? getDefaultNetwork ( ) ;
238241 if ( ! network ) {
239242 throw new Error ( "Network is required (pass --network or set FORGE_WRAPPER_NETWORK)" ) ;
@@ -253,6 +256,7 @@ export function registerDeployCommand(program: Command): void {
253256 rpcUrl : cmdOptions . rpcUrl ,
254257 dryRun : Boolean ( cmdOptions . dryRun ) ,
255258 salt : cmdOptions . salt ,
259+ legacy : Boolean ( cmdOptions . legacy ) ,
256260 } ) ;
257261
258262 if ( ! cmdOptions . dryRun ) {
0 commit comments