Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Octopus Release #54

Draft
wants to merge 155 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
155 commits
Select commit Hold shift + click to select a range
70599eb
🚀 add arb params
JaredBorders Aug 15, 2024
75191c5
🚀 add arb deploy scripts
JaredBorders Aug 15, 2024
acaca8a
📚 update interface
JaredBorders Aug 15, 2024
3ced1c1
📚 update title
JaredBorders Aug 19, 2024
1a70930
⚙️ update fmt
JaredBorders Aug 19, 2024
88f49fd
✨ fmt
JaredBorders Aug 19, 2024
f5be42f
👷‍♂️ update zap
JaredBorders Aug 21, 2024
f137886
🗑️ remove old errors
JaredBorders Aug 21, 2024
066547d
🗑️ remove old events
JaredBorders Aug 21, 2024
4eddef2
⚙️ update solc version
JaredBorders Aug 21, 2024
f2de3ae
📚 update README
JaredBorders Aug 21, 2024
905b7cb
🚀 update deployment params
JaredBorders Aug 21, 2024
54f7276
🚀 update script
JaredBorders Aug 21, 2024
85f84f5
⚙️ bump solc version
JaredBorders Aug 21, 2024
5dd49f9
✅ refactor test suite
JaredBorders Aug 21, 2024
7524c99
🗑️ remove old snapshot
JaredBorders Aug 21, 2024
5eb7e94
🗑️ remove old exposed zap
JaredBorders Aug 21, 2024
4804c80
🎭 update mocks
JaredBorders Aug 21, 2024
fd02d3a
🔥 burndown
JaredBorders Aug 23, 2024
ee6db94
👷 Add Natspec custom errors and events
Flocqst Sep 17, 2024
d9287e5
✨ prettify
Flocqst Sep 17, 2024
4a5f617
✅ Add zap, wrap & unwrap tests
Flocqst Sep 17, 2024
dc52e6f
🐙 Synthetix v3 Octopus Support
JaredBorders Sep 17, 2024
ff7476a
👷 add arbitrum & base support
JaredBorders Sep 23, 2024
9e2c41f
✅ increase logic coverage
JaredBorders Sep 24, 2024
bd21d64
🚀 add arbitrum
JaredBorders Sep 24, 2024
41ab9d6
⚙️ update example
JaredBorders Sep 24, 2024
4419661
👷 adjust errors
JaredBorders Sep 24, 2024
b8f5772
🚀 update deploy script
JaredBorders Sep 24, 2024
a201b4e
🗑️ remove fluff
JaredBorders Sep 24, 2024
8f6a344
👷 add interfaces
JaredBorders Sep 24, 2024
fca0de6
👷 update zap logic
JaredBorders Sep 24, 2024
237c183
🐙 Octopus Flashloan & Swap
JaredBorders Sep 24, 2024
f6e76fa
📚 Update README.md
JaredBorders Sep 24, 2024
c200cea
☂️ update ci
JaredBorders Sep 24, 2024
13c0f16
✅ update fork test setup
JaredBorders Sep 24, 2024
5941b2c
☂️ Fix CI
JaredBorders Sep 24, 2024
8e6289f
☂️ update ci
JaredBorders Sep 25, 2024
0f889de
☂️ update ci
JaredBorders Sep 25, 2024
c8f26b3
👷 update interface
JaredBorders Sep 25, 2024
bba6c2d
✅ remove test body
JaredBorders Sep 25, 2024
fbc5a14
👷 refactor unwind
JaredBorders Sep 25, 2024
e80d577
✅ refactor tests
JaredBorders Sep 25, 2024
b25af48
🐙 Unwind Fix
JaredBorders Sep 25, 2024
ddfdbcf
✨ prettify
JaredBorders Sep 25, 2024
5f7c2d9
👷 polish zap
JaredBorders Sep 25, 2024
8998193
🐙 Introduce a Polished Zap and Unwind Implementation
JaredBorders Sep 25, 2024
f1b7182
👷 add arbitrum sepolia support
Flocqst Sep 26, 2024
adac7d8
🚀 implement deploySystem
Flocqst Sep 26, 2024
93fc895
H-2
moss-eth Sep 26, 2024
718ee97
added author
moss-eth Sep 26, 2024
8a9af4d
safe transfer
moss-eth Sep 26, 2024
6039de7
comments
moss-eth Sep 26, 2024
d5323db
fmt
moss-eth Sep 26, 2024
1bcc8b7
M-4 only aave can call exeOp
moss-eth Sep 26, 2024
a51adc9
added reentrancyGuard
moss-eth Sep 27, 2024
912e1a7
M-6
moss-eth Sep 27, 2024
71a08ee
L-1
moss-eth Sep 27, 2024
cf26c2b
🔴 H-2
JaredBorders Sep 27, 2024
11abe5d
🟡 M-3
JaredBorders Sep 27, 2024
b75e3ed
M-4
JaredBorders Sep 27, 2024
79f020a
Merge branch 'audit' into M-5
JaredBorders Sep 27, 2024
6ad1b09
🟡 M-5
JaredBorders Sep 27, 2024
2045bca
🟡 M-6
JaredBorders Sep 27, 2024
640318a
🟢 L-1
JaredBorders Sep 27, 2024
7e4e0e5
👷 add isAuthorized modifier
JaredBorders Sep 27, 2024
fdf33e1
👷 add pull and push errors
JaredBorders Sep 27, 2024
d40af9f
👷 roll back interface changes
JaredBorders Sep 27, 2024
0045ad8
👷 wrap token transfers in try-catch
JaredBorders Sep 27, 2024
1cab309
👷 add OnlyAave error
JaredBorders Sep 27, 2024
8c81ef3
👷 refactor caller check to throw with OnlyAave error
JaredBorders Sep 27, 2024
0d07792
👷 introduce modifiers to prevent reentrancy
JaredBorders Sep 27, 2024
517e0a2
👷 add _unwrapTolerance and _approximateLoanNeeded()
JaredBorders Sep 28, 2024
b572d09
👷 approve the correct address before burning debt
JaredBorders Sep 28, 2024
0ab23e3
fmt
moss-eth Sep 28, 2024
d5ce245
👷 allow caller to specify collateral amount to unwind
JaredBorders Sep 28, 2024
edcb48b
👷 move only aave modifier to the correct function
JaredBorders Sep 28, 2024
4edcd52
⛳️ optimize bytecode
JaredBorders Sep 28, 2024
5e812c2
✅ add tests
JaredBorders Sep 28, 2024
eef82b2
⚙️ update npm scripts
JaredBorders Sep 28, 2024
f3fc6f4
📸 update gas-snapshot/lcov
JaredBorders Sep 28, 2024
9e27e3f
🏅 Audit Response
JaredBorders Sep 28, 2024
a03fd43
👷 Remedy misassignment
JaredBorders Sep 30, 2024
fe87310
📚 fix typo
JaredBorders Sep 30, 2024
7b77087
👷 fix burn issue
JaredBorders Sep 30, 2024
3ebb3dc
👷 add uniswap quoter
JaredBorders Oct 1, 2024
9aba86e
👷 add quoteSwapFor and quoteSwapWith
JaredBorders Oct 1, 2024
7769bb1
🚀 add quoter parameter
JaredBorders Oct 1, 2024
3576683
🚀 update deploy script with quoter
JaredBorders Oct 1, 2024
a948df4
⚙️ add arbitrum sepolia rpc
JaredBorders Oct 1, 2024
5aa0c68
🚀 update deployment procedure
JaredBorders Oct 1, 2024
4cdf247
🗑️ remove unused immutable
JaredBorders Oct 1, 2024
ebcdf3d
🧹 clean up interfaces
JaredBorders Oct 1, 2024
9797ef2
✅ add test interface
JaredBorders Oct 1, 2024
d3ef40a
📚 improve natspec
JaredBorders Oct 1, 2024
3ea57f9
✅ add constants
JaredBorders Oct 1, 2024
8db4be5
✅ refactor bootstrap
JaredBorders Oct 1, 2024
66df3a5
✅ update tests
JaredBorders Oct 1, 2024
5bdfa7f
📸 update lcov/gas-snapshot
JaredBorders Oct 1, 2024
4d60e68
👷‍♂️ Zap Audit Internal Response
JaredBorders Oct 1, 2024
1f76342
m-3.1
moss-eth Oct 3, 2024
a104ab4
Merge branch 'audit' into M-3.1
moss-eth Oct 3, 2024
ab41a3b
removed revert if transfer does not return bool
moss-eth Oct 3, 2024
4034486
reset allowance to 0
moss-eth Oct 3, 2024
262774d
I-1
moss-eth Oct 3, 2024
715fb37
removed accidental changes from L-3
moss-eth Oct 3, 2024
399ad1f
fmt
moss-eth Oct 3, 2024
8f359df
zero address check
moss-eth Oct 3, 2024
274af46
moved synth from `_buy()` to `buy()`
moss-eth Oct 3, 2024
969e9c0
made the immutables that could be constants constants
moss-eth Oct 3, 2024
82621e1
✅ test swap for
JaredBorders Oct 4, 2024
ac89351
📸 updat lcov/gas-snapshot
JaredBorders Oct 4, 2024
1276165
Merge branch 'JaredBorders:audit' into audit
wasp-in-bush Oct 4, 2024
8d78f68
🦄 Test Swap For
JaredBorders Oct 4, 2024
dd8ba6e
🪲 M-3 transfer/trasferFrom return value fix
JaredBorders Oct 8, 2024
d86743f
Merge pull request #39 from JaredBorders/I-2
moss-eth Oct 9, 2024
1a2ba97
Merge pull request #38 from JaredBorders/I-1
moss-eth Oct 9, 2024
497574b
Merge pull request #41 from JaredBorders/I-4
moss-eth Oct 9, 2024
04b249a
Merge remote-tracking branch 'upstream/audit' into I-3
moss-eth Oct 9, 2024
1bbb73e
⛳️ I-3
JaredBorders Oct 9, 2024
031eb79
Revert "removed accidental changes from L-3"
moss-eth Oct 9, 2024
4b1b1d7
Merge pull request #44 from JaredBorders/moss-local-audit-branch
moss-eth Oct 9, 2024
aad0bea
✅ allowance test (#45)
moss-eth Oct 9, 2024
bb84bb4
🗑️ remove assignment
wasp-in-bush Oct 10, 2024
6318d0c
👷add flush
wasp-in-bush Oct 10, 2024
843dd34
✅ add flush tests
wasp-in-bush Oct 10, 2024
c693ae2
📸 update snapshot
wasp-in-bush Oct 10, 2024
924063d
👷 burn returns remaining value (#47)
Flocqst Oct 11, 2024
7f25fa5
👷🏻‍♂️ Final Audit Fix (#48)
moss-eth Oct 15, 2024
09f4ed1
👷🏻‍♂️ Multihop (#50)
moss-eth Oct 15, 2024
660b2f8
✅ fix zap out test
barrasso Oct 16, 2024
35e517e
✨ fix formatting
barrasso Oct 16, 2024
504aaaa
📚 docs (#53)
moss-eth Oct 17, 2024
3639a33
✅ Swap with tests (#52)
moss-eth Oct 17, 2024
d761662
✅ Tolerance rename & multihop tests (#51)
moss-eth Oct 21, 2024
a7e11d4
👷‍♂️ add excess logic to burn()
wasp-in-bush Oct 21, 2024
ce607d8
📸 update lcov/gas-snapshot
wasp-in-bush Oct 21, 2024
53a8d08
⚙️ enable via-ir
wasp-in-bush Oct 21, 2024
bb3cb15
👷‍♂️ add flush and optimize _unwind
wasp-in-bush Oct 21, 2024
d23145a
🚀 update deployment
wasp-in-bush Oct 21, 2024
2fb5e1c
⚙️ update scripts
wasp-in-bush Oct 21, 2024
f00cd7d
📸 update lcov/gas-snapshot
wasp-in-bush Oct 21, 2024
cdd02f7
🏅Audit IOSIRO
JaredBorders Oct 21, 2024
90851bf
⚙️ update .gitignore
wasp-in-bush Oct 22, 2024
d1e7aeb
⚙️ update env example
wasp-in-bush Oct 22, 2024
e2bfdd3
⚙️ update foundy config
wasp-in-bush Oct 22, 2024
9479f69
⚙️ add makefile for deployment
wasp-in-bush Oct 22, 2024
406b585
🚀 update deploy script
wasp-in-bush Oct 22, 2024
96d9fb2
📚 update README
wasp-in-bush Oct 22, 2024
a86de8d
🚀 add deployments
wasp-in-bush Oct 22, 2024
39c2190
🚀 Deploy Octopus
JaredBorders Oct 22, 2024
70d3ea1
📚 update README
wasp-in-bush Oct 22, 2024
356a455
📚 forge doc
moss-eth Oct 22, 2024
c8292c5
👷 Odos integration (#56)
moss-eth Dec 5, 2024
6b2ca51
reverted usdc zap out case
moss-eth Dec 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions .env-example
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
MAINNET_RPC_URL=https://eth-mainnet.g.alchemy.com/v2/KEY
OPTIMISM_RPC_URL=https://opt-mainnet.g.alchemy.com/v2/KEY
BASE_RPC_URL=https://base-mainnet.g.alchemy.com/v2/KEY
GOERLI_RPC_URL=https://eth-goerli.g.alchemy.com/v2/KEY
OPTIMISM_GOERLI_RPC_URL=https://opt-goerli.g.alchemy.com/v2/KEY
BASE_GOERLI_RPC_URL=https://base-goerli.g.alchemy.com/v2/KEY
PRIVATE_KEY=KEY
ETHERSCAN_API_KEY=KEY
OPTIMISM_ETHERSCAN_API_KEY=KEY
BASESCAN_API_KEY=KEY
BASE_RPC=https://base-mainnet.g.alchemy.com/v2/<KEY>
ARBITRUM_RPC=https://arb-mainnet.g.alchemy.com/v2/<KEY>
ARBITRUM_SEPOLIA_RPC=https://arb-sepolia.g.alchemy.com/v2/<KEY>
BASESCAN_API_KEY=<KEY>
ARBISCAN_API_KEY=<KEY>
ARBISCAN_SEPOLIA_API_KEY=<KEY>
PRIVATE_KEY=<KEY>
57 changes: 35 additions & 22 deletions .gas-snapshot
Original file line number Diff line number Diff line change
@@ -1,22 +1,35 @@
Deployment:test_hashed_susdc_name() (gas: 5568)
Deployment:test_sUSDCId_invalid() (gas: 51853)
Deployment:test_sUSDC_address() (gas: 5455)
Deployment:test_spotMarketProxy_zero_address() (gas: 41709)
Deployment:test_susd_zero_address() (gas: 41696)
Deployment:test_usdc_decimals_factor() (gas: 5420)
Deployment:test_usdc_zero_address() (gas: 41637)
Deployment:test_zap_address() (gas: 2356)
ZapIn:test_zap_in() (gas: 463863)
ZapIn:test_zap_in_event() (gas: 461040)
ZapIn:test_zap_in_exceeds_cap() (gas: 457276)
ZapIn:test_zap_in_susdc_approve_fails() (gas: 301777)
ZapIn:test_zap_in_usdc_approve_fails() (gas: 62939)
ZapIn:test_zap_in_usdc_transfer_fails() (gas: 14044)
ZapIn:test_zap_in_zero() (gas: 246817)
ZapOut:test_zap_out() (gas: 465470)
ZapOut:test_zap_out_event() (gas: 463923)
ZapOut:test_zap_out_insufficient_amount() (gas: 55830)
ZapOut:test_zap_out_precision_loss(uint256) (runs: 256, μ: 465998, ~: 465998)
ZapOut:test_zap_out_susd_approve_fails() (gas: 18892)
ZapOut:test_zap_out_susdc_approve_fails() (gas: 312592)
ZapOut:test_zap_out_zero() (gas: 9086)
AaveTest:test_executeOperation_only_aave(address,address,uint256,uint256,bytes) (runs: 256, μ: 4072994, ~: 4072993)
BurnTest:test_burn_arbitrum_sepolia(uint32) (runs: 256, μ: 4021378, ~: 4021378)
BuyTest:test_buy_arbitrum(uint32) (runs: 256, μ: 4712117, ~: 4712117)
BuyTest:test_buy_base(uint32) (runs: 256, μ: 4631652, ~: 4631652)
FlushTest:test_flush(uint32) (runs: 256, μ: 4021401, ~: 4021401)
ReentrancyTest:test_requireStage(uint8) (runs: 256, μ: 17762, ~: 8622)
ReentrancyTest:test_requireStage_throws(uint8,uint256) (runs: 256, μ: 18839, ~: 11503)
ReentrancyTest:test_stage_default() (gas: 3027)
ReentrancyTest:test_stage_enum_level1() (gas: 660)
ReentrancyTest:test_stage_enum_level2() (gas: 706)
ReentrancyTest:test_stage_enum_unset() (gas: 844)
SellTest:test_sell_arbitrum(uint32) (runs: 256, μ: 4884336, ~: 4884336)
SellTest:test_sell_base(uint32) (runs: 256, μ: 4785869, ~: 4785869)
SwapForTest:test_swap_for_multihop_arbitrum() (gas: 4611852)
SwapForTest:test_swap_for_multihop_base() (gas: 4614101)
SwapForTest:test_swap_for_single_arbitrum(uint8) (runs: 256, μ: 4461856, ~: 4461856)
SwapForTest:test_swap_for_single_arbitrum_sepolia() (gas: 4021185)
SwapForTest:test_swap_for_single_base() (gas: 4435614)
SwapWithTest:test_swap_with_arbitrum(uint8) (runs: 256, μ: 4434036, ~: 4434036)
SwapWithTest:test_swap_with_arbitrum_sepolia() (gas: 4021231)
SwapWithTest:test_swap_with_base(uint8) (runs: 256, μ: 4328655, ~: 4328655)
UnwindTest:test_unwind_arbitrum_sepolia() (gas: 4021254)
UnwindTest:test_unwind_is_authorized() (gas: 4091114)
UnwrapTest:test_unwrap_arbitrum(uint32) (runs: 256, μ: 4948844, ~: 4948844)
UnwrapTest:test_unwrap_base(uint32) (runs: 256, μ: 4840687, ~: 4840687)
WithdrawTest:test_withdraw_arbitrum() (gas: 4996101)
WithdrawTest:test_withdraw_base() (gas: 4819562)
WithdrawTest:test_withdraw_is_authorized_arbitrum() (gas: 4089866)
WithdrawTest:test_withdraw_is_authorized_base() (gas: 4089981)
WrapTest:test_wrap_arbitrum(uint32) (runs: 256, μ: 4766711, ~: 4766711)
WrapTest:test_wrap_base(uint32) (runs: 256, μ: 4676382, ~: 4676382)
ZapInTest:test_zap_in_arbitrum(uint32) (runs: 256, μ: 4898567, ~: 4898567)
ZapInTest:test_zap_in_base(uint32) (runs: 256, μ: 4795630, ~: 4795630)
ZapOutTest:test_zap_out_arbitum(uint64) (runs: 256, μ: 4853363, ~: 4853363)
ZapOutTest:test_zap_out_base(uint64) (runs: 256, μ: 4755166, ~: 4755166)
34 changes: 0 additions & 34 deletions .github/workflows/coverage.yml

This file was deleted.

42 changes: 26 additions & 16 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
name: lint

on: [push]
on:
push:
pull_request:
workflow_dispatch:

env:
FOUNDRY_PROFILE: ci
FOUNDRY_PROFILE: ci

jobs:
check:
strategy:
fail-fast: true
check:
strategy:
fail-fast: true

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
name: Foundry project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Lint Check
run: forge fmt --check
- name: Show Forge version
run: |
forge --version

- name: Run Forge fmt
run: |
forge fmt --check
id: fmt
33 changes: 0 additions & 33 deletions .github/workflows/test.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ out/
# Other
.vscode
.idea
.DS-store
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "lib/surl"]
path = lib/surl
url = https://github.com/memester-xyz/surl
104 changes: 66 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Zap
# Zap Flashloan Utility

[![Github Actions][gha-badge]][gha]
[![Foundry][foundry-badge]][foundry]
[![Github Actions][gha-badge]][gha]
[![Foundry][foundry-badge]][foundry]
[![License: GPL-3.0][license-badge]][license]

[gha]: https://github.com/JaredBorders/Zap/actions
Expand All @@ -11,54 +11,82 @@
[license]: https://opensource.org/license/GPL-3.0/
[license-badge]: https://img.shields.io/badge/GitHub-GPL--3.0-informational

## Contracts
## Overview

> `tree src/`
Zap is a smart contract that facilitates stablecoin "zapping" and Synthetix native collateral unwinding by integrating flash loans from Aave and Odos swaps.

```
src/
├── Zap.sol
├── ZapErrors.sol
├── ZapEvents.sol
└── interfaces
├── IERC20.sol
└── ISpotMarketProxy.sol
```
### What is a **Zap**?

## Tests
> ONLY USDC is supported

1. Follow the [Foundry guide to working on an existing project](https://book.getfoundry.sh/projects/working-on-an-existing-project.html)
USDC <--(spot market)--> sUSDC <--(spot market)--> USDx

2. Build project
### What is **Collateral Unwinding**?

```
npm run compile
```
#### Flashloan Utility Flow

3. Execute tests (requires rpc url(s) to be set in `.env`)
1. **Request Flash Loans (Aave):** Borrow USDC to access liquidity without posting collateral.
2. **Zap into USDx (Synthetix Spot Market):** Use the borrowed funds to zap into USDx.
3. **Burn USDx & Repay Debt (Synthetix Core):** Repay Synthetix debt by burning USDx.
4. **Withdraw and Unwrap Collateral (Synthetix Spot Market):** Withdraw margin (e.g., sETH) and convert it back to underlying assets (e.g., WETH).
5. **Swap (Odos):** Exchange collateral assets (like WETH) for USDC to repay the flash loan.
6. **Flash Loan Repayment (Aave):** The USDC loan, including the premium, is repaid to Aave.
7. **Send Remaining Collateral (Synthetix):** Any surplus collateral is returned to the user.

```
npm run test
```
## Key Features

4. Run specific test
- Zap via Synthetix
- Wrap & Unwrap Collateral via Synthetix
- Buy & Sell via Synthetix
- Unwind Collateral via Synthetix, Aave, and Odos
- Burn Debt via Synthetix
- Withdraw Perp Collateral via Synthetix
- Swap via Odos

```
forge test --fork-url $(grep BASE_RPC_URL .env | cut -d '=' -f2) --match-test TEST_NAME -vvv
```
## Development

## Deployment Addresses
### Build, Test, Report

> See `deployments/` folder
1. **Build the project**

1. Optimism deployments found in `deployments/Optimism.json`
2. Optimism Goerli deployments found in `deployments/OptimismGoerli.json`
3. Base deployments found in `deployments/Base.json`
4. Base Goerli deployments found in `deployments/BaseGoerli.json`
```
forge build
```

## Audits
2. **Run tests**

```
forge test
```

3. **Report Test Coverage**

```
make coverage
```

4. **Report Gas Snapshot**
```
make snapshot
```

## How to Deploy

> See `audits/` folder
- See the `deployments/` folder for Arbitrum and Base deployments.

How to Deploy:

1. Create a `.env` file using `.env-example` as a reference

2. Deploy to Base
```
make deploy_base
```
3. Deploy to Arbitrum
```
make deploy_arbitrum
```

## Audits

1. Internal audits found in `audits/internal/`
2. External audits found in `audits/external/`
- See the `audits/` folder for Audit reports.
3 changes: 3 additions & 0 deletions deployments/Arbitrum.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"Zap": "0xD1F129e0cDd3Cc5c65ea00041623841C3d709F83"
}
3 changes: 3 additions & 0 deletions deployments/Base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"Zap": "0xC9aF789Ae606F69cF8Ed073A04eC92f2354b027d"
}
Empty file removed deployments/BaseGoerli.json
Empty file.
Empty file removed deployments/Optimism.json
Empty file.
Empty file removed deployments/OptimismGoerli.json
Empty file.
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
book/
13 changes: 13 additions & 0 deletions docs/book.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
table {
margin: 0 auto;
border-collapse: collapse;
width: 100%;
}

table td:first-child {
width: 15%;
}

table td:nth-child(2) {
width: 25%;
}
12 changes: 12 additions & 0 deletions docs/book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[book]
src = "src"
title = ""

[output.html]
no-section-label = true
additional-js = ["solidity.min.js"]
additional-css = ["book.css"]
git-repository-url = "https://github.com/moss-eth/zap"

[output.html.fold]
enable = true
Loading
Loading