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

difftreelog

Merge pull request #300 from UniqueNetwork/release/opal-v917000

kozyrevdev2022-03-10parents: #e93af88 #8c2fc09.patch.diff
in: master
Release/opal v917000

196 files changed

modified.envdiffbeforeafterboth
--- a/.env
+++ b/.env
@@ -1,6 +1,6 @@
 RUST_TOOLCHAIN=nightly-2021-11-11
 RUST_C=1.58.0-nightly
-POLKA_VERSION=release-v0.9.16
+POLKA_VERSION=release-v0.9.17
 UNIQUE_BRANCH=develop
 USER=***
 PASS=***
modifiedCargo.lockdiffbeforeafterboth
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -188,9 +188,9 @@
 
 [[package]]
 name = "async-global-executor"
-version = "2.0.2"
+version = "2.0.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9586ec52317f36de58453159d48351bc244bc24ced3effc1fce22f3d48664af6"
+checksum = "c026b7e44f1316b567ee750fea85103f87fcb80792b860e979f221259796ca0a"
 dependencies = [
  "async-channel",
  "async-executor",
@@ -860,9 +860,9 @@
 
 [[package]]
 name = "byte-slice-cast"
-version = "1.2.0"
+version = "1.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d30c751592b77c499e7bce34d99d67c2c11bdc0574e9a488ddade14150a4698"
+checksum = "87c5fdd0166095e1d463fc6cc01aa8ce547ad77a4e84d42eb6762b084e28067e"
 
 [[package]]
 name = "byte-tools"
@@ -1051,9 +1051,9 @@
 
 [[package]]
 name = "clap"
-version = "3.1.2"
+version = "3.1.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5177fac1ab67102d8989464efd043c6ff44191b1557ec1ddd489b4f7e1447e77"
+checksum = "ced1892c55c910c1219e98d6fc8d71f6bddba7905866ce740066d8bfea859312"
 dependencies = [
  "atty",
  "bitflags",
@@ -1068,9 +1068,9 @@
 
 [[package]]
 name = "clap_derive"
-version = "3.1.2"
+version = "3.1.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "01d42c94ce7c2252681b5fed4d3627cc807b13dfc033246bd05d5b252399000e"
+checksum = "da95d038ede1a964ce99f49cbe27a7fb538d1da595e4b4f70b8c8f338d17bf16"
 dependencies = [
  "heck 0.4.0",
  "proc-macro-error",
@@ -2013,9 +2013,9 @@
 
 [[package]]
 name = "ed25519"
-version = "1.3.0"
+version = "1.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "74e1069e39f1454367eb2de793ed062fac4c35c2934b76a81d90dd9abcd28816"
+checksum = "eed12bbf7b5312f8da1c2722bc06d8c6b12c2d86a7fb35a194c7f3e6fc2bbe39"
 dependencies = [
  "signature",
 ]
@@ -2042,11 +2042,11 @@
 
 [[package]]
 name = "enum-as-inner"
-version = "0.3.3"
+version = "0.3.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c5f0096a91d210159eceb2ff5e1c4da18388a170e1e3ce948aac9c8fdbbf595"
+checksum = "570d109b813e904becc80d8d5da38376818a143348413f7149f1340fe04754d4"
 dependencies = [
- "heck 0.3.3",
+ "heck 0.4.0",
  "proc-macro2",
  "quote",
  "syn",
@@ -4403,7 +4403,7 @@
  "libp2p-core",
  "libp2p-swarm",
  "log",
- "lru 0.7.2",
+ "lru 0.7.3",
  "rand 0.7.3",
  "smallvec",
  "unsigned-varint 0.7.1",
@@ -4667,9 +4667,9 @@
 
 [[package]]
 name = "lru"
-version = "0.7.2"
+version = "0.7.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "274353858935c992b13c0ca408752e2121da852d07dec7ce5f108c77dfa14d1f"
+checksum = "fcb87f3080f6d1d69e8c564c0fcfde1d7aa8cc451ce40cae89479111f03bc0eb"
 dependencies = [
  "hashbrown 0.11.2",
 ]
@@ -5189,9 +5189,9 @@
 
 [[package]]
 name = "once_cell"
-version = "1.9.0"
+version = "1.10.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5"
+checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9"
 
 [[package]]
 name = "opaque-debug"
@@ -6226,7 +6226,7 @@
 [[package]]
 name = "pallet-template-transaction-payment"
 version = "3.0.0"
-source = "git+https://github.com/UniqueNetwork/pallet-sponsoring?branch=polkadot-v0.9.17#d9553babbc1cfdd44794cb0118dbb1491670e97e"
+source = "git+https://github.com/UniqueNetwork/pallet-sponsoring?branch=polkadot-v0.9.17#28f311f8de67155865d362f6ded1d0d5229f3202"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -6479,9 +6479,9 @@
 
 [[package]]
 name = "parity-db"
-version = "0.3.7"
+version = "0.3.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09aa6c5bb8070cf0456d9fc228b3022e900aae9092c48c9c45facf97422efc1d"
+checksum = "865edee5b792f537356d9e55cbc138e7f4718dc881a7ea45a18b37bf61c21e3d"
 dependencies = [
  "blake2-rfc",
  "crc32fast",
@@ -6664,7 +6664,7 @@
  "cfg-if 1.0.0",
  "instant",
  "libc",
- "redox_syscall 0.2.10",
+ "redox_syscall 0.2.11",
  "smallvec",
  "winapi 0.3.9",
 ]
@@ -6677,7 +6677,7 @@
 dependencies = [
  "cfg-if 1.0.0",
  "libc",
- "redox_syscall 0.2.10",
+ "redox_syscall 0.2.11",
  "smallvec",
  "windows-sys",
 ]
@@ -6881,7 +6881,7 @@
 dependencies = [
  "derive_more",
  "futures 0.3.21",
- "lru 0.7.2",
+ "lru 0.7.3",
  "parity-scale-codec",
  "polkadot-erasure-coding",
  "polkadot-node-network-protocol",
@@ -6902,7 +6902,7 @@
 source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.17#de0ecd4760b146ecf33f5e867d707d789e21e060"
 dependencies = [
  "futures 0.3.21",
- "lru 0.7.2",
+ "lru 0.7.3",
  "parity-scale-codec",
  "polkadot-erasure-coding",
  "polkadot-node-network-protocol",
@@ -7010,7 +7010,7 @@
 dependencies = [
  "derive_more",
  "futures 0.3.21",
- "lru 0.7.2",
+ "lru 0.7.3",
  "parity-scale-codec",
  "polkadot-erasure-coding",
  "polkadot-node-network-protocol",
@@ -7106,7 +7106,7 @@
  "futures 0.3.21",
  "futures-timer",
  "kvdb",
- "lru 0.7.2",
+ "lru 0.7.3",
  "merlin",
  "parity-scale-codec",
  "polkadot-node-jaeger",
@@ -7234,7 +7234,7 @@
 dependencies = [
  "futures 0.3.21",
  "kvdb",
- "lru 0.7.2",
+ "lru 0.7.3",
  "parity-scale-codec",
  "polkadot-node-primitives",
  "polkadot-node-subsystem",
@@ -7458,7 +7458,7 @@
  "derive_more",
  "futures 0.3.21",
  "itertools",
- "lru 0.7.2",
+ "lru 0.7.3",
  "metered-channel",
  "parity-scale-codec",
  "pin-project 1.0.10",
@@ -7484,7 +7484,7 @@
 dependencies = [
  "futures 0.3.21",
  "futures-timer",
- "lru 0.7.2",
+ "lru 0.7.3",
  "parity-util-mem",
  "parking_lot 0.11.2",
  "polkadot-node-metrics",
@@ -7830,7 +7830,7 @@
  "kusama-runtime",
  "kvdb",
  "kvdb-rocksdb",
- "lru 0.7.2",
+ "lru 0.7.3",
  "pallet-babe",
  "pallet-im-online",
  "pallet-mmr-primitives",
@@ -8427,9 +8427,9 @@
 
 [[package]]
 name = "redox_syscall"
-version = "0.2.10"
+version = "0.2.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff"
+checksum = "8380fe0152551244f0747b1bf41737e0f8a74f97a14ccefd1148187271634f3c"
 dependencies = [
  "bitflags",
 ]
@@ -8441,7 +8441,7 @@
 checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64"
 dependencies = [
  "getrandom 0.2.5",
- "redox_syscall 0.2.10",
+ "redox_syscall 0.2.11",
 ]
 
 [[package]]
@@ -8564,9 +8564,9 @@
 
 [[package]]
 name = "retain_mut"
-version = "0.1.6"
+version = "0.1.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "51dd4445360338dab5116712bee1388dc727991d51969558a8882ab552e6db30"
+checksum = "8c31b5c4033f8fdde8700e4657be2c497e7288f01515be52168c631e2e4d4086"
 
 [[package]]
 name = "ring"
@@ -9438,7 +9438,7 @@
  "linked-hash-map",
  "linked_hash_set",
  "log",
- "lru 0.7.2",
+ "lru 0.7.3",
  "parity-scale-codec",
  "parking_lot 0.11.2",
  "pin-project 1.0.10",
@@ -9475,7 +9475,7 @@
  "futures-timer",
  "libp2p",
  "log",
- "lru 0.7.2",
+ "lru 0.7.3",
  "sc-network",
  "sp-runtime",
  "substrate-prometheus-endpoint",
@@ -10350,7 +10350,7 @@
 dependencies = [
  "futures 0.3.21",
  "log",
- "lru 0.7.2",
+ "lru 0.7.3",
  "parity-scale-codec",
  "parking_lot 0.11.2",
  "sp-api",
@@ -11218,16 +11218,16 @@
  "cfg-if 1.0.0",
  "fastrand",
  "libc",
- "redox_syscall 0.2.10",
+ "redox_syscall 0.2.11",
  "remove_dir_all",
  "winapi 0.3.9",
 ]
 
 [[package]]
 name = "termcolor"
-version = "1.1.2"
+version = "1.1.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4"
+checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755"
 dependencies = [
  "winapi-util",
 ]
@@ -11246,9 +11246,9 @@
 
 [[package]]
 name = "textwrap"
-version = "0.14.2"
+version = "0.15.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0066c8d12af8b5acd21e00547c3797fde4e8677254a7ee429176ccebbe93dd80"
+checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb"
 
 [[package]]
 name = "thiserror"
@@ -11761,7 +11761,7 @@
 
 [[package]]
 name = "unique-node"
-version = "0.9.16"
+version = "0.9.17"
 dependencies = [
  "clap",
  "cumulus-client-cli",
@@ -11884,7 +11884,7 @@
 
 [[package]]
 name = "unique-runtime"
-version = "0.9.16"
+version = "0.9.17"
 dependencies = [
  "cumulus-pallet-aura-ext",
  "cumulus-pallet-dmp-queue",
@@ -12042,7 +12042,7 @@
 [[package]]
 name = "up-sponsorship"
 version = "0.1.0"
-source = "git+https://github.com/UniqueNetwork/pallet-sponsoring?branch=polkadot-v0.9.17#d9553babbc1cfdd44794cb0118dbb1491670e97e"
+source = "git+https://github.com/UniqueNetwork/pallet-sponsoring?branch=polkadot-v0.9.17#28f311f8de67155865d362f6ded1d0d5229f3202"
 dependencies = [
  "impl-trait-for-tuples",
 ]
@@ -12805,9 +12805,9 @@
 
 [[package]]
 name = "zeroize"
-version = "1.5.2"
+version = "1.5.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7c88870063c39ee00ec285a2f8d6a966e5b6fb2becc4e8dac77ed0d370ed6006"
+checksum = "50344758e2f40e3a1fcfc8f6f91aa57b5f8ebd8d27919fe6451f15aaaf9ee608"
 dependencies = [
  "zeroize_derive",
 ]
modifiedLICENSEdiffbeforeafterboth
--- a/LICENSE
+++ b/LICENSE
@@ -1,15 +1,674 @@
-USETECH PROFESSIONAL CONFIDENTIAL
-__________________
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
 
- [2019] - [2021] UseTech Professional LTD. 
- All Rights Reserved.
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
 
-NOTICE:  All information contained herein is, and remains
-the property of UseTech Professional LTD. and its suppliers,
-if any. The intellectual and technical concepts contained
-herein are proprietary to UseTech Professional LTD.
-and its suppliers and may be covered by U.S. and Foreign Patents,
-patents in process, and are protected by trade secret or copyright law.
-Dissemination of this information or reproduction of this material
-is strictly forbidden unless prior written permission is obtained
-from UseTech Professional LTD..
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    {one line to give the program's name and a brief idea of what it does.}
+    Copyright (C) {year}  {name of author}
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    {project}  Copyright (C) {year}  {fullname}
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
\ No newline at end of file
modifiedMakefilediffbeforeafterboth
--- a/Makefile
+++ b/Makefile
@@ -34,7 +34,7 @@
 	cargo run --release --features runtime-benchmarks -- \
 	benchmark --pallet pallet-$(PALLET) \
 	--wasm-execution compiled --extrinsic '*' \
-	--template .maintain/frame-weight-template.hbs --steps=50 --repeat=20 \
+	--template .maintain/frame-weight-template.hbs --steps=50 --repeat=200 --heap-pages=4096 \
 	--output=./pallets/$(PALLET)/src/weights.rs
 
 .PHONY: bench-evm-migration
modifiedclient/rpc/Cargo.tomldiffbeforeafterboth
--- a/client/rpc/Cargo.toml
+++ b/client/rpc/Cargo.toml
@@ -1,6 +1,7 @@
 [package]
 name = "uc-rpc"
 version = "0.1.0"
+license = "GPLv3"
 edition = "2021"
 
 [dependencies]
modifiedclient/rpc/src/lib.rsdiffbeforeafterboth
--- a/client/rpc/src/lib.rs
+++ b/client/rpc/src/lib.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use std::sync::Arc;
 
 use codec::Decode;
modifiedcrates/evm-coder-macros/Cargo.tomldiffbeforeafterboth
--- a/crates/evm-coder-macros/Cargo.toml
+++ b/crates/evm-coder-macros/Cargo.toml
@@ -1,6 +1,7 @@
 [package]
 name = "evm-coder-macros"
 version = "0.1.0"
+license = "GPLv3"
 edition = "2021"
 
 [lib]
modifiedcrates/evm-coder-macros/src/lib.rsdiffbeforeafterboth
--- a/crates/evm-coder-macros/src/lib.rs
+++ b/crates/evm-coder-macros/src/lib.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #![allow(dead_code)]
 
 use darling::FromMeta;
modifiedcrates/evm-coder-macros/src/solidity_interface.rsdiffbeforeafterboth
--- a/crates/evm-coder-macros/src/solidity_interface.rs
+++ b/crates/evm-coder-macros/src/solidity_interface.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #![allow(dead_code)]
 
 use quote::quote;
modifiedcrates/evm-coder-macros/src/to_log.rsdiffbeforeafterboth
--- a/crates/evm-coder-macros/src/to_log.rs
+++ b/crates/evm-coder-macros/src/to_log.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use inflector::cases;
 use syn::{Data, DeriveInput, Field, Fields, Ident, Variant, spanned::Spanned};
 use std::fmt::Write;
modifiedcrates/evm-coder/Cargo.tomldiffbeforeafterboth
--- a/crates/evm-coder/Cargo.toml
+++ b/crates/evm-coder/Cargo.toml
@@ -1,6 +1,7 @@
 [package]
 name = "evm-coder"
 version = "0.1.0"
+license = "GPLv3"
 edition = "2021"
 
 [dependencies]
modifiedcrates/evm-coder/src/abi.rsdiffbeforeafterboth
--- a/crates/evm-coder/src/abi.rs
+++ b/crates/evm-coder/src/abi.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 //! TODO: I misunterstood therminology, abi IS rlp encoded, so
 //! this module should be replaced with rlp crate
 
modifiedcrates/evm-coder/src/events.rsdiffbeforeafterboth
--- a/crates/evm-coder/src/events.rs
+++ b/crates/evm-coder/src/events.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use ethereum::Log;
 use primitive_types::{H160, H256};
 
modifiedcrates/evm-coder/src/execution.rsdiffbeforeafterboth
--- a/crates/evm-coder/src/execution.rs
+++ b/crates/evm-coder/src/execution.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #[cfg(not(feature = "std"))]
 use alloc::string::{String, ToString};
 use evm_core::{ExitError, ExitFatal};
modifiedcrates/evm-coder/src/lib.rsdiffbeforeafterboth
--- a/crates/evm-coder/src/lib.rs
+++ b/crates/evm-coder/src/lib.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #![cfg_attr(not(feature = "std"), no_std)]
 #[cfg(not(feature = "std"))]
 extern crate alloc;
modifiedcrates/evm-coder/src/solidity.rsdiffbeforeafterboth
--- a/crates/evm-coder/src/solidity.rs
+++ b/crates/evm-coder/src/solidity.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #[cfg(not(feature = "std"))]
 use alloc::{
 	string::String,
modifiedcrates/evm-coder/tests/generics.rsdiffbeforeafterboth
--- a/crates/evm-coder/tests/generics.rs
+++ b/crates/evm-coder/tests/generics.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use std::marker::PhantomData;
 use evm_coder::{execution::Result, generate_stubgen, solidity_interface, types::*};
 
modifiedcrates/evm-coder/tests/log.rsdiffbeforeafterboth
--- a/crates/evm-coder/tests/log.rs
+++ b/crates/evm-coder/tests/log.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #![allow(dead_code)]
 
 use evm_coder::{ToLog, types::*};
modifiedcrates/evm-coder/tests/random.rsdiffbeforeafterboth
--- a/crates/evm-coder/tests/random.rs
+++ b/crates/evm-coder/tests/random.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #![allow(dead_code)] // This test only checks that macros is not panicking
 
 use evm_coder::{ToLog, execution::Result, solidity_interface, types::*};
modifiedcrates/evm-coder/tests/solidity_generation.rsdiffbeforeafterboth
--- a/crates/evm-coder/tests/solidity_generation.rs
+++ b/crates/evm-coder/tests/solidity_generation.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use evm_coder::{execution::Result, generate_stubgen, solidity_interface, types::*};
 
 struct ERC20;
modifiednode/cli/Cargo.tomldiffbeforeafterboth
--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -254,10 +254,10 @@
 description = 'Unique Node'
 edition = '2021'
 homepage = 'https://unique.network'
-license = 'All Rights Reserved'
+license = 'GPLv3'
 name = 'unique-node'
 repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = '0.9.16'
+version = '0.9.17'
 
 [[bin]]
 name = 'unique-collator'
modifiednode/cli/build.rsdiffbeforeafterboth
--- a/node/cli/build.rs
+++ b/node/cli/build.rs
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};
 
modifiednode/cli/src/chain_spec.rsdiffbeforeafterboth
--- a/node/cli/src/chain_spec.rs
+++ b/node/cli/src/chain_spec.rs
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 use cumulus_primitives_core::ParaId;
 use unique_runtime::*;
modifiednode/cli/src/cli.rsdiffbeforeafterboth
--- a/node/cli/src/cli.rs
+++ b/node/cli/src/cli.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use crate::chain_spec;
 use std::path::PathBuf;
 use clap::Parser;
modifiednode/cli/src/command.rsdiffbeforeafterboth
--- a/node/cli/src/command.rs
+++ b/node/cli/src/command.rs
@@ -1,3 +1,20 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
+// Original license
 // This file is part of Substrate.
 
 // Copyright (C) 2017-2021 Parity Technologies (UK) Ltd.
modifiednode/cli/src/lib.rsdiffbeforeafterboth
--- a/node/cli/src/lib.rs
+++ b/node/cli/src/lib.rs
@@ -1,2 +1,18 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 pub mod chain_spec;
 pub mod service;
modifiednode/cli/src/main.rsdiffbeforeafterboth
--- a/node/cli/src/main.rs
+++ b/node/cli/src/main.rs
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 mod chain_spec;
 #[macro_use]
modifiednode/cli/src/service.rsdiffbeforeafterboth
--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -1,9 +1,20 @@
-//! Service and ServiceFactory implementation. Specialized wrapper over substrate service.
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
 
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
+//! Service and ServiceFactory implementation. Specialized wrapper over substrate service.
 
 // std
 use std::sync::Arc;
modifiednode/rpc/Cargo.tomldiffbeforeafterboth
--- a/node/rpc/Cargo.toml
+++ b/node/rpc/Cargo.toml
@@ -2,7 +2,7 @@
 name = "unique-rpc"
 version = "0.1.0"
 authors = ['Unique Network <support@uniquenetwork.io>']
-license = 'All Rights Reserved'
+license = 'GPLv3'
 edition = "2021"
 description = "Unique chain rpc"
 
modifiednode/rpc/src/lib.rsdiffbeforeafterboth
--- a/node/rpc/src/lib.rs
+++ b/node/rpc/src/lib.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use sp_runtime::traits::BlakeTwo256;
 use unique_runtime::{Hash, AccountId, CrossAccountId, Index, opaque::Block, BlockNumber, Balance};
 use fc_rpc::{
modifiedpallets/common/Cargo.tomldiffbeforeafterboth
--- a/pallets/common/Cargo.toml
+++ b/pallets/common/Cargo.toml
@@ -1,6 +1,7 @@
 [package]
 name = "pallet-common"
 version = "0.1.0"
+license = "GPLv3"
 edition = "2021"
 
 [dependencies.codec]
modifiedpallets/common/src/account.rsdiffbeforeafterboth
--- a/pallets/common/src/account.rs
+++ b/pallets/common/src/account.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use crate::Config;
 use codec::{Encode, EncodeLike, Decode, MaxEncodedLen};
 use sp_core::H160;
modifiedpallets/common/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/common/src/benchmarking.rs
+++ b/pallets/common/src/benchmarking.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use sp_std::vec::Vec;
 use crate::{Config, CollectionHandle};
 use up_data_structs::{
modifiedpallets/common/src/erc.rsdiffbeforeafterboth
--- a/pallets/common/src/erc.rs
+++ b/pallets/common/src/erc.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 pub use pallet_evm::PrecompileOutput;
 pub use pallet_evm::PrecompileResult;
 use sp_core::{H160, U256};
modifiedpallets/common/src/eth.rsdiffbeforeafterboth
--- a/pallets/common/src/eth.rs
+++ b/pallets/common/src/eth.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use up_data_structs::{CollectionId, TokenId};
 use sp_core::H160;
 
modifiedpallets/common/src/lib.rsdiffbeforeafterboth
--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #![cfg_attr(not(feature = "std"), no_std)]
 
 use core::ops::{Deref, DerefMut};
modifiedpallets/evm-coder-substrate/Cargo.tomldiffbeforeafterboth
--- a/pallets/evm-coder-substrate/Cargo.toml
+++ b/pallets/evm-coder-substrate/Cargo.toml
@@ -1,6 +1,7 @@
 [package]
 name = "pallet-evm-coder-substrate"
 version = "0.1.0"
+license = "GPLv3"
 edition = "2021"
 
 [dependencies]
modifiedpallets/evm-coder-substrate/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/evm-coder-substrate/src/benchmarking.rs
+++ b/pallets/evm-coder-substrate/src/benchmarking.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use super::*;
 
 use frame_benchmarking::benchmarks;
modifiedpallets/evm-coder-substrate/src/lib.rsdiffbeforeafterboth
--- a/pallets/evm-coder-substrate/src/lib.rs
+++ b/pallets/evm-coder-substrate/src/lib.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #![cfg_attr(not(feature = "std"), no_std)]
 
 #[cfg(not(feature = "std"))]
modifiedpallets/evm-contract-helpers/Cargo.tomldiffbeforeafterboth
--- a/pallets/evm-contract-helpers/Cargo.toml
+++ b/pallets/evm-contract-helpers/Cargo.toml
@@ -1,6 +1,7 @@
 [package]
 name = "pallet-evm-contract-helpers"
 version = "0.1.0"
+license = "GPLv3"
 edition = "2021"
 
 [dependencies]
modifiedpallets/evm-contract-helpers/src/eth.rsdiffbeforeafterboth
--- a/pallets/evm-contract-helpers/src/eth.rs
+++ b/pallets/evm-contract-helpers/src/eth.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use core::marker::PhantomData;
 use evm_coder::{abi::AbiWriter, execution::Result, generate_stubgen, solidity_interface, types::*};
 use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};
modifiedpallets/evm-contract-helpers/src/lib.rsdiffbeforeafterboth
--- a/pallets/evm-contract-helpers/src/lib.rs
+++ b/pallets/evm-contract-helpers/src/lib.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #![cfg_attr(not(feature = "std"), no_std)]
 
 use codec::{Decode, Encode, MaxEncodedLen};
modifiedpallets/evm-migration/Cargo.tomldiffbeforeafterboth
--- a/pallets/evm-migration/Cargo.toml
+++ b/pallets/evm-migration/Cargo.toml
@@ -1,6 +1,7 @@
 [package]
 name = "pallet-evm-migration"
 version = "0.1.0"
+license = "GPLv3"
 edition = "2021"
 
 [dependencies]
modifiedpallets/evm-migration/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/evm-migration/src/benchmarking.rs
+++ b/pallets/evm-migration/src/benchmarking.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use super::{Call, Config, Pallet};
 use frame_benchmarking::benchmarks;
 use frame_system::RawOrigin;
modifiedpallets/evm-migration/src/lib.rsdiffbeforeafterboth
--- a/pallets/evm-migration/src/lib.rs
+++ b/pallets/evm-migration/src/lib.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #![cfg_attr(not(feature = "std"), no_std)]
 
 pub use pallet::*;
modifiedpallets/evm-migration/src/weights.rsdiffbeforeafterboth
--- a/pallets/evm-migration/src/weights.rs
+++ b/pallets/evm-migration/src/weights.rs
@@ -2,9 +2,9 @@
 
 //! Autogenerated weights for pallet_evm_migration
 //!
-//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 3.0.0
-//! DATE: 2021-08-12, STEPS: `[50, ]`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
-//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 128
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
+//! DATE: 2022-03-01, STEPS: `50`, REPEAT: 200, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
 
 // Executed Command:
 // target/release/unique-collator
@@ -18,10 +18,10 @@
 // --template
 // .maintain/frame-weight-template.hbs
 // --steps=50
-// --repeat=20
+// --repeat=200
+// --heap-pages=4096
 // --output=./pallets/evm-migration/src/weights.rs
 
-
 #![cfg_attr(rustfmt, rustfmt_skip)]
 #![allow(unused_parens)]
 #![allow(unused_imports)]
@@ -40,20 +40,29 @@
 /// Weights for pallet_evm_migration using the Substrate node and recommended hardware.
 pub struct SubstrateWeight<T>(PhantomData<T>);
 impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
+	// Storage: EvmMigration MigrationPending (r:1 w:1)
+	// Storage: System Account (r:1 w:0)
+	// Storage: EVM AccountCodes (r:1 w:0)
 	fn begin() -> Weight {
-		(6_210_000 as Weight)
+		(6_441_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(3 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
+	// Storage: EvmMigration MigrationPending (r:1 w:0)
+	// Storage: EVM AccountStorages (r:0 w:1)
 	fn set_data(b: u32, ) -> Weight {
-		(2_926_000 as Weight)
-			// Standard Error: 4_000
-			.saturating_add((649_000 as Weight).saturating_mul(b as Weight))
+		(3_424_000 as Weight)
+			// Standard Error: 0
+			.saturating_add((973_000 as Weight).saturating_mul(b as Weight))
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))
 	}
-	fn finish(_b: u32, ) -> Weight {
-		(4_309_000 as Weight)
+	// Storage: EvmMigration MigrationPending (r:1 w:1)
+	// Storage: EVM AccountCodes (r:0 w:1)
+	fn finish(b: u32, ) -> Weight {
+		(4_702_000 as Weight)
+			// Standard Error: 0
+			.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes(2 as Weight))
 	}
@@ -61,21 +70,30 @@
 
 // For backwards compatibility and tests
 impl WeightInfo for () {
+	// Storage: EvmMigration MigrationPending (r:1 w:1)
+	// Storage: System Account (r:1 w:0)
+	// Storage: EVM AccountCodes (r:1 w:0)
 	fn begin() -> Weight {
-		(6_210_000 as Weight)
+		(6_441_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(3 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
+	// Storage: EvmMigration MigrationPending (r:1 w:0)
+	// Storage: EVM AccountStorages (r:0 w:1)
 	fn set_data(b: u32, ) -> Weight {
-		(2_926_000 as Weight)
-			// Standard Error: 4_000
-			.saturating_add((649_000 as Weight).saturating_mul(b as Weight))
+		(3_424_000 as Weight)
+			// Standard Error: 0
+			.saturating_add((973_000 as Weight).saturating_mul(b as Weight))
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes((1 as Weight).saturating_mul(b as Weight)))
 	}
-	fn finish(_b: u32, ) -> Weight {
-		(4_309_000 as Weight)
+	// Storage: EvmMigration MigrationPending (r:1 w:1)
+	// Storage: EVM AccountCodes (r:0 w:1)
+	fn finish(b: u32, ) -> Weight {
+		(4_702_000 as Weight)
+			// Standard Error: 0
+			.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(2 as Weight))
 	}
-}
\ No newline at end of file
+}
modifiedpallets/evm-transaction-payment/Cargo.tomldiffbeforeafterboth
--- a/pallets/evm-transaction-payment/Cargo.toml
+++ b/pallets/evm-transaction-payment/Cargo.toml
@@ -1,6 +1,7 @@
 [package]
 name = "pallet-evm-transaction-payment"
 version = "0.1.0"
+license = "GPLv3"
 edition = "2021"
 
 [dependencies]
modifiedpallets/evm-transaction-payment/src/lib.rsdiffbeforeafterboth
--- a/pallets/evm-transaction-payment/src/lib.rs
+++ b/pallets/evm-transaction-payment/src/lib.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #![cfg_attr(not(feature = "std"), no_std)]
 
 use core::marker::PhantomData;
modifiedpallets/fungible/Cargo.tomldiffbeforeafterboth
--- a/pallets/fungible/Cargo.toml
+++ b/pallets/fungible/Cargo.toml
@@ -1,6 +1,7 @@
 [package]
 name = "pallet-fungible"
 version = "0.1.0"
+license = "GPLv3"
 edition = "2021"
 
 [dependencies.codec]
modifiedpallets/fungible/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/fungible/src/benchmarking.rs
+++ b/pallets/fungible/src/benchmarking.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use super::*;
 use crate::{Pallet, Config, FungibleHandle};
 
modifiedpallets/fungible/src/common.rsdiffbeforeafterboth
--- a/pallets/fungible/src/common.rs
+++ b/pallets/fungible/src/common.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use core::marker::PhantomData;
 
 use frame_support::{dispatch::DispatchResultWithPostInfo, ensure, fail, weights::Weight, BoundedVec};
modifiedpallets/fungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/fungible/src/erc.rs
+++ b/pallets/fungible/src/erc.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use core::char::{REPLACEMENT_CHARACTER, decode_utf16};
 use core::convert::TryInto;
 use evm_coder::{ToLog, execution::*, generate_stubgen, solidity_interface, types::*, weight};
modifiedpallets/fungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/fungible/src/lib.rs
+++ b/pallets/fungible/src/lib.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #![cfg_attr(not(feature = "std"), no_std)]
 
 use core::ops::Deref;
modifiedpallets/fungible/src/weights.rsdiffbeforeafterboth
--- a/pallets/fungible/src/weights.rs
+++ b/pallets/fungible/src/weights.rs
@@ -3,8 +3,8 @@
 //! Autogenerated weights for pallet_fungible
 //!
 //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
-//! DATE: 2021-10-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
-//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 128
+//! DATE: 2022-03-01, STEPS: `50`, REPEAT: 200, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
 
 // Executed Command:
 // target/release/unique-collator
@@ -18,10 +18,10 @@
 // --template
 // .maintain/frame-weight-template.hbs
 // --steps=50
-// --repeat=20
+// --repeat=200
+// --heap-pages=4096
 // --output=./pallets/fungible/src/weights.rs
 
-
 #![cfg_attr(rustfmt, rustfmt_skip)]
 #![allow(unused_parens)]
 #![allow(unused_imports)]
@@ -44,19 +44,19 @@
 /// Weights for pallet_fungible using the Substrate node and recommended hardware.
 pub struct SubstrateWeight<T>(PhantomData<T>);
 impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
+	// Storage: Fungible TotalSupply (r:1 w:1)
 	// Storage: Fungible Balance (r:1 w:1)
-	// Storage: Fungible TotalSupply (r:0 w:1)
 	fn create_item() -> Weight {
-		(12_069_000 as Weight)
-			.saturating_add(T::DbWeight::get().reads(1 as Weight))
+		(14_407_000 as Weight)
+			.saturating_add(T::DbWeight::get().reads(2 as Weight))
 			.saturating_add(T::DbWeight::get().writes(2 as Weight))
 	}
 	// Storage: Fungible TotalSupply (r:1 w:1)
 	// Storage: Fungible Balance (r:4 w:4)
 	fn create_multiple_items_ex(b: u32, ) -> Weight {
-		(1_055_000 as Weight)
-			// Standard Error: 22_000
-			.saturating_add((5_273_000 as Weight).saturating_mul(b as Weight))
+		(13_030_000 as Weight)
+			// Standard Error: 1_000
+			.saturating_add((3_779_000 as Weight).saturating_mul(b as Weight))
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
@@ -65,27 +65,27 @@
 	// Storage: Fungible TotalSupply (r:1 w:1)
 	// Storage: Fungible Balance (r:1 w:1)
 	fn burn_item() -> Weight {
-		(14_096_000 as Weight)
+		(15_565_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(2 as Weight))
 			.saturating_add(T::DbWeight::get().writes(2 as Weight))
 	}
 	// Storage: Fungible Balance (r:2 w:2)
 	fn transfer() -> Weight {
-		(15_436_000 as Weight)
+		(17_713_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(2 as Weight))
 			.saturating_add(T::DbWeight::get().writes(2 as Weight))
 	}
 	// Storage: Fungible Balance (r:1 w:0)
 	// Storage: Fungible Allowance (r:0 w:1)
 	fn approve() -> Weight {
-		(12_867_000 as Weight)
+		(14_834_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Fungible Allowance (r:1 w:1)
 	// Storage: Fungible Balance (r:2 w:2)
 	fn transfer_from() -> Weight {
-		(21_462_000 as Weight)
+		(25_189_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(3 as Weight))
 			.saturating_add(T::DbWeight::get().writes(3 as Weight))
 	}
@@ -93,7 +93,7 @@
 	// Storage: Fungible TotalSupply (r:1 w:1)
 	// Storage: Fungible Balance (r:1 w:1)
 	fn burn_from() -> Weight {
-		(55_874_000 as Weight)
+		(24_065_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(3 as Weight))
 			.saturating_add(T::DbWeight::get().writes(3 as Weight))
 	}
@@ -101,19 +101,19 @@
 
 // For backwards compatibility and tests
 impl WeightInfo for () {
+	// Storage: Fungible TotalSupply (r:1 w:1)
 	// Storage: Fungible Balance (r:1 w:1)
-	// Storage: Fungible TotalSupply (r:0 w:1)
 	fn create_item() -> Weight {
-		(12_069_000 as Weight)
-			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
+		(14_407_000 as Weight)
+			.saturating_add(RocksDbWeight::get().reads(2 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(2 as Weight))
 	}
 	// Storage: Fungible TotalSupply (r:1 w:1)
 	// Storage: Fungible Balance (r:4 w:4)
 	fn create_multiple_items_ex(b: u32, ) -> Weight {
-		(1_055_000 as Weight)
-			// Standard Error: 22_000
-			.saturating_add((5_273_000 as Weight).saturating_mul(b as Weight))
+		(13_030_000 as Weight)
+			// Standard Error: 1_000
+			.saturating_add((3_779_000 as Weight).saturating_mul(b as Weight))
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
@@ -122,27 +122,27 @@
 	// Storage: Fungible TotalSupply (r:1 w:1)
 	// Storage: Fungible Balance (r:1 w:1)
 	fn burn_item() -> Weight {
-		(14_096_000 as Weight)
+		(15_565_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(2 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(2 as Weight))
 	}
 	// Storage: Fungible Balance (r:2 w:2)
 	fn transfer() -> Weight {
-		(15_436_000 as Weight)
+		(17_713_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(2 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(2 as Weight))
 	}
 	// Storage: Fungible Balance (r:1 w:0)
 	// Storage: Fungible Allowance (r:0 w:1)
 	fn approve() -> Weight {
-		(12_867_000 as Weight)
+		(14_834_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Fungible Allowance (r:1 w:1)
 	// Storage: Fungible Balance (r:2 w:2)
 	fn transfer_from() -> Weight {
-		(21_462_000 as Weight)
+		(25_189_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(3 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(3 as Weight))
 	}
@@ -150,7 +150,7 @@
 	// Storage: Fungible TotalSupply (r:1 w:1)
 	// Storage: Fungible Balance (r:1 w:1)
 	fn burn_from() -> Weight {
-		(55_874_000 as Weight)
+		(24_065_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(3 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(3 as Weight))
 	}
modifiedpallets/inflation/Cargo.tomldiffbeforeafterboth
--- a/pallets/inflation/Cargo.toml
+++ b/pallets/inflation/Cargo.toml
@@ -6,7 +6,7 @@
 description = 'Unique Inflation Pallet'
 edition = '2018'
 homepage = 'https://unique.network'
-license = 'All Rights Reserved'
+license = 'GPLv3'
 name = 'pallet-inflation'
 repository = 'https://github.com/UniqueNetwork/unique-chain'
 version = '0.1.0'
modifiedpallets/inflation/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/inflation/src/benchmarking.rs
+++ b/pallets/inflation/src/benchmarking.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #![cfg(feature = "runtime-benchmarks")]
 
 use super::*;
modifiedpallets/inflation/src/lib.rsdiffbeforeafterboth
--- a/pallets/inflation/src/lib.rs
+++ b/pallets/inflation/src/lib.rs
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 // #![recursion_limit = "1024"]
 #![cfg_attr(not(feature = "std"), no_std)]
modifiedpallets/inflation/src/tests.rsdiffbeforeafterboth
--- a/pallets/inflation/src/tests.rs
+++ b/pallets/inflation/src/tests.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #![cfg(test)]
 #![allow(clippy::from_over_into)]
 use crate as pallet_inflation;
modifiedpallets/nonfungible/Cargo.tomldiffbeforeafterboth
--- a/pallets/nonfungible/Cargo.toml
+++ b/pallets/nonfungible/Cargo.toml
@@ -1,6 +1,7 @@
 [package]
 name = "pallet-nonfungible"
 version = "0.1.0"
+license = "GPLv3"
 edition = "2021"
 
 [dependencies.codec]
modifiedpallets/nonfungible/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/benchmarking.rs
+++ b/pallets/nonfungible/src/benchmarking.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use super::*;
 use crate::{Pallet, Config, NonfungibleHandle};
 
modifiedpallets/nonfungible/src/common.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/common.rs
+++ b/pallets/nonfungible/src/common.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use core::marker::PhantomData;
 
 use frame_support::{dispatch::DispatchResultWithPostInfo, ensure, fail, weights::Weight, BoundedVec};
modifiedpallets/nonfungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use core::{
 	char::{REPLACEMENT_CHARACTER, decode_utf16},
 	convert::TryInto,
modifiedpallets/nonfungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #![cfg_attr(not(feature = "std"), no_std)]
 
 use erc::ERC721Events;
modifiedpallets/nonfungible/src/weights.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/weights.rs
+++ b/pallets/nonfungible/src/weights.rs
@@ -3,8 +3,8 @@
 //! Autogenerated weights for pallet_nonfungible
 //!
 //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
-//! DATE: 2021-10-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
-//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 128
+//! DATE: 2022-03-01, STEPS: `50`, REPEAT: 200, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
 
 // Executed Command:
 // target/release/unique-collator
@@ -18,9 +18,9 @@
 // --template
 // .maintain/frame-weight-template.hbs
 // --steps=50
-// --repeat=20
+// --repeat=200
+// --heap-pages=4096
 // --output=./pallets/nonfungible/src/weights.rs
-
 
 #![cfg_attr(rustfmt, rustfmt_skip)]
 #![allow(unused_parens)]
@@ -51,7 +51,7 @@
 	// Storage: Nonfungible TokenData (r:0 w:1)
 	// Storage: Nonfungible Owned (r:0 w:1)
 	fn create_item() -> Weight {
-		(16_902_000 as Weight)
+		(18_450_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(2 as Weight))
 			.saturating_add(T::DbWeight::get().writes(4 as Weight))
 	}
@@ -60,9 +60,9 @@
 	// Storage: Nonfungible TokenData (r:0 w:4)
 	// Storage: Nonfungible Owned (r:0 w:4)
 	fn create_multiple_items(b: u32, ) -> Weight {
-		(15_860_000 as Weight)
-			// Standard Error: 5_000
-			.saturating_add((3_916_000 as Weight).saturating_mul(b as Weight))
+		(10_228_000 as Weight)
+			// Standard Error: 1_000
+			.saturating_add((4_392_000 as Weight).saturating_mul(b as Weight))
 			.saturating_add(T::DbWeight::get().reads(2 as Weight))
 			.saturating_add(T::DbWeight::get().writes(2 as Weight))
 			.saturating_add(T::DbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))
@@ -72,9 +72,9 @@
 	// Storage: Nonfungible TokenData (r:0 w:4)
 	// Storage: Nonfungible Owned (r:0 w:4)
 	fn create_multiple_items_ex(b: u32, ) -> Weight {
-		(2_090_000 as Weight)
-			// Standard Error: 10_000
-			.saturating_add((9_230_000 as Weight).saturating_mul(b as Weight))
+		(6_543_000 as Weight)
+			// Standard Error: 2_000
+			.saturating_add((7_175_000 as Weight).saturating_mul(b as Weight))
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
@@ -82,26 +82,27 @@
 	}
 	// Storage: Nonfungible TokenData (r:1 w:1)
 	// Storage: Nonfungible TokensBurnt (r:1 w:1)
+	// Storage: Nonfungible AccountBalance (r:1 w:1)
 	// Storage: Nonfungible Allowance (r:1 w:0)
 	// Storage: Nonfungible Owned (r:0 w:1)
 	fn burn_item() -> Weight {
-		(17_966_000 as Weight)
-			.saturating_add(T::DbWeight::get().reads(3 as Weight))
-			.saturating_add(T::DbWeight::get().writes(3 as Weight))
+		(24_554_000 as Weight)
+			.saturating_add(T::DbWeight::get().reads(4 as Weight))
+			.saturating_add(T::DbWeight::get().writes(4 as Weight))
 	}
 	// Storage: Nonfungible TokenData (r:1 w:1)
 	// Storage: Nonfungible AccountBalance (r:2 w:2)
 	// Storage: Nonfungible Allowance (r:1 w:0)
 	// Storage: Nonfungible Owned (r:0 w:2)
 	fn transfer() -> Weight {
-		(23_886_000 as Weight)
+		(28_339_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(4 as Weight))
 			.saturating_add(T::DbWeight::get().writes(5 as Weight))
 	}
 	// Storage: Nonfungible TokenData (r:1 w:0)
 	// Storage: Nonfungible Allowance (r:1 w:1)
 	fn approve() -> Weight {
-		(14_697_000 as Weight)
+		(17_616_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(2 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
@@ -110,22 +111,23 @@
 	// Storage: Nonfungible AccountBalance (r:2 w:2)
 	// Storage: Nonfungible Owned (r:0 w:2)
 	fn transfer_from() -> Weight {
-		(28_001_000 as Weight)
+		(32_196_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(4 as Weight))
 			.saturating_add(T::DbWeight::get().writes(6 as Weight))
 	}
 	// Storage: Nonfungible Allowance (r:1 w:1)
 	// Storage: Nonfungible TokenData (r:1 w:1)
 	// Storage: Nonfungible TokensBurnt (r:1 w:1)
+	// Storage: Nonfungible AccountBalance (r:1 w:1)
 	// Storage: Nonfungible Owned (r:0 w:1)
 	fn burn_from() -> Weight {
-		(53_429_000 as Weight)
-			.saturating_add(T::DbWeight::get().reads(3 as Weight))
-			.saturating_add(T::DbWeight::get().writes(4 as Weight))
+		(27_580_000 as Weight)
+			.saturating_add(T::DbWeight::get().reads(4 as Weight))
+			.saturating_add(T::DbWeight::get().writes(5 as Weight))
 	}
 	// Storage: Nonfungible TokenData (r:1 w:1)
 	fn set_variable_metadata(_b: u32, ) -> Weight {
-		(6_380_000 as Weight)
+		(7_700_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
@@ -138,7 +140,7 @@
 	// Storage: Nonfungible TokenData (r:0 w:1)
 	// Storage: Nonfungible Owned (r:0 w:1)
 	fn create_item() -> Weight {
-		(16_902_000 as Weight)
+		(18_450_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(2 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(4 as Weight))
 	}
@@ -147,9 +149,9 @@
 	// Storage: Nonfungible TokenData (r:0 w:4)
 	// Storage: Nonfungible Owned (r:0 w:4)
 	fn create_multiple_items(b: u32, ) -> Weight {
-		(15_860_000 as Weight)
-			// Standard Error: 5_000
-			.saturating_add((3_916_000 as Weight).saturating_mul(b as Weight))
+		(10_228_000 as Weight)
+			// Standard Error: 1_000
+			.saturating_add((4_392_000 as Weight).saturating_mul(b as Weight))
 			.saturating_add(RocksDbWeight::get().reads(2 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(2 as Weight))
 			.saturating_add(RocksDbWeight::get().writes((2 as Weight).saturating_mul(b as Weight)))
@@ -159,9 +161,9 @@
 	// Storage: Nonfungible TokenData (r:0 w:4)
 	// Storage: Nonfungible Owned (r:0 w:4)
 	fn create_multiple_items_ex(b: u32, ) -> Weight {
-		(2_090_000 as Weight)
-			// Standard Error: 10_000
-			.saturating_add((9_230_000 as Weight).saturating_mul(b as Weight))
+		(6_543_000 as Weight)
+			// Standard Error: 2_000
+			.saturating_add((7_175_000 as Weight).saturating_mul(b as Weight))
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
@@ -169,26 +171,27 @@
 	}
 	// Storage: Nonfungible TokenData (r:1 w:1)
 	// Storage: Nonfungible TokensBurnt (r:1 w:1)
+	// Storage: Nonfungible AccountBalance (r:1 w:1)
 	// Storage: Nonfungible Allowance (r:1 w:0)
 	// Storage: Nonfungible Owned (r:0 w:1)
 	fn burn_item() -> Weight {
-		(17_966_000 as Weight)
-			.saturating_add(RocksDbWeight::get().reads(3 as Weight))
-			.saturating_add(RocksDbWeight::get().writes(3 as Weight))
+		(24_554_000 as Weight)
+			.saturating_add(RocksDbWeight::get().reads(4 as Weight))
+			.saturating_add(RocksDbWeight::get().writes(4 as Weight))
 	}
 	// Storage: Nonfungible TokenData (r:1 w:1)
 	// Storage: Nonfungible AccountBalance (r:2 w:2)
 	// Storage: Nonfungible Allowance (r:1 w:0)
 	// Storage: Nonfungible Owned (r:0 w:2)
 	fn transfer() -> Weight {
-		(23_886_000 as Weight)
+		(28_339_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(4 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(5 as Weight))
 	}
 	// Storage: Nonfungible TokenData (r:1 w:0)
 	// Storage: Nonfungible Allowance (r:1 w:1)
 	fn approve() -> Weight {
-		(14_697_000 as Weight)
+		(17_616_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(2 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
@@ -197,22 +200,23 @@
 	// Storage: Nonfungible AccountBalance (r:2 w:2)
 	// Storage: Nonfungible Owned (r:0 w:2)
 	fn transfer_from() -> Weight {
-		(28_001_000 as Weight)
+		(32_196_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(4 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(6 as Weight))
 	}
 	// Storage: Nonfungible Allowance (r:1 w:1)
 	// Storage: Nonfungible TokenData (r:1 w:1)
 	// Storage: Nonfungible TokensBurnt (r:1 w:1)
+	// Storage: Nonfungible AccountBalance (r:1 w:1)
 	// Storage: Nonfungible Owned (r:0 w:1)
 	fn burn_from() -> Weight {
-		(53_429_000 as Weight)
-			.saturating_add(RocksDbWeight::get().reads(3 as Weight))
-			.saturating_add(RocksDbWeight::get().writes(4 as Weight))
+		(27_580_000 as Weight)
+			.saturating_add(RocksDbWeight::get().reads(4 as Weight))
+			.saturating_add(RocksDbWeight::get().writes(5 as Weight))
 	}
 	// Storage: Nonfungible TokenData (r:1 w:1)
 	fn set_variable_metadata(_b: u32, ) -> Weight {
-		(6_380_000 as Weight)
+		(7_700_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
modifiedpallets/refungible/Cargo.tomldiffbeforeafterboth
--- a/pallets/refungible/Cargo.toml
+++ b/pallets/refungible/Cargo.toml
@@ -1,6 +1,7 @@
 [package]
 name = "pallet-refungible"
 version = "0.1.0"
+license = "GPLv3"
 edition = "2021"
 
 [dependencies.codec]
modifiedpallets/refungible/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/refungible/src/benchmarking.rs
+++ b/pallets/refungible/src/benchmarking.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use super::*;
 use crate::{Pallet, Config, RefungibleHandle};
 
modifiedpallets/refungible/src/common.rsdiffbeforeafterboth
--- a/pallets/refungible/src/common.rs
+++ b/pallets/refungible/src/common.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use core::marker::PhantomData;
 
 use sp_std::collections::btree_map::BTreeMap;
modifiedpallets/refungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/refungible/src/erc.rs
+++ b/pallets/refungible/src/erc.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use up_data_structs::TokenId;
 use pallet_common::erc::CommonEvmHandler;
 
modifiedpallets/refungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/refungible/src/lib.rs
+++ b/pallets/refungible/src/lib.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #![cfg_attr(not(feature = "std"), no_std)]
 
 use frame_support::{ensure, BoundedVec};
modifiedpallets/refungible/src/weights.rsdiffbeforeafterboth
--- a/pallets/refungible/src/weights.rs
+++ b/pallets/refungible/src/weights.rs
@@ -3,8 +3,8 @@
 //! Autogenerated weights for pallet_refungible
 //!
 //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
-//! DATE: 2021-10-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
-//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 128
+//! DATE: 2022-03-01, STEPS: `50`, REPEAT: 200, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
 
 // Executed Command:
 // target/release/unique-collator
@@ -18,10 +18,10 @@
 // --template
 // .maintain/frame-weight-template.hbs
 // --steps=50
-// --repeat=20
+// --repeat=200
+// --heap-pages=4096
 // --output=./pallets/refungible/src/weights.rs
 
-
 #![cfg_attr(rustfmt, rustfmt_skip)]
 #![allow(unused_parens)]
 #![allow(unused_imports)]
@@ -61,7 +61,7 @@
 	// Storage: Refungible TokenData (r:0 w:1)
 	// Storage: Refungible Owned (r:0 w:1)
 	fn create_item() -> Weight {
-		(18_681_000 as Weight)
+		(21_255_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(2 as Weight))
 			.saturating_add(T::DbWeight::get().writes(6 as Weight))
 	}
@@ -72,9 +72,9 @@
 	// Storage: Refungible TokenData (r:0 w:4)
 	// Storage: Refungible Owned (r:0 w:4)
 	fn create_multiple_items(b: u32, ) -> Weight {
-		(13_869_000 as Weight)
-			// Standard Error: 28_000
-			.saturating_add((5_611_000 as Weight).saturating_mul(b as Weight))
+		(18_052_000 as Weight)
+			// Standard Error: 1_000
+			.saturating_add((5_549_000 as Weight).saturating_mul(b as Weight))
 			.saturating_add(T::DbWeight::get().reads(2 as Weight))
 			.saturating_add(T::DbWeight::get().writes(2 as Weight))
 			.saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))
@@ -86,9 +86,9 @@
 	// Storage: Refungible TokenData (r:0 w:4)
 	// Storage: Refungible Owned (r:0 w:4)
 	fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {
-		(11_953_000 as Weight)
-			// Standard Error: 27_000
-			.saturating_add((10_775_000 as Weight).saturating_mul(b as Weight))
+		(15_766_000 as Weight)
+			// Standard Error: 2_000
+			.saturating_add((8_187_000 as Weight).saturating_mul(b as Weight))
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
@@ -101,9 +101,9 @@
 	// Storage: Refungible Balance (r:0 w:4)
 	// Storage: Refungible Owned (r:0 w:4)
 	fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {
-		(0 as Weight)
-			// Standard Error: 13_000
-			.saturating_add((8_528_000 as Weight).saturating_mul(b as Weight))
+		(5_675_000 as Weight)
+			// Standard Error: 2_000
+			.saturating_add((6_315_000 as Weight).saturating_mul(b as Weight))
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))
 			.saturating_add(T::DbWeight::get().writes(3 as Weight))
@@ -114,7 +114,7 @@
 	// Storage: Refungible AccountBalance (r:1 w:1)
 	// Storage: Refungible Owned (r:0 w:1)
 	fn burn_item_partial() -> Weight {
-		(21_591_000 as Weight)
+		(23_518_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(3 as Weight))
 			.saturating_add(T::DbWeight::get().writes(4 as Weight))
 	}
@@ -125,13 +125,13 @@
 	// Storage: Refungible TokenData (r:0 w:1)
 	// Storage: Refungible Owned (r:0 w:1)
 	fn burn_item_fully() -> Weight {
-		(29_257_000 as Weight)
+		(32_489_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(4 as Weight))
 			.saturating_add(T::DbWeight::get().writes(6 as Weight))
 	}
 	// Storage: Refungible Balance (r:2 w:2)
 	fn transfer_normal() -> Weight {
-		(17_733_000 as Weight)
+		(19_766_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(2 as Weight))
 			.saturating_add(T::DbWeight::get().writes(2 as Weight))
 	}
@@ -139,7 +139,7 @@
 	// Storage: Refungible AccountBalance (r:1 w:1)
 	// Storage: Refungible Owned (r:0 w:1)
 	fn transfer_creating() -> Weight {
-		(20_943_000 as Weight)
+		(23_360_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(3 as Weight))
 			.saturating_add(T::DbWeight::get().writes(4 as Weight))
 	}
@@ -147,7 +147,7 @@
 	// Storage: Refungible AccountBalance (r:1 w:1)
 	// Storage: Refungible Owned (r:0 w:1)
 	fn transfer_removing() -> Weight {
-		(22_406_000 as Weight)
+		(25_344_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(3 as Weight))
 			.saturating_add(T::DbWeight::get().writes(4 as Weight))
 	}
@@ -155,21 +155,21 @@
 	// Storage: Refungible AccountBalance (r:2 w:2)
 	// Storage: Refungible Owned (r:0 w:2)
 	fn transfer_creating_removing() -> Weight {
-		(24_762_000 as Weight)
+		(28_553_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(4 as Weight))
 			.saturating_add(T::DbWeight::get().writes(6 as Weight))
 	}
 	// Storage: Refungible Balance (r:1 w:0)
 	// Storage: Refungible Allowance (r:0 w:1)
 	fn approve() -> Weight {
-		(14_109_000 as Weight)
+		(15_356_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Refungible Allowance (r:1 w:1)
 	// Storage: Refungible Balance (r:2 w:2)
 	fn transfer_from_normal() -> Weight {
-		(25_348_000 as Weight)
+		(28_832_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(3 as Weight))
 			.saturating_add(T::DbWeight::get().writes(3 as Weight))
 	}
@@ -178,7 +178,7 @@
 	// Storage: Refungible AccountBalance (r:1 w:1)
 	// Storage: Refungible Owned (r:0 w:1)
 	fn transfer_from_creating() -> Weight {
-		(28_647_000 as Weight)
+		(32_132_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(4 as Weight))
 			.saturating_add(T::DbWeight::get().writes(5 as Weight))
 	}
@@ -187,7 +187,7 @@
 	// Storage: Refungible AccountBalance (r:1 w:1)
 	// Storage: Refungible Owned (r:0 w:1)
 	fn transfer_from_removing() -> Weight {
-		(30_472_000 as Weight)
+		(33_237_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(4 as Weight))
 			.saturating_add(T::DbWeight::get().writes(5 as Weight))
 	}
@@ -196,7 +196,7 @@
 	// Storage: Refungible AccountBalance (r:2 w:2)
 	// Storage: Refungible Owned (r:0 w:2)
 	fn transfer_from_creating_removing() -> Weight {
-		(32_362_000 as Weight)
+		(36_399_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(5 as Weight))
 			.saturating_add(T::DbWeight::get().writes(7 as Weight))
 	}
@@ -208,13 +208,13 @@
 	// Storage: Refungible TokenData (r:0 w:1)
 	// Storage: Refungible Owned (r:0 w:1)
 	fn burn_from() -> Weight {
-		(60_903_000 as Weight)
+		(42_043_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(5 as Weight))
 			.saturating_add(T::DbWeight::get().writes(7 as Weight))
 	}
 	// Storage: Refungible TokenData (r:1 w:1)
 	fn set_variable_metadata(_b: u32, ) -> Weight {
-		(6_801_000 as Weight)
+		(7_364_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
@@ -229,7 +229,7 @@
 	// Storage: Refungible TokenData (r:0 w:1)
 	// Storage: Refungible Owned (r:0 w:1)
 	fn create_item() -> Weight {
-		(18_681_000 as Weight)
+		(21_255_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(2 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(6 as Weight))
 	}
@@ -240,9 +240,9 @@
 	// Storage: Refungible TokenData (r:0 w:4)
 	// Storage: Refungible Owned (r:0 w:4)
 	fn create_multiple_items(b: u32, ) -> Weight {
-		(13_869_000 as Weight)
-			// Standard Error: 28_000
-			.saturating_add((5_611_000 as Weight).saturating_mul(b as Weight))
+		(18_052_000 as Weight)
+			// Standard Error: 1_000
+			.saturating_add((5_549_000 as Weight).saturating_mul(b as Weight))
 			.saturating_add(RocksDbWeight::get().reads(2 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(2 as Weight))
 			.saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))
@@ -254,9 +254,9 @@
 	// Storage: Refungible TokenData (r:0 w:4)
 	// Storage: Refungible Owned (r:0 w:4)
 	fn create_multiple_items_ex_multiple_items(b: u32, ) -> Weight {
-		(11_953_000 as Weight)
-			// Standard Error: 27_000
-			.saturating_add((10_775_000 as Weight).saturating_mul(b as Weight))
+		(15_766_000 as Weight)
+			// Standard Error: 2_000
+			.saturating_add((8_187_000 as Weight).saturating_mul(b as Weight))
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
@@ -269,9 +269,9 @@
 	// Storage: Refungible Balance (r:0 w:4)
 	// Storage: Refungible Owned (r:0 w:4)
 	fn create_multiple_items_ex_multiple_owners(b: u32, ) -> Weight {
-		(0 as Weight)
-			// Standard Error: 13_000
-			.saturating_add((8_528_000 as Weight).saturating_mul(b as Weight))
+		(5_675_000 as Weight)
+			// Standard Error: 2_000
+			.saturating_add((6_315_000 as Weight).saturating_mul(b as Weight))
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))
 			.saturating_add(RocksDbWeight::get().writes(3 as Weight))
@@ -282,7 +282,7 @@
 	// Storage: Refungible AccountBalance (r:1 w:1)
 	// Storage: Refungible Owned (r:0 w:1)
 	fn burn_item_partial() -> Weight {
-		(21_591_000 as Weight)
+		(23_518_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(3 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(4 as Weight))
 	}
@@ -293,13 +293,13 @@
 	// Storage: Refungible TokenData (r:0 w:1)
 	// Storage: Refungible Owned (r:0 w:1)
 	fn burn_item_fully() -> Weight {
-		(29_257_000 as Weight)
+		(32_489_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(4 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(6 as Weight))
 	}
 	// Storage: Refungible Balance (r:2 w:2)
 	fn transfer_normal() -> Weight {
-		(17_733_000 as Weight)
+		(19_766_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(2 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(2 as Weight))
 	}
@@ -307,7 +307,7 @@
 	// Storage: Refungible AccountBalance (r:1 w:1)
 	// Storage: Refungible Owned (r:0 w:1)
 	fn transfer_creating() -> Weight {
-		(20_943_000 as Weight)
+		(23_360_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(3 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(4 as Weight))
 	}
@@ -315,7 +315,7 @@
 	// Storage: Refungible AccountBalance (r:1 w:1)
 	// Storage: Refungible Owned (r:0 w:1)
 	fn transfer_removing() -> Weight {
-		(22_406_000 as Weight)
+		(25_344_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(3 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(4 as Weight))
 	}
@@ -323,21 +323,21 @@
 	// Storage: Refungible AccountBalance (r:2 w:2)
 	// Storage: Refungible Owned (r:0 w:2)
 	fn transfer_creating_removing() -> Weight {
-		(24_762_000 as Weight)
+		(28_553_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(4 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(6 as Weight))
 	}
 	// Storage: Refungible Balance (r:1 w:0)
 	// Storage: Refungible Allowance (r:0 w:1)
 	fn approve() -> Weight {
-		(14_109_000 as Weight)
+		(15_356_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Refungible Allowance (r:1 w:1)
 	// Storage: Refungible Balance (r:2 w:2)
 	fn transfer_from_normal() -> Weight {
-		(25_348_000 as Weight)
+		(28_832_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(3 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(3 as Weight))
 	}
@@ -346,7 +346,7 @@
 	// Storage: Refungible AccountBalance (r:1 w:1)
 	// Storage: Refungible Owned (r:0 w:1)
 	fn transfer_from_creating() -> Weight {
-		(28_647_000 as Weight)
+		(32_132_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(4 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(5 as Weight))
 	}
@@ -355,7 +355,7 @@
 	// Storage: Refungible AccountBalance (r:1 w:1)
 	// Storage: Refungible Owned (r:0 w:1)
 	fn transfer_from_removing() -> Weight {
-		(30_472_000 as Weight)
+		(33_237_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(4 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(5 as Weight))
 	}
@@ -364,7 +364,7 @@
 	// Storage: Refungible AccountBalance (r:2 w:2)
 	// Storage: Refungible Owned (r:0 w:2)
 	fn transfer_from_creating_removing() -> Weight {
-		(32_362_000 as Weight)
+		(36_399_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(5 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(7 as Weight))
 	}
@@ -376,13 +376,13 @@
 	// Storage: Refungible TokenData (r:0 w:1)
 	// Storage: Refungible Owned (r:0 w:1)
 	fn burn_from() -> Weight {
-		(60_903_000 as Weight)
+		(42_043_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(5 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(7 as Weight))
 	}
 	// Storage: Refungible TokenData (r:1 w:1)
 	fn set_variable_metadata(_b: u32, ) -> Weight {
-		(6_801_000 as Weight)
+		(7_364_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
modifiedpallets/scheduler/Cargo.tomldiffbeforeafterboth
--- a/pallets/scheduler/Cargo.toml
+++ b/pallets/scheduler/Cargo.toml
@@ -3,7 +3,7 @@
 version = "0.1.0"
 authors = ["Unique Network <support@uniquenetwork.io>"]
 edition = "2021"
-license = "All Rights Reserved"
+license = "GPLv3"
 homepage = "https://unique.network"
 repository = "https://github.com/UniqueNetwork/unique-chain"
 description = "Unique Scheduler pallet"
modifiedpallets/scheduler/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/scheduler/src/benchmarking.rs
+++ b/pallets/scheduler/src/benchmarking.rs
@@ -1,3 +1,20 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
+// Original license
 // This file is part of Substrate.
 
 // Copyright (C) 2020-2021 Parity Technologies (UK) Ltd.
modifiedpallets/scheduler/src/lib.rsdiffbeforeafterboth
--- a/pallets/scheduler/src/lib.rs
+++ b/pallets/scheduler/src/lib.rs
@@ -1,3 +1,20 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
+// Original license
 // This file is part of Substrate.
 
 // Copyright (C) 2017-2021 Parity Technologies (UK) Ltd.
modifiedpallets/scheduler/src/weights.rsdiffbeforeafterboth
--- a/pallets/scheduler/src/weights.rs
+++ b/pallets/scheduler/src/weights.rs
@@ -1,3 +1,20 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
+// Original license
 // This file is part of Substrate.
 
 // Copyright (C) 2020-2021 Parity Technologies (UK) Ltd.
modifiedpallets/unique/Cargo.tomldiffbeforeafterboth
--- a/pallets/unique/Cargo.toml
+++ b/pallets/unique/Cargo.toml
@@ -6,7 +6,7 @@
 description = 'Unique Pallet'
 edition = '2018'
 homepage = 'https://unique.network'
-license = 'All Rights Reserved'
+license = 'GPLv3'
 name = 'pallet-unique'
 repository = 'https://github.com/UniqueNetwork/unique-chain'
 version = '0.1.0'
modifiedpallets/unique/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/unique/src/benchmarking.rs
+++ b/pallets/unique/src/benchmarking.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #![cfg(feature = "runtime-benchmarks")]
 
 use super::*;
modifiedpallets/unique/src/common.rsdiffbeforeafterboth
--- a/pallets/unique/src/common.rs
+++ b/pallets/unique/src/common.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use core::marker::PhantomData;
 use frame_support::{weights::Weight};
 use pallet_common::{CommonWeightInfo};
modifiedpallets/unique/src/dispatch.rsdiffbeforeafterboth
--- a/pallets/unique/src/dispatch.rs
+++ b/pallets/unique/src/dispatch.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use frame_support::{
 	dispatch::{DispatchErrorWithPostInfo, DispatchResultWithPostInfo},
 	traits::Get,
modifiedpallets/unique/src/eth/mod.rsdiffbeforeafterboth
--- a/pallets/unique/src/eth/mod.rs
+++ b/pallets/unique/src/eth/mod.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 pub mod sponsoring;
 
 use fp_evm::PrecompileResult;
modifiedpallets/unique/src/eth/sponsoring.rsdiffbeforeafterboth
--- a/pallets/unique/src/eth/sponsoring.rs
+++ b/pallets/unique/src/eth/sponsoring.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 //! Implements EVM sponsoring logic via OnChargeEVMTransaction
 
 use crate::{Config, sponsorship::*};
modifiedpallets/unique/src/lib.rsdiffbeforeafterboth
--- a/pallets/unique/src/lib.rs
+++ b/pallets/unique/src/lib.rs
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 #![recursion_limit = "1024"]
 #![cfg_attr(not(feature = "std"), no_std)]
modifiedpallets/unique/src/mock.rsdiffbeforeafterboth
--- a/pallets/unique/src/mock.rs
+++ b/pallets/unique/src/mock.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #![allow(clippy::from_over_into)]
 
 use crate as pallet_template;
modifiedpallets/unique/src/sponsorship.rsdiffbeforeafterboth
--- a/pallets/unique/src/sponsorship.rs
+++ b/pallets/unique/src/sponsorship.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use crate::{
 	Config, Call, CreateItemBasket, VariableMetaDataBasket, ReFungibleTransferBasket,
 	FungibleTransferBasket, NftTransferBasket, CreateItemData, CollectionMode, NftApproveBasket,
modifiedpallets/unique/src/tests.rsdiffbeforeafterboth
before · pallets/unique/src/tests.rs
1// Tests to be written here2use super::*;3use crate::mock::*;4use crate::{AccessMode, CollectionMode};5use up_data_structs::{6	COLLECTION_NUMBER_LIMIT, CollectionId, CreateItemData, CreateFungibleData, CreateNftData,7	CreateReFungibleData, MAX_DECIMAL_POINTS, COLLECTION_ADMINS_LIMIT, MetaUpdatePermission,8	TokenId, MAX_TOKEN_OWNERSHIP,9};10use frame_support::{assert_noop, assert_ok, assert_err};11use sp_std::convert::TryInto;12use pallet_balances;1314fn add_balance(user: u64, value: u64) {15	const DONOR_USER: u64 = 999;16	assert_ok!(<pallet_balances::Pallet<Test>>::set_balance(17		Origin::root(),18		DONOR_USER,19		value,20		021	));22	assert_ok!(<pallet_balances::Pallet<Test>>::force_transfer(23		Origin::root(),24		DONOR_USER,25		user,26		value27	));28}2930fn default_nft_data() -> CreateNftData {31	CreateNftData {32		const_data: vec![1, 2, 3].try_into().unwrap(),33		variable_data: vec![3, 2, 1].try_into().unwrap(),34	}35}3637fn default_fungible_data() -> CreateFungibleData {38	CreateFungibleData { value: 5 }39}4041fn default_re_fungible_data() -> CreateReFungibleData {42	CreateReFungibleData {43		const_data: vec![1, 2, 3].try_into().unwrap(),44		variable_data: vec![3, 2, 1].try_into().unwrap(),45		pieces: 1023,46	}47}4849fn create_test_collection_for_owner(50	mode: &CollectionMode,51	owner: u64,52	id: CollectionId,53) -> CollectionId {54	add_balance(owner, CollectionCreationPrice::get() as u64 + 1);5556	let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();57	let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();58	let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();5960	let data: CreateCollectionData<u64> = CreateCollectionData {61		name: col_name1.try_into().unwrap(),62		description: col_desc1.try_into().unwrap(),63		token_prefix: token_prefix1.try_into().unwrap(),64		mode: mode.clone(),65		..Default::default()66	};6768	let origin1 = Origin::signed(owner);69	assert_ok!(TemplateModule::create_collection_ex(origin1, data));7071	let saved_col_name: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();72	let saved_description: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();73	let saved_prefix: Vec<u8> = b"token_prefix1\0".to_vec();74	assert_eq!(75		<pallet_common::CollectionById<Test>>::get(id)76			.unwrap()77			.owner,78		owner79	);80	assert_eq!(81		<pallet_common::CollectionById<Test>>::get(id).unwrap().name,82		saved_col_name83	);84	assert_eq!(85		<pallet_common::CollectionById<Test>>::get(id).unwrap().mode,86		*mode87	);88	assert_eq!(89		<pallet_common::CollectionById<Test>>::get(id)90			.unwrap()91			.description,92		saved_description93	);94	assert_eq!(95		<pallet_common::CollectionById<Test>>::get(id)96			.unwrap()97			.token_prefix,98		saved_prefix99	);100	id101}102103fn create_test_collection(mode: &CollectionMode, id: CollectionId) -> CollectionId {104	create_test_collection_for_owner(&mode, 1, id)105}106107fn create_test_item(collection_id: CollectionId, data: &CreateItemData) {108	let origin1 = Origin::signed(1);109	assert_ok!(TemplateModule::create_item(110		origin1,111		collection_id,112		account(1),113		data.clone()114	));115}116117fn account(sub: u64) -> TestCrossAccountId {118	TestCrossAccountId::from_sub(sub)119}120121// Use cases tests region122// #region123124#[test]125fn set_version_schema() {126	new_test_ext().execute_with(|| {127		let origin1 = Origin::signed(1);128		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));129130		assert_ok!(TemplateModule::set_schema_version(131			origin1,132			collection_id,133			SchemaVersion::Unique134		));135		assert_eq!(136			<pallet_common::CollectionById<Test>>::get(collection_id)137				.unwrap()138				.schema_version,139			SchemaVersion::Unique140		);141	});142}143144#[test]145fn check_not_sufficient_founds() {146	new_test_ext().execute_with(|| {147		let acc: u64 = 1;148		<pallet_balances::Pallet<Test>>::set_balance(Origin::root(), acc, 0, 0).unwrap();149150		let name: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();151		let description: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();152		let token_prefix: Vec<u8> = b"token_prefix1\0".to_vec();153154		let data: CreateCollectionData<<Test as system::Config>::AccountId> =155			CreateCollectionData {156				name: name.try_into().unwrap(),157				description: description.try_into().unwrap(),158				token_prefix: token_prefix.try_into().unwrap(),159				mode: CollectionMode::NFT,160				..Default::default()161			};162163		let result = TemplateModule::create_collection_ex(Origin::signed(acc), data);164		assert_err!(result, <CommonError<Test>>::NotSufficientFounds);165	});166}167168#[test]169fn create_fungible_collection_fails_with_large_decimal_numbers() {170	new_test_ext().execute_with(|| {171		let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();172		let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();173		let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();174175		let data: CreateCollectionData<u64> = CreateCollectionData {176			name: col_name1.try_into().unwrap(),177			description: col_desc1.try_into().unwrap(),178			token_prefix: token_prefix1.try_into().unwrap(),179			mode: CollectionMode::Fungible(MAX_DECIMAL_POINTS + 1),180			..Default::default()181		};182183		let origin1 = Origin::signed(1);184		assert_noop!(185			TemplateModule::create_collection_ex(origin1, data),186			Error::<Test>::CollectionDecimalPointLimitExceeded187		);188	});189}190191#[test]192fn create_nft_item() {193	new_test_ext().execute_with(|| {194		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));195196		let data = default_nft_data();197		create_test_item(collection_id, &data.clone().into());198199		let item = <pallet_nonfungible::TokenData<Test>>::get((collection_id, 1)).unwrap();200		assert_eq!(item.const_data, data.const_data.into_inner());201		assert_eq!(item.variable_data, data.variable_data.into_inner());202	});203}204205// Use cases tests region206// #region207#[test]208fn create_nft_multiple_items() {209	new_test_ext().execute_with(|| {210		create_test_collection(&CollectionMode::NFT, CollectionId(1));211212		let origin1 = Origin::signed(1);213214		let items_data = vec![default_nft_data(), default_nft_data(), default_nft_data()];215216		assert_ok!(TemplateModule::create_multiple_items(217			origin1,218			CollectionId(1),219			account(1),220			items_data221				.clone()222				.into_iter()223				.map(|d| { d.into() })224				.collect()225		));226		for (index, data) in items_data.into_iter().enumerate() {227			let item = <pallet_nonfungible::TokenData<Test>>::get((228				CollectionId(1),229				TokenId((index + 1) as u32),230			))231			.unwrap();232			assert_eq!(item.const_data.to_vec(), data.const_data.into_inner());233			assert_eq!(item.variable_data.to_vec(), data.variable_data.into_inner());234		}235	});236}237238#[test]239fn create_refungible_item() {240	new_test_ext().execute_with(|| {241		let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));242243		let data = default_re_fungible_data();244		create_test_item(collection_id, &data.clone().into());245		let item = <pallet_refungible::TokenData<Test>>::get((collection_id, TokenId(1)));246		let balance =247			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1)));248		assert_eq!(item.const_data, data.const_data.into_inner());249		assert_eq!(item.variable_data, data.variable_data.into_inner());250		assert_eq!(balance, 1023);251	});252}253254#[test]255fn create_multiple_refungible_items() {256	new_test_ext().execute_with(|| {257		create_test_collection(&CollectionMode::ReFungible, CollectionId(1));258259		let origin1 = Origin::signed(1);260261		let items_data = vec![262			default_re_fungible_data(),263			default_re_fungible_data(),264			default_re_fungible_data(),265		];266267		assert_ok!(TemplateModule::create_multiple_items(268			origin1,269			CollectionId(1),270			account(1),271			items_data272				.clone()273				.into_iter()274				.map(|d| { d.into() })275				.collect()276		));277		for (index, data) in items_data.into_iter().enumerate() {278			let item = <pallet_refungible::TokenData<Test>>::get((279				CollectionId(1),280				TokenId((index + 1) as u32),281			));282			let balance =283				<pallet_refungible::Balance<Test>>::get((CollectionId(1), TokenId(1), account(1)));284			assert_eq!(item.const_data.to_vec(), data.const_data.into_inner());285			assert_eq!(item.variable_data.to_vec(), data.variable_data.into_inner());286			assert_eq!(balance, 1023);287		}288	});289}290291#[test]292fn create_fungible_item() {293	new_test_ext().execute_with(|| {294		let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));295296		let data = default_fungible_data();297		create_test_item(collection_id, &data.into());298299		assert_eq!(300			<pallet_fungible::Balance<Test>>::get((collection_id, account(1))),301			5302		);303	});304}305306//#[test]307// fn create_multiple_fungible_items() {308//     new_test_ext().execute_with(|| {309//         default_limits();310311//         create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));312313//         let origin1 = Origin::signed(1);314315//         let items_data = vec![default_fungible_data(), default_fungible_data(), default_fungible_data()];316317//         assert_ok!(TemplateModule::create_multiple_items(318//             origin1.clone(),319//             1,320//             1,321//             items_data.clone().into_iter().map(|d| { d.into() }).collect()322//         ));323324//         for (index, _) in items_data.iter().enumerate() {325//             assert_eq!(TemplateModule::fungible_item_id(1, (index + 1) as TokenId).value, 5);326//         }327//         assert_eq!(TemplateModule::balance_count(1, 1), 3000);328//         assert_eq!(TemplateModule::address_tokens(1, 1), [1, 2, 3]);329//     });330// }331332#[test]333fn transfer_fungible_item() {334	new_test_ext().execute_with(|| {335		let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));336337		let origin1 = Origin::signed(1);338		let origin2 = Origin::signed(2);339340		let data = default_fungible_data();341		create_test_item(collection_id, &data.into());342343		assert_eq!(344			<pallet_fungible::Balance<Test>>::get((CollectionId(1), account(1))),345			5346		);347348		// change owner scenario349		assert_ok!(TemplateModule::transfer(350			origin1,351			account(2),352			CollectionId(1),353			TokenId(0),354			5355		));356		assert_eq!(357			<pallet_fungible::Balance<Test>>::get((CollectionId(1), account(1))),358			0359		);360361		// split item scenario362		assert_ok!(TemplateModule::transfer(363			origin2.clone(),364			account(3),365			CollectionId(1),366			TokenId(0),367			3368		));369370		// split item and new owner has account scenario371		assert_ok!(TemplateModule::transfer(372			origin2,373			account(3),374			CollectionId(1),375			TokenId(0),376			1377		));378		assert_eq!(379			<pallet_fungible::Balance<Test>>::get((CollectionId(1), account(2))),380			1381		);382		assert_eq!(383			<pallet_fungible::Balance<Test>>::get((CollectionId(1), account(3))),384			4385		);386	});387}388389#[test]390fn transfer_refungible_item() {391	new_test_ext().execute_with(|| {392		let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));393394		// Create RFT 1 in 1023 pieces for account 1395		let data = default_re_fungible_data();396		create_test_item(collection_id, &data.clone().into());397		let item = <pallet_refungible::TokenData<Test>>::get((collection_id, TokenId(1)));398		assert_eq!(item.const_data, data.const_data.into_inner());399		assert_eq!(item.variable_data, data.variable_data.into_inner());400		assert_eq!(401			<pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),402			1403		);404		assert_eq!(405			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),406			1023407		);408		assert_eq!(409			<pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),410			true411		);412413		// Account 1 transfers all 1023 pieces of RFT 1 to account 2414		let origin1 = Origin::signed(1);415		let origin2 = Origin::signed(2);416		assert_ok!(TemplateModule::transfer(417			origin1,418			account(2),419			CollectionId(1),420			TokenId(1),421			1023422		));423		assert_eq!(424			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(2))),425			1023426		);427		assert_eq!(428			<pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),429			0430		);431		assert_eq!(432			<pallet_refungible::AccountBalance<Test>>::get((collection_id, account(2))),433			1434		);435		assert_eq!(436			<pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),437			false438		);439		assert_eq!(440			<pallet_refungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),441			true442		);443444		// Account 2 transfers 500 pieces of RFT 1 to account 3445		assert_ok!(TemplateModule::transfer(446			origin2.clone(),447			account(3),448			CollectionId(1),449			TokenId(1),450			500451		));452		assert_eq!(453			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(2))),454			523455		);456		assert_eq!(457			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(3))),458			500459		);460		assert_eq!(461			<pallet_refungible::AccountBalance<Test>>::get((collection_id, account(2))),462			1463		);464		assert_eq!(465			<pallet_refungible::AccountBalance<Test>>::get((collection_id, account(3))),466			1467		);468		assert_eq!(469			<pallet_refungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),470			true471		);472		assert_eq!(473			<pallet_refungible::Owned<Test>>::get((collection_id, account(3), TokenId(1))),474			true475		);476477		// Account 2 transfers 200 more pieces of RFT 1 to account 3 with pre-existing balance478		assert_ok!(TemplateModule::transfer(479			origin2,480			account(3),481			CollectionId(1),482			TokenId(1),483			200484		));485		assert_eq!(486			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(2))),487			323488		);489		assert_eq!(490			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(3))),491			700492		);493		assert_eq!(494			<pallet_refungible::AccountBalance<Test>>::get((collection_id, account(2))),495			1496		);497		assert_eq!(498			<pallet_refungible::AccountBalance<Test>>::get((collection_id, account(3))),499			1500		);501		assert_eq!(502			<pallet_refungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),503			true504		);505		assert_eq!(506			<pallet_refungible::Owned<Test>>::get((collection_id, account(3), TokenId(1))),507			true508		);509	});510}511512#[test]513fn transfer_nft_item() {514	new_test_ext().execute_with(|| {515		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));516517		let data = default_nft_data();518		create_test_item(collection_id, &data.into());519		assert_eq!(520			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),521			1522		);523		assert_eq!(524			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),525			true526		);527528		let origin1 = Origin::signed(1);529		// default scenario530		assert_ok!(TemplateModule::transfer(531			origin1,532			account(2),533			CollectionId(1),534			TokenId(1),535			1536		));537		assert_eq!(538			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),539			0540		);541		assert_eq!(542			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(2))),543			1544		);545		assert_eq!(546			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),547			false548		);549		assert_eq!(550			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),551			true552		);553	});554}555556#[test]557fn transfer_nft_item_wrong_value() {558	new_test_ext().execute_with(|| {559		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));560561		let data = default_nft_data();562		create_test_item(collection_id, &data.into());563		assert_eq!(564			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),565			1566		);567		assert_eq!(568			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),569			true570		);571572		let origin1 = Origin::signed(1);573574		assert_noop!(575			TemplateModule::transfer(origin1, account(2), CollectionId(1), TokenId(1), 2)576				.map_err(|e| e.error),577			<pallet_nonfungible::Error::<Test>>::NonfungibleItemsHaveNoAmount578		);579	});580}581582#[test]583fn transfer_nft_item_zero_value() {584	new_test_ext().execute_with(|| {585		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));586587		let data = default_nft_data();588		create_test_item(collection_id, &data.into());589		assert_eq!(590			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),591			1592		);593		assert_eq!(594			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),595			true596		);597598		let origin1 = Origin::signed(1);599600		// Transferring 0 amount works on NFT...601		assert_ok!(TemplateModule::transfer(602			origin1,603			account(2),604			CollectionId(1),605			TokenId(1),606			0607		));608		// ... and results in no transfer609		assert_eq!(610			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),611			1612		);613		assert_eq!(614			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),615			true616		);617	});618}619620#[test]621fn nft_approve_and_transfer_from() {622	new_test_ext().execute_with(|| {623		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));624625		let data = default_nft_data();626		create_test_item(collection_id, &data.into());627628		let origin1 = Origin::signed(1);629		let origin2 = Origin::signed(2);630631		assert_eq!(632			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),633			1634		);635		assert_eq!(636			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),637			true638		);639640		// neg transfer_from641		assert_noop!(642			TemplateModule::transfer_from(643				origin2.clone(),644				account(1),645				account(2),646				CollectionId(1),647				TokenId(1),648				1649			)650			.map_err(|e| e.error),651			CommonError::<Test>::ApprovedValueTooLow652		);653654		// do approve655		assert_ok!(TemplateModule::approve(656			origin1,657			account(2),658			CollectionId(1),659			TokenId(1),660			1661		));662		assert_eq!(663			<pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),664			account(2)665		);666667		assert_ok!(TemplateModule::transfer_from(668			origin2,669			account(1),670			account(3),671			CollectionId(1),672			TokenId(1),673			1674		));675		assert!(676			<pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).is_none()677		);678	});679}680681#[test]682fn nft_approve_and_transfer_from_allow_list() {683	new_test_ext().execute_with(|| {684		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));685686		let origin1 = Origin::signed(1);687		let origin2 = Origin::signed(2);688689		// Create NFT 1 for account 1690		let data = default_nft_data();691		create_test_item(collection_id, &data.clone().into());692		assert_eq!(693			&<pallet_nonfungible::TokenData<Test>>::get((collection_id, TokenId(1)))694				.unwrap()695				.const_data,696			&data.const_data.into_inner()697		);698		assert_eq!(699			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),700			1701		);702		assert_eq!(703			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),704			true705		);706707		// Allow allow-list users to mint and add accounts 1, 2, and 3 to allow-list708		assert_ok!(TemplateModule::set_mint_permission(709			origin1.clone(),710			CollectionId(1),711			true712		));713		assert_ok!(TemplateModule::set_public_access_mode(714			origin1.clone(),715			CollectionId(1),716			AccessMode::AllowList717		));718		assert_ok!(TemplateModule::add_to_allow_list(719			origin1.clone(),720			CollectionId(1),721			account(1)722		));723		assert_ok!(TemplateModule::add_to_allow_list(724			origin1.clone(),725			CollectionId(1),726			account(2)727		));728		assert_ok!(TemplateModule::add_to_allow_list(729			origin1.clone(),730			CollectionId(1),731			account(3)732		));733734		// Account 1 approves account 2 for NFT 1735		assert_ok!(TemplateModule::approve(736			origin1.clone(),737			account(2),738			CollectionId(1),739			TokenId(1),740			1741		));742		assert_eq!(743			<pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),744			account(2)745		);746747		// Account 2 transfers NFT 1 from account 1 to account 3748		assert_ok!(TemplateModule::transfer_from(749			origin2,750			account(1),751			account(3),752			CollectionId(1),753			TokenId(1),754			1755		));756		assert!(757			<pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).is_none()758		);759	});760}761762#[test]763fn refungible_approve_and_transfer_from() {764	new_test_ext().execute_with(|| {765		let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));766767		let origin1 = Origin::signed(1);768		let origin2 = Origin::signed(2);769770		// Create RFT 1 in 1023 pieces for account 1771		let data = default_re_fungible_data();772		create_test_item(collection_id, &data.into());773774		assert_eq!(775			<pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),776			1777		);778		assert_eq!(779			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),780			1023781		);782		assert_eq!(783			<pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),784			true785		);786787		// Allow public minting, enable allow-list and add accounts 1, 2, 3 to allow-list788		assert_ok!(TemplateModule::set_mint_permission(789			origin1.clone(),790			CollectionId(1),791			true792		));793		assert_ok!(TemplateModule::set_public_access_mode(794			origin1.clone(),795			CollectionId(1),796			AccessMode::AllowList797		));798		assert_ok!(TemplateModule::add_to_allow_list(799			origin1.clone(),800			CollectionId(1),801			account(1)802		));803		assert_ok!(TemplateModule::add_to_allow_list(804			origin1.clone(),805			CollectionId(1),806			account(2)807		));808		assert_ok!(TemplateModule::add_to_allow_list(809			origin1.clone(),810			CollectionId(1),811			account(3)812		));813814		// Account 1 approves account 2 for 1023 pieces of RFT 1815		assert_ok!(TemplateModule::approve(816			origin1,817			account(2),818			CollectionId(1),819			TokenId(1),820			1023821		));822		assert_eq!(823			<pallet_refungible::Allowance<Test>>::get((824				CollectionId(1),825				TokenId(1),826				account(1),827				account(2)828			)),829			1023830		);831832		// Account 2 transfers 100 pieces of RFT 1 from account 1 to account 3833		assert_ok!(TemplateModule::transfer_from(834			origin2,835			account(1),836			account(3),837			CollectionId(1),838			TokenId(1),839			100840		));841		assert_eq!(842			<pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),843			1844		);845		assert_eq!(846			<pallet_refungible::AccountBalance<Test>>::get((collection_id, account(3))),847			1848		);849		assert_eq!(850			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),851			923852		);853		assert_eq!(854			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(3))),855			100856		);857		assert_eq!(858			<pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),859			true860		);861		assert_eq!(862			<pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),863			true864		);865		assert_eq!(866			<pallet_refungible::Allowance<Test>>::get((867				CollectionId(1),868				TokenId(1),869				account(1),870				account(2)871			)),872			923873		);874	});875}876877#[test]878fn fungible_approve_and_transfer_from() {879	new_test_ext().execute_with(|| {880		let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));881882		let data = default_fungible_data();883		create_test_item(collection_id, &data.into());884885		let origin1 = Origin::signed(1);886		let origin2 = Origin::signed(2);887888		assert_ok!(TemplateModule::set_mint_permission(889			origin1.clone(),890			CollectionId(1),891			true892		));893		assert_ok!(TemplateModule::set_public_access_mode(894			origin1.clone(),895			CollectionId(1),896			AccessMode::AllowList897		));898		assert_ok!(TemplateModule::add_to_allow_list(899			origin1.clone(),900			CollectionId(1),901			account(1)902		));903		assert_ok!(TemplateModule::add_to_allow_list(904			origin1.clone(),905			CollectionId(1),906			account(2)907		));908		assert_ok!(TemplateModule::add_to_allow_list(909			origin1.clone(),910			CollectionId(1),911			account(3)912		));913914		// do approve915		assert_ok!(TemplateModule::approve(916			origin1.clone(),917			account(2),918			CollectionId(1),919			TokenId(0),920			5921		));922		assert_eq!(923			<pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(2))),924			5925		);926		assert_ok!(TemplateModule::approve(927			origin1,928			account(3),929			CollectionId(1),930			TokenId(0),931			5932		));933		assert_eq!(934			<pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(2))),935			5936		);937		assert_eq!(938			<pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(3))),939			5940		);941942		assert_ok!(TemplateModule::transfer_from(943			origin2.clone(),944			account(1),945			account(3),946			CollectionId(1),947			TokenId(0),948			4949		));950951		assert_eq!(952			<pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(2))),953			1954		);955956		assert_noop!(957			TemplateModule::transfer_from(958				origin2,959				account(1),960				account(3),961				CollectionId(1),962				TokenId(0),963				4964			)965			.map_err(|e| e.error),966			CommonError::<Test>::ApprovedValueTooLow967		);968	});969}970971#[test]972fn change_collection_owner() {973	new_test_ext().execute_with(|| {974		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));975976		let origin1 = Origin::signed(1);977		assert_ok!(TemplateModule::change_collection_owner(978			origin1,979			collection_id,980			2981		));982		assert_eq!(983			<pallet_common::CollectionById<Test>>::get(collection_id)984				.unwrap()985				.owner,986			2987		);988	});989}990991#[test]992fn destroy_collection() {993	new_test_ext().execute_with(|| {994		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));995996		let origin1 = Origin::signed(1);997		assert_ok!(TemplateModule::destroy_collection(origin1, collection_id));998	});999}10001001#[test]1002fn burn_nft_item() {1003	new_test_ext().execute_with(|| {1004		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));10051006		let origin1 = Origin::signed(1);10071008		let data = default_nft_data();1009		create_test_item(collection_id, &data.into());10101011		// check balance (collection with id = 1, user id = 1)1012		assert_eq!(1013			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),1014			11015		);10161017		// burn item1018		assert_ok!(TemplateModule::burn_item(1019			origin1.clone(),1020			collection_id,1021			TokenId(1),1022			11023		));1024		assert_eq!(1025			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),1026			01027		);1028	});1029}10301031#[test]1032fn burn_same_nft_item_twice() {1033	new_test_ext().execute_with(|| {1034		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));10351036		let origin1 = Origin::signed(1);10371038		let data = default_nft_data();1039		create_test_item(collection_id, &data.into());10401041		// check balance (collection with id = 1, user id = 1)1042		assert_eq!(1043			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),1044			11045		);10461047		// burn item1048		assert_ok!(TemplateModule::burn_item(1049			origin1.clone(),1050			collection_id,1051			TokenId(1),1052			11053		));10541055		// burn item again1056		assert_noop!(1057			TemplateModule::burn_item(origin1, collection_id, TokenId(1), 1).map_err(|e| e.error),1058			CommonError::<Test>::TokenNotFound1059		);10601061		assert_eq!(1062			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),1063			01064		);1065	});1066}10671068#[test]1069fn burn_fungible_item() {1070	new_test_ext().execute_with(|| {1071		let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));10721073		let origin1 = Origin::signed(1);1074		assert_ok!(TemplateModule::add_collection_admin(1075			origin1.clone(),1076			collection_id,1077			account(2)1078		));10791080		let data = default_fungible_data();1081		create_test_item(collection_id, &data.into());10821083		// check balance (collection with id = 1, user id = 1)1084		assert_eq!(1085			<pallet_fungible::Balance<Test>>::get((collection_id, account(1))),1086			51087		);10881089		// burn item1090		assert_ok!(TemplateModule::burn_item(1091			origin1.clone(),1092			CollectionId(1),1093			TokenId(0),1094			51095		));1096		assert_noop!(1097			TemplateModule::burn_item(origin1, CollectionId(1), TokenId(0), 5).map_err(|e| e.error),1098			CommonError::<Test>::TokenValueTooLow1099		);11001101		assert_eq!(1102			<pallet_fungible::Balance<Test>>::get((collection_id, account(1))),1103			01104		);1105	});1106}11071108#[test]1109fn burn_fungible_item_with_token_id() {1110	new_test_ext().execute_with(|| {1111		let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));11121113		let origin1 = Origin::signed(1);1114		assert_ok!(TemplateModule::add_collection_admin(1115			origin1.clone(),1116			collection_id,1117			account(2)1118		));11191120		let data = default_fungible_data();1121		create_test_item(collection_id, &data.into());11221123		// check balance (collection with id = 1, user id = 1)1124		assert_eq!(1125			<pallet_fungible::Balance<Test>>::get((collection_id, account(1))),1126			51127		);11281129		// Try to burn item using Token ID1130		assert_noop!(1131			TemplateModule::burn_item(origin1, CollectionId(1), TokenId(1), 5).map_err(|e| e.error),1132			<pallet_fungible::Error::<Test>>::FungibleItemsHaveNoId1133		);1134	});1135}1136#[test]1137fn burn_refungible_item() {1138	new_test_ext().execute_with(|| {1139		let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));1140		let origin1 = Origin::signed(1);11411142		assert_ok!(TemplateModule::set_mint_permission(1143			origin1.clone(),1144			collection_id,1145			true1146		));1147		assert_ok!(TemplateModule::set_public_access_mode(1148			origin1.clone(),1149			collection_id,1150			AccessMode::AllowList1151		));1152		assert_ok!(TemplateModule::add_to_allow_list(1153			origin1.clone(),1154			collection_id,1155			account(1)1156		));11571158		assert_ok!(TemplateModule::add_collection_admin(1159			origin1.clone(),1160			collection_id,1161			account(2)1162		));11631164		let data = default_re_fungible_data();1165		create_test_item(collection_id, &data.into());11661167		// check balance (collection with id = 1, user id = 2)1168		assert_eq!(1169			<pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),1170			11171		);1172		assert_eq!(1173			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),1174			10231175		);11761177		// burn item1178		assert_ok!(TemplateModule::burn_item(1179			origin1.clone(),1180			collection_id,1181			TokenId(1),1182			10231183		));1184		assert_noop!(1185			TemplateModule::burn_item(origin1, collection_id, TokenId(1), 1023)1186				.map_err(|e| e.error),1187			CommonError::<Test>::TokenValueTooLow1188		);11891190		assert_eq!(1191			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),1192			01193		);1194	});1195}11961197#[test]1198fn add_collection_admin() {1199	new_test_ext().execute_with(|| {1200		let collection1_id =1201			create_test_collection_for_owner(&CollectionMode::NFT, 1, CollectionId(1));1202		let origin1 = Origin::signed(1);12031204		// Add collection admins1205		assert_ok!(TemplateModule::add_collection_admin(1206			origin1.clone(),1207			collection1_id,1208			account(2)1209		));1210		assert_ok!(TemplateModule::add_collection_admin(1211			origin1,1212			collection1_id,1213			account(3)1214		));12151216		// Owner is not an admin by default1217		assert_eq!(1218			<pallet_common::IsAdmin<Test>>::get((CollectionId(1), account(1))),1219			false1220		);1221		assert!(<pallet_common::IsAdmin<Test>>::get((1222			CollectionId(1),1223			account(2)1224		)));1225		assert!(<pallet_common::IsAdmin<Test>>::get((1226			CollectionId(1),1227			account(3)1228		)));1229	});1230}12311232#[test]1233fn remove_collection_admin() {1234	new_test_ext().execute_with(|| {1235		let collection1_id =1236			create_test_collection_for_owner(&CollectionMode::NFT, 1, CollectionId(1));1237		let origin1 = Origin::signed(1);1238		let origin2 = Origin::signed(2);12391240		// Add collection admins 2 and 31241		assert_ok!(TemplateModule::add_collection_admin(1242			origin1.clone(),1243			collection1_id,1244			account(2)1245		));1246		assert_ok!(TemplateModule::add_collection_admin(1247			origin1,1248			collection1_id,1249			account(3)1250		));12511252		assert!(<pallet_common::IsAdmin<Test>>::get((1253			CollectionId(1),1254			account(2)1255		)));1256		assert!(<pallet_common::IsAdmin<Test>>::get((1257			CollectionId(1),1258			account(3)1259		)));12601261		// remove admin 31262		assert_ok!(TemplateModule::remove_collection_admin(1263			origin2,1264			CollectionId(1),1265			account(3)1266		));12671268		// 2 is still admin, 3 is not an admin anymore1269		assert!(<pallet_common::IsAdmin<Test>>::get((1270			CollectionId(1),1271			account(2)1272		)));1273		assert_eq!(1274			<pallet_common::IsAdmin<Test>>::get((CollectionId(1), account(3))),1275			false1276		);1277	});1278}12791280#[test]1281fn balance_of() {1282	new_test_ext().execute_with(|| {1283		let nft_collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1284		let fungible_collection_id =1285			create_test_collection(&CollectionMode::Fungible(3), CollectionId(2));1286		let re_fungible_collection_id =1287			create_test_collection(&CollectionMode::ReFungible, CollectionId(3));12881289		// check balance before1290		assert_eq!(1291			<pallet_nonfungible::AccountBalance<Test>>::get((nft_collection_id, account(1))),1292			01293		);1294		assert_eq!(1295			<pallet_fungible::Balance<Test>>::get((fungible_collection_id, account(1))),1296			01297		);1298		assert_eq!(1299			<pallet_refungible::AccountBalance<Test>>::get((re_fungible_collection_id, account(1))),1300			01301		);13021303		let nft_data = default_nft_data();1304		create_test_item(nft_collection_id, &nft_data.into());13051306		let fungible_data = default_fungible_data();1307		create_test_item(fungible_collection_id, &fungible_data.into());13081309		let re_fungible_data = default_re_fungible_data();1310		create_test_item(re_fungible_collection_id, &re_fungible_data.into());13111312		// check balance (collection with id = 1, user id = 1)1313		assert_eq!(1314			<pallet_nonfungible::AccountBalance<Test>>::get((nft_collection_id, account(1))),1315			11316		);1317		assert_eq!(1318			<pallet_fungible::Balance<Test>>::get((fungible_collection_id, account(1))),1319			51320		);1321		assert_eq!(1322			<pallet_refungible::AccountBalance<Test>>::get((re_fungible_collection_id, account(1))),1323			11324		);13251326		assert_eq!(1327			<pallet_nonfungible::Owned<Test>>::get((nft_collection_id, account(1), TokenId(1))),1328			true1329		);1330		assert_eq!(1331			<pallet_refungible::Owned<Test>>::get((1332				re_fungible_collection_id,1333				account(1),1334				TokenId(1)1335			)),1336			true1337		);1338	});1339}13401341#[test]1342fn approve() {1343	new_test_ext().execute_with(|| {1344		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));13451346		let data = default_nft_data();1347		create_test_item(collection_id, &data.into());13481349		let origin1 = Origin::signed(1);13501351		// approve1352		assert_ok!(TemplateModule::approve(1353			origin1,1354			account(2),1355			CollectionId(1),1356			TokenId(1),1357			11358		));1359		assert_eq!(1360			<pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1361			account(2)1362		);1363	});1364}13651366#[test]1367fn transfer_from() {1368	new_test_ext().execute_with(|| {1369		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1370		let origin1 = Origin::signed(1);1371		let origin2 = Origin::signed(2);13721373		let data = default_nft_data();1374		create_test_item(collection_id, &data.into());13751376		// approve1377		assert_ok!(TemplateModule::approve(1378			origin1.clone(),1379			account(2),1380			CollectionId(1),1381			TokenId(1),1382			11383		));1384		assert_eq!(1385			<pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1386			account(2)1387		);13881389		assert_ok!(TemplateModule::set_mint_permission(1390			origin1.clone(),1391			CollectionId(1),1392			true1393		));1394		assert_ok!(TemplateModule::set_public_access_mode(1395			origin1.clone(),1396			CollectionId(1),1397			AccessMode::AllowList1398		));1399		assert_ok!(TemplateModule::add_to_allow_list(1400			origin1.clone(),1401			CollectionId(1),1402			account(1)1403		));1404		assert_ok!(TemplateModule::add_to_allow_list(1405			origin1.clone(),1406			CollectionId(1),1407			account(2)1408		));1409		assert_ok!(TemplateModule::add_to_allow_list(1410			origin1,1411			CollectionId(1),1412			account(3)1413		));14141415		assert_ok!(TemplateModule::transfer_from(1416			origin2,1417			account(1),1418			account(2),1419			CollectionId(1),1420			TokenId(1),1421			11422		));14231424		// after transfer1425		assert_eq!(1426			<pallet_nonfungible::AccountBalance<Test>>::get((CollectionId(1), account(1))),1427			01428		);1429		assert_eq!(1430			<pallet_nonfungible::AccountBalance<Test>>::get((CollectionId(1), account(2))),1431			11432		);1433	});1434}14351436// #endregion14371438// Coverage tests region1439// #region14401441#[test]1442fn owner_can_add_address_to_allow_list() {1443	new_test_ext().execute_with(|| {1444		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));14451446		let origin1 = Origin::signed(1);1447		assert_ok!(TemplateModule::add_to_allow_list(1448			origin1,1449			collection_id,1450			account(2)1451		));1452		assert!(<pallet_common::Allowlist<Test>>::get((1453			collection_id,1454			account(2)1455		)));1456	});1457}14581459#[test]1460fn admin_can_add_address_to_allow_list() {1461	new_test_ext().execute_with(|| {1462		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1463		let origin1 = Origin::signed(1);1464		let origin2 = Origin::signed(2);14651466		assert_ok!(TemplateModule::add_collection_admin(1467			origin1,1468			collection_id,1469			account(2)1470		));1471		assert_ok!(TemplateModule::add_to_allow_list(1472			origin2,1473			collection_id,1474			account(3)1475		));1476		assert!(<pallet_common::Allowlist<Test>>::get((1477			collection_id,1478			account(3)1479		)));1480	});1481}14821483#[test]1484fn nonprivileged_user_cannot_add_address_to_allow_list() {1485	new_test_ext().execute_with(|| {1486		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));14871488		let origin2 = Origin::signed(2);1489		assert_noop!(1490			TemplateModule::add_to_allow_list(origin2, collection_id, account(3)),1491			CommonError::<Test>::NoPermission1492		);1493	});1494}14951496#[test]1497fn nobody_can_add_address_to_allow_list_of_nonexisting_collection() {1498	new_test_ext().execute_with(|| {1499		let origin1 = Origin::signed(1);15001501		assert_noop!(1502			TemplateModule::add_to_allow_list(origin1, CollectionId(1), account(2)),1503			CommonError::<Test>::CollectionNotFound1504		);1505	});1506}15071508#[test]1509fn nobody_can_add_address_to_allow_list_of_deleted_collection() {1510	new_test_ext().execute_with(|| {1511		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));15121513		let origin1 = Origin::signed(1);1514		assert_ok!(TemplateModule::destroy_collection(1515			origin1.clone(),1516			collection_id1517		));1518		assert_noop!(1519			TemplateModule::add_to_allow_list(origin1, collection_id, account(2)),1520			CommonError::<Test>::CollectionNotFound1521		);1522	});1523}15241525// If address is already added to allow list, nothing happens1526#[test]1527fn address_is_already_added_to_allow_list() {1528	new_test_ext().execute_with(|| {1529		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1530		let origin1 = Origin::signed(1);15311532		assert_ok!(TemplateModule::add_to_allow_list(1533			origin1.clone(),1534			collection_id,1535			account(2)1536		));1537		assert_ok!(TemplateModule::add_to_allow_list(1538			origin1,1539			collection_id,1540			account(2)1541		));1542		assert!(<pallet_common::Allowlist<Test>>::get((1543			collection_id,1544			account(2)1545		)));1546	});1547}15481549#[test]1550fn owner_can_remove_address_from_allow_list() {1551	new_test_ext().execute_with(|| {1552		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));15531554		let origin1 = Origin::signed(1);1555		assert_ok!(TemplateModule::add_to_allow_list(1556			origin1.clone(),1557			collection_id,1558			account(2)1559		));1560		assert_ok!(TemplateModule::remove_from_allow_list(1561			origin1,1562			collection_id,1563			account(2)1564		));1565		assert_eq!(1566			<pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1567			false1568		);1569	});1570}15711572#[test]1573fn admin_can_remove_address_from_allow_list() {1574	new_test_ext().execute_with(|| {1575		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1576		let origin1 = Origin::signed(1);1577		let origin2 = Origin::signed(2);15781579		// Owner adds admin1580		assert_ok!(TemplateModule::add_collection_admin(1581			origin1.clone(),1582			collection_id,1583			account(2)1584		));15851586		// Owner adds address 3 to allow list1587		assert_ok!(TemplateModule::add_to_allow_list(1588			origin1,1589			collection_id,1590			account(3)1591		));15921593		// Admin removes address 3 from allow list1594		assert_ok!(TemplateModule::remove_from_allow_list(1595			origin2,1596			collection_id,1597			account(3)1598		));1599		assert_eq!(1600			<pallet_common::Allowlist<Test>>::get((collection_id, account(3))),1601			false1602		);1603	});1604}16051606#[test]1607fn nonprivileged_user_cannot_remove_address_from_allow_list() {1608	new_test_ext().execute_with(|| {1609		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1610		let origin1 = Origin::signed(1);1611		let origin2 = Origin::signed(2);16121613		assert_ok!(TemplateModule::add_to_allow_list(1614			origin1,1615			collection_id,1616			account(2)1617		));1618		assert_noop!(1619			TemplateModule::remove_from_allow_list(origin2, collection_id, account(2)),1620			CommonError::<Test>::NoPermission1621		);1622		assert!(<pallet_common::Allowlist<Test>>::get((1623			collection_id,1624			account(2)1625		)));1626	});1627}16281629#[test]1630fn nobody_can_remove_address_from_allow_list_of_nonexisting_collection() {1631	new_test_ext().execute_with(|| {1632		let origin1 = Origin::signed(1);16331634		assert_noop!(1635			TemplateModule::remove_from_allow_list(origin1, CollectionId(1), account(2)),1636			CommonError::<Test>::CollectionNotFound1637		);1638	});1639}16401641#[test]1642fn nobody_can_remove_address_from_allow_list_of_deleted_collection() {1643	new_test_ext().execute_with(|| {1644		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1645		let origin1 = Origin::signed(1);1646		let origin2 = Origin::signed(2);16471648		// Add account 2 to allow list1649		assert_ok!(TemplateModule::add_to_allow_list(1650			origin1.clone(),1651			collection_id,1652			account(2)1653		));16541655		// Account 2 is in collection allow-list1656		assert!(<pallet_common::Allowlist<Test>>::get((1657			collection_id,1658			account(2)1659		)));16601661		// Destroy collection1662		assert_ok!(TemplateModule::destroy_collection(origin1, collection_id));16631664		// Attempt to remove account 2 from collection allow-list => error1665		assert_noop!(1666			TemplateModule::remove_from_allow_list(origin2, collection_id, account(2)),1667			CommonError::<Test>::CollectionNotFound1668		);16691670		// Account 2 is not found in collection allow-list anyway1671		assert_eq!(1672			<pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1673			false1674		);1675	});1676}16771678// If address is already removed from allow list, nothing happens1679#[test]1680fn address_is_already_removed_from_allow_list() {1681	new_test_ext().execute_with(|| {1682		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1683		let origin1 = Origin::signed(1);16841685		assert_ok!(TemplateModule::add_to_allow_list(1686			origin1.clone(),1687			collection_id,1688			account(2)1689		));1690		assert_ok!(TemplateModule::remove_from_allow_list(1691			origin1.clone(),1692			collection_id,1693			account(2)1694		));1695		assert_eq!(1696			<pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1697			false1698		);1699		assert_ok!(TemplateModule::remove_from_allow_list(1700			origin1,1701			collection_id,1702			account(2)1703		));1704		assert_eq!(1705			<pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1706			false1707		);1708	});1709}17101711// If Public Access mode is set to AllowList, tokens can’t be transferred from a non-allowlisted address with transfer or transferFrom (2 tests)1712#[test]1713fn allow_list_test_1() {1714	new_test_ext().execute_with(|| {1715		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));17161717		let origin1 = Origin::signed(1);17181719		let data = default_nft_data();1720		create_test_item(collection_id, &data.into());17211722		assert_ok!(TemplateModule::set_public_access_mode(1723			origin1.clone(),1724			collection_id,1725			AccessMode::AllowList1726		));1727		assert_ok!(TemplateModule::add_to_allow_list(1728			origin1.clone(),1729			collection_id,1730			account(2)1731		));17321733		assert_noop!(1734			TemplateModule::transfer(origin1, account(3), CollectionId(1), TokenId(1), 1)1735				.map_err(|e| e.error),1736			CommonError::<Test>::AddressNotInAllowlist1737		);1738	});1739}17401741#[test]1742fn allow_list_test_2() {1743	new_test_ext().execute_with(|| {1744		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1745		let origin1 = Origin::signed(1);17461747		let data = default_nft_data();1748		create_test_item(collection_id, &data.into());17491750		assert_ok!(TemplateModule::set_public_access_mode(1751			origin1.clone(),1752			collection_id,1753			AccessMode::AllowList1754		));1755		assert_ok!(TemplateModule::add_to_allow_list(1756			origin1.clone(),1757			collection_id,1758			account(1)1759		));1760		assert_ok!(TemplateModule::add_to_allow_list(1761			origin1.clone(),1762			collection_id,1763			account(2)1764		));17651766		// do approve1767		assert_ok!(TemplateModule::approve(1768			origin1.clone(),1769			account(1),1770			collection_id,1771			TokenId(1),1772			11773		));1774		assert_eq!(1775			<pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1776			account(1)1777		);17781779		assert_ok!(TemplateModule::remove_from_allow_list(1780			origin1.clone(),1781			collection_id,1782			account(1)1783		));17841785		assert_noop!(1786			TemplateModule::transfer_from(1787				origin1,1788				account(1),1789				account(3),1790				CollectionId(1),1791				TokenId(1),1792				11793			)1794			.map_err(|e| e.error),1795			CommonError::<Test>::AddressNotInAllowlist1796		);1797	});1798}17991800// If Public Access mode is set to AllowList, tokens can’t be transferred to a non-allowlisted address with transfer or transferFrom (2 tests)1801#[test]1802fn allow_list_test_3() {1803	new_test_ext().execute_with(|| {1804		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));18051806		let origin1 = Origin::signed(1);18071808		let data = default_nft_data();1809		create_test_item(collection_id, &data.into());18101811		assert_ok!(TemplateModule::set_public_access_mode(1812			origin1.clone(),1813			collection_id,1814			AccessMode::AllowList1815		));1816		assert_ok!(TemplateModule::add_to_allow_list(1817			origin1.clone(),1818			collection_id,1819			account(1)1820		));18211822		assert_noop!(1823			TemplateModule::transfer(origin1, account(3), collection_id, TokenId(1), 1)1824				.map_err(|e| e.error),1825			CommonError::<Test>::AddressNotInAllowlist1826		);1827	});1828}18291830#[test]1831fn allow_list_test_4() {1832	new_test_ext().execute_with(|| {1833		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));18341835		let origin1 = Origin::signed(1);18361837		let data = default_nft_data();1838		create_test_item(collection_id, &data.into());18391840		assert_ok!(TemplateModule::set_public_access_mode(1841			origin1.clone(),1842			collection_id,1843			AccessMode::AllowList1844		));1845		assert_ok!(TemplateModule::add_to_allow_list(1846			origin1.clone(),1847			collection_id,1848			account(1)1849		));1850		assert_ok!(TemplateModule::add_to_allow_list(1851			origin1.clone(),1852			collection_id,1853			account(2)1854		));18551856		// do approve1857		assert_ok!(TemplateModule::approve(1858			origin1.clone(),1859			account(1),1860			collection_id,1861			TokenId(1),1862			11863		));1864		assert_eq!(1865			<pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1866			account(1)1867		);18681869		assert_ok!(TemplateModule::remove_from_allow_list(1870			origin1.clone(),1871			collection_id,1872			account(2)1873		));18741875		assert_noop!(1876			TemplateModule::transfer_from(1877				origin1,1878				account(1),1879				account(3),1880				collection_id,1881				TokenId(1),1882				11883			)1884			.map_err(|e| e.error),1885			CommonError::<Test>::AddressNotInAllowlist1886		);1887	});1888}18891890// If 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)1891#[test]1892fn allow_list_test_5() {1893	new_test_ext().execute_with(|| {1894		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));18951896		let origin1 = Origin::signed(1);18971898		let data = default_nft_data();1899		create_test_item(collection_id, &data.into());19001901		assert_ok!(TemplateModule::set_public_access_mode(1902			origin1.clone(),1903			collection_id,1904			AccessMode::AllowList1905		));1906		assert_noop!(1907			TemplateModule::burn_item(origin1.clone(), CollectionId(1), TokenId(1), 1)1908				.map_err(|e| e.error),1909			CommonError::<Test>::AddressNotInAllowlist1910		);1911	});1912}19131914// If Public Access mode is set to AllowList, token transfers can’t be Approved by a non-allowlisted address (see Approve method).1915#[test]1916fn allow_list_test_6() {1917	new_test_ext().execute_with(|| {1918		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));19191920		let origin1 = Origin::signed(1);19211922		let data = default_nft_data();1923		create_test_item(collection_id, &data.into());19241925		assert_ok!(TemplateModule::set_public_access_mode(1926			origin1.clone(),1927			collection_id,1928			AccessMode::AllowList1929		));19301931		// do approve1932		assert_noop!(1933			TemplateModule::approve(origin1, account(1), CollectionId(1), TokenId(1), 1)1934				.map_err(|e| e.error),1935			CommonError::<Test>::AddressNotInAllowlist1936		);1937	});1938}19391940// If Public Access mode is set to AllowList, tokens can be transferred from a allowlisted address with transfer or transferFrom (2 tests) and1941//          tokens can be transferred from a allowlisted address with transfer or transferFrom (2 tests)1942#[test]1943fn allow_list_test_7() {1944	new_test_ext().execute_with(|| {1945		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));19461947		let data = default_nft_data();1948		create_test_item(collection_id, &data.into());19491950		let origin1 = Origin::signed(1);19511952		assert_ok!(TemplateModule::set_public_access_mode(1953			origin1.clone(),1954			collection_id,1955			AccessMode::AllowList1956		));1957		assert_ok!(TemplateModule::add_to_allow_list(1958			origin1.clone(),1959			collection_id,1960			account(1)1961		));1962		assert_ok!(TemplateModule::add_to_allow_list(1963			origin1.clone(),1964			collection_id,1965			account(2)1966		));19671968		assert_ok!(TemplateModule::transfer(1969			origin1,1970			account(2),1971			CollectionId(1),1972			TokenId(1),1973			11974		));1975	});1976}19771978#[test]1979fn allow_list_test_8() {1980	new_test_ext().execute_with(|| {1981		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));19821983		// Create NFT for account 11984		let data = default_nft_data();1985		create_test_item(collection_id, &data.into());19861987		let origin1 = Origin::signed(1);19881989		// Toggle Allow List mode and add accounts 1 and 21990		assert_ok!(TemplateModule::set_public_access_mode(1991			origin1.clone(),1992			collection_id,1993			AccessMode::AllowList1994		));1995		assert_ok!(TemplateModule::add_to_allow_list(1996			origin1.clone(),1997			collection_id,1998			account(1)1999		));2000		assert_ok!(TemplateModule::add_to_allow_list(2001			origin1.clone(),2002			collection_id,2003			account(2)2004		));20052006		// Sself-approve account 1 for NFT 12007		assert_ok!(TemplateModule::approve(2008			origin1.clone(),2009			account(1),2010			CollectionId(1),2011			TokenId(1),2012			12013		));2014		assert_eq!(2015			<pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),2016			account(1)2017		);20182019		// Transfer from 1 to 22020		assert_ok!(TemplateModule::transfer_from(2021			origin1,2022			account(1),2023			account(2),2024			CollectionId(1),2025			TokenId(1),2026			12027		));2028	});2029}20302031// If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens can be created by owner.2032#[test]2033fn allow_list_test_9() {2034	new_test_ext().execute_with(|| {2035		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));2036		let origin1 = Origin::signed(1);20372038		assert_ok!(TemplateModule::set_public_access_mode(2039			origin1.clone(),2040			collection_id,2041			AccessMode::AllowList2042		));2043		assert_ok!(TemplateModule::set_mint_permission(2044			origin1,2045			collection_id,2046			false2047		));20482049		let data = default_nft_data();2050		create_test_item(collection_id, &data.into());2051	});2052}20532054// If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens can be created by admin.2055#[test]2056fn allow_list_test_10() {2057	new_test_ext().execute_with(|| {2058		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));20592060		let origin1 = Origin::signed(1);2061		let origin2 = Origin::signed(2);20622063		assert_ok!(TemplateModule::set_public_access_mode(2064			origin1.clone(),2065			collection_id,2066			AccessMode::AllowList2067		));2068		assert_ok!(TemplateModule::set_mint_permission(2069			origin1.clone(),2070			collection_id,2071			false2072		));20732074		assert_ok!(TemplateModule::add_collection_admin(2075			origin1,2076			collection_id,2077			account(2)2078		));20792080		assert_ok!(TemplateModule::create_item(2081			origin2,2082			collection_id,2083			account(2),2084			default_nft_data().into()2085		));2086	});2087}20882089// If 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.2090#[test]2091fn allow_list_test_11() {2092	new_test_ext().execute_with(|| {2093		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));20942095		let origin1 = Origin::signed(1);2096		let origin2 = Origin::signed(2);20972098		assert_ok!(TemplateModule::set_public_access_mode(2099			origin1.clone(),2100			collection_id,2101			AccessMode::AllowList2102		));2103		assert_ok!(TemplateModule::set_mint_permission(2104			origin1.clone(),2105			collection_id,2106			false2107		));2108		assert_ok!(TemplateModule::add_to_allow_list(2109			origin1,2110			collection_id,2111			account(2)2112		));21132114		assert_noop!(2115			TemplateModule::create_item(2116				origin2,2117				CollectionId(1),2118				account(2),2119				default_nft_data().into()2120			)2121			.map_err(|e| e.error),2122			CommonError::<Test>::PublicMintingNotAllowed2123		);2124	});2125}21262127// If 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.2128#[test]2129fn allow_list_test_12() {2130	new_test_ext().execute_with(|| {2131		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));21322133		let origin1 = Origin::signed(1);2134		let origin2 = Origin::signed(2);21352136		assert_ok!(TemplateModule::set_public_access_mode(2137			origin1.clone(),2138			collection_id,2139			AccessMode::AllowList2140		));2141		assert_ok!(TemplateModule::set_mint_permission(2142			origin1,2143			collection_id,2144			false2145		));21462147		assert_noop!(2148			TemplateModule::create_item(2149				origin2,2150				CollectionId(1),2151				account(2),2152				default_nft_data().into()2153			)2154			.map_err(|e| e.error),2155			CommonError::<Test>::PublicMintingNotAllowed2156		);2157	});2158}21592160// If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by owner.2161#[test]2162fn allow_list_test_13() {2163	new_test_ext().execute_with(|| {2164		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));21652166		let origin1 = Origin::signed(1);21672168		assert_ok!(TemplateModule::set_public_access_mode(2169			origin1.clone(),2170			collection_id,2171			AccessMode::AllowList2172		));2173		assert_ok!(TemplateModule::set_mint_permission(2174			origin1,2175			collection_id,2176			true2177		));21782179		let data = default_nft_data();2180		create_test_item(collection_id, &data.into());2181	});2182}21832184// If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by admin.2185#[test]2186fn allow_list_test_14() {2187	new_test_ext().execute_with(|| {2188		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));21892190		let origin1 = Origin::signed(1);2191		let origin2 = Origin::signed(2);21922193		assert_ok!(TemplateModule::set_public_access_mode(2194			origin1.clone(),2195			collection_id,2196			AccessMode::AllowList2197		));2198		assert_ok!(TemplateModule::set_mint_permission(2199			origin1.clone(),2200			collection_id,2201			true2202		));22032204		assert_ok!(TemplateModule::add_collection_admin(2205			origin1,2206			collection_id,2207			account(2)2208		));22092210		assert_ok!(TemplateModule::create_item(2211			origin2,2212			collection_id,2213			account(2),2214			default_nft_data().into()2215		));2216	});2217}22182219// If 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.2220#[test]2221fn allow_list_test_15() {2222	new_test_ext().execute_with(|| {2223		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));22242225		let origin1 = Origin::signed(1);2226		let origin2 = Origin::signed(2);22272228		assert_ok!(TemplateModule::set_public_access_mode(2229			origin1.clone(),2230			collection_id,2231			AccessMode::AllowList2232		));2233		assert_ok!(TemplateModule::set_mint_permission(2234			origin1,2235			collection_id,2236			true2237		));22382239		assert_noop!(2240			TemplateModule::create_item(2241				origin2,2242				collection_id,2243				account(2),2244				default_nft_data().into()2245			)2246			.map_err(|e| e.error),2247			CommonError::<Test>::AddressNotInAllowlist2248		);2249	});2250}22512252// If 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.2253#[test]2254fn allow_list_test_16() {2255	new_test_ext().execute_with(|| {2256		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));22572258		let origin1 = Origin::signed(1);2259		let origin2 = Origin::signed(2);22602261		assert_ok!(TemplateModule::set_public_access_mode(2262			origin1.clone(),2263			collection_id,2264			AccessMode::AllowList2265		));2266		assert_ok!(TemplateModule::set_mint_permission(2267			origin1.clone(),2268			collection_id,2269			true2270		));2271		assert_ok!(TemplateModule::add_to_allow_list(2272			origin1,2273			collection_id,2274			account(2)2275		));22762277		assert_ok!(TemplateModule::create_item(2278			origin2,2279			collection_id,2280			account(2),2281			default_nft_data().into()2282		));2283	});2284}22852286// Total number of collections. Positive test2287#[test]2288fn total_number_collections_bound() {2289	new_test_ext().execute_with(|| {2290		create_test_collection(&CollectionMode::NFT, CollectionId(1));2291	});2292}22932294#[test]2295fn create_max_collections() {2296	new_test_ext().execute_with(|| {2297		for i in 1..COLLECTION_NUMBER_LIMIT {2298			create_test_collection(&CollectionMode::NFT, CollectionId(i));2299		}2300	});2301}23022303// Total number of collections. Negative test2304#[test]2305fn total_number_collections_bound_neg() {2306	new_test_ext().execute_with(|| {2307		let origin1 = Origin::signed(1);23082309		for i in 1..=COLLECTION_NUMBER_LIMIT {2310			create_test_collection(&CollectionMode::NFT, CollectionId(i));2311		}23122313		let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();2314		let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();2315		let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();23162317		let data: CreateCollectionData<u64> = CreateCollectionData {2318			name: col_name1.try_into().unwrap(),2319			description: col_desc1.try_into().unwrap(),2320			token_prefix: token_prefix1.try_into().unwrap(),2321			mode: CollectionMode::NFT,2322			..Default::default()2323		};23242325		// 11-th collection in chain. Expects error2326		assert_noop!(2327			TemplateModule::create_collection_ex(origin1, data),2328			CommonError::<Test>::TotalCollectionsLimitExceeded2329		);2330	});2331}23322333// Owned tokens by a single address. Positive test2334#[test]2335fn owned_tokens_bound() {2336	new_test_ext().execute_with(|| {2337		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));23382339		let data = default_nft_data();2340		create_test_item(collection_id, &data.clone().into());2341		create_test_item(collection_id, &data.into());2342	});2343}23442345// Owned tokens by a single address. Negotive test2346#[test]2347fn owned_tokens_bound_neg() {2348	new_test_ext().execute_with(|| {2349		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));23502351		let origin1 = Origin::signed(1);23522353		for _ in 1..=MAX_TOKEN_OWNERSHIP {2354			let data = default_nft_data();2355			create_test_item(collection_id, &data.clone().into());2356		}23572358		let data = default_nft_data();2359		assert_noop!(2360			TemplateModule::create_item(origin1, CollectionId(1), account(1), data.into())2361				.map_err(|e| e.error),2362			CommonError::<Test>::AccountTokenLimitExceeded2363		);2364	});2365}23662367// Number of collection admins. Positive test2368#[test]2369fn collection_admins_bound() {2370	new_test_ext().execute_with(|| {2371		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));23722373		let origin1 = Origin::signed(1);23742375		assert_ok!(TemplateModule::add_collection_admin(2376			origin1.clone(),2377			collection_id,2378			account(2)2379		));2380		assert_ok!(TemplateModule::add_collection_admin(2381			origin1,2382			collection_id,2383			account(3)2384		));2385	});2386}23872388// Number of collection admins. Negotive test2389#[test]2390fn collection_admins_bound_neg() {2391	new_test_ext().execute_with(|| {2392		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));23932394		let origin1 = Origin::signed(1);23952396		for i in 0..COLLECTION_ADMINS_LIMIT {2397			assert_ok!(TemplateModule::add_collection_admin(2398				origin1.clone(),2399				collection_id,2400				account((2 + i).into())2401			));2402		}2403		assert_noop!(2404			TemplateModule::add_collection_admin(2405				origin1,2406				collection_id,2407				account((3 + COLLECTION_ADMINS_LIMIT).into())2408			),2409			CommonError::<Test>::CollectionAdminCountExceeded2410		);2411	});2412}2413// #endregion24142415#[test]2416fn set_const_on_chain_schema() {2417	new_test_ext().execute_with(|| {2418		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));24192420		let origin1 = Origin::signed(1);2421		assert_ok!(TemplateModule::set_const_on_chain_schema(2422			origin1,2423			collection_id,2424			b"test const on chain schema".to_vec().try_into().unwrap()2425		));24262427		assert_eq!(2428			<pallet_common::CollectionById<Test>>::get(collection_id)2429				.unwrap()2430				.const_on_chain_schema,2431			b"test const on chain schema".to_vec()2432		);2433		assert_eq!(2434			<pallet_common::CollectionById<Test>>::get(collection_id)2435				.unwrap()2436				.variable_on_chain_schema,2437			b"".to_vec()2438		);2439	});2440}24412442#[test]2443fn set_variable_on_chain_schema() {2444	new_test_ext().execute_with(|| {2445		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));24462447		let origin1 = Origin::signed(1);2448		assert_ok!(TemplateModule::set_variable_on_chain_schema(2449			origin1,2450			collection_id,2451			b"test variable on chain schema"2452				.to_vec()2453				.try_into()2454				.unwrap()2455		));24562457		assert_eq!(2458			<pallet_common::CollectionById<Test>>::get(collection_id)2459				.unwrap()2460				.const_on_chain_schema,2461			b"".to_vec()2462		);2463		assert_eq!(2464			<pallet_common::CollectionById<Test>>::get(collection_id)2465				.unwrap()2466				.variable_on_chain_schema,2467			b"test variable on chain schema".to_vec()2468		);2469	});2470}24712472#[test]2473fn set_variable_meta_data_on_nft_token_stores_variable_meta_data() {2474	new_test_ext().execute_with(|| {2475		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));24762477		let origin1 = Origin::signed(1);24782479		let data = default_nft_data();2480		create_test_item(CollectionId(1), &data.into());24812482		let variable_data = b"test data".to_vec();2483		assert_ok!(TemplateModule::set_variable_meta_data(2484			origin1,2485			collection_id,2486			TokenId(1),2487			variable_data.clone().try_into().unwrap()2488		));24892490		assert_eq!(2491			<pallet_nonfungible::TokenData<Test>>::get((collection_id, 1))2492				.unwrap()2493				.variable_data,2494			variable_data2495		);2496	});2497}24982499#[test]2500fn set_variable_meta_data_on_re_fungible_token_stores_variable_meta_data() {2501	new_test_ext().execute_with(|| {2502		let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));25032504		let origin1 = Origin::signed(1);25052506		let data = default_re_fungible_data();2507		create_test_item(collection_id, &data.into());25082509		let variable_data = b"test data".to_vec();2510		assert_ok!(TemplateModule::set_variable_meta_data(2511			origin1,2512			collection_id,2513			TokenId(1),2514			variable_data.clone().try_into().unwrap()2515		));25162517		assert_eq!(2518			<pallet_refungible::TokenData<Test>>::get((collection_id, TokenId(1))).variable_data,2519			variable_data2520		);2521	});2522}25232524#[test]2525fn set_variable_meta_data_on_fungible_token_fails() {2526	new_test_ext().execute_with(|| {2527		let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));25282529		let origin1 = Origin::signed(1);25302531		let data = default_fungible_data();2532		create_test_item(collection_id, &data.into());25332534		let variable_data = b"test data".to_vec();2535		assert_noop!(2536			TemplateModule::set_variable_meta_data(2537				origin1,2538				collection_id,2539				TokenId(0),2540				variable_data.try_into().unwrap()2541			)2542			.map_err(|e| e.error),2543			<pallet_fungible::Error<Test>>::FungibleItemsDontHaveData2544		);2545	});2546}25472548#[test]2549fn set_variable_meta_data_on_nft_with_item_owner_permission_flag() {2550	new_test_ext().execute_with(|| {2551		//default_limits();25522553		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));25542555		let origin1 = Origin::signed(1);25562557		let data = default_nft_data();2558		create_test_item(collection_id, &data.into());25592560		assert_ok!(TemplateModule::set_meta_update_permission_flag(2561			origin1.clone(),2562			collection_id,2563			MetaUpdatePermission::ItemOwner,2564		));25652566		let variable_data = b"ten chars.".to_vec();2567		assert_ok!(TemplateModule::set_variable_meta_data(2568			origin1,2569			collection_id,2570			TokenId(1),2571			variable_data.clone().try_into().unwrap()2572		));25732574		assert_eq!(2575			<pallet_nonfungible::TokenData<Test>>::get((collection_id, TokenId(1)))2576				.unwrap()2577				.variable_data,2578			variable_data2579		);2580	});2581}25822583#[test]2584fn collection_transfer_flag_works() {2585	new_test_ext().execute_with(|| {2586		let origin1 = Origin::signed(1);25872588		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));2589		assert_ok!(TemplateModule::set_transfers_enabled_flag(2590			origin1,2591			collection_id,2592			true2593		));25942595		let data = default_nft_data();2596		create_test_item(collection_id, &data.into());2597		assert_eq!(2598			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2599			12600		);2601		assert_eq!(2602			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2603			true2604		);26052606		let origin1 = Origin::signed(1);26072608		// default scenario2609		assert_ok!(TemplateModule::transfer(2610			origin1,2611			account(2),2612			collection_id,2613			TokenId(1),2614			12615		));2616		assert_eq!(2617			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2618			false2619		);2620		assert_eq!(2621			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),2622			true2623		);2624		assert_eq!(2625			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2626			02627		);2628		assert_eq!(2629			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(2))),2630			12631		);2632	});2633}26342635#[test]2636fn set_variable_meta_data_on_nft_with_admin_flag() {2637	new_test_ext().execute_with(|| {2638		// default_limits();26392640		let collection_id =2641			create_test_collection_for_owner(&CollectionMode::NFT, 2, CollectionId(1));26422643		let origin1 = Origin::signed(1);2644		let origin2 = Origin::signed(2);26452646		assert_ok!(TemplateModule::set_mint_permission(2647			origin2.clone(),2648			collection_id,2649			true2650		));2651		assert_ok!(TemplateModule::add_to_allow_list(2652			origin2.clone(),2653			collection_id,2654			account(1)2655		));26562657		assert_ok!(TemplateModule::add_collection_admin(2658			origin2.clone(),2659			collection_id,2660			account(1)2661		));26622663		let data = default_nft_data();2664		create_test_item(collection_id, &data.into());26652666		assert_ok!(TemplateModule::set_meta_update_permission_flag(2667			origin2.clone(),2668			collection_id,2669			MetaUpdatePermission::Admin,2670		));26712672		let variable_data = b"test.".to_vec();2673		assert_ok!(TemplateModule::set_variable_meta_data(2674			origin1,2675			collection_id,2676			TokenId(1),2677			variable_data.clone().try_into().unwrap()2678		));26792680		assert_eq!(2681			<pallet_nonfungible::TokenData<Test>>::get((collection_id, 1))2682				.unwrap()2683				.variable_data,2684			variable_data2685		);2686	});2687}26882689#[test]2690fn set_variable_meta_data_on_nft_with_admin_flag_neg() {2691	new_test_ext().execute_with(|| {2692		// default_limits();26932694		let collection_id =2695			create_test_collection_for_owner(&CollectionMode::NFT, 2, CollectionId(1));26962697		let origin1 = Origin::signed(1);2698		let origin2 = Origin::signed(2);26992700		assert_ok!(TemplateModule::set_mint_permission(2701			origin2.clone(),2702			collection_id,2703			true2704		));2705		assert_ok!(TemplateModule::add_to_allow_list(2706			origin2.clone(),2707			collection_id,2708			account(1)2709		));27102711		let data = default_nft_data();2712		create_test_item(collection_id, &data.into());27132714		assert_ok!(TemplateModule::set_meta_update_permission_flag(2715			origin2.clone(),2716			collection_id,2717			MetaUpdatePermission::Admin,2718		));27192720		let variable_data = b"test.".to_vec();2721		assert_noop!(2722			TemplateModule::set_variable_meta_data(2723				origin1,2724				collection_id,2725				TokenId(1),2726				variable_data.try_into().unwrap()2727			)2728			.map_err(|e| e.error),2729			CommonError::<Test>::NoPermission2730		);2731	});2732}27332734#[test]2735fn set_variable_meta_flag_after_freeze() {2736	new_test_ext().execute_with(|| {2737		// default_limits();27382739		let collection_id =2740			create_test_collection_for_owner(&CollectionMode::NFT, 2, CollectionId(1));27412742		let origin2 = Origin::signed(2);27432744		assert_ok!(TemplateModule::set_meta_update_permission_flag(2745			origin2.clone(),2746			collection_id,2747			MetaUpdatePermission::None,2748		));2749		assert_noop!(2750			TemplateModule::set_meta_update_permission_flag(2751				origin2.clone(),2752				collection_id,2753				MetaUpdatePermission::Admin2754			),2755			CommonError::<Test>::MetadataFlagFrozen2756		);2757	});2758}27592760#[test]2761fn set_variable_meta_data_on_nft_with_none_flag_neg() {2762	new_test_ext().execute_with(|| {2763		// default_limits();27642765		let collection_id =2766			create_test_collection_for_owner(&CollectionMode::NFT, 1, CollectionId(1));2767		let origin1 = Origin::signed(1);27682769		let data = default_nft_data();2770		create_test_item(collection_id, &data.into());27712772		assert_ok!(TemplateModule::set_meta_update_permission_flag(2773			origin1.clone(),2774			collection_id,2775			MetaUpdatePermission::None,2776		));27772778		let variable_data = b"test.".to_vec();2779		assert_noop!(2780			TemplateModule::set_variable_meta_data(2781				origin1.clone(),2782				collection_id,2783				TokenId(1),2784				variable_data.try_into().unwrap()2785			)2786			.map_err(|e| e.error),2787			CommonError::<Test>::NoPermission2788		);2789	});2790}27912792#[test]2793fn collection_transfer_flag_works_neg() {2794	new_test_ext().execute_with(|| {2795		let origin1 = Origin::signed(1);27962797		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));2798		assert_ok!(TemplateModule::set_transfers_enabled_flag(2799			origin1,2800			collection_id,2801			false2802		));28032804		let data = default_nft_data();2805		create_test_item(collection_id, &data.into());2806		assert_eq!(2807			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2808			12809		);2810		assert_eq!(2811			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2812			true2813		);28142815		let origin1 = Origin::signed(1);28162817		// default scenario2818		assert_noop!(2819			TemplateModule::transfer(origin1, account(2), CollectionId(1), TokenId(1), 1)2820				.map_err(|e| e.error),2821			CommonError::<Test>::TransferNotAllowed2822		);2823		assert_eq!(2824			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2825			12826		);2827		assert_eq!(2828			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(2))),2829			02830		);2831		assert_eq!(2832			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2833			true2834		);2835		assert_eq!(2836			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),2837			false2838		);2839	});2840}
after · pallets/unique/src/tests.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617// Tests to be written here18use super::*;19use crate::mock::*;20use crate::{AccessMode, CollectionMode};21use up_data_structs::{22	COLLECTION_NUMBER_LIMIT, CollectionId, CreateItemData, CreateFungibleData, CreateNftData,23	CreateReFungibleData, MAX_DECIMAL_POINTS, COLLECTION_ADMINS_LIMIT, MetaUpdatePermission,24	TokenId, MAX_TOKEN_OWNERSHIP,25};26use frame_support::{assert_noop, assert_ok, assert_err};27use sp_std::convert::TryInto;28use pallet_balances;2930fn add_balance(user: u64, value: u64) {31	const DONOR_USER: u64 = 999;32	assert_ok!(<pallet_balances::Pallet<Test>>::set_balance(33		Origin::root(),34		DONOR_USER,35		value,36		037	));38	assert_ok!(<pallet_balances::Pallet<Test>>::force_transfer(39		Origin::root(),40		DONOR_USER,41		user,42		value43	));44}4546fn default_nft_data() -> CreateNftData {47	CreateNftData {48		const_data: vec![1, 2, 3].try_into().unwrap(),49		variable_data: vec![3, 2, 1].try_into().unwrap(),50	}51}5253fn default_fungible_data() -> CreateFungibleData {54	CreateFungibleData { value: 5 }55}5657fn default_re_fungible_data() -> CreateReFungibleData {58	CreateReFungibleData {59		const_data: vec![1, 2, 3].try_into().unwrap(),60		variable_data: vec![3, 2, 1].try_into().unwrap(),61		pieces: 1023,62	}63}6465fn create_test_collection_for_owner(66	mode: &CollectionMode,67	owner: u64,68	id: CollectionId,69) -> CollectionId {70	add_balance(owner, CollectionCreationPrice::get() as u64 + 1);7172	let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();73	let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();74	let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();7576	let data: CreateCollectionData<u64> = CreateCollectionData {77		name: col_name1.try_into().unwrap(),78		description: col_desc1.try_into().unwrap(),79		token_prefix: token_prefix1.try_into().unwrap(),80		mode: mode.clone(),81		..Default::default()82	};8384	let origin1 = Origin::signed(owner);85	assert_ok!(TemplateModule::create_collection_ex(origin1, data));8687	let saved_col_name: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();88	let saved_description: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();89	let saved_prefix: Vec<u8> = b"token_prefix1\0".to_vec();90	assert_eq!(91		<pallet_common::CollectionById<Test>>::get(id)92			.unwrap()93			.owner,94		owner95	);96	assert_eq!(97		<pallet_common::CollectionById<Test>>::get(id).unwrap().name,98		saved_col_name99	);100	assert_eq!(101		<pallet_common::CollectionById<Test>>::get(id).unwrap().mode,102		*mode103	);104	assert_eq!(105		<pallet_common::CollectionById<Test>>::get(id)106			.unwrap()107			.description,108		saved_description109	);110	assert_eq!(111		<pallet_common::CollectionById<Test>>::get(id)112			.unwrap()113			.token_prefix,114		saved_prefix115	);116	id117}118119fn create_test_collection(mode: &CollectionMode, id: CollectionId) -> CollectionId {120	create_test_collection_for_owner(&mode, 1, id)121}122123fn create_test_item(collection_id: CollectionId, data: &CreateItemData) {124	let origin1 = Origin::signed(1);125	assert_ok!(TemplateModule::create_item(126		origin1,127		collection_id,128		account(1),129		data.clone()130	));131}132133fn account(sub: u64) -> TestCrossAccountId {134	TestCrossAccountId::from_sub(sub)135}136137// Use cases tests region138// #region139140#[test]141fn set_version_schema() {142	new_test_ext().execute_with(|| {143		let origin1 = Origin::signed(1);144		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));145146		assert_ok!(TemplateModule::set_schema_version(147			origin1,148			collection_id,149			SchemaVersion::Unique150		));151		assert_eq!(152			<pallet_common::CollectionById<Test>>::get(collection_id)153				.unwrap()154				.schema_version,155			SchemaVersion::Unique156		);157	});158}159160#[test]161fn check_not_sufficient_founds() {162	new_test_ext().execute_with(|| {163		let acc: u64 = 1;164		<pallet_balances::Pallet<Test>>::set_balance(Origin::root(), acc, 0, 0).unwrap();165166		let name: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();167		let description: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();168		let token_prefix: Vec<u8> = b"token_prefix1\0".to_vec();169170		let data: CreateCollectionData<<Test as system::Config>::AccountId> =171			CreateCollectionData {172				name: name.try_into().unwrap(),173				description: description.try_into().unwrap(),174				token_prefix: token_prefix.try_into().unwrap(),175				mode: CollectionMode::NFT,176				..Default::default()177			};178179		let result = TemplateModule::create_collection_ex(Origin::signed(acc), data);180		assert_err!(result, <CommonError<Test>>::NotSufficientFounds);181	});182}183184#[test]185fn create_fungible_collection_fails_with_large_decimal_numbers() {186	new_test_ext().execute_with(|| {187		let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();188		let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();189		let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();190191		let data: CreateCollectionData<u64> = CreateCollectionData {192			name: col_name1.try_into().unwrap(),193			description: col_desc1.try_into().unwrap(),194			token_prefix: token_prefix1.try_into().unwrap(),195			mode: CollectionMode::Fungible(MAX_DECIMAL_POINTS + 1),196			..Default::default()197		};198199		let origin1 = Origin::signed(1);200		assert_noop!(201			TemplateModule::create_collection_ex(origin1, data),202			Error::<Test>::CollectionDecimalPointLimitExceeded203		);204	});205}206207#[test]208fn create_nft_item() {209	new_test_ext().execute_with(|| {210		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));211212		let data = default_nft_data();213		create_test_item(collection_id, &data.clone().into());214215		let item = <pallet_nonfungible::TokenData<Test>>::get((collection_id, 1)).unwrap();216		assert_eq!(item.const_data, data.const_data.into_inner());217		assert_eq!(item.variable_data, data.variable_data.into_inner());218	});219}220221// Use cases tests region222// #region223#[test]224fn create_nft_multiple_items() {225	new_test_ext().execute_with(|| {226		create_test_collection(&CollectionMode::NFT, CollectionId(1));227228		let origin1 = Origin::signed(1);229230		let items_data = vec![default_nft_data(), default_nft_data(), default_nft_data()];231232		assert_ok!(TemplateModule::create_multiple_items(233			origin1,234			CollectionId(1),235			account(1),236			items_data237				.clone()238				.into_iter()239				.map(|d| { d.into() })240				.collect()241		));242		for (index, data) in items_data.into_iter().enumerate() {243			let item = <pallet_nonfungible::TokenData<Test>>::get((244				CollectionId(1),245				TokenId((index + 1) as u32),246			))247			.unwrap();248			assert_eq!(item.const_data.to_vec(), data.const_data.into_inner());249			assert_eq!(item.variable_data.to_vec(), data.variable_data.into_inner());250		}251	});252}253254#[test]255fn create_refungible_item() {256	new_test_ext().execute_with(|| {257		let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));258259		let data = default_re_fungible_data();260		create_test_item(collection_id, &data.clone().into());261		let item = <pallet_refungible::TokenData<Test>>::get((collection_id, TokenId(1)));262		let balance =263			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1)));264		assert_eq!(item.const_data, data.const_data.into_inner());265		assert_eq!(item.variable_data, data.variable_data.into_inner());266		assert_eq!(balance, 1023);267	});268}269270#[test]271fn create_multiple_refungible_items() {272	new_test_ext().execute_with(|| {273		create_test_collection(&CollectionMode::ReFungible, CollectionId(1));274275		let origin1 = Origin::signed(1);276277		let items_data = vec![278			default_re_fungible_data(),279			default_re_fungible_data(),280			default_re_fungible_data(),281		];282283		assert_ok!(TemplateModule::create_multiple_items(284			origin1,285			CollectionId(1),286			account(1),287			items_data288				.clone()289				.into_iter()290				.map(|d| { d.into() })291				.collect()292		));293		for (index, data) in items_data.into_iter().enumerate() {294			let item = <pallet_refungible::TokenData<Test>>::get((295				CollectionId(1),296				TokenId((index + 1) as u32),297			));298			let balance =299				<pallet_refungible::Balance<Test>>::get((CollectionId(1), TokenId(1), account(1)));300			assert_eq!(item.const_data.to_vec(), data.const_data.into_inner());301			assert_eq!(item.variable_data.to_vec(), data.variable_data.into_inner());302			assert_eq!(balance, 1023);303		}304	});305}306307#[test]308fn create_fungible_item() {309	new_test_ext().execute_with(|| {310		let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));311312		let data = default_fungible_data();313		create_test_item(collection_id, &data.into());314315		assert_eq!(316			<pallet_fungible::Balance<Test>>::get((collection_id, account(1))),317			5318		);319	});320}321322//#[test]323// fn create_multiple_fungible_items() {324//     new_test_ext().execute_with(|| {325//         default_limits();326327//         create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));328329//         let origin1 = Origin::signed(1);330331//         let items_data = vec![default_fungible_data(), default_fungible_data(), default_fungible_data()];332333//         assert_ok!(TemplateModule::create_multiple_items(334//             origin1.clone(),335//             1,336//             1,337//             items_data.clone().into_iter().map(|d| { d.into() }).collect()338//         ));339340//         for (index, _) in items_data.iter().enumerate() {341//             assert_eq!(TemplateModule::fungible_item_id(1, (index + 1) as TokenId).value, 5);342//         }343//         assert_eq!(TemplateModule::balance_count(1, 1), 3000);344//         assert_eq!(TemplateModule::address_tokens(1, 1), [1, 2, 3]);345//     });346// }347348#[test]349fn transfer_fungible_item() {350	new_test_ext().execute_with(|| {351		let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));352353		let origin1 = Origin::signed(1);354		let origin2 = Origin::signed(2);355356		let data = default_fungible_data();357		create_test_item(collection_id, &data.into());358359		assert_eq!(360			<pallet_fungible::Balance<Test>>::get((CollectionId(1), account(1))),361			5362		);363364		// change owner scenario365		assert_ok!(TemplateModule::transfer(366			origin1,367			account(2),368			CollectionId(1),369			TokenId(0),370			5371		));372		assert_eq!(373			<pallet_fungible::Balance<Test>>::get((CollectionId(1), account(1))),374			0375		);376377		// split item scenario378		assert_ok!(TemplateModule::transfer(379			origin2.clone(),380			account(3),381			CollectionId(1),382			TokenId(0),383			3384		));385386		// split item and new owner has account scenario387		assert_ok!(TemplateModule::transfer(388			origin2,389			account(3),390			CollectionId(1),391			TokenId(0),392			1393		));394		assert_eq!(395			<pallet_fungible::Balance<Test>>::get((CollectionId(1), account(2))),396			1397		);398		assert_eq!(399			<pallet_fungible::Balance<Test>>::get((CollectionId(1), account(3))),400			4401		);402	});403}404405#[test]406fn transfer_refungible_item() {407	new_test_ext().execute_with(|| {408		let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));409410		// Create RFT 1 in 1023 pieces for account 1411		let data = default_re_fungible_data();412		create_test_item(collection_id, &data.clone().into());413		let item = <pallet_refungible::TokenData<Test>>::get((collection_id, TokenId(1)));414		assert_eq!(item.const_data, data.const_data.into_inner());415		assert_eq!(item.variable_data, data.variable_data.into_inner());416		assert_eq!(417			<pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),418			1419		);420		assert_eq!(421			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),422			1023423		);424		assert_eq!(425			<pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),426			true427		);428429		// Account 1 transfers all 1023 pieces of RFT 1 to account 2430		let origin1 = Origin::signed(1);431		let origin2 = Origin::signed(2);432		assert_ok!(TemplateModule::transfer(433			origin1,434			account(2),435			CollectionId(1),436			TokenId(1),437			1023438		));439		assert_eq!(440			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(2))),441			1023442		);443		assert_eq!(444			<pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),445			0446		);447		assert_eq!(448			<pallet_refungible::AccountBalance<Test>>::get((collection_id, account(2))),449			1450		);451		assert_eq!(452			<pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),453			false454		);455		assert_eq!(456			<pallet_refungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),457			true458		);459460		// Account 2 transfers 500 pieces of RFT 1 to account 3461		assert_ok!(TemplateModule::transfer(462			origin2.clone(),463			account(3),464			CollectionId(1),465			TokenId(1),466			500467		));468		assert_eq!(469			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(2))),470			523471		);472		assert_eq!(473			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(3))),474			500475		);476		assert_eq!(477			<pallet_refungible::AccountBalance<Test>>::get((collection_id, account(2))),478			1479		);480		assert_eq!(481			<pallet_refungible::AccountBalance<Test>>::get((collection_id, account(3))),482			1483		);484		assert_eq!(485			<pallet_refungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),486			true487		);488		assert_eq!(489			<pallet_refungible::Owned<Test>>::get((collection_id, account(3), TokenId(1))),490			true491		);492493		// Account 2 transfers 200 more pieces of RFT 1 to account 3 with pre-existing balance494		assert_ok!(TemplateModule::transfer(495			origin2,496			account(3),497			CollectionId(1),498			TokenId(1),499			200500		));501		assert_eq!(502			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(2))),503			323504		);505		assert_eq!(506			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(3))),507			700508		);509		assert_eq!(510			<pallet_refungible::AccountBalance<Test>>::get((collection_id, account(2))),511			1512		);513		assert_eq!(514			<pallet_refungible::AccountBalance<Test>>::get((collection_id, account(3))),515			1516		);517		assert_eq!(518			<pallet_refungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),519			true520		);521		assert_eq!(522			<pallet_refungible::Owned<Test>>::get((collection_id, account(3), TokenId(1))),523			true524		);525	});526}527528#[test]529fn transfer_nft_item() {530	new_test_ext().execute_with(|| {531		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));532533		let data = default_nft_data();534		create_test_item(collection_id, &data.into());535		assert_eq!(536			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),537			1538		);539		assert_eq!(540			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),541			true542		);543544		let origin1 = Origin::signed(1);545		// default scenario546		assert_ok!(TemplateModule::transfer(547			origin1,548			account(2),549			CollectionId(1),550			TokenId(1),551			1552		));553		assert_eq!(554			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),555			0556		);557		assert_eq!(558			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(2))),559			1560		);561		assert_eq!(562			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),563			false564		);565		assert_eq!(566			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),567			true568		);569	});570}571572#[test]573fn transfer_nft_item_wrong_value() {574	new_test_ext().execute_with(|| {575		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));576577		let data = default_nft_data();578		create_test_item(collection_id, &data.into());579		assert_eq!(580			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),581			1582		);583		assert_eq!(584			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),585			true586		);587588		let origin1 = Origin::signed(1);589590		assert_noop!(591			TemplateModule::transfer(origin1, account(2), CollectionId(1), TokenId(1), 2)592				.map_err(|e| e.error),593			<pallet_nonfungible::Error::<Test>>::NonfungibleItemsHaveNoAmount594		);595	});596}597598#[test]599fn transfer_nft_item_zero_value() {600	new_test_ext().execute_with(|| {601		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));602603		let data = default_nft_data();604		create_test_item(collection_id, &data.into());605		assert_eq!(606			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),607			1608		);609		assert_eq!(610			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),611			true612		);613614		let origin1 = Origin::signed(1);615616		// Transferring 0 amount works on NFT...617		assert_ok!(TemplateModule::transfer(618			origin1,619			account(2),620			CollectionId(1),621			TokenId(1),622			0623		));624		// ... and results in no transfer625		assert_eq!(626			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),627			1628		);629		assert_eq!(630			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),631			true632		);633	});634}635636#[test]637fn nft_approve_and_transfer_from() {638	new_test_ext().execute_with(|| {639		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));640641		let data = default_nft_data();642		create_test_item(collection_id, &data.into());643644		let origin1 = Origin::signed(1);645		let origin2 = Origin::signed(2);646647		assert_eq!(648			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),649			1650		);651		assert_eq!(652			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),653			true654		);655656		// neg transfer_from657		assert_noop!(658			TemplateModule::transfer_from(659				origin2.clone(),660				account(1),661				account(2),662				CollectionId(1),663				TokenId(1),664				1665			)666			.map_err(|e| e.error),667			CommonError::<Test>::ApprovedValueTooLow668		);669670		// do approve671		assert_ok!(TemplateModule::approve(672			origin1,673			account(2),674			CollectionId(1),675			TokenId(1),676			1677		));678		assert_eq!(679			<pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),680			account(2)681		);682683		assert_ok!(TemplateModule::transfer_from(684			origin2,685			account(1),686			account(3),687			CollectionId(1),688			TokenId(1),689			1690		));691		assert!(692			<pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).is_none()693		);694	});695}696697#[test]698fn nft_approve_and_transfer_from_allow_list() {699	new_test_ext().execute_with(|| {700		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));701702		let origin1 = Origin::signed(1);703		let origin2 = Origin::signed(2);704705		// Create NFT 1 for account 1706		let data = default_nft_data();707		create_test_item(collection_id, &data.clone().into());708		assert_eq!(709			&<pallet_nonfungible::TokenData<Test>>::get((collection_id, TokenId(1)))710				.unwrap()711				.const_data,712			&data.const_data.into_inner()713		);714		assert_eq!(715			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),716			1717		);718		assert_eq!(719			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),720			true721		);722723		// Allow allow-list users to mint and add accounts 1, 2, and 3 to allow-list724		assert_ok!(TemplateModule::set_mint_permission(725			origin1.clone(),726			CollectionId(1),727			true728		));729		assert_ok!(TemplateModule::set_public_access_mode(730			origin1.clone(),731			CollectionId(1),732			AccessMode::AllowList733		));734		assert_ok!(TemplateModule::add_to_allow_list(735			origin1.clone(),736			CollectionId(1),737			account(1)738		));739		assert_ok!(TemplateModule::add_to_allow_list(740			origin1.clone(),741			CollectionId(1),742			account(2)743		));744		assert_ok!(TemplateModule::add_to_allow_list(745			origin1.clone(),746			CollectionId(1),747			account(3)748		));749750		// Account 1 approves account 2 for NFT 1751		assert_ok!(TemplateModule::approve(752			origin1.clone(),753			account(2),754			CollectionId(1),755			TokenId(1),756			1757		));758		assert_eq!(759			<pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),760			account(2)761		);762763		// Account 2 transfers NFT 1 from account 1 to account 3764		assert_ok!(TemplateModule::transfer_from(765			origin2,766			account(1),767			account(3),768			CollectionId(1),769			TokenId(1),770			1771		));772		assert!(773			<pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).is_none()774		);775	});776}777778#[test]779fn refungible_approve_and_transfer_from() {780	new_test_ext().execute_with(|| {781		let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));782783		let origin1 = Origin::signed(1);784		let origin2 = Origin::signed(2);785786		// Create RFT 1 in 1023 pieces for account 1787		let data = default_re_fungible_data();788		create_test_item(collection_id, &data.into());789790		assert_eq!(791			<pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),792			1793		);794		assert_eq!(795			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),796			1023797		);798		assert_eq!(799			<pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),800			true801		);802803		// Allow public minting, enable allow-list and add accounts 1, 2, 3 to allow-list804		assert_ok!(TemplateModule::set_mint_permission(805			origin1.clone(),806			CollectionId(1),807			true808		));809		assert_ok!(TemplateModule::set_public_access_mode(810			origin1.clone(),811			CollectionId(1),812			AccessMode::AllowList813		));814		assert_ok!(TemplateModule::add_to_allow_list(815			origin1.clone(),816			CollectionId(1),817			account(1)818		));819		assert_ok!(TemplateModule::add_to_allow_list(820			origin1.clone(),821			CollectionId(1),822			account(2)823		));824		assert_ok!(TemplateModule::add_to_allow_list(825			origin1.clone(),826			CollectionId(1),827			account(3)828		));829830		// Account 1 approves account 2 for 1023 pieces of RFT 1831		assert_ok!(TemplateModule::approve(832			origin1,833			account(2),834			CollectionId(1),835			TokenId(1),836			1023837		));838		assert_eq!(839			<pallet_refungible::Allowance<Test>>::get((840				CollectionId(1),841				TokenId(1),842				account(1),843				account(2)844			)),845			1023846		);847848		// Account 2 transfers 100 pieces of RFT 1 from account 1 to account 3849		assert_ok!(TemplateModule::transfer_from(850			origin2,851			account(1),852			account(3),853			CollectionId(1),854			TokenId(1),855			100856		));857		assert_eq!(858			<pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),859			1860		);861		assert_eq!(862			<pallet_refungible::AccountBalance<Test>>::get((collection_id, account(3))),863			1864		);865		assert_eq!(866			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),867			923868		);869		assert_eq!(870			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(3))),871			100872		);873		assert_eq!(874			<pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),875			true876		);877		assert_eq!(878			<pallet_refungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),879			true880		);881		assert_eq!(882			<pallet_refungible::Allowance<Test>>::get((883				CollectionId(1),884				TokenId(1),885				account(1),886				account(2)887			)),888			923889		);890	});891}892893#[test]894fn fungible_approve_and_transfer_from() {895	new_test_ext().execute_with(|| {896		let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));897898		let data = default_fungible_data();899		create_test_item(collection_id, &data.into());900901		let origin1 = Origin::signed(1);902		let origin2 = Origin::signed(2);903904		assert_ok!(TemplateModule::set_mint_permission(905			origin1.clone(),906			CollectionId(1),907			true908		));909		assert_ok!(TemplateModule::set_public_access_mode(910			origin1.clone(),911			CollectionId(1),912			AccessMode::AllowList913		));914		assert_ok!(TemplateModule::add_to_allow_list(915			origin1.clone(),916			CollectionId(1),917			account(1)918		));919		assert_ok!(TemplateModule::add_to_allow_list(920			origin1.clone(),921			CollectionId(1),922			account(2)923		));924		assert_ok!(TemplateModule::add_to_allow_list(925			origin1.clone(),926			CollectionId(1),927			account(3)928		));929930		// do approve931		assert_ok!(TemplateModule::approve(932			origin1.clone(),933			account(2),934			CollectionId(1),935			TokenId(0),936			5937		));938		assert_eq!(939			<pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(2))),940			5941		);942		assert_ok!(TemplateModule::approve(943			origin1,944			account(3),945			CollectionId(1),946			TokenId(0),947			5948		));949		assert_eq!(950			<pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(2))),951			5952		);953		assert_eq!(954			<pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(3))),955			5956		);957958		assert_ok!(TemplateModule::transfer_from(959			origin2.clone(),960			account(1),961			account(3),962			CollectionId(1),963			TokenId(0),964			4965		));966967		assert_eq!(968			<pallet_fungible::Allowance<Test>>::get((CollectionId(1), account(1), account(2))),969			1970		);971972		assert_noop!(973			TemplateModule::transfer_from(974				origin2,975				account(1),976				account(3),977				CollectionId(1),978				TokenId(0),979				4980			)981			.map_err(|e| e.error),982			CommonError::<Test>::ApprovedValueTooLow983		);984	});985}986987#[test]988fn change_collection_owner() {989	new_test_ext().execute_with(|| {990		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));991992		let origin1 = Origin::signed(1);993		assert_ok!(TemplateModule::change_collection_owner(994			origin1,995			collection_id,996			2997		));998		assert_eq!(999			<pallet_common::CollectionById<Test>>::get(collection_id)1000				.unwrap()1001				.owner,1002			21003		);1004	});1005}10061007#[test]1008fn destroy_collection() {1009	new_test_ext().execute_with(|| {1010		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));10111012		let origin1 = Origin::signed(1);1013		assert_ok!(TemplateModule::destroy_collection(origin1, collection_id));1014	});1015}10161017#[test]1018fn burn_nft_item() {1019	new_test_ext().execute_with(|| {1020		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));10211022		let origin1 = Origin::signed(1);10231024		let data = default_nft_data();1025		create_test_item(collection_id, &data.into());10261027		// check balance (collection with id = 1, user id = 1)1028		assert_eq!(1029			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),1030			11031		);10321033		// burn item1034		assert_ok!(TemplateModule::burn_item(1035			origin1.clone(),1036			collection_id,1037			TokenId(1),1038			11039		));1040		assert_eq!(1041			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),1042			01043		);1044	});1045}10461047#[test]1048fn burn_same_nft_item_twice() {1049	new_test_ext().execute_with(|| {1050		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));10511052		let origin1 = Origin::signed(1);10531054		let data = default_nft_data();1055		create_test_item(collection_id, &data.into());10561057		// check balance (collection with id = 1, user id = 1)1058		assert_eq!(1059			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),1060			11061		);10621063		// burn item1064		assert_ok!(TemplateModule::burn_item(1065			origin1.clone(),1066			collection_id,1067			TokenId(1),1068			11069		));10701071		// burn item again1072		assert_noop!(1073			TemplateModule::burn_item(origin1, collection_id, TokenId(1), 1).map_err(|e| e.error),1074			CommonError::<Test>::TokenNotFound1075		);10761077		assert_eq!(1078			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),1079			01080		);1081	});1082}10831084#[test]1085fn burn_fungible_item() {1086	new_test_ext().execute_with(|| {1087		let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));10881089		let origin1 = Origin::signed(1);1090		assert_ok!(TemplateModule::add_collection_admin(1091			origin1.clone(),1092			collection_id,1093			account(2)1094		));10951096		let data = default_fungible_data();1097		create_test_item(collection_id, &data.into());10981099		// check balance (collection with id = 1, user id = 1)1100		assert_eq!(1101			<pallet_fungible::Balance<Test>>::get((collection_id, account(1))),1102			51103		);11041105		// burn item1106		assert_ok!(TemplateModule::burn_item(1107			origin1.clone(),1108			CollectionId(1),1109			TokenId(0),1110			51111		));1112		assert_noop!(1113			TemplateModule::burn_item(origin1, CollectionId(1), TokenId(0), 5).map_err(|e| e.error),1114			CommonError::<Test>::TokenValueTooLow1115		);11161117		assert_eq!(1118			<pallet_fungible::Balance<Test>>::get((collection_id, account(1))),1119			01120		);1121	});1122}11231124#[test]1125fn burn_fungible_item_with_token_id() {1126	new_test_ext().execute_with(|| {1127		let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));11281129		let origin1 = Origin::signed(1);1130		assert_ok!(TemplateModule::add_collection_admin(1131			origin1.clone(),1132			collection_id,1133			account(2)1134		));11351136		let data = default_fungible_data();1137		create_test_item(collection_id, &data.into());11381139		// check balance (collection with id = 1, user id = 1)1140		assert_eq!(1141			<pallet_fungible::Balance<Test>>::get((collection_id, account(1))),1142			51143		);11441145		// Try to burn item using Token ID1146		assert_noop!(1147			TemplateModule::burn_item(origin1, CollectionId(1), TokenId(1), 5).map_err(|e| e.error),1148			<pallet_fungible::Error::<Test>>::FungibleItemsHaveNoId1149		);1150	});1151}1152#[test]1153fn burn_refungible_item() {1154	new_test_ext().execute_with(|| {1155		let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));1156		let origin1 = Origin::signed(1);11571158		assert_ok!(TemplateModule::set_mint_permission(1159			origin1.clone(),1160			collection_id,1161			true1162		));1163		assert_ok!(TemplateModule::set_public_access_mode(1164			origin1.clone(),1165			collection_id,1166			AccessMode::AllowList1167		));1168		assert_ok!(TemplateModule::add_to_allow_list(1169			origin1.clone(),1170			collection_id,1171			account(1)1172		));11731174		assert_ok!(TemplateModule::add_collection_admin(1175			origin1.clone(),1176			collection_id,1177			account(2)1178		));11791180		let data = default_re_fungible_data();1181		create_test_item(collection_id, &data.into());11821183		// check balance (collection with id = 1, user id = 2)1184		assert_eq!(1185			<pallet_refungible::AccountBalance<Test>>::get((collection_id, account(1))),1186			11187		);1188		assert_eq!(1189			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),1190			10231191		);11921193		// burn item1194		assert_ok!(TemplateModule::burn_item(1195			origin1.clone(),1196			collection_id,1197			TokenId(1),1198			10231199		));1200		assert_noop!(1201			TemplateModule::burn_item(origin1, collection_id, TokenId(1), 1023)1202				.map_err(|e| e.error),1203			CommonError::<Test>::TokenValueTooLow1204		);12051206		assert_eq!(1207			<pallet_refungible::Balance<Test>>::get((collection_id, TokenId(1), account(1))),1208			01209		);1210	});1211}12121213#[test]1214fn add_collection_admin() {1215	new_test_ext().execute_with(|| {1216		let collection1_id =1217			create_test_collection_for_owner(&CollectionMode::NFT, 1, CollectionId(1));1218		let origin1 = Origin::signed(1);12191220		// Add collection admins1221		assert_ok!(TemplateModule::add_collection_admin(1222			origin1.clone(),1223			collection1_id,1224			account(2)1225		));1226		assert_ok!(TemplateModule::add_collection_admin(1227			origin1,1228			collection1_id,1229			account(3)1230		));12311232		// Owner is not an admin by default1233		assert_eq!(1234			<pallet_common::IsAdmin<Test>>::get((CollectionId(1), account(1))),1235			false1236		);1237		assert!(<pallet_common::IsAdmin<Test>>::get((1238			CollectionId(1),1239			account(2)1240		)));1241		assert!(<pallet_common::IsAdmin<Test>>::get((1242			CollectionId(1),1243			account(3)1244		)));1245	});1246}12471248#[test]1249fn remove_collection_admin() {1250	new_test_ext().execute_with(|| {1251		let collection1_id =1252			create_test_collection_for_owner(&CollectionMode::NFT, 1, CollectionId(1));1253		let origin1 = Origin::signed(1);1254		let origin2 = Origin::signed(2);12551256		// Add collection admins 2 and 31257		assert_ok!(TemplateModule::add_collection_admin(1258			origin1.clone(),1259			collection1_id,1260			account(2)1261		));1262		assert_ok!(TemplateModule::add_collection_admin(1263			origin1,1264			collection1_id,1265			account(3)1266		));12671268		assert!(<pallet_common::IsAdmin<Test>>::get((1269			CollectionId(1),1270			account(2)1271		)));1272		assert!(<pallet_common::IsAdmin<Test>>::get((1273			CollectionId(1),1274			account(3)1275		)));12761277		// remove admin 31278		assert_ok!(TemplateModule::remove_collection_admin(1279			origin2,1280			CollectionId(1),1281			account(3)1282		));12831284		// 2 is still admin, 3 is not an admin anymore1285		assert!(<pallet_common::IsAdmin<Test>>::get((1286			CollectionId(1),1287			account(2)1288		)));1289		assert_eq!(1290			<pallet_common::IsAdmin<Test>>::get((CollectionId(1), account(3))),1291			false1292		);1293	});1294}12951296#[test]1297fn balance_of() {1298	new_test_ext().execute_with(|| {1299		let nft_collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1300		let fungible_collection_id =1301			create_test_collection(&CollectionMode::Fungible(3), CollectionId(2));1302		let re_fungible_collection_id =1303			create_test_collection(&CollectionMode::ReFungible, CollectionId(3));13041305		// check balance before1306		assert_eq!(1307			<pallet_nonfungible::AccountBalance<Test>>::get((nft_collection_id, account(1))),1308			01309		);1310		assert_eq!(1311			<pallet_fungible::Balance<Test>>::get((fungible_collection_id, account(1))),1312			01313		);1314		assert_eq!(1315			<pallet_refungible::AccountBalance<Test>>::get((re_fungible_collection_id, account(1))),1316			01317		);13181319		let nft_data = default_nft_data();1320		create_test_item(nft_collection_id, &nft_data.into());13211322		let fungible_data = default_fungible_data();1323		create_test_item(fungible_collection_id, &fungible_data.into());13241325		let re_fungible_data = default_re_fungible_data();1326		create_test_item(re_fungible_collection_id, &re_fungible_data.into());13271328		// check balance (collection with id = 1, user id = 1)1329		assert_eq!(1330			<pallet_nonfungible::AccountBalance<Test>>::get((nft_collection_id, account(1))),1331			11332		);1333		assert_eq!(1334			<pallet_fungible::Balance<Test>>::get((fungible_collection_id, account(1))),1335			51336		);1337		assert_eq!(1338			<pallet_refungible::AccountBalance<Test>>::get((re_fungible_collection_id, account(1))),1339			11340		);13411342		assert_eq!(1343			<pallet_nonfungible::Owned<Test>>::get((nft_collection_id, account(1), TokenId(1))),1344			true1345		);1346		assert_eq!(1347			<pallet_refungible::Owned<Test>>::get((1348				re_fungible_collection_id,1349				account(1),1350				TokenId(1)1351			)),1352			true1353		);1354	});1355}13561357#[test]1358fn approve() {1359	new_test_ext().execute_with(|| {1360		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));13611362		let data = default_nft_data();1363		create_test_item(collection_id, &data.into());13641365		let origin1 = Origin::signed(1);13661367		// approve1368		assert_ok!(TemplateModule::approve(1369			origin1,1370			account(2),1371			CollectionId(1),1372			TokenId(1),1373			11374		));1375		assert_eq!(1376			<pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1377			account(2)1378		);1379	});1380}13811382#[test]1383fn transfer_from() {1384	new_test_ext().execute_with(|| {1385		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1386		let origin1 = Origin::signed(1);1387		let origin2 = Origin::signed(2);13881389		let data = default_nft_data();1390		create_test_item(collection_id, &data.into());13911392		// approve1393		assert_ok!(TemplateModule::approve(1394			origin1.clone(),1395			account(2),1396			CollectionId(1),1397			TokenId(1),1398			11399		));1400		assert_eq!(1401			<pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1402			account(2)1403		);14041405		assert_ok!(TemplateModule::set_mint_permission(1406			origin1.clone(),1407			CollectionId(1),1408			true1409		));1410		assert_ok!(TemplateModule::set_public_access_mode(1411			origin1.clone(),1412			CollectionId(1),1413			AccessMode::AllowList1414		));1415		assert_ok!(TemplateModule::add_to_allow_list(1416			origin1.clone(),1417			CollectionId(1),1418			account(1)1419		));1420		assert_ok!(TemplateModule::add_to_allow_list(1421			origin1.clone(),1422			CollectionId(1),1423			account(2)1424		));1425		assert_ok!(TemplateModule::add_to_allow_list(1426			origin1,1427			CollectionId(1),1428			account(3)1429		));14301431		assert_ok!(TemplateModule::transfer_from(1432			origin2,1433			account(1),1434			account(2),1435			CollectionId(1),1436			TokenId(1),1437			11438		));14391440		// after transfer1441		assert_eq!(1442			<pallet_nonfungible::AccountBalance<Test>>::get((CollectionId(1), account(1))),1443			01444		);1445		assert_eq!(1446			<pallet_nonfungible::AccountBalance<Test>>::get((CollectionId(1), account(2))),1447			11448		);1449	});1450}14511452// #endregion14531454// Coverage tests region1455// #region14561457#[test]1458fn owner_can_add_address_to_allow_list() {1459	new_test_ext().execute_with(|| {1460		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));14611462		let origin1 = Origin::signed(1);1463		assert_ok!(TemplateModule::add_to_allow_list(1464			origin1,1465			collection_id,1466			account(2)1467		));1468		assert!(<pallet_common::Allowlist<Test>>::get((1469			collection_id,1470			account(2)1471		)));1472	});1473}14741475#[test]1476fn admin_can_add_address_to_allow_list() {1477	new_test_ext().execute_with(|| {1478		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1479		let origin1 = Origin::signed(1);1480		let origin2 = Origin::signed(2);14811482		assert_ok!(TemplateModule::add_collection_admin(1483			origin1,1484			collection_id,1485			account(2)1486		));1487		assert_ok!(TemplateModule::add_to_allow_list(1488			origin2,1489			collection_id,1490			account(3)1491		));1492		assert!(<pallet_common::Allowlist<Test>>::get((1493			collection_id,1494			account(3)1495		)));1496	});1497}14981499#[test]1500fn nonprivileged_user_cannot_add_address_to_allow_list() {1501	new_test_ext().execute_with(|| {1502		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));15031504		let origin2 = Origin::signed(2);1505		assert_noop!(1506			TemplateModule::add_to_allow_list(origin2, collection_id, account(3)),1507			CommonError::<Test>::NoPermission1508		);1509	});1510}15111512#[test]1513fn nobody_can_add_address_to_allow_list_of_nonexisting_collection() {1514	new_test_ext().execute_with(|| {1515		let origin1 = Origin::signed(1);15161517		assert_noop!(1518			TemplateModule::add_to_allow_list(origin1, CollectionId(1), account(2)),1519			CommonError::<Test>::CollectionNotFound1520		);1521	});1522}15231524#[test]1525fn nobody_can_add_address_to_allow_list_of_deleted_collection() {1526	new_test_ext().execute_with(|| {1527		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));15281529		let origin1 = Origin::signed(1);1530		assert_ok!(TemplateModule::destroy_collection(1531			origin1.clone(),1532			collection_id1533		));1534		assert_noop!(1535			TemplateModule::add_to_allow_list(origin1, collection_id, account(2)),1536			CommonError::<Test>::CollectionNotFound1537		);1538	});1539}15401541// If address is already added to allow list, nothing happens1542#[test]1543fn address_is_already_added_to_allow_list() {1544	new_test_ext().execute_with(|| {1545		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1546		let origin1 = Origin::signed(1);15471548		assert_ok!(TemplateModule::add_to_allow_list(1549			origin1.clone(),1550			collection_id,1551			account(2)1552		));1553		assert_ok!(TemplateModule::add_to_allow_list(1554			origin1,1555			collection_id,1556			account(2)1557		));1558		assert!(<pallet_common::Allowlist<Test>>::get((1559			collection_id,1560			account(2)1561		)));1562	});1563}15641565#[test]1566fn owner_can_remove_address_from_allow_list() {1567	new_test_ext().execute_with(|| {1568		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));15691570		let origin1 = Origin::signed(1);1571		assert_ok!(TemplateModule::add_to_allow_list(1572			origin1.clone(),1573			collection_id,1574			account(2)1575		));1576		assert_ok!(TemplateModule::remove_from_allow_list(1577			origin1,1578			collection_id,1579			account(2)1580		));1581		assert_eq!(1582			<pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1583			false1584		);1585	});1586}15871588#[test]1589fn admin_can_remove_address_from_allow_list() {1590	new_test_ext().execute_with(|| {1591		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1592		let origin1 = Origin::signed(1);1593		let origin2 = Origin::signed(2);15941595		// Owner adds admin1596		assert_ok!(TemplateModule::add_collection_admin(1597			origin1.clone(),1598			collection_id,1599			account(2)1600		));16011602		// Owner adds address 3 to allow list1603		assert_ok!(TemplateModule::add_to_allow_list(1604			origin1,1605			collection_id,1606			account(3)1607		));16081609		// Admin removes address 3 from allow list1610		assert_ok!(TemplateModule::remove_from_allow_list(1611			origin2,1612			collection_id,1613			account(3)1614		));1615		assert_eq!(1616			<pallet_common::Allowlist<Test>>::get((collection_id, account(3))),1617			false1618		);1619	});1620}16211622#[test]1623fn nonprivileged_user_cannot_remove_address_from_allow_list() {1624	new_test_ext().execute_with(|| {1625		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1626		let origin1 = Origin::signed(1);1627		let origin2 = Origin::signed(2);16281629		assert_ok!(TemplateModule::add_to_allow_list(1630			origin1,1631			collection_id,1632			account(2)1633		));1634		assert_noop!(1635			TemplateModule::remove_from_allow_list(origin2, collection_id, account(2)),1636			CommonError::<Test>::NoPermission1637		);1638		assert!(<pallet_common::Allowlist<Test>>::get((1639			collection_id,1640			account(2)1641		)));1642	});1643}16441645#[test]1646fn nobody_can_remove_address_from_allow_list_of_nonexisting_collection() {1647	new_test_ext().execute_with(|| {1648		let origin1 = Origin::signed(1);16491650		assert_noop!(1651			TemplateModule::remove_from_allow_list(origin1, CollectionId(1), account(2)),1652			CommonError::<Test>::CollectionNotFound1653		);1654	});1655}16561657#[test]1658fn nobody_can_remove_address_from_allow_list_of_deleted_collection() {1659	new_test_ext().execute_with(|| {1660		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1661		let origin1 = Origin::signed(1);1662		let origin2 = Origin::signed(2);16631664		// Add account 2 to allow list1665		assert_ok!(TemplateModule::add_to_allow_list(1666			origin1.clone(),1667			collection_id,1668			account(2)1669		));16701671		// Account 2 is in collection allow-list1672		assert!(<pallet_common::Allowlist<Test>>::get((1673			collection_id,1674			account(2)1675		)));16761677		// Destroy collection1678		assert_ok!(TemplateModule::destroy_collection(origin1, collection_id));16791680		// Attempt to remove account 2 from collection allow-list => error1681		assert_noop!(1682			TemplateModule::remove_from_allow_list(origin2, collection_id, account(2)),1683			CommonError::<Test>::CollectionNotFound1684		);16851686		// Account 2 is not found in collection allow-list anyway1687		assert_eq!(1688			<pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1689			false1690		);1691	});1692}16931694// If address is already removed from allow list, nothing happens1695#[test]1696fn address_is_already_removed_from_allow_list() {1697	new_test_ext().execute_with(|| {1698		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1699		let origin1 = Origin::signed(1);17001701		assert_ok!(TemplateModule::add_to_allow_list(1702			origin1.clone(),1703			collection_id,1704			account(2)1705		));1706		assert_ok!(TemplateModule::remove_from_allow_list(1707			origin1.clone(),1708			collection_id,1709			account(2)1710		));1711		assert_eq!(1712			<pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1713			false1714		);1715		assert_ok!(TemplateModule::remove_from_allow_list(1716			origin1,1717			collection_id,1718			account(2)1719		));1720		assert_eq!(1721			<pallet_common::Allowlist<Test>>::get((collection_id, account(2))),1722			false1723		);1724	});1725}17261727// If Public Access mode is set to AllowList, tokens can’t be transferred from a non-allowlisted address with transfer or transferFrom (2 tests)1728#[test]1729fn allow_list_test_1() {1730	new_test_ext().execute_with(|| {1731		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));17321733		let origin1 = Origin::signed(1);17341735		let data = default_nft_data();1736		create_test_item(collection_id, &data.into());17371738		assert_ok!(TemplateModule::set_public_access_mode(1739			origin1.clone(),1740			collection_id,1741			AccessMode::AllowList1742		));1743		assert_ok!(TemplateModule::add_to_allow_list(1744			origin1.clone(),1745			collection_id,1746			account(2)1747		));17481749		assert_noop!(1750			TemplateModule::transfer(origin1, account(3), CollectionId(1), TokenId(1), 1)1751				.map_err(|e| e.error),1752			CommonError::<Test>::AddressNotInAllowlist1753		);1754	});1755}17561757#[test]1758fn allow_list_test_2() {1759	new_test_ext().execute_with(|| {1760		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));1761		let origin1 = Origin::signed(1);17621763		let data = default_nft_data();1764		create_test_item(collection_id, &data.into());17651766		assert_ok!(TemplateModule::set_public_access_mode(1767			origin1.clone(),1768			collection_id,1769			AccessMode::AllowList1770		));1771		assert_ok!(TemplateModule::add_to_allow_list(1772			origin1.clone(),1773			collection_id,1774			account(1)1775		));1776		assert_ok!(TemplateModule::add_to_allow_list(1777			origin1.clone(),1778			collection_id,1779			account(2)1780		));17811782		// do approve1783		assert_ok!(TemplateModule::approve(1784			origin1.clone(),1785			account(1),1786			collection_id,1787			TokenId(1),1788			11789		));1790		assert_eq!(1791			<pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1792			account(1)1793		);17941795		assert_ok!(TemplateModule::remove_from_allow_list(1796			origin1.clone(),1797			collection_id,1798			account(1)1799		));18001801		assert_noop!(1802			TemplateModule::transfer_from(1803				origin1,1804				account(1),1805				account(3),1806				CollectionId(1),1807				TokenId(1),1808				11809			)1810			.map_err(|e| e.error),1811			CommonError::<Test>::AddressNotInAllowlist1812		);1813	});1814}18151816// If Public Access mode is set to AllowList, tokens can’t be transferred to a non-allowlisted address with transfer or transferFrom (2 tests)1817#[test]1818fn allow_list_test_3() {1819	new_test_ext().execute_with(|| {1820		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));18211822		let origin1 = Origin::signed(1);18231824		let data = default_nft_data();1825		create_test_item(collection_id, &data.into());18261827		assert_ok!(TemplateModule::set_public_access_mode(1828			origin1.clone(),1829			collection_id,1830			AccessMode::AllowList1831		));1832		assert_ok!(TemplateModule::add_to_allow_list(1833			origin1.clone(),1834			collection_id,1835			account(1)1836		));18371838		assert_noop!(1839			TemplateModule::transfer(origin1, account(3), collection_id, TokenId(1), 1)1840				.map_err(|e| e.error),1841			CommonError::<Test>::AddressNotInAllowlist1842		);1843	});1844}18451846#[test]1847fn allow_list_test_4() {1848	new_test_ext().execute_with(|| {1849		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));18501851		let origin1 = Origin::signed(1);18521853		let data = default_nft_data();1854		create_test_item(collection_id, &data.into());18551856		assert_ok!(TemplateModule::set_public_access_mode(1857			origin1.clone(),1858			collection_id,1859			AccessMode::AllowList1860		));1861		assert_ok!(TemplateModule::add_to_allow_list(1862			origin1.clone(),1863			collection_id,1864			account(1)1865		));1866		assert_ok!(TemplateModule::add_to_allow_list(1867			origin1.clone(),1868			collection_id,1869			account(2)1870		));18711872		// do approve1873		assert_ok!(TemplateModule::approve(1874			origin1.clone(),1875			account(1),1876			collection_id,1877			TokenId(1),1878			11879		));1880		assert_eq!(1881			<pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),1882			account(1)1883		);18841885		assert_ok!(TemplateModule::remove_from_allow_list(1886			origin1.clone(),1887			collection_id,1888			account(2)1889		));18901891		assert_noop!(1892			TemplateModule::transfer_from(1893				origin1,1894				account(1),1895				account(3),1896				collection_id,1897				TokenId(1),1898				11899			)1900			.map_err(|e| e.error),1901			CommonError::<Test>::AddressNotInAllowlist1902		);1903	});1904}19051906// If 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)1907#[test]1908fn allow_list_test_5() {1909	new_test_ext().execute_with(|| {1910		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));19111912		let origin1 = Origin::signed(1);19131914		let data = default_nft_data();1915		create_test_item(collection_id, &data.into());19161917		assert_ok!(TemplateModule::set_public_access_mode(1918			origin1.clone(),1919			collection_id,1920			AccessMode::AllowList1921		));1922		assert_noop!(1923			TemplateModule::burn_item(origin1.clone(), CollectionId(1), TokenId(1), 1)1924				.map_err(|e| e.error),1925			CommonError::<Test>::AddressNotInAllowlist1926		);1927	});1928}19291930// If Public Access mode is set to AllowList, token transfers can’t be Approved by a non-allowlisted address (see Approve method).1931#[test]1932fn allow_list_test_6() {1933	new_test_ext().execute_with(|| {1934		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));19351936		let origin1 = Origin::signed(1);19371938		let data = default_nft_data();1939		create_test_item(collection_id, &data.into());19401941		assert_ok!(TemplateModule::set_public_access_mode(1942			origin1.clone(),1943			collection_id,1944			AccessMode::AllowList1945		));19461947		// do approve1948		assert_noop!(1949			TemplateModule::approve(origin1, account(1), CollectionId(1), TokenId(1), 1)1950				.map_err(|e| e.error),1951			CommonError::<Test>::AddressNotInAllowlist1952		);1953	});1954}19551956// If Public Access mode is set to AllowList, tokens can be transferred from a allowlisted address with transfer or transferFrom (2 tests) and1957//          tokens can be transferred from a allowlisted address with transfer or transferFrom (2 tests)1958#[test]1959fn allow_list_test_7() {1960	new_test_ext().execute_with(|| {1961		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));19621963		let data = default_nft_data();1964		create_test_item(collection_id, &data.into());19651966		let origin1 = Origin::signed(1);19671968		assert_ok!(TemplateModule::set_public_access_mode(1969			origin1.clone(),1970			collection_id,1971			AccessMode::AllowList1972		));1973		assert_ok!(TemplateModule::add_to_allow_list(1974			origin1.clone(),1975			collection_id,1976			account(1)1977		));1978		assert_ok!(TemplateModule::add_to_allow_list(1979			origin1.clone(),1980			collection_id,1981			account(2)1982		));19831984		assert_ok!(TemplateModule::transfer(1985			origin1,1986			account(2),1987			CollectionId(1),1988			TokenId(1),1989			11990		));1991	});1992}19931994#[test]1995fn allow_list_test_8() {1996	new_test_ext().execute_with(|| {1997		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));19981999		// Create NFT for account 12000		let data = default_nft_data();2001		create_test_item(collection_id, &data.into());20022003		let origin1 = Origin::signed(1);20042005		// Toggle Allow List mode and add accounts 1 and 22006		assert_ok!(TemplateModule::set_public_access_mode(2007			origin1.clone(),2008			collection_id,2009			AccessMode::AllowList2010		));2011		assert_ok!(TemplateModule::add_to_allow_list(2012			origin1.clone(),2013			collection_id,2014			account(1)2015		));2016		assert_ok!(TemplateModule::add_to_allow_list(2017			origin1.clone(),2018			collection_id,2019			account(2)2020		));20212022		// Sself-approve account 1 for NFT 12023		assert_ok!(TemplateModule::approve(2024			origin1.clone(),2025			account(1),2026			CollectionId(1),2027			TokenId(1),2028			12029		));2030		assert_eq!(2031			<pallet_nonfungible::Allowance<Test>>::get((CollectionId(1), TokenId(1))).unwrap(),2032			account(1)2033		);20342035		// Transfer from 1 to 22036		assert_ok!(TemplateModule::transfer_from(2037			origin1,2038			account(1),2039			account(2),2040			CollectionId(1),2041			TokenId(1),2042			12043		));2044	});2045}20462047// If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens can be created by owner.2048#[test]2049fn allow_list_test_9() {2050	new_test_ext().execute_with(|| {2051		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));2052		let origin1 = Origin::signed(1);20532054		assert_ok!(TemplateModule::set_public_access_mode(2055			origin1.clone(),2056			collection_id,2057			AccessMode::AllowList2058		));2059		assert_ok!(TemplateModule::set_mint_permission(2060			origin1,2061			collection_id,2062			false2063		));20642065		let data = default_nft_data();2066		create_test_item(collection_id, &data.into());2067	});2068}20692070// If Public Access mode is set to AllowList, and Mint Permission is set to false, tokens can be created by admin.2071#[test]2072fn allow_list_test_10() {2073	new_test_ext().execute_with(|| {2074		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));20752076		let origin1 = Origin::signed(1);2077		let origin2 = Origin::signed(2);20782079		assert_ok!(TemplateModule::set_public_access_mode(2080			origin1.clone(),2081			collection_id,2082			AccessMode::AllowList2083		));2084		assert_ok!(TemplateModule::set_mint_permission(2085			origin1.clone(),2086			collection_id,2087			false2088		));20892090		assert_ok!(TemplateModule::add_collection_admin(2091			origin1,2092			collection_id,2093			account(2)2094		));20952096		assert_ok!(TemplateModule::create_item(2097			origin2,2098			collection_id,2099			account(2),2100			default_nft_data().into()2101		));2102	});2103}21042105// If 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.2106#[test]2107fn allow_list_test_11() {2108	new_test_ext().execute_with(|| {2109		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));21102111		let origin1 = Origin::signed(1);2112		let origin2 = Origin::signed(2);21132114		assert_ok!(TemplateModule::set_public_access_mode(2115			origin1.clone(),2116			collection_id,2117			AccessMode::AllowList2118		));2119		assert_ok!(TemplateModule::set_mint_permission(2120			origin1.clone(),2121			collection_id,2122			false2123		));2124		assert_ok!(TemplateModule::add_to_allow_list(2125			origin1,2126			collection_id,2127			account(2)2128		));21292130		assert_noop!(2131			TemplateModule::create_item(2132				origin2,2133				CollectionId(1),2134				account(2),2135				default_nft_data().into()2136			)2137			.map_err(|e| e.error),2138			CommonError::<Test>::PublicMintingNotAllowed2139		);2140	});2141}21422143// If 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.2144#[test]2145fn allow_list_test_12() {2146	new_test_ext().execute_with(|| {2147		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));21482149		let origin1 = Origin::signed(1);2150		let origin2 = Origin::signed(2);21512152		assert_ok!(TemplateModule::set_public_access_mode(2153			origin1.clone(),2154			collection_id,2155			AccessMode::AllowList2156		));2157		assert_ok!(TemplateModule::set_mint_permission(2158			origin1,2159			collection_id,2160			false2161		));21622163		assert_noop!(2164			TemplateModule::create_item(2165				origin2,2166				CollectionId(1),2167				account(2),2168				default_nft_data().into()2169			)2170			.map_err(|e| e.error),2171			CommonError::<Test>::PublicMintingNotAllowed2172		);2173	});2174}21752176// If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by owner.2177#[test]2178fn allow_list_test_13() {2179	new_test_ext().execute_with(|| {2180		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));21812182		let origin1 = Origin::signed(1);21832184		assert_ok!(TemplateModule::set_public_access_mode(2185			origin1.clone(),2186			collection_id,2187			AccessMode::AllowList2188		));2189		assert_ok!(TemplateModule::set_mint_permission(2190			origin1,2191			collection_id,2192			true2193		));21942195		let data = default_nft_data();2196		create_test_item(collection_id, &data.into());2197	});2198}21992200// If Public Access mode is set to AllowList, and Mint Permission is set to true, tokens can be created by admin.2201#[test]2202fn allow_list_test_14() {2203	new_test_ext().execute_with(|| {2204		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));22052206		let origin1 = Origin::signed(1);2207		let origin2 = Origin::signed(2);22082209		assert_ok!(TemplateModule::set_public_access_mode(2210			origin1.clone(),2211			collection_id,2212			AccessMode::AllowList2213		));2214		assert_ok!(TemplateModule::set_mint_permission(2215			origin1.clone(),2216			collection_id,2217			true2218		));22192220		assert_ok!(TemplateModule::add_collection_admin(2221			origin1,2222			collection_id,2223			account(2)2224		));22252226		assert_ok!(TemplateModule::create_item(2227			origin2,2228			collection_id,2229			account(2),2230			default_nft_data().into()2231		));2232	});2233}22342235// If 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.2236#[test]2237fn allow_list_test_15() {2238	new_test_ext().execute_with(|| {2239		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));22402241		let origin1 = Origin::signed(1);2242		let origin2 = Origin::signed(2);22432244		assert_ok!(TemplateModule::set_public_access_mode(2245			origin1.clone(),2246			collection_id,2247			AccessMode::AllowList2248		));2249		assert_ok!(TemplateModule::set_mint_permission(2250			origin1,2251			collection_id,2252			true2253		));22542255		assert_noop!(2256			TemplateModule::create_item(2257				origin2,2258				collection_id,2259				account(2),2260				default_nft_data().into()2261			)2262			.map_err(|e| e.error),2263			CommonError::<Test>::AddressNotInAllowlist2264		);2265	});2266}22672268// If 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.2269#[test]2270fn allow_list_test_16() {2271	new_test_ext().execute_with(|| {2272		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));22732274		let origin1 = Origin::signed(1);2275		let origin2 = Origin::signed(2);22762277		assert_ok!(TemplateModule::set_public_access_mode(2278			origin1.clone(),2279			collection_id,2280			AccessMode::AllowList2281		));2282		assert_ok!(TemplateModule::set_mint_permission(2283			origin1.clone(),2284			collection_id,2285			true2286		));2287		assert_ok!(TemplateModule::add_to_allow_list(2288			origin1,2289			collection_id,2290			account(2)2291		));22922293		assert_ok!(TemplateModule::create_item(2294			origin2,2295			collection_id,2296			account(2),2297			default_nft_data().into()2298		));2299	});2300}23012302// Total number of collections. Positive test2303#[test]2304fn total_number_collections_bound() {2305	new_test_ext().execute_with(|| {2306		create_test_collection(&CollectionMode::NFT, CollectionId(1));2307	});2308}23092310#[test]2311fn create_max_collections() {2312	new_test_ext().execute_with(|| {2313		for i in 1..COLLECTION_NUMBER_LIMIT {2314			create_test_collection(&CollectionMode::NFT, CollectionId(i));2315		}2316	});2317}23182319// Total number of collections. Negative test2320#[test]2321fn total_number_collections_bound_neg() {2322	new_test_ext().execute_with(|| {2323		let origin1 = Origin::signed(1);23242325		for i in 1..=COLLECTION_NUMBER_LIMIT {2326			create_test_collection(&CollectionMode::NFT, CollectionId(i));2327		}23282329		let col_name1: Vec<u16> = "Test1\0".encode_utf16().collect::<Vec<u16>>();2330		let col_desc1: Vec<u16> = "TestDescription1\0".encode_utf16().collect::<Vec<u16>>();2331		let token_prefix1: Vec<u8> = b"token_prefix1\0".to_vec();23322333		let data: CreateCollectionData<u64> = CreateCollectionData {2334			name: col_name1.try_into().unwrap(),2335			description: col_desc1.try_into().unwrap(),2336			token_prefix: token_prefix1.try_into().unwrap(),2337			mode: CollectionMode::NFT,2338			..Default::default()2339		};23402341		// 11-th collection in chain. Expects error2342		assert_noop!(2343			TemplateModule::create_collection_ex(origin1, data),2344			CommonError::<Test>::TotalCollectionsLimitExceeded2345		);2346	});2347}23482349// Owned tokens by a single address. Positive test2350#[test]2351fn owned_tokens_bound() {2352	new_test_ext().execute_with(|| {2353		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));23542355		let data = default_nft_data();2356		create_test_item(collection_id, &data.clone().into());2357		create_test_item(collection_id, &data.into());2358	});2359}23602361// Owned tokens by a single address. Negotive test2362#[test]2363fn owned_tokens_bound_neg() {2364	new_test_ext().execute_with(|| {2365		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));23662367		let origin1 = Origin::signed(1);23682369		for _ in 1..=MAX_TOKEN_OWNERSHIP {2370			let data = default_nft_data();2371			create_test_item(collection_id, &data.clone().into());2372		}23732374		let data = default_nft_data();2375		assert_noop!(2376			TemplateModule::create_item(origin1, CollectionId(1), account(1), data.into())2377				.map_err(|e| e.error),2378			CommonError::<Test>::AccountTokenLimitExceeded2379		);2380	});2381}23822383// Number of collection admins. Positive test2384#[test]2385fn collection_admins_bound() {2386	new_test_ext().execute_with(|| {2387		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));23882389		let origin1 = Origin::signed(1);23902391		assert_ok!(TemplateModule::add_collection_admin(2392			origin1.clone(),2393			collection_id,2394			account(2)2395		));2396		assert_ok!(TemplateModule::add_collection_admin(2397			origin1,2398			collection_id,2399			account(3)2400		));2401	});2402}24032404// Number of collection admins. Negotive test2405#[test]2406fn collection_admins_bound_neg() {2407	new_test_ext().execute_with(|| {2408		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));24092410		let origin1 = Origin::signed(1);24112412		for i in 0..COLLECTION_ADMINS_LIMIT {2413			assert_ok!(TemplateModule::add_collection_admin(2414				origin1.clone(),2415				collection_id,2416				account((2 + i).into())2417			));2418		}2419		assert_noop!(2420			TemplateModule::add_collection_admin(2421				origin1,2422				collection_id,2423				account((3 + COLLECTION_ADMINS_LIMIT).into())2424			),2425			CommonError::<Test>::CollectionAdminCountExceeded2426		);2427	});2428}2429// #endregion24302431#[test]2432fn set_const_on_chain_schema() {2433	new_test_ext().execute_with(|| {2434		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));24352436		let origin1 = Origin::signed(1);2437		assert_ok!(TemplateModule::set_const_on_chain_schema(2438			origin1,2439			collection_id,2440			b"test const on chain schema".to_vec().try_into().unwrap()2441		));24422443		assert_eq!(2444			<pallet_common::CollectionById<Test>>::get(collection_id)2445				.unwrap()2446				.const_on_chain_schema,2447			b"test const on chain schema".to_vec()2448		);2449		assert_eq!(2450			<pallet_common::CollectionById<Test>>::get(collection_id)2451				.unwrap()2452				.variable_on_chain_schema,2453			b"".to_vec()2454		);2455	});2456}24572458#[test]2459fn set_variable_on_chain_schema() {2460	new_test_ext().execute_with(|| {2461		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));24622463		let origin1 = Origin::signed(1);2464		assert_ok!(TemplateModule::set_variable_on_chain_schema(2465			origin1,2466			collection_id,2467			b"test variable on chain schema"2468				.to_vec()2469				.try_into()2470				.unwrap()2471		));24722473		assert_eq!(2474			<pallet_common::CollectionById<Test>>::get(collection_id)2475				.unwrap()2476				.const_on_chain_schema,2477			b"".to_vec()2478		);2479		assert_eq!(2480			<pallet_common::CollectionById<Test>>::get(collection_id)2481				.unwrap()2482				.variable_on_chain_schema,2483			b"test variable on chain schema".to_vec()2484		);2485	});2486}24872488#[test]2489fn set_variable_meta_data_on_nft_token_stores_variable_meta_data() {2490	new_test_ext().execute_with(|| {2491		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));24922493		let origin1 = Origin::signed(1);24942495		let data = default_nft_data();2496		create_test_item(CollectionId(1), &data.into());24972498		let variable_data = b"test data".to_vec();2499		assert_ok!(TemplateModule::set_variable_meta_data(2500			origin1,2501			collection_id,2502			TokenId(1),2503			variable_data.clone().try_into().unwrap()2504		));25052506		assert_eq!(2507			<pallet_nonfungible::TokenData<Test>>::get((collection_id, 1))2508				.unwrap()2509				.variable_data,2510			variable_data2511		);2512	});2513}25142515#[test]2516fn set_variable_meta_data_on_re_fungible_token_stores_variable_meta_data() {2517	new_test_ext().execute_with(|| {2518		let collection_id = create_test_collection(&CollectionMode::ReFungible, CollectionId(1));25192520		let origin1 = Origin::signed(1);25212522		let data = default_re_fungible_data();2523		create_test_item(collection_id, &data.into());25242525		let variable_data = b"test data".to_vec();2526		assert_ok!(TemplateModule::set_variable_meta_data(2527			origin1,2528			collection_id,2529			TokenId(1),2530			variable_data.clone().try_into().unwrap()2531		));25322533		assert_eq!(2534			<pallet_refungible::TokenData<Test>>::get((collection_id, TokenId(1))).variable_data,2535			variable_data2536		);2537	});2538}25392540#[test]2541fn set_variable_meta_data_on_fungible_token_fails() {2542	new_test_ext().execute_with(|| {2543		let collection_id = create_test_collection(&CollectionMode::Fungible(3), CollectionId(1));25442545		let origin1 = Origin::signed(1);25462547		let data = default_fungible_data();2548		create_test_item(collection_id, &data.into());25492550		let variable_data = b"test data".to_vec();2551		assert_noop!(2552			TemplateModule::set_variable_meta_data(2553				origin1,2554				collection_id,2555				TokenId(0),2556				variable_data.try_into().unwrap()2557			)2558			.map_err(|e| e.error),2559			<pallet_fungible::Error<Test>>::FungibleItemsDontHaveData2560		);2561	});2562}25632564#[test]2565fn set_variable_meta_data_on_nft_with_item_owner_permission_flag() {2566	new_test_ext().execute_with(|| {2567		//default_limits();25682569		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));25702571		let origin1 = Origin::signed(1);25722573		let data = default_nft_data();2574		create_test_item(collection_id, &data.into());25752576		assert_ok!(TemplateModule::set_meta_update_permission_flag(2577			origin1.clone(),2578			collection_id,2579			MetaUpdatePermission::ItemOwner,2580		));25812582		let variable_data = b"ten chars.".to_vec();2583		assert_ok!(TemplateModule::set_variable_meta_data(2584			origin1,2585			collection_id,2586			TokenId(1),2587			variable_data.clone().try_into().unwrap()2588		));25892590		assert_eq!(2591			<pallet_nonfungible::TokenData<Test>>::get((collection_id, TokenId(1)))2592				.unwrap()2593				.variable_data,2594			variable_data2595		);2596	});2597}25982599#[test]2600fn collection_transfer_flag_works() {2601	new_test_ext().execute_with(|| {2602		let origin1 = Origin::signed(1);26032604		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));2605		assert_ok!(TemplateModule::set_transfers_enabled_flag(2606			origin1,2607			collection_id,2608			true2609		));26102611		let data = default_nft_data();2612		create_test_item(collection_id, &data.into());2613		assert_eq!(2614			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2615			12616		);2617		assert_eq!(2618			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2619			true2620		);26212622		let origin1 = Origin::signed(1);26232624		// default scenario2625		assert_ok!(TemplateModule::transfer(2626			origin1,2627			account(2),2628			collection_id,2629			TokenId(1),2630			12631		));2632		assert_eq!(2633			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2634			false2635		);2636		assert_eq!(2637			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),2638			true2639		);2640		assert_eq!(2641			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2642			02643		);2644		assert_eq!(2645			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(2))),2646			12647		);2648	});2649}26502651#[test]2652fn set_variable_meta_data_on_nft_with_admin_flag() {2653	new_test_ext().execute_with(|| {2654		// default_limits();26552656		let collection_id =2657			create_test_collection_for_owner(&CollectionMode::NFT, 2, CollectionId(1));26582659		let origin1 = Origin::signed(1);2660		let origin2 = Origin::signed(2);26612662		assert_ok!(TemplateModule::set_mint_permission(2663			origin2.clone(),2664			collection_id,2665			true2666		));2667		assert_ok!(TemplateModule::add_to_allow_list(2668			origin2.clone(),2669			collection_id,2670			account(1)2671		));26722673		assert_ok!(TemplateModule::add_collection_admin(2674			origin2.clone(),2675			collection_id,2676			account(1)2677		));26782679		let data = default_nft_data();2680		create_test_item(collection_id, &data.into());26812682		assert_ok!(TemplateModule::set_meta_update_permission_flag(2683			origin2.clone(),2684			collection_id,2685			MetaUpdatePermission::Admin,2686		));26872688		let variable_data = b"test.".to_vec();2689		assert_ok!(TemplateModule::set_variable_meta_data(2690			origin1,2691			collection_id,2692			TokenId(1),2693			variable_data.clone().try_into().unwrap()2694		));26952696		assert_eq!(2697			<pallet_nonfungible::TokenData<Test>>::get((collection_id, 1))2698				.unwrap()2699				.variable_data,2700			variable_data2701		);2702	});2703}27042705#[test]2706fn set_variable_meta_data_on_nft_with_admin_flag_neg() {2707	new_test_ext().execute_with(|| {2708		// default_limits();27092710		let collection_id =2711			create_test_collection_for_owner(&CollectionMode::NFT, 2, CollectionId(1));27122713		let origin1 = Origin::signed(1);2714		let origin2 = Origin::signed(2);27152716		assert_ok!(TemplateModule::set_mint_permission(2717			origin2.clone(),2718			collection_id,2719			true2720		));2721		assert_ok!(TemplateModule::add_to_allow_list(2722			origin2.clone(),2723			collection_id,2724			account(1)2725		));27262727		let data = default_nft_data();2728		create_test_item(collection_id, &data.into());27292730		assert_ok!(TemplateModule::set_meta_update_permission_flag(2731			origin2.clone(),2732			collection_id,2733			MetaUpdatePermission::Admin,2734		));27352736		let variable_data = b"test.".to_vec();2737		assert_noop!(2738			TemplateModule::set_variable_meta_data(2739				origin1,2740				collection_id,2741				TokenId(1),2742				variable_data.try_into().unwrap()2743			)2744			.map_err(|e| e.error),2745			CommonError::<Test>::NoPermission2746		);2747	});2748}27492750#[test]2751fn set_variable_meta_flag_after_freeze() {2752	new_test_ext().execute_with(|| {2753		// default_limits();27542755		let collection_id =2756			create_test_collection_for_owner(&CollectionMode::NFT, 2, CollectionId(1));27572758		let origin2 = Origin::signed(2);27592760		assert_ok!(TemplateModule::set_meta_update_permission_flag(2761			origin2.clone(),2762			collection_id,2763			MetaUpdatePermission::None,2764		));2765		assert_noop!(2766			TemplateModule::set_meta_update_permission_flag(2767				origin2.clone(),2768				collection_id,2769				MetaUpdatePermission::Admin2770			),2771			CommonError::<Test>::MetadataFlagFrozen2772		);2773	});2774}27752776#[test]2777fn set_variable_meta_data_on_nft_with_none_flag_neg() {2778	new_test_ext().execute_with(|| {2779		// default_limits();27802781		let collection_id =2782			create_test_collection_for_owner(&CollectionMode::NFT, 1, CollectionId(1));2783		let origin1 = Origin::signed(1);27842785		let data = default_nft_data();2786		create_test_item(collection_id, &data.into());27872788		assert_ok!(TemplateModule::set_meta_update_permission_flag(2789			origin1.clone(),2790			collection_id,2791			MetaUpdatePermission::None,2792		));27932794		let variable_data = b"test.".to_vec();2795		assert_noop!(2796			TemplateModule::set_variable_meta_data(2797				origin1.clone(),2798				collection_id,2799				TokenId(1),2800				variable_data.try_into().unwrap()2801			)2802			.map_err(|e| e.error),2803			CommonError::<Test>::NoPermission2804		);2805	});2806}28072808#[test]2809fn collection_transfer_flag_works_neg() {2810	new_test_ext().execute_with(|| {2811		let origin1 = Origin::signed(1);28122813		let collection_id = create_test_collection(&CollectionMode::NFT, CollectionId(1));2814		assert_ok!(TemplateModule::set_transfers_enabled_flag(2815			origin1,2816			collection_id,2817			false2818		));28192820		let data = default_nft_data();2821		create_test_item(collection_id, &data.into());2822		assert_eq!(2823			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2824			12825		);2826		assert_eq!(2827			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2828			true2829		);28302831		let origin1 = Origin::signed(1);28322833		// default scenario2834		assert_noop!(2835			TemplateModule::transfer(origin1, account(2), CollectionId(1), TokenId(1), 1)2836				.map_err(|e| e.error),2837			CommonError::<Test>::TransferNotAllowed2838		);2839		assert_eq!(2840			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(1))),2841			12842		);2843		assert_eq!(2844			<pallet_nonfungible::AccountBalance<Test>>::get((collection_id, account(2))),2845			02846		);2847		assert_eq!(2848			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(1), TokenId(1))),2849			true2850		);2851		assert_eq!(2852			<pallet_nonfungible::Owned<Test>>::get((collection_id, account(2), TokenId(1))),2853			false2854		);2855	});2856}
modifiedpallets/unique/src/weights.rsdiffbeforeafterboth
--- a/pallets/unique/src/weights.rs
+++ b/pallets/unique/src/weights.rs
@@ -3,8 +3,8 @@
 //! Autogenerated weights for pallet_unique
 //!
 //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
-//! DATE: 2021-10-21, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]`
-//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 128
+//! DATE: 2022-03-01, STEPS: `50`, REPEAT: 200, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
 
 // Executed Command:
 // target/release/unique-collator
@@ -18,9 +18,9 @@
 // --template
 // .maintain/frame-weight-template.hbs
 // --steps=50
-// --repeat=20
+// --repeat=200
+// --heap-pages=4096
 // --output=./pallets/unique/src/weights.rs
-
 
 #![cfg_attr(rustfmt, rustfmt_skip)]
 #![allow(unused_parens)]
@@ -61,7 +61,7 @@
 	// Storage: System Account (r:2 w:2)
 	// Storage: Common CollectionById (r:0 w:1)
 	fn create_collection() -> Weight {
-		(23_803_000 as Weight)
+		(28_929_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(4 as Weight))
 			.saturating_add(T::DbWeight::get().writes(4 as Weight))
 	}
@@ -69,116 +69,117 @@
 	// Storage: Common DestroyedCollectionCount (r:1 w:1)
 	// Storage: Nonfungible TokensMinted (r:0 w:1)
 	// Storage: Nonfungible TokensBurnt (r:0 w:1)
+	// Storage: Common AdminAmount (r:0 w:1)
 	fn destroy_collection() -> Weight {
-		(27_831_000 as Weight)
+		(40_303_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(2 as Weight))
-			.saturating_add(T::DbWeight::get().writes(4 as Weight))
+			.saturating_add(T::DbWeight::get().writes(5 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:0)
 	// Storage: Common Allowlist (r:0 w:1)
 	fn add_to_allow_list() -> Weight {
-		(6_629_000 as Weight)
+		(15_989_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:0)
 	// Storage: Common Allowlist (r:0 w:1)
 	fn remove_from_allow_list() -> Weight {
-		(6_596_000 as Weight)
+		(15_582_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn set_public_access_mode() -> Weight {
-		(6_338_000 as Weight)
+		(14_846_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn set_mint_permission() -> Weight {
-		(6_383_000 as Weight)
+		(14_534_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn change_collection_owner() -> Weight {
-		(6_493_000 as Weight)
+		(14_990_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:0)
-	// Storage: Common IsAdmin (r:0 w:1)
+	// Storage: Common IsAdmin (r:1 w:1)
+	// Storage: Common AdminAmount (r:1 w:1)
 	fn add_collection_admin() -> Weight {
-		(6_850_000 as Weight)
-			.saturating_add(T::DbWeight::get().reads(1 as Weight))
-			.saturating_add(T::DbWeight::get().writes(1 as Weight))
+		(19_957_000 as Weight)
+			.saturating_add(T::DbWeight::get().reads(3 as Weight))
+			.saturating_add(T::DbWeight::get().writes(2 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:0)
-	// Storage: Common IsAdmin (r:0 w:1)
+	// Storage: Common IsAdmin (r:1 w:1)
+	// Storage: Common AdminAmount (r:1 w:1)
 	fn remove_collection_admin() -> Weight {
-		(6_615_000 as Weight)
-			.saturating_add(T::DbWeight::get().reads(1 as Weight))
-			.saturating_add(T::DbWeight::get().writes(1 as Weight))
+		(21_209_000 as Weight)
+			.saturating_add(T::DbWeight::get().reads(3 as Weight))
+			.saturating_add(T::DbWeight::get().writes(2 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn set_collection_sponsor() -> Weight {
-		(6_430_000 as Weight)
+		(14_963_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn confirm_sponsorship() -> Weight {
-		(6_125_000 as Weight)
+		(14_478_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn remove_collection_sponsor() -> Weight {
-		(6_236_000 as Weight)
+		(14_393_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn set_transfers_enabled_flag() -> Weight {
-		(6_500_000 as Weight)
+		(7_309_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn set_offchain_schema(_b: u32, ) -> Weight {
-		(6_538_000 as Weight)
+		(15_220_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn set_const_on_chain_schema(_b: u32, ) -> Weight {
-		(6_542_000 as Weight)
+		(14_984_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
-	fn set_variable_on_chain_schema(b: u32, ) -> Weight {
-		(6_092_000 as Weight)
-			// Standard Error: 0
-			.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
+	fn set_variable_on_chain_schema(_b: u32, ) -> Weight {
+		(15_196_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn set_schema_version() -> Weight {
-		(6_470_000 as Weight)
+		(14_596_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn set_collection_limits() -> Weight {
-		(6_841_000 as Weight)
+		(15_339_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn set_meta_update_permission_flag() -> Weight {
-		(6_278_000 as Weight)
+		(7_214_000 as Weight)
 			.saturating_add(T::DbWeight::get().reads(1 as Weight))
 			.saturating_add(T::DbWeight::get().writes(1 as Weight))
 	}
@@ -191,7 +192,7 @@
 	// Storage: System Account (r:2 w:2)
 	// Storage: Common CollectionById (r:0 w:1)
 	fn create_collection() -> Weight {
-		(23_803_000 as Weight)
+		(28_929_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(4 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(4 as Weight))
 	}
@@ -199,117 +200,118 @@
 	// Storage: Common DestroyedCollectionCount (r:1 w:1)
 	// Storage: Nonfungible TokensMinted (r:0 w:1)
 	// Storage: Nonfungible TokensBurnt (r:0 w:1)
+	// Storage: Common AdminAmount (r:0 w:1)
 	fn destroy_collection() -> Weight {
-		(27_831_000 as Weight)
+		(40_303_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(2 as Weight))
-			.saturating_add(RocksDbWeight::get().writes(4 as Weight))
+			.saturating_add(RocksDbWeight::get().writes(5 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:0)
 	// Storage: Common Allowlist (r:0 w:1)
 	fn add_to_allow_list() -> Weight {
-		(6_629_000 as Weight)
+		(15_989_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:0)
 	// Storage: Common Allowlist (r:0 w:1)
 	fn remove_from_allow_list() -> Weight {
-		(6_596_000 as Weight)
+		(15_582_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn set_public_access_mode() -> Weight {
-		(6_338_000 as Weight)
+		(14_846_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn set_mint_permission() -> Weight {
-		(6_383_000 as Weight)
+		(14_534_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn change_collection_owner() -> Weight {
-		(6_493_000 as Weight)
+		(14_990_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:0)
-	// Storage: Common IsAdmin (r:0 w:1)
+	// Storage: Common IsAdmin (r:1 w:1)
+	// Storage: Common AdminAmount (r:1 w:1)
 	fn add_collection_admin() -> Weight {
-		(6_850_000 as Weight)
-			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
-			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
+		(19_957_000 as Weight)
+			.saturating_add(RocksDbWeight::get().reads(3 as Weight))
+			.saturating_add(RocksDbWeight::get().writes(2 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:0)
-	// Storage: Common IsAdmin (r:0 w:1)
+	// Storage: Common IsAdmin (r:1 w:1)
+	// Storage: Common AdminAmount (r:1 w:1)
 	fn remove_collection_admin() -> Weight {
-		(6_615_000 as Weight)
-			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
-			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
+		(21_209_000 as Weight)
+			.saturating_add(RocksDbWeight::get().reads(3 as Weight))
+			.saturating_add(RocksDbWeight::get().writes(2 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn set_collection_sponsor() -> Weight {
-		(6_430_000 as Weight)
+		(14_963_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn confirm_sponsorship() -> Weight {
-		(6_125_000 as Weight)
+		(14_478_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn remove_collection_sponsor() -> Weight {
-		(6_236_000 as Weight)
+		(14_393_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn set_transfers_enabled_flag() -> Weight {
-		(6_500_000 as Weight)
+		(7_309_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn set_offchain_schema(_b: u32, ) -> Weight {
-		(6_538_000 as Weight)
+		(15_220_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn set_const_on_chain_schema(_b: u32, ) -> Weight {
-		(6_542_000 as Weight)
+		(14_984_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
-	fn set_variable_on_chain_schema(b: u32, ) -> Weight {
-		(6_092_000 as Weight)
-			// Standard Error: 0
-			.saturating_add((2_000 as Weight).saturating_mul(b as Weight))
+	fn set_variable_on_chain_schema(_b: u32, ) -> Weight {
+		(15_196_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn set_schema_version() -> Weight {
-		(6_470_000 as Weight)
+		(14_596_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn set_collection_limits() -> Weight {
-		(6_841_000 as Weight)
+		(15_339_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
 	// Storage: Common CollectionById (r:1 w:1)
 	fn set_meta_update_permission_flag() -> Weight {
-		(6_278_000 as Weight)
+		(7_214_000 as Weight)
 			.saturating_add(RocksDbWeight::get().reads(1 as Weight))
 			.saturating_add(RocksDbWeight::get().writes(1 as Weight))
 	}
-}
\ No newline at end of file
+}
modifiedprimitives/data-structs/Cargo.tomldiffbeforeafterboth
--- a/primitives/data-structs/Cargo.toml
+++ b/primitives/data-structs/Cargo.toml
@@ -3,7 +3,7 @@
 authors = ["Unique Network <support@uniquenetwork.io>"]
 description = "Unique data structs definitions"
 edition = "2021"
-license = 'All Rights Reserved'
+license = 'GPLv3'
 homepage = "https://unique.network"
 repository = 'https://github.com/UniqueNetwork/unique-chain'
 version = '0.1.0'
modifiedprimitives/data-structs/src/lib.rsdiffbeforeafterboth
--- a/primitives/data-structs/src/lib.rs
+++ b/primitives/data-structs/src/lib.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #![cfg_attr(not(feature = "std"), no_std)]
 
 use core::{
modifiedprimitives/data-structs/src/migration.rsdiffbeforeafterboth
--- a/primitives/data-structs/src/migration.rs
+++ b/primitives/data-structs/src/migration.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 /// Storage migration is not required for this change, as SponsoringRateLimit has same encoding as Option<u32>
 #[test]
 fn sponsoring_rate_limit_has_same_encoding_as_option_u32() {
modifiedprimitives/evm-mapping/Cargo.tomldiffbeforeafterboth
--- a/primitives/evm-mapping/Cargo.toml
+++ b/primitives/evm-mapping/Cargo.toml
@@ -1,6 +1,7 @@
 [package]
 name = "up-evm-mapping"
 version = "0.1.0"
+license = "GPLv3"
 edition = "2021"
 
 [dependencies]
modifiedprimitives/evm-mapping/src/lib.rsdiffbeforeafterboth
--- a/primitives/evm-mapping/src/lib.rs
+++ b/primitives/evm-mapping/src/lib.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #![cfg_attr(not(feature = "std"), no_std)]
 
 use frame_support::sp_runtime::AccountId32;
modifiedprimitives/rpc/Cargo.tomldiffbeforeafterboth
--- a/primitives/rpc/Cargo.toml
+++ b/primitives/rpc/Cargo.toml
@@ -1,6 +1,7 @@
 [package]
 name = "up-rpc"
 version = "0.1.0"
+license = "GPLv3"
 edition = "2021"
 
 [dependencies]
modifiedprimitives/rpc/src/lib.rsdiffbeforeafterboth
--- a/primitives/rpc/src/lib.rs
+++ b/primitives/rpc/src/lib.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #![cfg_attr(not(feature = "std"), no_std)]
 
 use up_data_structs::{CollectionId, TokenId, Collection, CollectionStats};
modifiedruntime/Cargo.tomldiffbeforeafterboth
--- a/runtime/Cargo.toml
+++ b/runtime/Cargo.toml
@@ -7,10 +7,10 @@
 description = 'Unique Runtime'
 edition = '2021'
 homepage = 'https://unique.network'
-license = 'All Rights Reserved'
+license = 'GPLv3'
 name = 'unique-runtime'
 repository = 'https://github.com/UniqueNetwork/unique-chain'
-version = '0.9.16'
+version = '0.9.17'
 
 [package.metadata.docs.rs]
 targets = ['x86_64-unknown-linux-gnu']
modifiedruntime/build.rsdiffbeforeafterboth
--- a/runtime/build.rs
+++ b/runtime/build.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 use substrate_wasm_builder::WasmBuilder;
 
 fn main() {
modifiedruntime/src/lib.rsdiffbeforeafterboth
--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -1,8 +1,19 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
 
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 //! The Substrate Node Template runtime. This can be compiled with `#[no_std]`, ready for Wasm.
 
 #![cfg_attr(not(feature = "std"), no_std)]
@@ -161,7 +172,7 @@
 	spec_name: create_runtime_str!("opal"),
 	impl_name: create_runtime_str!("opal"),
 	authoring_version: 1,
-	spec_version: 916010,
+	spec_version: 917004,
 	impl_version: 0,
 	apis: RUNTIME_API_VERSIONS,
 	transaction_version: 1,
@@ -264,7 +275,7 @@
 impl FeeCalculator for FixedFee {
 	fn min_gas_price() -> U256 {
 		// Targeting 0.15 UNQ per transfer
-		1_024_947_215_000u64.into()
+		1_018_751_825_264u64.into()
 	}
 }
 
modifiedsmart_contracs/transfer/lib.rsdiffbeforeafterboth
--- a/smart_contracs/transfer/lib.rs
+++ b/smart_contracs/transfer/lib.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #![cfg_attr(not(feature = "std"), no_std)]
 extern crate alloc;
 use alloc::vec::Vec;
modifiedtests/flipper-src/lib.rsdiffbeforeafterboth
--- a/tests/flipper-src/lib.rs
+++ b/tests/flipper-src/lib.rs
@@ -1,3 +1,20 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
+// Original license
 // Copyright 2018-2020 Parity Technologies (UK) Ltd.
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
modifiedtests/ink-types-node-runtime/examples/calls/.ink/abi_gen/main.rsdiffbeforeafterboth
--- a/tests/ink-types-node-runtime/examples/calls/.ink/abi_gen/main.rs
+++ b/tests/ink-types-node-runtime/examples/calls/.ink/abi_gen/main.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 fn main() -> Result<(), std::io::Error> {
     let abi = <contract::Calls as ink_lang::GenerateAbi>::generate_abi();
     let contents = serde_json::to_string_pretty(&abi)?;
modifiedtests/ink-types-node-runtime/examples/calls/lib.rsdiffbeforeafterboth
--- a/tests/ink-types-node-runtime/examples/calls/lib.rs
+++ b/tests/ink-types-node-runtime/examples/calls/lib.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #![cfg_attr(not(feature = "std"), no_std)]
 
 use ink_lang as ink;
modifiedtests/ink-types-node-runtime/src/calls.rsdiffbeforeafterboth
--- a/tests/ink-types-node-runtime/src/calls.rs
+++ b/tests/ink-types-node-runtime/src/calls.rs
@@ -1,3 +1,20 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
+// Original license
 // Copyright 2019 Parity Technologies (UK) Ltd.
 // This file is part of ink!.
 //
modifiedtests/ink-types-node-runtime/src/lib.rsdiffbeforeafterboth
--- a/tests/ink-types-node-runtime/src/lib.rs
+++ b/tests/ink-types-node-runtime/src/lib.rs
@@ -1,3 +1,20 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
+// Original license
 // Copyright 2018-2019 Parity Technologies (UK) Ltd.
 // This file is part of ink!.
 //
modifiedtests/loadtester-src/lib.rsdiffbeforeafterboth
--- a/tests/loadtester-src/lib.rs
+++ b/tests/loadtester-src/lib.rs
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 #![cfg_attr(not(feature = "std"), no_std)]
 
 use ink_lang as ink;
modifiedtests/src/accounts.tsdiffbeforeafterboth
--- a/tests/src/accounts.ts
+++ b/tests/src/accounts.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 export const bobsPublicKey = '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty';
 export const alicesPublicKey = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
modifiedtests/src/addCollectionAdmin.test.tsdiffbeforeafterboth
--- a/tests/src/addCollectionAdmin.test.ts
+++ b/tests/src/addCollectionAdmin.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {ApiPromise} from '@polkadot/api';
 import chai from 'chai';
modifiedtests/src/addToAllowList.test.tsdiffbeforeafterboth
--- a/tests/src/addToAllowList.test.ts
+++ b/tests/src/addToAllowList.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {IKeyringPair} from '@polkadot/types/types';
 import chai from 'chai';
modifiedtests/src/addToContractAllowList.test.tsdiffbeforeafterboth
--- a/tests/src/addToContractAllowList.test.ts
+++ b/tests/src/addToContractAllowList.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import chai from 'chai';
 import chaiAsPromised from 'chai-as-promised';
modifiedtests/src/allowLists.test.tsdiffbeforeafterboth
--- a/tests/src/allowLists.test.ts
+++ b/tests/src/allowLists.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {IKeyringPair} from '@polkadot/types/types';
 import chai from 'chai';
modifiedtests/src/approve.test.tsdiffbeforeafterboth
--- a/tests/src/approve.test.ts
+++ b/tests/src/approve.test.ts
@@ -1,7 +1,19 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 import {IKeyringPair} from '@polkadot/types/types';
 import {ApiPromise} from '@polkadot/api';
 import chai from 'chai';
modifiedtests/src/block-production.test.tsdiffbeforeafterboth
--- a/tests/src/block-production.test.ts
+++ b/tests/src/block-production.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import usingApi from './substrate/substrate-api';
 import {expect} from 'chai';
modifiedtests/src/burnItem.test.tsdiffbeforeafterboth
--- a/tests/src/burnItem.test.ts
+++ b/tests/src/burnItem.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {default as usingApi, submitTransactionAsync, submitTransactionExpectFailAsync} from './substrate/substrate-api';
 import {Keyring} from '@polkadot/api';
modifiedtests/src/change-collection-owner.test.tsdiffbeforeafterboth
--- a/tests/src/change-collection-owner.test.ts
+++ b/tests/src/change-collection-owner.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import chai from 'chai';
 import chaiAsPromised from 'chai-as-promised';
modifiedtests/src/check-event/burnItemEvent.test.tsdiffbeforeafterboth
--- a/tests/src/check-event/burnItemEvent.test.ts
+++ b/tests/src/check-event/burnItemEvent.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 // https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits
 import {ApiPromise} from '@polkadot/api';
modifiedtests/src/check-event/createCollectionEvent.test.tsdiffbeforeafterboth
--- a/tests/src/check-event/createCollectionEvent.test.ts
+++ b/tests/src/check-event/createCollectionEvent.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 // https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits
 import {ApiPromise} from '@polkadot/api';
modifiedtests/src/check-event/createItemEvent.test.tsdiffbeforeafterboth
--- a/tests/src/check-event/createItemEvent.test.ts
+++ b/tests/src/check-event/createItemEvent.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 // https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits
 import {ApiPromise} from '@polkadot/api';
modifiedtests/src/check-event/createMultipleItemsEvent.test.tsdiffbeforeafterboth
--- a/tests/src/check-event/createMultipleItemsEvent.test.ts
+++ b/tests/src/check-event/createMultipleItemsEvent.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 // https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits
 import {ApiPromise} from '@polkadot/api';
modifiedtests/src/check-event/destroyCollectionEvent.test.tsdiffbeforeafterboth
--- a/tests/src/check-event/destroyCollectionEvent.test.ts
+++ b/tests/src/check-event/destroyCollectionEvent.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 // https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits
 import {ApiPromise} from '@polkadot/api';
modifiedtests/src/check-event/transferEvent.test.tsdiffbeforeafterboth
--- a/tests/src/check-event/transferEvent.test.ts
+++ b/tests/src/check-event/transferEvent.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 // https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits
 import {ApiPromise} from '@polkadot/api';
modifiedtests/src/check-event/transferFromEvent.test.tsdiffbeforeafterboth
--- a/tests/src/check-event/transferFromEvent.test.ts
+++ b/tests/src/check-event/transferFromEvent.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 // https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits
 import {ApiPromise} from '@polkadot/api';
modifiedtests/src/collision-tests/admVsOwnerChanges.test.tsdiffbeforeafterboth
--- a/tests/src/collision-tests/admVsOwnerChanges.test.ts
+++ b/tests/src/collision-tests/admVsOwnerChanges.test.ts
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 /* broken by design
 // substrate transactions are sequential, not parallel
 // the order of execution is indeterminate
modifiedtests/src/collision-tests/admVsOwnerData.test.tsdiffbeforeafterboth
--- a/tests/src/collision-tests/admVsOwnerData.test.ts
+++ b/tests/src/collision-tests/admVsOwnerData.test.ts
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 /* broken by design
 // substrate transactions are sequential, not parallel
 // the order of execution is indeterminate
modifiedtests/src/collision-tests/admVsOwnerTake.test.tsdiffbeforeafterboth
--- a/tests/src/collision-tests/admVsOwnerTake.test.ts
+++ b/tests/src/collision-tests/admVsOwnerTake.test.ts
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 /* broken by design
 // substrate transactions are sequential, not parallel
 // the order of execution is indeterminate
modifiedtests/src/collision-tests/adminDestroyCollection.test.tsdiffbeforeafterboth
--- a/tests/src/collision-tests/adminDestroyCollection.test.ts
+++ b/tests/src/collision-tests/adminDestroyCollection.test.ts
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 /* broken by design
 // substrate transactions are sequential, not parallel
 // the order of execution is indeterminate
modifiedtests/src/collision-tests/adminLimitsOff.test.tsdiffbeforeafterboth
--- a/tests/src/collision-tests/adminLimitsOff.test.ts
+++ b/tests/src/collision-tests/adminLimitsOff.test.ts
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 /* broken by design
 // substrate transactions are sequential, not parallel
 // the order of execution is indeterminate
modifiedtests/src/collision-tests/adminRightsOff.test.tsdiffbeforeafterboth
--- a/tests/src/collision-tests/adminRightsOff.test.ts
+++ b/tests/src/collision-tests/adminRightsOff.test.ts
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 /* broken by design
 // substrate transactions are sequential, not parallel
 // the order of execution is indeterminate
modifiedtests/src/collision-tests/setSponsorNewOwner.test.tsdiffbeforeafterboth
--- a/tests/src/collision-tests/setSponsorNewOwner.test.ts
+++ b/tests/src/collision-tests/setSponsorNewOwner.test.ts
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 /* broken by design
 // substrate transactions are sequential, not parallel
 // the order of execution is indeterminate
modifiedtests/src/collision-tests/sponsorPayments.test.tsdiffbeforeafterboth
--- a/tests/src/collision-tests/sponsorPayments.test.ts
+++ b/tests/src/collision-tests/sponsorPayments.test.ts
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 /* broken by design
 // substrate transactions are sequential, not parallel
 // the order of execution is indeterminate
modifiedtests/src/collision-tests/tokenLimitsOff.test.tsdiffbeforeafterboth
--- a/tests/src/collision-tests/tokenLimitsOff.test.ts
+++ b/tests/src/collision-tests/tokenLimitsOff.test.ts
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 /* broken by design
 // substrate transactions are sequential, not parallel
 // the order of execution is indeterminate
modifiedtests/src/collision-tests/turnsOffMinting.test.tsdiffbeforeafterboth
--- a/tests/src/collision-tests/turnsOffMinting.test.ts
+++ b/tests/src/collision-tests/turnsOffMinting.test.ts
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 /* broken by design
 // substrate transactions are sequential, not parallel
 // the order of execution is indeterminate
modifiedtests/src/config.tsdiffbeforeafterboth
--- a/tests/src/config.ts
+++ b/tests/src/config.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import process from 'process';
 
modifiedtests/src/config_docker.tsdiffbeforeafterboth
--- a/tests/src/config_docker.ts
+++ b/tests/src/config_docker.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import process from 'process';
 
modifiedtests/src/confirmSponsorship.test.tsdiffbeforeafterboth
--- a/tests/src/confirmSponsorship.test.ts
+++ b/tests/src/confirmSponsorship.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import chai from 'chai';
 import chaiAsPromised from 'chai-as-promised';
modifiedtests/src/connection.test.tsdiffbeforeafterboth
--- a/tests/src/connection.test.ts
+++ b/tests/src/connection.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import usingApi from './substrate/substrate-api';
 import {WsProvider} from '@polkadot/api';
modifiedtests/src/contracts.test.tsdiffbeforeafterboth
--- a/tests/src/contracts.test.ts
+++ b/tests/src/contracts.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import chai from 'chai';
 import chaiAsPromised from 'chai-as-promised';
modifiedtests/src/createCollection.test.tsdiffbeforeafterboth
--- a/tests/src/createCollection.test.ts
+++ b/tests/src/createCollection.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {expect} from 'chai';
 import privateKey from './substrate/privateKey';
modifiedtests/src/createItem.test.tsdiffbeforeafterboth
--- a/tests/src/createItem.test.ts
+++ b/tests/src/createItem.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {default as usingApi} from './substrate/substrate-api';
 import chai from 'chai';
modifiedtests/src/createMultipleItems.test.tsdiffbeforeafterboth
--- a/tests/src/createMultipleItems.test.ts
+++ b/tests/src/createMultipleItems.test.ts
@@ -1,7 +1,19 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 import {ApiPromise} from '@polkadot/api';
 import {IKeyringPair} from '@polkadot/types/types';
 import chai from 'chai';
modifiedtests/src/createMultipleItemsEx.test.tsdiffbeforeafterboth
--- a/tests/src/createMultipleItemsEx.test.ts
+++ b/tests/src/createMultipleItemsEx.test.ts
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 import {expect} from 'chai';
 import privateKey from './substrate/privateKey';
 import usingApi, {executeTransaction} from './substrate/substrate-api';
modifiedtests/src/creditFeesToTreasury.test.tsdiffbeforeafterboth
--- a/tests/src/creditFeesToTreasury.test.ts
+++ b/tests/src/creditFeesToTreasury.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import './interfaces/augment-api-consts';
 import chai from 'chai';
modifiedtests/src/destroyCollection.test.tsdiffbeforeafterboth
--- a/tests/src/destroyCollection.test.ts
+++ b/tests/src/destroyCollection.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {IKeyringPair} from '@polkadot/types/types';
 import chai from 'chai';
modifiedtests/src/enableContractSponsoring.test.tsdiffbeforeafterboth
--- a/tests/src/enableContractSponsoring.test.ts
+++ b/tests/src/enableContractSponsoring.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {IKeyringPair} from '@polkadot/types/types';
 import chai from 'chai';
modifiedtests/src/enableDisableTransfer.test.tsdiffbeforeafterboth
--- a/tests/src/enableDisableTransfer.test.ts
+++ b/tests/src/enableDisableTransfer.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import chai from 'chai';
 import chaiAsPromised from 'chai-as-promised';
modifiedtests/src/eth/allowlist.test.tsdiffbeforeafterboth
--- a/tests/src/eth/allowlist.test.ts
+++ b/tests/src/eth/allowlist.test.ts
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 import {expect} from 'chai';
 import {contractHelpers, createEthAccountWithBalance, deployFlipper, itWeb3} from './util/helpers';
 
modifiedtests/src/eth/base.test.tsdiffbeforeafterboth
--- a/tests/src/eth/base.test.ts
+++ b/tests/src/eth/base.test.ts
@@ -1,4 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
 
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 import {collectionIdToAddress, createEthAccount, createEthAccountWithBalance, deployFlipper, ethBalanceViaSub, GAS_ARGS, itWeb3, recordEthFee} from './util/helpers';
 import {expect} from 'chai';
 import {createCollectionExpectSuccess, createItemExpectSuccess, UNIQUE} from '../util/helpers';
@@ -39,7 +54,7 @@
 
     const fee = Number(cost) / Number(UNIQUE);
     const expectedFee = 0.15;
-    const tolerance = 0.00001;
+    const tolerance = 0.00002;
 
     expect(Math.abs(fee - expectedFee)).to.be.lessThan(tolerance);
   });
modifiedtests/src/eth/contractSponsoring.test.tsdiffbeforeafterboth
--- a/tests/src/eth/contractSponsoring.test.ts
+++ b/tests/src/eth/contractSponsoring.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import privateKey from '../substrate/privateKey';
 import {expect} from 'chai';
modifiedtests/src/eth/crossTransfer.test.tsdiffbeforeafterboth
--- a/tests/src/eth/crossTransfer.test.ts
+++ b/tests/src/eth/crossTransfer.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import privateKey from '../substrate/privateKey';
 import {createCollectionExpectSuccess,
modifiedtests/src/eth/fungible.test.tsdiffbeforeafterboth
--- a/tests/src/eth/fungible.test.ts
+++ b/tests/src/eth/fungible.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import privateKey from '../substrate/privateKey';
 import {approveExpectSuccess, createCollectionExpectSuccess, createFungibleItemExpectSuccess, transferExpectSuccess, transferFromExpectSuccess, UNIQUE} from '../util/helpers';
modifiedtests/src/eth/helpersSmoke.test.tsdiffbeforeafterboth
--- a/tests/src/eth/helpersSmoke.test.ts
+++ b/tests/src/eth/helpersSmoke.test.ts
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 import {expect} from 'chai';
 import {createEthAccountWithBalance, deployFlipper, itWeb3, contractHelpers} from './util/helpers';
 
modifiedtests/src/eth/marketplace/marketplace.test.tsdiffbeforeafterboth
--- a/tests/src/eth/marketplace/marketplace.test.ts
+++ b/tests/src/eth/marketplace/marketplace.test.ts
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 import {readFile} from 'fs/promises';
 import {getBalanceSingle, transferBalanceExpectSuccess} from '../../substrate/get-balance';
 import privateKey from '../../substrate/privateKey';
modifiedtests/src/eth/metadata.test.tsdiffbeforeafterboth
--- a/tests/src/eth/metadata.test.ts
+++ b/tests/src/eth/metadata.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {expect} from 'chai';
 import {createCollectionExpectSuccess} from '../util/helpers';
modifiedtests/src/eth/migration.test.tsdiffbeforeafterboth
--- a/tests/src/eth/migration.test.ts
+++ b/tests/src/eth/migration.test.ts
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 import {expect} from 'chai';
 import privateKey from '../substrate/privateKey';
 import {submitTransactionAsync} from '../substrate/substrate-api';
modifiedtests/src/eth/nonFungible.test.tsdiffbeforeafterboth
--- a/tests/src/eth/nonFungible.test.ts
+++ b/tests/src/eth/nonFungible.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import privateKey from '../substrate/privateKey';
 import {approveExpectSuccess, burnItemExpectSuccess, createCollectionExpectSuccess, createItemExpectSuccess, setVariableMetaDataExpectSuccess, transferExpectSuccess, transferFromExpectSuccess, UNIQUE, setMetadataUpdatePermissionFlagExpectSuccess} from '../util/helpers';
modifiedtests/src/eth/payable.test.tsdiffbeforeafterboth
--- a/tests/src/eth/payable.test.ts
+++ b/tests/src/eth/payable.test.ts
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 import {expect} from 'chai';
 import privateKey from '../substrate/privateKey';
 import {submitTransactionAsync} from '../substrate/substrate-api';
modifiedtests/src/eth/proxy/fungibleProxy.test.tsdiffbeforeafterboth
--- a/tests/src/eth/proxy/fungibleProxy.test.ts
+++ b/tests/src/eth/proxy/fungibleProxy.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import privateKey from '../../substrate/privateKey';
 import {createCollectionExpectSuccess, createFungibleItemExpectSuccess} from '../../util/helpers';
modifiedtests/src/eth/proxy/nonFungibleProxy.test.tsdiffbeforeafterboth
--- a/tests/src/eth/proxy/nonFungibleProxy.test.ts
+++ b/tests/src/eth/proxy/nonFungibleProxy.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import privateKey from '../../substrate/privateKey';
 import {createCollectionExpectSuccess, createItemExpectSuccess, setVariableMetaDataExpectSuccess, setMetadataUpdatePermissionFlagExpectSuccess} from '../../util/helpers';
modifiedtests/src/eth/sponsoring.test.tsdiffbeforeafterboth
--- a/tests/src/eth/sponsoring.test.ts
+++ b/tests/src/eth/sponsoring.test.ts
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 import {expect} from 'chai';
 import privateKey from '../substrate/privateKey';
 import {contractHelpers, createEthAccount, createEthAccountWithBalance, deployCollector, deployFlipper, itWeb3, SponsoringMode, transferBalanceToEth} from './util/helpers';
modifiedtests/src/eth/util/helpers.d.tsdiffbeforeafterboth
--- a/tests/src/eth/util/helpers.d.ts
+++ b/tests/src/eth/util/helpers.d.ts
@@ -1 +1,17 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 declare module 'solc';
\ No newline at end of file
modifiedtests/src/eth/util/helpers.tsdiffbeforeafterboth
--- a/tests/src/eth/util/helpers.ts
+++ b/tests/src/eth/util/helpers.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 // eslint-disable-next-line @typescript-eslint/triple-slash-reference
 /// <reference path="helpers.d.ts" />
modifiedtests/src/inflation.test.tsdiffbeforeafterboth
--- a/tests/src/inflation.test.ts
+++ b/tests/src/inflation.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import chai from 'chai';
 import chaiAsPromised from 'chai-as-promised';
modifiedtests/src/interfaces/definitions.tsdiffbeforeafterboth
--- a/tests/src/interfaces/definitions.ts
+++ b/tests/src/interfaces/definitions.ts
@@ -1 +1,17 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 export {default as unique} from './unique/definitions';
modifiedtests/src/interfaces/unique/definitions.tsdiffbeforeafterboth
--- a/tests/src/interfaces/unique/definitions.ts
+++ b/tests/src/interfaces/unique/definitions.ts
@@ -1,3 +1,19 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 import types from '../lookup';
 
 type RpcParam = {
modifiedtests/src/limits.test.tsdiffbeforeafterboth
--- a/tests/src/limits.test.ts
+++ b/tests/src/limits.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {IKeyringPair} from '@polkadot/types/types';
 import privateKey from './substrate/privateKey';
modifiedtests/src/metadataUpdate.test.tsdiffbeforeafterboth
--- a/tests/src/metadataUpdate.test.ts
+++ b/tests/src/metadataUpdate.test.ts
@@ -1,8 +1,18 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
 
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import chai from 'chai';
 import chaiAsPromised from 'chai-as-promised';
modifiedtests/src/mintModes.test.tsdiffbeforeafterboth
--- a/tests/src/mintModes.test.ts
+++ b/tests/src/mintModes.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {IKeyringPair} from '@polkadot/types/types';
 import privateKey from './substrate/privateKey';
modifiedtests/src/overflow.test.tsdiffbeforeafterboth
--- a/tests/src/overflow.test.ts
+++ b/tests/src/overflow.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {IKeyringPair} from '@polkadot/types/types';
 import chai from 'chai';
modifiedtests/src/pallet-presence.test.tsdiffbeforeafterboth
--- a/tests/src/pallet-presence.test.ts
+++ b/tests/src/pallet-presence.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {ApiPromise} from '@polkadot/api';
 import {expect} from 'chai';
modifiedtests/src/removeCollectionAdmin.test.tsdiffbeforeafterboth
--- a/tests/src/removeCollectionAdmin.test.ts
+++ b/tests/src/removeCollectionAdmin.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {ApiPromise} from '@polkadot/api';
 import chai from 'chai';
modifiedtests/src/removeCollectionSponsor.test.tsdiffbeforeafterboth
--- a/tests/src/removeCollectionSponsor.test.ts
+++ b/tests/src/removeCollectionSponsor.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import chai from 'chai';
 import chaiAsPromised from 'chai-as-promised';
modifiedtests/src/removeFromAllowList.test.tsdiffbeforeafterboth
--- a/tests/src/removeFromAllowList.test.ts
+++ b/tests/src/removeFromAllowList.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import chai from 'chai';
 import chaiAsPromised from 'chai-as-promised';
modifiedtests/src/removeFromContractAllowList.test.tsdiffbeforeafterboth
--- a/tests/src/removeFromContractAllowList.test.ts
+++ b/tests/src/removeFromContractAllowList.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import privateKey from './substrate/privateKey';
 import usingApi from './substrate/substrate-api';
modifiedtests/src/rpc.load.tsdiffbeforeafterboth
--- a/tests/src/rpc.load.ts
+++ b/tests/src/rpc.load.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import usingApi, {submitTransactionAsync} from './substrate/substrate-api';
 import {IKeyringPair} from '@polkadot/types/types';
modifiedtests/src/scheduler.test.tsdiffbeforeafterboth
--- a/tests/src/scheduler.test.ts
+++ b/tests/src/scheduler.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import chai from 'chai';
 import chaiAsPromised from 'chai-as-promised';
modifiedtests/src/setChainLimits.test.tsdiffbeforeafterboth
--- a/tests/src/setChainLimits.test.ts
+++ b/tests/src/setChainLimits.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {IKeyringPair} from '@polkadot/types/types';
 import privateKey from './substrate/privateKey';
modifiedtests/src/setCollectionLimits.test.tsdiffbeforeafterboth
--- a/tests/src/setCollectionLimits.test.ts
+++ b/tests/src/setCollectionLimits.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 // https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits
 import {ApiPromise, Keyring} from '@polkadot/api';
modifiedtests/src/setCollectionSponsor.test.tsdiffbeforeafterboth
--- a/tests/src/setCollectionSponsor.test.ts
+++ b/tests/src/setCollectionSponsor.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import chai from 'chai';
 import chaiAsPromised from 'chai-as-promised';
modifiedtests/src/setConstOnChainSchema.test.tsdiffbeforeafterboth
--- a/tests/src/setConstOnChainSchema.test.ts
+++ b/tests/src/setConstOnChainSchema.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {Keyring} from '@polkadot/api';
 import {IKeyringPair} from '@polkadot/types/types';
modifiedtests/src/setContractSponsoringRateLimit.test.tsdiffbeforeafterboth
--- a/tests/src/setContractSponsoringRateLimit.test.ts
+++ b/tests/src/setContractSponsoringRateLimit.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {IKeyringPair} from '@polkadot/types/types';
 import privateKey from './substrate/privateKey';
modifiedtests/src/setMintPermission.test.tsdiffbeforeafterboth
--- a/tests/src/setMintPermission.test.ts
+++ b/tests/src/setMintPermission.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {IKeyringPair} from '@polkadot/types/types';
 import privateKey from './substrate/privateKey';
modifiedtests/src/setOffchainSchema.test.tsdiffbeforeafterboth
--- a/tests/src/setOffchainSchema.test.ts
+++ b/tests/src/setOffchainSchema.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {IKeyringPair} from '@polkadot/types/types';
 import chai from 'chai';
modifiedtests/src/setPublicAccessMode.test.tsdiffbeforeafterboth
--- a/tests/src/setPublicAccessMode.test.ts
+++ b/tests/src/setPublicAccessMode.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 // https://unique-network.readthedocs.io/en/latest/jsapi.html#setschemaversion
 import {ApiPromise} from '@polkadot/api';
modifiedtests/src/setSchemaVersion.test.tsdiffbeforeafterboth
--- a/tests/src/setSchemaVersion.test.ts
+++ b/tests/src/setSchemaVersion.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 // https://unique-network.readthedocs.io/en/latest/jsapi.html#setschemaversion
 import {ApiPromise, Keyring} from '@polkadot/api';
modifiedtests/src/setVariableMetaData.test.tsdiffbeforeafterboth
--- a/tests/src/setVariableMetaData.test.ts
+++ b/tests/src/setVariableMetaData.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {IKeyringPair} from '@polkadot/types/types';
 import chai from 'chai';
modifiedtests/src/setVariableMetadataSponsoringRateLimit.test.tsdiffbeforeafterboth
--- a/tests/src/setVariableMetadataSponsoringRateLimit.test.ts
+++ b/tests/src/setVariableMetadataSponsoringRateLimit.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {IKeyringPair} from '@polkadot/types/types';
 import {expect} from 'chai';
modifiedtests/src/setVariableOnChainSchema.test.tsdiffbeforeafterboth
--- a/tests/src/setVariableOnChainSchema.test.ts
+++ b/tests/src/setVariableOnChainSchema.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {Keyring} from '@polkadot/api';
 import {IKeyringPair} from '@polkadot/types/types';
modifiedtests/src/substrate/get-balance.tsdiffbeforeafterboth
--- a/tests/src/substrate/get-balance.ts
+++ b/tests/src/substrate/get-balance.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {ApiPromise} from '@polkadot/api';
 import {AccountInfo} from '@polkadot/types/interfaces/system';
modifiedtests/src/substrate/privateKey.tsdiffbeforeafterboth
--- a/tests/src/substrate/privateKey.ts
+++ b/tests/src/substrate/privateKey.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {Keyring} from '@polkadot/api';
 import {IKeyringPair} from '@polkadot/types/types';
modifiedtests/src/substrate/promisify-substrate.tsdiffbeforeafterboth
--- a/tests/src/substrate/promisify-substrate.ts
+++ b/tests/src/substrate/promisify-substrate.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {ApiPromise} from '@polkadot/api';
 
modifiedtests/src/substrate/substrate-api.tsdiffbeforeafterboth
--- a/tests/src/substrate/substrate-api.ts
+++ b/tests/src/substrate/substrate-api.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import '../interfaces/augment-api-events';
 import {WsProvider, ApiPromise} from '@polkadot/api';
modifiedtests/src/substrate/wait-new-blocks.tsdiffbeforeafterboth
--- a/tests/src/substrate/wait-new-blocks.ts
+++ b/tests/src/substrate/wait-new-blocks.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {ApiPromise} from '@polkadot/api';
 
modifiedtests/src/toggleContractAllowList.test.tsdiffbeforeafterboth
--- a/tests/src/toggleContractAllowList.test.ts
+++ b/tests/src/toggleContractAllowList.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import chai from 'chai';
 import chaiAsPromised from 'chai-as-promised';
modifiedtests/src/transfer.nload.tsdiffbeforeafterboth
--- a/tests/src/transfer.nload.ts
+++ b/tests/src/transfer.nload.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {ApiPromise} from '@polkadot/api';
 import {IKeyringPair} from '@polkadot/types/types';
modifiedtests/src/transfer.test.tsdiffbeforeafterboth
--- a/tests/src/transfer.test.ts
+++ b/tests/src/transfer.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {ApiPromise} from '@polkadot/api';
 import {IKeyringPair} from '@polkadot/types/types';
@@ -325,7 +336,7 @@
     expect(balanceAliceBefore).to.be.eq(balanceAliceAfter);
   });
 
-  itWeb3.only('Transfers to self. In case of inside substrate-evm', async ({api}) => {
+  itWeb3('Transfers to self. In case of inside substrate-evm', async ({api}) => {
     const collectionId = await createCollectionExpectSuccess({mode: {type: 'Fungible', decimalPoints: 0}});
     const alice = privateKey('//Alice');
     const tokenId = await createItemExpectSuccess(alice, collectionId, 'Fungible', {Substrate: alice.address});
modifiedtests/src/transferFrom.test.tsdiffbeforeafterboth
--- a/tests/src/transferFrom.test.ts
+++ b/tests/src/transferFrom.test.ts
@@ -1,7 +1,19 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
 import {ApiPromise} from '@polkadot/api';
 import {IKeyringPair} from '@polkadot/types/types';
 import chai from 'chai';
modifiedtests/src/util/contracthelpers.tsdiffbeforeafterboth
--- a/tests/src/util/contracthelpers.ts
+++ b/tests/src/util/contracthelpers.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import chai from 'chai';
 import chaiAsPromised from 'chai-as-promised';
modifiedtests/src/util/helpers.tsdiffbeforeafterboth
--- a/tests/src/util/helpers.ts
+++ b/tests/src/util/helpers.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import '../interfaces/augment-api-rpc';
 import '../interfaces/augment-api-query';
modifiedtests/src/util/util.tsdiffbeforeafterboth
--- a/tests/src/util/util.ts
+++ b/tests/src/util/util.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 export function strToUTF16(str: string): any {
   const buf: number[] = [];
modifiedtests/src/xcmTransfer.test.tsdiffbeforeafterboth
--- a/tests/src/xcmTransfer.test.ts
+++ b/tests/src/xcmTransfer.test.ts
@@ -1,7 +1,18 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import chai from 'chai';
 import chaiAsPromised from 'chai-as-promised';