MCPcopy Create free account
hub / github.com/circlefin/arc-node / enforceOperatorsNotProxyAdmin

Function enforceOperatorsNotProxyAdmin

scripts/genesis/types.ts:156–170  ·  view source on GitHub ↗
(
  ctx: z.RefinementCtx,
  contractName: string,
  proxyAdmin: Address,
  operators: ReadonlyArray<{ key: string; value: Address }>,
)

Source from the content-addressed store, hash-verified

154 * Emit a zod issue for any operator that collides with the contract's proxy admin.
155 */
156export const enforceOperatorsNotProxyAdmin = (
157 ctx: z.RefinementCtx,
158 contractName: string,
159 proxyAdmin: Address,
160 operators: ReadonlyArray<{ key: string; value: Address }>,
161) => {
162 for (const { key, value } of operators) {
163 if (value === proxyAdmin) {
164 ctx.addIssue({
165 code: z.ZodIssueCode.custom,
166 message: `Operator ${key} cannot be the same as the proxy admin of ${contractName}`,
167 })
168 }
169 }
170}
171
172/**
173 * bigintReplacer encode bigint to string.

Callers 4

NativeFiatToken.tsFile · 0.90
ProtocolConfig.tsFile · 0.90
Denylist.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected