3

Edit:

Bounty will be opened in 10hrs from writing (can't do it earlier). This question has been edited to meet the depth necessary to trouble-shoot an issue. The bounty will be issued as soon as the push/issue action is completed on my end. It may be necessary to re-deploy the contract, which also gave me additional errors.

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

Here is a list of actions that were done (I apologize if I skipped a step, doing it from a memory). Account names and keys are altered on purpose. I have managed to create a token, the last thing I need to do is to publish it. BP that I randomly chose is eosnewyork.io.

cleos version client

Build version: c9b7a247

Lets assume that these are my registered EOS keys:

Private key: 5KX2Bsns7hKNQ6YhA85xB1NQ5YzAbZMyGQM9M829TvDDBPAWHKC

Public key: EOS7bshTD31XdsY9ju7K9kdtHGQNjziPff8ANp5DGagA8CoFtbPoG

Mnemonic address: gywaofjugage

cleos wallet import 5KX2Bsns7hKNQ6YhA85xB1NQ5YzAbZMyGQM9M829TvDDBPAWHKC -n gywaofjugage

-imported private key for: EOS7bshTD31XdsY9ju7K9kdtHGQNjziPff8ANp5DGagA8CoFtbPoG

cleos wallet list

Wallets: [ "gywaofjugage *" ]

cleos wallet keys

[ "EOS7bshTD31XdsY9ju7K9kdtHGQNjziPff8ANp5DGagA8CoFtbPoG" ]

-Went to https://github.com/EOSIO/eos and downloaded the whole project as a ZIP file. Extracted, and continued with these commands:

eosiocpp -o /home/user/Downloads/eos-master/contracts/eosio.token/eosio.token.wast /home/user/Downloads/eos-master/contracts/eosio.token/eosio.token.cpp

Then, I have deployed the contract. I believe I might have make a mistake with "issuer" (wrote someting else, this is just for example) and that I was supposed to write my wallet name instead.

cleos -u http://api.eosnewyork.io push action gywaofjugage create '[ "issuer", "1000000000.0000 TOKEN", 0, 0, 0]' -p gywaofjugage

executed transaction: aabaf2b00e95ec571001dd27d898788358c4a3c9b41234671591f382115ff0b1 120 bytes 581 us # gywaofjugage <= gywaofjugage::create {"issuer":"issuer","maximum_supply":"1000000000.0000 TOKEN"}

Now, I am trying to issue the token to myself first by using this command:

cleos -u http://api.eosnewyork.io push action gywaofjugage issue '["gywaofjugage", "1.0000 TOKEN", "memo"]' -p gywaofjugage@active

Error 3090004: missing required authority Ensure that you have the related authority inside your transaction!; If you are currently using 'cleos push action' command, try to add the relevant authority using -p option.

4
  • Looks like a similar question, check this link. eosio.stackexchange.com/questions/935/…
    – smarteasy
    Jun 23, 2018 at 2:57
  • where is your wallet url? I think you just run the full nodeos with wallet in your local network
    – Jimmy Guo
    Jun 23, 2018 at 10:40
  • @DisplayName can you give me your mainnet account, I can't replay the result
    – Jimmy Guo
    Jun 23, 2018 at 12:14
  • No, because that would involve giving you the private key. It did work executing the token creating contract... token is created it just needs to be issued. Jun 23, 2018 at 12:20

3 Answers 3

1
+50

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" then?

Only the account name specified in place of issuer has authority to mint tokens.

6
  • No it wasn't gywaofjugage but the name of the company. It was less than 12 characters, and I am afraid that I will not be able to generate new tokens with the same prefix. That is where I made a mistake and don't know what to do. Jun 25, 2018 at 10:22
  • Ah okay so you made it the name of the company which is not an account you have control over? You've deployed your own version of the eosio.token contract though right? You should be able to just over write it, don't know how to do that off the top of my head but try something like deploying a hello world contract with the same account gywaofjugage then re-deploy the eosio.token contract again. Provided you haven't got any other existing tokens based on that you need to keep. Jun 25, 2018 at 10:26
  • Redeploying worked, creating a token with the desired suffix failed with a message Error 3050003: eosio_assert_message assertion failure Jun 25, 2018 at 10:42
  • OK I have managed to create a new token with a different suffix. I cannot use the old suffix. Will either have to create a new account with less than 12 chars (if possible?) or to use the alternative suffix (which sucks!) Jun 25, 2018 at 10:50
  • Yeah I'd say so :/ Yeah you can create an account with fewer characters but that's done in the auctions. Did I answer your question then? Jun 25, 2018 at 10:56
1

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'" in https://developers.eos.io/eosio-cleos/reference#cleos-push-action

4
  • I have already tried@active, sorry for not mentioning it... upvoted for a link and effort... let me confirm again... Nope! same thing. Will open for a bounty and add more details. Jun 24, 2018 at 16:19
  • I tried looking up account info for "gywaofjugage" at eosnetworkmonitor.io and got a message "No account found". Are you sure you typed your account name correctly or is that also an example?
    – ottomagic
    Jun 24, 2018 at 20:20
  • Account name was changed on purpose. Jun 24, 2018 at 20:36
  • If you don't explicitly state the @ permission it will default to @ active. Jun 25, 2018 at 3:26
1

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 step above, the create action from the eosio.token contract, authorized by the gywaofjugage account, creates 1000000000.0000 TOKEN tokens in the issuer.

In the second step, the eosio.token contract's issue action takes 1000000000.0000 TOKEN tokens out of reserve and puts them into circulation. At the time of issue, the tokens are held within the issuer account. Since the issuer account owns the reserve of uncirculated tokens, its authority is required to do the action.

The following links provide more information.

https://developers.eos.io/eosio-nodeos/docs/bios-boot-sequence

5
  • The problem is, "issuer" does not exist as an account. I got an option to create an account, transfer RAM, deploy a contract with the name gywaofjugage, and with a bit of a luck I will be able to either create new tokens with the same prefix or use created ones. I am not sure if any of that would work at all. Jun 25, 2018 at 10:31
  • smarteasy, your answer was the same as John's but I had to award John the bounty since he had an unfair advantage, most likely time-zone difference. I wish I could reward a bounty to you as well. Jun 25, 2018 at 11:01
  • It may not be accurate. I remember John's answer was before the bounty. Did not you bounty because you were not satisfied with his answer? Of course, it is your freedom to choose the answer.
    – smarteasy
    Jun 25, 2018 at 11:20
  • I did the bounty since I wasn't sure if there were another solution instead of re-branding the token name. Good thing, company has just started and doesn't rely on the branding... maybe it is for the best. Jun 25, 2018 at 11:29
  • Good luck to you and your company!!!
    – smarteasy
    Jun 25, 2018 at 11:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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