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
Gateways are now organized #515
Conversation
I made the `GatewayBase` organized. As a result, the contracts that directly or indirectly extend the `GatewayBase` must now provide an address of a worker manager contract that implements the interface `IsWorkerInterface`. All relevant modifiers were replaced by `onlyWorker`. Tests were updated to reflect the change. In order to easily test organized contracts, I created a `MockWorkerManager` that can be used in tests and has a single valid worker address. I also re-organized the `contracts/test` directory a little bit with additional sub-directories. Fixes OpenST#486
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@deepesh-kn @gulshanvasnani This PR is now ready for review.
I added isOwner
to the IsMemberInterface
(formally isWorkerInterface
) and the onlyOrganization
modifier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⭐️ 🌟
Just 2 inline comment.
Also, a lot of existing tests (touched in this PR) contains expectThrow
instead of expectRevert
and no error message is provided. We can create a ticket for that. What's your opinion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed the mentioned changes 👍
Regarding this question:
Also, a lot of existing tests (touched in this PR) contains expectThrow instead of expectRevert and no error message is provided. We can create a ticket for that. What's your opinion?
There is #406. We could extend that to include error messages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 💯
There is #406. We could extend that to include error messages.
👍
I made the
GatewayBase
organized. As a result, the contracts thatdirectly or indirectly extend the
GatewayBase
must now provide anaddress of a worker manager contract that implements the interface
IsWorkerInterface
. All relevant modifiers were replaced byonlyWorker
.Tests were updated to reflect the change. In order to easily test
organized contracts, I created a
MockWorkerManager
that can be used intests and has a single valid worker address.
I also re-organized the
contracts/test
directory a little bit withadditional sub-directories.
Fixes #486