Skip to main content
9 votes
Accepted

in the system contract, what is required for require_auth(_self)

The _self auth, shown here require_auth( _self ); requires the authority of the owner of the contract, in this case eosio. If we inspect that account with get account we see this owner 1: ...
Craig - EOS BlockSmith's user avatar
5 votes
Accepted

Require at least one auth from a set of auths

eosio_assert( has_auth(accounta) || has_auth(accountb), "missing required authority of accounta or accountb"); See: https://eosio.github.io/eosio.cdt/1.5.0/group__action.html#function-hasauth
kkurian's user avatar
  • 695
4 votes

in the system contract, what is required for require_auth(_self)

The require_auth() directive asserts that the transaction has been signed by the specified account. In the case of require_auth(_self), the assertion is that the transaction has been signed by the ...
John Haager's user avatar
  • 1,844
3 votes

require_auth for custom role

You can use the require_auth2() function, which can check a custom permission Verifies that name exists in the set of provided auths on a action. Throws if not found Parameters name -...
confused00's user avatar
  • 5,554
3 votes
Accepted

Conditional behavior based upon auth

An example: has_auth(accountname) See: https://eosio.github.io/eosio.cdt/1.5.0/group__action.html#function-hasauth
kkurian's user avatar
  • 695
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 ...
kkurian's user avatar
  • 695
2 votes
Accepted

Trying to re-deploy the contract gives Assert Exception (10)

The answer is simple. Deploy the Hello example with the contract name gazaomauaaae. Deploy your original contract, again as gazaomauaaae. DONE.
Damir Olejar's user avatar
2 votes

How to tell if a transaction was initiated by account or contract code

If an action is initiated by user account, it will be included in the trx.trx.actions array of a transaction. Follow this idea, we could do: We have a output actions list from your cleos get actions &...
Tong Shen's user avatar
  • 475
2 votes
Accepted

use of require_auth2

C++ API is wrapped differently. inline void require_auth( const permission_level& level ) { internal_use_do_not_use::require_auth2( level.actor.value, level.permission.value ); } // how to use ...
conr2d's user avatar
  • 2,320
1 vote
Accepted

Getting authorization to burn atomicassets via smart contract - WAX

As mentioned in the comments above it is currently not possible to burn those NFTs without changing the owner. Therefore a transfer is needed.
Froggythep's user avatar
1 vote

Difference between _self and get_Authorization and RAM optimization

Separate your question into multiple posts next time. Q&A in stackoverflow become a knowledge base for those who experience similar issue, but this kind of question is difficult to be referred by ...
conr2d's user avatar
  • 2,320
1 vote
Accepted

How to check authorization for a particular account in EOS smart contract?

You can search for an iterator with given key from multi_index first. iterator found: already created item, require_auth(user) iterator not found: not created item, require_auth(admin) Permission ...
conr2d's user avatar
  • 2,320
1 vote

Require authorization with conditions require_auth(name1 OR name2)

I believe this is what you're looking for: check(has_auth(name1) || has_auth(name2));
Yuval Weiss's user avatar
1 vote

Require authorization with conditions require_auth(name1 OR name2)

The above case works if you do it like the following: void multiauth(name user) { if (user == name("walletxxxxxx") || user == name("walletzzzzzz")) { require_auth(user); } else { ...
cmadh's user avatar
  • 1,929
1 vote

How do permissions on deferred transactions work?

I would refer to this: https://github.com/EOSIO/eos/issues/3013 It looks like Dawn 4.0 changed the permissions a contract needs to call another contract. You need to grant [email protected] ...
btclibertarian's user avatar
1 vote
Accepted

How does one prevent smart contracts from taking all your tokens, when you give them your auth?

When a contract sends an inline action, it cannot send with the permission level passed by the caller; it sends with a special eosio.code permission name. In your example, makepokemon can only use ...
confused00's user avatar
  • 5,554
1 vote

How does one prevent smart contracts from taking all your tokens, when you give them your auth?

So the user pushes the action with -p user@active, and now the contract can "steal" those tokens unrightfully? Or am I missing something? No, that can not steal the tokens because you check the ...
Rajat Chaudhary's user avatar
1 vote

How to link permission to action?

I think, you have an incorrect idea regarding permissions in eos. A permission in itself does not have any authority to do anything, but an account with a certain permission can be used to ...
Akhil Tiwari's user avatar
1 vote

Custom permission error 309004/309005

For every transaction, we need to have at least one signer to bill the net and cpu. And unless we link the action with alice@active permission, the minimum required authority is active. Try the ...
Surabhi Lodha's user avatar
1 vote

Trying to re-deploy the contract gives Assert Exception (10)

There is a built-in check when deploying a contract to refuse to deploy the contract if it hasn't changed. This can be problematic when you are making changes to the ABI as changes to it don't count ...
John Haager's user avatar
  • 1,844
1 vote

Cleos asks for authority in transaction, but authority is in transaction

Change it as follows. cleos -u http://api.eosnewyork.io push action gywaofjugage issue '["issuer", "1.0000 TOKEN", "memo"]' -p issuer I will arrange what you have done step by step. In the first ...
smarteasy's user avatar
  • 1,015
1 vote
Accepted

Cleos asks for authority in transaction, but authority is in transaction

In command cleos -u http://api.eosnewyork.io push action gywaofjugage create '[ "issuer", "1000000000.0000 TOKEN", 0, 0, 0]' -p gywaofjugage Can you confirm that "issuer" was actually "gywaofjugage" ...
John Williamson's user avatar
1 vote

Cleos asks for authority in transaction, but authority is in transaction

You seem to be using -p gywaofjugage as the -p option. Try using -p gywaofjugage@active instead? The -p option is described as "An account and permission level to authorize, as in 'account@permission'...
ottomagic's user avatar
  • 113
1 vote

How to do multi authorization?

This article have a very detailed explanation regarding multisig usage on EOS. https://steemit.com/eos/@genereos/eos-multisig-tutorial
Evandro Lorenzoni's user avatar

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