git.delta.rocks / unique-network / refs/commits / dc76967d4780

difftreelog

refac: rename value -> Value

Trubnikov Sergey2023-01-18parent: #64d0cdb.patch.diff
in: master

5 files changed

modifiedcrates/evm-coder/procedural/src/solidity_interface.rsdiffbeforeafterboth
--- a/crates/evm-coder/procedural/src/solidity_interface.rs
+++ b/crates/evm-coder/procedural/src/solidity_interface.rs
@@ -347,7 +347,7 @@
 
 	fn is_value(&self) -> bool {
 		if let Ok(ident) = self.plain() {
-			return ident == "value";
+			return ident == "Value";
 		}
 		false
 	}
modifiedcrates/evm-coder/src/lib.rsdiffbeforeafterboth
--- a/crates/evm-coder/src/lib.rs
+++ b/crates/evm-coder/src/lib.rs
@@ -145,7 +145,7 @@
 
 	//#region Special types
 	/// Makes function payable
-	pub type value = U256;
+	pub type Value = U256;
 	/// Makes function caller-sensitive
 	pub type caller = Address;
 	//#endregion
modifiedcrates/evm-coder/tests/random.rsdiffbeforeafterboth
--- a/crates/evm-coder/tests/random.rs
+++ b/crates/evm-coder/tests/random.rs
@@ -67,7 +67,7 @@
 	fn caller_sensitive(&self, _caller: caller) -> Result<u8> {
 		unreachable!()
 	}
-	fn payable(&mut self, _value: value) -> Result<u8> {
+	fn payable(&mut self, _value: Value) -> Result<u8> {
 		unreachable!()
 	}
 
modifiedpallets/evm-coder-substrate/src/lib.rsdiffbeforeafterboth
--- a/pallets/evm-coder-substrate/src/lib.rs
+++ b/pallets/evm-coder-substrate/src/lib.rs
@@ -41,7 +41,7 @@
 use evm_coder::{
 	abi::{AbiReader, AbiWrite, AbiWriter},
 	execution,
-	types::{Msg, value},
+	types::{Msg, Value},
 };
 
 pub use pallet::*;
@@ -256,7 +256,7 @@
 >(
 	caller: H160,
 	e: &mut E,
-	value: value,
+	value: Value,
 	input: &[u8],
 ) -> execution::Result<Option<AbiWriter>> {
 	let (selector, mut reader) = AbiReader::new_call(input)?;
modifiedpallets/unique/src/eth/mod.rsdiffbeforeafterboth
88#[inline(always)]88#[inline(always)]
89fn create_collection_internal<T: Config>(89fn create_collection_internal<T: Config>(
90 caller: caller,90 caller: caller,
91 value: value,91 value: Value,
92 name: String,92 name: String,
93 collection_mode: CollectionMode,93 collection_mode: CollectionMode,
94 description: String,94 description: String,
118 Ok(address)118 Ok(address)
119}119}
120120
121fn check_sent_amount_equals_collection_creation_price<T: Config>(value: value) -> Result<()> {121fn check_sent_amount_equals_collection_creation_price<T: Config>(value: Value) -> Result<()> {
122 let value = value.as_u128();122 let value = value.as_u128();
123 let creation_price: u128 = T::CollectionCreationPrice::get()123 let creation_price: u128 = T::CollectionCreationPrice::get()
124 .try_into()124 .try_into()
150 fn create_nft_collection(150 fn create_nft_collection(
151 &mut self,151 &mut self,
152 caller: caller,152 caller: caller,
153 value: value,153 value: Value,
154 name: String,154 name: String,
155 description: String,155 description: String,
156 token_prefix: String,156 token_prefix: String,
189 fn create_nonfungible_collection(189 fn create_nonfungible_collection(
190 &mut self,190 &mut self,
191 caller: caller,191 caller: caller,
192 value: value,192 value: Value,
193 name: String,193 name: String,
194 description: String,194 description: String,
195 token_prefix: String,195 token_prefix: String,
209 fn create_rft_collection(209 fn create_rft_collection(
210 &mut self,210 &mut self,
211 caller: caller,211 caller: caller,
212 value: value,212 value: Value,
213 name: String,213 name: String,
214 description: String,214 description: String,
215 token_prefix: String,215 token_prefix: String,
229 fn create_fungible_collection(229 fn create_fungible_collection(
230 &mut self,230 &mut self,
231 caller: caller,231 caller: caller,
232 value: value,232 value: Value,
233 name: String,233 name: String,
234 decimals: u8,234 decimals: u8,
235 description: String,235 description: String,
355 Ok(false)355 Ok(false)
356 }356 }
357357
358 fn collection_creation_fee(&self) -> Result<value> {358 fn collection_creation_fee(&self) -> Result<Value> {
359 let price: u128 = T::CollectionCreationPrice::get()359 let price: u128 = T::CollectionCreationPrice::get()
360 .try_into()360 .try_into()
361 .map_err(|_| ()) // workaround for `expect` requiring `Debug` trait361 .map_err(|_| ()) // workaround for `expect` requiring `Debug` trait