Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.
/ solarray Public archive
forked from evmcheb/solarray

A blazing-fast helper library for convenient Solidity dynamic arrays

Notifications You must be signed in to change notification settings

sablier-labs/solarray

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

solarray ☀️

Wish Solidity had more concise array initialisation?

Solarray is a blazing-fast helper library for convenient Solidity dynamic arrays. Useful for writing foundry test cases that involve arrays.

Usage

uint8[] memory nums = Solarray.uint8s(1, 2, 3);
address[] memory tokens = Solarray.addresses(address(0), address(1));

Supports 1-8 arguments for most of the common types.

Installation

forge install evmcheb/solarray

Usage

import {Solarray} from "solarray/Solarray.sol";

Adding new types

If you want to include a new type, you can use the generator.py script that I used to make the helper library.

About

A blazing-fast helper library for convenient Solidity dynamic arrays

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 97.5%
  • Python 2.5%