Thanks to visit codestin.com
Credit goes to github.com

Skip to content

web3 can't work with abitype Tuple #260

@devedse

Description

@devedse

I'm currently working on a SmartContract that has the following method:

struct Color {
    uint8 R;
    uint8 G;
    uint8 B;
}

function create(uint index, Color calldata backgroundColor, Color calldata textColor, uint number) {
    ....
}

I tried calling this function however web3 shows the following error:

> web3 contract call --address xxxxxx --abi Test.abi --function create 1 "[100, 12, 200]" "[50, 100, 10]" 1
ERROR: Error calling contract: unsupported input type (uint8,uint8,uint8)

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