0

This is how i am trying to invoke call.. where Bytes is Vec<u8>

let res = build_call::<DefaultEnvironment>()
          .call(handler_acc_id)
          .exec_input(
           ExecutionInput::new(Selector::new(ink::selector_bytes!("i_receive")))
                  .push_arg::<Bytes>(request_payload.request_sender.clone())
                  .push_arg::<Bytes>(request_payload.packet.clone())
                  .push_arg::<Bytes>(request_payload.src_chain_id.clone()),
           )
           .returns::<Bytes>()
           .try_invoke();

Thanks In Advance!!

1 Answer 1

0

I was doing mistake while calling, here is corrected way

 let res = build_call::<DefaultEnvironment>()
           .call(handler_acc_id)
           .exec_input(
                      ExecutionInput::new(Selector::new(ink::selector_bytes!(
                            "IDapp::i_receive"
                        )))
                        .push_arg::<&Bytes>(&request_payload.request_sender.clone())
                        .push_arg::<&Bytes>(&request_payload.packet.clone())
                        .push_arg::<&Bytes>(&request_payload.src_chain_id.clone()),
           )
           .returns::<Bytes>()
           .try_invoke();

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.