1
let result_call = ink::env::call::build_call::<Environment>()
                    .call(self.escrow_address)
                    .gas_limit(0)
                    .transferred_value(0)
                    .exec_input(
                        ink::env::call::ExecutionInput::new(ink::env::call::Selector::new(
                            ink::selector_bytes!("arbiters_extend_deadline"),
                        ))
                        .push_arg(&x.audit_id)
                        .push_arg(&x.decided_deadline + self.env().block_timestamp())
                        .push_arg(&x.decided_haircut)
                        .push_arg(self.arbiters_share),
                    )
                    .returns::<Balance>()
                    .try_invoke().unwrap().unwrap();
                if result_call > 0 {
                    let push_value =
                        result_call + self.get_treasury_info(_vote_id).unwrap();
                    self.vote_id_to_treasury.insert(_vote_id, &push_value);

In this function force_vote, due to line: let push_value = result_call + self.get_treasury_info(_vote_id).unwrap(); I'm getting "ContractTrapped" error. the other contract is returning Balance properly, if in push_value I add a static value instead of the result_call even then it is working fine, but not with result_call what could be the reason for this?

0

Your Answer

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