Hey guys,
Is it possible to emulate a buy and a sell on localhost? Without deploying
For example to have locally:
1) factory contract
2) router contract
3) erc20 contract
4) create pair contract
5) add liquidity to pair contract
6) buy token
7) sell token
I googled this stuff, the only thing that I found was forking, but is forking enough for this?
Sep 17, 2021, 1:03 AM
Yeah I think that's all you need
Sep 17, 2021, 1:10 AM
Thanks for the answer.
Hmm is it possible with hardhat only?
I remember I used truffle and ganache, ganache has ui, but theres no ui in hardhat.
I know im missing something
Hmm is it possible with hardhat only?
I remember I used truffle and ganache, ganache has ui, but theres no ui in hardhat.
I know im missing something
Sep 17, 2021, 1:11 AM
Depends on what you need to do
Sep 17, 2021, 1:12 AM
I need to see transactions locally for example
Like in etherscan
Sep 17, 2021, 1:13 AM
ahhh.. if you find a way to have etherscan and poocoin with localhost, ping me
😆
Sep 17, 2021, 1:14 AM
🤦♂️🤦♂️ nvm i thought u know what u talking about
Sep 17, 2021, 1:15 AM
maybe, if you're more clear =)
Sep 17, 2021, 1:16 AM
Wtf didnt u read my first message
Sep 17, 2021, 1:17 AM
lol you ask to emulate buy and sell, so maybe you don't know buy and sell are just a path in a transaction. Yes, it's possible.
Then you make a list of what seems to be an uniswap-fork, there you can test AMM in localhost, buy and sell, yes.
So what's the question?
Then you make a list of what seems to be an uniswap-fork, there you can test AMM in localhost, buy and sell, yes.
So what's the question?
i already answered
Sep 17, 2021, 1:19 AM
Ok 🙏 did you plug ganache gui with hardhat?
Sep 17, 2021, 1:21 AM
you can run tests in hardhat with ganache, but you cannot use ganache ui with hardhat
you can link ganache ui to a truffle project
but you will use ganache local evm
Sep 17, 2021, 1:23 AM
Would be nice if can link ganache ui to hard hat
Sep 17, 2021, 1:23 AM
why you don't use a testnet? :o
Sep 17, 2021, 1:23 AM
I tried but is cumbersome.
I wrote a bot that buys and sells, but I want this locally for faster testing with ui
I wrote a bot that buys and sells, but I want this locally for faster testing with ui
Sep 17, 2021, 1:24 AM
you need it on field, test it on field
Sep 17, 2021, 1:25 AM
On field? What does that mean?
Sep 17, 2021, 1:25 AM
mainnet & testnet
no need to test it locally, or if you need, use hardhat or ganache
but then, you need to fork everything locally
Sep 17, 2021, 1:26 AM
Hmmm, i want another usecase :))
To make transaction and console.log from contract.
Is this possible?
To make transaction and console.log from contract.
Is this possible?
Debugging is a pain in the ass (excuse my french).
I need a way to make transactions locally and console.log from a called function in solidity
I need a way to make transactions locally and console.log from a called function in solidity
Sep 17, 2021, 1:28 AM
I managed to deploy the first two in eth-brownie. 3-7 don’t seem to be too difficult. There was a doc somewhere in uniswap to do it, but can’t remember the link.
Sep 17, 2021, 7:27 AM
Thx
Sep 17, 2021, 7:30 AM
Here it is https://docs.uniswap.org//protocol/V2/guides/smart-contract-integration/quick-start
Sep 17, 2021, 7:35 AM
Interesting
Sep 17, 2021, 7:39 AM