Skip to content
/ miller Public
generated from dgma/sol-starter

Simple stateless contract to distribute tokens to multiple accounts

License

Notifications You must be signed in to change notification settings

dgma/miller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Miller

Simple stateless contract to distribute tokens to multiple accounts.

Features

  • Stateless & does not hold any token
  • Immutable
  • Distribute ETH to list of addresses
    • fix amount for each address
    • uniq amount for each address
  • Distribute any ERC20 to list of addresses
    • fix amount for each address
    • uniq amount for each address

Tools

  • Foundry for unit testing
  • Hardhat for JS integration tests & deployment
  • hardhat-sol-bundler for declarative deployments and upgrades
  • linters, code formatter, pre-commit and pre-push hooks
  • Makefile & Docker dev container for convenient and safe development
  • Custom github action and quality gate workflow for flexible CI strategy implementation

Requirements

  • Git
    • You'll know you've done it right if you can run git --version
  • Node.js
  • Optional (Development). Foundry / Foundryup
    • This will install forge, cast, and anvil
    • You can test you've installed them right by running forge --version and get an output like: forge 0.2.0 (f016135 2022-07-04T00:15:02.930499Z)
    • To get the latest of each, just run foundryup
  • Optional (Virtualization). Docker
    • You'll need to run docker if you want to use dev container and safely play with smartcontracts & scripts

note: For windows os you'll need to install make. For instance via choco: sh choco install make

Installation

Development:

make

Deployment:

make install-ci

Modify .env file

Configuration

  • All commands/aliases are declared in the Makefile.
  • use forge as solidity formatter in your IDE settings
{
  "solidity.formatter": "forge",
  "solidity.packageDefaultDependenciesContractsDirectory": "src",
  "solidity.packageDefaultDependenciesDirectory": ["node_modules", "lib"],
  "solidity.remappings": [
    "@std=lib/forge-std/src/",
    "forge-std/=lib/forge-std/src/",
    "@openzeppelin/=node_modules/@openzeppelin/",
    "src=src/"
  ],
  "solidity.defaultCompiler": "localNodeModule",
  "[solidity]": {
    "editor.defaultFormatter": "JuanBlanco.solidity"
  }
}

Contributing

Contributions are always welcome! Open a PR or an issue!

Resources