Other than eosio.token
contract how can we call the inline actions in contract from multisig contract.
For example,
I have a contracts namely mltisigmetup
(with action meetup
).
Now I need a functionality that EOSIO.MSIG
will execute mltisigmetup
's action meetup
.
cleos multisig propose testfin '[{"actor": "partner2", "permission":
"active"}]' '[{"actor": "partner2", "permission": "active"}]' mltisigmetup
meetup '{ "timestamp" :12345567, "author" : "partner1", "male":"ash" ,
"female":"swa","ismet":"yes" }' -p partner1@active -p partner1
this following not executing action in ctr
cleos multisig exec partner1 testfin -p partner1
multisigmetup.cpp
#include <eosiolib/eosio.hpp>
#include <eosiolib/print.hpp>
using namespace eosio;
using namespace std;
class mltisigmetup : public contract
{
using contract::contract;
public:
explicit mltisigmetup(account_name self) : contract(self){}
[[eosio::action]]
void meetup(const uint64_t timestamp, const account_name author,const string &male,const string &female,const string &ismet)
{
// require_auth(author);
uint128_t skey = static_cast<uint128_t>(author) << 64 | timestamp;
meet_table meettable(_self, _self); // code, scope
meettable.emplace(author, [&](auto &post) {
post.pkey = meettable.available_primary_key();
post.skey = skey;
post.author = author;
});
}
private : struct [[eosio::table]] meet_struct {
uint64_t pkey;
uint64_t author;
uint128_t skey;
uint64_t primary_key() const { return pkey; }
uint128_t get_by_skey() const { return skey; }
EOSLIB_SERIALIZE(meet_struct, (pkey)(author)(skey))
};
typedef eosio::multi_index<N(posts), meet_struct,
indexed_by<N(getbyskey), const_mem_fun<meet_struct, uint128_t, &meet_struct::get_by_skey>>>
meet_table;
};
EOSIO_ABI(mltisigmetup, (meetup))
getting no error, but no output.