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

fix(N-03): inconsistent error types #339

Draft
wants to merge 15 commits into
base: v0.1.0
Choose a base branch
from

Conversation

bidzyyys
Copy link
Collaborator

Resolves #336

@bidzyyys bidzyyys self-assigned this Oct 15, 2024
@bidzyyys bidzyyys linked an issue Oct 15, 2024 that may be closed by this pull request
1 task
@bidzyyys bidzyyys changed the base branch from main to v0.1.0 October 15, 2024 07:20
Copy link

netlify bot commented Oct 15, 2024

Deploy Preview for contracts-stylus ready!

Name Link
🔨 Latest commit bb8696b
🔍 Latest deploy log https://app.netlify.com/sites/contracts-stylus/deploys/670e17c1846c5100087312a0
😎 Deploy Preview https://deploy-preview-339--contracts-stylus.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@bidzyyys bidzyyys changed the title 336 audit n 03 inconsistent error types fix(N-03): inconsistent error types Oct 15, 2024
@bidzyyys bidzyyys force-pushed the 336-audit-n-03-inconsistent-error-types branch from be3c34b to e24c024 Compare October 15, 2024 09:00
@bidzyyys bidzyyys marked this pull request as ready for review October 15, 2024 10:28
@@ -27,66 +27,90 @@ sol_storage! {
}
}

impl BitMap {
/// Required interface of a [`BitMap`] compliant contract.
pub trait IBitMap {
Copy link
Member

@qalisander qalisander Oct 15, 2024

Choose a reason for hiding this comment

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

Do you think we need that kind of abstraction for BitMap and Trace?
I considering them mostly as primitives and not separate contracts/extensions..
cc @ggonzalez94

Copy link
Collaborator Author

@bidzyyys bidzyyys Oct 15, 2024

Choose a reason for hiding this comment

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

I would say that everything under contracts should have a trait.

Copy link
Member

@qalisander qalisander Oct 15, 2024

Choose a reason for hiding this comment

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

May be every function that is assumed to be publicly exposed should be in the trait? (public in solidity) In specified "contracts" there is no function that is assumed to be exposed publicly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Curious about @ggonzalez94 thoughts.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't have a strong opinion here.... I don't think many people would use the trait and will only be interested in the implementation, but I guess for consistency it doesn't hurt to have them

Copy link
Member

Choose a reason for hiding this comment

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

Since OL shared that they're going to stick to trait based approach.
And that in future we are expecting being able to declare #[public] macro more then once.
image
So this pattern can be done for every trait we have. That is why I'm considering to put just public methods into it.

@qalisander qalisander marked this pull request as draft October 16, 2024 12:26
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.

[Audit]: N-03 Inconsistent Error Types
3 participants