Files
scroll/bridge-history-api
2023-12-08 15:17:52 +08:00
..
2023-12-06 12:31:28 +08:00
2023-12-08 15:17:52 +08:00
2023-12-07 14:10:08 +08:00
2023-12-06 12:31:28 +08:00

bridge-history-api

This directory contains the bridge-history-api service that provides REST APIs to query txs interact with Scroll official bridge contracts

Instructions

The bridge-history-api contains three distinct components

bridgehistoryapi-db-cli

Provide init, show version, rollback, check status services of DB

    cd ./bridge-history-api
    make bridgehistoryapi-db-cli
    ./build/bin/bridgehistoryapi-db-cli [command]

bridgehistoryapi-cross-msg-fetcher

Fetch the transactions from both L1 and L2

    cd ./bridge-history-api
    make bridgehistoryapi-cross-msg-fetcher
    ./build/bin/bridgehistoryapi-cross-msg-fetcher

bridgehistoryapi-server

provides REST APIs. Please refer to the API details below.

    cd ./bridge-history-api
    make bridgehistoryapi-server
    ./build/bin/bridgehistoryapi-server

APIs provided by bridgehistoryapi-server

assume bridgehistoryapi-server listening on https://localhost:8080 can change this port thru modify config.json

  1. /txs
// @Summary    	 get all txs under given address
// @Accept       plain
// @Produce      plain
// @Param        address query string true "wallet address"
// @Param        page_size query int true "page size"
// @Param        page query int true "page"
// @Success      200
// @Router       /api/txs [get]
  1. /withdrawals
// @Summary    	 get all L2 withdrawals under given address
// @Accept       plain
// @Produce      plain
// @Param        address query string true "wallet address"
// @Param        page_size query int true "page size"
// @Param        page query int true "page"
// @Success      200
// @Router       /api/withdrawals [get]
  1. /claimablewithdrawals
// @Summary    	 get all L2 claimable withdrawals under given address
// @Accept       plain
// @Produce      plain
// @Param        address query string true "wallet address"
// @Param        page_size query int true "page size"
// @Param        page query int true "page"
// @Success      200
// @Router       /api/claimablewithdrawals [get]
  1. /txsbyhashes
// @Summary    	 get txs by given tx hashes
// @Accept       plain
// @Produce      plain
// @Param        hashes query string array true "array of hashes"
// @Success      200
// @Router       /api/txsbyhashes [post]