difftreelog
Merge branch 'master' of github.com:usetech-llc/nft_parachain
in: master
17 files changed
smart_contract/ink-types-node-runtime/.gitignorediffbeforeafterbothno changes
smart_contract/ink-types-node-runtime/Cargo.lockdiffbeforeafterbothno changes
smart_contract/ink-types-node-runtime/Cargo.tomldiffbeforeafterboth181819[dependencies]19[dependencies]20ink_core = { version = "2", git = "https://github.com/usetech-llc/ink", tag = "latest-v2", package = "ink_core", default-features = false }20ink_core = { version = "2", git = "https://github.com/usetech-llc/ink", tag = "latest-v2", package = "ink_core", default-features = false }21ink_prelude = { version = "2", git = "https://github.com/paritytech/ink", tag = "latest-v2", package = "ink_prelude", default-features = false }21ink_prelude = { version = "2", git = "https://github.com/usetech-llc/ink", tag = "latest-v2", package = "ink_prelude", default-features = false }22frame-system = { git = "https://github.com/usetech-llc/substrate/", branch = "nft_rc3", package = "frame-system", default-features = false }22frame-system = { git = "https://github.com/usetech-llc/substrate/", branch = "nft_rc3", package = "frame-system", default-features = false }23pallet-indices = { git = "https://github.com/usetech-llc/substrate/", branch = "nft_rc3", package = "pallet-indices", default-features = false }23pallet-indices = { git = "https://github.com/usetech-llc/substrate/", branch = "nft_rc3", package = "pallet-indices", default-features = false }24sp-core = { git = "https://github.com/usetech-llc/substrate/", branch = "nft_rc3", package = "sp-core", default-features = false }24sp-core = { git = "https://github.com/usetech-llc/substrate/", branch = "nft_rc3", package = "sp-core", default-features = false }smart_contract/ink-types-node-runtime/calls/.gitignorediffbeforeafterbothno changes
smart_contract/ink-types-node-runtime/calls/.ink/abi_gen/Cargo.tomldiffbeforeafterbothno changes
smart_contract/ink-types-node-runtime/calls/.ink/abi_gen/main.rsdiffbeforeafterbothno changes
smart_contract/ink-types-node-runtime/calls/Cargo.tomldiffbeforeafterbothno changes
smart_contract/ink-types-node-runtime/calls/lib.rsdiffbeforeafterbothno changes
smart_contract/ink-types-node-runtime/examples/calls/.ink/abi_gen/Cargo.tomldiffbeforeafterbothno changes
smart_contract/ink-types-node-runtime/examples/calls/.ink/abi_gen/main.rsdiffbeforeafterbothno changes
smart_contract/ink-types-node-runtime/examples/calls/Cargo.lockdiffbeforeafterbothno changes
smart_contract/ink-types-node-runtime/examples/calls/Cargo.tomldiffbeforeafterbothno changes
smart_contract/ink-types-node-runtime/examples/calls/lib.rsdiffbeforeafterbothno changes
smart_contract/ink-types-node-runtime/src/calls.rsdiffbeforeafterboth1// // Copyright 2019 Parity Technologies (UK) Ltd.1use crate::{AccountId, NodeRuntimeTypes};2// // This file is part of ink!.3// //4// // ink! 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.8// //9// // ink! 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.13// //14// // You should have received a copy of the GNU General Public License15// // along with ink!. If not, see <http://www.gnu.org/licenses/>.1617// use ink_core::env::EnvTypes;18// use scale::{Codec, Decode, Encode};19// use sp_runtime::traits::Member;20// use crate::{AccountId, Balance, NodeRuntimeTypes};2122// /// Default runtime Call type, a subset of the runtime Call module variants23// ///24// /// The codec indices of the modules *MUST* match those in the concrete runtime.25// #[derive(Encode, Decode)]26// #[cfg_attr(feature = "std", derive(Clone, PartialEq, Eq))]27// pub enum Call {28// #[codec(index = "5")]29// Balances(Balances<NodeRuntimeTypes>),30// }3132// impl From<Balances<NodeRuntimeTypes>> for Call {33// fn from(balances_call: Balances<NodeRuntimeTypes>) -> Call {34// Call::Balances(balances_call)35// }36// }37// /// Generic Balance Call, could be used with other runtimes38// #[derive(Encode, Decode, Clone, PartialEq, Eq)]39// pub enum Balances<T>40// where41// T: EnvTypes,42// T::AccountId: Member + Codec,43// {44// #[allow(non_camel_case_types)]45// transfer(T::AccountId, #[codec(compact)] T::Balance),46// }4748// /// Construct a `Balances::transfer` call49// pub fn transfer_balance(account: AccountId, balance: Balance) -> Call {50// Balances::<NodeRuntimeTypes>::transfer(account.into(), balance).into()51// }5253545556575859// Copyright 2019 Parity Technologies (UK) Ltd.60// This file is part of ink!.61//62// ink! is free software: you can redistribute it and/or modify63// it under the terms of the GNU General Public License as published by64// the Free Software Foundation, either version 3 of the License, or65// (at your option) any later version.66//67// ink! is distributed in the hope that it will be useful,68// but WITHOUT ANY WARRANTY; without even the implied warranty of69// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the70// GNU General Public License for more details.71//72// You should have received a copy of the GNU General Public License73// along with ink!. If not, see <http://www.gnu.org/licenses/>.7475use ink_core::env::EnvTypes;2use ink_core::env::EnvTypes;3use ink_prelude::vec::Vec;76use scale::{Codec, Decode, Encode};4use scale::{Codec, Decode, Encode};77use sp_runtime::traits::Member;5use sp_runtime::traits::Member;78use ink_prelude::vec::Vec;679use crate::{AccountId, Balance, NodeRuntimeTypes};808182/// Default runtime Call type, a subset of the runtime Call module variants83///84/// The codec indices of the modules *MUST* match those in the concrete runtime.85#[derive(Encode, Decode)]7#[derive(Encode, Decode)]86#[cfg_attr(feature = "std", derive(Clone, PartialEq, Eq))]8#[cfg_attr(feature = "std", derive(Clone, PartialEq, Eq))]87pub enum Call {9pub enum Call {155 Nft::<NodeRuntimeTypes>::nft_approve(approved.into(), collection_id, item_id).into()85 Nft::<NodeRuntimeTypes>::nft_approve(approved.into(), collection_id, item_id).into()156}86}157158//GetApproved15987160pub fn transfer_from(collection_id: u64, item_id: u64, new_owner: AccountId) -> Call {88pub fn transfer_from(collection_id: u64, item_id: u64, new_owner: AccountId) -> Call {161 Nft::<NodeRuntimeTypes>::nft_transfer_from(collection_id, item_id, new_owner.into()).into()89 Nft::<NodeRuntimeTypes>::nft_transfer_from(collection_id, item_id, new_owner.into()).into()169 Nft::<NodeRuntimeTypes>::burn_item(collection_id, item_id).into()97 Nft::<NodeRuntimeTypes>::burn_item(collection_id, item_id).into()170}98}17199172//GetOwner173//BalanceOfsmart_contract/ink-types-node-runtime/src/lib.rsdiffbeforeafterboth1// Copyright 2018-2019 Parity Technologies (UK) Ltd.2// This file is part of ink!.3//4// ink! 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.8//9// ink! 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.13//14// You should have received a copy of the GNU General Public License15// along with ink!. If not, see <http://www.gnu.org/licenses/>.1617//! Definitions for environment types for contracts targeted at a18//! substrate chain with the default `node-runtime` configuration.1920#![cfg_attr(not(feature = "std"), no_std)]1#![cfg_attr(not(feature = "std"), no_std)]21224use scale::{Decode, Encode};5use scale::{Decode, Encode};25use sp_core::crypto::AccountId32;6use sp_core::crypto::AccountId32;26#[cfg(feature = "ink-generate-abi")]7#[cfg(feature = "ink-generate-abi")]27use type_metadata::{HasTypeId, HasTypeDef, Metadata, MetaType, TypeId, TypeDef, TypeIdArray};8use type_metadata::{HasTypeDef, HasTypeId, MetaType, Metadata, TypeDef, TypeId, TypeIdArray};28929pub mod calls;10pub mod calls;301143 }23 }44}24}2526impl From<[u8; 32]> for AccountId {27 fn from(account: [u8; 32]) -> Self {28 AccountId(AccountId32::from(account))29 }30}453146#[cfg(feature = "ink-generate-abi")]32#[cfg(feature = "ink-generate-abi")]47impl HasTypeId for AccountId {33impl HasTypeId for AccountId {smart_contract/ink-types-node-runtime/src/nft.rsdiffbeforeafterbothno changes
smart_contract/nft/Cargo.lockdiffbeforeafterbothno changes