15 votes

Require inline action be sent by contract, and not account

UPDATE: This is the code I used to experiment with all combinations of permissions I could come up with: https://github.com/andresberrios/permissions_test After a lot of experimentation, I finally ...
user avatar
4 votes
Accepted

"dice" contract "withdraw" action problem

as explained in the message, you need to add 'eosio.code' permission to dice@active cleos set account permission dice active '{"threshold": 1,"keys": [{"key": "...
user avatar
  • 201
4 votes
Accepted

Are inline actions asynchronous?

Yes, both inline actions and deferred actions are asynchronous. Which seems to be synchronous, so can we not assume synchronous behaviour(result is returned by the function call) for inline actions? ...
user avatar
  • 5,524
3 votes

Require inline action be sent by contract, and not account

This seems to work for me: $ mkdir -p project/sender $ mkdir project/recipient $ touch project/sender/sender.cpp $ touch project/recipient/recipient.cpp sender.cpp #include<eosiolib/eosio.hpp>...
user avatar
  • 5,524
3 votes

Can we get all the actions from all blocks?

You can get the inline actions in get_actions RPC History API endpoint or inside the details of a transaction using also the RPC API get_transaction. So that's exactly what I'm doing in that eos-node-...
user avatar
  • 3,023
2 votes

require_auth differs from the auth check of INLINE_ACTION_SENDER but how?

From an answer by Todd Fleming on the EOS Developers Telegram channel: If user A authorizes an action sent to contract B then that does not imply B can send an action to contract C with A's ...
user avatar
  • 695
2 votes

What is the difference between a method call and the use of SEND_INLINE_ACTION?

You can call any function of a smart contract from within the smart contract, however only functions labelled as actions can be called from outside of the smart contract. So if you have a function in ...
user avatar
1 vote
Accepted

Calling external action with 'action_wrapper' and 'action'

The results of both cases are identical, but action_wrapper provides compile-time type check. If you pass invalid parameters, you will fail to build your contract. You don't need to include the header ...
user avatar
  • 2,255
1 vote
Accepted

How can multisig trigger an action in contract other than eosio.token contract?

You need to pass partner2 transaction auth in contract action data inorder to execute , not partner1's { "timestamp" :12345567, "author" : "partner2",....} cleos multisig propose testfin '[{"actor"...
user avatar
1 vote
Accepted

Are inline actions are executed in a separate transaction?

Inline actions are part of the same transaction, but their authorizations are separate. This limits abuse. e.g. if I send a playwith action to a crypto pet, the pet's contract can't unilaterally take ...
user avatar
  • 1,985
1 vote
Accepted

Contract A makes an inline call to contract B. How can B determine that A is the one making the call?

In Dawn 4.0 at least, when A calls B it does so with an authorization that is specific to itself (generally, contract@eosio.code). B can check the authorization.
user avatar
  • 695
1 vote

How to set up chain of permission levels for a user?

It seems hard to find an example that can answer all your questions. Below is an example of sending an inline action without permission. You can learn a lot by reading this article. https://trybe....
user avatar
  • 1,015

Only top scored, non community-wiki answers of a minimum length are eligible