From 261f095a916c704f2e36aaa9b7014d3e841bf23f Mon Sep 17 00:00:00 2001 From: RodrigoAD <15104916+RodrigoAD@users.noreply.github.com> Date: Wed, 12 Jan 2022 15:51:15 +0100 Subject: [PATCH] Changed set writer input interface --- .../src/commands/contracts/store/setWriter.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/setWriter.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/setWriter.ts index 3badc9b9e..5019e714c 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/setWriter.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/store/setWriter.ts @@ -8,7 +8,6 @@ import { getRDD } from '../../../lib/rdd' type Input = { transmissions: string - store: string } export default class SetWriter extends SolanaCommand { @@ -16,21 +15,21 @@ export default class SetWriter extends SolanaCommand { static category = CONTRACT_LIST.STORE static examples = [ - 'yarn gauntlet store:set_writer --network=devnet --state=EPRYwrb1Dwi8VT5SutS4vYNdF8HqvE7QwvqeCCwHdVLC', + 'yarn gauntlet store:set_writer --network=devnet --state=EPRYwrb1Dwi8VT5SutS4vYNdF8HqvE7QwvqeCCwHdVLC --ocrState=EPRYwrb1Dwi8VT5SutS4vYNdF8HqvE7QwvqeCCwHdVLC', ] constructor(flags, args) { super(flags, args) this.require(!!this.flags.state, 'Please provide flags with "state"') + this.require(!!this.flags.ocrState, 'Please provide flags with "ocrState"') } makeInput = (userInput): Input => { if (userInput) return userInput as Input const rdd = getRDD(this.flags.rdd) - const agg = rdd[this.flags.state] + const agg = rdd[this.flags.ocrState] return { - store: agg.storeAccount, transmissions: agg.transmissionsAccount, } } @@ -45,9 +44,9 @@ export default class SetWriter extends SolanaCommand { const input = this.makeInput(this.flags.input) const owner = this.wallet.payer - const ocr2State = new PublicKey(this.flags.state) + const storeState = new PublicKey(this.flags.state) + const ocr2State = new PublicKey(this.flags.ocrState) const feedState = new PublicKey(input.transmissions) - const storeState = new PublicKey(input.store) const [storeAuthority, _storeNonce] = await PublicKey.findProgramAddress( [Buffer.from(utils.bytes.utf8.encode('store')), ocr2State.toBuffer()],