1

In Ethereum we have 2 different types of account Externally owned accounts (EOAs) and Contract accounts . EOA's can have balance of ether and tokens . smart contract can have balance of ether, but can they have balance of tokens? I have created ERC 20 token , can i send this tokens to other smart contract?

1
  • Yes, contract can hold balance. But if you want to spend ether balance you need a private key. Feb 14, 2018 at 13:02

1 Answer 1

3

Simple Answer:

Yes. Smart contract can have a balance of ethers as well as tokens. Tokens balances are just mapping of address to balance and hence any valid ethereum address can have ethers as well as tokens.

But do keep in mind that to spend Ethers/Token you need private keys associated with address in which your ethers/tokens exist. But contract addresses (unlike EOAs) do not have private keys associated with them. The contract code is responsible for all the executions. So do keep a method by which you may retrieve tokens from smart contract.

1
  • Hello. Could you please clarify, do you mean method in token smart contract or method in contract that holds token?
    – Oroffe
    Apr 8, 2020 at 22:56

Your Answer

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

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