Skip to content

Commit

Permalink
Merge pull request #2 from ProjectOpenSea/dan/2023/10/add-1.6-specifi…
Browse files Browse the repository at this point in the history
…c-readme

add a 1.6 specific readme
  • Loading branch information
DJViau authored Oct 23, 2023
2 parents 64f9ed9 + eb90168 commit fc90605
Showing 1 changed file with 13 additions and 59 deletions.
72 changes: 13 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,20 @@
## Foundry
## Seaport 1.6 Development Repo

**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.**
Welcome to the home of Seaport 1.6 development. For the most part, it's safe to treat this repo like you'd treat [Seaport](https://github.com/ProjectOpenSea/seaport). The documentation found there will substantialy serve for this repo.

Foundry consists of:
### Structure

- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools).
- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network.
- **Chisel**: Fast, utilitarian, and verbose solidity REPL.
The [`./src`](./src) directory is broken up into [`/core`](./src/core), [`/main`](./src/main), [`/sol`](./src/sol), and [`/types`](./src/types), which closely correspond to the [seaport-core](https://github.com/ProjectOpenSea/seaport-core), ["main"](https://github.com/ProjectOpenSea/seaport), [seaport-sol](https://github.com/ProjectOpenSea/seaport-sol), and [seaport-types](https://github.com/ProjectOpenSea/seaport-types) repos, respectively.

## Documentation
The remappings in the [foundry.toml](./foundry.toml) file are configured to use the same import style found in the production repos (e.g. `from "seaport-types/src/..."`), but instead of pointing to a dependency in `./lib`, they point to some portion of `./src`. The idea is to duplicate the experience of working in [Seaport](https://github.com/ProjectOpenSea/seaport), but without the headache of keeping cross-repo changes synced. The tradeoff is that comile times will be longer, but the intial experience of working across multiple repos and fighting git submodules strongly suggested that this approach is preferable.

https://book.getfoundry.sh/
When 1.6 is ready, we'll create 1.6 branches on all of the seaport repos and move the changes over from this repo to those repos.

## Usage
### Differences between this repo and the production repos

### Build

```shell
$ forge build
```

### Test

```shell
$ forge test
```

### Format

```shell
$ forge fmt
```

### Gas Snapshots

```shell
$ forge snapshot
```

### Anvil

```shell
$ anvil
```

### Deploy

```shell
$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>
```

### Cast

```shell
$ cast <subcommand>
```

### Help

```shell
$ forge --help
$ anvil --help
$ cast --help
```
- This repo has the `authorizeOrder` interface added to zones.
- This repo uses 0.8.21 instead of 0.8.17.
- Some files that appear in multiple repos, such as the [Transfer](https://github.com/ProjectOpenSea/seaport-core/blob/main/src/helpers/TransferHelper.sol) [Helper](https://github.com/ProjectOpenSea/seaport/blob/main/contracts/helpers/TransferHelper.sol) have been removed or modified to inherit from a single source of truth.
- Some files were lightly jiggled around internally to avoid yul stack too deep errors during the optimized build.
- The Hardhat tests are gone. If we need to add them back, we can.
- Styling is now handled with `forge fmt` instead of prettier. [The `forge fmt` bug affecting functions that return functions](https://github.com/foundry-rs/foundry/issues/4080) still exists, but it's possible to work around it, which this repo now does. It's recommended to handle the issue with `// forgefmt: disable-start` and `// forgefmt: disable-end` until the issue is fixed.

0 comments on commit fc90605

Please sign in to comment.