Skip to content

Commit

Permalink
Merge pull request #5 from yearn/deployer
Browse files Browse the repository at this point in the history
chore: test deployer
  • Loading branch information
Schlagonia authored Apr 25, 2024
2 parents 6634dca + af1abcb commit dbc8a17
Show file tree
Hide file tree
Showing 10 changed files with 482 additions and 226 deletions.
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

0 comments on commit dbc8a17

Please sign in to comment.