Extensions
Extensions are external smart contracts that can be added to the Paymaster contract. These extensions are used to enforce specific conditions or rules that must be met for a transaction to be eligible
createExtension
Deploys a new extension contract based on the provided parameters.
name
:string
- The name of the extension contract to be created.type
:ExtensionMethod
- The type of extension contract to be created. It can be one of the following:CONTRACT
,USER
, orFUNCTION
wallet
:WalletClient
: AWalletClient
instance used for signing transactions and interacting with the Restriction Factory contract.client
:PublicClient
: APublicClient
instance used for writing public transactions.items
:ExtensionItems
(optional) - An object containing the items (e.g., contract addresses, user addresses, function signatures with contract addresses) related to the extension being created.restrictionFactoryABI
:Abi
(optional) - The ABI of the Restriction Factory contract. If not provided, it will be retrieved based on the chain ID.restrictionFactoryContractAddress
:Address
(optional) - The address of the Restriction Factory contract. If not provided, it will be retrieved based on the chain ID.Returns
: Address: address of the deployed extension.
types
PaymasterParams
A tuple type representing the parameters for several methods of Paymaster instance, like sendPaymasterTransaction. Added for easier usage.
PaymasterType
ExtensionMethod
PaymasterOptions
PaymasterOverrides
BaseRestrictionItem
AddressOrBaseRestrictionItem
ContractItems
UserItems
FunctionItems
RestrictionItems
Last updated