difftreelog
Merge pull request #47 from usetech-llc/update_license
in: master
Update license information
25 files changed
LICENSEdiffbeforeafterboth--- a/LICENSE
+++ b/LICENSE
@@ -1,24 +1,15 @@
-This is free and unencumbered software released into the public domain.
-
-Anyone is free to copy, modify, publish, use, compile, sell, or
-distribute this software, either in source code form or as a compiled
-binary, for any purpose, commercial or non-commercial, and by any
-means.
-
-In jurisdictions that recognize copyright laws, the author or authors
-of this software dedicate any and all copyright interest in the
-software to the public domain. We make this dedication for the benefit
-of the public at large and to the detriment of our heirs and
-successors. We intend this dedication to be an overt act of
-relinquishment in perpetuity of all present and future rights to this
-software under copyright law.
+USETECH PROFESSIONAL CONFIDENTIAL
+__________________
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
+ [2019] - [2020] UseTech Professional LTD.
+ All Rights Reserved.
-For more information, please refer to <http://unlicense.org>
+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..
node/build.rsdiffbeforeafterboth--- a/node/build.rs
+++ b/node/build.rs
@@ -1,3 +1,8 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};
fn main() {
node/src/chain_spec.rsdiffbeforeafterboth--- a/node/src/chain_spec.rs
+++ b/node/src/chain_spec.rs
@@ -1,3 +1,8 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
// use nft_runtime::{
// AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig, Signature, SudoConfig,
// SystemConfig, WASM_BINARY,
node/src/main.rsdiffbeforeafterboth--- a/node/src/main.rs
+++ b/node/src/main.rs
@@ -1,3 +1,8 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
//! Substrate Node Template CLI library.
#![warn(missing_docs)]
node/src/service.rsdiffbeforeafterboth--- a/node/src/service.rs
+++ b/node/src/service.rs
@@ -1,5 +1,10 @@
//! Service and ServiceFactory implementation. Specialized wrapper over substrate service.
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
use std::sync::Arc;
use std::time::Duration;
use sc_client_api::{ExecutorProvider, RemoteBackend};
pallets/nft/src/lib.rsdiffbeforeafterboth--- a/pallets/nft/src/lib.rs
+++ b/pallets/nft/src/lib.rs
@@ -1,3 +1,8 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
#![recursion_limit = "1024"]
#![cfg_attr(not(feature = "std"), no_std)]
runtime/src/lib.rsdiffbeforeafterboth--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -1,3 +1,8 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
//! The Substrate Node Template runtime. This can be compiled with `#[no_std]`, ready for Wasm.
#![cfg_attr(not(feature = "std"), no_std)]
runtime/src/nft_weights.rsdiffbeforeafterboth--- a/runtime/src/nft_weights.rs
+++ b/runtime/src/nft_weights.rs
@@ -1,3 +1,8 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight};
pub struct WeightInfo;
tests/src/accounts.tsdiffbeforeafterboth--- a/tests/src/accounts.ts
+++ b/tests/src/accounts.ts
@@ -1,3 +1,8 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
export const bobsPublicKey = '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty';
export const alicesPublicKey = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
export const ferdiesPublicKey = '5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL';
tests/src/blocks-production.test.tsdiffbeforeafterboth--- a/tests/src/blocks-production.test.ts
+++ b/tests/src/blocks-production.test.ts
@@ -1,3 +1,8 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
import usingApi from "./substrate/substrate-api";
import promisifySubstrate from "./substrate/promisify-substrate";
import { expect } from "chai";
tests/src/config.tsdiffbeforeafterboth--- a/tests/src/config.ts
+++ b/tests/src/config.ts
@@ -1,3 +1,8 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
import process from 'process';
const config = {
tests/src/connection.test.tsdiffbeforeafterboth--- a/tests/src/connection.test.ts
+++ b/tests/src/connection.test.ts
@@ -1,3 +1,8 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
import usingApi from "./substrate/substrate-api";
import { WsProvider } from '@polkadot/api';
import * as chai from 'chai';
tests/src/contracts.test.tsdiffbeforeafterboth--- a/tests/src/contracts.test.ts
+++ b/tests/src/contracts.test.ts
@@ -1,3 +1,8 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
import { ApiPromise } from "@polkadot/api";
import { expect } from "chai";
import { default as usingApi, submitTransactionAsync } from "./substrate/substrate-api";
tests/src/createCollection.test.tsdiffbeforeafterboth--- a/tests/src/createCollection.test.ts
+++ b/tests/src/createCollection.test.ts
@@ -1,3 +1,8 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
import { default as usingApi } from "./substrate/substrate-api";
tests/src/createMultipleItems.test.tsdiffbeforeafterboth1import { assert } from 'chai';2import { alicesPublicKey } from './accounts';3import privateKey from './substrate/privateKey';4import usingApi from './substrate/substrate-api';5import waitNewBlocks from './substrate/wait-new-blocks';67const idCollection = 12;89describe('integration test: ext. createMultipleItems():', () => {10 it('Create two NFT tokens in active NFT collection', async () => {11 await usingApi(async (api) => {12 const AitemListIndex = await api.query.nft.itemListIndex(idCollection);13 console.log(`itemListIndex count (before): ${AitemListIndex}`);14 const args = ['NFT', 'NFT'];15 const alicePrivateKey = privateKey('//Alice');16 const createMultipleItems = await api.tx.nft17 .createMultipleItems(idCollection, alicesPublicKey, args)18 .signAndSend(alicePrivateKey);19 // tslint:disable-next-line: no-unused-expression20 assert.exists(createMultipleItems, 'createMultipleItems is neither `null` or `undefined`');21 console.log(`Ext. createMultipleItems submitted with hash: ${createMultipleItems}`);22 await waitNewBlocks(api);23 const BitemListIndex = await api.query.nft.itemListIndex(idCollection);24 console.log(`itemListIndex count (after): ${BitemListIndex}`);25 if (BitemListIndex === AitemListIndex) { assert.fail('Corret token not added in collection!'); }26 });27 });28 it('(!negative test!) Create two Fungible tokens in active NFT collection', async () => {29 await usingApi(async (api) => {30 const AitemListIndex = await api.query.nft.itemListIndex(idCollection);31 console.log(`itemListIndex count (before): ${AitemListIndex}`);32 const args = ['Fungible', 'Fungible'];33 const alicePrivateKey = privateKey('//Alice');34 const createMultipleItems = await api.tx.nft35 .createMultipleItems(idCollection, alicesPublicKey, args)36 .signAndSend(alicePrivateKey);37 // tslint:disable-next-line: no-unused-expression38 assert.exists(createMultipleItems, 'createMultipleItems is neither `null` or `undefined`');39 console.log(`Ext. createMultipleItems submitted with hash: ${createMultipleItems}`);40 await waitNewBlocks(api);41 const BitemListIndex = await api.query.nft.itemListIndex(idCollection);42 console.log(`itemListIndex count (after): ${BitemListIndex}`);43 if (BitemListIndex > AitemListIndex) { assert.fail('Incorrect token added in collection!'); }44 });45 });46 it('(!negative test!) Create two ReFungible tokens in active NFT collection', async () => {47 await usingApi(async (api) => {48 const AitemListIndex = await api.query.nft.itemListIndex(idCollection);49 console.log(`itemListIndex count (before): ${AitemListIndex}`);50 const args = ['ReFungible', 'ReFungible'];51 const alicePrivateKey = privateKey('//Alice');52 const createMultipleItems = await api.tx.nft53 .createMultipleItems(idCollection, alicesPublicKey, args)54 .signAndSend(alicePrivateKey);55 // tslint:disable-next-line: no-unused-expression56 assert.exists(createMultipleItems, 'createMultipleItems is neither `null` or `undefined`');57 console.log(`Ext. createMultipleItems submitted with hash: ${createMultipleItems}`);58 await waitNewBlocks(api);59 const BitemListIndex = await api.query.nft.itemListIndex(idCollection);60 console.log(`itemListIndex count (after): ${BitemListIndex}`);61 if (BitemListIndex > AitemListIndex) { assert.fail('Incorrect token added in collection!'); }62 });63 });64});1//2// This file is subject to the terms and conditions defined in3// file 'LICENSE', which is part of this source code package.4//56import { assert } from 'chai';7import { alicesPublicKey } from './accounts';8import privateKey from './substrate/privateKey';9import usingApi from './substrate/substrate-api';10import waitNewBlocks from './substrate/wait-new-blocks';1112const idCollection = 12;1314describe('integration test: ext. createMultipleItems():', () => {15 it('Create two NFT tokens in active NFT collection', async () => {16 await usingApi(async (api) => {17 const AitemListIndex = await api.query.nft.itemListIndex(idCollection);18 console.log(`itemListIndex count (before): ${AitemListIndex}`);19 const args = ['NFT', 'NFT'];20 const alicePrivateKey = privateKey('//Alice');21 const createMultipleItems = await api.tx.nft22 .createMultipleItems(idCollection, alicesPublicKey, args)23 .signAndSend(alicePrivateKey);24 // tslint:disable-next-line: no-unused-expression25 assert.exists(createMultipleItems, 'createMultipleItems is neither `null` or `undefined`');26 console.log(`Ext. createMultipleItems submitted with hash: ${createMultipleItems}`);27 await waitNewBlocks(api);28 const BitemListIndex = await api.query.nft.itemListIndex(idCollection);29 console.log(`itemListIndex count (after): ${BitemListIndex}`);30 if (BitemListIndex === AitemListIndex) { assert.fail('Corret token not added in collection!'); }31 });32 });33 it('(!negative test!) Create two Fungible tokens in active NFT collection', async () => {34 await usingApi(async (api) => {35 const AitemListIndex = await api.query.nft.itemListIndex(idCollection);36 console.log(`itemListIndex count (before): ${AitemListIndex}`);37 const args = ['Fungible', 'Fungible'];38 const alicePrivateKey = privateKey('//Alice');39 const createMultipleItems = await api.tx.nft40 .createMultipleItems(idCollection, alicesPublicKey, args)41 .signAndSend(alicePrivateKey);42 // tslint:disable-next-line: no-unused-expression43 assert.exists(createMultipleItems, 'createMultipleItems is neither `null` or `undefined`');44 console.log(`Ext. createMultipleItems submitted with hash: ${createMultipleItems}`);45 await waitNewBlocks(api);46 const BitemListIndex = await api.query.nft.itemListIndex(idCollection);47 console.log(`itemListIndex count (after): ${BitemListIndex}`);48 if (BitemListIndex > AitemListIndex) { assert.fail('Incorrect token added in collection!'); }49 });50 });51 it('(!negative test!) Create two ReFungible tokens in active NFT collection', async () => {52 await usingApi(async (api) => {53 const AitemListIndex = await api.query.nft.itemListIndex(idCollection);54 console.log(`itemListIndex count (before): ${AitemListIndex}`);55 const args = ['ReFungible', 'ReFungible'];56 const alicePrivateKey = privateKey('//Alice');57 const createMultipleItems = await api.tx.nft58 .createMultipleItems(idCollection, alicesPublicKey, args)59 .signAndSend(alicePrivateKey);60 // tslint:disable-next-line: no-unused-expression61 assert.exists(createMultipleItems, 'createMultipleItems is neither `null` or `undefined`');62 console.log(`Ext. createMultipleItems submitted with hash: ${createMultipleItems}`);63 await waitNewBlocks(api);64 const BitemListIndex = await api.query.nft.itemListIndex(idCollection);65 console.log(`itemListIndex count (after): ${BitemListIndex}`);66 if (BitemListIndex > AitemListIndex) { assert.fail('Incorrect token added in collection!'); }67 });68 });69});tests/src/creditFeesToTreasury.test.tsdiffbeforeafterboth--- a/tests/src/creditFeesToTreasury.test.ts
+++ b/tests/src/creditFeesToTreasury.test.ts
@@ -1,3 +1,8 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
import { default as usingApi, submitTransactionAsync } from "./substrate/substrate-api";
tests/src/pallet-presence.test.tsdiffbeforeafterboth--- a/tests/src/pallet-presence.test.ts
+++ b/tests/src/pallet-presence.test.ts
@@ -1,3 +1,8 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
import { ApiPromise } from "@polkadot/api";
import { expect } from "chai";
import usingApi from "./substrate/substrate-api";
tests/src/substrate/get-balance.tsdiffbeforeafterboth--- a/tests/src/substrate/get-balance.ts
+++ b/tests/src/substrate/get-balance.ts
@@ -1,3 +1,8 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
import { ApiPromise } from "@polkadot/api";
import promisifySubstrate from "./promisify-substrate";
import {AccountInfo} from "@polkadot/types/interfaces/system";
tests/src/substrate/privateKey.tsdiffbeforeafterboth--- a/tests/src/substrate/privateKey.ts
+++ b/tests/src/substrate/privateKey.ts
@@ -1,3 +1,8 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
import { Keyring } from "@polkadot/api";
import { IKeyringPair } from "@polkadot/types/types";
tests/src/substrate/promisify-substrate.tsdiffbeforeafterboth--- a/tests/src/substrate/promisify-substrate.ts
+++ b/tests/src/substrate/promisify-substrate.ts
@@ -1,3 +1,8 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
import ApiPromise from "@polkadot/api/promise/Api";
type PromiseType<T> = T extends PromiseLike<infer TInner> ? TInner : T;
tests/src/substrate/substrate-api.tsdiffbeforeafterboth--- a/tests/src/substrate/substrate-api.ts
+++ b/tests/src/substrate/substrate-api.ts
@@ -1,3 +1,8 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
import { WsProvider, ApiPromise } from "@polkadot/api";
import type { AccountId, Address, ApplyExtrinsicResult, DispatchError, DispatchInfo, EventRecord, Extrinsic, ExtrinsicStatus, Hash, RuntimeDispatchInfo } from '@polkadot/types/interfaces';
import { IKeyringPair } from "@polkadot/types/types";
tests/src/substrate/wait-new-blocks.tsdiffbeforeafterboth--- a/tests/src/substrate/wait-new-blocks.ts
+++ b/tests/src/substrate/wait-new-blocks.ts
@@ -1,3 +1,8 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
import { ApiPromise } from "@polkadot/api";
export default function waitNewBlocks(api: ApiPromise, blocksCount: number = 1): Promise<void> {
tests/src/transfer.test.tsdiffbeforeafterboth--- a/tests/src/transfer.test.ts
+++ b/tests/src/transfer.test.ts
@@ -1,3 +1,8 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
import { expect, assert } from "chai";
import { default as usingApi, submitTransactionAsync } from "./substrate/substrate-api";
import { alicesPublicKey, bobsPublicKey, ferdiesPublicKey } from "./accounts";
tests/src/util/helpers.tsdiffbeforeafterboth--- a/tests/src/util/helpers.ts
+++ b/tests/src/util/helpers.ts
@@ -1,3 +1,8 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
import type { AccountId, EventRecord } from '@polkadot/types/interfaces';
tests/src/util/util.tsdiffbeforeafterboth--- a/tests/src/util/util.ts
+++ b/tests/src/util/util.ts
@@ -1,3 +1,8 @@
+//
+// This file is subject to the terms and conditions defined in
+// file 'LICENSE', which is part of this source code package.
+//
+
export function strToUTF16(str: string): any {
let buf: number[] = [];
for (let i=0, strLen=str.length; i < strLen; i++) {