Skip to content

Commit 7ac1ffd

Browse files
committed
ci
1 parent db101f8 commit 7ac1ffd

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

examples/oft-solana/tasks/solana/setUpdateAuthority.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ interface Args {
1515
newUpdateAuthority?: string
1616
renounceUpdateAuthority?: boolean
1717
eid: EndpointId
18+
ci: boolean
1819
}
1920

2021
// sets the update authority via Metaplex
@@ -27,8 +28,15 @@ task('lz:oft:solana:set-update-authority', 'Updates the metaplex update authorit
2728
.addParam('mint', 'The Token mint public key', undefined, devtoolsTypes.string)
2829
.addOptionalParam('newUpdateAuthority', 'The new update authority', undefined, devtoolsTypes.string)
2930
.addOptionalParam('renounceUpdateAuthority', 'Renounce update authority', false, devtoolsTypes.boolean)
31+
.addFlag('ci', 'Continue without confirmation')
3032
.setAction(
31-
async ({ eid, mint: mintStr, newUpdateAuthority: newUpdateAuthorityStr, renounceUpdateAuthority }: Args) => {
33+
async ({
34+
eid,
35+
mint: mintStr,
36+
newUpdateAuthority: newUpdateAuthorityStr,
37+
renounceUpdateAuthority,
38+
ci,
39+
}: Args) => {
3240
// if not renouncing, must provide new update authority
3341
if (!renounceUpdateAuthority && !newUpdateAuthorityStr) {
3442
throw new Error(
@@ -73,7 +81,7 @@ task('lz:oft:solana:set-update-authority', 'Updates the metaplex update authorit
7381
console.log(`\nCurrent update authority: ${initialMetadata.updateAuthority}\n`)
7482
console.log(`\nNew update authority: ${updateAuthority.toString()}\n`)
7583

76-
if (renounceUpdateAuthority) {
84+
if (renounceUpdateAuthority && !ci) {
7785
const doContinue = await promptToContinue(
7886
'You have chosen `--renounce-update-authority true`. This means that the Update Authority will be immediately renounced. This is irreversible. Continue?'
7987
)

0 commit comments

Comments
 (0)