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

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