Error: cannot estimate gas; transaction may fail or may require manual gas limit (error={"code":-32000}, method="call", transaction={"to":"0x1Ee38d535d541c55C9dae27B12edf090C608E6Fb","data":"0x252dba4200000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000001ee38d535d541c55c9dae27b12edf090c608e6fb000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000040f28c97d00000000000000000000000000000000000000000000000000000000000000000000000000000000ca143ce32fe78f1f7019d7d551a6402fc5350c730000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002406f2bf620000000000000000000000007130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c00000000000000000000000000000000000000000000000000000000","accessList":null}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.4.5)
at e.value (index.ts:225)
at e.value (index.ts:237)
at S (json-rpc-provider.ts:80)
at r. (json-rpc-provider.ts:555)
at c (runtime.js:63)
at Generator._invoke (runtime.js:294)
at Generator.throw (runtime.js:119)
at s (3.55c62e9c.chunk.js:2)
at c (runtime.js:63)
at Generator._invoke (runtime.js:294)
at Generator.throw (runtime.js:119)
at s (3.55c62e9c.chunk.js:2)
Sep 22, 2021, 12:48 AM
did anyone suffered something like this?
Sep 22, 2021, 12:48 AM
Gas limit reached
Well not a gas Gas limit.
In the call function you used increase the gas
In the call function you used increase the gas
Sep 22, 2021, 2:54 AM
where necessarily?
i'm working with a fork of viperswap
Sep 22, 2021, 3:28 AM
It's somewhere in your function
Sep 22, 2021, 3:28 AM
in the trustwallet i get the error from
if (!successfulEstimation) {
const errorCalls = estimatedCalls.filter((call): call is FailedCall => 'error' in call)
if (errorCalls.length > 0) throw errorCalls[errorCalls.length - 1].error
throw new Error('Unexpected error. Please contact support: none of the calls threw an error')
}
const errorCalls = estimatedCalls.filter((call): call is FailedCall => 'error' in call)
if (errorCalls.length > 0) throw errorCalls[errorCalls.length - 1].error
throw new Error('Unexpected error. Please contact support: none of the calls threw an error')
}
this function
Sep 22, 2021, 3:29 AM
Some address.call{value:some value, gas : this Gas}("")
Increase this Gas to a Higher amount
Sep 22, 2021, 3:31 AM
i'm calling multicall function
and the error says that
Failed to fetch multicall chunk
Sep 22, 2021, 3:31 AM
Bro it's not a success
This is not where the error is
Sep 22, 2021, 3:32 AM
the multicall is calling an array of address
0: {address: '0x16b9a82891338f9bA80E2D6970FddA79D1eb0daE', callData: '0x0902f1ac'}
1: {address: '0x2354ef4DF11afacb85a5C7f98B624072ECcddbB1', callData: '0x0902f1ac'}
2: {address: '0x41263cba59eb80dc200f3e2544eda4ed6a90e76c', callData: '0x0f28c97d'}
3: {address: '0x58F876857a02D6762E0101bb5C46A8c1ED44Dc16', callData: '0x0902f1ac'}
4: {address: '0x66FDB2eCCfB58cF098eaa419e5EfDe841368e489', callData: '0x0902f1ac'}
5: {address: '0x7EFaEf62fDdCCa950418312c6C91Aef321375A00', callData: '0x0902f1ac'}
6: {address: '0x7e826c0110Fbc47928Eed350616bA5Ed9000D527', callData: '0x0902f1ac'}
7: {address: '0xD707aa77252C2f5ee3Fa89E09482DdF526018811', callData: '0x0902f1ac'}
8: {address: '0xEc6557348085Aa57C72514D67070dC863C0a5A8c', callData: '0x0902f1ac'}
9: {address: '0xaD245c3E05530E0DF10E974a1313103E7768225e', callData: '0x0902f1ac'}
10: {address: '0xadBba1EF326A33FDB754f14e62A96D5278b942Bd', callData: '0x0902f1ac'}
11: {address: '0xb33623C45D031Cf2DAb45CAb8727379aA6aDB1f6', callData: '0x0902f1ac'}
12: {address: '0xc7c3cCCE4FA25700fD5574DA7E200ae28BBd36A3', callData: '0x0902f1ac'}
13: {address: '0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73', callData: '0x06f2bf62000000000000000000000000e9e7cea3dedca5984780bafc599bd69add087d56'}
14: {address: '0xd99c7F6C65857AC913a8f880A4cb84032AB2FC5b', callData: '0x0902f1ac'}
15: {address: '0xe200A1F168e49dA5754f3Ed5713c8b8377cB4738', callData: '0x0902f1ac'}
16: {address: '0xf6f5CE9a91Dd4FAe2d2eD92E25F2A4dc8564F174', callData: '0x0902f1ac'}
length: 17
1: {address: '0x2354ef4DF11afacb85a5C7f98B624072ECcddbB1', callData: '0x0902f1ac'}
2: {address: '0x41263cba59eb80dc200f3e2544eda4ed6a90e76c', callData: '0x0f28c97d'}
3: {address: '0x58F876857a02D6762E0101bb5C46A8c1ED44Dc16', callData: '0x0902f1ac'}
4: {address: '0x66FDB2eCCfB58cF098eaa419e5EfDe841368e489', callData: '0x0902f1ac'}
5: {address: '0x7EFaEf62fDdCCa950418312c6C91Aef321375A00', callData: '0x0902f1ac'}
6: {address: '0x7e826c0110Fbc47928Eed350616bA5Ed9000D527', callData: '0x0902f1ac'}
7: {address: '0xD707aa77252C2f5ee3Fa89E09482DdF526018811', callData: '0x0902f1ac'}
8: {address: '0xEc6557348085Aa57C72514D67070dC863C0a5A8c', callData: '0x0902f1ac'}
9: {address: '0xaD245c3E05530E0DF10E974a1313103E7768225e', callData: '0x0902f1ac'}
10: {address: '0xadBba1EF326A33FDB754f14e62A96D5278b942Bd', callData: '0x0902f1ac'}
11: {address: '0xb33623C45D031Cf2DAb45CAb8727379aA6aDB1f6', callData: '0x0902f1ac'}
12: {address: '0xc7c3cCCE4FA25700fD5574DA7E200ae28BBd36A3', callData: '0x0902f1ac'}
13: {address: '0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73', callData: '0x06f2bf62000000000000000000000000e9e7cea3dedca5984780bafc599bd69add087d56'}
14: {address: '0xd99c7F6C65857AC913a8f880A4cb84032AB2FC5b', callData: '0x0902f1ac'}
15: {address: '0xe200A1F168e49dA5754f3Ed5713c8b8377cB4738', callData: '0x0902f1ac'}
16: {address: '0xf6f5CE9a91Dd4FAe2d2eD92E25F2A4dc8564F174', callData: '0x0902f1ac'}
length: 17
yeah i know this isn't success
Sep 22, 2021, 3:32 AM
Bro
Sep 22, 2021, 3:33 AM
the function says !successull
Sep 22, 2021, 3:33 AM
It's because
Of the limit of transactions in every block
Sep 22, 2021, 3:33 AM
how do i increase this, do you know?
Sep 22, 2021, 3:33 AM
Use gasleft() to find out the gas you can use to process the multi call
No bro you can't increase that amount
You have to do half on one transaction
And the other half on another transaction
Sep 22, 2021, 3:34 AM
lol i don't even know where to call this
Sep 22, 2021, 3:35 AM
Put these address in an arrays
Sep 22, 2021, 3:35 AM
once i'm working with an AMM fork
Sep 22, 2021, 3:35 AM
Call this inside a function
Ohh
Sep 22, 2021, 3:35 AM
it's a fork of viperswap
they kept on ethereum chain
and i refactored to bsc
Sep 22, 2021, 3:36 AM
Ohh
Sep 22, 2021, 3:36 AM
if you where willing to share, please
Sep 22, 2021, 3:36 AM
I have a better idea
Ok
Just put all address to an array
Sep 22, 2021, 3:36 AM
it's already on an array
Sep 22, 2021, 3:37 AM
On each transaction
Sep 22, 2021, 3:37 AM
the array is the token list
Sep 22, 2021, 3:37 AM
Track the index of that token
And save it inside the contract
Sep 22, 2021, 3:37 AM
i'm not working with a contract
i'm working with an AMM
viperswap to be more specific
Sep 22, 2021, 3:38 AM
And on the next transaction use it to process the next set of address
Ohh
Bro
Or
On some function
There will be a value of
Sep 22, 2021, 3:39 AM
i really dunno where this function is
Sep 22, 2021, 3:39 AM
32000
Sep 22, 2021, 3:39 AM
i guess that it's on the swap file
Sep 22, 2021, 3:39 AM
Yes
Maybe
Sep 22, 2021, 3:40 AM
did you ever worked with AMM before?
forking an AMM
Sep 22, 2021, 3:40 AM
No
Ohh
Increase that
Sep 22, 2021, 3:41 AM
the gas are estimated
Sep 22, 2021, 3:42 AM