In this example when instantiating a new contract with web3 they use
contract = Contract.at(address)

Does this additionally require
writing :
const contract = new web3.eth.Contract(abi, address)

Or can this:
contract = Contract.at(address)

Be used instead of:

const contract = new web3.eth.Contract(abi, address)

Jul 27, 2021, 4:20 PM
If someone could help with this that would be great: I want to invoke the swapExactEthForTokens from Uniswap via web3 what am I doing wrong :/
If someone would let it to his/her heart to help a noob this would be greatly appreciated
Jul 27, 2021, 5:21 PM
i believe its UNI Router you want, not factory
factory is for launching new pairs + their LP tokens
Jul 27, 2021, 5:23 PM
Right πŸ€¦β€β™‚οΈπŸ€¦β€β™‚οΈπŸ€¦β€β™‚οΈ thank you very much
I believe that there are however more errorsπŸ™ˆ Can I leave out the integer parameter? for it to work and is it okay to pass in the path like this?
May someone please tell me how to provide the parameters in a correct way for this uniswap function ?
Thanks a lot πŸ™
Thanks that’s really helpful, I may need a second to understand it 😁
πŸ‘πŸ‘
Jul 27, 2021, 5:45 PM

Β© 2024 Draquery.com All rights reserved.