Uniswap / interface

🦄 Open source interfaces for the Uniswap protocol
https://app.uniswap.org
GNU General Public License v3.0
4.87k stars 4.94k forks source link

Cannot create an LP on Celo #7326

Open kamikazechaser opened 11 months ago

kamikazechaser commented 11 months ago

Bug Description Cannot approve or add liquidity for this specific token (https://celoscan.io/address/0xcde66143c5d9b134daba0e6a96e476b1bd347b04#code). Is there an issue with the token not conforming to a specific interface?

index.ts:269  Uncaught (in promise) Error: cannot estimate gas; transaction may fail or may require manual gas limit [ See: https://links.ethers.org/v5-errors-UNPREDICTABLE_GAS_LIMIT ] (reason="execution reverted: ZERO_FIRST", method="estimateGas", transaction={"from":"0x5523058cdFfe5F3c1EaDADD5015E55C6E00fb439","to":"0xcde66143C5D9B134DabA0e6A96e476b1bD347B04","data":"0x095ea7b30000000000000000000000003d79edaabc0eab6f08ed885c05fc0b014290d95a0000000000000000000000000000000000000000000000000000000005f5e100","accessList":null}, error={"code":-32603,"message":"Internal JSON-RPC error.","data":{"code":3,"message":"execution reverted: ZERO_FIRST","data":"0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000a5a45524f5f464952535400000000000000000000000000000000000000000000"},"stack":"{\n  \"code\": -32603,\n  \"message\": \"Internal JSON-RPC error.\",\n  \"data\": {\n    \"code\": 3,\n    \"message\": \"execution reverted: ZERO_FIRST\",\n    \"data\": \"0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000a5a45524f5f464952535400000000000000000000000000000000000000000000\"\n  },\n  \"stack\": \"Error: Internal JSON-RPC error.\\n    at new n (chrome-extension://ejbalbakoplchlghecdalmeeeajnimhm/common-2.js:16:22333)\\n    at s (chrome-extension://ejbalbakoplchlghecdalmeeeajnimhm/common-2.js:16:26272)\\n    at Object.internal (chrome-extension://ejbalbakoplchlghecdalmeeeajnimhm/common-2.js:16:26882)\\n    at c (chrome-extension://ejbalbakoplchlghecdalmeeeajnimhm/background-0.js:7:44209)\\n    at chrome-extension://ejbalbakoplchlghecdalmeeeajnimhm/background-0.js:7:45208\\n    at async chrome-extension://ejbalbakoplchlghecdalmeeeajnimhm/background-4.js:12:54199\"\n}\n  at new n (chrome-extension://ejbalbakoplchlghecdalmeeeajnimhm/common-2.js:16:22333)\n  at s (chrome-extension://ejbalbakoplchlghecdalmeeeajnimhm/common-2.js:16:26272)\n  at Object.internal (chrome-extension://ejbalbakoplchlghecdalmeeeajnimhm/common-2.js:16:26882)\n  at c (chrome-extension://ejbalbakoplchlghecdalmeeeajnimhm/background-0.js:7:44209)\n  at chrome-extension://ejbalbakoplchlghecdalmeeeajnimhm/background-0.js:7:45208\n  at async chrome-extension://ejbalbakoplchlghecdalmeeeajnimhm/background-4.js:12:54199"}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.7.2)
    at p.makeError (index.ts:269:28)
    at p.throwError (index.ts:281:20)
    at v (json-rpc-provider.ts:78:20)
    at ef.<anonymous> (json-rpc-provider.ts:642:20)
    at Generator.throw (<anonymous>)
    at a (674.588248c5.js:27:226741)

Steps to Reproduce

  1. Go to Add Liquidity
  2. 1% fee tier
  3. Set price range, low=1, high=2
  4. Starting price = 1
  5. Deposit amount 100 SRFTEST
  6. Approval fails ...

Expected Behavior

Should be able to create an LP.

Additional Context

The token contract itself is a demurrage token (The balance of users gradually decays). We do not use external erc20 libraries like OpenZepplin. The source has been published (link above).

Shubham-Rasal commented 11 months ago

Any update or I would like to take up this issue.

kamikazechaser commented 11 months ago

None so far.