Skip to main content

consumer module

The consumer module is responsible for handling the pledge and unpledge of consumers and datasets.

protocol

consumer

    Consumer represents a consumer user, including an account address and the dataset he has pledged. CPDT (consumer pledge dataset token) represents a consumer pledging a certain number of tokens to a dataset.

message CPDT {
string dataset_name = 1
[(gogoproto.nullable) = true];
string amount = 2
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
}

message Consumer {
string consumer_address = 1;
repeated CPDT CPDTs = 2
[
(gogoproto.moretags) = "yaml:\"cpdts\"",
(gogoproto.customname) = "CPDTs"
];
string description = 3;
}


params

message Params {
option (gogoproto.goproto_stringer) = false;
google.protobuf.Duration releasing_cpdt_wait_time = 1
[ (gogoproto.nullable) = false,
(gogoproto.stdduration) = true,
(gogoproto.customname) = "ReleasingCPDTWaitTime",
(gogoproto.moretags) = "yaml:\"releasing_cpdt_wait_time\""];
uint32 max_cpdt_entries = 2 [
(gogoproto.moretags) = "yaml:\"max_cpdt_entries\"",
(gogoproto.customname) = "MaxCPDTEntries"
];
}
  • releasing_cpdt_wait_time: release waiting time
  • max_cpdt_entries: the maximum number of datasets a consumer can pledge