-
Notifications
You must be signed in to change notification settings - Fork 10
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
Remove Ownable dependency in AxelarGatewayBase #64
base: master
Are you sure you want to change the base?
Conversation
Was that requested ? In general, I can see the point of having flexibility in the access control mechanism ... but I'm not sure if this contract really needs it. You mention this could be setup through the wizard, but the wizard is for contracts that app developpers will deploy, and for which we need many instances with different characteristics. In this case I only expect one instance per chain to exist. IMO it should be deployed, and owned, by axelar. The ownership would be an axelar multisig, or governor, and that is it. |
Not that it was requested but it's just too strict. Even if it's owned by Axelar it's too restrictive that we're only allowing Ownable., Also note that the gateways are adapters, it'd make sense if it was the canonical gateway. I think this change is not really controversial and just allows for better flexibility, which is what we want for a library in the end |
@@ -31,6 +30,12 @@ abstract contract AxelarGatewayBase is Ownable { | |||
mapping(string caip2 => string remoteGateway) private _remoteGateways; | |||
mapping(string caip2OrAxelar => string axelarOrCaip2) private _chainEquivalence; | |||
|
|||
/// @dev Only allows an authorized registrant to call the function. See {_checkRegistrant}. | |||
modifier onlyRegistrant() { | |||
_checkRegistrant(); |
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.
This pattern usually goes like this:
_checkRegistrant(); | |
_checkRegistrant(msg.sender); |
Motivation
This allow to setup custom access control easily (e.g. through Wizard)