Skip to content

onflow/flow-sol-utils

flow-sol-utils — Solidity Utility Contracts for Flow EVM

License Release Discord Built on Flow Foundry

Overview

This repository contains a collection of Solidity contracts uniquely useful to building on EVM on Flow. You'll find libraries, interface and abstract contracts, as well as contract implementations you may find useful in your own projects.

Contracts

  • WFLOW — the equivalent of WETH on Ethereum, a wrapped version of the FLOW token.
    • Deployed to 0xd3bF53DAC106A0290B0483EcBC89d40FcC961f3e on Flow Testnet and Mainnet.
  • CadenceArchUtils — a library of utility functions for working with Cadence Arch precompiles.
  • CadenceRandomConsumer — a contract that assists in implementing secure onchain randomness, intended to make commit-reveal schemes easier to incorporate into your own projects.
  • Xorshift128plus — an example pseudo-random number generator contract, helping you generate unique random numbers from onchain random sources.

Installation

Foundry

To install these contracts using Foundry:

forge install onflow/flow-sol-utils

Hardhat

To install these contracts using Hardhat:

npm install @onflow/flow-sol-utils

About Flow

This repo is part of the Flow network, a Layer 1 blockchain built for consumer applications, AI Agents, and DeFi at scale.