I want to import this function in another contract but I received the error from the screenshot below.

enter image description here

This is the function I want to import:

function assetTransfer (string memory  order_id,string memory  state) public payable {
 DeliveryClause memory dc = DeliveryClause.getClauseByOrderId(order_id);
 CrowdTask memory ct = CrowdTask.getTaskByOrderId(order_id);
 address dAddress = ct.drone;
 if(compareStr(state, "sucessful")){
     dc.station.transfer(dc.loss_money + dc.fee);
     dAddress.transfer(ct.loss_money + ct.fee);
 if(compareStr(state, "lost")){
     dc.receiver.transfer(dc.loss_money+ dc.fee);
     dc.station.transfer(ct.loss_money + ct.fee);

 if(compareStr(state, "timeout")){
     dc.station.transfer(dc.loss_money + dc.fee-dc.overtime_money/2);
     dAddress.transfer(ct.loss_money + ct.fee-dc.overtime_money/2);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.