Cleanup focused only on sdk-core and hop-node-core.
removed some any types, added return types, lint sdk-core
Updated linting rules for sdk-core. Can be strict now that it a small scoped package. Changes don't have much (or any?) affect on current style.
Updated most relevant constants in sdk-core and hop-node-core to be all caps snake_case.
This is opinionated and happy to revert. I once spent a few hours debugging something to learn that the casing was the reason (i.e. priorityFeePerGasCap vs PriorityFeePerGasCap). This hopes to avoid that.
Add readonly to sdk-core types. Down to do this just for the super static types (network/chain/token) & not necessarily everywhere that it is "right" to do it, as I see very small benefit.
I was lukewarm about this change since I didn't think it mattered too much, but then I realized that adding readonly broke the build for 9a27d34978aa1fbd4783ee26fc1456992ec4c7fc. IMO I think this is a good reason for readonly. IIUC this appears to be legacy code (3+ years old) that appended a chainId at a time when we probably had different object structures. In a bad case, that rewrite might have messed something as we updated the object structure and didn't realize it was there.
Cleanup focused only on
sdk-core
andhop-node-core
.any
types, added return types, lintsdk-core
sdk-core
. Can be strict now that it a small scoped package. Changes don't have much (or any?) affect on current style.sdk-core
andhop-node-core
to be all caps snake_case.priorityFeePerGasCap
vsPriorityFeePerGasCap
). This hopes to avoid that.readonly
tosdk-core
types. Down to do this just for the super static types (network/chain/token) & not necessarily everywhere that it is "right" to do it, as I see very small benefit.readonly
broke the build for 9a27d34978aa1fbd4783ee26fc1456992ec4c7fc. IMO I think this is a good reason forreadonly
. IIUC this appears to be legacy code (3+ years old) that appended achainId
at a time when we probably had different object structures. In a bad case, that rewrite might have messed something as we updated the object structure and didn't realize it was there.