difftreelog
misk: Remove some warnings. Add over_max_size test
in: master
12 files changed
Cargo.lockdiffbeforeafterboth2347 "sha3-const",2347 "sha3-const",2348 "similar-asserts",2348 "similar-asserts",2349 "sp-std",2349 "sp-std",2350 "trybuild",2350]2351]235123522352[[package]]2353[[package]]12670 "zstd",12671 "zstd",12671]12672]1267312674[[package]]12675name = "trybuild"12676version = "1.0.71"12677source = "registry+https://github.com/rust-lang/crates.io-index"12678checksum = "ea496675d71016e9bc76aa42d87f16aefd95447cc5818e671e12b2d7e269075d"12679dependencies = [12680 "glob",12681 "once_cell",12682 "serde",12683 "serde_derive",12684 "serde_json",12685 "termcolor",12686 "toml",12687]126721268812673[[package]]12689[[package]]12674name = "tt-call"12690name = "tt-call"crates/evm-coder/Cargo.tomldiffbeforeafterboth29hex-literal = "0.3.4"29hex-literal = "0.3.4"30similar-asserts = "1.4.2"30similar-asserts = "1.4.2"31concat-idents = "1.1.3"31concat-idents = "1.1.3"32trybuild = "1.0"323333[features]34[features]34default = ["std"]35default = ["std"]crates/evm-coder/src/custom_signature.rsdiffbeforeafterboth423 assert_eq!(<MaxSize>::name(), "!".repeat(SIGNATURE_SIZE_LIMIT));423 assert_eq!(<MaxSize>::name(), "!".repeat(SIGNATURE_SIZE_LIMIT));424 }424 }425426 // This test must NOT compile with "index out of bounds"!427 // #[test]428 // fn over_max_size() {429 // assert_eq!(430 // <Vec<MaxSize>>::name(),431 // "!".repeat(SIGNATURE_SIZE_LIMIT) + "[]"432 // );433 // }434425435 #[test]426 #[test]436 fn make_func_without_args() {427 fn make_func_without_args() {499 assert_eq!(<(u32,)>::name(), "(uint32)");490 assert_eq!(<(u32,)>::name(), "(uint32)");500 }491 }492493 #[test]494 fn over_max_size() {495 let t = trybuild::TestCases::new();496 t.compile_fail("tests/build_failed/custom_signature_over_max_size.rs");497 }501}498}502499crates/evm-coder/tests/build_failed/custom_signature_over_max_size.rsdiffbeforeafterbothno changes
crates/evm-coder/tests/build_failed/custom_signature_over_max_size.stderrdiffbeforeafterbothno changes
pallets/common/src/erc.rsdiffbeforeafterboth36use crate::{36use crate::{37 Pallet, CollectionHandle, Config, CollectionProperties, SelfWeightOf,37 Pallet, CollectionHandle, Config, CollectionProperties, SelfWeightOf,38 eth::{38 eth::{convert_cross_account_to_uint256, convert_tuple_to_cross_account},39 convert_cross_account_to_uint256, convert_cross_account_to_tuple,40 convert_tuple_to_cross_account,41 },42 weights::WeightInfo,39 weights::WeightInfo,43};40};pallets/evm-contract-helpers/src/eth.rsdiffbeforeafterboth17//! Implementation of magic contract17//! Implementation of magic contract181819extern crate alloc;19extern crate alloc;20use alloc::string::ToString;21use core::marker::PhantomData;20use core::marker::PhantomData;22use evm_coder::{21use evm_coder::{23 abi::AbiWriter,22 abi::AbiWriter,pallets/fungible/src/erc.rsdiffbeforeafterboth28 custom_signature::{SignatureUnit, FunctionSignature, SignaturePreferences},28 custom_signature::{SignatureUnit, FunctionSignature, SignaturePreferences},29 make_signature,29 make_signature,30};30};31use pallet_common::eth::convert_tuple_to_cross_account;32use up_data_structs::CollectionMode;31use up_data_structs::CollectionMode;33use pallet_common::erc::{CommonEvmHandler, PrecompileResult};32use pallet_common::erc::{CommonEvmHandler, PrecompileResult};34use sp_std::vec::Vec;33use sp_std::vec::Vec;pallets/refungible/src/erc.rsdiffbeforeafterboth212122extern crate alloc;22extern crate alloc;232324use alloc::string::ToString;25use core::{24use core::{26 char::{REPLACEMENT_CHARACTER, decode_utf16},25 char::{REPLACEMENT_CHARACTER, decode_utf16},27 convert::TryInto,26 convert::TryInto,39use pallet_common::{38use pallet_common::{40 CollectionHandle, CollectionPropertyPermissions,39 CollectionHandle, CollectionPropertyPermissions,41 erc::{CommonEvmHandler, CollectionCall, static_property::key},40 erc::{CommonEvmHandler, CollectionCall, static_property::key},42 eth::convert_tuple_to_cross_account,43};41};44use pallet_evm::{account::CrossAccountId, PrecompileHandle};42use pallet_evm::{account::CrossAccountId, PrecompileHandle};45use pallet_evm_coder_substrate::{call, dispatch_to_evm};43use pallet_evm_coder_substrate::{call, dispatch_to_evm};pallets/unique/src/eth/mod.rsdiffbeforeafterboth43};43};444445use crate::{45use crate::{weights::WeightInfo, Config, SelfWeightOf};46 weights::WeightInfo, Config, SelfWeightOf, NftTransferBasket, FungibleTransferBasket,47 ReFungibleTransferBasket, NftApproveBasket, FungibleApproveBasket, RefungibleApproveBasket,48};494650use alloc::format;47use alloc::format;runtime/common/config/pallets/scheduler.rsdiffbeforeafterboth25use codec::Decode;25use codec::Decode;26use crate::{26use crate::{27 runtime_common::{scheduler::SchedulerPaymentExecutor, config::substrate::RuntimeBlockWeights},27 runtime_common::{scheduler::SchedulerPaymentExecutor, config::substrate::RuntimeBlockWeights},28 Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, OriginCaller, Balances,28 Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, OriginCaller,29};29};30use pallet_unique_scheduler_v2::ScheduledEnsureOriginSuccess;30use pallet_unique_scheduler_v2::ScheduledEnsureOriginSuccess;31use up_common::types::AccountId;31use up_common::types::AccountId;runtime/common/scheduler.rsdiffbeforeafterboth14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617use frame_support::{17use frame_support::dispatch::{GetDispatchInfo, PostDispatchInfo, DispatchInfo};18 traits::NamedReservableCurrency,19 dispatch::{GetDispatchInfo, PostDispatchInfo, DispatchInfo},20};21use sp_runtime::{18use sp_runtime::{22 traits::{Dispatchable, Applyable, Member},19 traits::{Dispatchable, Applyable, Member},23 generic::Era,20 generic::Era,24 transaction_validity::TransactionValidityError,21 transaction_validity::TransactionValidityError,25 DispatchErrorWithPostInfo, DispatchError,22 DispatchErrorWithPostInfo,26};23};27use codec::Encode;24use codec::Encode;28use crate::{Runtime, RuntimeCall, RuntimeOrigin, Balances};25use crate::{Runtime, RuntimeCall, RuntimeOrigin};29use up_common::types::{AccountId, Balance};26use up_common::types::AccountId;30use fp_self_contained::SelfContainedCall;27use fp_self_contained::SelfContainedCall;31use pallet_unique_scheduler_v2::DispatchCall;28use pallet_unique_scheduler_v2::DispatchCall;32use pallet_transaction_payment::ChargeTransactionPayment;29use pallet_transaction_payment::ChargeTransactionPayment;