After deploying the ERC-20, your address receives the total supply of the token, as you can see here :
constructor( uint256 _totalSupply) public{
totalSupply_ = _totalSupply;
balances[msg.sender] = totalSupply_;
}
_totalSupply is a constructor parameter so you have to fulfill the corresponding section in Remix. Be aware of the decimal system of the ERC-20 : if you want 10000 units with 3 decimals, _totalSupply
will be equal to 10000*10^3 (more info here : Decimals on ERC20 Tokens).
When I call the Transfer function using the Orange Button it fails. I assume the Transfer function is being called using the Contract address which has no Tokens.
The contract address does not need tokens, the sender (you in this case) does. In addition you need some ETH to pay the gas fees.
How can I transfer some Tokens from the contract creator's address (me) to another address from within Remix?
Just call transfer
with the same address that the one you used to deploy. Be sure to respect the following condition :
require(numTokens <= balances[msg.sender]);
Send an amount <= your balance which is equal to the token total supply after the deployment.