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?

  • Yes, contract can hold balance. But if you want to spend ether balance you need a private key. – Jitendra Kumar. Balla Feb 14 '18 at 13:02
2

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.

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.