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

chore: test deployer #5

Merged
merged 3 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ inspect :; forge inspect ${contract} storage-layout --pretty

FORK_URL := ${ETH_RPC_URL}

test :; forge test -vv --fork-url ${FORK_URL}
tests :; forge test -vv --fork-url ${FORK_URL}
trace :; forge test -vvv --fork-url ${FORK_URL}
gas :; forge test --fork-url ${FORK_URL} --gas-report
test-contract :; forge test -vv --match-contract $(contract) --fork-url ${FORK_URL}
Expand Down
27 changes: 22 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
# Yearn Stake the Bridge

![alt text](image.png)
![alt text](setup.png)

# Structure

## [L1 Deployer](https://github.com/yearn/yearn-stb/blob/master/src/L1Deployer.sol)

- Allows anyone to add a new asset to any valid Rollup
- Allows for a Rollup Admin to specify its specific EScrow Manager
- Allows for a Rollup Admin to add custom vaults for a specific asset.
- Deploys vaults and does full setup for any new assets added.

## [L2 Deployer](https://github.com/yearn/yearn-stb/blob/master/src/L2Deployer.sol)
- Receives message from L1 Deployer when a new escrow was created for a new asset.
- Deploys L2 Token, Escrow and convertor and completes setup
- Owned by L2 Admin

## [L1 Yearn Escrow](https://github.com/yearn/yearn-stb/blob/master/src/L1YearnEscrow.sol)

- Yearn specific L1 Escrow contract that handles bridge txns
- Will deposit funds into a Yearn vault over any set `minimumBuffer`
- If withdraws cannot be processed it will send shares to users when bridging back to L1.
- Rollups Admin can update the `minimumBuffer` as well as the vault it uses.


## Documentation
Expand All @@ -21,19 +32,25 @@ https://book.getfoundry.sh/
### Build

```shell
$ forge build
$ make build
```

### Test

```shell
$ forge test
$ make tests
```

### Trace

```shell
$ make trace
```

### Gas Snapshots

```shell
$ forge snapshot
$ make snapshot
```

### Cast
Expand Down
Binary file added setup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading