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

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
taryune committed Sep 15, 2023
2 parents 8f090a4 + 7f3cd06 commit 5c77c46
Show file tree
Hide file tree
Showing 23 changed files with 481 additions and 825 deletions.
129 changes: 67 additions & 62 deletions docs/static/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50067,10 +50067,12 @@ paths:
accessControl:
type: object
additionalProperties:
type: object
properties:
owner:
type: string
type: string
enum:
- NO_ROLE
- OWNER
- EDITOR
default: NO_ROLE
pagination:
type: object
properties:
Expand Down Expand Up @@ -50275,10 +50277,12 @@ paths:
accessControl:
type: object
additionalProperties:
type: object
properties:
owner:
type: string
type: string
enum:
- NO_ROLE
- OWNER
- EDITOR
default: NO_ROLE
default:
description: An unexpected error response.
schema:
Expand Down Expand Up @@ -50446,12 +50450,12 @@ paths:
accessControl:
type: object
additionalProperties:
type: object
properties:
owner:
type: string
recordEditor:
type: string
type: string
enum:
- NO_ROLE
- OWNER
- EDITOR
default: NO_ROLE
pagination:
type: object
properties:
Expand Down Expand Up @@ -50662,12 +50666,12 @@ paths:
accessControl:
type: object
additionalProperties:
type: object
properties:
owner:
type: string
recordEditor:
type: string
type: string
enum:
- NO_ROLE
- OWNER
- EDITOR
default: NO_ROLE
default:
description: An unexpected error response.
schema:
Expand Down Expand Up @@ -80680,6 +80684,13 @@ definitions:
type: string
parent:
type: string
mycel.registry.DomainRole:
type: string
enum:
- NO_ROLE
- OWNER
- EDITOR
default: NO_ROLE
mycel.registry.Fee:
type: object
properties:
Expand Down Expand Up @@ -80909,12 +80920,12 @@ definitions:
accessControl:
type: object
additionalProperties:
type: object
properties:
owner:
type: string
recordEditor:
type: string
type: string
enum:
- NO_ROLE
- OWNER
- EDITOR
default: NO_ROLE
pagination:
type: object
properties:
Expand Down Expand Up @@ -81034,10 +81045,12 @@ definitions:
accessControl:
type: object
additionalProperties:
type: object
properties:
owner:
type: string
type: string
enum:
- NO_ROLE
- OWNER
- EDITOR
default: NO_ROLE
pagination:
type: object
properties:
Expand Down Expand Up @@ -81194,12 +81207,12 @@ definitions:
accessControl:
type: object
additionalProperties:
type: object
properties:
owner:
type: string
recordEditor:
type: string
type: string
enum:
- NO_ROLE
- OWNER
- EDITOR
default: NO_ROLE
mycel.registry.QueryGetTopLevelDomainResponse:
type: object
properties:
Expand Down Expand Up @@ -81291,10 +81304,12 @@ definitions:
accessControl:
type: object
additionalProperties:
type: object
properties:
owner:
type: string
type: string
enum:
- NO_ROLE
- OWNER
- EDITOR
default: NO_ROLE
mycel.registry.QueryIsRegistrableDomainResponse:
type: object
properties:
Expand Down Expand Up @@ -81404,12 +81419,12 @@ definitions:
accessControl:
type: object
additionalProperties:
type: object
properties:
owner:
type: string
recordEditor:
type: string
type: string
enum:
- NO_ROLE
- OWNER
- EDITOR
default: NO_ROLE
mycel.registry.SubdomainConfig:
type: object
properties:
Expand Down Expand Up @@ -81537,13 +81552,6 @@ definitions:

NOTE: The amount field is an Int which implements the custom method
signatures required by gogoproto.
mycel.registry.SubdomainRole:
type: object
properties:
owner:
type: string
recordEditor:
type: string
mycel.registry.TopLevelDomain:
type: object
properties:
Expand Down Expand Up @@ -81630,15 +81638,12 @@ definitions:
accessControl:
type: object
additionalProperties:
type: object
properties:
owner:
type: string
mycel.registry.TopLevelDomainRole:
type: object
properties:
owner:
type: string
type: string
enum:
- NO_ROLE
- OWNER
- EDITOR
default: NO_ROLE
mycel.registry.WalletRecord:
type: object
properties:
Expand Down
19 changes: 10 additions & 9 deletions proto/mycel/registry/dns_record.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ package mycel.registry;
option go_package = "github.com/mycel-domain/mycel/x/registry/types";

