Skip to content

Commit

Permalink
Add NFTMart mainnet config (polkadot-js#6200)
Browse files Browse the repository at this point in the history
* Add NFTMart mainnet config

* Linter fixes

Co-authored-by: Github Actions <[email protected]>
  • Loading branch information
btwiuse and actions-user authored Sep 28, 2021
1 parent adb903f commit 0bd7479
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 24 deletions.
126 changes: 102 additions & 24 deletions packages/apps-config/src/api/spec/nftmart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,50 +17,128 @@ const definitions: OverrideBundleDefinition = {
NFTMetadata: 'Vec<u8>',
BlockNumber: 'u32',
BlockNumberOf: 'BlockNumber',

OrderData: {
currencyId: 'Compact<CurrencyIdOf>',
price: 'Compact<Balance>',
deposit: 'Compact<Balance>',
deadline: 'Compact<BlockNumberOf>',
categoryId: 'Compact<CategoryIdOf>'
},

CategoryId: 'u32',
CategoryIdOf: 'CategoryId',
CategoryData: {
metadata: 'NFTMetadata',
nftCount: 'Compact<Balance>'
},

BlockNumberFor: 'BlockNumber',
GlobalId: 'u64',
CurrencyId: 'u32',
CurrencyIdOf: 'CurrencyId',
Amount: 'i128',
AmountOf: 'Amount',

CategoryId: 'GlobalId',
CategoryIdOf: 'CategoryId',
ClassId: 'u32',
ClassIdOf: 'ClassId',
TokenId: 'u64',
TokenIdOf: 'TokenId',

OrmlAccountData: {
free: 'Balance',
reserved: 'Balance',
frozen: 'Balance'
},

OrmlBalanceLock: {
amount: 'Balance',
id: 'LockIdentifier'
},

ClassInfoOf: {
metadata: 'NFTMetadata',
totalIssuance: "TokenId",
totalIssuance: "Compact<TokenId>",
owner: 'AccountId',
data: 'ClassData'
},

ClassData: {
deposit: 'Compact<Balance>',
properties: 'Properties',
name: 'Vec<u8>',
description: 'Vec<u8>',
createBlock: 'Compact<BlockNumberOf>'
createBlock: 'Compact<BlockNumberOf>',
royaltyRate: 'Compact<PerU16>',
categoryIds: 'Vec<CategoryId>'
},

TokenInfoOf: {
metadata: 'NFTMetadata',
data: 'TokenData',
quantity: 'Compact<TokenId>'
},

TokenId: 'u64',
TokenIdOf: 'TokenId',
TokenInfoOf: { metadata: 'NFTMetadata', owner: 'AccountId', data: 'TokenData' },
TokenData: {
deposit: 'Compact<Balance>',
createBlock: 'Compact<BlockNumberOf>'
}
createBlock: 'Compact<BlockNumberOf>',
royalty_rate: 'Compact<PerU16>',
creator: 'AccountId',
royaltyBeneficiary: 'AccountId'
},

AccountToken: {
quantity: 'Compact<TokenId>',
reserved: 'Compact<TokenId>'
},

CategoryData: {
metadata: 'NFTMetadata',
nftCount: 'Compact<Balance>'
},

OrderItem: {
classId: 'Compact<ClassId>',
tokenId: 'Compact<TokenId>',
quantity: 'Compact<TokenId>'
},

OrderOf: {
currencyId: 'Compact<CurrencyId>',
deposit: 'Compact<Balance>',
price: 'Compact<Balance>',
deadline: 'Compact<BlockNumberOf>',
items: 'Vec<OrderItem>',
commissionRate: 'Compact<PerU16>'
},

OfferOf: {
currencyId: 'Compact<CurrencyId>',
price: 'Compact<Balance>',
deadline: 'Compact<BlockNumberOf>',
items: 'Vec<OrderItem>',
commissionRate: 'Compact<PerU16>'
},

BritishAuctionOf: {
currencyId: 'Compact<CurrencyId>',
hammerPrice: 'Compact<Balance>',
minRaise: 'Compact<PerU16>',
deposit: 'Compact<Balance>',
initPrice: 'Compact<Balance>',
deadline: 'Compact<BlockNumberOf>',
allowDelay: 'bool',
items: 'Vec<OrderItem>',
commissionRate: 'Compact<PerU16>'
},

BritishAuctionBidOf: {
lastBidPrice: 'Compact<Balance>',
lastBidAccount: 'Option<AccountId>',
lastBidBlock: 'Compact<BlockNumberOf>',
commissionAgent: 'Option<AccountId>',
commissionData: 'Option<Vec<u8>>'
},

DutchAuctionOf: {
currencyId: 'Compact<CurrencyId>',
deposit: 'Compact<Balance>',
minPrice: 'Compact<Balance>',
maxPrice: 'Compact<Balance>',
deadline: 'Compact<BlockNumberOf>',
createdBlock: 'Compact<BlockNumberOf>',
items: 'Vec<OrderItem>',
allowBritishAuction: 'bool',
minRaise: 'Compact<PerU16>',
commissionRate: 'Compact<PerU16>'
},

DutchAuctionBidOf: 'BritishAuctionBidOf'
}
}
]
Expand Down
7 changes: 7 additions & 0 deletions packages/apps-config/src/endpoints/production.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ export function createProduction (t: TFunction, firstOnly: boolean, withSort: bo
Neatcoin: 'wss://rpc.neatcoin.org/ws'
}
},
{
info: 'nftmart',
text: t('rpc.prod.nftmart', 'NFTMart', { ns: 'apps-config' }),
providers: {
NFTMart: 'wss://mainnet.nftmart.io/rpc/ws'
}
},
{
info: 'nodle',
text: t('rpc.prod.nodle-main', 'Nodle', { ns: 'apps-config' }),
Expand Down
2 changes: 2 additions & 0 deletions packages/apps-config/src/ui/logos/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ export const chainLogos = Object.entries({
Moonrock: nodeMoonrock,
Moonshadow: moonshadow,
'mybank.network PC1': mybank,
NFTMart: nodeNFTMart,
'NFTMart Staging': nodeNFTMart,
'NFTMart Testnet': nodeNFTMart,
'OAK Testnet': oakTestnet,
Expand Down Expand Up @@ -343,6 +344,7 @@ export const nodeLogos = Object.entries({
'Manta Parachain Collator': nodeManta,
Moonrock: nodeMoonrock,
'mybank.network': mybank,
NFTMart: nodeNFTMart,
'NFTMart Staging': nodeNFTMart,
'NFTMart Testnet': nodeNFTMart,
'node-template': nodeSubstrate,
Expand Down
1 change: 1 addition & 0 deletions packages/apps/public/locales/en/apps-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"rpc.prod.hydra": "HydraDX",
"rpc.prod.kulupu": "Kulupu",
"rpc.prod.neatcoin": "Neatcoin",
"rpc.prod.nftmart": "NFTMart",
"rpc.prod.nodle-main": "Nodle",
"rpc.prod.plasm": "Plasm",
"rpc.prod.polkadex": "Polkadex Mainnet",
Expand Down

0 comments on commit 0bd7479

Please sign in to comment.