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

fix add on-contract-event #304

Closed
wants to merge 6 commits into from
Closed

fix add on-contract-event #304

wants to merge 6 commits into from

Conversation

juliangruber
Copy link
Member

@juliangruber juliangruber commented May 16, 2024

@juliangruber juliangruber requested a review from bajtos May 16, 2024 10:00
test/round-tracker.test.js Outdated Show resolved Hide resolved
@juliangruber juliangruber requested a review from bajtos May 16, 2024 11:39
@juliangruber juliangruber marked this pull request as ready for review May 16, 2024 11:39
Comment on lines +3 to +5
import { createMeridianContract, provider } from './ie-contract.js'
import { onContractEvent } from 'on-contract-event'
import { RPC_URL, GLIF_TOKEN } from '../spark-publish/ie-contract-config.js'
Copy link
Member

Choose a reason for hiding this comment

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

I'd like to keep only one place where we are importing from spark-publish.

Would you mind re-exporting these constants in ./ie-contract.js?

Suggested change
import { createMeridianContract, provider } from './ie-contract.js'
import { onContractEvent } from 'on-contract-event'
import { RPC_URL, GLIF_TOKEN } from '../spark-publish/ie-contract-config.js'
import { RPC_URL, GLIF_TOKEN, createMeridianContract, provider } from './ie-contract.js'
import { onContractEvent } from 'on-contract-event'

Copy link
Member

@bajtos bajtos left a comment

Choose a reason for hiding this comment

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

Feel free to change the imports in a follow-up pull request.

Copy link
Member

@bajtos bajtos left a comment

Choose a reason for hiding this comment

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

I think we can fix the problem by adding polling: true to the JsonRpcApiProvider options.
https://docs.ethers.org/v6/api/providers/jsonrpc/#JsonRpcApiProviderOptions

@bajtos
Copy link
Member

bajtos commented May 16, 2024

We don't need this change anymore, see #306 (comment)

@bajtos bajtos closed this May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants