Fixed address => bytes32 encoding

This commit is contained in:
Thrilok Kumar 2021-05-09 21:31:04 +05:30
parent 247d75f857
commit e565ab7590

View File

@ -24,8 +24,9 @@ contract InstaMappings is AccessControl {
pure
returns (bytes32 role)
{
bytes memory encoded = abi.encode(mappingContract);
assembly {
role := mload(add(mappingContract, 32))
role := mload(add(encoded, 32))
}
}