Bitcoin Forum
November 12, 2024, 06:44:17 PM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: sending erc20 token to multiple addresses  (Read 517 times)
hokkanen959 (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
October 11, 2017, 01:50:59 PM
 #1

hi all,

what would be the best way to send erc20 token to multiple addresses? like 5-10k different addresses?

thanks!
Herdirfauzi
Sr. Member
****
Offline Offline

Activity: 574
Merit: 250



View Profile
October 11, 2017, 04:02:31 PM
 #2

hi all,

what would be the best way to send erc20 token to multiple addresses? like 5-10k different addresses?

thanks!
all you can do to send ERC20 to some address you want, provided you have ether in account which you will use to send ERC20, for example in MyEtherWallet. you must have multiple balances to be able to send to some address you want.

hokkanen959 (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
October 11, 2017, 04:45:35 PM
 #3

Thanks. can you give me an example of the code, to send, lets say 500 tokens to 10 000 different MEW wallets? distribute command? I dont want to use send command (because of the gas issue) Thanks in advance!
romanlanskoj
Sr. Member
****
Offline Offline

Activity: 340
Merit: 254


CREATE YOUR OWN CRYPTO-CURRENCY WITH ETHEREUM 150$


View Profile WWW
October 12, 2017, 11:17:29 PM
 #4

pragma solidity ^0.4.17;

import "./Token.sol";

contract StandardToken is Token {
function StandardToken(){
    balances[yourDesiredAddress] = yourDesiredAmount;
    balances[yourDesiredAddress] = yourDesiredAmount;
    balances[yourDesiredAddress] = yourDesiredAmount;
    balances[yourDesiredAddress] = yourDesiredAmount;
    //etc. for all the addresses
}
    uint256 constant MAX_UINT256 = 2**256 - 1;

    function transfer(address _to, uint256 _value) returns (bool success) {
        //Default assumes totalSupply can't be over max (2^256 - 1).
        //If your token leaves out totalSupply and can issue more tokens as time goes on, you need to check if it doesn't wrap.
        //Replace the if with this one instead.
        //require(balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]);
        require(balances[msg.sender] >= _value);
        balances[msg.sender] -= _value;
        balances[_to] += _value;
        Transfer(msg.sender, _to, _value);
        return true;
    }

    function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
        //same as above. Replace this line with the following if you want to protect against wrapping uints.
        //require(balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value > balances[_to]);
        uint256 allowance = allowed[_from][msg.sender];
        require(balances[_from] >= _value && allowance >= _value);
        balances[_to] += _value;
        balances[_from] -= _value;
        if (allowance < MAX_UINT256) {
            allowed[_from][msg.sender] -= _value;
        }
        Transfer(_from, _to, _value);
        return true;
    }

    function balanceOf(address _owner) constant returns (uint256 balance) {
        return balances[_owner];
    }

    function approve(address _spender, uint256 _value) returns (bool success) {
        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        return true;
    }

    function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
      return allowed[_owner][_spender];
    }

    mapping (address => uint256) balances;
    mapping (address => mapping (address => uint256)) allowed;
}

https://bitcointalk.org/index.php?topic=1956996
I can create the cryptocurrency Ethereum-token for you, with any initial supply,  batch transfers, enable the owner to print new tokens,  custom currency rates (can make the token's value be backed by ether  by creating a fund that automatically sells and buys them at market value) and other features.
Full support and privacy

Only you will be able to issue it and only you will have all the copyrights!

Price is only 0.33 ETH in June 2017 (I ask you also gift me a small % of issued coins).

viber +375298563585
telegram +375298563585
gmail romanlanskoj@gmail.com

The information I need:
1) the address where your new currencies will be created and then the amount;
2) the name for your token and amount of decimals for display purposes;
3) if you need the token's value be backed by smart contract (automatically sells and buys) - write me this prices please;
4) if you want the amount of coins in circulation to change please tell it (the possibility to issue or remove your tokens from circulation);
5) also please send at least 0.05-0.1 ETH to 0x4BCc85fa097ad0f5618cb9bb5bc0AFfbAEC359B5 (or 0.33 ETH if you totally wanna prepay).

Your ETH Token will be seen like here: https://ethplorer.io/address/0x6d57fe045dcced8b289db59f66cd4354b6483d63
March
Hero Member
*****
Offline Offline

Activity: 711
Merit: 500


View Profile
October 12, 2017, 11:33:17 PM
 #5

pragma solidity ^0.4.17;

import "./Token.sol";

contract StandardToken is Token {
function StandardToken(){
    balances[yourDesiredAddress] = yourDesiredAmount;
    balances[yourDesiredAddress] = yourDesiredAmount;
    balances[yourDesiredAddress] = yourDesiredAmount;
    balances[yourDesiredAddress] = yourDesiredAmount;
    //etc. for all the addresses
}
    uint256 constant MAX_UINT256 = 2**256 - 1;

    function transfer(address _to, uint256 _value) returns (bool success) {
        //Default assumes totalSupply can't be over max (2^256 - 1).
        //If your token leaves out totalSupply and can issue more tokens as time goes on, you need to check if it doesn't wrap.
        //Replace the if with this one instead.
        //require(balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]);
        require(balances[msg.sender] >= _value);
        balances[msg.sender] -= _value;
        balances[_to] += _value;
        Transfer(msg.sender, _to, _value);
        return true;
    }

    function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
        //same as above. Replace this line with the following if you want to protect against wrapping uints.
        //require(balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value > balances[_to]);
        uint256 allowance = allowed[_from][msg.sender];
        require(balances[_from] >= _value && allowance >= _value);
        balances[_to] += _value;
        balances[_from] -= _value;
        if (allowance < MAX_UINT256) {
            allowed[_from][msg.sender] -= _value;
        }
        Transfer(_from, _to, _value);
        return true;
    }

    function balanceOf(address _owner) constant returns (uint256 balance) {
        return balances[_owner];
    }

    function approve(address _spender, uint256 _value) returns (bool success) {
        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        return true;
    }

    function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
      return allowed[_owner][_spender];
    }

    mapping (address => uint256) balances;
    mapping (address => mapping (address => uint256)) allowed;
}


how to use these codes? what application that i need to use for the code will be work ?
will i just need to make a smart contract on ethereum platform ?
retob
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
August 20, 2018, 03:40:48 AM
 #6

https://gwei.network/bulkTransfer

you can use this app
no fees
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!