flow-hydraulics / flow-pds

This repository is currently not maintained
4 stars 8 forks source link

Onchain data for distributions #76

Closed judezhu closed 2 years ago

judezhu commented 2 years ago

After discussion, we are requesting to add following data to distribution onchain:

        pub let title: String.                   # required field 
        pub let metadata: {String: String}.      # optional fields
        pub let state: String                    # state would be: invalid/completed

Also update the DistributionCreated event:

      # Issuer has created a distribution 
       pub event DistributionCreated(id: UInt32, title: String, metadata: {String: String}, state:String)
judezhu commented 2 years ago

Question: When do we emit DistributionCreated event? Does invalid distribution also emit DistributionCreated event?

whalelephant commented 2 years ago

DistributionCreated event is emitted when the user initially creates it. They will then need to use the emitted distId to configure the distribution on the backend so the backend knows where to find the capabilities.

This event is not emitted after the process completion / failure from the backend.