V1235813
medium
In d3token addressToShortString method gives same result for two different address
Two different address was were giving in the addressToShortString method. There output were same
- 0x378C71dA117b43C1DC0abB15354FC40fBbcAEA9E
- 0x378c71DA117b43c1dC0ABb15354Fc40fBbcAea9d
output were same
378c71da 378c71da
Two different will have same shortString
https://gist.github.com/ranevikram12/2880c6adc6d69c74482dcc8533aa2a07#file-gistfile1-txt-L29
function testAddressToShortStringSame() public { string memory adtEST2 = d3Token.addressToShortString( address(0x378C71dA117b43C1DC0abB15354FC40fBbcAEA9E) ); string memory adtEST3 = d3Token.addressToShortString( address(0x378c71DA117b43c1dC0ABb15354Fc40fBbcAea9d) );
console.log("adtEST2 = ", adtEST2);
console.log("adtEST3 = ", adtEST3);
// both address are different but output is same
assertEq(adtEST2, adtEST3);
}
Foundry
Manual Review
It must have a way to make the string output unique