Skip to content

Paramaters and useContractWrite #104

Answered by isaac-martin
isaac-martin asked this question in Q&A
Discussion options

You must be logged in to vote

Ok i got this working - but i think the types are wrong for overrides.
This is the code that works to call the function defined above, having the value not as an arg (per this example #49 (comment)) is what was throwing me - as that used to work when there were no other function arguments required

Kind of looks like the types defined here - need to be [PayableOverrides](https://github.com/ethers-io/ethers.js/blob/master/packages/contracts/src.ts/index.ts#L17)

type Config = {
  args?: any | any[]
  overrides?: PayableOverrides
}

@tmm happy to PR if you want to confirm thats the case - guess we could also add an optional field to the useContractWrite to indicate if its payable or not and a…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tmm
Comment options

tmm Jan 24, 2022
Maintainer

Answer selected by tmm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants