4

I am trying to instantiate multiple contracts in my e2e-test. For some reason it can only find one of my contracts and not the others. Uploading the contract resulted in the same error: ContractNotFound.

From looking at the delegator example where additional_contracts are provided, I wrote my tests:

#[ink_e2e::test( additional_contracts = "accumulator/Cargo.toml" )]
async fn test_accumulator () { .. }

#[ink_e2e::test( additional_contracts = "adder/Cargo.toml" )]
async fn test_adder () { .. }

#[ink_e2e::test( additional_contracts = "subber/Cargo.toml" )]
async fn test_subber () { .. }

But it can't find the adder & subber contract.

1 Answer 1

4

Only adding the additional_contracts once solved the problem:

#[ink_e2e::test( additional_contracts = "accumulator/Cargo.toml adder/Cargo.toml subber/Cargo.toml" )]
async fn test_accumulator () { .. }

#[ink_e2e::test]
async fn test_adder () { .. }

#[ink_e2e::test]
async fn test_subber () { .. }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.