Skip to content

Lesson 7: Error = Tx dropped without known replacement (test_can_pick_winner) #485

Answered by cromewar
brownandrew1390 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @brownandrew1390 I tried to reproduce the error but I couldn't. which network are you using for the integration test?, also it seems to be a problem with your getEntranceFee() function, it should be something like this:

 function getEntranceFee() public view returns (uint256) {
        (, int256 price, , , ) = ethUsdPriceFeed.latestRoundData();
        // set entrance fee to $50
        // Eth/Usd conversion has 8 decimals so in order to make it 18 (wei standard) it's necessary to multiply the price.
        uint256 adjustedPrice = uint256(price) * (10**10); //18 decimals
        uint256 costToEnter = (usdEntryFee * 10**18) / adjustedPrice;
        return costToEnter;
    }

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@brownandrew1390
Comment options

@cromewar
Comment options

@koniq
Comment options

Answer selected by cromewar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants