Hi, I have a question about smart contract.
I am trying to work with dex "mute" from "zkSync Era" blockchain and I want to calculate pair address from tokens locally.
There are functions pairFor and pairForIndirect in router contract (https://explorer.zksync.io/address/0x8B791913eB07C32779a16750e3868aA8495F5964#contract).
Function pairForIndirect is a standard function for calculating pair address from tokens and I can replicate it's logic locally. But there is a problem - even if I call this function through chain explorer It gives me wrong pair address.
Function pairFor is just calling factory (https://explorer.zksync.io/address/0x40be1cBa6C5B47cDF9da7f963B6F761F4C60627D#contract) function getPair and it returns true pair addresses but I cannot replicate its logic locally. Also I cannot derive logic for calculation pair address from factory function createPair.
Can anybody help me to understand how in such case calculate pair address from token addresses locally?
Mar 27, 2023, 10:48 AM
can anybody help me with pair address calculation from tokens addresses?
Mar 27, 2023, 10:56 AM