difftreelog
fix refactor weght calculation.
in: master
1 file changed
pallets/common/src/erc.rsdiffbeforeafterboth20 solidity_interface, solidity, ToLog,20 solidity_interface, solidity, ToLog,21 types::*,21 types::*,22 execution::{Result, Error},22 execution::{Result, Error},23 weight,23};24};24pub use pallet_evm::{PrecompileOutput, PrecompileResult, PrecompileHandle, account::CrossAccountId};25pub use pallet_evm::{PrecompileOutput, PrecompileResult, PrecompileHandle, account::CrossAccountId};25use pallet_evm_coder_substrate::dispatch_to_evm;26use pallet_evm_coder_substrate::dispatch_to_evm;31use alloc::format;32use alloc::format;323333use crate::{34use crate::{34 Pallet, CollectionHandle, Config, CollectionProperties,35 Pallet, CollectionHandle, Config, CollectionProperties, SelfWeightOf,35 eth::{36 eth::{36 convert_cross_account_to_uint256, convert_uint256_to_cross_account,37 convert_cross_account_to_uint256, convert_uint256_to_cross_account,37 convert_cross_account_to_tuple,38 convert_cross_account_to_tuple,38 },39 },40 weights::WeightInfo,39};41};404241/// Events for ethereum collection helper.43/// Events for ethereum collection helper.72 ///74 ///73 /// @param key Property key.75 /// @param key Property key.74 /// @param value Propery value.76 /// @param value Propery value.77 #[weight(<SelfWeightOf<T>>::set_collection_properties(1_u32))]75 fn set_collection_property(78 fn set_collection_property(76 &mut self,79 &mut self,77 caller: caller,80 caller: caller,78 key: string,81 key: string,79 value: bytes,82 value: bytes,80 ) -> Result<void> {83 ) -> Result<void> {81 self.consume_store_reads_and_writes(1, 1)?;8283 let caller = T::CrossAccountId::from_eth(caller);84 let caller = T::CrossAccountId::from_eth(caller);84 let key = <Vec<u8>>::from(key)85 let key = <Vec<u8>>::from(key)93 /// Delete collection property.94 /// Delete collection property.94 ///95 ///95 /// @param key Property key.96 /// @param key Property key.97 #[weight(<SelfWeightOf<T>>::delete_collection_properties(1_u32))]96 fn delete_collection_property(&mut self, caller: caller, key: string) -> Result<()> {98 fn delete_collection_property(&mut self, caller: caller, key: string) -> Result<()> {97 self.consume_store_reads_and_writes(1, 1)?;99 self.consume_store_reads_and_writes(1, 1)?;98100