Skip to content

Commit

Permalink
Add disable check specifically for proxy address (#489)
Browse files Browse the repository at this point in the history
  • Loading branch information
augustbleeds authored Jul 8, 2024
1 parent 8871bab commit 800e241
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { ExecuteCommandConfig, makeExecuteCommand } from '@chainlink/starknet-gauntlet'
import { CATEGORIES } from '../../lib/categories'
import { ocr2ProxyLoader, CONTRACT_LIST } from '../../lib/contracts'

type UserInput = {}

type ContractInput = []

const makeUserInput = async (flags, args, env): Promise<UserInput> => {
if (flags.input) return flags.input as UserInput
return {}
}

const makeContractInput = async (input: UserInput): Promise<ContractInput> => {
return []
}

const commandConfig: ExecuteCommandConfig<UserInput, ContractInput> = {
contractId: CONTRACT_LIST.PROXY,
category: CATEGORIES.PROXY,
action: 'disable_access_check',
ux: {
description: 'Disable access check at aggregator proxy',
examples: [`${CATEGORIES.PROXY}:disable_access_check --network=<NETWORK> <AGGREGATOR_PROXY>`],
},
makeUserInput,
makeContractInput,
validations: [],
loadContract: ocr2ProxyLoader,
}

export default makeExecuteCommand(commandConfig)
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import ProposeAggregator from './proposeAggregator'
import ConfirmAggregator from './confirmAggregator'
import TransferOwnership from './transferOwnership'
import AcceptOwnership from './acceptOwnership'
import DisableAccessCheck from './disableAccessCheck'

export const executeCommands = [
Deploy,
Expand All @@ -15,5 +16,6 @@ export const executeCommands = [
ConfirmAggregator,
TransferOwnership,
AcceptOwnership,
DisableAccessCheck,
]
export const inspectionCommands = [Inspect]

0 comments on commit 800e241

Please sign in to comment.