difftreelog
Update flipper to Ink! 3.0, include contracts RPC support
in: master
12 files changed
node/src/rpc.rsdiffbeforeafterboth778use std::sync::Arc;8use std::sync::Arc;9910use nft_runtime::{opaque::Block, AccountId, Balance, Index};10use nft_runtime::{opaque::Block, AccountId, Balance, Index, BlockNumber};11use sp_api::ProvideRuntimeApi;11use sp_api::ProvideRuntimeApi;12use sp_blockchain::{Error as BlockChainError, HeaderMetadata, HeaderBackend};12use sp_blockchain::{Error as BlockChainError, HeaderMetadata, HeaderBackend};13use sp_block_builder::BlockBuilder;13use sp_block_builder::BlockBuilder;14pub use sc_rpc_api::DenyUnsafe;14pub use sc_rpc_api::DenyUnsafe;15use sp_transaction_pool::TransactionPool;15use sp_transaction_pool::TransactionPool;1616use pallet_contracts_rpc::{Contracts, ContractsApi};171718/// Full client dependencies.18/// Full client dependencies.19pub struct FullDeps<C, P> {19pub struct FullDeps<C, P> {35 C::Api: substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Index>,35 C::Api: substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Index>,36 C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,36 C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,37 C::Api: BlockBuilder<Block>,37 C::Api: BlockBuilder<Block>,38 C::Api: pallet_contracts_rpc::ContractsRuntimeApi<Block, AccountId, Balance, BlockNumber>,38 P: TransactionPool + 'static,39 P: TransactionPool + 'static,39{40{40 use substrate_frame_rpc_system::{FullSystem, SystemApi};41 use substrate_frame_rpc_system::{FullSystem, SystemApi};55 TransactionPaymentApi::to_delegate(TransactionPayment::new(client.clone()))56 TransactionPaymentApi::to_delegate(TransactionPayment::new(client.clone()))56 );57 );575859 io.extend_with(60 ContractsApi::to_delegate(Contracts::new(client.clone()))61 );62 58 // Extend this RPC with a custom API by using the following syntax.63 // Extend this RPC with a custom API by using the following syntax.59 // `YourRpcStruct` should have a reference to a client, which is needed64 // `YourRpcStruct` should have a reference to a client, which is neededtests/flipper-src/.gitignorediffbeforeafterboth667# Remove Cargo.lock when creating an executable, leave it for libraries7# Remove Cargo.lock when creating an executable, leave it for libraries8# More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock8# More information here http://doc.crates.io/guide.html#cargotoml-vs-cargolock9Cargo.lock9Cargo.lock10tests/flipper-src/.ink/abi_gen/Cargo.tomldiffbeforeafterbothno changes
tests/flipper-src/.ink/abi_gen/main.rsdiffbeforeafterbothno changes
tests/flipper-src/Cargo.tomldiffbeforeafterboth1[package]1[package]2name = "flipper"2name = "flipper"3version = "0.1.0"3version = "3.0.0-rc1"4authors = ["[your_name] <[your_email]>"]4authors = ["Parity Technologies <admin@parity.io>"]5edition = "2018"5edition = "2018"667[dependencies]7[dependencies]8ink_primitives = { version = "3.0.0-rc1", git = "https://github.com/paritytech/ink", tag = "v3.0.0-rc1", default-features = false }8ink_abi = { version = "2", git = "https://github.com/paritytech/ink", tag = "latest-v2", package = "ink_abi", default-features = false, features = ["derive"], optional = true }9ink_metadata = { version = "3.0.0-rc1", git = "https://github.com/paritytech/ink", tag = "v3.0.0-rc1", default-features = false, features = ["derive"], optional = true }9ink_primitives = { version = "2", git = "https://github.com/paritytech/ink", tag = "latest-v2", package = "ink_primitives", default-features = false }10ink_env = { version = "3.0.0-rc1", git = "https://github.com/paritytech/ink", tag = "v3.0.0-rc1", default-features = false }10ink_core = { version = "2", git = "https://github.com/paritytech/ink", tag = "latest-v2", package = "ink_core", default-features = false }11ink_storage = { version = "3.0.0-rc1", git = "https://github.com/paritytech/ink", tag = "v3.0.0-rc1", default-features = false }11ink_lang = { version = "2", git = "https://github.com/paritytech/ink", tag = "latest-v2", package = "ink_lang", default-features = false }12ink_lang = { version = "3.0.0-rc1", git = "https://github.com/paritytech/ink", tag = "v3.0.0-rc1", default-features = false }121313scale = { package = "parity-scale-codec", version = "1.2", default-features = false, features = ["derive"] }14scale = { package = "parity-scale-codec", version = "1.3", default-features = false, features = ["derive"] }1415scale-info = { version = "0.4", default-features = false, features = ["derive"], optional = true }15[dependencies.type-metadata]16git = "https://github.com/type-metadata/type-metadata.git"17rev = "02eae9f35c40c943b56af5b60616219f2b72b47d"18default-features = false19features = ["derive"]20optional = true211622[lib]17[lib]23name = "flipper"18name = "flipper"24path = "lib.rs"19path = "lib.rs"25crate-type = [20crate-type = ["cdylib"]26 # Used for normal contract Wasm blobs.27 "cdylib",28 # Required for ABI generation, and using this contract as a dependency.29 # If using `cargo contract build`, it will be automatically disabled to produce a smaller Wasm binary30 "rlib",31]322133[features]22[features]34default = ["test-env"]23default = ["std"]35std = [24std = [25 "ink_primitives/std",26 "ink_metadata",27 "ink_metadata/std",36 "ink_abi/std",28 "ink_env/std",37 "ink_core/std",29 "ink_storage/std",38 "ink_primitives/std",30 "ink_lang/std",39 "scale/std",31 "scale/std",32 "scale-info",40 "type-metadata/std",33 "scale-info/std",41]34]42test-env = [43 "std",44 "ink_lang/test-env",45]46ink-generate-abi = [47 "std",48 "ink_abi",49 "type-metadata",50 "ink_core/ink-generate-abi",51 "ink_lang/ink-generate-abi",52]53ink-as-dependency = []35ink-as-dependency = []5455[profile.release]56panic = "abort"57lto = true58opt-level = "z"59overflow-checks = true6061[workspace]62members = [63 ".ink/abi_gen"64]65exclude = [66 ".ink"67]68tests/flipper-src/build.shdiffbeforeafterboth1rustup component add rust-src --toolchain nightly1cargo +nightly contract build2cargo +nightly contract build2cargo +nightly contract generate-metadata3cargo +nightly contract generate-metadata34tests/flipper-src/lib.rsdiffbeforeafterboth1// Copyright 2018-2020 Parity Technologies (UK) Ltd.2//3// Licensed under the Apache License, Version 2.0 (the "License");4// you may not use this file except in compliance with the License.5// You may obtain a copy of the License at6//7// http://www.apache.org/licenses/LICENSE-2.08//9// Unless required by applicable law or agreed to in writing, software10// distributed under the License is distributed on an "AS IS" BASIS,11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12// See the License for the specific language governing permissions and13// limitations under the License.141#![cfg_attr(not(feature = "std"), no_std)]15#![cfg_attr(not(feature = "std"), no_std)]2163use ink_lang as ink;17use ink_lang as ink;4185#[ink::contract(version = "0.1.0")]19#[ink::contract]6mod flipper {20pub mod flipper {7 use ink_core::storage;89 /// Defines the storage of your contract.10 /// Add new fields to the below struct in order11 /// to add new static storage fields to your contract.12 #[ink(storage)]21 #[ink(storage)]13 struct Flipper {22 pub struct Flipper {14 /// Stores a single `bool` value on the storage.15 value: storage::Value<bool>,23 value: bool,16 }24 }172518 impl Flipper {26 impl Flipper {19 /// Constructor that initializes the `bool` value to the given `init_value`.27 /// Creates a new flipper smart contract initialized with the given value.20 #[ink(constructor)]28 #[ink(constructor)]21 fn new(&mut self, init_value: bool) {29 pub fn new(init_value: bool) -> Self {22 self.value.set(init_value);30 Self { value: init_value }23 }31 }243225 /// Constructor that initializes the `bool` value to `false`.33 /// Creates a new flipper smart contract initialized to `false`.26 ///27 /// Constructors can delegate to other constructors.28 #[ink(constructor)]34 #[ink(constructor)]29 fn default(&mut self) {35 pub fn default() -> Self {30 self.new(false)36 Self::new(Default::default())31 }37 }323833 /// A message that can be called on instantiated contracts.39 /// Flips the current value of the Flipper's bool.34 /// This one flips the value of the stored `bool` from `true`35 /// to `false` and vice versa.36 #[ink(message)]40 #[ink(message)]37 fn flip(&mut self) {41 pub fn flip(&mut self) {38 *self.value = !self.get();42 self.value = !self.value;39 }43 }404441 /// Simply returns the current value of our `bool`.45 /// Returns the current value of the Flipper's bool.42 #[ink(message)]46 #[ink(message)]43 fn get(&self) -> bool {47 pub fn get(&self) -> bool {44 *self.value48 self.value45 }49 }46 }50 }475148 /// Unit tests in Rust are normally defined within such a `#[cfg(test)]`49 /// module and test functions are marked with a `#[test]` attribute.50 /// The below code is technically just normal Rust code.51 #[cfg(test)]52 #[cfg(test)]52 mod tests {53 mod tests {53 /// Imports all the definitions from the outer scope so we can use them here.54 use super::*;54 use super::*;555556 /// We test if the default constructor does its job.57 #[test]56 #[test]58 fn default_works() {57 fn default_works() {59 // Note that even though we defined our `#[ink(constructor)]`60 // above as `&mut self` functions that return nothing we can call61 // them in test code as if they were normal Rust constructors62 // that take no `self` argument but return `Self`.63 let flipper = Flipper::default();58 let flipper = Flipper::default();64 assert_eq!(flipper.get(), false);59 assert_eq!(flipper.get(), false);65 }60 }666167 /// We test a simple use case of our contract.68 #[test]62 #[test]69 fn it_works() {63 fn it_works() {70 let mut flipper = Flipper::new(false);64 let mut flipper = Flipper::new(false);tests/package-lock.jsondiffbeforeafterboth3916 }3916 }3917 },3917 },3918 "@polkadot/api": {3918 "@polkadot/api": {3919 "version": "1.34.1",3919 "version": "2.2.1",3920 "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-1.34.1.tgz",3920 "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-2.2.1.tgz",3921 "integrity": "sha512-3gCibNRchH+XbEdULS1bwiV1RgarZW1PDw1Y1mAQBVqPrUpkYqntp1D52SQOpAbRzldkwk296Sj+mx9/IeDRXA==",3921 "integrity": "sha512-h6G1nYeXGnnUB//JXZcSKDNZNuasB4DDE0Hf+G5rf/9/aDxbkN+T1Wc6+saFxrxSmDGx2/qEUNVx6PluFKLvJA==",3922 "requires": {3922 "requires": {3923 "@babel/runtime": "^7.11.2",3923 "@babel/runtime": "^7.11.2",3924 "@polkadot/api-derive": "1.34.1",3924 "@polkadot/api-derive": "2.2.1",3925 "@polkadot/keyring": "^3.4.1",3925 "@polkadot/keyring": "^3.5.1",3926 "@polkadot/metadata": "1.34.1",3926 "@polkadot/metadata": "2.2.1",3927 "@polkadot/rpc-core": "1.34.1",3927 "@polkadot/rpc-core": "2.2.1",3928 "@polkadot/rpc-provider": "1.34.1",3928 "@polkadot/rpc-provider": "2.2.1",3929 "@polkadot/types": "1.34.1",3929 "@polkadot/types": "2.2.1",3930 "@polkadot/types-known": "1.34.1",3930 "@polkadot/types-known": "2.2.1",3931 "@polkadot/util": "^3.4.1",3931 "@polkadot/util": "^3.5.1",3932 "@polkadot/util-crypto": "^3.4.1",3932 "@polkadot/util-crypto": "^3.5.1",3933 "bn.js": "^5.1.3",3933 "bn.js": "^5.1.3",3934 "eventemitter3": "^4.0.7",3934 "eventemitter3": "^4.0.7",3935 "rxjs": "^6.6.3"3935 "rxjs": "^6.6.3"3936 },3936 },3937 "dependencies": {3937 "dependencies": {3938 "@polkadot/metadata": {3939 "version": "1.34.1",3940 "resolved": "https://registry.npmjs.org/@polkadot/metadata/-/metadata-1.34.1.tgz",3941 "integrity": "sha512-uoaOhNHjECDaLBYvGRaLvF0mhZBFmsV3oikYDP4sZx3a5oD0xYsyXtr5bFPQDImwPFASP8/ltrMVqcYTX42xFg==",3942 "requires": {3943 "@babel/runtime": "^7.11.2",3944 "@polkadot/types": "1.34.1",3945 "@polkadot/types-known": "1.34.1",3946 "@polkadot/util": "^3.4.1",3947 "@polkadot/util-crypto": "^3.4.1",3948 "bn.js": "^5.1.3"3949 }3950 },3951 "@polkadot/types": {3952 "version": "1.34.1",3953 "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-1.34.1.tgz",3954 "integrity": "sha512-jPwix2y+ZXKYB4ghODXlqYmcI3Tnsl3iO3xIkiGsZhhs9PdrKibcNeAv4LUiRpPuGRnAM+mrlPrBbCuzguKSGg==",3955 "requires": {3956 "@babel/runtime": "^7.11.2",3957 "@polkadot/metadata": "1.34.1",3958 "@polkadot/util": "^3.4.1",3959 "@polkadot/util-crypto": "^3.4.1",3960 "@types/bn.js": "^4.11.6",3961 "bn.js": "^5.1.3",3962 "memoizee": "^0.4.14",3963 "rxjs": "^6.6.3"3964 }3965 },3966 "@polkadot/types-known": {3967 "version": "1.34.1",3968 "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-1.34.1.tgz",3969 "integrity": "sha512-H9V8u9cqbKjxU/dxEyLl7kJwoBImXpRskQ5+X0fq3BH7g1nQ6jrIg/buRPpbc3GxKivdFYUZWshPY9hbqE8y8A==",3970 "requires": {3971 "@babel/runtime": "^7.11.2",3972 "@polkadot/types": "1.34.1",3973 "@polkadot/util": "^3.4.1",3974 "bn.js": "^5.1.3"3975 }3976 },3977 "@polkadot/util": {3938 "@polkadot/util": {3978 "version": "3.4.1",3939 "version": "3.5.1",3979 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.4.1.tgz",3940 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.5.1.tgz",3980 "integrity": "sha512-CJo0wAzXR8vjAzs9mHDooZr5a3XRW8LlYWik8d/+bv1VDwCC/metSiBrYBOapFhYUjlS5IYIw5bhWS5dnpkXvQ==",3941 "integrity": "sha512-9CBVeQlhmghlVeOttZDxwOtDVWLKpHSP0iAE2vG2bnI6T1dSjD0cFHCG9q7GeD6UAN8z+m17/M9WDV2WXzT6kA==",3981 "requires": {3942 "requires": {3982 "@babel/runtime": "^7.11.2",3943 "@babel/runtime": "^7.11.2",3944 "@polkadot/x-textdecoder": "^0.3.2",3945 "@polkadot/x-textencoder": "^0.3.2",3983 "@types/bn.js": "^4.11.6",3946 "@types/bn.js": "^4.11.6",3984 "bn.js": "^5.1.3",3947 "bn.js": "^5.1.3",3985 "camelcase": "^5.3.1",3948 "camelcase": "^5.3.1",3990 }3953 }3991 },3954 },3992 "@polkadot/api-contract": {3955 "@polkadot/api-contract": {3993 "version": "1.34.1",3956 "version": "2.2.1",3994 "resolved": "https://registry.npmjs.org/@polkadot/api-contract/-/api-contract-1.34.1.tgz",3957 "resolved": "https://registry.npmjs.org/@polkadot/api-contract/-/api-contract-2.2.1.tgz",3995 "integrity": "sha512-oXh7An6E9wdbczXQhw+TfIkoKLQr4t0j3OwxubrhS5Qn6f99xGoAkk0BIKjsHPGIbMHEJoywmmLrDUAeTxExgg==",3958 "integrity": "sha512-7Kb9pAx9n7qske7p3yI+YYZX8Z5/MCNET1SCEE6t3fkwtYxs+BMw2Wucq5yt/EbVgJDLM3NmZyh9xmJiLwLxHQ==",3996 "requires": {3959 "requires": {3997 "@babel/runtime": "^7.11.2",3960 "@babel/runtime": "^7.11.2",3998 "@polkadot/api": "1.34.1",3961 "@polkadot/api": "2.2.1",3999 "@polkadot/rpc-core": "1.34.1",3962 "@polkadot/rpc-core": "2.2.1",4000 "@polkadot/types": "1.34.1",3963 "@polkadot/types": "2.2.1",4001 "@polkadot/util": "^3.4.1",3964 "@polkadot/util": "^3.5.1",4002 "bn.js": "^5.1.3",3965 "bn.js": "^5.1.3",4003 "rxjs": "^6.6.3"3966 "rxjs": "^6.6.3"4004 },3967 },4005 "dependencies": {3968 "dependencies": {4006 "@polkadot/api": {4007 "version": "1.34.1",4008 "resolved": "https://registry.npmjs.org/@polkadot/api/-/api-1.34.1.tgz",4009 "integrity": "sha512-3gCibNRchH+XbEdULS1bwiV1RgarZW1PDw1Y1mAQBVqPrUpkYqntp1D52SQOpAbRzldkwk296Sj+mx9/IeDRXA==",4010 "requires": {4011 "@babel/runtime": "^7.11.2",4012 "@polkadot/api-derive": "1.34.1",4013 "@polkadot/keyring": "^3.4.1",4014 "@polkadot/metadata": "1.34.1",4015 "@polkadot/rpc-core": "1.34.1",4016 "@polkadot/rpc-provider": "1.34.1",4017 "@polkadot/types": "1.34.1",4018 "@polkadot/types-known": "1.34.1",4019 "@polkadot/util": "^3.4.1",4020 "@polkadot/util-crypto": "^3.4.1",4021 "bn.js": "^5.1.3",4022 "eventemitter3": "^4.0.7",4023 "rxjs": "^6.6.3"4024 }4025 },4026 "@polkadot/api-derive": {4027 "version": "1.34.1",4028 "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-1.34.1.tgz",4029 "integrity": "sha512-LMlCkNJRp29MwKa36crYuY6cZpnkHCFrPCv9dmJEuDbMqrK+EAhXM9/6sTDYJ4uKNhyetJKe9rXslkXdI6pidA==",4030 "requires": {4031 "@babel/runtime": "^7.11.2",4032 "@polkadot/api": "1.34.1",4033 "@polkadot/rpc-core": "1.34.1",4034 "@polkadot/rpc-provider": "1.34.1",4035 "@polkadot/types": "1.34.1",4036 "@polkadot/util": "^3.4.1",4037 "@polkadot/util-crypto": "^3.4.1",4038 "bn.js": "^5.1.3",4039 "memoizee": "^0.4.14",4040 "rxjs": "^6.6.3"4041 }4042 },4043 "@polkadot/metadata": {4044 "version": "1.34.1",4045 "resolved": "https://registry.npmjs.org/@polkadot/metadata/-/metadata-1.34.1.tgz",4046 "integrity": "sha512-uoaOhNHjECDaLBYvGRaLvF0mhZBFmsV3oikYDP4sZx3a5oD0xYsyXtr5bFPQDImwPFASP8/ltrMVqcYTX42xFg==",4047 "requires": {4048 "@babel/runtime": "^7.11.2",4049 "@polkadot/types": "1.34.1",4050 "@polkadot/types-known": "1.34.1",4051 "@polkadot/util": "^3.4.1",4052 "@polkadot/util-crypto": "^3.4.1",4053 "bn.js": "^5.1.3"4054 }4055 },4056 "@polkadot/rpc-core": {4057 "version": "1.34.1",4058 "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-1.34.1.tgz",4059 "integrity": "sha512-BVQDyBEkbRe5b/u8p9UPpTCj0sDZ32sTmPEP43Klc4s9+oHtiNvOFYvkjK5oyW9dlcOwXi8HpLsQxGAeMtM7Tw==",4060 "requires": {4061 "@babel/runtime": "^7.11.2",4062 "@polkadot/metadata": "1.34.1",4063 "@polkadot/rpc-provider": "1.34.1",4064 "@polkadot/types": "1.34.1",4065 "@polkadot/util": "^3.4.1",4066 "memoizee": "^0.4.14",4067 "rxjs": "^6.6.3"4068 }4069 },4070 "@polkadot/rpc-provider": {4071 "version": "1.34.1",4072 "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-1.34.1.tgz",4073 "integrity": "sha512-bebeis9mB4LS9Spk1WSHoadZHsyHmK4gyyC6uKSLZxHZmnopWna6zWnOBIrYHRz7qDHSZC5eNTseuU8NJXtscA==",4074 "requires": {4075 "@babel/runtime": "^7.11.2",4076 "@polkadot/metadata": "1.34.1",4077 "@polkadot/types": "1.34.1",4078 "@polkadot/util": "^3.4.1",4079 "@polkadot/util-crypto": "^3.4.1",4080 "@polkadot/x-fetch": "^0.3.2",4081 "@polkadot/x-ws": "^0.3.2",4082 "bn.js": "^5.1.3",4083 "eventemitter3": "^4.0.7"4084 }4085 },4086 "@polkadot/types": {4087 "version": "1.34.1",4088 "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-1.34.1.tgz",4089 "integrity": "sha512-jPwix2y+ZXKYB4ghODXlqYmcI3Tnsl3iO3xIkiGsZhhs9PdrKibcNeAv4LUiRpPuGRnAM+mrlPrBbCuzguKSGg==",4090 "requires": {4091 "@babel/runtime": "^7.11.2",4092 "@polkadot/metadata": "1.34.1",4093 "@polkadot/util": "^3.4.1",4094 "@polkadot/util-crypto": "^3.4.1",4095 "@types/bn.js": "^4.11.6",4096 "bn.js": "^5.1.3",4097 "memoizee": "^0.4.14",4098 "rxjs": "^6.6.3"4099 }4100 },4101 "@polkadot/types-known": {4102 "version": "1.34.1",4103 "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-1.34.1.tgz",4104 "integrity": "sha512-H9V8u9cqbKjxU/dxEyLl7kJwoBImXpRskQ5+X0fq3BH7g1nQ6jrIg/buRPpbc3GxKivdFYUZWshPY9hbqE8y8A==",4105 "requires": {4106 "@babel/runtime": "^7.11.2",4107 "@polkadot/types": "1.34.1",4108 "@polkadot/util": "^3.4.1",4109 "bn.js": "^5.1.3"4110 }4111 },4112 "@polkadot/util": {3969 "@polkadot/util": {4113 "version": "3.4.1",3970 "version": "3.5.1",4114 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.4.1.tgz",3971 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.5.1.tgz",4115 "integrity": "sha512-CJo0wAzXR8vjAzs9mHDooZr5a3XRW8LlYWik8d/+bv1VDwCC/metSiBrYBOapFhYUjlS5IYIw5bhWS5dnpkXvQ==",3972 "integrity": "sha512-9CBVeQlhmghlVeOttZDxwOtDVWLKpHSP0iAE2vG2bnI6T1dSjD0cFHCG9q7GeD6UAN8z+m17/M9WDV2WXzT6kA==",4116 "requires": {3973 "requires": {4117 "@babel/runtime": "^7.11.2",3974 "@babel/runtime": "^7.11.2",3975 "@polkadot/x-textdecoder": "^0.3.2",3976 "@polkadot/x-textencoder": "^0.3.2",4118 "@types/bn.js": "^4.11.6",3977 "@types/bn.js": "^4.11.6",4119 "bn.js": "^5.1.3",3978 "bn.js": "^5.1.3",4120 "camelcase": "^5.3.1",3979 "camelcase": "^5.3.1",4125 }3984 }4126 },3985 },4127 "@polkadot/api-derive": {3986 "@polkadot/api-derive": {4128 "version": "1.34.1",3987 "version": "2.2.1",4129 "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-1.34.1.tgz",3988 "resolved": "https://registry.npmjs.org/@polkadot/api-derive/-/api-derive-2.2.1.tgz",4130 "integrity": "sha512-LMlCkNJRp29MwKa36crYuY6cZpnkHCFrPCv9dmJEuDbMqrK+EAhXM9/6sTDYJ4uKNhyetJKe9rXslkXdI6pidA==",3989 "integrity": "sha512-4J9nA9bDBlE+yn06VjgeCnElnRn8IhTpkGhtT4J/agBe+4I0tYSz+DR5o2Rb5mQDMXu3aayYpfVDaJk1mRJsPQ==",4131 "requires": {3990 "requires": {4132 "@babel/runtime": "^7.11.2",3991 "@babel/runtime": "^7.11.2",4133 "@polkadot/api": "1.34.1",3992 "@polkadot/api": "2.2.1",4134 "@polkadot/rpc-core": "1.34.1",3993 "@polkadot/rpc-core": "2.2.1",4135 "@polkadot/rpc-provider": "1.34.1",3994 "@polkadot/rpc-provider": "2.2.1",4136 "@polkadot/types": "1.34.1",3995 "@polkadot/types": "2.2.1",4137 "@polkadot/util": "^3.4.1",3996 "@polkadot/util": "^3.5.1",4138 "@polkadot/util-crypto": "^3.4.1",3997 "@polkadot/util-crypto": "^3.5.1",4139 "bn.js": "^5.1.3",3998 "bn.js": "^5.1.3",4140 "memoizee": "^0.4.14",3999 "memoizee": "^0.4.14",4141 "rxjs": "^6.6.3"4000 "rxjs": "^6.6.3"4142 },4001 },4143 "dependencies": {4002 "dependencies": {4144 "@polkadot/metadata": {4145 "version": "1.34.1",4146 "resolved": "https://registry.npmjs.org/@polkadot/metadata/-/metadata-1.34.1.tgz",4147 "integrity": "sha512-uoaOhNHjECDaLBYvGRaLvF0mhZBFmsV3oikYDP4sZx3a5oD0xYsyXtr5bFPQDImwPFASP8/ltrMVqcYTX42xFg==",4148 "requires": {4149 "@babel/runtime": "^7.11.2",4150 "@polkadot/types": "1.34.1",4151 "@polkadot/types-known": "1.34.1",4152 "@polkadot/util": "^3.4.1",4153 "@polkadot/util-crypto": "^3.4.1",4154 "bn.js": "^5.1.3"4155 }4156 },4157 "@polkadot/types": {4158 "version": "1.34.1",4159 "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-1.34.1.tgz",4160 "integrity": "sha512-jPwix2y+ZXKYB4ghODXlqYmcI3Tnsl3iO3xIkiGsZhhs9PdrKibcNeAv4LUiRpPuGRnAM+mrlPrBbCuzguKSGg==",4161 "requires": {4162 "@babel/runtime": "^7.11.2",4163 "@polkadot/metadata": "1.34.1",4164 "@polkadot/util": "^3.4.1",4165 "@polkadot/util-crypto": "^3.4.1",4166 "@types/bn.js": "^4.11.6",4167 "bn.js": "^5.1.3",4168 "memoizee": "^0.4.14",4169 "rxjs": "^6.6.3"4170 }4171 },4172 "@polkadot/types-known": {4173 "version": "1.34.1",4174 "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-1.34.1.tgz",4175 "integrity": "sha512-H9V8u9cqbKjxU/dxEyLl7kJwoBImXpRskQ5+X0fq3BH7g1nQ6jrIg/buRPpbc3GxKivdFYUZWshPY9hbqE8y8A==",4176 "requires": {4177 "@babel/runtime": "^7.11.2",4178 "@polkadot/types": "1.34.1",4179 "@polkadot/util": "^3.4.1",4180 "bn.js": "^5.1.3"4181 }4182 },4183 "@polkadot/util": {4003 "@polkadot/util": {4184 "version": "3.4.1",4004 "version": "3.5.1",4185 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.4.1.tgz",4005 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.5.1.tgz",4186 "integrity": "sha512-CJo0wAzXR8vjAzs9mHDooZr5a3XRW8LlYWik8d/+bv1VDwCC/metSiBrYBOapFhYUjlS5IYIw5bhWS5dnpkXvQ==",4006 "integrity": "sha512-9CBVeQlhmghlVeOttZDxwOtDVWLKpHSP0iAE2vG2bnI6T1dSjD0cFHCG9q7GeD6UAN8z+m17/M9WDV2WXzT6kA==",4187 "requires": {4007 "requires": {4188 "@babel/runtime": "^7.11.2",4008 "@babel/runtime": "^7.11.2",4009 "@polkadot/x-textdecoder": "^0.3.2",4010 "@polkadot/x-textencoder": "^0.3.2",4189 "@types/bn.js": "^4.11.6",4011 "@types/bn.js": "^4.11.6",4190 "bn.js": "^5.1.3",4012 "bn.js": "^5.1.3",4191 "camelcase": "^5.3.1",4013 "camelcase": "^5.3.1",4277 }4099 }4278 },4100 },4279 "@polkadot/keyring": {4101 "@polkadot/keyring": {4280 "version": "3.4.1",4102 "version": "3.5.1",4281 "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-3.4.1.tgz",4103 "resolved": "https://registry.npmjs.org/@polkadot/keyring/-/keyring-3.5.1.tgz",4282 "integrity": "sha512-x8FxzDzyFX5ai+tnPaxAFUBV/2Mw/om8sRoMh+fT6Jzh3nC7pXfecH5ticJPKe73v/y42hn9xM0tiAI5P8Ohcw==",4104 "integrity": "sha512-Wg8PBACl+RobbmcShl659/5a+foU1j7PGdvdr2pZowkZul8jvwyAN+piIyPSfrsaJkbUoDUR9Pe+oVoeF4ZoXg==",4283 "requires": {4105 "requires": {4284 "@babel/runtime": "^7.11.2",4106 "@babel/runtime": "^7.11.2",4285 "@polkadot/util": "3.4.1",4107 "@polkadot/util": "3.5.1",4286 "@polkadot/util-crypto": "3.4.1"4108 "@polkadot/util-crypto": "3.5.1"4287 },4109 },4288 "dependencies": {4110 "dependencies": {4289 "@polkadot/util": {4111 "@polkadot/util": {4290 "version": "3.4.1",4112 "version": "3.5.1",4291 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.4.1.tgz",4113 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.5.1.tgz",4292 "integrity": "sha512-CJo0wAzXR8vjAzs9mHDooZr5a3XRW8LlYWik8d/+bv1VDwCC/metSiBrYBOapFhYUjlS5IYIw5bhWS5dnpkXvQ==",4114 "integrity": "sha512-9CBVeQlhmghlVeOttZDxwOtDVWLKpHSP0iAE2vG2bnI6T1dSjD0cFHCG9q7GeD6UAN8z+m17/M9WDV2WXzT6kA==",4293 "requires": {4115 "requires": {4294 "@babel/runtime": "^7.11.2",4116 "@babel/runtime": "^7.11.2",4117 "@polkadot/x-textdecoder": "^0.3.2",4118 "@polkadot/x-textencoder": "^0.3.2",4295 "@types/bn.js": "^4.11.6",4119 "@types/bn.js": "^4.11.6",4296 "bn.js": "^5.1.3",4120 "bn.js": "^5.1.3",4297 "camelcase": "^5.3.1",4121 "camelcase": "^5.3.1",4302 }4126 }4303 },4127 },4304 "@polkadot/metadata": {4128 "@polkadot/metadata": {4305 "version": "1.34.1",4129 "version": "2.2.1",4306 "resolved": "https://registry.npmjs.org/@polkadot/metadata/-/metadata-1.34.1.tgz",4130 "resolved": "https://registry.npmjs.org/@polkadot/metadata/-/metadata-2.2.1.tgz",4307 "integrity": "sha512-uoaOhNHjECDaLBYvGRaLvF0mhZBFmsV3oikYDP4sZx3a5oD0xYsyXtr5bFPQDImwPFASP8/ltrMVqcYTX42xFg==",4131 "integrity": "sha512-Xp5S2ukNS2rvSeK4cT/xhWzIMmOQZ8BssZU9pqK8u1ttv36CKCD9CRUGxAvG42+SiHV6WMG1S2NAt3UgLthQyw==",4308 "requires": {4132 "requires": {4309 "@babel/runtime": "^7.11.2",4133 "@babel/runtime": "^7.11.2",4310 "@polkadot/types": "1.34.1",4134 "@polkadot/types": "2.2.1",4311 "@polkadot/types-known": "1.34.1",4135 "@polkadot/types-known": "2.2.1",4312 "@polkadot/util": "^3.4.1",4136 "@polkadot/util": "^3.5.1",4313 "@polkadot/util-crypto": "^3.4.1",4137 "@polkadot/util-crypto": "^3.5.1",4314 "bn.js": "^5.1.3"4138 "bn.js": "^5.1.3"4315 },4139 },4316 "dependencies": {4140 "dependencies": {4317 "@polkadot/util": {4141 "@polkadot/util": {4318 "version": "3.4.1",4142 "version": "3.5.1",4319 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.4.1.tgz",4143 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.5.1.tgz",4320 "integrity": "sha512-CJo0wAzXR8vjAzs9mHDooZr5a3XRW8LlYWik8d/+bv1VDwCC/metSiBrYBOapFhYUjlS5IYIw5bhWS5dnpkXvQ==",4144 "integrity": "sha512-9CBVeQlhmghlVeOttZDxwOtDVWLKpHSP0iAE2vG2bnI6T1dSjD0cFHCG9q7GeD6UAN8z+m17/M9WDV2WXzT6kA==",4321 "requires": {4145 "requires": {4322 "@babel/runtime": "^7.11.2",4146 "@babel/runtime": "^7.11.2",4147 "@polkadot/x-textdecoder": "^0.3.2",4148 "@polkadot/x-textencoder": "^0.3.2",4323 "@types/bn.js": "^4.11.6",4149 "@types/bn.js": "^4.11.6",4324 "bn.js": "^5.1.3",4150 "bn.js": "^5.1.3",4325 "camelcase": "^5.3.1",4151 "camelcase": "^5.3.1",4330 }4156 }4331 },4157 },4332 "@polkadot/rpc-core": {4158 "@polkadot/rpc-core": {4333 "version": "1.34.1",4159 "version": "2.2.1",4334 "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-1.34.1.tgz",4160 "resolved": "https://registry.npmjs.org/@polkadot/rpc-core/-/rpc-core-2.2.1.tgz",4335 "integrity": "sha512-BVQDyBEkbRe5b/u8p9UPpTCj0sDZ32sTmPEP43Klc4s9+oHtiNvOFYvkjK5oyW9dlcOwXi8HpLsQxGAeMtM7Tw==",4161 "integrity": "sha512-t3XoR6QPE6TaYsuKXCfOvTW9C6Lvjgcn++0DT33EANANtgtT9b6e+08mEOjf8VtYkwExgzK2aSGwCCoRccYcsg==",4336 "requires": {4162 "requires": {4337 "@babel/runtime": "^7.11.2",4163 "@babel/runtime": "^7.11.2",4338 "@polkadot/metadata": "1.34.1",4164 "@polkadot/metadata": "2.2.1",4339 "@polkadot/rpc-provider": "1.34.1",4165 "@polkadot/rpc-provider": "2.2.1",4340 "@polkadot/types": "1.34.1",4166 "@polkadot/types": "2.2.1",4341 "@polkadot/util": "^3.4.1",4167 "@polkadot/util": "^3.5.1",4342 "memoizee": "^0.4.14",4168 "memoizee": "^0.4.14",4343 "rxjs": "^6.6.3"4169 "rxjs": "^6.6.3"4344 },4170 },4345 "dependencies": {4171 "dependencies": {4346 "@polkadot/metadata": {4347 "version": "1.34.1",4348 "resolved": "https://registry.npmjs.org/@polkadot/metadata/-/metadata-1.34.1.tgz",4349 "integrity": "sha512-uoaOhNHjECDaLBYvGRaLvF0mhZBFmsV3oikYDP4sZx3a5oD0xYsyXtr5bFPQDImwPFASP8/ltrMVqcYTX42xFg==",4350 "requires": {4351 "@babel/runtime": "^7.11.2",4352 "@polkadot/types": "1.34.1",4353 "@polkadot/types-known": "1.34.1",4354 "@polkadot/util": "^3.4.1",4355 "@polkadot/util-crypto": "^3.4.1",4356 "bn.js": "^5.1.3"4357 }4358 },4359 "@polkadot/types": {4360 "version": "1.34.1",4361 "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-1.34.1.tgz",4362 "integrity": "sha512-jPwix2y+ZXKYB4ghODXlqYmcI3Tnsl3iO3xIkiGsZhhs9PdrKibcNeAv4LUiRpPuGRnAM+mrlPrBbCuzguKSGg==",4363 "requires": {4364 "@babel/runtime": "^7.11.2",4365 "@polkadot/metadata": "1.34.1",4366 "@polkadot/util": "^3.4.1",4367 "@polkadot/util-crypto": "^3.4.1",4368 "@types/bn.js": "^4.11.6",4369 "bn.js": "^5.1.3",4370 "memoizee": "^0.4.14",4371 "rxjs": "^6.6.3"4372 }4373 },4374 "@polkadot/types-known": {4375 "version": "1.34.1",4376 "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-1.34.1.tgz",4377 "integrity": "sha512-H9V8u9cqbKjxU/dxEyLl7kJwoBImXpRskQ5+X0fq3BH7g1nQ6jrIg/buRPpbc3GxKivdFYUZWshPY9hbqE8y8A==",4378 "requires": {4379 "@babel/runtime": "^7.11.2",4380 "@polkadot/types": "1.34.1",4381 "@polkadot/util": "^3.4.1",4382 "bn.js": "^5.1.3"4383 }4384 },4385 "@polkadot/util": {4172 "@polkadot/util": {4386 "version": "3.4.1",4173 "version": "3.5.1",4387 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.4.1.tgz",4174 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.5.1.tgz",4388 "integrity": "sha512-CJo0wAzXR8vjAzs9mHDooZr5a3XRW8LlYWik8d/+bv1VDwCC/metSiBrYBOapFhYUjlS5IYIw5bhWS5dnpkXvQ==",4175 "integrity": "sha512-9CBVeQlhmghlVeOttZDxwOtDVWLKpHSP0iAE2vG2bnI6T1dSjD0cFHCG9q7GeD6UAN8z+m17/M9WDV2WXzT6kA==",4389 "requires": {4176 "requires": {4390 "@babel/runtime": "^7.11.2",4177 "@babel/runtime": "^7.11.2",4178 "@polkadot/x-textdecoder": "^0.3.2",4179 "@polkadot/x-textencoder": "^0.3.2",4391 "@types/bn.js": "^4.11.6",4180 "@types/bn.js": "^4.11.6",4392 "bn.js": "^5.1.3",4181 "bn.js": "^5.1.3",4393 "camelcase": "^5.3.1",4182 "camelcase": "^5.3.1",4398 }4187 }4399 },4188 },4400 "@polkadot/rpc-provider": {4189 "@polkadot/rpc-provider": {4401 "version": "1.34.1",4190 "version": "2.2.1",4402 "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-1.34.1.tgz",4191 "resolved": "https://registry.npmjs.org/@polkadot/rpc-provider/-/rpc-provider-2.2.1.tgz",4403 "integrity": "sha512-bebeis9mB4LS9Spk1WSHoadZHsyHmK4gyyC6uKSLZxHZmnopWna6zWnOBIrYHRz7qDHSZC5eNTseuU8NJXtscA==",4192 "integrity": "sha512-s6iIRazo2O8xcyXaNrnWW48qJEx0FqMHD506Z8RzuYzh3jQxlAd53zw0InWZpFTfrvk46VN3tvQJaq9LYvcliA==",4404 "requires": {4193 "requires": {4405 "@babel/runtime": "^7.11.2",4194 "@babel/runtime": "^7.11.2",4406 "@polkadot/metadata": "1.34.1",4195 "@polkadot/metadata": "2.2.1",4407 "@polkadot/types": "1.34.1",4196 "@polkadot/types": "2.2.1",4408 "@polkadot/util": "^3.4.1",4197 "@polkadot/util": "^3.5.1",4409 "@polkadot/util-crypto": "^3.4.1",4198 "@polkadot/util-crypto": "^3.5.1",4410 "@polkadot/x-fetch": "^0.3.2",4199 "@polkadot/x-fetch": "^0.3.2",4411 "@polkadot/x-ws": "^0.3.2",4200 "@polkadot/x-ws": "^0.3.2",4412 "bn.js": "^5.1.3",4201 "bn.js": "^5.1.3",4413 "eventemitter3": "^4.0.7"4202 "eventemitter3": "^4.0.7"4414 },4203 },4415 "dependencies": {4204 "dependencies": {4416 "@polkadot/metadata": {4417 "version": "1.34.1",4418 "resolved": "https://registry.npmjs.org/@polkadot/metadata/-/metadata-1.34.1.tgz",4419 "integrity": "sha512-uoaOhNHjECDaLBYvGRaLvF0mhZBFmsV3oikYDP4sZx3a5oD0xYsyXtr5bFPQDImwPFASP8/ltrMVqcYTX42xFg==",4420 "requires": {4421 "@babel/runtime": "^7.11.2",4422 "@polkadot/types": "1.34.1",4423 "@polkadot/types-known": "1.34.1",4424 "@polkadot/util": "^3.4.1",4425 "@polkadot/util-crypto": "^3.4.1",4426 "bn.js": "^5.1.3"4427 }4428 },4429 "@polkadot/types": {4430 "version": "1.34.1",4431 "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-1.34.1.tgz",4432 "integrity": "sha512-jPwix2y+ZXKYB4ghODXlqYmcI3Tnsl3iO3xIkiGsZhhs9PdrKibcNeAv4LUiRpPuGRnAM+mrlPrBbCuzguKSGg==",4433 "requires": {4434 "@babel/runtime": "^7.11.2",4435 "@polkadot/metadata": "1.34.1",4436 "@polkadot/util": "^3.4.1",4437 "@polkadot/util-crypto": "^3.4.1",4438 "@types/bn.js": "^4.11.6",4439 "bn.js": "^5.1.3",4440 "memoizee": "^0.4.14",4441 "rxjs": "^6.6.3"4442 }4443 },4444 "@polkadot/types-known": {4445 "version": "1.34.1",4446 "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-1.34.1.tgz",4447 "integrity": "sha512-H9V8u9cqbKjxU/dxEyLl7kJwoBImXpRskQ5+X0fq3BH7g1nQ6jrIg/buRPpbc3GxKivdFYUZWshPY9hbqE8y8A==",4448 "requires": {4449 "@babel/runtime": "^7.11.2",4450 "@polkadot/types": "1.34.1",4451 "@polkadot/util": "^3.4.1",4452 "bn.js": "^5.1.3"4453 }4454 },4455 "@polkadot/util": {4205 "@polkadot/util": {4456 "version": "3.4.1",4206 "version": "3.5.1",4457 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.4.1.tgz",4207 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.5.1.tgz",4458 "integrity": "sha512-CJo0wAzXR8vjAzs9mHDooZr5a3XRW8LlYWik8d/+bv1VDwCC/metSiBrYBOapFhYUjlS5IYIw5bhWS5dnpkXvQ==",4208 "integrity": "sha512-9CBVeQlhmghlVeOttZDxwOtDVWLKpHSP0iAE2vG2bnI6T1dSjD0cFHCG9q7GeD6UAN8z+m17/M9WDV2WXzT6kA==",4459 "requires": {4209 "requires": {4460 "@babel/runtime": "^7.11.2",4210 "@babel/runtime": "^7.11.2",4211 "@polkadot/x-textdecoder": "^0.3.2",4212 "@polkadot/x-textencoder": "^0.3.2",4461 "@types/bn.js": "^4.11.6",4213 "@types/bn.js": "^4.11.6",4462 "bn.js": "^5.1.3",4214 "bn.js": "^5.1.3",4463 "camelcase": "^5.3.1",4215 "camelcase": "^5.3.1",4477 }4229 }4478 },4230 },4479 "@polkadot/types": {4231 "@polkadot/types": {4480 "version": "1.34.1",4232 "version": "2.2.1",4481 "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-1.34.1.tgz",4233 "resolved": "https://registry.npmjs.org/@polkadot/types/-/types-2.2.1.tgz",4482 "integrity": "sha512-jPwix2y+ZXKYB4ghODXlqYmcI3Tnsl3iO3xIkiGsZhhs9PdrKibcNeAv4LUiRpPuGRnAM+mrlPrBbCuzguKSGg==",4234 "integrity": "sha512-4kW+pdCgXoUQ4bXIdHMs5/JV7tsxseqlV2O0p6j60CeXZQOaRQJkIeC2I9J+HwpmnkT1SAgakX3wZniFp9nDeA==",4483 "requires": {4235 "requires": {4484 "@babel/runtime": "^7.11.2",4236 "@babel/runtime": "^7.11.2",4485 "@polkadot/metadata": "1.34.1",4237 "@polkadot/metadata": "2.2.1",4486 "@polkadot/util": "^3.4.1",4238 "@polkadot/util": "^3.5.1",4487 "@polkadot/util-crypto": "^3.4.1",4239 "@polkadot/util-crypto": "^3.5.1",4488 "@types/bn.js": "^4.11.6",4240 "@types/bn.js": "^4.11.6",4489 "bn.js": "^5.1.3",4241 "bn.js": "^5.1.3",4490 "memoizee": "^0.4.14",4242 "memoizee": "^0.4.14",4491 "rxjs": "^6.6.3"4243 "rxjs": "^6.6.3"4492 },4244 },4493 "dependencies": {4245 "dependencies": {4494 "@polkadot/util": {4246 "@polkadot/util": {4495 "version": "3.4.1",4247 "version": "3.5.1",4496 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.4.1.tgz",4248 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.5.1.tgz",4497 "integrity": "sha512-CJo0wAzXR8vjAzs9mHDooZr5a3XRW8LlYWik8d/+bv1VDwCC/metSiBrYBOapFhYUjlS5IYIw5bhWS5dnpkXvQ==",4249 "integrity": "sha512-9CBVeQlhmghlVeOttZDxwOtDVWLKpHSP0iAE2vG2bnI6T1dSjD0cFHCG9q7GeD6UAN8z+m17/M9WDV2WXzT6kA==",4498 "requires": {4250 "requires": {4499 "@babel/runtime": "^7.11.2",4251 "@babel/runtime": "^7.11.2",4252 "@polkadot/x-textdecoder": "^0.3.2",4253 "@polkadot/x-textencoder": "^0.3.2",4500 "@types/bn.js": "^4.11.6",4254 "@types/bn.js": "^4.11.6",4501 "bn.js": "^5.1.3",4255 "bn.js": "^5.1.3",4502 "camelcase": "^5.3.1",4256 "camelcase": "^5.3.1",4507 }4261 }4508 },4262 },4509 "@polkadot/types-known": {4263 "@polkadot/types-known": {4510 "version": "1.34.1",4264 "version": "2.2.1",4511 "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-1.34.1.tgz",4265 "resolved": "https://registry.npmjs.org/@polkadot/types-known/-/types-known-2.2.1.tgz",4512 "integrity": "sha512-H9V8u9cqbKjxU/dxEyLl7kJwoBImXpRskQ5+X0fq3BH7g1nQ6jrIg/buRPpbc3GxKivdFYUZWshPY9hbqE8y8A==",4266 "integrity": "sha512-RmxDg1C5bz1GWe1Bk21Lf75PdtwdWWO4mPVkXsZi1zGfFLxoCYcsO4duEab/kAJk2hKyhxANn88SF1tIBpJ2ww==",4513 "requires": {4267 "requires": {4514 "@babel/runtime": "^7.11.2",4268 "@babel/runtime": "^7.11.2",4515 "@polkadot/types": "1.34.1",4269 "@polkadot/types": "2.2.1",4516 "@polkadot/util": "^3.4.1",4270 "@polkadot/util": "^3.5.1",4517 "bn.js": "^5.1.3"4271 "bn.js": "^5.1.3"4518 },4272 },4519 "dependencies": {4273 "dependencies": {4520 "@polkadot/util": {4274 "@polkadot/util": {4521 "version": "3.4.1",4275 "version": "3.5.1",4522 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.4.1.tgz",4276 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.5.1.tgz",4523 "integrity": "sha512-CJo0wAzXR8vjAzs9mHDooZr5a3XRW8LlYWik8d/+bv1VDwCC/metSiBrYBOapFhYUjlS5IYIw5bhWS5dnpkXvQ==",4277 "integrity": "sha512-9CBVeQlhmghlVeOttZDxwOtDVWLKpHSP0iAE2vG2bnI6T1dSjD0cFHCG9q7GeD6UAN8z+m17/M9WDV2WXzT6kA==",4524 "requires": {4278 "requires": {4525 "@babel/runtime": "^7.11.2",4279 "@babel/runtime": "^7.11.2",4280 "@polkadot/x-textdecoder": "^0.3.2",4281 "@polkadot/x-textencoder": "^0.3.2",4526 "@types/bn.js": "^4.11.6",4282 "@types/bn.js": "^4.11.6",4527 "bn.js": "^5.1.3",4283 "bn.js": "^5.1.3",4528 "camelcase": "^5.3.1",4284 "camelcase": "^5.3.1",4546 }4302 }4547 },4303 },4548 "@polkadot/util-crypto": {4304 "@polkadot/util-crypto": {4549 "version": "3.4.1",4305 "version": "3.5.1",4550 "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-3.4.1.tgz",4306 "resolved": "https://registry.npmjs.org/@polkadot/util-crypto/-/util-crypto-3.5.1.tgz",4551 "integrity": "sha512-RdTAiJ6dFE8nQJ7/wQkvYa6aNZG3Lusf/r7UmPJ56dZldvDTP3OdekzcfYdogU8hSJrE/xX84ii4DrHLnXXfAQ==",4307 "integrity": "sha512-7SWxOYG+dUCAkGW2xCJc9gutLJ02T9LwiumTW8cXFysRai4qLA3XRl+XQHAEdRzKA+97IQmtGMl4/Tjq9TGwYw==",4552 "requires": {4308 "requires": {4553 "@babel/runtime": "^7.11.2",4309 "@babel/runtime": "^7.11.2",4554 "@polkadot/util": "3.4.1",4310 "@polkadot/util": "3.5.1",4555 "@polkadot/wasm-crypto": "^1.4.1",4311 "@polkadot/wasm-crypto": "^1.4.1",4556 "base-x": "^3.0.8",4312 "base-x": "^3.0.8",4557 "bip39": "^3.0.2",4313 "bip39": "^3.0.2",4566 },4322 },4567 "dependencies": {4323 "dependencies": {4568 "@polkadot/util": {4324 "@polkadot/util": {4569 "version": "3.4.1",4325 "version": "3.5.1",4570 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.4.1.tgz",4326 "resolved": "https://registry.npmjs.org/@polkadot/util/-/util-3.5.1.tgz",4571 "integrity": "sha512-CJo0wAzXR8vjAzs9mHDooZr5a3XRW8LlYWik8d/+bv1VDwCC/metSiBrYBOapFhYUjlS5IYIw5bhWS5dnpkXvQ==",4327 "integrity": "sha512-9CBVeQlhmghlVeOttZDxwOtDVWLKpHSP0iAE2vG2bnI6T1dSjD0cFHCG9q7GeD6UAN8z+m17/M9WDV2WXzT6kA==",4572 "requires": {4328 "requires": {4573 "@babel/runtime": "^7.11.2",4329 "@babel/runtime": "^7.11.2",4330 "@polkadot/x-textdecoder": "^0.3.2",4331 "@polkadot/x-textencoder": "^0.3.2",4574 "@types/bn.js": "^4.11.6",4332 "@types/bn.js": "^4.11.6",4575 "bn.js": "^5.1.3",4333 "bn.js": "^5.1.3",4576 "camelcase": "^5.3.1",4334 "camelcase": "^5.3.1",4585 "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto/-/wasm-crypto-1.4.1.tgz",4343 "resolved": "https://registry.npmjs.org/@polkadot/wasm-crypto/-/wasm-crypto-1.4.1.tgz",4586 "integrity": "sha512-GPBCh8YvQmA5bobI4rqRkUhrEHkEWU1+lcJVPbZYsa7jiHFaZpzCLrGQfiqW/vtbU1aBS2wmJ0x1nlt33B9QqQ=="4344 "integrity": "sha512-GPBCh8YvQmA5bobI4rqRkUhrEHkEWU1+lcJVPbZYsa7jiHFaZpzCLrGQfiqW/vtbU1aBS2wmJ0x1nlt33B9QqQ=="4587 },4345 },4588 "@polkadot/x-fetch": {4346 "@polkadot/x-fetch": {4589 "version": "0.3.2",4347 "version": "0.3.2",4590 "resolved": "https://registry.npmjs.org/@polkadot/x-fetch/-/x-fetch-0.3.2.tgz",4348 "resolved": "https://registry.npmjs.org/@polkadot/x-fetch/-/x-fetch-0.3.2.tgz",4591 "integrity": "sha512-lk9M8ql/kBBqiZ8KOWj7LFK7P9OxDgVn2fZPNELJzQbfFZwFF8umBPDIWlQIK7wTnlRsQlzOuf6MGEyMK5p42w==",4349 "integrity": "sha512-lk9M8ql/kBBqiZ8KOWj7LFK7P9OxDgVn2fZPNELJzQbfFZwFF8umBPDIWlQIK7wTnlRsQlzOuf6MGEyMK5p42w==",4594 "@types/node-fetch": "^2.5.7",4352 "@types/node-fetch": "^2.5.7",4595 "node-fetch": "^2.6.1"4353 "node-fetch": "^2.6.1"4596 },4354 }4355 },4356 "@polkadot/x-textdecoder": {4357 "version": "0.3.2",4358 "resolved": "https://registry.npmjs.org/@polkadot/x-textdecoder/-/x-textdecoder-0.3.2.tgz",4359 "integrity": "sha512-W3KK6mMzOH5kts8pSkyYyfsQuAsKUHmIm8jQkhQnSR6FRyhwJtHLZnxP3feEwkNkRbGggG6CtDPrxYCuEO0MvA==",4360 "requires": {4361 "@babel/runtime": "^7.11.2"4362 }4363 },4597 "dependencies": {4364 "@polkadot/x-textencoder": {4598 "node-fetch": {4599 "version": "2.6.1",4365 "version": "0.3.2",4600 "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",4366 "resolved": "https://registry.npmjs.org/@polkadot/x-textencoder/-/x-textencoder-0.3.2.tgz",4601 "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="4367 "integrity": "sha512-nm7N9gWgKsZv8In1Fgfm+jYOPjprna/03Cd8hOqkCMRlSq0L4LS+d8BPrFhPOiT57VFTTW/7csLivFdeKv0GMA==",4368 "requires": {4369 "@babel/runtime": "^7.11.2"4370 }4602 }4371 },4603 }4604 },4605 "@polkadot/x-ws": {4372 "@polkadot/x-ws": {4606 "version": "0.3.2",4373 "version": "0.3.2",4607 "resolved": "https://registry.npmjs.org/@polkadot/x-ws/-/x-ws-0.3.2.tgz",4374 "resolved": "https://registry.npmjs.org/@polkadot/x-ws/-/x-ws-0.3.2.tgz",16840 "lower-case": "^1.1.1"16607 "lower-case": "^1.1.1"16841 }16608 }16842 },16609 },16610 "node-fetch": {16611 "version": "2.6.1",16612 "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",16613 "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="16614 },16843 "node-fetch-npm": {16615 "node-fetch-npm": {16844 "version": "2.0.4",16616 "version": "2.0.4",16845 "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz",16617 "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz",tests/package.jsondiffbeforeafterboth23 "license": "Apache 2.0",23 "license": "Apache 2.0",24 "homepage": "",24 "homepage": "",25 "dependencies": {25 "dependencies": {26 "@polkadot/api": "^1.34.1",26 "@polkadot/api": "^2.0.1",27 "@polkadot/api-contract": "^1.34.1",27 "@polkadot/api-contract": "^2.0.1",28 "@polkadot/types": "^1.34.1",28 "@polkadot/types": "^2.0.1",29 "@polkadot/util": "^3.4.1",29 "@polkadot/util": "^3.4.1",30 "@types/bn.js": "^4.11.6",30 "@types/bn.js": "^4.11.6",31 "chai-as-promised": "^7.1.1"31 "chai-as-promised": "^7.1.1"tests/src/contracts.test.tsdiffbeforeafterboth131 });131 });132 });132 });133133134 it('Can transfer balance using smart contract.', async () => {134 it.skip('Can transfer balance using smart contract.', async () => {135 await usingApi(async api => {135 await usingApi(async api => {136 const [alicesBalanceBefore, bobsBalanceBefore] = await getBalance(api, [alicesPublicKey, bobsPublicKey]);136 const [alicesBalanceBefore, bobsBalanceBefore] = await getBalance(api, [alicesPublicKey, bobsPublicKey]);137 const wasm = fs.readFileSync('./src/balance-transfer-contract/calls.wasm');137 const wasm = fs.readFileSync('./src/balance-transfer-contract/calls.wasm');tests/src/flipper/flipper.wasmdiffbeforeafterbothbinary blob — no preview
tests/src/flipper/metadata.jsondiffbeforeafterboth1{1{2 "metadataVersion": "0.1.0",2 "registry": {3 "source": {3 "strings": [4 "hash": "0x36431d9da78a6bb099474e49c9e35a9c3a04272b58815634082626109826cac6",4 "Storage",5 "language": "ink! 3.0.0-rc1",5 "flipper",6 "compiler": "rustc 1.49.0-nightly"6 "__ink_private",7 "__ink_storage",8 "value",9 "Value",10 "ink_core",11 "storage",12 "cell",13 "SyncCell",14 "sync_cell",15 "Key",16 "ink_primitives",17 "new",18 "init_value",19 "bool",20 "default",21 "flip",22 "get"23 ],7 },24 "types": [8 "contract": {25 {26 "id": {27 "custom.name": 1,28 "custom.namespace": [29 2,30 2,31 3,32 433 ],34 "custom.params": []35 },36 "def": {37 "struct.fields": [9 "name": "flipper",38 {39 "name": 5,10 "version": "3.0.0-rc1",40 "type": 211 "authors": [41 }12 "Parity Technologies <admin@parity.io>"42 ]13 ]43 }44 },14 },15 "spec": {16 "constructors": [45 {17 {46 "id": {18 "args": [19 {47 "custom.name": 6,20 "name": "init_value",21 "type": {48 "custom.namespace": [22 "displayName": [49 7,23 "bool"50 8,51 552 ],24 ],53 "custom.params": [25 "type": 154 326 }55 ]56 },27 }28 ],57 "def": {29 "docs": [58 "struct.fields": [30 " Creates a new flipper smart contract initialized with the given value."59 {31 ],60 "name": 9,32 "name": [33 "new"34 ],61 "type": 435 "selector": "0xd183512b"62 }63 ]64 }65 },36 },66 {67 "id": "bool",68 "def": "builtin"69 },70 {37 {71 "id": {72 "custom.name": 10,73 "custom.namespace": [38 "args": [],74 7,75 8,76 9,77 1178 ],79 "custom.params": [39 "docs": [80 340 " Creates a new flipper smart contract initialized to `false`."81 ]41 ],82 },83 "def": {84 "struct.fields": [85 {86 "name": 9,42 "name": [43 "default"44 ],87 "type": 545 "selector": "0x6a3712e2"88 }89 ]90 }91 },46 }92 {47 ],93 "id": {94 "custom.name": 12,95 "custom.namespace": [48 "docs": [],96 1397 ],98 "custom.params": []49 "events": [],99 },100 "def": {50 "messages": [51 {52 "args": [],101 "tuple_struct.types": [53 "docs": [102 654 " Flips the current value of the Flipper's bool."103 ]55 ],56 "mutates": true,57 "name": [58 "flip"59 ],60 "payable": false,61 "returnType": null,62 "selector": "0xc096a5f3"104 }63 },105 },64 {106 {107 "id": {108 "array.len": 32,109 "array.type": 7110 },111 "def": "builtin"112 },113 {114 "id": "u8",115 "def": "builtin"116 }117 ]118 },119 "storage": {65 "args": [],120 "struct.type": 1,66 "docs": [121 "struct.fields": [67 " Returns the current value of the Flipper's bool."122 {68 ],123 "name": 5,69 "mutates": false,124 "layout": {125 "struct.type": 2,70 "name": [126 "struct.fields": [71 "get"127 {72 ],128 "name": 9,73 "payable": false,129 "layout": {74 "returnType": {130 "range.offset": "0x0000000000000000000000000000000000000000000000000000000000000000",75 "displayName": [76 "bool"77 ],131 "range.len": 1,78 "type": 1132 "range.elem_type": 3133 }79 },134 }135 ]136 }137 }138 ]139 },140 "contract": {141 "name": 2,80 "selector": "0x1e5ca456"81 }82 ]83 },142 "constructors": [84 "storage": {143 {144 "name": 14,145 "selector": "[\"0x5E\",\"0xBD\",\"0x88\",\"0xD6\"]",85 "struct": {146 "args": [86 "fields": [147 {87 {148 "name": 15,88 "layout": {149 "type": {89 "cell": {150 "ty": 3,90 "key": "0x0000000000000000000000000000000000000000000000000000000000000000",151 "display_name": [91 "ty": 1152 16153 ]154 }92 }93 },94 "name": "value"155 }95 }156 ],96 ]157 "docs": [97 }158 "Constructor that initializes the `bool` value to the given `init_value`."159 ]160 },98 },161 {162 "name": 17,163 "selector": "[\"0x02\",\"0x22\",\"0xFF\",\"0x18\"]",164 "args": [],165 "docs": [166 "Constructor that initializes the `bool` value to `false`.",167 "",168 "Constructors can delegate to other constructors."169 ]170 }171 ],172 "messages": [99 "types": [173 {174 "name": 18,175 "selector": "[\"0x8C\",\"0x97\",\"0xDB\",\"0x39\"]",176 "mutates": true,177 "args": [],178 "return_type": null,179 "docs": [180 "A message that can be called on instantiated contracts.",181 "This one flips the value of the stored `bool` from `true`",182 "to `false` and vice versa."183 ]184 },185 {100 {186 "name": 19,187 "selector": "[\"0x25\",\"0x44\",\"0x4A\",\"0xFE\"]",188 "mutates": false,189 "args": [],190 "return_type": {101 "def": {191 "ty": 3,192 "display_name": [102 "primitive": "bool"193 16194 ]195 },103 }196 "docs": [197 "Simply returns the current value of our `bool`."198 ]199 }104 }200 ],105 ]201 "events": [],202 "docs": []203 }204}106}