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

Add verbose CLI output flag & make compatible with forno wss #28

Closed
wants to merge 1 commit into from

Conversation

diwu1989
Copy link
Contributor

@diwu1989 diwu1989 commented Feb 7, 2022

Recent update of the contract kit broke forno wss support (because contractKit sucks and only wants you to use HTTP)

Add verbose output flag, when verbose is on, pair snapshot and route trade data is logged.

@diwu1989 diwu1989 force-pushed the verboseOutputAndFixWSS branch from bb561a0 to 0f6942a Compare February 7, 2022 07:43
@@ -59,7 +61,7 @@ function tokenByAddrOrSymbol(addressOrSymbol: string) {

async function main() {
const opts = program.opts()
const kit = await newKit(opts.network)
Copy link
Contributor Author

@diwu1989 diwu1989 Feb 7, 2022

Choose a reason for hiding this comment

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

latest dependency bump brought in a version of contractKit that doesn't accept wss://forno... because it always assumes its a HTTP provider url.

Use newKitFromWeb3 and use a real Web3 instance instead

Using WSS forno is also significantly faster initialization than HTTPS forno, if you double the default swappa initialization concurrency, things initialize really fast.

@zviadm zviadm closed this Jul 15, 2023
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