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

substrate implementation #1

Closed
Ivshti opened this issue Oct 9, 2018 · 0 comments
Closed

substrate implementation #1

Ivshti opened this issue Oct 9, 2018 · 0 comments

Comments

@Ivshti
Copy link
Member

Ivshti commented Oct 9, 2018

Considering we already have Ethereum and Cosmos implementations here:
https://github.com/AdExNetwork/adex-protocol-eth
https://github.com/AdExNetwork/adex-protocol-cosmos

The next step will be a substrate implementation:

THIS BELOW IS OUTDATED; see https://github.com/adexnetwork/adex-protocol-substrate

A brief look into https://github.com/paritytech/substrate/blob/master/srml/example/src/lib.rs shows that we need to:

  • port the types from the go implementation in cosmos to rust
  • decl_module for bid_cancel, commitment_start and commitment_finalize
  • use let sender = ensure_signed(origin)? for bid_cancel and commitment_start, since those need to be invoked by respecitvely the demand (advertiser) and supply (publisher)
  • use on_finalise to do cleanup, i.e. timed out commitments
  • everything should emit an event, so decl_event for each one
  • the substrate storage should make our job pretty straight forward when it comes to storing things
Ivshti pushed a commit that referenced this issue Nov 25, 2018
@Ivshti Ivshti mentioned this issue Dec 28, 2018
@Ivshti Ivshti closed this as completed Dec 30, 2018
Ivshti added a commit that referenced this issue Apr 30, 2022
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

No branches or pull requests

1 participant