Skip to content

Mark args as readonly #3939

@olehmisar

Description

@olehmisar

Check existing issues

Viem Version

2.37.4

Current Behavior

const args = [1n, "0x..."] as const;
myContract.read.myFn(args); 
// > The type 'readonly [1n, `0x${string}`]' is 'readonly' and cannot be assigned to the mutable type '[bigint, `0x${string}`]'

Expected Behavior

No error

Steps To Reproduce

see above

Link to Minimal Reproducible Example

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions