generated from AngleProtocol/boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
322 additions
and
1,967 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,101 +1,75 @@ | ||
# <img src="logo.svg" alt="Merkl Contracts" height="40px"> Merkl Contracts | ||
|
||
[](https://github.com/AngleProtocol/merkl-contracts/actions) | ||
[](https://codecov.io/gh/AngleProtocol/merkl-contracts) | ||
|
||
This repository contains the smart contracts of the Merkl product developed by Angle. | ||
This repository contains the smart contracts of Merkl. | ||
|
||
It basically contains two contracts: | ||
|
||
- `DistributionCreator`: to which DAOs and individuals can deposit their rewards to incentivize a pool | ||
- `DistributionCreator`: to which DAOs and individuals can deposit their rewards to incentivize onchain actions | ||
- `Distributor`: the contract where users can claim their rewards | ||
|
||
You can learn more about the Merkl system in the [documentation](https://docs.angle.money/side-products/merkl). | ||
You can learn more about the Merkl system in the [documentation](https://docs.merkl.xyz). | ||
|
||
## Setup | ||
|
||
### Install packages | ||
|
||
You can install all dependencies by running | ||
|
||
```bash | ||
yarn | ||
forge i | ||
``` | ||
@@ -25,7 +25,7 @@ forge i | ||
|
||
### Create `.env` file | ||
|
||
In order to interact with non local networks, you must create an `.env` that has, for all supported networks (Ethereum, Polygon and Arbitrum): | ||
In order to interact with non local networks, you must create an `.env` that has, for all supported networks: | ||
|
||
- `MNEMONIC` | ||
- `ETH_NODE_URI` | ||
- `ETHERSCAN_API_KEY` | ||
|
||
You can copy paste the `.env.example` file into `.env` and fill with your keys/RPCs. | ||
@@ -84,18 +84,52 @@ forge update | ||
|
||
Warning: always keep your confidential information safe. | ||
|
||
### Tests | ||
|
||
Contracts in this repo rely on Hardhat tests. You can run tests as follows: | ||
## Verifying | ||
|
||
```bash | ||
# Whole test suite | ||
yarn hardhat:test | ||
Blast: | ||
|
||
# Only one file | ||
yarn hardhat:test ./test/hardhat/distributor/distributor.test.ts | ||
``` | ||
|
||
You can also check the coverage of the tests with: | ||
|
||
```bash | ||
yarn hardhat:coverage | ||
yarn etherscan blast --api-url https://api.blastscan.io --solc-input --license BUSL-1.1 | ||
``` | ||
|
||
### Deploying | ||
Mantle: | ||
|
||
```bash | ||
yarn deploy mainnet | ||
``` | ||
yarn etherscan mantle --api-url https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan/api --solc-input --license BUSL-1.1 | ||
``` | ||
|
||
## Foundry Installation | ||
Mode: | ||
|
||
```bash | ||
curl -L https://foundry.paradigm.xyz | bash | ||
``` | ||
yarn etherscan mode --api-url https://api.routescan.io/v2/network/mainnet/evm/34443/etherscan/api --solc-input --license BUSL-1.1 | ||
``` | ||
|
||
source /root/.zshrc | ||
# or, if you're under bash: source /root/.bashrc | ||
ImmutableZKEVM: | ||
|
||
foundryup | ||
``` | ||
yarn etherscan immutablezkevm --api-url https://explorer.immutable.com/api --solc-input --license BUSL-1.1 | ||
``` | ||
|
||
To install the standard library: | ||
Scroll: | ||
|
||
```bash | ||
forge install foundry-rs/forge-std | ||
``` | ||
yarn etherscan scroll --api-url https://api.scrollscan.com --solc-input --license BUSL-1.1 | ||
``` | ||
|
||
To update libraries: | ||
Gnosis: | ||
|
||
```bash | ||
forge update | ||
``` | ||
yarn etherscan gnosis --api-url https://api.gnosisscan.io --solc-input --license BUSL-1.1 | ||
``` | ||
|
||
## Verifying | ||
Linea: | ||
|
||
Blast: `yarn etherscan blast --api-url https://api.blastscan.io --solc-input --license BUSL-1.1` | ||
Mantle: `yarn etherscan mantle --api-url https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan/api --solc-input --license BUSL-1.1` | ||
Mode: `yarn etherscan mode --api-url https://api.routescan.io/v2/network/mainnet/evm/34443/etherscan/api --solc-input --license BUSL-1.1` | ||
ImmutableZKEVM: `yarn etherscan immutablezkevm --api-url https://explorer.immutable.com/api --solc-input --license BUSL-1.1` | ||
Scroll:`yarn etherscan scroll --api-url https://api.scrollscan.com --solc-input --license BUSL-1.1` | ||
Gnosis:`yarn etherscan gnosis --api-url https://api.gnosisscan.io --solc-input --license BUSL-1.1` | ||
Linea:`yarn etherscan linea --api-url https://api.lineascan.build --solc-input --license BUSL-1.1` | ||
``` | ||
yarn etherscan linea --api-url https://api.lineascan.build --solc-input --license BUSL-1.1 | ||
``` | ||
|
||
## Audits | ||
|
||
The Merkl smart contracts have been audited by Code4rena, find the audit report [here](https://code4rena.com/reports/2023-06-angle). | ||
|
||
## Media | ||
|
||
Don't hesitate to reach out on [Twitter](https://twitter.com/AngleProtocol) 🐦 | ||
Don't hesitate to reach out on [Twitter](https://x.com/merkl_xyz) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.