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

Misc fixes on LM system #1196

Merged
merged 2 commits into from
Mar 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions pkg/liquidity-mining/contracts/AuthorizerAdaptor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,14 @@ contract AuthorizerAdaptor is IAuthorizerAdaptor, ReentrancyGuard {

/**
* @notice Returns the action ID associated with calling a given function through this adaptor
* @dev The contracts managed by this adaptor do not have action ID disambiguators we use the adaptor's globally
* @dev As the contracts managed by this adaptor don't have action ID disambiguators, we use the adaptor's globally.
* This means that contracts with the same function selector will have a matching action ID:
* if granularity is required then permissions must not be granted globally in the Authorizer.
*
* @param selector - The 4 byte selector of the function to be called using `performAction`
* @return The associated action ID
*/
function getActionId(bytes4 selector) public view override returns (bytes32) {
// Each external function is dynamically assigned an action identifier as the hash of the disambiguator and the
// function selector. Disambiguation is necessary to avoid potential collisions in the function selectors of
// multiple contracts.
return keccak256(abi.encodePacked(_actionIdDisambiguator, selector));
}

Expand Down