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

fix types for unsafeDeposit and add test #24

Merged
merged 3 commits into from
Aug 28, 2023
Merged

Conversation

wilsoncusack
Copy link
Collaborator

There was an issue with the types for writeUnsafeDepositTransaction was not allowing value to be passed. I solved this by making the types less generic, which I think is good.

WriteContractParameters<
    typeof optimismPortalABI,
    'depositTransaction',
    TChain,
    TAccount,
    TChainOverride
  >

Note: now value is required to be passed. We should think about how to distinguish the args.value from the top level value. The latter being the amount that will be minted on L2, the former being the mint that will be sent as msg.value in the call

@wilsoncusack wilsoncusack temporarily deployed to verify August 28, 2023 14:20 — with GitHub Actions Inactive
@wilsoncusack wilsoncusack temporarily deployed to verify August 28, 2023 14:21 — with GitHub Actions Inactive
@wilsoncusack wilsoncusack temporarily deployed to verify August 28, 2023 14:22 — with GitHub Actions Inactive
Copy link
Collaborator

@zencephalon zencephalon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type narrowing here seems good to me

@wilsoncusack wilsoncusack merged commit 8f3b0a5 into main Aug 28, 2023
1 check passed
@wilsoncusack wilsoncusack deleted the wilson/deposit-fixes branch September 5, 2023 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants