0

I'm attempting to follow this guide, which seems official: https://developers.eos.io/eosio-home/docs/token-contract which uses the v1.4.0 branch of the EOSIO contracts

when I follow the steps, the contract compiles. however, as I want to use the latest version of the contract (because presumably it's been fixed/improved), it fails to compile. here's what I'm using:

https://github.com/EOSIO/eos/blob/master/contracts/eosio.token/eosio.token.cpp

and the error that I get:

In file included from nav.token.cpp:6: ./nav.token.hpp:22:10: error: unknown type name 'account_name' token( account_name self ):contract(self){}

now, I understand from reading:

https://www.reddit.com/r/eos/comments/9nm6hq/help_with_eosiocdt/

that account_name has been deprecated, but if so, why does the latest version of this contract use it?

for completeness, I'm running the CDT (v 1.4.1) on OSX, installed via brew only yesterday so it's pretty current

help?

1

The updated contract you're looking for is here. It uses the new name:

https://github.com/EOSIO/eosio.contracts/blob/master/eosio.token/src/eosio.token.cpp

  • oh, gosh. so they have two different locations for their contracts. how confusing. thank you for pointing me in the right direction – ekkis Jan 11 at 23:11
1

The contracts we should use come from the eosio.contracts git repo, not the ones in the eos repo.

eosio.contracts repo:

https://github.com/EOSIO/eosio.contracts

This has to be compiled using the eosio.cdt repo

eosio.cdt repo:

https://github.com/EOSIO/eosio.cdt

  • 1
    the EOS repo maintainer really should just remove the other set of contracts as it makes it confusing for the community and there's no reason to have two different locations for it – ekkis Jan 14 at 0:21
0

As the types are differences between Version 1.2.x and Version 1.3.x

If you don't want update the contract, you may also try this :

  • CDT v1.2.0
  • EOSIO v1.2.4
  • contract v1.2.1
  • thanks but I'm just trying to compile a standard contract provided by EOS. as you can see from other replies, there is an upgrade, it's just being kept elsewhere – ekkis Jan 14 at 23:51

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.