Skip to content

Commit

Permalink
Merge branch 'develop' into mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelmota committed Jul 25, 2023
2 parents a9ba375 + f16d999 commit 7f09718
Show file tree
Hide file tree
Showing 10 changed files with 237 additions and 50 deletions.
44 changes: 29 additions & 15 deletions packages/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,6 @@ docker build -t hop-api .
docker run --rm --name hop-api -p 8000:8000 hop-api
```

## Development

```sh
npm start
```

Available environment variables:

```sh
PORT=8000
IP_RATE_LIMIT_REQ_PER_SEC=100
IP_RATE_LIMIT_WINDOW_MS=1000
RESPONSE_CACHE_DURATION_MS=10000
```

## Endpoints

## GET /v1/quote
Expand Down Expand Up @@ -96,6 +81,35 @@ Example response
}
```

## Development

Install dependencies

```sh
npm install
```

Start server

```sh
npm start
```

Build

```sh
npm run build
```

Available environment variables:

```sh
PORT=8000
IP_RATE_LIMIT_REQ_PER_SEC=100
IP_RATE_LIMIT_WINDOW_MS=1000
RESPONSE_CACHE_DURATION_MS=10000
```

## License

[MIT](LICENSE)
100 changes: 82 additions & 18 deletions packages/api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 22 additions & 4 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
```js
import * as addresses from '@hop-protocol/core/addresses'

console.log(addresses.kovan.USDC.ethereum.l1Bridge)) // 0x123...
console.log(addresses.goerli.USDC.ethereum.l1Bridge)) // 0x123...
```

See the following files for list of available addresses

- [./src/addresses/mainnet.ts](./src/addresses/mainnet.ts)
- [./src/addresses/goerli.ts](./src/addresses/goerli.ts)
- [./src/addresses/kovan.ts](./src/addresses/kovan.ts)

## Networks

Expand All @@ -28,7 +27,6 @@ See the following files for available configuration info

- [./src/networks/mainnet.ts](./src/networks/mainnet.ts)
- [./src/networks/goerli.ts](./src/networks/goerli.ts)
- [./src/networks/kovan.ts](./src/networks/kovan.ts)

## ABIs

Expand All @@ -48,9 +46,29 @@ import * as metadata from '@hop-protocol/core/metadata'
console.log(metadata.mainnet.tokens.USDC.decimals)) // 6
```

- See [src/metadatatokens.ts](./src/metadata/tokens.ts) for available token metadata
- See [src/metadata/tokens.ts](./src/metadata/tokens.ts) for available token metadata
- See [src/metadata/chains.ts](./src/metadata/chains.ts) for available chain metadata

## Development

Install dependencies

```sh
npm install
```

Watch

```sh
npm run dev
```

Build

```sh
npm run build
```

## License

[MIT](LICENSE)
32 changes: 27 additions & 5 deletions packages/frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,52 @@

Install dependencies:

```bash
```sh
npm install
```

Lerna link:
Lerna link, to link hop core and sdk packages:

```bash
```sh
npx lerna link
```

Start app (uses `mainnet` network by default):

```bash
```sh
npm run dev
```

Start app using a different network (e.g. `mainnet`, `goerli`)

```bash
```sh
REACT_APP_NETWORK=mainnet npm run dev
```

Visit [https://localhost:3000/](https://localhost:3000/)

Environment variables can be set in a `.env` file, for example:

```sh
PUBLIC_URL=.
REACT_APP_IPFS_BUILD=true
REACT_APP_ENABLED_CHAINS=ethereum,polygon,gnosis,optimism,arbitrum
REACT_APP_ENABLED_TOKENS=ETH,USDC,USDT,DAI
REACT_APP_NETWORK=goerli
```

To disable certain routes, use this environment variable, for example this disables gnosis→anyDestination anyToken route and optimism→arbitrum USDC route:

```sh
REACT_APP_DISABLED_ROUTES=gnosis:all:all,optimism:arbitrum:USDC
```

Build distribution build:

```sh
npm run build
```

## Deployments

| Branch | Network | URL | Release | Description |
Expand Down
Loading

0 comments on commit 7f09718

Please sign in to comment.