how to convert 0x000000000000000000000000cd1e968288168ade7e4bad84c13e49d61605f05c to this
0xcd1e968288168ade7e4bad84c13e49d61605f05c


the first is the hex and the second one is the address
can't find any way to do this using web3

Jun 24, 2021, 7:49 PM
Actually those are the same...
left padding with zeros doesn't affect a value, only the bit-width
What are you actually trying to do? The first one is displayed with a 256 bit-width, the 2nd is the same value displayed with a 160 bit-width.
Jun 24, 2021, 8:02 PM
getting the logs of transactions and checking for a transfer event
got sender's address as 0x000000000000000000000000cd1e968288168ade7e4bad84c13e49d61605f05c
but the real address is 0xcd1e968288168ade7e4bad84c13e49d61605f05c
ik both are same
also thanks for help
let b=0x000000000000000000000000cd1e968288168ade7e4bad84c13e49d61605f05c==0xcd1e968288168ade7e4bad84c13e49d61605f05c
console.log(b);// returns true
Jun 24, 2021, 8:13 PM
ok, if you're still stuck with anything, try to explain and I'm sure we'll solve the issue.
Also be careful using JS native BigInteger, I love it to death, but if you're writing production code, you'd be surprised how many people still use old iphones with old safari which doesn't support native BigInteger.
Uniswap V3 is pretty impressive. Concentrated Liquidity - genius! I wonder what they'll think of next.
Jun 24, 2021, 8:29 PM

© 2024 Draquery.com All rights reserved.