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

imp: decouple abi files #248

Merged
merged 16 commits into from
Jan 30, 2025
Merged

imp: decouple abi files #248

merged 16 commits into from
Jan 30, 2025

Conversation

srdtrk
Copy link
Member

@srdtrk srdtrk commented Jan 30, 2025

Description

This removes the need to expose structs in solidity through a dummy function. Moreover, it cleans up the rust code. It makes it much easier to decouple if we never inherit the message interfaces like I did in this PR.

closes: #131


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work.
  • Wrote unit and integration tests.
  • Added relevant natspec and godoc comments.
  • Provide a conventional commit message to follow the repository standards.
  • Re-reviewed Files changed in the GitHub PR explorer.
  • Review SonarCloud Report in the comment section below once CI passes.

Copy link

codecov bot commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.47%. Comparing base (0448c0c) to head (82417d4).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #248      +/-   ##
==========================================
+ Coverage   99.29%   99.47%   +0.18%     
==========================================
  Files          12       12              
  Lines         566      572       +6     
==========================================
+ Hits          562      569       +7     
+ Misses          4        3       -1     

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

@srdtrk srdtrk marked this pull request as ready for review January 30, 2025 14:21
Comment on lines -502 to -529

/// @notice A dummy function to generate the ABI for the parameters.
/// @param o1 The MembershipOutput.
/// @param o2 The UcAndMembershipOutput.
/// @param o3 The MsgUpdateClient.
/// @param o4 The MembershipProof.
/// @param o5 The SP1MembershipProof.
/// @param o6 The SP1MembershipAndUpdateClientProof.
/// @param o7 The MisbehaviourOutput.
/// @param o8 The MsgSubmitMisbehaviour.
function abiPublicTypes(
MembershipOutput memory o1,
UcAndMembershipOutput memory o2,
MsgUpdateClient memory o3,
MembershipProof memory o4,
SP1MembershipProof memory o5,
SP1MembershipAndUpdateClientProof memory o6,
MisbehaviourOutput memory o7,
MsgSubmitMisbehaviour memory o8
)
public
pure
// solhint-disable-next-line no-empty-blocks
{
// This is a dummy function to generate the ABI for outputs
// so that it can be used in the SP1 verifier contract.
// The function is not used in the contract.
}
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the motivation for the PR

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, love getting rid of this ❤️

@gjermundgaraba
Copy link
Contributor

This is really great work! The repo is getting cleaner and cleaner ;)

@gjermundgaraba gjermundgaraba merged commit ec5227e into main Jan 30, 2025
61 checks passed
@gjermundgaraba gjermundgaraba deleted the serdar/131-decouple-abi-2 branch January 30, 2025 14:50
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.

Decouple the abi files for SP1ICS07Tendermint.sol
2 participants