Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random Number Generator gets gas uint64 overflow #1

Open
mrandall101 opened this issue Jul 13, 2022 · 2 comments
Open

Random Number Generator gets gas uint64 overflow #1

mrandall101 opened this issue Jul 13, 2022 · 2 comments

Comments

@mrandall101
Copy link

When launching the this performing this:

const randomGeneratorContract = await ethers.getContractAt(randomGeneratorABI, _randomGenerator);

  const fullFillTx = await randomGeneratorContract.fulfillRandomness({
    from: operator.address,
    gasLimit: 900000,
    gasPrice: _gasPrice.mul(2),
  });
  console.log("fullFilled:", ",tx=", fullFillTx?.hash);

gets "gas uint64 overflow".

@mrandall101
Copy link
Author

Any help would be appreciated.

@mrandall101
Copy link
Author

Missed adding what it calls:

/**
* @notice Callback function used by ChainLink's VRF Coordinator
*/
function fulfillRandomness() external {
require(isTruster[msg.sender], "Not truster");

    t1 = seed % 1000000;
    t2 = asciiToInteger(blockhash(block.number - 1)) % 1000000;

    uint256 random = (seed % 100000) * (asciiToInteger(blockhash(block.number - 1)) % 100000);
    randomResult = uint32(100000 + (random % 100000));
    latestLotteryId = IZolaSwapLottery(zolaSwapLottery).viewCurrentLotteryId();

    t3 = block.number;
    t4 = blockhash(block.number);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant