Bitcoin Forum
May 22, 2018, 10:56:49 AM *
News: Latest stable version of Bitcoin Core: 0.16.0  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: sending erc20 token to multiple addresses  (Read 240 times)
hokkanen959
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!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1526986609
Hero Member
*
Offline Offline

Posts: 1526986609

View Profile Personal Message (Offline)

Ignore
1526986609
Reply with quote  #2

1526986609
Report to moderator
1526986609
Hero Member
*
Offline Offline

Posts: 1526986609

View Profile Personal Message (Offline)

Ignore
1526986609
Reply with quote  #2

1526986609
Report to moderator
1526986609
Hero Member
*
Offline Offline

Posts: 1526986609

View Profile Personal Message (Offline)

Ignore
1526986609
Reply with quote  #2

1526986609
Report to moderator
Herdirfauzi
Sr. Member
****
Offline Offline

Activity: 308
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.

                  ██████
                ██████████
             ████████████████
          ██████          ██████
       ██████                ██████
 ██████████                      █████████
 ██████                            ██████
 ██████                             ██████
  ███        █ █                     ███
  ███    ██████████  ████████████    ███
  ███     ████  ████ ███ ████ ███    ███
  ███     ████   ████    ████        ███
  ███     ████   ████    ████        ███
  ███     ████  ████     ████        ███
  ███    ██████████    ████████      ███
  ███        █ █                     ███
 █████                              █████
 ██████                            ██████
 █████████                      █████████
       ██████                ██████
          ██████          ██████
             ████████████████
                ██████████
                  ██████

[]
FACEBOOK
TWITTER
LINKEDIN

YOUTUBE
BITCOINTALK
REDDIT
hokkanen959
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: 270
Merit: 252


CREATE YOUR OWN CRYPTO-CURRENCY WITH ETHEREUM


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 total or initial supply,  enable the owner to create new tokens or without it,  custom currency rates (can make the token's value be backed by ether (or other tokens) 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: 714
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 ?
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!