@gala-chain/chaincode ∙ API
API > GalaContract
Class: abstract GalaContract
Contents
- Extends
- Constructors
- new GalaContract(name, version, config)
- Properties
- config
- version
- Methods
- BatchEvaluate()
- BatchSubmit()
- DryRun()
- GetChaincodeVersion()
- GetContractAPI()
- GetContractVersion()
- GetObjectByKey()
- GetObjectHistory()
- afterTransaction()
- aroundTransaction()
- beforeTransaction()
- createContext()
- getContractAPI()
- getName()
- getVersion()
- unknownTransaction()
- _isContract()
Extends
Contract
Constructors
new GalaContract(name, version, config)
new GalaContract(
name,version,config):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.
▪ config: GalaChainContextConfig= {}
Overrides
Contract.constructor
Source
chaincode/src/contracts/GalaContract.ts:69
Properties
config
privatereadonlyconfig:GalaChainContextConfig={}
Source
chaincode/src/contracts/GalaContract.ts:72
version
privatereadonlyversion: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:71
Methods
BatchEvaluate()
BatchEvaluate(
ctx,batchDto):Promise\<GalaChainResponse\<unknown>[]>
Parameters
▪ ctx: GalaChainContext
▪ batchDto: BatchDto
Source
chaincode/src/contracts/GalaContract.ts:283
BatchSubmit()
BatchSubmit(
ctx,batchDto):Promise\<GalaChainResponse\<unknown>[]>
Parameters
▪ ctx: GalaChainContext
▪ batchDto: BatchDto
Source
chaincode/src/contracts/GalaContract.ts:233
DryRun()
DryRun(
ctx,dto):Promise\<DryRunResultDto>
Parameters
▪ ctx: GalaChainContext
▪ dto: DryRunDto
Source
chaincode/src/contracts/GalaContract.ts:168
GetChaincodeVersion()
GetChaincodeVersion(
ctx):Promise\<string>
Parameters
▪ ctx: GalaChainContext
Source
chaincode/src/contracts/GalaContract.ts:124
GetContractAPI()
GetContractAPI(
ctx):Promise\<ContractAPI>
Parameters
▪ ctx: GalaChainContext
Source
chaincode/src/contracts/GalaContract.ts:132
GetContractVersion()
GetContractVersion(
ctx):Promise\<string>
Parameters
▪ ctx: GalaChainContext
Source
chaincode/src/contracts/GalaContract.ts:113
GetObjectByKey()
GetObjectByKey(
ctx,dto):Promise\<Record\<string,unknown>>
Parameters
▪ ctx: GalaChainContext
▪ dto: GetObjectDto
Source
chaincode/src/contracts/GalaContract.ts:150
GetObjectHistory()
GetObjectHistory(
ctx,dto):Promise\<Record\<string,unknown>>
Parameters
▪ ctx: GalaChainContext
▪ dto: GetObjectHistoryDto
Source
chaincode/src/contracts/GalaContract.ts:159
afterTransaction()
afterTransaction(
ctx,result):Promise\<void>
Parameters
▪ ctx: GalaChainContext
▪ result: unknown
Overrides
Contract.afterTransaction
Source
chaincode/src/contracts/GalaContract.ts:95
aroundTransaction()
aroundTransaction(
ctx,fn,parameters):Promise\<void>
Parameters
▪ ctx: GalaChainContext
▪ fn: Function
▪ parameters: unknown
Overrides
Contract.aroundTransaction
Source
chaincode/src/contracts/GalaContract.ts:90
beforeTransaction()
beforeTransaction(
ctx):Promise\<void>
Parameters
▪ ctx: GalaChainContext
Overrides
Contract.beforeTransaction
Source
chaincode/src/contracts/GalaContract.ts:85
createContext()
createContext():
GalaChainContext
Overrides
Contract.createContext
Source
chaincode/src/contracts/GalaContract.ts:81
getContractAPI()
getContractAPI():
ContractAPI
Source
chaincode/src/contracts/GalaContract.ts:139
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:77
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