I am trying to use erdpy
to find the address of the pair EGLD-MEX on the testnet Maiar Exchange.
I am using this call:
erdpy --verbose contract query erd1qqqqqqqqqqqqqpgqum3tp4paqxt3snyfj3a5qj37tr9umv970n4s0kv06c --proxy https://testnet-gateway.elrond.com --function=getPair --arguments 0x5745474C442D663634336438 0x4D45582D633735316436
where
erd1qqqqqqqqqqqqqpgqum3tp4paqxt3snyfj3a5qj37tr9umv970n4s0kv06c
is the address of the router smart contract on the testnet.
I found it when performing a swap in https://testnet.maiar.exchange/ as shown in the picture
0x5745474C442D663634336438
is WEGLD-f643d8 in hexadecimal
0x4D45582D633735316436
is MEX-c751d6 in hexadecimal
The response from this call is empty.
What did I do wrong?
The address you are using is not the router address as you assumed, but the address of the pair itself.
You can also easily check that via the graphql api. https://testnet-exchange-graph.elrond.com/graphql
With the following query:
You will receive the following output:
Where the factory address is the proxy, and the pair addresses should be self explanatory.