Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mesh 1902/create nft collection mint nft #1340

Merged

Conversation

HenriqueNogara
Copy link
Contributor

@HenriqueNogara HenriqueNogara commented Oct 24, 2022

Initial version of the NFT pallet. This PR should not be directly merged into the develop branch.

changelog

new features

  • Add NFT pallet;
  • Add create_nft extrinsic;
  • Add mint_nft extrinsic;
  • Add burn_nft extrinsic;

@codecov
Copy link

codecov bot commented Oct 24, 2022

Codecov Report

Merging #1340 (9991e67) into MESH-1890/add-nft-pallet (396fe79) will increase coverage by 0.12%.
The diff coverage is 55.86%.

@@                     Coverage Diff                      @@
##           MESH-1890/add-nft-pallet    #1340      +/-   ##
============================================================
+ Coverage                     43.35%   43.48%   +0.12%     
============================================================
  Files                           140      144       +4     
  Lines                         30111    30428     +317     
============================================================
+ Hits                          13056    13233     +177     
- Misses                        17055    17195     +140     
Impacted Files Coverage Δ
pallets/common/src/protocol_fee.rs 33.33% <ø> (ø)
pallets/common/src/traits/asset.rs 0.00% <ø> (ø)
pallets/common/src/traits/mod.rs 0.00% <ø> (ø)
pallets/common/src/traits/nft.rs 0.00% <0.00%> (ø)
pallets/runtime/common/src/runtime.rs 1.84% <ø> (ø)
pallets/runtime/develop/src/runtime.rs 2.58% <0.00%> (-0.05%) ⬇️
pallets/weights/src/pallet_nft.rs 0.00% <0.00%> (ø)
primitives/src/asset.rs 32.43% <ø> (ø)
primitives/src/lib.rs 79.12% <ø> (ø)
pallets/portfolio/src/lib.rs 35.07% <50.00%> (+0.25%) ⬆️
... and 6 more

@HenriqueNogara HenriqueNogara changed the title [WIP] Mesh 1902/create nft collection mint nft Mesh 1902/create nft collection mint nft Nov 24, 2022
Comment on lines +2578 to +2580
/// Returns `None` if there's no asset associated to the given ticker,
/// returns Some(true) if the asset exists and is of type `AssetType::NFT`, and returns Some(false) otherwise.
pub fn nft_asset(ticker: &Ticker) -> Option<bool> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we prevent users from minting tokens (Asset.issue) if the type is AssetType::NFT?

Comment on lines +40 to +41
NFTCreateCollection,
NFTMint,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamdossa Do we want protocol fees for NFT? Users still have to pay the two normal asset fees.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose that ideally we'd be able to differentiate - ideally have a separate protocol fee for minting a fungible vs. a non-fungible token.

However, if the logic is currently that NFTs have the usual register / create protocol fees that users pay for fungible assets then this is fine. We can separate out the fees as a new future feature if there is a demand for this.

pallets/nft/src/benchmarking.rs Outdated Show resolved Hide resolved
pallets/common/src/traits/nft.rs Outdated Show resolved Hide resolved
pallets/nft/src/lib.rs Outdated Show resolved Hide resolved
pallets/nft/src/lib.rs Outdated Show resolved Hide resolved
primitives/src/nft.rs Outdated Show resolved Hide resolved
pallets/nft/src/lib.rs Outdated Show resolved Hide resolved
pallets/nft/src/lib.rs Show resolved Hide resolved
pallets/nft/src/lib.rs Outdated Show resolved Hide resolved
pallets/nft/src/lib.rs Outdated Show resolved Hide resolved
pallets/nft/src/lib.rs Outdated Show resolved Hide resolved
@adamdossa adamdossa merged commit 886e03b into MESH-1890/add-nft-pallet Jan 10, 2023
@adamdossa adamdossa deleted the MESH-1902/create-nft-collection-mint-nft branch January 10, 2023 14:52
adamdossa added a commit that referenced this pull request Feb 28, 2023
* Improve execute_instruction readability; Rename variables

