1
0
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:
Pedro Gutiérrez 2019-01-28 16:45:38 +01:00 committed by Pedro Gutiérrez
parent 3364feb9dd
commit 0599ba67fa
2 changed files with 11 additions and 11 deletions

View File

@ -11,17 +11,18 @@ export default class ServiceExecutionAgreement extends ContractBase {
return serviceAgreement
}
public async setupAgreementTemplate(templateId: string,
methodReflections: MethodReflection[],
dependencyMatrix: number[],
name: any,
fulfillmentIndices: number[],
fulfillmentOperator: number,
ownerAddress: string): Promise<Receipt> {
public async setupTemplate(
templateId: string,
methodReflections: MethodReflection[],
dependencyMatrix: number[],
fulfillmentIndices: number[],
fulfillmentOperator: number,
ownerAddress: string,
): Promise<Receipt> {
return this.send("setupAgreementTemplate", ownerAddress, [
return this.send("setupTemplate", ownerAddress, [
templateId, methodReflections.map((r) => r.address),
methodReflections.map((r) => r.signature), dependencyMatrix, name, fulfillmentIndices,
methodReflections.map((r) => r.signature), dependencyMatrix, fulfillmentIndices,
fulfillmentOperator,
])
}

View File

@ -61,11 +61,10 @@ export default class ServiceAgreementTemplate extends OceanBase {
let receipt
try {
receipt = await serviceAgreement
.setupAgreementTemplate(
.setupTemplate(
this.template.id,
await this.getMethodReflections(),
dependencyMatrix,
Web3Provider.getWeb3().utils.fromAscii(this.template.templateName),
fulfillmentIndices,
this.template.fulfillmentOperator,
templateOwnerAddress)