From de541a9fd372f73409683244a635db8953c38b46 Mon Sep 17 00:00:00 2001 From: ssallam Date: Tue, 10 Mar 2020 11:37:06 +0100 Subject: [PATCH] Replace serviceExecution with computeExecution. --- CHANGELOG.md | 6 ---- .../EscrowCompute.serviceAgreementTemplate.ts | 2 +- test/unit/__fixtures__/ddo.json | 34 +++++++++---------- 3 files changed, 18 insertions(+), 24 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffc3135..d2a3e75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,6 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). -#### [v2.0.0](https://github.com/oceanprotocol/squid-js/compare/2.0.0-beta.4...v2.0.0) - -> 9 March 2020 - -- Release 2.0.0 [`5a5e00f`](https://github.com/oceanprotocol/squid-js/commit/5a5e00f6c671d68153ad94704535253027142ff3) - #### [2.0.0-beta.4](https://github.com/oceanprotocol/squid-js/compare/v2.0.0-beta.3...2.0.0-beta.4) > 6 March 2020 diff --git a/src/keeper/contracts/templates/EscrowCompute.serviceAgreementTemplate.ts b/src/keeper/contracts/templates/EscrowCompute.serviceAgreementTemplate.ts index 5c35f85..5587649 100644 --- a/src/keeper/contracts/templates/EscrowCompute.serviceAgreementTemplate.ts +++ b/src/keeper/contracts/templates/EscrowCompute.serviceAgreementTemplate.ts @@ -20,7 +20,7 @@ export const escrowComputeServiceAgreementTemplate: ServiceAgreementTemplate = { ], conditionDependency: { lockReward: [], - serviceExecution: [], + computeExecution: [], escrowReward: ['lockReward', 'computeExecution'] }, conditions: [ diff --git a/test/unit/__fixtures__/ddo.json b/test/unit/__fixtures__/ddo.json index 939b4a6..73ddd2f 100644 --- a/test/unit/__fixtures__/ddo.json +++ b/test/unit/__fixtures__/ddo.json @@ -138,7 +138,7 @@ "actorType": "consumer", "handler": { "moduleName": "accessSecretStore", - "functionName": "fulfillEscrowRewardCondition", + "functionName": "refundReward", "version": "0.1" } } @@ -255,10 +255,10 @@ "contractName": "EscrowComputeExecutionTemplate", "events": [ { - "name": "AgreementCreated", - "actorType": "consumer", + "name": "AgreementActorAdded", + "actorType": "provider", "handler": { - "moduleName": "serviceExecutionTemplate", + "moduleName": "", "functionName": "fulfillLockRewardCondition", "version": "0.1" } @@ -266,13 +266,13 @@ ], "fulfillmentOrder": [ "lockReward.fulfill", - "serviceExecution.fulfill", + "computeExecution.fulfill", "escrowReward.fulfill" ], "conditionDependency": { "lockReward": [], - "serviceExecution": [], - "releaseReward": ["lockReward", "serviceExecution"] + "computeExecution": [], + "releaseReward": ["lockReward", "computeExecution"] }, "conditions": [ { @@ -296,17 +296,17 @@ "events": [ { "name": "Fulfilled", - "actorType": "publisher", + "actorType": "provider", "handler": { - "moduleName": "lockRewardCondition", - "functionName": "fulfillServiceExecutionCondition", + "moduleName": "lockRewardExecutionCondition", + "functionName": "fulfillComputeExecutionCondition", "version": "0.1" } } ] }, { - "name": "serviceExecution", + "name": "computeExecution", "timelock": 0, "timeout": 0, "contractName": "ComputeExecutionCondition", @@ -326,10 +326,10 @@ "events": [ { "name": "Fulfilled", - "actorType": "publisher", + "actorType": "provider", "handler": { - "moduleName": "serviceExecution", - "functionName": "fulfillServiceExecutionCondition", + "moduleName": "accessSecretStore", + "functionName": "fulfillEscrowRewardCondition", "version": "0.1" } }, @@ -337,8 +337,8 @@ "name": "TimedOut", "actorType": "consumer", "handler": { - "moduleName": "serviceExec", - "functionName": "fulfillServiceExecutionCondition", + "moduleName": "accessSecretStore", + "functionName": "refundReward", "version": "0.1" } } @@ -380,7 +380,7 @@ "events": [ { "name": "Fulfilled", - "actorType": "publisher", + "actorType": "provider", "handler": { "moduleName": "escrowRewardCondition", "functionName": "verifyRewardTokens",