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.rsdiffbeforeafterboth1// use nft_runtime::{2// AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig, Signature, SudoConfig,3// SystemConfig, WASM_BINARY,4// };5// use nft_runtime::{ContractsConfig, ContractsSchedule, NftConfig, CollectionType};6use nft_runtime::*;7use sc_service::ChainType;8use sp_consensus_aura::sr25519::AuthorityId as AuraId;9use sp_core::{sr25519, Pair, Public};10use sp_finality_grandpa::AuthorityId as GrandpaId;11use sp_runtime::traits::{IdentifyAccount, Verify};12use serde_json::map::Map;1314// Note this is the URL for the telemetry server15//const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/";1617/// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type.18pub type ChainSpec = sc_service::GenericChainSpec<GenesisConfig>;1920/// Helper function to generate a crypto pair from seed21pub fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {22 TPublic::Pair::from_string(&format!("//{}", seed), None)23 .expect("static values are valid; qed")24 .public()25}2627type AccountPublic = <Signature as Verify>::Signer;2829/// Helper function to generate an account ID from seed30pub fn get_account_id_from_seed<TPublic: Public>(seed: &str) -> AccountId31where32 AccountPublic: From<<TPublic::Pair as Pair>::Public>,33{34 AccountPublic::from(get_from_seed::<TPublic>(seed)).into_account()35}3637/// Helper function to generate an authority key for Aura38pub fn authority_keys_from_seed(s: &str) -> (AuraId, GrandpaId) {39 (get_from_seed::<AuraId>(s), get_from_seed::<GrandpaId>(s))40}4142pub fn development_config() -> Result<ChainSpec, String> {43 let wasm_binary = WASM_BINARY.ok_or("Development wasm binary not available".to_string())?;4445 let mut properties = Map::new();46 properties.insert("tokenSymbol".into(), "UniqueTest".into());47 properties.insert("tokenDecimals".into(), 15.into());48 properties.insert("ss58Format".into(), 42.into()); // Generic Substrate wildcard (SS58 checksum preimage)4950 Ok(ChainSpec::from_genesis(51 // Name52 "Development",53 // ID54 "dev",55 ChainType::Development,56 move || testnet_genesis(57 wasm_binary,58 // Initial PoA authorities59 vec![60 authority_keys_from_seed("Alice"),61 ],62 // Sudo account63 get_account_id_from_seed::<sr25519::Public>("Alice"),64 // Pre-funded accounts65 vec![66 get_account_id_from_seed::<sr25519::Public>("Alice"),67 get_account_id_from_seed::<sr25519::Public>("Bob"),68 get_account_id_from_seed::<sr25519::Public>("Alice//stash"),69 get_account_id_from_seed::<sr25519::Public>("Bob//stash"),70 ],71 true,72 ),73 // Bootnodes74 vec![],75 // Telemetry76 None,77 // Protocol ID78 None,79 // Properties80 Some(properties),81 // Extensions82 None,83 ))84}8586pub fn local_testnet_config() -> Result<ChainSpec, String> {87 let wasm_binary = WASM_BINARY.ok_or("Development wasm binary not available".to_string())?;8889 Ok(ChainSpec::from_genesis(90 // Name91 "Local Testnet",92 // ID93 "local_testnet",94 ChainType::Local,95 move || testnet_genesis(96 wasm_binary,97 // Initial PoA authorities98 vec![99 authority_keys_from_seed("Alice"),100 authority_keys_from_seed("Bob"),101 ],102 // Sudo account103 get_account_id_from_seed::<sr25519::Public>("Alice"),104 // Pre-funded accounts105 vec![106 get_account_id_from_seed::<sr25519::Public>("Alice"),107 get_account_id_from_seed::<sr25519::Public>("Bob"),108 get_account_id_from_seed::<sr25519::Public>("Charlie"),109 get_account_id_from_seed::<sr25519::Public>("Dave"),110 get_account_id_from_seed::<sr25519::Public>("Eve"),111 get_account_id_from_seed::<sr25519::Public>("Ferdie"),112 get_account_id_from_seed::<sr25519::Public>("Alice//stash"),113 get_account_id_from_seed::<sr25519::Public>("Bob//stash"),114 get_account_id_from_seed::<sr25519::Public>("Charlie//stash"),115 get_account_id_from_seed::<sr25519::Public>("Dave//stash"),116 get_account_id_from_seed::<sr25519::Public>("Eve//stash"),117 get_account_id_from_seed::<sr25519::Public>("Ferdie//stash"),118 ],119 true,120 ),121 // Bootnodes122 vec![],123 // Telemetry124 None,125 // Protocol ID126 None,127 // Properties128 None,129 // Extensions130 None,131 ))132}133134fn testnet_genesis(135 wasm_binary: &[u8],136 initial_authorities: Vec<(AuraId, GrandpaId)>,137 root_key: AccountId,138 endowed_accounts: Vec<AccountId>,139 enable_println: bool,140) -> GenesisConfig {141142 let vested_accounts = vec![143 get_account_id_from_seed::<sr25519::Public>("Bob"),144 ];145146 GenesisConfig {147 system: Some(SystemConfig {148 code: wasm_binary.to_vec(),149 changes_trie_config: Default::default(),150 }),151 pallet_balances: Some(BalancesConfig {152 balances: endowed_accounts153 .iter()154 .cloned()155 .map(|k| (k, 1 << 100))156 .collect(),157 }),158 pallet_aura: Some(AuraConfig {159 authorities: initial_authorities.iter().map(|x| (x.0.clone())).collect(),160 }),161 pallet_grandpa: Some(GrandpaConfig {162 authorities: initial_authorities163 .iter()164 .map(|x| (x.1.clone(), 1))165 .collect(),166 }),167 pallet_treasury: Some(Default::default()),168 pallet_sudo: Some(SudoConfig { key: root_key }),169 pallet_vesting: Some(VestingConfig {170 vesting: vested_accounts171 .iter()172 .cloned()173 .map(|k| (k, 1000, 100, 1 << 98))174 .collect(),175 }),176 pallet_nft: Some(NftConfig {177 collection: vec![(178 1,179 CollectionType {180 owner: get_account_id_from_seed::<sr25519::Public>("Alice"),181 mode: CollectionMode::NFT,182 access: AccessMode::Normal,183 decimal_points: 0,184 name: vec![],185 description: vec![],186 token_prefix: vec![],187 mint_mode: false,188 offchain_schema: vec![],189 schema_version: SchemaVersion::default(),190 sponsor: get_account_id_from_seed::<sr25519::Public>("Alice"),191 unconfirmed_sponsor: get_account_id_from_seed::<sr25519::Public>("Alice"),192 const_on_chain_schema: vec![],193 variable_on_chain_schema: vec![],194 limits: CollectionLimits::default()195 },196 )],197 nft_item_id: vec![],198 fungible_item_id: vec![],199 refungible_item_id: vec![],200 chain_limit: ChainLimits {201 collection_numbers_limit: 100000,202 account_token_ownership_limit: 1000000,203 collections_admins_limit: 5,204 custom_data_limit: 2048,205 nft_sponsor_transfer_timeout: 15,206 fungible_sponsor_transfer_timeout: 15,207 refungible_sponsor_transfer_timeout: 15,208 },209 }),210 pallet_contracts: Some(ContractsConfig {211 current_schedule: ContractsSchedule {212 enable_println,213 ..Default::default()214 },215 }),216 }217}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.tsdiffbeforeafterboth--- a/tests/src/createMultipleItems.test.ts
+++ b/tests/src/createMultipleItems.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 { assert } from 'chai';
import { alicesPublicKey } from './accounts';
import privateKey from './substrate/privateKey';
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++) {