Arrakis Developer Docs
  • Developer Documentation
  • Arrakis V2 Core
    • Overview
    • ArrakisV2
    • ArrakisV2Factory
    • ArrakisV2Resolver
    • ArrakisV2Helper
    • Contract Addresses
  • Arrakis V2 PALM
    • Overview
    • PALMTerms
    • PALMManager
    • Contract Addresses
  • Tutorials
    • Tutorial #1
      • Setup Your Environment
      • Fund Your Address
      • Deploy Your ArrakisV2 Vault
      • Transfer DAI & WETH to Vault
      • Set Vault Liquidity Positions
      • Track Your Position
      • Shift Vault Liquidity Positions
      • Withdraw Your Tokens
  • Other
    • Arrakis V1 Docs (old)
    • Non-technical Overview
Powered by GitBook
On this page
  • clone repository
  • enter repository
  • download dependencies
  • compile contracts
  • create .env file
  • fill in .env file variables
  1. Tutorials
  2. Tutorial #1

Setup Your Environment

clone repository

git clone https://github.com/ArrakisFinance/v2-tutorials.git

enter repository

cd v2-tutorials

if you had previously cloned repository, sync with latest:

git pull origin main

download dependencies

yarn

compile contracts

yarn compile

create .env file

touch .env

fill in .env file variables

Open a text editor or console to edit .env file adding an ALCHEMY_ID and PK

  1. Fill in ALCHEMY_ID:

    ALCHEMY_ID=YOUR-API-KEY-GOES-HERE
  2. Fill in PK:

    PK=0xYourHexidecimalPrivateKeyString
  3. Optionally, fill in MAX_FEE_OVERRIDE and MAX_PRIORITY_FEE_OVERRIDE

    MAX_FEE_OVERRIDE=1000000000
    MAX_PRIORITY_FEE_OVERRIDE=1000000000

    If you face issues with gas pricing in subsequent steps, you can manually override gas prices by optionally adding MAX_FEE_OVERRIDE and MAX_PRIORITY_FEE_OVERRIDE to the environment. These are expressed in wei units (in this example case, forcing a 1 gwei gas price).

Your .env file may now look something like this:

ALCHEMY_ID=aaaaaaaaaaaaaaaaaaaaaaaaaaaa
PK=0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff
MAX_FEE_OVERRIDE=1000000000
MAX_PRIORITY_FEE_OVERRIDE=1000000000

Congrats! Your environment is now set up, and you are ready to move on.

PreviousTutorial #1NextFund Your Address

Last updated 2 years ago

With an Alchemy API Key for access to RPC endpoints. Don't have an Alchemy API key? see

With the 0x prefixed hexidecimal private key of an ethereum address of your choice. Using a fresh address/key is recommended since we are playing with the plaintext private key, which is always a security risk for that account. Need a wallet? get metamask How to export metamask private key? see

here
here
here