Conversation
|
72e1644 to
0856b15
Compare
alvrs
left a comment
There was a problem hiding this comment.
is the world.d.ts file generated or manually created? Should we automatically create it when world.json is written (i believe in the deploy script)? Could even make it strongly typed like the abi types (might be useful to have type safety for which chains there is a deployment?)
We intentionally check in an initial And we intentionally don't use stronger types/downcast it because we do a look up based on a dynamic chain ID, which fails type checks if it's a strict object with only specific keys included. We could have a union of the strongly typed definition + more generic one like below, but not sure it helps much right now: declare const worlds: {
31337: {
address: "0x5FbDB2315678afecb367f032d93F642f64180aa3"
}
} & Partial<Record<string, { address: string; blockNumber?: number }>>; |
|
All that said, I still don't love the current approach for tracking deploys and using the contract addresses and would like to rethink it in the future but this is an 80%+ solution for now. |
fixes #1428