3

It's my first step into eos and Trying to get some ideas. I really do hope you can help me.

Question 1) As we all know, we can transfer some coins from one to another account by using account_names. I get that. But why does it allow me to create 2 accounts with the same name? let's take an example. It's written everywhere to deploy contract, they tell you to create account named : eosio.token (how can I create it) so it doesn't have to be unique to create an account and push it into the blockchain. Then How does money transfer work if accounts could have the same names? how to distinguish one account from another when moving money between them?

Question 2) All I could read is to transfer money to another account from one account we have to use smart contracts. i'm not sure about that but there's no other answer. and by using smart contracts, they say that tokens can be transfered. What about the real eos coins ? If I'd like to move 2 EOS from my account to another, why should I use smart contracts? And if i use one, it still serves token transfer and not coins?

Question 3) Websites say that one single account can only hold one contract creation. Then how does eos.token have many contracts?

2
  • i think you have some misunderstandings: account names are indeed unique for every chain, transfers are all made using smart contracts indeed, and each account has only one smart contract. i'm not sure where the confusion stems from (perhaps you think you're connected on the mainnet despite running a local testnet?), so i'd personally suggest taking another look at the docs and trying some things out (e.g. creating 2 accounts with the same name)
    – confused00
    Commented Aug 17, 2018 at 22:38
  • 3) Accounts can hold only one smart contract. But the eos.token or any other contract code/functionallity can be deployed multiple times to different accounts. The eos.token contract often runs as an example or is a base for airdrops or other token distributions.
    – tmm
    Commented Aug 18, 2018 at 8:27

1 Answer 1

3

Putting @confused00 's comment and mine together:

Question 1:

All accounts are unique in one EOS.IO chain (like the mainnet). That is why there are also things like name bidding. This is quite well described here. However an account can be controlled by key-pairs and can have multiple permission levels. So it is possible that multiple entities control an account.

Question 2:

Yes, you need to use a smart contract to transfer tokens. This is a favourable solution because EOS.IO is a smart contract platform. The abstraction layer you get from using a smart contract for the transfer will allow you to use the virtual machine instead of hard coding something into the software. Also this solution is much easier to maintain/update and will prevent some unwanted fork situations. This is also why all the system functionallities (like staking and voting) are written into smart contracts.

Question 3:

Accounts can hold only one smart contract. Contracts and accounts have a 1-n relationship. An account can hold up to 1 contracts, but contracts can be deployed to an arbitrary number of distinct accounts. The eos.token contract often runs as an example or is a base for airdrops or other token distributions.

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.