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:37

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:39

Methods

GetChaincodeVersion()

GetChaincodeVersion(ctx): Promise\<GalaChainResponse\<string>>

Parameters

ctx: GalaChainContext

Source

chaincode/src/contracts/GalaContract.ts:95


GetContractAPI()

GetContractAPI(ctx): Promise\<GalaChainResponse\<ContractAPI>>

Parameters

ctx: GalaChainContext

Source

chaincode/src/contracts/GalaContract.ts:104


GetContractVersion()

GetContractVersion(ctx): Promise\<GalaChainResponse\<string>>

Parameters

ctx: GalaChainContext

Source

chaincode/src/contracts/GalaContract.ts:84


GetObjectByKey()

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

Parameters

ctx: GalaChainContext

dto: GetObjectDto

Source

chaincode/src/contracts/GalaContract.ts:115


GetObjectHistory()

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

Parameters

ctx: GalaChainContext

dto: GetObjectHistoryDto

Source

chaincode/src/contracts/GalaContract.ts:127


afterTransaction()

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

Parameters

ctx: GalaChainContext

result: unknown

Overrides

Contract.afterTransaction

Source

chaincode/src/contracts/GalaContract.ts:62


aroundTransaction()

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

Parameters

ctx: GalaChainContext

fn: Function

parameters: unknown

Overrides

Contract.aroundTransaction

Source

chaincode/src/contracts/GalaContract.ts:57


beforeTransaction()

beforeTransaction(ctx): Promise\<void>

Parameters

ctx: GalaChainContext

Overrides

Contract.beforeTransaction

Source

chaincode/src/contracts/GalaContract.ts:52


createContext()

createContext(): GalaChainContext

Overrides

Contract.createContext

Source

chaincode/src/contracts/GalaContract.ts:48


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:44


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