Maiar DEX:对智能合约响应的 erdpy 查询为空

Maiar DEX: erdpy query to a smart contract response is empty

我正在尝试使用 erdpy 在测试网 Maiar Exchange 上查找 EGLD-MEX 对的地址。

我正在使用这个电话:

erdpy --verbose contract query erd1qqqqqqqqqqqqqpgqum3tp4paqxt3snyfj3a5qj37tr9umv970n4s0kv06c --proxy https://testnet-gateway.elrond.com --function=getPair --arguments 0x5745474C442D663634336438 0x4D45582D633735316436

哪里

erd1qqqqqqqqqqqqqpgqum3tp4paqxt3snyfj3a5qj37tr9umv970n4s0kv06c是路由器智能合约在测试网上的地址。 如图所示,我在 https://testnet.maiar.exchange/ 中执行交换时发现了它

0x5745474C442D663634336438 是十六进制的 WEGLD-f643d8

0x4D45582D633735316436 是十六进制的 MEX-c751d6

此调用的响应为空。

我做错了什么?

您使用的地址不是您假设的路由器地址,而是该对本身的地址。

您也可以通过 graphql api 轻松检查。 https://testnet-exchange-graph.elrond.com/graphql

使用以下查询:

{factory{address}, pairs{address, firstToken{identifier}, secondToken{identifier}}}

您将收到以下输出:

{
  "data": {
    "factory": {
      "address": "erd1qqqqqqqqqqqqqpgq4axqc749vuqr27snr8d8qgvlmz44chsr0n4sm4a72g"
    },
    "pairs": [
      {
        "address": "erd1qqqqqqqqqqqqqpgqum3tp4paqxt3snyfj3a5qj37tr9umv970n4s0kv06c",
        "firstToken": {
          "identifier": "WEGLD-f643d8"
        },
        "secondToken": {
          "identifier": "MEX-c751d6"
        }
      },
      {
        "address": "erd1qqqqqqqqqqqqqpgqmzjpcyra47d0k8xualwcs6k2gzkdrdap0n4sdj0nu6",
        "firstToken": {
          "identifier": "WEGLD-f643d8"
        },
        "secondToken": {
          "identifier": "USDC-72a225"
        }
      },
      {
        "address": "erd1qqqqqqqqqqqqqpgq3cpwrvmextk986e6z6akeewq8feukuj90n4sf2aa2n",
        "firstToken": {
          "identifier": "WEGLD-f643d8"
        },
        "secondToken": {
          "identifier": "RIDE-ae50f0"
        }
      }
    ]
  }
}

其中工厂地址是代理,配对地址应该是不言自明的。