Im getting the following error while trying to run e2e
rust ink! smart contracts tests:
#![feature(min_specialization)]
using the following command: cargo test --features e2e-tests
Im using the following example to run the e2e tests : https://github.com/swanky-dapps/manic-minter
The smart contract itself compiles successfully with the following command:
cargo contract build
Here is how the e2e test looks like:
#[cfg(all(test, feature = "e2e-tests"))]
mod e2e_tests {
use super::*;
use crate::manicminter::ManicMinterRef;
use ink::primitives::AccountId;
use ink_e2e::build_message;
use openbrush::contracts::ownable::ownable_external::Ownable;
use openbrush::contracts::psp22::psp22_external::PSP22;
use oxygen::oxygen::OxygenRef;
type E2EResult<T> = std::result::Result<T, Box<dyn std::error::Error>>;
const AMOUNT: Balance = 100;
const PRICE: Balance = 10;
/// Helper to get Bob's account_id from `ink_e2e::bob()` PairSigner
fn get_bob_account_id() -> AccountId {
let bob = ink_e2e::bob::<ink_e2e::PolkadotConfig>();
let bob_account_id_32 = bob.account_id();
let bob_account_id = AccountId::try_from(bob_account_id_32.as_ref()).unwrap();
bob_account_id
}
Here is my Cargo.toml file:
[dependencies]
ink = { version = "4.0.0", default-features = false }
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
scale-info = { version = "2.3", default-features = false, features = ["derive"], optional = true }
openbrush = { git = "https://github.com/727-Ventures/openbrush-contracts", tag="3.0.0", default-features= false, features = ["psp22"] }
my_psp22 = { path = "../my_psp22",version="1.0.0",default-features = false, features = ["ink-as-dependency"] }
[dev-dependencies]
ink_e2e = "4.0.1"
Thanks in advance :)