mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
updated setupTemplate method
This commit is contained in:
parent
3364feb9dd
commit
0599ba67fa
@ -11,17 +11,18 @@ export default class ServiceExecutionAgreement extends ContractBase {
|
|||||||
return serviceAgreement
|
return serviceAgreement
|
||||||
}
|
}
|
||||||
|
|
||||||
public async setupAgreementTemplate(templateId: string,
|
public async setupTemplate(
|
||||||
|
templateId: string,
|
||||||
methodReflections: MethodReflection[],
|
methodReflections: MethodReflection[],
|
||||||
dependencyMatrix: number[],
|
dependencyMatrix: number[],
|
||||||
name: any,
|
|
||||||
fulfillmentIndices: number[],
|
fulfillmentIndices: number[],
|
||||||
fulfillmentOperator: number,
|
fulfillmentOperator: number,
|
||||||
ownerAddress: string): Promise<Receipt> {
|
ownerAddress: string,
|
||||||
|
): Promise<Receipt> {
|
||||||
|
|
||||||
return this.send("setupAgreementTemplate", ownerAddress, [
|
return this.send("setupTemplate", ownerAddress, [
|
||||||
templateId, methodReflections.map((r) => r.address),
|
templateId, methodReflections.map((r) => r.address),
|
||||||
methodReflections.map((r) => r.signature), dependencyMatrix, name, fulfillmentIndices,
|
methodReflections.map((r) => r.signature), dependencyMatrix, fulfillmentIndices,
|
||||||
fulfillmentOperator,
|
fulfillmentOperator,
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
@ -61,11 +61,10 @@ export default class ServiceAgreementTemplate extends OceanBase {
|
|||||||
let receipt
|
let receipt
|
||||||
try {
|
try {
|
||||||
receipt = await serviceAgreement
|
receipt = await serviceAgreement
|
||||||
.setupAgreementTemplate(
|
.setupTemplate(
|
||||||
this.template.id,
|
this.template.id,
|
||||||
await this.getMethodReflections(),
|
await this.getMethodReflections(),
|
||||||
dependencyMatrix,
|
dependencyMatrix,
|
||||||
Web3Provider.getWeb3().utils.fromAscii(this.template.templateName),
|
|
||||||
fulfillmentIndices,
|
fulfillmentIndices,
|
||||||
this.template.fulfillmentOperator,
|
this.template.fulfillmentOperator,
|
||||||
templateOwnerAddress)
|
templateOwnerAddress)
|
||||||
|
Loading…
Reference in New Issue
Block a user