Reference@proto-kit/protocolClassesSettlementSmartContractModule

@proto-kit/protocol • Docs


Documentation / @proto-kit/protocol / SettlementSmartContractModule

Class: SettlementSmartContractModule

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

Constructors

new SettlementSmartContractModule()

new SettlementSmartContractModule(hooks, blockProver, childVerificationKeyService, argsRegistry): SettlementSmartContractModule

Parameters

• hooks: ProvableSettlementHook<unknown>[]

• blockProver: BlockProvable

• childVerificationKeyService: ChildVerificationKeyService

• argsRegistry: ContractArgsRegistry

Returns

SettlementSmartContractModule

Overrides

ContractModule.constructor

Defined in

packages/protocol/src/settlement/contracts/SettlementSmartContractModule.ts:35

Properties

currentConfig

protected currentConfig: undefined | SettlementContractConfig

Store the config separately, so that we can apply additional checks when retrieving it via the getter

Inherited from

ContractModule.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

ContractModule.config

Defined in

packages/common/dist/config/ConfigurableModule.d.ts:18

Methods

compile()

compile(registry): Promise<undefined | ArtifactRecord>

Parameters

• registry: CompileRegistry

Returns

Promise<undefined | ArtifactRecord>

Overrides

ContractModule.compile

Defined in

packages/protocol/src/settlement/contracts/SettlementSmartContractModule.ts:61


contractFactory()

contractFactory(): SmartContractClassFromInterface<SettlementContractType>

Returns

SmartContractClassFromInterface<SettlementContractType>

Overrides

ContractModule.contractFactory

Defined in

packages/protocol/src/settlement/contracts/SettlementSmartContractModule.ts:46


create()

create(childContainerProvider): void

Parameters

• childContainerProvider: ChildContainerProvider

Returns

void

Inherited from

ContractModule.create

Defined in

packages/common/dist/config/ConfigurableModule.d.ts:20