difftreelog
CArgo fmt
in: master
6 files changed
pallets/common/src/erc.rsdiffbeforeafterboth17use evm_coder::{solidity_interface, types::*, execution::{Result, Error}};17use evm_coder::{18 solidity_interface,19 types::*,20 execution::{Result, Error},21};18pub use pallet_evm::{PrecompileOutput, PrecompileResult, account::CrossAccountId};22pub use pallet_evm::{PrecompileOutput, PrecompileResult, account::CrossAccountId};19use pallet_evm_coder_substrate::dispatch_to_evm;23use pallet_evm_coder_substrate::dispatch_to_evm;100 match limit.as_str() {95 match limit.as_str() {101 "accountTokenOwnershipLimit" => {96 "accountTokenOwnershipLimit" => {102 limits.account_token_ownership_limit = parse_int(value)?;97 limits.account_token_ownership_limit = parse_int(value)?;103 },98 }104 "sponsoredDataSize" => {99 "sponsoredDataSize" => {105 limits.sponsored_data_size = parse_int(value)?;100 limits.sponsored_data_size = parse_int(value)?;106 },101 }107 "sponsoredDataRateLimit" => {102 "sponsoredDataRateLimit" => {108 limits.sponsored_data_rate_limit = Some(SponsoringRateLimit::Blocks(parse_int(value)?.unwrap()));103 limits.sponsored_data_rate_limit =104 Some(SponsoringRateLimit::Blocks(parse_int(value)?.unwrap()));109 },105 }110 "tokenLimit" => {106 "tokenLimit" => {111 limits.token_limit = parse_int(value)?;107 limits.token_limit = parse_int(value)?;112 },108 }113 "sponsorTransferTimeout" => {109 "sponsorTransferTimeout" => {114 limits.sponsor_transfer_timeout = parse_int(value)?;110 limits.sponsor_transfer_timeout = parse_int(value)?;115 },111 }116 "sponsorApproveTimeout" => {112 "sponsorApproveTimeout" => {117 limits.sponsor_approve_timeout = parse_int(value)?;113 limits.sponsor_approve_timeout = parse_int(value)?;118 },114 }119 "ownerCanTransfer" => {115 "ownerCanTransfer" => {120 limits.owner_can_transfer = parse_bool(value)?;116 limits.owner_can_transfer = parse_bool(value)?;121 },117 }122 "ownerCanDestroy" => {118 "ownerCanDestroy" => {123 limits.owner_can_destroy = parse_bool(value)?;119 limits.owner_can_destroy = parse_bool(value)?;124 },120 }125 "transfersEnabled" => {121 "transfersEnabled" => {126 limits.transfers_enabled = parse_bool(value)?;122 limits.transfers_enabled = parse_bool(value)?;127 },123 }128 _ => return Err(Error::Revert(format!("Unknown limit \"{}\"", limit)))124 _ => return Err(Error::Revert(format!("Unknown limit \"{}\"", limit))),129 }125 }130 self.limits = limits;126 self.limits = limits;131 save(self);127 save(self);pallets/evm-contract-helpers/src/eth.rsdiffbeforeafterboth20use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};20use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};21use pallet_evm::{21use pallet_evm::{22 ExitRevert, OnCreate, OnMethodCall, PrecompileResult, PrecompileFailure,22 ExitRevert, OnCreate, OnMethodCall, PrecompileResult, PrecompileFailure,23 account::CrossAccountId23 account::CrossAccountId,24};24};25use sp_core::H160;25use sp_core::H160;26use crate::{26use crate::{pallets/nonfungible/src/common.rsdiffbeforeafterboth23};23};24use pallet_common::{24use pallet_common::{25 CommonCollectionOperations, CommonWeightInfo, with_weight, weights::WeightInfo as _,25 CommonCollectionOperations, CommonWeightInfo, with_weight, weights::WeightInfo as _,26 PropertyKeyPermission,26};27};27use sp_runtime::DispatchError;28use sp_runtime::DispatchError;28use sp_std::vec::Vec;29use sp_std::vec::Vec;pallets/nonfungible/src/erc.rsdiffbeforeafterboth23use frame_support::BoundedVec;23use frame_support::BoundedVec;24use up_data_structs::{TokenId, SchemaVersion, PropertyPermission, PropertyKeyPermission, Property, CollectionId, PropertyKey, CollectionPropertiesVec};24use up_data_structs::{25 TokenId, SchemaVersion, PropertyPermission, PropertyKeyPermission, Property, CollectionId,26 PropertyKey, CollectionPropertiesVec,27};25use pallet_evm_coder_substrate::dispatch_to_evm;28use pallet_evm_coder_substrate::dispatch_to_evm;26use sp_core::{H160, U256};29use sp_core::{H160, U256};387 value: token_uri.into_bytes().try_into()391 value: token_uri392 .into_bytes()393 .try_into()388 .map_err(|_| "token uri is too long")?394 .map_err(|_| "token uri is too long")?,389 }).map_err(|e| Error::Revert(alloc::format!("Can't add property: {:?}", e)))?;395 })396 .map_err(|e| Error::Revert(alloc::format!("Can't add property: {:?}", e)))?;390397pallets/unique/src/eth/mod.rsdiffbeforeafterboth87 up_data_structs::CollectionPropertiesPermissionsVec::default();87 token_property_permissions.try_push(up_data_structs::PropertyKeyPermission{88 token_property_permissions88 key,89 .try_push(up_data_structs::PropertyKeyPermission { key, permission })89 permission,90 }).map_err(|e| Error::Revert(format!("{:?}", e)))?;90 .map_err(|e| Error::Revert(format!("{:?}", e)))?;919192 let data = CreateCollectionData {92 let data = CreateCollectionData {runtime/opal/src/lib.rsdiffbeforeafterbothno syntactic changes