mist icon indicating copy to clipboard operation
mist copied to clipboard

Bug: Can't send array of addresses to contract

Open rizhenkov opened this issue 8 years ago • 5 comments

  • [x] I've asked for help in the Mist Gitter before filing this issue.
Version: `0.9.0`
OS & Version: osx
Node version: `geth 1.6.6` 
Number of blocks synchronized: 917044 (Rinkeby)

When trying to put addresses array as method parameters — this array can't compiled to transaction bytecode and not sending to contract (not errors). Contract worked, tested at Parity client (and that method works at parity).

Method code:

function distribution(address[] holdersAddresses, uint256[] balancesValues)
{
   for (uint i = 0; i < holdersAddresses.length; i++) {
      uint amount = balancesValues[i];
      address holderAddr = holdersAddresses[i];
      if(amount > 0){
         balances[holderAddr] += amount;
         totalSupply += amount;
      }
   }
}

rizhenkov avatar Sep 18 '17 20:09 rizhenkov

Hi @riartem, it seems the Wallet Dapp only accepts arrays with double-quotes. Please check if that's the issue. Otherwise, let me know.

It's already flagged as a bug, and will be fixed.

evertonfraga avatar Sep 18 '17 20:09 evertonfraga

@evertonfraga Hi! I tryed double and single quotes and without quotes. Typical not working array: ["0x42eb768f2244c8811c63729a21a3569731535f06", "0xb279182d99e65703f0076e4812653aab85fca0f0", "0x7ffc57839b00206d1ad20c69a1981b489f772031"]

rizhenkov avatar Sep 18 '17 20:09 rizhenkov

Hi Guys! I have the same issue with Mist; any updates about this issue?

TeamTraxia avatar Jul 02 '18 07:07 TeamTraxia

Switching to double quotes worked for me: Mist 0.10.0

["0x00000000000000000000000000000000000001", "0x00000000000000000000000000000000000002"]

juztin avatar Jul 02 '18 19:07 juztin

It works with double quote, but actually the problem was something else... For some reasons Mist didn't take the array but on another Mist (on another laptop) it works... Thanks @juztin

TeamTraxia avatar Jul 05 '18 06:07 TeamTraxia