From 5934af84fc8fc59b8c472c097a4349f0c1f7e4f4 Mon Sep 17 00:00:00 2001 From: Sergei Drugalev Date: Mon, 13 Nov 2023 08:24:16 +0100 Subject: [PATCH] yarn formatting --- .../contracts/ocr2/acceptPayeeship.ts | 34 +++++++------- .../contracts/ocr2/transferPayeeship.ts | 46 ++++++++++--------- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/acceptPayeeship.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/acceptPayeeship.ts index 12646e255..df839e270 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/acceptPayeeship.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/acceptPayeeship.ts @@ -5,20 +5,18 @@ import { PublicKey } from '@solana/web3.js' import { CONTRACT_LIST, getContract } from '../../../lib/contracts' type Input = { - transmitter: string + transmitter: string } type ContractInput = { - transmitter: string - proposedPayee: PublicKey + transmitter: string + proposedPayee: PublicKey } export default class AcceptPayeeship extends SolanaCommand { static id = 'ocr2:accept_payeeship' static category = CONTRACT_LIST.OCR_2 - static examples = [ - 'yarn gauntlet ocr2:accept_payeeship --network= --transmitter= ', - ] + static examples = ['yarn gauntlet ocr2:accept_payeeship --network= --transmitter= '] input: Input contractInput: ContractInput @@ -27,11 +25,11 @@ export default class AcceptPayeeship extends SolanaCommand { if (userInput) return userInput as Input if (!this.flags.transmitter) { - throw Error('Please specify a valid transmitter (--transmitter))') + throw Error('Please specify a valid transmitter (--transmitter))') } - + return { - transmitter: this.flags.transmitter, + transmitter: this.flags.transmitter, } } @@ -42,12 +40,12 @@ export default class AcceptPayeeship extends SolanaCommand { const oracle = contractOracles.find(({ transmitter }) => transmitter.toString() == input.transmitter) if (!oracle) { - throw Error(`No oracle found with the transmitter id ${input.transmitter}`) + throw Error(`No oracle found with the transmitter id ${input.transmitter}`) } return { - transmitter: input.transmitter, - proposedPayee: oracle.proposedPayee, + transmitter: input.transmitter, + proposedPayee: oracle.proposedPayee, } } @@ -66,12 +64,12 @@ export default class AcceptPayeeship extends SolanaCommand { makeRawTransaction = async (signer: PublicKey) => { const data = this.program.instruction.acceptPayeeship({ - accounts: { - state: new PublicKey(this.args[0]), - authority: signer, - transmitter: this.contractInput.transmitter, - proposedPayee: this.contractInput.proposedPayee, - }, + accounts: { + state: new PublicKey(this.args[0]), + authority: signer, + transmitter: this.contractInput.transmitter, + proposedPayee: this.contractInput.proposedPayee, + }, }) return [data] diff --git a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/transferPayeeship.ts b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/transferPayeeship.ts index 9a1101026..3b1f6f6ba 100644 --- a/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/transferPayeeship.ts +++ b/gauntlet/packages/gauntlet-solana-contracts/src/commands/contracts/ocr2/transferPayeeship.ts @@ -5,14 +5,14 @@ import { PublicKey } from '@solana/web3.js' import { CONTRACT_LIST, getContract } from '../../../lib/contracts' type Input = { - transmitter: string - proposedPayee: string + transmitter: string + proposedPayee: string } type ContractInput = { - transmitter: string - payee: PublicKey - proposedPayee: PublicKey + transmitter: string + payee: PublicKey + proposedPayee: PublicKey } export default class TransferPayeeship extends SolanaCommand { @@ -29,16 +29,16 @@ export default class TransferPayeeship extends SolanaCommand { if (userInput) return userInput as Input if (!this.flags.transmitter) { - throw Error('Please specify a valid transmitter (--transmitter))') + throw Error('Please specify a valid transmitter (--transmitter))') } if (!this.flags.proposedPayee) { - throw Error('Please specify a valid proposed payee (--proposedPayee)') + throw Error('Please specify a valid proposed payee (--proposedPayee)') } - + return { - transmitter: this.flags.transmitter, - proposedPayee: this.flags.proposedPayee, + transmitter: this.flags.transmitter, + proposedPayee: this.flags.proposedPayee, } } @@ -49,13 +49,13 @@ export default class TransferPayeeship extends SolanaCommand { const oracle = contractOracles.find(({ transmitter }) => transmitter.toString() == input.transmitter) if (!oracle) { - throw Error(`No oracle found with the transmitter id ${input.transmitter}`) + throw Error(`No oracle found with the transmitter id ${input.transmitter}`) } return { - transmitter: input.transmitter, - payee: new PublicKey(oracle.payee), - proposedPayee: new PublicKey(input.proposedPayee), + transmitter: input.transmitter, + payee: new PublicKey(oracle.payee), + proposedPayee: new PublicKey(input.proposedPayee), } } @@ -74,20 +74,22 @@ export default class TransferPayeeship extends SolanaCommand { makeRawTransaction = async (signer: PublicKey) => { const data = this.program.instruction.transferPayeeship({ - accounts: { - state: new PublicKey(this.args[0]), - authority: signer, - transmitter: this.contractInput.transmitter, - payee: this.contractInput.payee, - proposedPayee: this.contractInput.proposedPayee, - }, + accounts: { + state: new PublicKey(this.args[0]), + authority: signer, + transmitter: this.contractInput.transmitter, + payee: this.contractInput.payee, + proposedPayee: this.contractInput.proposedPayee, + }, }) return [data] } beforeExecute = async () => { - logger.loading(`Transferring payeeship for transmitter ${this.contractInput.transmitter}: ${this.contractInput.payee} -> ${this.contractInput.proposedPayee}`) + logger.loading( + `Transferring payeeship for transmitter ${this.contractInput.transmitter}: ${this.contractInput.payee} -> ${this.contractInput.proposedPayee}`, + ) await prompt(`Continue?`) }