git.delta.rocks / unique-network / refs/commits / c5e73ec4659b

difftreelog

source

doc/milestone_1.md3.7 KiBsourcehistory
1## Milestone 123**User Paid Fees and Sponsored. Finish/Debug allow listing and spam/DOS protection**45Implementation of two models 6If collection sponsor is set and confirmed for collection instance that means Sponsored Economic Model has chosen. Otherwise default economic model User Paid Fees is set.7For Sponsored Economic Model exists timeouts for token transactions. For every NFT type timeouts defined separately. Timeouts and allow list limits together prevented spam and malicious actions.89Set sponsor10`nft`.`set_collection_sponsor`11Confirm sponsor12`nft`.`confirm_sponsorship`1314A allow list mode presented by collection property `access` and can be enabled with `set_public_access_mode`. Rules provide spam/DOS protection15While collection in the allow list mode rules below are active:16Owner can add address to allow list17Admin can add address to allow list18Non-privileged user cannot add address to allow list19Owner can remove address from allow list20Admin can remove address from allow list21Non-privileged user cannot remove address from allow list22If Public Access mode is set to AllowList, tokens can’t be transferred from a non-allowlisted address with transfer or transferFrom23If Public Access mode is set to AllowList, tokens can’t be transferred to a non-allowlisted address with transfer or transferFrom24If Public Access mode is set to AllowList, tokens can’t be destroyed by a non-allowlisted address (even if it owned them before enabling AllowList mode)25If Public Access mode is set to AllowList, token transfers can’t be Approved by a non-allowlisted address (see Approve method).26If Public Access mode is set to AllowList, tokens can be transferred to a allowlisted address with transfer or transferFrom27If Public Access mode is set to AllowList, tokens can be transferred from a allowlisted address with transfer or transferFrom 28If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens can be created by owner.29If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens can be created by admin.30If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens cannot be created by non-privileged and allow listed address.31If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens cannot be created by non-privileged and non-allow listed address.32If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by owner.33If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by admin.34If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens cannot be created by non-privileged and non-allow listed address.35If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by non-privileged and allow listed address.3637**Add missing custom types (CollectionMode, FungibleItemType, ReFungibleItemType)**3839Follow types defined40```41pub struct NftItemType<AccountId> {42    pub collection: u64,43    pub owner: AccountId,44    pub data: Vec<u8>,45}46pub struct FungibleItemType<AccountId> {47    pub collection: u64,48    pub owner: AccountId,49    pub value: u128,50}51pub struct ReFungibleItemType<AccountId> {52    pub collection: u64,53    pub owner: Vec<Ownership<AccountId>>,54    pub data: Vec<u8>,55}56```5758**Add substrate bounds for number of collections, owned tokens, and number of collection admins.**5960Bounds defined in chain specification and can be set with 'sudo' privileges `nft`.`set_chain_limits`.6162**Add/document extra genesis**6364Extra genesis defined in `node/src/chain_spec.rs` file. Configuration consist from 5 items:65Collection list,  Nft items list, Fungible items list, Refungible items list, Chain limits