Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add publish tasks to service marketplace #844

Merged
merged 24 commits into from
Apr 7, 2019
Merged

Conversation

NicolasMahe
Copy link
Member

Dependent on #843

I created 3 task to replace the generic sendSignTransaction. Each task return the decoded event from the receipt of the ethereum transaction. It means that the service output the data that has been added to ethereum.

Eg:

➜  core git:(ss/marketplace-publish-tasks) ✗ ./dev-cli service execute marketplace --task publishPurchase --data signedTransactions=0xf8e91d843b9aca00830f42409494f4cb92fe9f547574aec617b1594b13abd47ad380b8843a1835e1000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011636f6d2e6d6573672e657468657265756d0000000000000000000000000000002aa0068bc218cdc2cc3355ae4d0cf1d76299fa472a53efcceebe519f9529fa01abaea0713b0ba42f117fdcb0cab2062aa9b6d71ae496901dedb241794a834d2fccf68f
✔ Task "publishPurchase" executed
✔ Task publishPurchase returned output success with data:
{"duration":"86400","expire":"2019-03-31T10:53:03.000Z","offerIndex":"0","price":"1000","purchaser":"0xcAB79fA69c68CB4C65fa5C6E05BC4dBa5FB57D11","sid":"com.mesg.ethereum"}

Because there is no service composition yet, for example to create an offer, the user first needs to call prepareCreateServiceOffer, then sign the transaction with the service ethwallet, and then call publishCreateServiceOffer.

@NicolasMahe NicolasMahe changed the title Ss/marketplace publish tasks Add publish tasks to service marketplace Mar 29, 2019
# Conflicts:
#	systemservices/marketplace/src/contracts/utils.ts
#	systemservices/marketplace/src/events/index.ts
#	systemservices/marketplace/src/events/serviceCreated.ts
#	systemservices/marketplace/src/events/serviceOfferCreated.ts
#	systemservices/marketplace/src/events/serviceOfferDisabled.ts
#	systemservices/marketplace/src/events/serviceOwnershipTransferred.ts
#	systemservices/marketplace/src/events/servicePurchased.ts
#	systemservices/marketplace/src/events/serviceVersionCreated.ts
#	systemservices/marketplace/src/index.ts
@NicolasMahe
Copy link
Member Author

@mesg-foundation/core this PR is ready to review

antho1404
antho1404 previously approved these changes Apr 5, 2019
…error

Remove unnecessary test on undefined value
Copy link
Contributor

@ilgooz ilgooz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

manual tests are ok

@ilgooz ilgooz merged commit 0f04a6f into dev Apr 7, 2019
@ilgooz ilgooz deleted the ss/marketplace-publish-tasks branch April 7, 2019 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants