How to setup a action that adopt multisig with a random account and my account
I am working on a contract programing. but I need to apply multi-signature for execution of an action. How can I set the action that need one or more users to authorize it and multisig with my own account, and then the action will finally be executed.
you can try use void require_auth( account_name name );
Thx, but void require_auth( account_name name ); does not resolve my problem. I expect user authorize the action first or propose the action. then I use my own account to authorize the action to make it executed. I know that we can use cleos multisig delegate authorization to propose multi-sig action, but if we can implement it in a contract action code?
There're couple of possible solutions:
a) in your action you can call "require_auth" for different user names. In this case you need to use close multisig to propose an action and let users to approve it before you can execute it.
b) If the action you want to execute is also within your contract, you can make another action say "approve" to store the approving user into your multi_index table. Then when your real action is executed, you can validate which user has approved from your multi_index table.