Calling action for one contract from another contract. Error: transaction declares authority.

dmitryldmitryl Posts: 2 Brand New

I have hello contract with action hi.

void hi(account_name user) {
    require_auth(user);
    print( "hello, ", name{user});
}

Also I have another crowdsale contract with action which call action hi from hello contract.

void joincrowd(account_name user) {
    require_auth(user);

    action(std::vector<permission_level>(1, {user, N(active)}),
        N(hello), N(hi), hi{user} ).send();
}

But I have an error when I try to run the following command.

$ cleos push action crowdsale joincrowd '["user"]' -p user
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.
Error Details:
transaction declares authority '{"actor":"user","permission":"active"}', but does not have signatures for it under a provided delay of 0 ms

Sign In or Register to comment.