💻
Developer Guide
  • Wallet SDK
    • Wallet Overview
    • Getting Started
      • 1. Start the RAILGUN Privacy Engine
      • 2. Build a persistent store for artifact downloads
      • 3. Load a Groth16 prover for each platform
      • 4. Add networks and RPC providers
      • 5. Set up a debug logger
    • Private Wallets
      • RAILGUN Wallets
      • View-Only Wallets
      • Encryption Keys
    • Private Balances
      • Balance and Sync Callbacks
      • Updating Balances
      • QuickSync
    • Transactions
      • Shielding
        • Shield ERC-20 tokens
        • Shield base token
        • Shield NFTs
      • Private Transfers
        • Private ERC-20 Transfers
        • Private NFT Transfers
      • Cross-Contract Calls
      • Unshielding
        • Unshield ERC-20 tokens
        • Unshield base token
        • Unshield NFTs
      • UX: Private Transactions
    • Broadcasters
  • Cookbook SDK
    • Cookbook Overview
    • Recipe Guide: Write a zkApp
      • "Step" — A smart contract call
      • "Recipe" — Steps in series
      • "Combo Meal" — 2+ Recipes
    • Use your zkApp privately
  • Engine SDK
    • Engine Overview
  • ZK Account Abstraction
    • Account Abstraction Overview
    • Getting started with the contracts
    • Wallets
    • State Structure
    • Example Primitives
Powered by GitBook
On this page
  1. ZK Account Abstraction

Getting started with the contracts

PreviousAccount Abstraction OverviewNextWallets

Last updated 1 year ago

All contract code can be viewed in the . Deployment addresses (including testnet deployments) can be viewed in the .

To setup a local development environment:

  1. Clone the contracts repo (git clone git@github.com:railgun-privacy/contract.git)

  2. Install dependencies (cd contract && npm install)

  3. Run a local development network in a new terminal window (cd contract && npx hardhat node)

  4. Deploy contracts to development network (npx hardhat deploy:test --network localhost)

After running the deploy:test hardhat script you should see something like the following printed to your terminal:

{
  "delegator": "0x5FC8d32690cc91D4c39d9d3abcBD16989F875707",
  "governorRewardsImplementation": "",
  "governorRewardsProxy": "",
  "implementation": "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e",
  "proxy": "0x610178dA211FEF7D417bC0e6FeD39F05609AD788",
  "proxyAdmin": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6",
  "rail": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",
  "staking": "0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9",
  "testERC20": "0x202CCe504e04bEd6fC0521238dDf04Bc9E8E15aB",
  "testERC721": "0xf4B146FbA71F41E0592668ffbF264F1D186b2Ca8",
  "treasuryImplementation": "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853",
  "treasuryProxy": "0x8A791620dd6260079BF849Dc5567aDC3F2FdC318",
  "voting": "0x0165878A594ca255338adfa4d48449f69242Eb8F",
  "weth9": "0x8198f5d8F8CfFE8f9C413d98a0A55aEB8ab9FbB7",
  "relayAdapt": "0x0355B7B8cb128fA5692729Ab3AAa199C1753f726"
}

You will primarily be interacting with the proxy contract which is a EIP1967 Transparent Upgradeable Proxy for the implementation contract. Functions on the proxy are only accessible when called by theproxyAdmin contract so function selector clashes are not an issue.

contracts repo
deployments repo