1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00
Sebastian Gerske dfff8fc228 added event wireup
added lock payment
added fulfilmentOperators
added declarative way to describe dependencies
added service agreement termination
2018-11-20 09:13:03 +01:00

47 lines
1.5 KiB
TypeScript

import Method from "../Method"
import TemplateBase from "./TemplateBase"
export default class FitchainCompute extends TemplateBase {
public templateName: string = "FitchainCompute"
public id: string = "0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6"
public Methods: Method[] = [
{
name: "lockPayment",
contractName: "PaymentConditions",
methodName: "lockPayment",
timeout: 0,
dependencies: [],
dependencyTimeoutFlags: [],
isTerminalCondition: false,
} as Method,
{
name: "grantAccess",
contractName: "AccessConditions",
methodName: "grantAccess",
timeout: 10,
dependencies: ["lockPayment"],
dependencyTimeoutFlags: [0],
isTerminalCondition: false,
} as Method,
{
name: "releasePayment",
contractName: "PaymentConditions",
methodName: "releasePayment",
timeout: 10,
dependencies: ["grantAccess"],
dependencyTimeoutFlags: [0],
isTerminalCondition: true,
} as Method,
{
name: "refundPayment",
contractName: "PaymentConditions",
methodName: "refundPayment",
timeout: 10,
dependencies: ["lockPayment", "grantAccess"],
dependencyTimeoutFlags: [0, 1],
isTerminalCondition: true,
} as Method,
]
}