0

Following scenario:

There's an action which requires 3 signatures - two are 'normal accounts' and the third one is like 'system or robot', which does some verifications from within the smart contract. Once the verification logic is sucessfully validated, the contract shoudl approve the proposal. Is there a way to call multisig approval programmatically from within contract ?

1 Answer 1

2

You can send the approval as inline or defered transaction.

void send_inline_approval(name proposer, name proposal_name){
  action(
    permission_level{get_self(),"[needed_permission_level_for_approval]"_n},
    "eosio.msig"_n,
    "approve"_n,
    std::make_tuple(proposer, proposal_name, permission_level{get_self(),"[needed_permission_level_for_approval]"_n})
  ).send();
}

You probably have to fetch the proposal from the proposals-table first to run your validation-logic.

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.