-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from ethereum-optimism/01-14-fix_allow_verifyi…
…ng_from_interactive_mode_for_deploy fix: allow verifying from interactive mode for deploy
- Loading branch information
Showing
4 changed files
with
60 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
packages/cli/src/deploy-create2-wizard/ShouldVerifyContract.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import {useDeployCreate2WizardStore} from '@/deploy-create2-wizard/deployCreate2WizardStore'; | ||
import {ConfirmInput} from '@inkjs/ui'; | ||
import {Box, Text} from 'ink'; | ||
|
||
export const ShouldVerifyContract = () => { | ||
const {wizardState, submitShouldVerifyContract} = | ||
useDeployCreate2WizardStore(); | ||
|
||
if (wizardState.stepId !== 'should-verify-contract') { | ||
throw new Error('Invalid state'); | ||
} | ||
|
||
return ( | ||
<Box paddingX={1} gap={1}> | ||
<Text>Do you want to verify the contract on the block explorer?</Text> | ||
<ConfirmInput | ||
onConfirm={() => { | ||
submitShouldVerifyContract({shouldVerifyContract: true}); | ||
}} | ||
onCancel={() => { | ||
submitShouldVerifyContract({shouldVerifyContract: false}); | ||
}} | ||
/> | ||
</Box> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters