Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
accessControl: map->repeated
Browse files Browse the repository at this point in the history
  • Loading branch information
taryune committed Dec 13, 2023
1 parent c7be9d2 commit c15ece2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion proto/mycel/registry/second_level_domain.proto
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ message SecondLevelDomain {
(gogoproto.nullable) = false
];
map<string, Record> records = 5;
map<string, DomainRole> accessControl = 6;
repeated DomainRole accessControl = 6;
}
21 changes: 16 additions & 5 deletions proto/mycel/registry/subdomain_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,32 @@ syntax = "proto3";
package mycel.registry;

import "cosmos/base/v1beta1/coin.proto";
import "mycel/registry/role.proto";

option go_package = "github.com/mycel-domain/mycel/x/registry/types";

message SubdomainRegistrationFees {
map<uint32, Fee> feeByLength = 1;
map<string, Fee> feeByName = 2;
repeated FeeByLength feeByLength = 1;
repeated FeeByName feeByName = 2;
cosmos.base.v1beta1.Coin defaultFee = 3;
}

message Fee {
bool isRegistrable = 1;
cosmos.base.v1beta1.Coin fee = 2;
message FeeByLength {
uint32 length = 1;
bool isRegistrable = 2;
cosmos.base.v1beta1.Coin fee = 3;
}

message FeeByName {
string name = 1;
bool isRegistrable = 2;
cosmos.base.v1beta1.Coin fee = 3;
}

message SubdomainConfig {
uint64 maxSubdomainRegistrations = 1;
SubdomainRegistrationFees subdomainRegistrationFees = 2;
bool isRegistrable = 3;
DomainRole registrableRole = 4;
bool customExpirationDate = 5;
}
9 changes: 4 additions & 5 deletions proto/mycel/registry/top_level_domain.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ message TopLevelDomain {
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false
];
map<string, string> metadata = 3;
SubdomainConfig subdomainConfig = 4;
uint64 subdomainCount = 5;
map<string, DomainRole> accessControl = 6;
repeated cosmos.base.v1beta1.Coin totalWithdrawalAmount = 7 [
SubdomainConfig subdomainConfig = 3;
uint64 subdomainCount = 4;
repeated DomainRole accessControl = 5;
repeated cosmos.base.v1beta1.Coin totalWithdrawalAmount = 6 [
(gogoproto.nullable) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
Expand Down

0 comments on commit c15ece2

Please sign in to comment.