I have an action in a smart contract called submanager that I want to make use of the transfer action from eosio.token (I'm using eosio.cdt v1.3).
ACTION subscribe(name from, name to, asset quantity, std::string memo) {
require_auth( from );
eosio::transaction txn{};
txn.actions.emplace_back(
eosio::permission_level(from, "active"_n),
"eosio.token"_n,
"transfer"_n,
std::make_tuple(from, to, quantity, memo));
txn.send(from.value, from);
Whenever I push an action using
cleos push action submanager subscribe '["bob", "alice", "2.0000 SYS", "memo"]' -p bob@active
I get the following error.
Error 3090003: Provided keys, permissions, and delays do not satisfy declared authorizations Ensure that you have the related private keys inside your wallet and your wallet is unlocked.
I assume this error is because I haven't set up permissions correctly, but whenever I try the following cleos set account permission submanager active '{"threshold": 1,"keys": [{"key":"<submanager_pub_key>","weight": 1}], "accounts": [{"permission":{"actor”:”submanager”,”permission":"eosio.code"},"weight":1}]}' -p submanager@owner
I receive the following error
Error 3050000: Action validate exception
What am I missing here? Thank you for your help!