After instantiating a contract using the CreateBuilder as shown here. If I then try to call the contract using CallBuilder as shown here and use #[ink(message, payable)] in the callee message of the contract being called as shown here it only compiles if I use .transferred_value(0) with a transfer value of 0.

But if I follow the ink! cross-contract documentation here and change the transfer value to a non-zero value as they use in their examples, it always results in TransferFailed error. Note: I also get the error when just using the Contracts Ref Approach without the Builders Approach.

Why can't I pass a non-zero value to transferred_value?


Your Answer

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

Browse other questions tagged or ask your own question.