Skip to main content

if address was packed using abi.encodedPacked(address) then this would work, since you need to pad left to get the correct bytes back div by 0x1.... is like doing >> 96

assembly {
            parsed := div(mload(add(data, 32))), 0x1000000000000000000000000)
}

or (div by 0x1.... is like doing >> 96)

assembly {
    parsed := shr(96, mload(add(data, 32)))
}

if address was packed using abi.encodedPacked(address) then this would work, since you need to pad left to get the correct bytes back div by 0x1.... is like doing >> 96

assembly {
            parsed := div(mload(add(data, 32))), 0x1000000000000000000000000)
        }

if address was packed using abi.encodedPacked(address) then this would work, since you need to pad left to get the correct bytes back

assembly {
    parsed := div(mload(add(data, 32)), 0x1000000000000000000000000)
}

or (div by 0x1.... is like doing >> 96)

assembly {
    parsed := shr(96, mload(add(data, 32)))
}
Source Link

if address was packed using abi.encodedPacked(address) then this would work, since you need to pad left to get the correct bytes back div by 0x1.... is like doing >> 96

assembly {
            parsed := div(mload(add(data, 32))), 0x1000000000000000000000000)
        }