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

Improve function APIs with better generics #42

Merged
merged 17 commits into from
Sep 2, 2023

Conversation

wilsoncusack
Copy link
Collaborator

No description provided.

@wilsoncusack wilsoncusack temporarily deployed to verify August 31, 2023 20:10 — with GitHub Actions Inactive
@wilsoncusack wilsoncusack temporarily deployed to verify August 31, 2023 21:16 — with GitHub Actions Inactive
@wilsoncusack wilsoncusack temporarily deployed to verify September 1, 2023 02:11 — with GitHub Actions Inactive
@wilsoncusack wilsoncusack temporarily deployed to verify September 1, 2023 02:22 — with GitHub Actions Inactive
@wilsoncusack wilsoncusack temporarily deployed to verify September 1, 2023 02:32 — with GitHub Actions Inactive
@wilsoncusack wilsoncusack force-pushed the wilson/new-chain-types branch from ecb71af to 7252ce6 Compare September 1, 2023 02:34
@wilsoncusack wilsoncusack temporarily deployed to verify September 1, 2023 02:34 — with GitHub Actions Inactive
@wilsoncusack wilsoncusack temporarily deployed to verify September 1, 2023 02:49 — with GitHub Actions Inactive
@wilsoncusack wilsoncusack temporarily deployed to verify September 1, 2023 13:05 — with GitHub Actions Inactive
@wilsoncusack wilsoncusack temporarily deployed to verify September 1, 2023 14:46 — with GitHub Actions Inactive
@wilsoncusack wilsoncusack changed the title Wilson/new chain types Improve API with better types Sep 1, 2023
@wilsoncusack wilsoncusack force-pushed the wilson/new-chain-types branch from 8e02299 to c1db23a Compare September 1, 2023 19:37
@wilsoncusack wilsoncusack temporarily deployed to verify September 1, 2023 19:37 — with GitHub Actions Inactive
@wilsoncusack wilsoncusack temporarily deployed to verify September 2, 2023 03:29 — with GitHub Actions Inactive
Comment on lines 38 to +39
"@eth-optimism/contracts-ts": "^0.15.0",
"@roninjin10/rollup-chains": "^0.0.3",
"@wagmi/chains": "^1.7.0",
"viem": "^1.4.2",
"wagmi": "^1.3.9"
"viem": "^1.9.5"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

based dep set

TChain,
TChainOverride
>,
// TODO consider moving GetL2ChainId to make this even more generic
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i.e. we could move it out of this type and append it just in time in some places, or possibly we could simplify and do like targetChain instead of L2ChainId. But the name has to work for both reads and writes. I.e. to doesn't work cause in some cases we are specifying where we want to read data.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually, in the case of L2 -> L1 actions we never pass the L1 chain ID. It should be known. So maybe this is fine. But we could update these types to have L1 and L2 base write actions

@wilsoncusack wilsoncusack changed the title Improve API with better types Improve function APIs with better generics Sep 2, 2023
@wilsoncusack wilsoncusack merged commit e34ef3d into main Sep 2, 2023
@wilsoncusack wilsoncusack deleted the wilson/new-chain-types branch September 2, 2023 14:16
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