Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Use the Error interface from the CDK DA repo #49

Merged
merged 1 commit into from
Jan 23, 2024

Conversation

Stefan-Ethernal
Copy link
Contributor

@Stefan-Ethernal Stefan-Ethernal commented Jan 23, 2024

This PR aligns function signature for interop functions so that it conforms to the expected signature, where second return value must be of type rpc.Error from the cdk-data-availability repo (https://github.com/0xPolygon/cdk-data-availability/blob/10cc1631e5a67761e655d9cbd3a9e3016fb3f757/rpc/error.go#L33-L37), instead the one used from the zk-evm-node repo (https://github.com/0xPolygonHermez/zkevm-node/blob/76e3118a9bc70b261b3c67d01fa9fcf7be3712de/jsonrpc/types/errors.go#L31-L35).

The panic was caused by this check, which was failing https://github.com/0xPolygon/cdk-data-availability/blob/10cc1631e5a67761e655d9cbd3a9e3016fb3f757/rpc/handler.go#L256-L259.

Copy link
Contributor

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@Stefan-Ethernal Stefan-Ethernal changed the title Use the correct package for the Error interface Use the Error interface from the CDK DA repo Jan 23, 2024
@Stefan-Ethernal Stefan-Ethernal marked this pull request as ready for review January 23, 2024 10:14
@Stefan-Ethernal Stefan-Ethernal merged commit d8f2b45 into main Jan 23, 2024
5 of 6 checks passed
@Stefan-Ethernal Stefan-Ethernal deleted the fix/use-correct-rpc-error-for-interop-funcs branch January 23, 2024 10:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants