File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed
Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ export type GlobalState = {
2424 source ?: CompilationFileSources | null | SourceWithTarget ,
2525 version ?: string ,
2626 data ?: CompilationResult | null ,
27+ enforceDeterministicReason ?: string ,
2728 }
2829 form : {
2930 network ?: string | TenantNetworkResponse ;
Original file line number Diff line number Diff line change 5454 let enforceDeterministic = $derived .by (() => {
5555 const selectedMultisig = globalState .form .approvalType === ' existing' && isMultisig (globalState .form .approvalProcessSelected ?.viaType );
5656 const toCreateMultisig = globalState .form .approvalType === ' new' && isMultisig (globalState .form .approvalProcessToCreate ?.viaType );
57- return selectedMultisig || toCreateMultisig ;
57+ const hasReasonMessage = globalState .contract ?.enforceDeterministicReason !== undefined ;
58+ return selectedMultisig || toCreateMultisig || hasReasonMessage ;
5859 });
5960
6061 const deploymentUrl = $derived (
9798
9899 if (globalState .contract ?.target && compilationResult ) {
99100 inputs = getConstructorInputsWizard (globalState .contract .target , compilationResult .output .contracts );
101+
102+ // Clear deploy status messages
103+ successMessage = " " ;
104+ errorMessage = " " ;
100105 }
101106 isCompiling = false ;
102107 }
226231 }
227232
228233 if ((isDeterministic || enforceDeterministic ) && ! salt ) {
229- displayMessage (" Salt is required" , " error" );
234+ if (globalState .contract ?.enforceDeterministicReason ) {
235+ displayMessage (` Salt is required: ${globalState .contract .enforceDeterministicReason } ` , " error" );
236+ } else {
237+ displayMessage (" Salt is required" , " error" );
238+ }
230239 return ;
231240 }
232241
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { globalState } from "$lib/state/state.svelte";
44export interface DefenderDeployMessage {
55 kind : 'oz-wizard-defender-deploy' ;
66 sources : ContractSources ;
7+ enforceDeterministicReason ?: string ;
78}
89
910export const initWizardPlugin = ( ) => {
@@ -18,7 +19,8 @@ function listenToContracts() {
1819 source : {
1920 sources : e . data . sources ,
2021 } ,
21- target : getMainContractName ( e . data . sources )
22+ target : getMainContractName ( e . data . sources ) ,
23+ enforceDeterministicReason : e . data . enforceDeterministicReason ,
2224 } ;
2325 }
2426 } ) ;
You can’t perform that action at this time.
0 commit comments