From f9d6e17c2e956804e86e434d8a5b78a674bcc7d2 Mon Sep 17 00:00:00 2001 From: aalu1418 Date: Thu, 10 Nov 2022 13:52:07 -0700 Subject: [PATCH 1/4] use proposed owner for logging in acceptOwnership --- .../src/commands/contracts/ownership/acceptOwnership.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ownership/acceptOwnership.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ownership/acceptOwnership.ts index a07531b17..17b9f87a9 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ownership/acceptOwnership.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ownership/acceptOwnership.ts @@ -56,7 +56,7 @@ export const makeAcceptOwnershipCommand = ( logger.info(`Accepting Ownership of contract of type "${contract.type}": - Contract: ${contract.address} ${contract.description ? '- ' + contract.description : ''} - Current Owner: ${ownership.owner.toString()} - - Next Owner (Current signer): ${this.wallet.publicKey}`) + - Next Owner (proposed): ${ownership.proposedOwner.toString()}`) await prompt('Continue?') } From 93e303b6ee377798818cc28cb8ea69edaa163635 Mon Sep 17 00:00:00 2001 From: aalu1418 Date: Thu, 10 Nov 2022 13:57:38 -0700 Subject: [PATCH 2/4] handle potential undefined proposedOwner --- .../src/commands/contracts/ownership/acceptOwnership.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ownership/acceptOwnership.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ownership/acceptOwnership.ts index 17b9f87a9..3a5c11427 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ownership/acceptOwnership.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ownership/acceptOwnership.ts @@ -56,7 +56,7 @@ export const makeAcceptOwnershipCommand = ( logger.info(`Accepting Ownership of contract of type "${contract.type}": - Contract: ${contract.address} ${contract.description ? '- ' + contract.description : ''} - Current Owner: ${ownership.owner.toString()} - - Next Owner (proposed): ${ownership.proposedOwner.toString()}`) + - Next Owner (proposed): ${ownership.proposedOwner?.toString()}`) await prompt('Continue?') } From 0d1300cbb8c3b32cc16d9802b21c267e52a5aab3 Mon Sep 17 00:00:00 2001 From: aalu1418 Date: Thu, 10 Nov 2022 14:53:27 -0700 Subject: [PATCH 3/4] more logging for validation on acceptFeedOwnership --- .../src/commands/contracts/store/acceptFeedOwnership.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/acceptFeedOwnership.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/acceptFeedOwnership.ts index cef7c8627..814f053e7 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/acceptFeedOwnership.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/acceptFeedOwnership.ts @@ -26,6 +26,9 @@ export default class AcceptFeedOwnership extends SolanaCommand { // Need to resolve feed.proposedOwner. This will either match signer // store with store.owner == signer. If not, the instruction will error const feedAccount = (await program.account.transmissions.fetch(state)) as any + logger.info(`Ownership details for feed (address): + - Current Owner: ${feedAccount.owner.toString()} + - Next Owner (proposed): ${feedAccount.proposedOwner?.toString()}`) const tx = await program.methods .acceptFeedOwnership() From 5feff9f5f3ad2dddcd380e2c028ab9d0ac38776d Mon Sep 17 00:00:00 2001 From: aalu1418 Date: Thu, 10 Nov 2022 14:55:11 -0700 Subject: [PATCH 4/4] fix: log contract address - not 'address' --- .../src/commands/contracts/store/acceptFeedOwnership.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/acceptFeedOwnership.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/acceptFeedOwnership.ts index 814f053e7..d811cd97c 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/acceptFeedOwnership.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/acceptFeedOwnership.ts @@ -26,7 +26,7 @@ export default class AcceptFeedOwnership extends SolanaCommand { // Need to resolve feed.proposedOwner. This will either match signer // store with store.owner == signer. If not, the instruction will error const feedAccount = (await program.account.transmissions.fetch(state)) as any - logger.info(`Ownership details for feed (address): + logger.info(`Ownership details for feed ${address}: - Current Owner: ${feedAccount.owner.toString()} - Next Owner (proposed): ${feedAccount.proposedOwner?.toString()}`)