Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what is the output parameter (Type referrence) for method returning empty list e.g "outputs": [] #2047

Open
khanco opened this issue Apr 27, 2024 · 1 comment
Labels
needs-review issue/PR needs review from maintainer

Comments

@khanco
Copy link

khanco commented Apr 27, 2024

Below is method to create profile on my abi.

{
"inputs": [
{
"internalType": "string",
"name": "_username",
"type": "string"
},
{
"internalType": "string",
"name": "_profileDataURI",
"type": "string"
},
{
"internalType": "address",
"name": "_referrer",
"type": "address"
}
],
"name": "createProfile",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}

what output parameters to specify here

val function = Function(
Web3EventNames.createProfile,
listOf(Utf8String(userId), Utf8String("{emailId: ${emailId}}"), Address(referrer)),
listOf() // This not working
)

I tried putting empty list as expected output parameters but seems it's not accepting and the execution is failing.

@khanco khanco added the needs-review issue/PR needs review from maintainer label Apr 27, 2024
@khanco khanco changed the title what is the output parameter for method returning blank array e.g "outputs": [] what is the output parameter (Type referrence) for method returning empty list e.g "outputs": [] Apr 28, 2024
@NickSneo
Copy link
Contributor

you can use - Collections.emptyList()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-review issue/PR needs review from maintainer
Projects
None yet
Development

No branches or pull requests

2 participants