menu

Aragon

Aragon is the most powerful and modular way to run DAOs

Channels
# All channels
view-forward
# Announcements
view-forward
# App development
view-forward
# Aragon Agent
view-forward
# Aragon Client
view-forward
# Aragon Connect
view-forward
# aragonOS
view-forward
# aragonUI
view-forward
# Feature requests
view-forward
Team

How to pass an array to dao act?

June 3, 2020 at 3:31pm

How to pass an array to dao act?

June 3, 2020 at 3:31pm
I'm trying to run the function disperseEther(address[],uint256[]) on an external contract using a DAO Agent. I can't figure out how to pass the array arguments. I think it should be like following and I've tried various other formats. Any help would be great!
dao act agent-addr contract-addr "disperseEther(address[],uint256[])" ["'0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826','0xeE398666cA860DFb7390b5D73EE927e9Fb41a60A'"] ['10000000000000000','10000000000000000'] --environment aragon:rinkeby --ipfs-rpc https://ipfs.eth.aragon.network/ipfs/
Returns: No matches found: ['0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826','0xeE398666cA860DFb7390b5D73EE927e9Fb41a60A']

June 3, 2020 at 9:03pm
Is there anyone who can help with this or recommend somewhere better to get some support? Thanks.
  • reply
  • like
Hi , the syntax for submitting array parameters is currently a little bit complex since both bash and the CLI are interpreting the quotes. Could you try with the following syntax?:
dao act agent-addr contract-addr "disperseEther(address[],uint256[])" ['"0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826","0xeE398666cA860DFb7390b5D73EE927e9Fb41a60A"'] ['"10000000000000000","10000000000000000"'] --environment aragon:rinkeby --ipfs-rpc https://ipfs.eth.aragon.network/ipfs/
  • reply
  • like

June 4, 2020 at 7:36am
Hi , thanks for the reply. Unfortunately same result:
zsh: no matches found: ["0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826","0xeE398666cA860DFb7390b5D73EE927e9Fb41a60A"]
Edited
  • reply
  • like

June 4, 2020 at 6:45pm
This was answered in the chat but for other users, the problem is related with zsh. By doing a quick search, it looks like it's possible to fix by adding unsetopt nomatch to your ~/.zshrc file. Source: https://github.com/ohmyzsh/ohmyzsh/issues/31
  • reply
  • like