Currently, ACL parameters are created with the Param struct:
struct Param {
uint8 id;
uint8 op;
uint240 value;
}
but the ACL grantPermissionP function takes a uint256[] for its parameters:
function grantPermissionP(address _entity, address _app, bytes32 _role, uint256[] _params)
It could be interesting to have a helper function to convert a Param struct to uint256.
Something like this:
function encodeParam(uint8 id, uint8 op, uint240 value) internal pure returns (uint256) {
return uint256(id) << 248 | uint256(op) << 240 | value;
}
Currently, ACL parameters are created with the
Paramstruct:but the ACL
grantPermissionPfunction takes auint256[]for its parameters:It could be interesting to have a helper function to convert a
Paramstruct touint256.Something like this: