- Notifications
You must be signed in to change notification settings - Fork386
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Thanks for such a helpful module! It works like a charm on the mainnet but I am trying to run some testing on either of the testnets and get the same error over and over:
The code that generates it is this one:
Is this due to the module not being implemented for the testnets? Thank you! |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 1 comment 8 replies
-
The common testnets should work fine, but the token contracts you're looking up might not exist there. |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Hey@ErikBjare, could you provide a simple example of the code running on a testnet? Basically, we got the code running fine on mainnet but not at all on any of the testnets. Here is a sample code that runs fine on mainnet:
Same code, on Rinkeby crashes:
The addresses exist on the testnet as follows: So the issue is how the testnets are handled. Also, for the mainnet, you can pass the address as either a string or a checksum address and it resolves it properly while for testnets it requires you to enter a checksum address only. This makes me think that there are 2 separate implementations for mainnet vs testnet. Finally, for the Like I mentioned in the beginning, a sample testnet implementation would be really useful! |
BetaWas this translation helpful?Give feedback.
All reactions
-
Talking about v3: beside token contracts you need pool's contract to get prices. Here is V3Factory@rinkeby https://rinkeby.etherscan.io/address/0x1f98431c8ad98523631ae4a59f267346ea31f984 Its txns are pools that are active at this testnet. You might use them for your test or you can create your own if you need. To see which tokens are pooled and fee value just click "decode input data" inside txn. As far as I can see there is nor V3 eth-dai pool@ropsten neither V3 bat-dai pool@rinkeby at this moment. It's about all the same for v2 btw. |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
@liquid-8 The contract addresses should be the same as the mainnet addresses for Uniswap V3 contracts (so no overriding necessary), see:https://github.com/Uniswap/uniswap-v3-periphery/blob/main/deploys.md But yeah, it's likely that the pools@WhoisAV is trying to use simply don't exist on the testnet (or don't have liquidity, etc). @WhoisAV If you want to run tests/experiment, I recommend you do as we do in our tests and run off a fork of mainnet with ganache. That way, you won't have to deal with some of the differences between testnet and mainnet. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Ok, it all makes sense now! I haven't used Ganache before, do you guys have any documentation to point to to get started and connect it with your module? I'd assume it would somehow be through the provider url? |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
https://www.trufflesuite.com/docs/ganache/quickstart
Yeah, just specify RPC server as provider url. |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1