git.delta.rocks / unique-network / refs/commits / 735c2a469e47

difftreelog

Cleanup chain extension

Greg Zaitsev2021-01-28parent: #f00271a.patch.diff
in: master

2 files changed

modifiedruntime/src/chain_extension.rsdiffbeforeafterboth
34/// The chain Extension of NFT pallet34/// The chain Extension of NFT pallet
35pub struct NFTExtension;35pub struct NFTExtension;
36
37// pub trait ToAccount32 {
38// fn to_account32<E: Ext>(addr: <E::T as SysConfig>::AccountId);
39// }
40
41// impl ToAccount32 for NFTExtension {
42// fn to_account32<E: Ext>(addr: <E::T as SysConfig>::AccountId)
43// where
44// <E::T as SysConfig>::AccountId: UncheckedFrom<<E::T as SysConfig>::Hash> + AsRef<[u8]>,
45// {
46// let mut bytes: [u8; 32];
47// let addrVec: Vec<u8> = addr.encode();
48// for i in 0..32 {
49// bytes[i] = addrVec[i];
50// }
51// AccountId32::from(bytes)
52// }
53
54// }
5536
56impl ChainExtension for NFTExtension {37impl ChainExtension for NFTExtension {
57 fn call<E: Ext>(func_id: u32, env: Environment<E, InitState>) -> Result<RetVal, DispatchError>38 fn call<E: Ext>(func_id: u32, env: Environment<E, InitState>) -> Result<RetVal, DispatchError>
modifiedsmart_contracs/transfer/Cargo.tomldiffbeforeafterboth
--- a/smart_contracs/transfer/Cargo.toml
+++ b/smart_contracs/transfer/Cargo.toml
@@ -5,11 +5,11 @@
 edition = "2018"
 
 [dependencies]
-ink_primitives = { git = "https://github.com/paritytech/ink", branch = "master", default-features = false }
-ink_metadata = { git = "https://github.com/paritytech/ink", branch = "master", default-features = false, features = ["derive"], optional = true }
-ink_env = { git = "https://github.com/paritytech/ink", branch = "master", default-features = false }
-ink_storage = { git = "https://github.com/paritytech/ink", branch = "master", default-features = false }
-ink_lang = { git = "https://github.com/paritytech/ink", branch = "master", default-features = false }
+ink_primitives = { git = "https://github.com/usetech-llc/ink", branch = "unique", default-features = false }
+ink_metadata = { git = "https://github.com/usetech-llc/ink", branch = "unique", default-features = false, features = ["derive"], optional = true }
+ink_env = { git = "https://github.com/usetech-llc/ink", branch = "unique", default-features = false }
+ink_storage = { git = "https://github.com/usetech-llc/ink", branch = "unique", default-features = false }
+ink_lang = { git = "https://github.com/usetech-llc/ink", branch = "unique", default-features = false }
 
 scale = { package = "parity-scale-codec", version = "1.3", default-features = false, features = ["derive"] }
 scale-info = { version = "0.4.1", default-features = false, features = ["derive"], optional = true }