enum DnsRecordType {
A = 0;
AAAA = 1;
CNAME = 2;
NS = 3;
MX = 4;
PTR = 5;
SOA = 6;
SRV = 7;
TXT = 8;
NO_RECORD_TYPE = 0;
A = 1;
AAAA = 2;
CNAME = 3;
NS = 4;
MX = 5;
PTR = 6;
SOA = 7;
SRV = 8;
TXT = 9;
}
66 changes: 34 additions & 32 deletions proto/mycel/registry/network_name.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,54 +6,56 @@ option go_package = "github.com/mycel-domain/mycel/x/registry/types";
enum NetworkName {
// Rule: CHAINNAME_ENVIROMENT_NETWORK

// BTC 0xxx
BITCOIN_MAINNET_MAINNET = 0;
BITCOIN_TESTNET_TESTNET = 1;
NO_NETWORK = 0;

// EVM 1xxxx
// BTC 1xxx
BITCOIN_MAINNET_MAINNET = 10000;
BITCOIN_TESTNET_TESTNET = 10001;

// EVM 2xxxx
// Etheruem
ETHEREUM_MAINNET_MAINNET = 10000;
ETHEREUM_TESTNET_GOERLI = 10001;
ETHEREUM_TESTNET_SEPOLIA = 10002;
ETHEREUM_MAINNET_MAINNET = 20000;
ETHEREUM_TESTNET_GOERLI = 20001;
ETHEREUM_TESTNET_SEPOLIA = 20002;
// Polygon
POLYGON_MAINNET_MAINNET = 10003;
POLYGON_TESTNET_MUMBAI = 10004;
POLYGON_MAINNET_MAINNET = 20003;
POLYGON_TESTNET_MUMBAI = 20004;
// BNB Chain
BNB_MAINNET_MAINNET = 10005;
BNB_TESTNET_TESTNET = 10006;
BNB_MAINNET_MAINNET = 20005;
BNB_TESTNET_TESTNET = 20006;
// Avalanche
AVALANCHE_MAINNET_CCHAIN = 10007;
AVALANCHE_TESTNET_FUJI = 10008;
AVALANCHE_MAINNET_CCHAIN = 20007;
AVALANCHE_TESTNET_FUJI = 20008;
// Gnosis
GNOSIS_MAINNET_MAINNET = 10009;
GNOSIS_TESTNET_CHIADO = 10010;
GNOSIS_MAINNET_MAINNET = 20009;
GNOSIS_TESTNET_CHIADO = 20010;
// Optimism
OPTIMISM_MAINNET_MAINNET = 10011;
OPTIMISM_TESTNET_GOERLI = 10012;
OPTIMISM_MAINNET_MAINNET = 20011;
OPTIMISM_TESTNET_GOERLI = 20012;
// Arbitrum
ARBITRUM_MAINNET_MAINNET = 10013;
ARBITRUM_TESTNET_GOERLI = 10014;
ARBITRUM_MAINNET_MAINNET = 20013;
ARBITRUM_TESTNET_GOERLI = 20014;
//Shardeum
// SHARDEUM_MAINNET_ = 10015;
// SHARDEUM_TESTNET_ = 10016;
SHARDEUM_BETANET_SPHINX= 10017;
// SHARDEUM_MAINNET_ = 20015;
// SHARDEUM_TESTNET_ = 20016;
SHARDEUM_BETANET_SPHINX= 20017;
// Zetachain
// ZETA_MAINNET_MAINNET = 10018;
ZETA_TESTNET_ATHENS = 10019;
// ZETA_MAINNET_MAINNET = 20018;
ZETA_TESTNET_ATHENS = 20019;



// MOVE 2xxxx
// MOVE 3xxxx
//Aptos
APTOS_MAINNET_MAINNET = 20000;
APTOS_TESTNET_TESTNET = 20001;
APTOS_MAINNET_MAINNET = 30000;
APTOS_TESTNET_TESTNET = 30001;
// Sui
SUI_MAINNET_MAINNET = 20002;
SUI_TESTNET_TESTNET = 20003;
SUI_MAINNET_MAINNET = 30002;
SUI_TESTNET_TESTNET = 30003;

// SOLANA 3xxxx
SOLANA_MAINNET_MAINNET = 30000;
SOLANA_TESTNET_TESTNET = 30001;
// SOLANA 4xxxx
SOLANA_MAINNET_MAINNET = 40000;
SOLANA_TESTNET_TESTNET = 40001;
}


10 changes: 10 additions & 0 deletions proto/mycel/registry/role.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
syntax = "proto3";
package mycel.registry;

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

enum DomainRole {
NO_ROLE = 0;
OWNER = 1;
EDITOR = 2;
}
8 changes: 2 additions & 6 deletions proto/mycel/registry/second_level_domain.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package mycel.registry;

import "mycel/registry/dns_record.proto";
import "mycel/registry/network_name.proto";
import "mycel/registry/role.proto";

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

Expand All @@ -17,11 +18,6 @@ message WalletRecord {
string value = 2;
}

message SubdomainRole {
string owner = 1;
string recordEditor = 2;
}

message SecondLevelDomain {
string name = 1;
string parent = 2;
Expand All @@ -30,5 +26,5 @@ message SecondLevelDomain {
map<string, DnsRecord> dnsRecords = 5;
map<string, WalletRecord> walletRecords = 6;
map<string, string> metadata = 7;
map<string, SubdomainRole> accessControl = 8;
map<string, DomainRole> accessControl = 8;
}
7 changes: 2 additions & 5 deletions proto/mycel/registry/top_level_domain.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@ syntax = "proto3";
package mycel.registry;

import "mycel/registry/subdomain_config.proto";
import "mycel/registry/role.proto";

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

message TopLevelDomainRole {
string owner = 1;
}

message TopLevelDomain {
string name = 1;
int64 expirationDate = 2;
map<string, string> metadata = 3;
SubdomainConfig subdomainConfig = 4;
uint64 subdomainCount = 5;
map<string, TopLevelDomainRole> accessControl = 6;
map<string, DomainRole> accessControl = 6;
}
2 changes: 1 addition & 1 deletion x/registry/client/cli/query_second_level_domain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func networkWithSecondLevelDomainObjects(t *testing.T, n int) (*network.Network,
DnsRecords: make(map[string]*types.DnsRecord),
WalletRecords: make(map[string]*types.WalletRecord),
Metadata: make(map[string]string),
AccessControl: make(map[string]*types.SubdomainRole),
AccessControl: make(map[string]types.DomainRole),
}
nullify.Fill(&secondLevelDomain)
state.SecondLevelDomains = append(state.SecondLevelDomains, secondLevelDomain)
Expand Down
Loading

0 comments on commit 5c77c46

Please sign in to comment.