Skip to content

Use multicall to fetch dAPI batches #56

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

Merged
merged 5 commits into from
Nov 2, 2023
Merged

Conversation

Siegrift
Copy link
Collaborator

Closes #46

Rationale

I first wanted to only fix the issue of multicalling the first batch together with the dAPIs count. I wanted to verify that I implemented the functionality correctly, so I wanted to write an e2e test for this (to test the on-chain integration). I followed the setup implemented by @acenolaza here but the contract we used in Airseeker was a bit outdated so I needed to update it. This required using the multicall everywhere.

@Siegrift Siegrift requested review from aquarat and vponline October 30, 2023 20:13
@Siegrift Siegrift self-assigned this Oct 30, 2023
@@ -15,5 +15,6 @@ module.exports = {
testEnvironment: 'jest-environment-node',
testMatch: ['**/?(*.)+(feature).[t]s?(x)'],
testPathIgnorePatterns: ['<rootDir>/.build', '<rootDir>/dist/', '<rootDir>/build/'],
testTimeout: 15_000,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This will set 15 seconds timeout for all e2e tests, which should be enough.

@@ -9,7 +9,7 @@ let env: EnvConfig | undefined;
export const loadEnv = () => {
if (env) return env;

dotenv.config({ path: join(__dirname, '../.env') });
dotenv.config({ path: join(__dirname, '../../.env') });
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This previously pointed to a non-existent file.

@@ -0,0 +1,370 @@
import * as abi from '@api3/airnode-abi';
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@Siegrift Siegrift force-pushed the multicall-first-batch branch from 76e998a to 72d4571 Compare October 31, 2023 09:18
Copy link
Contributor

@vponline vponline left a comment

Choose a reason for hiding this comment

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

LGTM, I didn't see any issues 🚀

@Siegrift Siegrift force-pushed the multicall-first-batch branch from 72d4571 to 97fa396 Compare November 2, 2023 07:28
@Siegrift Siegrift merged commit 07b24de into main Nov 2, 2023
@Siegrift Siegrift deleted the multicall-first-batch branch November 2, 2023 07:31
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.

Use multicall to fetch dAPIs count and first batch of active dAPIs
2 participants