mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
added create_compute_service_attributes
This commit is contained in:
parent
d3c4407010
commit
cf7d003d56
@ -261,4 +261,25 @@ export class OceanCompute extends Instantiable {
|
|||||||
|
|
||||||
return computeJobsList[0] as ComputeJob
|
return computeJobsList[0] as ComputeJob
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async create_compute_service_attributes(consumerAccount: Account,price: string,datePublished: string){
|
||||||
|
const { templates } = this.ocean.keeper
|
||||||
|
const serviceAgreementTemplate = await templates.escrowComputeExecutionTemplate.getServiceAgreementTemplate()
|
||||||
|
const name = 'dataAssetComputingServiceAgreement'
|
||||||
|
const service = {
|
||||||
|
type: 'compute',
|
||||||
|
serviceEndpoint: this.ocean.brizo.getComputeEndpoint(),
|
||||||
|
templateId: templates.escrowComputeExecutionTemplate.getId(),
|
||||||
|
attributes: {
|
||||||
|
main: {
|
||||||
|
creator: consumerAccount.getId(),
|
||||||
|
datePublished,
|
||||||
|
price,
|
||||||
|
timeout: 3600,
|
||||||
|
name
|
||||||
|
},
|
||||||
|
serviceAgreementTemplate
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return(service)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user