0

In my contract function, I am checking who is the transaction caller. Since I am not setting the caller in the test-cases, It might be the issue. I would to know how to set caller_id and how to pass funds in the call.

1
  • hey @crypto sahdev you can view this contract-transfer unit test. There is a solution for set caller and pass funds to the call.
    – go11li
    Commented Jan 18, 2023 at 9:33

1 Answer 1

1

In ink_env::test there are lots of test function which help you for your specification likes get caller, set the caller and pass the funds and many more. Hope this helps your query.

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.