Skip to content

@gala-chain/chaincodeAPI


API > GalaContract

Class: abstract GalaContract

Contents

Extends

  • Contract

Constructors

new GalaContract(name, version)

new GalaContract(name, version): GalaContract

Parameters

name: string

Contract name

version: string

Contract version. The actual value should be defined in the child * class, and should be taken from package.json. If you extend contract class * that extends GalaContract, you should also override version.

Overrides

Contract.constructor

Source

chaincode/src/contracts/GalaContract.ts:43

Properties

version

private readonly version: string

Contract version. The actual value should be defined in the child * class, and should be taken from package.json. If you extend contract class * that extends GalaContract, you should also override version.

Source

chaincode/src/contracts/GalaContract.ts:45

Methods

DryRun()

DryRun(ctx, dto): Promise\<DryRunResultDto>

Parameters

ctx: GalaChainContext

dto: DryRunDto

Source

chaincode/src/contracts/GalaContract.ts:143


GetChaincodeVersion()

GetChaincodeVersion(ctx): Promise\<string>

Parameters

ctx: GalaChainContext

Source

chaincode/src/contracts/GalaContract.ts:105


GetContractAPI()

GetContractAPI(ctx): Promise\<ContractAPI>

Parameters

ctx: GalaChainContext

Source

chaincode/src/contracts/GalaContract.ts:114


GetContractVersion()

GetContractVersion(ctx): Promise\<string>

Parameters

ctx: GalaChainContext

Source

chaincode/src/contracts/GalaContract.ts:94


GetObjectByKey()

GetObjectByKey(ctx, dto): Promise\<Record\<string, unknown>>

Parameters

ctx: GalaChainContext

dto: GetObjectDto

Source

chaincode/src/contracts/GalaContract.ts:125


GetObjectHistory()

GetObjectHistory(ctx, dto): Promise\<Record\<string, unknown>>

Parameters

ctx: GalaChainContext

dto: GetObjectHistoryDto

Source

chaincode/src/contracts/GalaContract.ts:134


afterTransaction()

afterTransaction(ctx, result): Promise\<void>

Parameters

ctx: GalaChainContext

result: unknown

Overrides

Contract.afterTransaction

Source

chaincode/src/contracts/GalaContract.ts:68


aroundTransaction()

aroundTransaction(ctx, fn, parameters): Promise\<void>

Parameters

ctx: GalaChainContext

fn: Function

parameters: unknown

Overrides

Contract.aroundTransaction

Source

chaincode/src/contracts/GalaContract.ts:63


beforeTransaction()

beforeTransaction(ctx): Promise\<void>

Parameters

ctx: GalaChainContext

Overrides

Contract.beforeTransaction

Source

chaincode/src/contracts/GalaContract.ts:58


createContext()

createContext(): GalaChainContext

Overrides

Contract.createContext

Source

chaincode/src/contracts/GalaContract.ts:54


getName()

getName(): string

Inherited from

Contract.getName

Source

node_modules/fabric-contract-api/types/index.d.ts:33


getVersion()

getVersion(): string

Source

chaincode/src/contracts/GalaContract.ts:50


unknownTransaction()

unknownTransaction(ctx): Promise\<void>

Parameters

ctx: Context

Inherited from

Contract.unknownTransaction

Source

node_modules/fabric-contract-api/types/index.d.ts:30


_isContract()

static _isContract(): boolean

Inherited from

Contract._isContract

Source

node_modules/fabric-contract-api/types/index.d.ts:24