0


When the smart contact will be deployed, I want to send some tokens to another wallet, by smart contract.

Is there some way to do that?

1
  • can you put your SC address here Commented Feb 1, 2018 at 19:27

1 Answer 1

0

Example:

pragma solidity ^0.4.19; contract Demo { uint public constant INITIAL_SUPPLY = 1000000000; mapping (address => uint) public balances; function Demo() public { balances[msg.sender] = INITIAL_SUPPLY - 1000; balances[address(0)] = 1000; } } 

Replace address(0) with some real address which you want to send your tokens

or you can pass address on contract deployment:

function Demo(address _address) public { balances[msg.sender] = INITIAL_SUPPLY - 1000; balances[_address] = 1000; } 
3
  • I get an issue. I try this way but again get "Warning: This looks like an address but has an invalid checksum" Commented Feb 1, 2018 at 20:01
  • balanceOf[0x14723a09acff6d2a60dcdf7aa4aff308fddc160c] = 140000000; Commented Feb 1, 2018 at 20:01
  • @ArikDonowan Solidity: How to specify a (hard-coded) address as a literal Commented Feb 1, 2018 at 20:07

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.