New answers tagged

0

When you make a swap, you're likely to get a little less than the expected amount ( if other people sell/buy while your tx is being processed the price will be different that the one calculated by getAmountsOut(), that's called slippage, you probably already heard the word). If you're doing this as a test project i suggest setting minAmountOut to 0, if you'...


1

It is a typo in your code: numberslist.length


0

Being on etherscan absolutely doesnt mean the token isnt a scam (actually you can't really not be on etherscan as long as you've deployed your token on mainnet). In that case, the contract code is not verified, which doesnt allow us to check if its a scam or not, but it appears people can indeed sell the token ( https://etherscan.io/token/...


0

The problem is quite clear with the wss://mainnet.infura.io/ws/v3/<code> you are accessing Ethereum mainnet. The pancake contracts are on the Bsc network. They provide some endpoints you could use in their documentation.


0

You didn't set Producer, but checking: require (Producer == msg.sender); Obviously Producer not equal to msg.sender. And Solidity reverting it. It is better to using require with error messages like: require (Producer == msg.sender, "You are not the Producer!"); So you can see where is the error.


0

If statments must be inside of a function if you want to avoid errors.


Top 50 recent answers are included