Skip to content

Lesson 9: testFulfillrandomwordsPicksAWinnerResetsAndSendsMoney fails with InsufficientBalance() #2951

Answered by KMean
SquilliamX asked this question in Q&A
Discussion options

You must be logged in to vote

is this a typo?

int256 public MOCK_WEI_PER_UNIT_LINK = 4_15; // link to eth price in wei

If you use 4_15 (415) instead of 4e15, the calculated payment will be scaled down incorrectly by a factor of 10^13, leading to unrealistic results when determining the required LINK amount for transactions.

Replies: 3 comments 18 replies

Comment options

You must be logged in to vote
1 reply
@SquilliamX
Comment options

Comment options

You must be logged in to vote
1 reply
@EngrPips
Comment options

Comment options

You must be logged in to vote
16 replies
@SquilliamX
Comment options

@EngrPips
Comment options

@SquilliamX
Comment options

@KMean
Comment options

Answer selected by SquilliamX
@SquilliamX
Comment options

@KMean
Comment options

@EngrPips
Comment options

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