SmartTokenLabs / ST404

6 stars 0 forks source link

Can not approve STTT to Uniswap contract via Uniswap website #5

Open zhangzhongnan928 opened 6 months ago

zhangzhongnan928 commented 6 months ago
Screenshot 2024-03-05 at 4 17 20 pm

https://app.uniswap.org/swap?exactField=output&exactAmount=110&outputCurrency=eth&inputCurrency=0x63F7fF78ebB6591445FbaE524775C13715765098&chain=sepolia

after click approve button, Metamask is not triggered

oleggrib commented 6 months ago

@zhangzhongnan928 , please try new contract version https://sepolia.etherscan.io/address/0xc77f5b4e485714a4541b4acf7657d1f627823999

oleggrib commented 6 months ago

Hi, @zhangzhongnan928 @SmartLayer , I can see the issue. Uniswap requests approve(0x000000000022d473030f116ddee9f6b43ac78ba3, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff), and ST404 tries to parse 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff as tokenId. let me fix and deploy updated contract.

oleggrib commented 6 months ago

@zhangzhongnan928 , this is updated contract with fixed issue https://sepolia.etherscan.io/address/0xe565EE6a0F777b8DA85f5e1aF82aDF6af403c000#code

zhangzhongnan928 commented 6 months ago

@zhangzhongnan928 , this is updated contract with fixed issue https://sepolia.etherscan.io/address/0xe565EE6a0F777b8DA85f5e1aF82aDF6af403c000#code

Screenshot 2024-03-07 at 11 02 10 am

This token cannot be added as 20 token in metamask

oleggrib commented 6 months ago

yes, its same as my issue https://github.com/SmartTokenLabs/ST404/issues/9 I have added supportsInterface(ERC721), but it conflicts with Metamask this is fixed contract https://sepolia.etherscan.io/address/0x2b0Aaa48b5669c7979a3BCa9cCB36D7f9669D28c#code @zhangzhongnan928

zhangzhongnan928 commented 6 months ago

adding liquidity to uniswap doesn't work https://app.uniswap.org/add/ETH/0x2b0Aaa48b5669c7979a3BCa9cCB36D7f9669D28c/10000?minPrice=0.00000000000000000000000000000000000000000000000029602&maxPrice=33782000000000000000000000000

Screenshot 2024-03-07 at 3 02 58 pm

After click add, metamask is no response

oleggrib commented 6 months ago

Hi, @zhangzhongnan928 , could you show me error from brower console?

oleggrib commented 6 months ago

most of all its problem with gas limit. uniswap request Metamast to estimate gas and metamask reverts transaction. 1k tokens liquidity works good to add more tokens we have to whitelist uniswap liquidity contract, because when it transfer ERC20 then lot of events emitted.

other issues with Approve fixed @zhangzhongnan928

SmartLayer commented 6 months ago

Can Oleg check first? I'll get back to you.

oleggrib commented 6 months ago

I am sorry, but I dont have access to the wallet 0x8349Fc69c48aF23e030A655736375d8942De5347, which is admin of our testnet contracts uniswap creates separate contract for each pool, so contract to whitelist will be different for each uniswap pool

for example https://sepolia.etherscan.io/tx/0x845e21e8bf08def3320f33106cee66999750eddcb1b504f5e4ab7eb3c358ff0d#eventlog

image

so we have to find out desired pool and whitelist it @SmartLayer

SmartLayer commented 6 months ago

I think we need to redeploy it on Sepolia and attempt to create liquidity pool using uniswap api interface, the last deployment was a few days ago. we need to whitelist it and write down the process in case victor wants to see the result. I'll deploy a new version once you merged in the latest change.

oleggrib commented 6 months ago

Hi, @SmartLayer , all contract updates pushed, you can use script to deploy and set Admin, which is better for you please, use command await erc404st.connect(owner).setWhitelist(some.address, true) to set whitelisted address, or verify contract and use Etherscan UI