https://github.com/celer-network/layer2-finance-contracts
Contracts for the Layer 2 Finance DeFi aggregator, powered by optimistic rollup.
https://github.com/celer-network/layer2-finance-contracts
blockchain defi ethereum layer-2
Last synced: 18 days ago
JSON representation
Contracts for the Layer 2 Finance DeFi aggregator, powered by optimistic rollup.
- Host: GitHub
- URL: https://github.com/celer-network/layer2-finance-contracts
- Owner: celer-network
- License: mit
- Created: 2021-02-11T00:07:55.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-10-11T06:45:51.000Z (over 4 years ago)
- Last Synced: 2023-04-05T09:02:11.882Z (almost 3 years ago)
- Topics: blockchain, defi, ethereum, layer-2
- Language: Solidity
- Homepage:
- Size: 21.4 MB
- Stars: 46
- Watchers: 18
- Forks: 18
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Audit: audit/Smart Contract Security Audit Report - Layer2 Finance.pdf
Awesome Lists containing this project
README
# Layer 2 Finance Contracts
Contracts for the Layer 2 Finance DeFi aggregator, powered by optimistic rollup.
### Run unit tests
```sh
yarn test
```
### Benchmark gas cost
```sh
yarn report-gas:benchmark
yarn report-gas:summary
```
Check `reports/gas_usage`.
### Update contract sizes
```sh
yarn size-contracts
```
Check `reports/contract_sizes.txt`.
### Deployment
1. In the project root directory, update `.env`. Example values are in `.env.template`.
2. Run deployment commands:
```sh
hardhat deploy --network --tags
```
3. To verify on Etherscan using Hardhat, try:
```sh
hardhat etherscan-verify --network
```
4. To verify on Etherscan using [solt](https://github.com/hjubb/solt/blob/main/README.md), run:
```sh
source scripts/solt.sh
run_solt_write()
```
Then try:
```sh
solt verify --license 3 --network solc-input-.json
```
If the second step fails, go to Etherscan and manually verify using the standard JSON input files.
5. (Not recommended, does not work with ABIEncoderV2) To flatten and manually verify on Etherscan:
First, flatten the contract to verify:
```sh
hardhat flatten > flattened.out
```
Edit `flattened.out` to remove the duplicate `SPDX-License-Identifier` lines and submit to Etherscan.