makerdao / multicall

Multicall: Aggregate multiple constant function call results into one
MIT License
851 stars 440 forks source link

HELP - Failed to fetch multicall chunk #14

Closed tpmccallum closed 3 years ago

tpmccallum commented 3 years ago

Hi, I have written an installer that allows Uniswap to be deployed on any Ethereum compatible blockchain.

It works great except for one error line 190 in Uniswap's multicall/updater file

Failed to fetch multicall chunk 
0:
address: "0x1dBED22153ccbd80199D7477A606705463dE1CD8"
callData: "0x4d2301cc000000000000000000000000987652e1c2b3b953354a43171063499dce16dc8f"
1:
address: "0x3ddb118094cAe8407993750a39E10A83DEA0F3eD"
callData: "0x0178b8bf3b868d39384389b1a67e1519e1c2a74478fdecf09c083a1e25730fda5a48241d"

I would love some assistance with this, I am unsure why it does not work. As you will see in my installer I have diligently deployed all of the contracts and have provided significant config.

Any information/assistance would be greatly appreciated.

Many thanks Tim

tpmccallum commented 3 years ago

Screen Shot 2020-09-22 at 4 08 31 pm

MetaMask - RPC Error: Internal JSON-RPC error.

I would love to diagnose this further, please let me know what additional information you require to move this forward.

tpmccallum commented 3 years ago

![Uploading Screen Shot 2020-09-22 at 4.10.14 pm.png…]()

levity commented 3 years ago

Hi Timothy, you're more likely to get a helpful response from the Uniswap team. This doesn't appear to be an issue with multicall itself. Wishing you luck!

DevObs1 commented 3 years ago

@tpmccallum

Hello Timothy, I have the same issue. Did you find a solution to this issue? I will be grateful for your help because I have been stuck on it for 2 days! Thanks

tpmccallum commented 3 years ago

Hi @DevObs1 I did not find a solution to this yet.

Things to check would be params like your chainId i.e. it seems that the front end gets params like chainId from external files like this constants.ts file from additional nodejs packages like @uniswap/sdk

export enum ChainId {
  MAINNET = 1,
  ROPSTEN = 3,
  RINKEBY = 4,
  GÖRLI = 5,
  KOVAN = 42
}

If you are using an Ethereum compatible network which is not one of the networks listed in the constants.ts file then you will probably need to do some unravelling and tweaking to any code that stores/references/hard-codes params such as chainId etc.

Sorry I can't be more helpful, hope this makes sense.

Kind regards Tim

DevObs1 commented 3 years ago

Hello @tpmccallum , I am working on a project in Binance Smart Chain, which uses a fork of uniswap sdk adapted to BSC. Thank you for this info. I will watch them and share with you if I find a solution

Ben-Haslam commented 3 years ago

Hey @tpmccallum,

I am forking the uniswap interface for a new testnet, and am also having this same issue. I have tried changing constants in the node modules like you suggest. Please update here if you fund a solution, I will do the same if I find a solution on my side.

Ben

coinswapapp commented 3 years ago

it is relatively straightforward to solve this issue. we were able to resolve this issue in CoinSwap. Check the returned error parameters etc. For the same smart contract, different compiler (remix/waffle/truffle) all compile in a different way. It is a disaster that the system is not compatible. So the way it is working on uniswap does not mean it will work on your contract if you use a different platform to compile your contract and deploy them (of course, could be challenging to get verified on Etherscan)

Ben-Haslam commented 3 years ago

@coinswapapp what platform did you use to compile the contracts?

coinswapapp commented 3 years ago

do not use truffle or remix. the compiled contract by truffle/remix may not work correctly even if you try to call these methods manually on Etherscan. try wallfe

Ben-Haslam commented 3 years ago

After using waffle to compile all the contracts, I dont have an error concerning Multicall anymore but still do have the error with Metamask:

MetaMask - RPC Error: Internal JSON-RPC error.
code: -32603, message: "Internal JSON-RPC error.", data: {…}}
code: -32603
data: {code: -32000, message: "execution reverted"}
message: "Internal JSON-RPC error."
coinswapapp commented 3 years ago

then it will really depend on what kind of contract you are using or testing. E.g., are you using the exact copy of Uniswap contract or you have modified it.. but at least, it shows that you are on the right track.

johnden commented 2 years ago

@Ben-Haslam Hi,Ben.Have u fix this issue now?I stuck on it too.

Ben-Haslam commented 2 years ago

Unfortunately I never did. Instead I just started building my own interface from the ground up

gsaint12 commented 2 years ago

The problem here from my experience is that multicall smart contract you are using is not the exact match for Binance smart chain. You need to deploy the exact copy of Uniswap multicall contract to Smartchain mainnet or testnet for it to work appropriately.

versedpro commented 2 years ago

The problem here from my experience is that multicall smart contract you are using is not the exact match for Binance smart chain. You need to deploy the exact copy of Uniswap multicall contract to Smartchain mainnet or testnet for it to work appropriately.

Thanks a lot! you saved my day :rocket:

GomezFabio commented 1 year ago

Hi, I had the same problem because I was listing an ERC20 token that has not allowance() and approval() functions. First check one by one that the ERC20 contracts have not been modified. Where possible use templates like OpenZeppelin. I hope this can help you. The multicall contract creates an array of calls and one of them fails when you try to create a pool.

skad0d0 commented 1 year ago

The problem here from my experience is that multicall smart contract you are using is not the exact match for Binance smart chain. You need to deploy the exact copy of Uniswap multicall contract to Smartchain mainnet or testnet for it to work appropriately.

Thanks a lot! you saved my day 🚀

Thanks a lot. I redeployed the multicall contract and change the multicall contract address in my project and now it's working!

kelvin0x commented 1 year ago

this is the address of the multicall that the uniswap team uses to call 0x1F98415757620B543A52E61c46B32eB19261F984

skad0d0 commented 1 year ago

Thanks for your response. Good day and take care.

kelvin0x @.***>于2022年11月16日 周三17:39写道:

this is the address of the multicall that the uniswap team uses to call 0x1F98415757620B543A52E61c46B32eB19261F984

— Reply to this email directly, view it on GitHub https://github.com/makerdao/multicall/issues/14#issuecomment-1316691998, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXFWBJ25YEVPDRHHFDSTBUTWISTVRANCNFSM4RVLS5OQ . You are receiving this because you commented.Message ID: @.***>