Skip to content

Commit

Permalink
update gauntlet
Browse files Browse the repository at this point in the history
  • Loading branch information
aalu1418 committed Jul 9, 2024
1 parent 3e4e5cf commit 4610958
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { SolanaCommand, utils } from '@chainlink/gauntlet-solana'
import { logger, BN, prompt } from '@chainlink/gauntlet-core/dist/utils'
import { PublicKey, Keypair, TransactionInstruction, SystemProgram, AccountMeta } from '@solana/web3.js'
import { Program } from '@coral-xyz/anchor'
import { Program, Idl } from '@coral-xyz/anchor'
import { MAX_BUFFER_SIZE } from '../lib/constants'
import { isDeepEqual } from '../lib/utils'
import { CONTRACT_LIST, getContract } from '../lib/contracts'
Expand Down Expand Up @@ -35,7 +35,7 @@ type ProposalState = {
export const wrapCommand = (command) => {
return class Multisig extends SolanaCommand {
command: SolanaCommand
program: any // TODO: typing Program<any> doesn't validate
program: Program<Idl>
multisigAddress: PublicKey

static id = `${command.id}:multisig`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { logger, prompt } from '@chainlink/gauntlet-core/dist/utils'
import { SolanaCommand } from '@chainlink/gauntlet-solana'
import { PublicKey, TransactionInstruction, AccountMeta } from '@solana/web3.js'
import { PublicKey, TransactionInstruction, AccountMeta, ComputeBudgetProgram } from '@solana/web3.js'
import { CONTRACT_LIST, getContract } from '../../lib/contracts'

export default abstract class Close extends SolanaCommand {
Expand Down Expand Up @@ -45,6 +45,10 @@ export default abstract class Close extends SolanaCommand {
...extraAccounts,
})
.remainingAccounts(remainingAccounts)
.preInstructions([
// close seems to consume just over 200k units for some reason now
ComputeBudgetProgram.setComputeUnitLimit({ units: 300_000 })
])
.instruction()

return [ix]
Expand Down

0 comments on commit 4610958

Please sign in to comment.