AB
Кто-нибудь замечал разницу между допустим 200 и 9999?
Как это вообще работатет? Что можно соптимизировать, что за 200 циклов не оптимизировалось?
Size: a a a
AB
EG

AB
EG
AB
EG
AB
EG

AB
RP
m
swapExactTokensForTokensfunction swapExactTokensForTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts)amountOutMin выставляю slippage tolerance в 14%, ставил как-то даже 90%
transaction may fail or may require manual gas limit (error={"reason":"cannot estimate gas; transaction may fail or may require manual gas limit","code":"UNPREDICTABLE_GAS_LIMIT","error":{"reason":"processing response error","code":"SERVER_ERROR","body":"{\"jsonrpc\":\"2.0\",\"id\":628,\"error\":{\"code\":3,\"message\":\"execution reverted: TransferHelper: TRANSFER_FROM_FAILED\
EG
m
await routerrouter.swapExactTokensForTokens(..)await tx.wait(){gasPrice: await providerprovider.getGasPrice(), gasLimit: 1000000}EG
EG
EG
TRANSFER_FROM_FAILED в ошибке, то причины две – не хватает баланса или allowancem
transaction failed (transactionHash="0xaf4983cd04ecbad059ec096c41cf1cff5c94b80bc2eacbf404ae0e3e87eb83ee", transaction={"nonce":25,"gasPrice":{"type":"BigNumber","hex":"0x012a05f200"},"gasLimit":{"type":"BigNumber","hex":"0x0f4240"},"to":"0x10ED43C718714eb63d5aA57B78B54704E256024E","value":{"type":"BigNumber","hex":"0x00"},"data":"0x38ed173900000000000000000000000000000000000000000000000000079a5193d1c000000000000000000000000000000000000000000000099488d3347502873081c000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000002a9bd2f03ec7b0ef1e70828dc3294b620f63c8010000000000000000000000000000000000000000000000000000017c8e4c0b6a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c0000000000000000000000005229c842de6dbcd0d4f4fdebb274a41e8a89bf12","chainId":56,"v":147,"r":"0xfcd84e2eb8af8cc6444106232d159f43d56d4fb3898203235728e62e27ec2ddf","s":"0x1b9f8c6b2d627e39e83a3f29214599e172849354530b66980d92544352986a69","from":"0x2A9BD2f03EC7b0EF1E70828DC3294B620f63C801","hash":"0xaf4983cd04ecbad059ec096c41cf1cff5c94b80bc2eacbf404ae0e3e87eb83ee","type":null,"confirmations":0}, receipt={"to":"0x10ED43C718714eb63d5aA57B78B54704E256024E","from":"0x2A9BD2f03EC7b0EF1E70828DC3294B620f63C801","contractAddress":null,"transactionIndex":262,"gasUsed":{"type":"BigNumber","hex":"0x7b20"},"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","blockHash":"0x59997780cf8ab71910e3fb84ba8029b641172d6e4f623c59d463d3b0a7ad2b30","transactionHash":"0xaf4983cd04ecbad059ec096c41cf1cff5c94b80bc2eacbf404ae0e3e87eb83ee","logs":[],"blockNumber":11851432,"confirmations":1,"cumulativeGasUsed":{"type":"BigNumber","hex":"0x01bef732"},"status":0,"type":0,"byzantium":true}, code=CALL_EXCEPTION, version=providers/5.4.5)
EG