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

Improve static typing in constructor parameters #64

Open
jaybuidl opened this issue Feb 2, 2023 · 0 comments
Open

Improve static typing in constructor parameters #64

jaybuidl opened this issue Feb 2, 2023 · 0 comments

Comments

@jaybuidl
Copy link
Member

jaybuidl commented Feb 2, 2023

Hints to the compiler to avoid this sort of issues in the future.

It doesn't change functionality or gas usage, but gives compiler hints if the wrong contract is type is passed to the constructor.

So this

constructor(
        uint256 _deposit,
        uint256 _epochPeriod,
        uint256 _challengePeriod,
        address _safeBridgeSender,
        address _inbox
    )

becomes

constructor(
        uint256 _deposit,
        uint256 _epochPeriod,
        uint256 _challengePeriod,
        ISafeBridgeSender _safeBridgeSender,
        IInbox _inbox
    )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant