Skip to content

Commit

Permalink
Update UniqueNetwork definitions (polkadot-js#7744)
Browse files Browse the repository at this point in the history
* Update UniqueNetwork definitions

* pump @unique-nft/quartz-mainnet-types to 0.5.2
  • Loading branch information
ashkuc authored Jun 17, 2022
1 parent 151c4cd commit 336e51f
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 129 deletions.
4 changes: 3 additions & 1 deletion packages/apps-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
"@snowfork/snowbridge-types": "0.2.7",
"@sora-substrate/type-definitions": "1.9.8",
"@subsocial/definitions": "^0.6.10",
"@unique-nft/types": "0.6.0-4",
"@unique-nft/opal-testnet-types": "0.5.2",
"@unique-nft/quartz-mainnet-types": "0.5.2",
"@unique-nft/unique-mainnet-types": "0.6.1",
"@zeitgeistpm/type-defs": "0.5.0",
"@zeroio/type-definitions": "0.0.14",
"lodash": "^4.17.21",
Expand Down
2 changes: 1 addition & 1 deletion packages/apps-config/src/api/spec/opal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import type { OverrideBundleDefinition } from '@polkadot/types/types';

import { unique } from '@unique-nft/types/definitions';
import { unique } from '@unique-nft/opal-testnet-types/definitions';

export default {
rpc: { unique: unique.rpc }
Expand Down
2 changes: 1 addition & 1 deletion packages/apps-config/src/api/spec/quartz.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import type { OverrideBundleDefinition } from '@polkadot/types/types';

import { unique } from '@unique-nft/types/definitions';
import { unique } from '@unique-nft/quartz-mainnet-types/definitions';

export default {
rpc: { unique: unique.rpc }
Expand Down
123 changes: 4 additions & 119 deletions packages/apps-config/src/api/spec/unique.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,123 +3,8 @@

import type { OverrideBundleDefinition } from '@polkadot/types/types';

// structs need to be in order
/* eslint-disable sort-keys */
import { unique } from '@unique-nft/unique-mainnet-types/definitions';

const definitions: OverrideBundleDefinition = {
types: [
{
// on all versions
minmax: [0, undefined],
types: {
AccessMode: {
_enum: ['Normal', 'WhiteList']
},
DecimalPoints: 'u8',
CollectionMode: {
_enum: {
Invalid: null,
NFT: null,
Fungible: 'DecimalPoints',
ReFungible: null
}
},
Ownership: {
Owner: 'AccountId',
Fraction: 'u128'
},
FungibleItemType: {
Value: 'u128'
},
NftItemType: {
Owner: 'AccountId',
ConstData: 'Vec<u8>',
VariableData: 'Vec<u8>'
},
ReFungibleItemType: {
Owner: 'Vec<Ownership<AccountId>>',
ConstData: 'Vec<u8>',
VariableData: 'Vec<u8>'
},
SponsorshipState: {
_enum: {
Disabled: null,
Unconfirmed: 'AccountId',
Confirmed: 'AccountId'
}
},
Collection: {
Owner: 'AccountId',
Mode: 'CollectionMode',
Access: 'AccessMode',
DecimalPoints: 'DecimalPoints',
Name: 'Vec<u16>',
Description: 'Vec<u16>',
TokenPrefix: 'Vec<u8>',
MintMode: 'bool',
OffchainSchema: 'Vec<u8>',
SchemaVersion: 'SchemaVersion',
Sponsorship: 'SponsorshipState',
Limits: 'CollectionLimits',
VariableOnChainSchema: 'Vec<u8>',
ConstOnChainSchema: 'Vec<u8>'
},
RawData: 'Vec<u8>',
Address: 'AccountId',
LookupSource: 'AccountId',
Weight: 'u64',
CreateNftData: {
const_data: 'Vec<u8>',
variable_data: 'Vec<u8>'
},
CreateFungibleData: {
value: 'u128'
},
CreateReFungibleData: {
const_data: 'Vec<u8>',
variable_data: 'Vec<u8>',
pieces: 'u128'
},
CreateItemData: {
_enum: {
NFT: 'CreateNftData',
Fungible: 'CreateFungibleData',
ReFungible: 'CreateReFungibleData'
}
},
SchemaVersion: {
_enum: [
'ImageURL',
'Unique'
]
},
CollectionId: 'u32',
TokenId: 'u32',
ChainLimits: {
CollectionNumbersLimit: 'u32',
AccountTokenOwnershipLimit: 'u32',
CollectionAdminsLimit: 'u64',
CustomDataLimit: 'u32',
NftSponsorTimeout: 'u32',
FungibleSponsorTimeout: 'u32',
RefungibleSponsorTimeout: 'u32',
OffchainSchemaLimit: 'u32',
VariableOnChainSchemaLimit: 'u32',
ConstOnChainSchemaLimit: 'u32'
},
CollectionLimits: {
AccountTokenOwnershipLimit: 'u32',
SponsoredDataSize: 'u32',
SponsoredDataRateLimit: 'Option<BlockNumber>',
TokenLimit: 'u32',
SponsorTimeout: 'u32',
OwnerCanTransfer: 'bool',
OwnerCanDestroy: 'bool'
},
AccountInfo: 'AccountInfoWithDualRefCount'
}
}
]
};

export default definitions;
export default {
rpc: { unique: unique.rpc }
} as OverrideBundleDefinition;
36 changes: 29 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3033,7 +3033,9 @@ __metadata:
"@snowfork/snowbridge-types": 0.2.7
"@sora-substrate/type-definitions": 1.9.8
"@subsocial/definitions": ^0.6.10
"@unique-nft/types": 0.6.0-4
"@unique-nft/opal-testnet-types": 0.5.2
"@unique-nft/quartz-mainnet-types": 0.5.2
"@unique-nft/unique-mainnet-types": 0.6.1
"@zeitgeistpm/type-defs": 0.5.0
"@zeroio/type-definitions": 0.0.14
lodash: ^4.17.21
Expand Down Expand Up @@ -5142,13 +5144,33 @@ __metadata:
languageName: node
linkType: hard

"@unique-nft/types@npm:0.6.0-4":
version: 0.6.0-4
resolution: "@unique-nft/types@npm:0.6.0-4"
"@unique-nft/opal-testnet-types@npm:0.5.2":
version: 0.5.2
resolution: "@unique-nft/opal-testnet-types@npm:0.5.2"
peerDependencies:
"@polkadot/api": ^8.6.2
"@polkadot/types": ^8.6.2
checksum: 03a64e3a7c8f30a50681fed2224b5aef45b130096b7cfab3b635b169e390b0c7e64fe1c398d4d905489c28dfc1c9d1d167d753691a712b887c9bc1ff2cfd2ca6
languageName: node
linkType: hard

"@unique-nft/quartz-mainnet-types@npm:0.5.2":
version: 0.5.2
resolution: "@unique-nft/quartz-mainnet-types@npm:0.5.2"
peerDependencies:
"@polkadot/api": ^8.6.2
"@polkadot/types": ^8.6.2
checksum: cc6d44a639115308c6ec5ed22c7307654ac45620ec8df426b3be9afd1b6882b71768e93ceed0c5d56ad5ca3f691c40805b09aa7b3524f030774592f959749ae0
languageName: node
linkType: hard

"@unique-nft/unique-mainnet-types@npm:0.6.1":
version: 0.6.1
resolution: "@unique-nft/unique-mainnet-types@npm:0.6.1"
peerDependencies:
"@polkadot/api": ^8.6.1
"@polkadot/types": ^8.6.1
checksum: 2d370f0e9373300fc2327f08f62a3aea5d9276abb639aa9934cb903cfd1cbccfc89cd67bf3358e0da9e1cd25952f537523b054dc005a2ba4ef58f3f342b80fd7
"@polkadot/api": ^8.6.2
"@polkadot/types": ^8.6.2
checksum: d1f1399eb8d89705944814db85b7b85b84a7c561515a3024afc28984bdd340b0946c7b4f183fbfb79f11a34aed49edede8175760a0c3963a0ef12343037c54b2
languageName: node
linkType: hard

Expand Down

0 comments on commit 336e51f

Please sign in to comment.