@gala-chain/chaincode • Readme | API
@gala-chain/chaincode / GalaContract
Class: abstract
GalaContract
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.
Returns
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
Returns
Promise
\<GalaChainResponse
\<string
>>
Source
chaincode/src/contracts/GalaContract.ts:94
GetContractAPI()
GetContractAPI(
ctx
):Promise
\<GalaChainResponse
\<ContractAPI
>>
Parameters
• ctx: GalaChainContext
Returns
Promise
\<GalaChainResponse
\<ContractAPI
>>
Source
chaincode/src/contracts/GalaContract.ts:103
GetContractVersion()
GetContractVersion(
ctx
):Promise
\<GalaChainResponse
\<string
>>
Parameters
• ctx: GalaChainContext
Returns
Promise
\<GalaChainResponse
\<string
>>
Source
chaincode/src/contracts/GalaContract.ts:84
GetObjectByKey()
GetObjectByKey(
ctx
,dto
):Promise
\<GalaChainResponse
\<Record
\<string
,unknown
>>>
Parameters
• ctx: GalaChainContext
• dto: GetObjectDto
Returns
Promise
\<GalaChainResponse
\<Record
\<string
, unknown
>>>
Source
chaincode/src/contracts/GalaContract.ts:114
GetObjectHistory()
GetObjectHistory(
ctx
,dto
):Promise
\<GalaChainResponse
\<Record
\<string
,unknown
>>>
Parameters
• ctx: GalaChainContext
• dto: GetObjectHistoryDto
Returns
Promise
\<GalaChainResponse
\<Record
\<string
, unknown
>>>
Source
chaincode/src/contracts/GalaContract.ts:126
afterTransaction()
afterTransaction(
ctx
,result
):Promise
\<void
>
Parameters
• ctx: GalaChainContext
• result: unknown
Returns
Promise
\<void
>
Overrides
Contract.afterTransaction
Source
chaincode/src/contracts/GalaContract.ts:62
aroundTransaction()
aroundTransaction(
ctx
,fn
,parameters
):Promise
\<void
>
Parameters
• ctx: GalaChainContext
• fn: Function
• parameters: unknown
Returns
Promise
\<void
>
Overrides
Contract.aroundTransaction
Source
chaincode/src/contracts/GalaContract.ts:57
beforeTransaction()
beforeTransaction(
ctx
):Promise
\<void
>
Parameters
• ctx: GalaChainContext
Returns
Promise
\<void
>
Overrides
Contract.beforeTransaction
Source
chaincode/src/contracts/GalaContract.ts:52
createContext()
createContext():
GalaChainContext
Returns
Overrides
Contract.createContext
Source
chaincode/src/contracts/GalaContract.ts:48
getName()
getName():
string
Returns
string
Inherited from
Contract.getName
Source
node_modules/fabric-contract-api/types/index.d.ts:33
getVersion()
getVersion():
string
Returns
string
Source
chaincode/src/contracts/GalaContract.ts:44
unknownTransaction()
unknownTransaction(
ctx
):Promise
\<void
>
Parameters
• ctx: Context
Returns
Promise
\<void
>
Inherited from
Contract.unknownTransaction
Source
node_modules/fabric-contract-api/types/index.d.ts:30
_isContract()
static
_isContract():boolean
Returns
boolean
Inherited from
Contract._isContract
Source
node_modules/fabric-contract-api/types/index.d.ts:24