From e565ab7590165cbe32db55dd59194ec7c948fddf Mon Sep 17 00:00:00 2001 From: Thrilok Kumar Date: Sun, 9 May 2021 21:31:04 +0530 Subject: [PATCH] Fixed address => bytes32 encoding --- contracts/mapping/InstaMappings.sol | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contracts/mapping/InstaMappings.sol b/contracts/mapping/InstaMappings.sol index c0bb340f..da7b1e0f 100644 --- a/contracts/mapping/InstaMappings.sol +++ b/contracts/mapping/InstaMappings.sol @@ -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)) } }