vrf-solidity icon indicating copy to clipboard operation
vrf-solidity copied to clipboard

updated VRF library to solidity 0.8.x

Open tani404 opened this issue 5 months ago • 0 comments

Description:

This pull request updates the VRF Solidity library and its dependencies to be compatible with Solidity version 0.8.x.

Changes made:

  1. Updated pragma solidity statements in:

    • VRF.sol -> ^0.8.0
    • Migrations.sol -> ^0.8.0
    • EllipticCurve.sol (from elliptic-curve-solidity) -> ^ 0.8.0
  2. Modified unsafe type conversion in VRF.sol to match Solidity 0.8.x strict type rules

  3. Updated Truffle to the latest version (v5.11.5) to support modern compiler.

  4. Truffle config updated to use compiler version ^0.8.0 with optimizer enabled.

  5. Verified compilation:

    • All contracts now compile successfully with Solidity 0.8.x.

Why this is needed:

  • The original library was locked to Solidity <0.7.0, which is outdated and incompatible with most modern projects.

Notes for maintainers:

  • This PR only changes the solidity version and minor type adjustments; logic of the contracts remains unchanged.

tani404 avatar Sep 24 '25 17:09 tani404