mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-10-20 18:56:17 +00:00
update cargo dependencies (#395)
Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
1 parent
6549a4f825
commit
42cac55be8
10 files changed
+2257
-1703
No files matched your search
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
This is a development pre-release.
|
This is a development pre-release.
|
||||||
|
|
||||||
Supported `polkadot-sdk` rev: `2503.0.1`
|
Supported `polkadot-sdk` rev: `2509.0.0`
|
||||||
|
|
||||||
### Chnaged
|
### Chnaged
|
||||||
- Emulated EVM heap memory accesses of zero length are never out of bounds.
|
- Emulated EVM heap memory accesses of zero length are never out of bounds.
|
||||||
|
|||||||
Generated
+2194
-1657
File diff suppressed because it is too large.
Load diff
+10
-10
@@ -46,21 +46,21 @@ num = "0.4.3"
|
|||||||
sha1 = "0.10"
|
sha1 = "0.10"
|
||||||
sha3 = "0.10"
|
sha3 = "0.10"
|
||||||
thiserror = "2.0"
|
thiserror = "2.0"
|
||||||
which = "7.0"
|
which = "8.0"
|
||||||
path-slash = "0.2"
|
path-slash = "0.2"
|
||||||
rayon = "1.10"
|
rayon = "1.10"
|
||||||
clap = { version = "4", default-features = false, features = ["derive"] }
|
clap = { version = "4", default-features = false, features = ["derive"] }
|
||||||
polkavm-common = "0.24.0"
|
polkavm-common = "0.29.0"
|
||||||
polkavm-linker = "0.24.0"
|
polkavm-linker = "0.29.0"
|
||||||
polkavm-disassembler = "0.24.0"
|
polkavm-disassembler = "0.29.0"
|
||||||
polkavm = "0.24.0"
|
polkavm = "0.29.0"
|
||||||
alloy-primitives = { version = "1.1", features = ["serde"] }
|
alloy-primitives = { version = "1.1", features = ["serde"] }
|
||||||
alloy-sol-types = "1.1"
|
alloy-sol-types = "1.1"
|
||||||
alloy-genesis = "1.0"
|
alloy-genesis = "1.0.41"
|
||||||
alloy-serde = "1.0"
|
alloy-serde = "1.0"
|
||||||
env_logger = { version = "0.11.8", default-features = false }
|
env_logger = { version = "0.11.8", default-features = false }
|
||||||
serde_stacker = "0.1.12"
|
serde_stacker = "0.1.12"
|
||||||
criterion = { version = "0.6", features = ["html_reports"] }
|
criterion = { version = "0.7", features = ["html_reports"] }
|
||||||
log = { version = "0.4.27" }
|
log = { version = "0.4.27" }
|
||||||
git2 = { version = "0.20.2", default-features = false }
|
git2 = { version = "0.20.2", default-features = false }
|
||||||
downloader = "0.2.8"
|
downloader = "0.2.8"
|
||||||
@@ -68,15 +68,15 @@ flate2 = "1.1"
|
|||||||
fs_extra = "1.3"
|
fs_extra = "1.3"
|
||||||
num_cpus = "1"
|
num_cpus = "1"
|
||||||
tar = "0.4"
|
tar = "0.4"
|
||||||
toml = "0.8"
|
toml = "0.9"
|
||||||
assert_cmd = "2.0"
|
assert_cmd = "2"
|
||||||
assert_fs = "1.1"
|
assert_fs = "1.1"
|
||||||
normpath = "1.3"
|
normpath = "1.3"
|
||||||
|
|
||||||
# polkadot-sdk and friends
|
# polkadot-sdk and friends
|
||||||
codec = { version = "3.7.5", default-features = false, package = "parity-scale-codec" }
|
codec = { version = "3.7.5", default-features = false, package = "parity-scale-codec" }
|
||||||
scale-info = { version = "2.11.6", default-features = false }
|
scale-info = { version = "2.11.6", default-features = false }
|
||||||
polkadot-sdk = { version = "2503.0.1" }
|
polkadot-sdk = { version = "2509.0.0" }
|
||||||
|
|
||||||
# llvm
|
# llvm
|
||||||
[workspace.dependencies.inkwell]
|
[workspace.dependencies.inkwell]
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"Baseline": 914,
|
"Baseline": 914,
|
||||||
"Computation": 2295,
|
"Computation": 2295,
|
||||||
"DivisionArithmetics": 9085,
|
"DivisionArithmetics": 14510,
|
||||||
"ERC20": 17499,
|
"ERC20": 17499,
|
||||||
"Events": 1674,
|
"Events": 1674,
|
||||||
"FibonacciIterative": 1490,
|
"FibonacciIterative": 1490,
|
||||||
|
|||||||
@@ -2,20 +2,20 @@ pub mod common;
|
|||||||
|
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
||||||
use assert_cmd::prelude::*;
|
use assert_cmd::{cargo, prelude::*};
|
||||||
|
|
||||||
/// This test verifies that the LLVM repository can be successfully cloned, built, and cleaned.
|
/// This test verifies that the LLVM repository can be successfully cloned, built, and cleaned.
|
||||||
#[test]
|
#[test]
|
||||||
fn clone_build_and_clean() -> anyhow::Result<()> {
|
fn clone_build_and_clean() -> anyhow::Result<()> {
|
||||||
let test_dir = common::TestDir::with_lockfile(None)?;
|
let test_dir = common::TestDir::with_lockfile(None)?;
|
||||||
|
|
||||||
Command::cargo_bin(common::REVIVE_LLVM)?
|
Command::new(cargo::cargo_bin!("revive-llvm"))
|
||||||
.current_dir(test_dir.path())
|
.current_dir(test_dir.path())
|
||||||
.arg("clone")
|
.arg("clone")
|
||||||
.assert()
|
.assert()
|
||||||
.success();
|
.success();
|
||||||
|
|
||||||
Command::cargo_bin(common::REVIVE_LLVM)?
|
Command::new(cargo::cargo_bin!("revive-llvm"))
|
||||||
.current_dir(test_dir.path())
|
.current_dir(test_dir.path())
|
||||||
.arg("build")
|
.arg("build")
|
||||||
.arg("--llvm-projects")
|
.arg("--llvm-projects")
|
||||||
@@ -25,13 +25,13 @@ fn clone_build_and_clean() -> anyhow::Result<()> {
|
|||||||
.assert()
|
.assert()
|
||||||
.success();
|
.success();
|
||||||
|
|
||||||
Command::cargo_bin(common::REVIVE_LLVM)?
|
Command::new(cargo::cargo_bin!("revive-llvm"))
|
||||||
.current_dir(test_dir.path())
|
.current_dir(test_dir.path())
|
||||||
.arg("builtins")
|
.arg("builtins")
|
||||||
.assert()
|
.assert()
|
||||||
.success();
|
.success();
|
||||||
|
|
||||||
Command::cargo_bin(common::REVIVE_LLVM)?
|
Command::new(cargo::cargo_bin!("revive-llvm"))
|
||||||
.current_dir(test_dir.path())
|
.current_dir(test_dir.path())
|
||||||
.arg("clean")
|
.arg("clean")
|
||||||
.assert()
|
.assert()
|
||||||
@@ -47,13 +47,13 @@ fn clone_build_and_clean() -> anyhow::Result<()> {
|
|||||||
fn clone_build_and_clean_musl() -> anyhow::Result<()> {
|
fn clone_build_and_clean_musl() -> anyhow::Result<()> {
|
||||||
let test_dir = common::TestDir::with_lockfile(None)?;
|
let test_dir = common::TestDir::with_lockfile(None)?;
|
||||||
|
|
||||||
Command::cargo_bin(common::REVIVE_LLVM)?
|
Command::new(cargo::cargo_bin!("revive-llvm"))
|
||||||
.arg("clone")
|
.arg("clone")
|
||||||
.current_dir(test_dir.path())
|
.current_dir(test_dir.path())
|
||||||
.assert()
|
.assert()
|
||||||
.success();
|
.success();
|
||||||
|
|
||||||
Command::cargo_bin(common::REVIVE_LLVM)?
|
Command::new(cargo::cargo_bin!("revive-llvm"))
|
||||||
.current_dir(test_dir.path())
|
.current_dir(test_dir.path())
|
||||||
.arg("build")
|
.arg("build")
|
||||||
.arg("--llvm-projects")
|
.arg("--llvm-projects")
|
||||||
@@ -63,7 +63,7 @@ fn clone_build_and_clean_musl() -> anyhow::Result<()> {
|
|||||||
.assert()
|
.assert()
|
||||||
.success();
|
.success();
|
||||||
|
|
||||||
Command::cargo_bin(common::REVIVE_LLVM)?
|
Command::new(cargo::cargo_bin!("revive-llvm"))
|
||||||
.arg("--target-env")
|
.arg("--target-env")
|
||||||
.arg("musl")
|
.arg("musl")
|
||||||
.arg("build")
|
.arg("build")
|
||||||
@@ -75,7 +75,7 @@ fn clone_build_and_clean_musl() -> anyhow::Result<()> {
|
|||||||
.assert()
|
.assert()
|
||||||
.success();
|
.success();
|
||||||
|
|
||||||
Command::cargo_bin(common::REVIVE_LLVM)?
|
Command::new(cargo::cargo_bin!("revive-llvm"))
|
||||||
.current_dir(test_dir.path())
|
.current_dir(test_dir.path())
|
||||||
.arg("clean")
|
.arg("clean")
|
||||||
.assert()
|
.assert()
|
||||||
@@ -91,13 +91,13 @@ fn clone_build_and_clean_musl() -> anyhow::Result<()> {
|
|||||||
fn debug_build_with_tests_coverage() -> anyhow::Result<()> {
|
fn debug_build_with_tests_coverage() -> anyhow::Result<()> {
|
||||||
let test_dir = common::TestDir::with_lockfile(None)?;
|
let test_dir = common::TestDir::with_lockfile(None)?;
|
||||||
|
|
||||||
Command::cargo_bin(common::REVIVE_LLVM)?
|
Command::new(cargo::cargo_bin!("revive-llvm"))
|
||||||
.current_dir(test_dir.path())
|
.current_dir(test_dir.path())
|
||||||
.arg("clone")
|
.arg("clone")
|
||||||
.assert()
|
.assert()
|
||||||
.success();
|
.success();
|
||||||
|
|
||||||
Command::cargo_bin(common::REVIVE_LLVM)?
|
Command::new(cargo::cargo_bin!("revive-llvm"))
|
||||||
.current_dir(test_dir.path())
|
.current_dir(test_dir.path())
|
||||||
.arg("build")
|
.arg("build")
|
||||||
.arg("--enable-coverage")
|
.arg("--enable-coverage")
|
||||||
@@ -120,13 +120,13 @@ fn debug_build_with_tests_coverage() -> anyhow::Result<()> {
|
|||||||
fn build_with_sanitizers() -> anyhow::Result<()> {
|
fn build_with_sanitizers() -> anyhow::Result<()> {
|
||||||
let test_dir = common::TestDir::with_lockfile(None)?;
|
let test_dir = common::TestDir::with_lockfile(None)?;
|
||||||
|
|
||||||
Command::cargo_bin(common::REVIVE_LLVM)?
|
Command::new(cargo::cargo_bin!("revive-llvm"))
|
||||||
.current_dir(test_dir.path())
|
.current_dir(test_dir.path())
|
||||||
.arg("clone")
|
.arg("clone")
|
||||||
.assert()
|
.assert()
|
||||||
.success();
|
.success();
|
||||||
|
|
||||||
Command::cargo_bin(common::REVIVE_LLVM)?
|
Command::new(cargo::cargo_bin!("revive-llvm"))
|
||||||
.current_dir(test_dir.path())
|
.current_dir(test_dir.path())
|
||||||
.arg("build")
|
.arg("build")
|
||||||
.arg("--sanitizer")
|
.arg("--sanitizer")
|
||||||
@@ -146,16 +146,16 @@ fn build_with_sanitizers() -> anyhow::Result<()> {
|
|||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
fn clone_build_and_clean_emscripten() -> anyhow::Result<()> {
|
fn clone_build_and_clean_emscripten() -> anyhow::Result<()> {
|
||||||
let test_dir = common::TestDir::with_lockfile(None)?;
|
let test_dir = common::TestDir::with_lockfile(None)?;
|
||||||
let command = Command::cargo_bin(common::REVIVE_LLVM)?;
|
let command = Command::new(cargo::cargo_bin!("revive-llvm"));
|
||||||
let program = command.get_program().to_string_lossy();
|
let program = command.get_program().to_string_lossy();
|
||||||
|
|
||||||
Command::cargo_bin(common::REVIVE_LLVM)?
|
Command::new(cargo::cargo_bin!("revive-llvm"))
|
||||||
.current_dir(test_dir.path())
|
.current_dir(test_dir.path())
|
||||||
.arg("clone")
|
.arg("clone")
|
||||||
.assert()
|
.assert()
|
||||||
.success();
|
.success();
|
||||||
|
|
||||||
Command::cargo_bin(common::REVIVE_LLVM)?
|
Command::new(cargo::cargo_bin!("revive-llvm"))
|
||||||
.current_dir(test_dir.path())
|
.current_dir(test_dir.path())
|
||||||
.arg("build")
|
.arg("build")
|
||||||
.arg("--llvm-projects")
|
.arg("--llvm-projects")
|
||||||
@@ -183,7 +183,7 @@ fn clone_build_and_clean_emscripten() -> anyhow::Result<()> {
|
|||||||
.assert()
|
.assert()
|
||||||
.success();
|
.success();
|
||||||
|
|
||||||
Command::cargo_bin(common::REVIVE_LLVM)?
|
Command::new(cargo::cargo_bin!("revive-llvm"))
|
||||||
.arg("clean")
|
.arg("clean")
|
||||||
.current_dir(test_dir.path())
|
.current_dir(test_dir.path())
|
||||||
.assert()
|
.assert()
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ pub mod common;
|
|||||||
|
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
||||||
use assert_cmd::prelude::*;
|
use assert_cmd::{cargo, prelude::*};
|
||||||
|
|
||||||
/// This test verifies that after cloning the LLVM repository, checking out a specific branch
|
/// This test verifies that after cloning the LLVM repository, checking out a specific branch
|
||||||
/// or reference works as expected.
|
/// or reference works as expected.
|
||||||
@@ -10,13 +10,13 @@ use assert_cmd::prelude::*;
|
|||||||
fn checkout_after_clone() -> anyhow::Result<()> {
|
fn checkout_after_clone() -> anyhow::Result<()> {
|
||||||
let test_dir = common::TestDir::with_lockfile(None)?;
|
let test_dir = common::TestDir::with_lockfile(None)?;
|
||||||
|
|
||||||
Command::cargo_bin(common::REVIVE_LLVM)?
|
Command::new(cargo::cargo_bin!("revive-llvm"))
|
||||||
.current_dir(test_dir.path())
|
.current_dir(test_dir.path())
|
||||||
.arg("clone")
|
.arg("clone")
|
||||||
.assert()
|
.assert()
|
||||||
.success();
|
.success();
|
||||||
|
|
||||||
Command::cargo_bin(common::REVIVE_LLVM)?
|
Command::new(cargo::cargo_bin!("revive-llvm"))
|
||||||
.current_dir(test_dir.path())
|
.current_dir(test_dir.path())
|
||||||
.arg("checkout")
|
.arg("checkout")
|
||||||
.assert()
|
.assert()
|
||||||
@@ -31,13 +31,13 @@ fn checkout_after_clone() -> anyhow::Result<()> {
|
|||||||
fn force_checkout() -> anyhow::Result<()> {
|
fn force_checkout() -> anyhow::Result<()> {
|
||||||
let test_dir = common::TestDir::with_lockfile(None)?;
|
let test_dir = common::TestDir::with_lockfile(None)?;
|
||||||
|
|
||||||
Command::cargo_bin(common::REVIVE_LLVM)?
|
Command::new(cargo::cargo_bin!("revive-llvm"))
|
||||||
.current_dir(test_dir.path())
|
.current_dir(test_dir.path())
|
||||||
.arg("clone")
|
.arg("clone")
|
||||||
.assert()
|
.assert()
|
||||||
.success();
|
.success();
|
||||||
|
|
||||||
Command::cargo_bin(common::REVIVE_LLVM)?
|
Command::new(cargo::cargo_bin!("revive-llvm"))
|
||||||
.current_dir(test_dir.path())
|
.current_dir(test_dir.path())
|
||||||
.arg("checkout")
|
.arg("checkout")
|
||||||
.arg("--force")
|
.arg("--force")
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ pub mod common;
|
|||||||
|
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
|
||||||
use assert_cmd::prelude::*;
|
use assert_cmd::{cargo, prelude::*};
|
||||||
|
|
||||||
/// This test verifies that the LLVM repository can be successfully cloned using a specific branch
|
/// This test verifies that the LLVM repository can be successfully cloned using a specific branch
|
||||||
/// and reference.
|
/// and reference.
|
||||||
@@ -10,7 +10,7 @@ use assert_cmd::prelude::*;
|
|||||||
fn clone() -> anyhow::Result<()> {
|
fn clone() -> anyhow::Result<()> {
|
||||||
let test_dir = common::TestDir::with_lockfile(None)?;
|
let test_dir = common::TestDir::with_lockfile(None)?;
|
||||||
|
|
||||||
Command::cargo_bin(common::REVIVE_LLVM)?
|
Command::new(cargo::cargo_bin!("revive-llvm"))
|
||||||
.current_dir(test_dir.path())
|
.current_dir(test_dir.path())
|
||||||
.arg("clone")
|
.arg("clone")
|
||||||
.assert()
|
.assert()
|
||||||
@@ -25,7 +25,7 @@ fn clone() -> anyhow::Result<()> {
|
|||||||
fn clone_deep() -> anyhow::Result<()> {
|
fn clone_deep() -> anyhow::Result<()> {
|
||||||
let test_dir = common::TestDir::with_lockfile(None)?;
|
let test_dir = common::TestDir::with_lockfile(None)?;
|
||||||
|
|
||||||
Command::cargo_bin(common::REVIVE_LLVM)?
|
Command::new(cargo::cargo_bin!("revive-llvm"))
|
||||||
.current_dir(test_dir.path())
|
.current_dir(test_dir.path())
|
||||||
.arg("clone")
|
.arg("clone")
|
||||||
.arg("--deep")
|
.arg("--deep")
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ use std::time::Duration;
|
|||||||
|
|
||||||
use hex::{FromHex, ToHex};
|
use hex::{FromHex, ToHex};
|
||||||
use pallet_revive::{AddressMapper, ExecReturnValue, InstantiateReturnValue};
|
use pallet_revive::{AddressMapper, ExecReturnValue, InstantiateReturnValue};
|
||||||
|
use polkadot_sdk::frame_support::traits::Currency;
|
||||||
|
use polkadot_sdk::pallet_revive::{Config, Pallet};
|
||||||
use polkadot_sdk::*;
|
use polkadot_sdk::*;
|
||||||
use polkadot_sdk::{
|
use polkadot_sdk::{
|
||||||
pallet_revive::ContractResult,
|
pallet_revive::ContractResult,
|
||||||
@@ -58,6 +60,8 @@ pub const CHARLIE: H160 = H160([3u8; 20]);
|
|||||||
pub const GAS_LIMIT: Weight = Weight::from_parts(100_000_000_000_000, 3 * 1024 * 1024 * 1024);
|
pub const GAS_LIMIT: Weight = Weight::from_parts(100_000_000_000_000, 3 * 1024 * 1024 * 1024);
|
||||||
/// Default deposit limit
|
/// Default deposit limit
|
||||||
pub const DEPOSIT_LIMIT: Balance = 10_000_000;
|
pub const DEPOSIT_LIMIT: Balance = 10_000_000;
|
||||||
|
/// The native to ETH balance factor.
|
||||||
|
pub const ETH_RATIO: Balance = 1_000_000;
|
||||||
|
|
||||||
/// Externalities builder
|
/// Externalities builder
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
@@ -80,18 +84,28 @@ impl ExtBuilder {
|
|||||||
/// Build the externalities
|
/// Build the externalities
|
||||||
pub fn build(self) -> sp_io::TestExternalities {
|
pub fn build(self) -> sp_io::TestExternalities {
|
||||||
sp_tracing::try_init_simple();
|
sp_tracing::try_init_simple();
|
||||||
|
|
||||||
let mut t = frame_system::GenesisConfig::<Runtime>::default()
|
let mut t = frame_system::GenesisConfig::<Runtime>::default()
|
||||||
.build_storage()
|
.build_storage()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
pallet_balances::GenesisConfig::<Runtime> {
|
pallet_balances::GenesisConfig::<Runtime> {
|
||||||
balances: self.balance_genesis_config,
|
balances: self.balance_genesis_config,
|
||||||
dev_accounts: None,
|
dev_accounts: None,
|
||||||
}
|
}
|
||||||
.assimilate_storage(&mut t)
|
.assimilate_storage(&mut t)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let mut ext = sp_io::TestExternalities::new(t);
|
let mut ext = sp_io::TestExternalities::new(t);
|
||||||
ext.register_extension(KeystoreExt::new(MemoryKeystore::new()));
|
ext.register_extension(KeystoreExt::new(MemoryKeystore::new()));
|
||||||
ext.execute_with(|| System::set_block_number(1));
|
ext.execute_with(|| {
|
||||||
|
let _ = <Runtime as Config>::Currency::deposit_creating(
|
||||||
|
&Pallet::<Runtime>::account_id(),
|
||||||
|
<Runtime as Config>::Currency::minimum_balance(),
|
||||||
|
);
|
||||||
|
|
||||||
|
System::set_block_number(1);
|
||||||
|
});
|
||||||
|
|
||||||
ext
|
ext
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,19 +74,18 @@ parameter_types! {
|
|||||||
impl pallet_revive::Config for Runtime {
|
impl pallet_revive::Config for Runtime {
|
||||||
type Time = Timestamp;
|
type Time = Timestamp;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
type CallFilter = ();
|
|
||||||
type ChainExtension = ();
|
|
||||||
type DepositPerByte = DepositPerByte;
|
type DepositPerByte = DepositPerByte;
|
||||||
type DepositPerItem = DepositPerItem;
|
type DepositPerItem = DepositPerItem;
|
||||||
type AddressMapper = AccountId32Mapper<Self>;
|
type AddressMapper = AccountId32Mapper<Self>;
|
||||||
type RuntimeMemory = ConstU32<{ 512 * 1024 * 1024 }>;
|
type RuntimeMemory = ConstU32<{ 512 * 1024 * 1024 }>;
|
||||||
type PVFMemory = ConstU32<{ 1024 * 1024 * 1024 }>;
|
type PVFMemory = ConstU32<{ 1024 * 1024 * 1024 }>;
|
||||||
type UnsafeUnstableInterface = UnstableInterface;
|
type UnsafeUnstableInterface = UnstableInterface;
|
||||||
type UploadOrigin = EnsureSigned<AccountId32>;
|
type UploadOrigin = EnsureSigned<Self::AccountId>;
|
||||||
type InstantiateOrigin = EnsureSigned<AccountId32>;
|
type InstantiateOrigin = EnsureSigned<Self::AccountId>;
|
||||||
type CodeHashLockupDepositPercent = CodeHashLockupDepositPercent;
|
type CodeHashLockupDepositPercent = CodeHashLockupDepositPercent;
|
||||||
type ChainId = ConstU64<420_420_420>;
|
type ChainId = ConstU64<420_420_420>;
|
||||||
type FindAuthor = Self;
|
type FindAuthor = Self;
|
||||||
|
type NativeToEthRatio = ConstU32<{ crate::ETH_RATIO as u32 }>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FindAuthor<<Runtime as frame_system::Config>::AccountId> for Runtime {
|
impl FindAuthor<<Runtime as frame_system::Config>::AccountId> for Runtime {
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
use std::{str::FromStr, time::Instant};
|
use std::{str::FromStr, time::Instant};
|
||||||
|
|
||||||
|
use polkadot_sdk::pallet_revive::Pallet;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::*;
|
use crate::*;
|
||||||
@@ -445,12 +446,13 @@ impl Specs {
|
|||||||
let time_start = Instant::now();
|
let time_start = Instant::now();
|
||||||
let result = Contracts::bare_instantiate(
|
let result = Contracts::bare_instantiate(
|
||||||
origin,
|
origin,
|
||||||
value,
|
value.into(),
|
||||||
gas_limit.unwrap_or(GAS_LIMIT),
|
gas_limit.unwrap_or(GAS_LIMIT),
|
||||||
storage_deposit_limit.unwrap_or(DEPOSIT_LIMIT).into(),
|
storage_deposit_limit.unwrap_or(DEPOSIT_LIMIT).into(),
|
||||||
code,
|
code,
|
||||||
data,
|
data,
|
||||||
salt.0,
|
salt.0,
|
||||||
|
pallet_revive::BumpNonce::No,
|
||||||
);
|
);
|
||||||
results.push(CallResult::Instantiate {
|
results.push(CallResult::Instantiate {
|
||||||
result,
|
result,
|
||||||
@@ -483,7 +485,7 @@ impl Specs {
|
|||||||
let result = Contracts::bare_call(
|
let result = Contracts::bare_call(
|
||||||
RuntimeOrigin::signed(origin.to_account_id(&results)),
|
RuntimeOrigin::signed(origin.to_account_id(&results)),
|
||||||
dest.to_eth_addr(&results),
|
dest.to_eth_addr(&results),
|
||||||
value,
|
value.into(),
|
||||||
gas_limit.unwrap_or(GAS_LIMIT),
|
gas_limit.unwrap_or(GAS_LIMIT),
|
||||||
storage_deposit_limit.unwrap_or(DEPOSIT_LIMIT).into(),
|
storage_deposit_limit.unwrap_or(DEPOSIT_LIMIT).into(),
|
||||||
data,
|
data,
|
||||||
@@ -497,8 +499,10 @@ impl Specs {
|
|||||||
expectation.verify(results.last().expect("No call to verify"));
|
expectation.verify(results.last().expect("No call to verify"));
|
||||||
}
|
}
|
||||||
VerifyBalance { origin, expected } => {
|
VerifyBalance { origin, expected } => {
|
||||||
let balance = Balances::usable_balance(origin.to_account_id(&results));
|
assert_eq!(
|
||||||
assert_eq!(balance, expected);
|
Pallet::<Runtime>::evm_balance(&origin.to_eth_addr(&results)),
|
||||||
|
expected.into()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
VerifyStorage {
|
VerifyStorage {
|
||||||
contract,
|
contract,
|
||||||
|
|||||||
Reference in new issue
Block a user