Skip to content

Pass an array as parameter #1

@ICONationDevTeam

Description

@ICONationDevTeam

Hello,

I got a contract with the following constructor :

class MyClass {

  MyClass (Address[] whitelist) {
    ...
  }
}

I'm trying to figure out how to pass the array "whitelist" in the gradle.build deployJar task :


deployJar {
    keystore = rootProject.hasProperty('keystoreName') ? "$keystoreName" 
        : 'Z:/Work/ICON/config/keystores/sejong/operator.icx'
    password = rootProject.hasProperty('keystorePass') ? "$keystorePass"
        : 'gochain'

    endpoints {
        sejong {
            uri = 'https://sejong.net.solidwallet.io/api/v3'
            nid = 83
        }
        local {
            uri = 'http://localhost:9082/api/v3'
            nid = 3
        }
    }
    parameters {
        arg('whitelist', ???) <- what to put here ?
    }
}

Whatever the value I try, it fails.

I noticed the multisig wallet contract uses a split on a String.
Is there any way to achieve what I want using the native Address array type ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions