mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-14 00:25:51 +00:00
contracts: Improve contract address derivation (#12883)
* Add prefix to address derivation * Extend benchmark * Fix node test * ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts * Adapt to new benchmark * Update dispatchable benchmarks * ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts * Use benchmark results * Apply suggestions from code review Co-authored-by: Sasha Gryaznov <hi@agryaznov.com> * Don't use T::AdressGenerator directly * Rename constructor_args to input_data Co-authored-by: command-bot <> Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>
This commit is contained in:
committed by
GitHub
parent
af15848be0
commit
4083b5358a
@@ -26,7 +26,6 @@ use crate::{
|
||||
AccountIdOf, CodeVec, Config, Error, Schedule,
|
||||
};
|
||||
use codec::{Encode, MaxEncodedLen};
|
||||
use sp_core::crypto::UncheckedFrom;
|
||||
use sp_runtime::{traits::Hash, DispatchError};
|
||||
use sp_std::prelude::*;
|
||||
use wasm_instrument::{
|
||||
@@ -396,7 +395,6 @@ fn instrument<E, T>(
|
||||
where
|
||||
E: Environment<()>,
|
||||
T: Config,
|
||||
T::AccountId: UncheckedFrom<T::Hash> + AsRef<[u8]>,
|
||||
{
|
||||
// Do not enable any features here. Any additional feature needs to be carefully
|
||||
// checked for potential security issues. For example, enabling multi value could lead
|
||||
@@ -500,7 +498,6 @@ pub fn prepare<E, T>(
|
||||
where
|
||||
E: Environment<()>,
|
||||
T: Config,
|
||||
T::AccountId: UncheckedFrom<T::Hash> + AsRef<[u8]>,
|
||||
{
|
||||
let (code, (initial, maximum)) =
|
||||
instrument::<E, T>(original_code.as_ref(), schedule, determinism, try_instantiate)?;
|
||||
@@ -547,7 +544,6 @@ pub fn reinstrument<E, T>(
|
||||
where
|
||||
E: Environment<()>,
|
||||
T: Config,
|
||||
T::AccountId: UncheckedFrom<T::Hash> + AsRef<[u8]>,
|
||||
{
|
||||
instrument::<E, T>(original_code, schedule, determinism, TryInstantiate::Skip)
|
||||
.map_err(|(err, msg)| {
|
||||
|
||||
Reference in New Issue
Block a user