1

On eosio.token.cpp, there are transfer function with require_auth(from).

So executing this contact needa "from" active permission.

For some reason, I change require_auth parameter from "from" to "_self".(contract owner) Because I am contract owner, I can provide _self active permission through scatter.

After permitting _self active permission, it shows "require authority of "from" error. I tested this a few weeks ago, that time this error did not happen. And I encountered this error today on Jungle testnet.

My questions are

1) is there any changes on the latest eos version about this?

2) is there any way to remove this error? Meant is there any way to use "transfer function" with only "_self" permission?

Thanks.

  • No there is no change relates to this in new eos update...coming to your second answer have you set contract after updation ? – Mr.Y Oct 10 '18 at 11:50
  • Yes I did through eosjs. And tesed contract action through block explorer. I will try same thing with cleos. – Taeyong Kim Oct 10 '18 at 14:14
1

You can't change how the eosio.token contract works in the testnets or main net. You can only edit it on your local node. If you do change it to _self, then it would mean that only the eosio.token contract could execute the transfer, and no one else ever could.

  • Thanks.I meant setcode and setabi(eosio.token) to my account as usual to create/issue custom token. – Taeyong Kim Oct 10 '18 at 14:15
  • Oh I see, so you are making a copy of the contract which you are applying to your account – Phillip Hamnett - EOS42 Oct 10 '18 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.