Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
sehyunc committed Sep 10, 2024
1 parent bd2c631 commit 4b26b4e
Showing 1 changed file with 29 additions and 34 deletions.
63 changes: 29 additions & 34 deletions docs.renegade.fi/docs/typescript-sdk/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,6 @@ To add the Renegade SDK to your project, install the required packages.
```bash
npm install @renegade-fi/node@latest @wagmi/core viem@2.x
```

### Environment Setup
> You must expose a `TOKEN_MAPPING` environment variable to use the SDK. You can do so by adding a `.env` file in the root of your project. See the example repo below.
- Node Version
- We recommend using Node v22
- Typescript config
- Take a look at the example below for a reference `tsconfig.json`.


- Helpful values to know
- Mainnet (Arbitrum One)
- Darkpool contract address: `0x30bd8eab29181f790d7e495786d4b96d7afdc518`
- Permit2 contract address: `0x000000000022D473030F116dDEE9F6B43aC78BA3`
- Chain ID: `42161`
- Chain name: `Arbitrum One`
- Chain RPC URL: [`https://arb1.arbitrum.io/rpc`](https://arb1.arbitrum.io/rpc)
- You should use your own Alchemy / Infura RPC url here instead
- Token mapping: download JSON [here](https://github.com/renegade-fi/token-mappings/raw/main/mainnet.json)
- Renegade Price Reporter: [`mainnet.price-reporter.renegade.fi`](http://mainnet.price-reporter.renegade.fi/)
- Renegade Relayer: [`mainnet.cluster0.renegade.fi`](http://mainnet.cluster0.renegade.fi/)
- Testnet (Arbitrum Sepolia)
- Darkpool contract address: `0x9af58f1ff20ab22e819e40b57ffd784d115a9ef5`
- Permit2 contract address: `0x9458198bcc289c42e460cb8ca143e5854f734442`
- Chain ID: `421614`
- Chain name: `Arbitrum Sepolia`
- Chain RPC URL: [`https://sepolia-rollup.arbitrum.io/rpc`](https://sepolia-rollup.arbitrum.io/rpc)
- You should use your own Alchemy / Infura RPC url here instead
- Token mapping: download JSON [here](https://github.com/renegade-fi/token-mappings/raw/main/testnet.json)
- Renegade Price Reporter: [`testnet.price-reporter.renegade.fi`](http://testnet.price-reporter.renegade.fi/)
- Renegade Relayer: [`testnet.cluster0.renegade.fi`](http://testnet.cluster0.renegade.fi/)

### Create Config

Create and export a new Renegade config using `createConfig`.
Expand Down Expand Up @@ -79,9 +47,36 @@ const config = createConfig({
const wallet = await getBackOfQueueWallet(config)
```

### Next Steps
### Environment Setup
> You must expose a `TOKEN_MAPPING` environment variable to use the SDK. You can do so by adding a `.env` file in the root of your project. See the example repo below.
- Browse the various actions used to interact with the Relayer
- Node Version
- We recommend using Node v22
- Typescript config
- Take a look at the example below for a reference `tsconfig.json`.


- Helpful values to know
- Mainnet (Arbitrum One)
- Darkpool contract address: `0x30bd8eab29181f790d7e495786d4b96d7afdc518`
- Permit2 contract address: `0x000000000022D473030F116dDEE9F6B43aC78BA3`
- Chain ID: `42161`
- Chain name: `Arbitrum One`
- Chain RPC URL: [`https://arb1.arbitrum.io/rpc`](https://arb1.arbitrum.io/rpc)
- You should use your own Alchemy / Infura RPC url here instead
- Token mapping: download JSON [here](https://github.com/renegade-fi/token-mappings/raw/main/mainnet.json)
- Renegade Price Reporter: [`mainnet.price-reporter.renegade.fi`](http://mainnet.price-reporter.renegade.fi/)
- Renegade Relayer: [`mainnet.cluster0.renegade.fi`](http://mainnet.cluster0.renegade.fi/)
- Testnet (Arbitrum Sepolia)
- Darkpool contract address: `0x9af58f1ff20ab22e819e40b57ffd784d115a9ef5`
- Permit2 contract address: `0x9458198bcc289c42e460cb8ca143e5854f734442`
- Chain ID: `421614`
- Chain name: `Arbitrum Sepolia`
- Chain RPC URL: [`https://sepolia-rollup.arbitrum.io/rpc`](https://sepolia-rollup.arbitrum.io/rpc)
- You should use your own Alchemy / Infura RPC url here instead
- Token mapping: download JSON [here](https://github.com/renegade-fi/token-mappings/raw/main/testnet.json)
- Renegade Price Reporter: [`testnet.price-reporter.renegade.fi`](http://testnet.price-reporter.renegade.fi/)
- Renegade Relayer: [`testnet.cluster0.renegade.fi`](http://testnet.cluster0.renegade.fi/)

## Configuration

Expand Down

0 comments on commit 4b26b4e

Please sign in to comment.