Conversation
Signed-off-by: r3kt.eth <[email protected]>
Signed-off-by: r3kt.eth <[email protected]>
Signed-off-by: r3kt.eth <[email protected]>
Signed-off-by: r3kt.eth <[email protected]>
Signed-off-by: r3kt.eth <[email protected]>
Passing run #434 ↗︎Details:
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
|||||||||||||||
|
|
||
| let activeChains; | ||
|
|
||
| module.exports = { |
There was a problem hiding this comment.
Should write new code in a .mjs file imo so converting it to TS later is easier
|
|
||
| const log = require('debug')('synpress:foundry'); | ||
|
|
||
| let activeChains; |
There was a problem hiding this comment.
doing module level state like this is common in synpress and not a good practice in general imo. Instead state should be instanciated by user e.g. synpressFoundry(options) where on the implementation you can set state in the factory function or the class in case of doing new SynpressFoundry(options). It's way more robust to later having more than one for example and leads to less problems long term. Easier to read the code and debug too imo
| const testClient = createTestClient({ | ||
| chain: anvilChainType, | ||
| mode: 'anvil', | ||
| transport: http(), | ||
| }); | ||
|
|
||
| const publicClient = createPublicClient({ | ||
| chain: anvilChainType, | ||
| transport: http(), | ||
| }); | ||
|
|
||
| const walletClient = createWalletClient({ | ||
| chain: anvilChainType, | ||
| transport: http(), | ||
| }); |
There was a problem hiding this comment.
If you did the new AnvilSynpressUtil() pattern here the utility could give these to user so user could use them in their tests too
Motivation and context
It's good beginning.
Does it fix any issue?
#(issue)
Other useful info
N/A
Quality checklist