* Mesh 1902/create nft collection mint nft (#1340)

* Add nft pallet - empty create_nft_collection extrinsic

* Remove GenesisConfig from nft pallet; Replace Nft runtime

* Add storage definition; Add initial version of create_nft_collection; Add NFT primitives; Add Asset associated type to NFT config

* Fix typo

* Add initial version of mint_nft extrinsic

* Add minted nft to portfolio; Return error for duplicate keys; Improve storage structures

* Add unit tests

* Add benchmark; Fix unit tests

* Remove storage migration for nft pallet

* Remove useless imports

* Improve comments; Add parameter to nft benchmarks

* Add check for asset type; Add check for duplicate collections for the same ticker

* Undo removal of register_ticker

* Add burn NFT extrinsic; Change order of create_asset in create_nft_collection; Add unit tests for burn nft; Fix tests for create_nft_collection

* Add benchmark for burn_nft; Fix benchmark for create_nft_collection

* Change tests to use ONE_UNIT const

* Use ensure macro; Remove clones; Remove unwrap_or_default when using balance; Add did in events

* Get caller did from portfolio

* Use portfolio kind to check custody and perms

* Remove duplicated permissions check

* Mesh 1915/allow nft transfers (#1369)

* Add nft pallet - empty create_nft_collection extrinsic

* Remove GenesisConfig from nft pallet; Replace Nft runtime

* Add storage definition; Add initial version of create_nft_collection; Add NFT primitives; Add Asset associated type to NFT config

* Fix typo

* Add initial version of mint_nft extrinsic

* Add minted nft to portfolio; Return error for duplicate keys; Improve storage structures

* Add unit tests

* Add benchmark; Fix unit tests

* Remove storage migration for nft pallet

* Remove useless imports

* Improve comments; Add parameter to nft benchmarks

* Add check for asset type; Add check for duplicate collections for the same ticker

* Undo removal of register_ticker

* Add burn NFT extrinsic; Change order of create_asset in create_nft_collection; Add unit tests for burn nft; Fix tests for create_nft_collection

* Add benchmark for burn_nft; Fix benchmark for create_nft_collection

* Change tests to use ONE_UNIT const

* Use ensure macro; Remove clones; Remove unwrap_or_default when using balance; Add did in events

* Get caller did from portfolio

* Use portfolio kind to check custody and perms

* Remove duplicated permissions check

* Add new types LegV2 and ReceiptV2

* Add from Leg to LegV2 impl and LegAsset helper function

* Add base_nft_tranfer

* Change base_add_instruction to allow LegV2; Change STO pallet to use LegV2

* Add lock_nft and unlock_nft functions; Change PortfolioNft to take ticker instead of NFTCollectionId

* Change inner functions to handle LegV2

* Change tests and benchmarks to handle LegV2

* Allow transfering multiple nfts at once

* Add parameter to allow sending deprecated event

* Add tests for nft tranfer

* Add extrinsics for LegV2 parameters; Add checks for non-fungible assets

* Impose transaction when calling base_nft_transfer; Insert deprecated Legs in old storage;

* Add test cases for LegV2 extrinsics

* Change error variant in assert

* Ad benchmarks for add_instruction_v2 and add_and_afirm_instructions_v2

* Add affirm_instruction_v2 and withdraw_affirmation_v2 extrinsics; Add nfts transferred check to filtered_legs

* Add error when calling receipt functions for non-fungible legs

* Add unit tests - receipts and duplicated nft on different legs

* Add reject_instruction_v2 extrinsic and benchmark

* Fix typo

* Fix benchmarks for add_and_affirm_instruction_v2

* Add portfolio_kind parameter to mint_nft extrinsic

* Change meaning of maxlegs to maxfungible assets

* Add weight functions to all v2 extrinsics; Fix benchmarks with new parameters

* Add check to portfolio validity before minting; Add check to NFT storage before deleting a portfolio; Add unit tests

* Add more informative variants to invalid nft transfer

* Change add_and_affirm_instruction_with_memo_v2 parameters

* Add benchmark helper function

* Fix transfer_nft_not_owned test to reflect description

* Add additional check for compliance return; Pause compliance for tests

* Mesh 1932/move nfts between portfolios (#1385)

* Add move_portfolio_nfts extrinsic

* Remove redundant match statement

* Add benchmark; Remove pointless error

* Add move_portfolio_funds_v2 extrinsic

* Add missing weight implementation

* Remove num_traits dependency; Add parameter to burn_nft weight function; Add V2 types to schema; Run script for generating benchmarks

* Undo changes to session weights; Add v2 types to schema types

* Add NonFungible types; Add `BalanceOf` to the NFT pallet; Add `asset_type` checks (#1399)

* Add NonFungibleType enum; Add asset_type check for extrinsics; Ensure asset_type update is valid; Ensure asset is not frozen check for NFT

* Add optional parameter for create_nft_collection; Add is_fungible and is_non_fungible functions

* Change BalanceOf name to NumberOfNFTs; Add NFTCount alias type

* Remove duplicated storage read

* Change parameter type to NonFungibleType; Add type to schema.json

* Fix doc

* Rename mint and burn to issue and redeem

* Update to 5.3.0

---------

Co-authored-by: Robert Gabriel Jakabosky <rjakabosky+neopallium@neoawareness.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
adamdossa added a commit that referenced this pull request Feb 28, 2023
* Improve execute_instruction readability; Rename variables

* Mesh 1902/create nft collection mint nft (#1340)

* Add nft pallet - empty create_nft_collection extrinsic

* Remove GenesisConfig from nft pallet; Replace Nft runtime

* Add storage definition; Add initial version of create_nft_collection; Add NFT primitives; Add Asset associated type to NFT config

* Fix typo

* Add initial version of mint_nft extrinsic

* Add minted nft to portfolio; Return error for duplicate keys; Improve storage structures

* Add unit tests

* Add benchmark; Fix unit tests

* Remove storage migration for nft pallet

* Remove useless imports

* Improve comments; Add parameter to nft benchmarks

* Add check for asset type; Add check for duplicate collections for the same ticker

* Undo removal of register_ticker

* Add burn NFT extrinsic; Change order of create_asset in create_nft_collection; Add unit tests for burn nft; Fix tests for create_nft_collection

* Add benchmark for burn_nft; Fix benchmark for create_nft_collection

* Change tests to use ONE_UNIT const

* Use ensure macro; Remove clones; Remove unwrap_or_default when using balance; Add did in events

* Get caller did from portfolio

* Use portfolio kind to check custody and perms

* Remove duplicated permissions check

* Mesh 1915/allow nft transfers (#1369)

* Add nft pallet - empty create_nft_collection extrinsic

* Remove GenesisConfig from nft pallet; Replace Nft runtime

* Add storage definition; Add initial version of create_nft_collection; Add NFT primitives; Add Asset associated type to NFT config

* Fix typo

* Add initial version of mint_nft extrinsic

* Add minted nft to portfolio; Return error for duplicate keys; Improve storage structures

* Add unit tests

* Add benchmark; Fix unit tests

* Remove storage migration for nft pallet

* Remove useless imports

* Improve comments; Add parameter to nft benchmarks

* Add check for asset type; Add check for duplicate collections for the same ticker

* Undo removal of register_ticker

* Add burn NFT extrinsic; Change order of create_asset in create_nft_collection; Add unit tests for burn nft; Fix tests for create_nft_collection

* Add benchmark for burn_nft; Fix benchmark for create_nft_collection

* Change tests to use ONE_UNIT const

* Use ensure macro; Remove clones; Remove unwrap_or_default when using balance; Add did in events

* Get caller did from portfolio

* Use portfolio kind to check custody and perms

* Remove duplicated permissions check

* Add new types LegV2 and ReceiptV2

* Add from Leg to LegV2 impl and LegAsset helper function

* Add base_nft_tranfer

* Change base_add_instruction to allow LegV2; Change STO pallet to use LegV2

* Add lock_nft and unlock_nft functions; Change PortfolioNft to take ticker instead of NFTCollectionId

* Change inner functions to handle LegV2

* Change tests and benchmarks to handle LegV2

* Allow transfering multiple nfts at once

* Add parameter to allow sending deprecated event

* Add tests for nft tranfer

* Add extrinsics for LegV2 parameters; Add checks for non-fungible assets

* Impose transaction when calling base_nft_transfer; Insert deprecated Legs in old storage;

* Add test cases for LegV2 extrinsics

* Change error variant in assert

* Ad benchmarks for add_instruction_v2 and add_and_afirm_instructions_v2

* Add affirm_instruction_v2 and withdraw_affirmation_v2 extrinsics; Add nfts transferred check to filtered_legs

* Add error when calling receipt functions for non-fungible legs

* Add unit tests - receipts and duplicated nft on different legs

* Add reject_instruction_v2 extrinsic and benchmark

* Fix typo

* Fix benchmarks for add_and_affirm_instruction_v2

* Add portfolio_kind parameter to mint_nft extrinsic

* Change meaning of maxlegs to maxfungible assets

* Add weight functions to all v2 extrinsics; Fix benchmarks with new parameters

* Add check to portfolio validity before minting; Add check to NFT storage before deleting a portfolio; Add unit tests

* Add more informative variants to invalid nft transfer

* Change add_and_affirm_instruction_with_memo_v2 parameters

* Add benchmark helper function

* Fix transfer_nft_not_owned test to reflect description

* Add additional check for compliance return; Pause compliance for tests

* Mesh 1932/move nfts between portfolios (#1385)

* Add move_portfolio_nfts extrinsic

* Remove redundant match statement

* Add benchmark; Remove pointless error

* Add move_portfolio_funds_v2 extrinsic

* Add missing weight implementation

* Remove num_traits dependency; Add parameter to burn_nft weight function; Add V2 types to schema; Run script for generating benchmarks

* Undo changes to session weights; Add v2 types to schema types

* Add NonFungible types; Add `BalanceOf` to the NFT pallet; Add `asset_type` checks (#1399)

* Add NonFungibleType enum; Add asset_type check for extrinsics; Ensure asset_type update is valid; Ensure asset is not frozen check for NFT

* Add optional parameter for create_nft_collection; Add is_fungible and is_non_fungible functions

* Change BalanceOf name to NumberOfNFTs; Add NFTCount alias type

* Remove duplicated storage read

* Change parameter type to NonFungibleType; Add type to schema.json

* Fix doc

* Rename mint and burn to issue and redeem

* Update to 5.3.0

---------

Co-authored-by: Robert Gabriel Jakabosky <rjakabosky+neopallium@neoawareness.com>
Co-authored-by: Adam Dossa <adam.dossa@gmail.com>
Neopallium added a commit that referenced this pull request Mar 1, 2023
* Improve execute_instruction readability; Rename variables

* Mesh 1902/create nft collection mint nft (#1340)

* Add nft pallet - empty create_nft_collection extrinsic

* Remove GenesisConfig from nft pallet; Replace Nft runtime

* Add storage definition; Add initial version of create_nft_collection; Add NFT primitives; Add Asset associated type to NFT config

* Fix typo

* Add initial version of mint_nft extrinsic

* Add minted nft to portfolio; Return error for duplicate keys; Improve storage structures

* Add unit tests

* Add benchmark; Fix unit tests

* Remove storage migration for nft pallet

* Remove useless imports

* Improve comments; Add parameter to nft benchmarks

* Add check for asset type; Add check for duplicate collections for the same ticker

* Undo removal of register_ticker

* Add burn NFT extrinsic; Change order of create_asset in create_nft_collection; Add unit tests for burn nft; Fix tests for create_nft_collection

* Add benchmark for burn_nft; Fix benchmark for create_nft_collection

* Change tests to use ONE_UNIT const

* Use ensure macro; Remove clones; Remove unwrap_or_default when using balance; Add did in events

* Get caller did from portfolio

* Use portfolio kind to check custody and perms

* Remove duplicated permissions check

* Mesh 1915/allow nft transfers (#1369)

* Add nft pallet - empty create_nft_collection extrinsic

* Remove GenesisConfig from nft pallet; Replace Nft runtime

* Add storage definition; Add initial version of create_nft_collection; Add NFT primitives; Add Asset associated type to NFT config

* Fix typo

* Add initial version of mint_nft extrinsic

* Add minted nft to portfolio; Return error for duplicate keys; Improve storage structures

* Add unit tests

* Add benchmark; Fix unit tests

* Remove storage migration for nft pallet

* Remove useless imports

* Improve comments; Add parameter to nft benchmarks

* Add check for asset type; Add check for duplicate collections for the same ticker

* Undo removal of register_ticker

* Add burn NFT extrinsic; Change order of create_asset in create_nft_collection; Add unit tests for burn nft; Fix tests for create_nft_collection

* Add benchmark for burn_nft; Fix benchmark for create_nft_collection

* Change tests to use ONE_UNIT const

* Use ensure macro; Remove clones; Remove unwrap_or_default when using balance; Add did in events

* Get caller did from portfolio

* Use portfolio kind to check custody and perms

* Remove duplicated permissions check

* Add new types LegV2 and ReceiptV2

* Add from Leg to LegV2 impl and LegAsset helper function

* Add base_nft_tranfer

* Change base_add_instruction to allow LegV2; Change STO pallet to use LegV2

* Add lock_nft and unlock_nft functions; Change PortfolioNft to take ticker instead of NFTCollectionId

* Change inner functions to handle LegV2

* Change tests and benchmarks to handle LegV2

* Allow transfering multiple nfts at once

* Add parameter to allow sending deprecated event

* Add tests for nft tranfer

* Add extrinsics for LegV2 parameters; Add checks for non-fungible assets

* Impose transaction when calling base_nft_transfer; Insert deprecated Legs in old storage;

* Add test cases for LegV2 extrinsics

* Change error variant in assert

* Ad benchmarks for add_instruction_v2 and add_and_afirm_instructions_v2

* Add affirm_instruction_v2 and withdraw_affirmation_v2 extrinsics; Add nfts transferred check to filtered_legs

* Add error when calling receipt functions for non-fungible legs

* Add unit tests - receipts and duplicated nft on different legs

* Add reject_instruction_v2 extrinsic and benchmark

* Fix typo

* Fix benchmarks for add_and_affirm_instruction_v2

* Add portfolio_kind parameter to mint_nft extrinsic

* Change meaning of maxlegs to maxfungible assets

* Add weight functions to all v2 extrinsics; Fix benchmarks with new parameters

* Add check to portfolio validity before minting; Add check to NFT storage before deleting a portfolio; Add unit tests

* Add more informative variants to invalid nft transfer

* Change add_and_affirm_instruction_with_memo_v2 parameters

* Add benchmark helper function

* Fix transfer_nft_not_owned test to reflect description

* Add additional check for compliance return; Pause compliance for tests

* Mesh 1932/move nfts between portfolios (#1385)

* Add move_portfolio_nfts extrinsic

* Remove redundant match statement

* Add benchmark; Remove pointless error

* Add move_portfolio_funds_v2 extrinsic

* Add missing weight implementation

* Remove num_traits dependency; Add parameter to burn_nft weight function; Add V2 types to schema; Run script for generating benchmarks

* Undo changes to session weights; Add v2 types to schema types

* Add remove_local_metadata_key and remove_local_metadata_value extrinsics

* Add unit tests for the new extrinsics

* Add benchmarks for the new extrinsics

* Add weights for the new benchmarks

* Add two events for the new extrinsics

* Add NonFungible types; Add `BalanceOf` to the NFT pallet; Add `asset_type` checks (#1399)

* Add NonFungibleType enum; Add asset_type check for extrinsics; Ensure asset_type update is valid; Ensure asset is not frozen check for NFT

* Add optional parameter for create_nft_collection; Add is_fungible and is_non_fungible functions

* Change BalanceOf name to NumberOfNFTs; Add NFTCount alias type

* Remove duplicated storage read

* Change parameter type to NonFungibleType; Add type to schema.json

* Fix doc

* Change parameter type; Use is_locked instead of if let; Add caller did to events; Allow removing the value of a global key

* Fix weight function name

* Cargo lock

* Add #[test] to settle_on_block

* Change try_get to contains_key

---------

Co-authored-by: Robert Gabriel Jakabosky <rjakabosky+neopallium@neoawareness.com>
adamdossa pushed a commit that referenced this pull request Apr 13, 2023
* Improve execute_instruction readability; Rename variables

* Mesh 1902/create nft collection mint nft (#1340)

* Add nft pallet - empty create_nft_collection extrinsic

* Remove GenesisConfig from nft pallet; Replace Nft runtime

* Add storage definition; Add initial version of create_nft_collection; Add NFT primitives; Add Asset associated type to NFT config

* Fix typo

* Add initial version of mint_nft extrinsic

* Add minted nft to portfolio; Return error for duplicate keys; Improve storage structures

* Add unit tests

* Add benchmark; Fix unit tests

* Remove storage migration for nft pallet

* Remove useless imports

* Improve comments; Add parameter to nft benchmarks

* Add check for asset type; Add check for duplicate collections for the same ticker

* Undo removal of register_ticker

* Add burn NFT extrinsic; Change order of create_asset in create_nft_collection; Add unit tests for burn nft; Fix tests for create_nft_collection

* Add benchmark for burn_nft; Fix benchmark for create_nft_collection

* Change tests to use ONE_UNIT const

* Use ensure macro; Remove clones; Remove unwrap_or_default when using balance; Add did in events

* Get caller did from portfolio

* Use portfolio kind to check custody and perms

* Remove duplicated permissions check

* Mesh 1915/allow nft transfers (#1369)

* Add nft pallet - empty create_nft_collection extrinsic

* Remove GenesisConfig from nft pallet; Replace Nft runtime

* Add storage definition; Add initial version of create_nft_collection; Add NFT primitives; Add Asset associated type to NFT config

* Fix typo

* Add initial version of mint_nft extrinsic

* Add minted nft to portfolio; Return error for duplicate keys; Improve storage structures

* Add unit tests

* Add benchmark; Fix unit tests

* Remove storage migration for nft pallet

* Remove useless imports

* Improve comments; Add parameter to nft benchmarks

* Add check for asset type; Add check for duplicate collections for the same ticker

* Undo removal of register_ticker

* Add burn NFT extrinsic; Change order of create_asset in create_nft_collection; Add unit tests for burn nft; Fix tests for create_nft_collection

* Add benchmark for burn_nft; Fix benchmark for create_nft_collection

* Change tests to use ONE_UNIT const

* Use ensure macro; Remove clones; Remove unwrap_or_default when using balance; Add did in events

* Get caller did from portfolio

* Use portfolio kind to check custody and perms

* Remove duplicated permissions check

* Add new types LegV2 and ReceiptV2

* Add from Leg to LegV2 impl and LegAsset helper function

* Add base_nft_tranfer

* Change base_add_instruction to allow LegV2; Change STO pallet to use LegV2

* Add lock_nft and unlock_nft functions; Change PortfolioNft to take ticker instead of NFTCollectionId

* Change inner functions to handle LegV2

* Change tests and benchmarks to handle LegV2

* Allow transfering multiple nfts at once

* Add parameter to allow sending deprecated event

* Add tests for nft tranfer

* Add extrinsics for LegV2 parameters; Add checks for non-fungible assets

* Impose transaction when calling base_nft_transfer; Insert deprecated Legs in old storage;

* Add test cases for LegV2 extrinsics

* Change error variant in assert

* Ad benchmarks for add_instruction_v2 and add_and_afirm_instructions_v2

* Add affirm_instruction_v2 and withdraw_affirmation_v2 extrinsics; Add nfts transferred check to filtered_legs

* Add error when calling receipt functions for non-fungible legs

* Add unit tests - receipts and duplicated nft on different legs

* Add reject_instruction_v2 extrinsic and benchmark

* Fix typo

* Fix benchmarks for add_and_affirm_instruction_v2

* Add portfolio_kind parameter to mint_nft extrinsic

* Change meaning of maxlegs to maxfungible assets

* Add weight functions to all v2 extrinsics; Fix benchmarks with new parameters

* Add check to portfolio validity before minting; Add check to NFT storage before deleting a portfolio; Add unit tests

* Add more informative variants to invalid nft transfer

* Change add_and_affirm_instruction_with_memo_v2 parameters

* Add benchmark helper function

* Fix transfer_nft_not_owned test to reflect description

* Add additional check for compliance return; Pause compliance for tests

* Mesh 1932/move nfts between portfolios (#1385)

* Add move_portfolio_nfts extrinsic

* Remove redundant match statement

* Add benchmark; Remove pointless error

* Add move_portfolio_funds_v2 extrinsic

* Add missing weight implementation

* Remove num_traits dependency; Add parameter to burn_nft weight function; Add V2 types to schema; Run script for generating benchmarks

* Undo changes to session weights; Add v2 types to schema types

* Add remove_local_metadata_key and remove_local_metadata_value extrinsics

* Add unit tests for the new extrinsics

* Add benchmarks for the new extrinsics

* Add weights for the new benchmarks

* Add two events for the new extrinsics

* Add NonFungible types; Add `BalanceOf` to the NFT pallet; Add `asset_type` checks (#1399)

* Add NonFungibleType enum; Add asset_type check for extrinsics; Ensure asset_type update is valid; Ensure asset is not frozen check for NFT

* Add optional parameter for create_nft_collection; Add is_fungible and is_non_fungible functions

* Change BalanceOf name to NumberOfNFTs; Add NFTCount alias type

* Remove duplicated storage read

* Change parameter type to NonFungibleType; Add type to schema.json

* Fix doc

* Change parameter type; Use is_locked instead of if let; Add caller did to events; Allow removing the value of a global key

* Fix weight function name

* Cargo lock

* Add #[test] to settle_on_block

* Change try_get to contains_key

---------

Co-authored-by: Robert Gabriel Jakabosky <rjakabosky+neopallium@neoawareness.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants