-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
add foundry integration #845
base: dev
Are you sure you want to change the base?
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very nice
|
||
let activeChains; | ||
|
||
module.exports = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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