Skip to content

Conversation

@alainncls
Copy link
Collaborator

@alainncls alainncls commented May 12, 2025

What does this PR do?

Related ticket

Fixes issues:

Type of change

  • Chore
  • Bug fix
  • New feature
  • Documentation update

Check list

  • My contribution follows the project's guidelines
  • I have made corresponding changes to the documentation
  • Unit tests for any smart contract change
  • Contracts and functions are documented

Note

Introduces multichain querying across Linea/Arbitrum/Base/BSC via GraphQL Mesh, adds chainName and findByMultiChain APIs, updates schema/resolvers, examples, tests, and build/deps.

  • SDK (core)
    • Add cross-chain client and ChainName enum; expose findByMultiChain for attestation, portal, schema, module and map results including chainName.
    • Extend types (Attestation, Portal, Schema, Module) with optional chainName.
    • Add attestation multichain count helper; minor read helpers.
  • GraphQL schema/runtime
    • Parameterize subgraph endpoint with {context.chainName}; add Yoga persisted operations.
    • Extend schema with chainName fields and new queries: multichainAttestations/Portals/Schemas/Modules.
    • Implement resolvers to fan out per-chain and flatten results; remove Subscription from schema/types.
    • Generate typed documents, SDK helpers, and persisted ops (queries.graphql, .graphclient updates).
  • Examples/CLI/Docs
    • Add findByMultiChain examples for all entities; update CLI docs.
  • Tests
    • Add integration tests validating multichain queries for all entities.
  • Build/Deps
    • Update deps (GraphQL Mesh, Yoga plugin, viem); add browser bundle via esbuild and scripts/fix-imports; set package browser field.

Written by Cursor Bugbot for commit 9992948. This will update automatically on new commits. Configure here.

@cla-assistant
Copy link

cla-assistant bot commented May 12, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ alainncls
❌ satyajeetkolhapure
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@cla-assistant
Copy link

cla-assistant bot commented May 12, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ alainncls
❌ satyajeetkolhapure
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions
Copy link
Contributor

github-actions bot commented May 13, 2025

@github-actions github-actions bot temporarily deployed to pull request May 13, 2025 07:54 Inactive
@codecov-commenter
Copy link

codecov-commenter commented May 13, 2025

Codecov Report

❌ Patch coverage is 31.52174% with 63 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.25%. Comparing base (55d95e0) to head (9992948).

Files with missing lines Patch % Lines
sdk/src/resolvers.ts 4.76% 20 Missing ⚠️
sdk/src/dataMapper/AttestationDataMapper.ts 20.83% 19 Missing ⚠️
sdk/.graphclient/index.ts 54.54% 9 Missing and 1 partial ⚠️
sdk/src/dataMapper/PortalDataMapper.ts 0.00% 5 Missing ⚠️
sdk/src/dataMapper/SchemaDataMapper.ts 0.00% 5 Missing ⚠️
sdk/src/dataMapper/ModuleDataMapper.ts 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #961      +/-   ##
==========================================
- Coverage   52.73%   49.25%   -3.49%     
==========================================
  Files          19       23       +4     
  Lines         402      536     +134     
  Branches       61       77      +16     
==========================================
+ Hits          212      264      +52     
- Misses        184      261      +77     
- Partials        6       11       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@alainncls alainncls changed the title Feat/multichain feat: Multichain May 13, 2025
@alainncls alainncls self-assigned this May 13, 2025
@alainncls alainncls marked this pull request as ready for review October 22, 2025 21:46
@github-actions github-actions bot temporarily deployed to pull request October 22, 2025 21:47 Inactive
} = useSWR(`${SWRKeys.GET_ATTESTATION_BY_ID}/${id}`, fetchAttestation, {
shouldRetryOnError: false,
revalidateOnFocus: false,
});
Copy link

Choose a reason for hiding this comment

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

Bug: SWR Cache Keys Missing Network Dependency

The SWR cache keys in both SearchAttestationsReceived and Attestation components don't include networkType as a dependency. This means that when the network type changes, SWR might return cached data from a different network, leading to stale or incorrect information being displayed.

Additional Locations (1)

Fix in Cursor Fix in Web

network: <LineaMainnetIconDark />,
id: ZERO_ADDRESS,
moduleAddress: ZERO_ADDRESS,
name: NetworkName.LINEA,
Copy link

Choose a reason for hiding this comment

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

Bug: Mock Module Type Mismatch

The skeletonModules function generates mock Module objects with incorrect types. It adds a network property (a React component) and assigns the name property an enum value, neither of which align with the Module interface. This type mismatch may lead to TypeScript errors and runtime issues.

Fix in Cursor Fix in Web


return this.executeReadMethod(functionName, args);
}

Copy link

Choose a reason for hiding this comment

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

Bug: Cross-Chain Read Method Targets Incorrect Chain

The executeReadMethodForChain method resolves the correct contract address for a given chain, but then calls executeReadMethod which uses this.conf.attestationRegistryAddress. This causes cross-chain read operations to incorrectly target the current instance's chain.

Fix in Cursor Fix in Web

@alainncls alainncls merged commit 803de89 into dev Oct 22, 2025
13 of 16 checks passed
@alainncls alainncls deleted the feat/multichain branch October 22, 2025 21:53
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.

4 participants