From b8d57fc46703acb38fe7d9410270a88c62728323 Mon Sep 17 00:00:00 2001 From: Christophe Date: Wed, 25 Sep 2024 16:27:56 +0200 Subject: [PATCH] Cleanup --- src/types/Actions.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/types/Actions.ts b/src/types/Actions.ts index dd028e92..71093865 100644 --- a/src/types/Actions.ts +++ b/src/types/Actions.ts @@ -12,11 +12,11 @@ type isEmptyObject = Args extends Record ? true : false; export type ActionParameters = Prettify< Curried extends false ? isEmptyObject extends true - ? { [key in ContractName]: Address } | { sequencerInbox: Address } // Contract wasn't curried. Args is an empty object. Only requires the contract name - : { params: Args } & ({ [key in ContractName]: Address } | { sequencerInbox: Address }) // Contract wasn't curried. Args is not empty. Requires both params and contract name + ? { [key in ContractName]: Address } // Contract wasn't curried. Args is an empty object. Only requires the contract name + : { params: Args } & { [key in ContractName]: Address } // Contract wasn't curried. Args is not empty. Requires both params and contract name : isEmptyObject extends true - ? { [key in ContractName]: Address } | { sequencerInbox: Address } | void // Contract was curried. Args is empty. Only requires the contract name. Allows no parameters - : { params: Args } & ({ [key in ContractName]?: Address } | { sequencerInbox?: Address }) // Contract was curried. Args is not empty. Requires params, contract name is optional + ? { [key in ContractName]: Address } | void // Contract was curried. Args is empty. Only requires the contract name. Allows no parameters + : { params: Args } & { [key in ContractName]?: Address } // Contract was curried. Args is not empty. Requires params, contract name is optional >; export type WithAccount = Args & {