@proto-kit/protocol • Docs
Documentation / @proto-kit/protocol / ContractModule
Class: abstract ContractModule<ContractType, Config>
This module type is used to define a contract module that can be used to construct and inject smart contract instances. It defines a method contractFactory, whose arguments can be configured via the Argument generic. It returns a smart contract class that is a subclass of SmartContract and implements a certain interface as specified by the ContractType generic.
Extends
ConfigurableModule<Config>
Extended by
BridgingSettlementContractModuleSettlementSmartContractModuleDispatchContractProtocolModuleBridgeContractProtocolModule
Type Parameters
• ContractType
• Config = NoConfig
Implements
Constructors
new ContractModule()
new ContractModule<
ContractType,Config>():ContractModule<ContractType,Config>
Returns
ContractModule<ContractType, Config>
Inherited from
ConfigurableModule.constructor
Properties
currentConfig
protectedcurrentConfig:undefined|Config
Store the config separately, so that we can apply additional checks when retrieving it via the getter
Inherited from
ConfigurableModule.currentConfig
Defined in
packages/common/dist/config/ConfigurableModule.d.ts:17
Accessors
config
Get Signature
get config():
Config
Returns
Config
Set Signature
set config(
config):void
Parameters
• config: Config
Returns
void
Inherited from
Defined in
packages/common/dist/config/ConfigurableModule.d.ts:18
Methods
compile()
abstractcompile(registry):Promise<undefined|ArtifactRecord>
Parameters
• registry: CompileRegistry
Returns
Promise<undefined | ArtifactRecord>
Implementation of
Defined in
packages/protocol/src/settlement/ContractModule.ts:28
contractFactory()
abstractcontractFactory():SmartContractClassFromInterface<ContractType>
Returns
SmartContractClassFromInterface<ContractType>
Defined in
packages/protocol/src/settlement/ContractModule.ts:26
create()
create(
childContainerProvider):void
Parameters
• childContainerProvider: ChildContainerProvider
Returns
void
Inherited from
Defined in
packages/common/dist/config/ConfigurableModule.d.ts:20