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

EVM-535: Use contractsapi bindings throught code #1321

Merged
merged 6 commits into from
Mar 27, 2023

Conversation

goran-ethernal
Copy link
Collaborator

@goran-ethernal goran-ethernal commented Mar 21, 2023

Description

This PR uses the contractsapi package and generated go stubs from contract functions and events, on places where it was missing.

PR expanded the ParseLog function on generated go stubs for contract events, so that the function returns two values:

  • boolean - indicating if the given log matches the given event.
  • error - if a log matches the event, but its parsing fails for some reason.

This simplifies the code on client that first matched the events with log, and then parsed it, shortening the code, and removing the manually added references to an event abi.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

@goran-ethernal goran-ethernal marked this pull request as ready for review March 21, 2023 18:26
@goran-ethernal goran-ethernal self-assigned this Mar 22, 2023
@goran-ethernal goran-ethernal added the feature New update to Polygon Edge label Mar 22, 2023
@goran-ethernal goran-ethernal changed the title Use contractsapi bindings throught code EVM-535: Use contractsapi bindings throught code Mar 22, 2023
Copy link
Collaborator

@Stefan-Ethernal Stefan-Ethernal left a comment

Choose a reason for hiding this comment

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

Nice.

Leaving some thoughts to consider.

consensus/polybft/checkpoint_manager_test.go Outdated Show resolved Hide resolved
@goran-ethernal goran-ethernal force-pushed the Use-contractsapi-throught-code branch 3 times, most recently from 24b7b79 to dd38fb2 Compare March 23, 2023 12:36
@goran-ethernal goran-ethernal merged commit 562d542 into develop Mar 27, 2023
@goran-ethernal goran-ethernal deleted the Use-contractsapi-throught-code branch March 27, 2023 07:47
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New update to Polygon Edge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants