[
  {
    "path": ".github/CODEOWNERS",
    "content": "@jazg @tok-kkk\n"
  },
  {
    "path": ".github/workflows/build.yml",
    "content": "name: Docker Build\non:\n  push:\n    tags:\n      - 'v*.*.*'\njobs:\n  build:\n    runs-on: ubuntu-latest\n    env:\n      FILECOIN_FFI_COMMIT: 7912389334e347bbb2eac0520c836830875c39de\n      SOLANA_FFI_COMMIT: 720c0143d8655bfcd412ae73c949474df2c1dcf3\n    steps:\n      - uses: actions/checkout@v2\n      - name: Set up Go\n        uses: actions/setup-go@v2\n        with:\n          go-version: \"1.16.6\"\n      - name: Set output\n        id: push-info\n        run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}\n\n      - name: Set up QEMU\n        uses: docker/setup-qemu-action@v1\n\n      - name: Set up Docker Buildx\n        uses: docker/setup-buildx-action@v2\n\n      - name: Login to DockerHub\n        uses: docker/login-action@v1\n        with:\n          username: ${{ secrets.DOCKERHUB_USERNAME }}\n          password: ${{ secrets.DOCKERHUB_TOKEN }}\n      - name: Configure git for private modules\n        env:\n          TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n        run: git config --global url.\"https://tok-kkk:${TOKEN}@github.com\".insteadOf \"https://github.com\"\n      - name: Check out solana-ffi with the reference\n        uses: actions/checkout@v2\n        with:\n          repository: renproject/solana-ffi\n          ref: ${{ env.SOLANA_FFI_COMMIT }}\n          path: solana-ffi\n      - name: Install dependencies (Solana FFI)\n        run: |\n          sudo apt-get install -y libudev-dev\n          cd solana-ffi\n          go get -u github.com/xlab/c-for-go@cef5ec7\n          make clean\n          make\n          go install ./...\n      - name: Build and push\n        id: docker_build\n        uses: docker/build-push-action@v2\n        with:\n          push: true\n          context: /home/runner/work/multichain/multichain\n          tags: renbot/multichain:${{ steps.push-info.outputs.tag }}, renbot/multichain:latest\n      - name: Image digest\n        run: echo ${{ steps.docker_build.outputs.digest }}"
  },
  {
    "path": ".github/workflows/test.yml",
    "content": "name: go\non: [pull_request]\njobs:\n  test-solana:\n    runs-on: ubuntu-latest\n    env:\n      FILECOIN_FFI_COMMIT: 7912389334e347bbb2eac0520c836830875c39de\n      SOLANA_FFI_COMMIT: 720c0143d8655bfcd412ae73c949474df2c1dcf3\n    steps:\n      - name: Set up Go 1.17\n        uses: actions/setup-go@v2\n        with:\n          go-version: \"1.17.13\"\n\n      - name: Configure git for Private Modules\n        env:\n          TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n        run: git config --global url.\"https://jazg:${TOKEN}@github.com\".insteadOf \"https://github.com\"\n\n      - name: Check out code into the Go module directory\n        uses: actions/checkout@v1\n        with:\n          token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n          submodules: recursive\n\n      - name: Caching modules\n        uses: actions/cache@v1\n        with:\n          path: ~/go/pkg/mod\n          key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }}\n\n      - name: Cache extern dependencies (FFI)\n        id: cache-extern\n        uses: actions/cache@v2\n        env:\n          cache-name: cache-externs\n        with:\n          path: .extern\n          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }}\n\n      # Remove apt repos that are known to break from time to time\n      # See https://github.com/actions/virtual-environments/issues/323\n      - name: Install dependency packages\n        run: |\n          for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done\n          sudo apt-get update\n          sudo apt-get install -y build-essential\n          sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev hwloc libhwloc-dev\n          curl https://sh.rustup.rs -sSf | sh -s -- -y\n          source $HOME/.cargo/env\n\n      - name: Get dependencies\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          go get -u github.com/onsi/ginkgo/ginkgo\n          go get github.com/onsi/gomega@v1.13.0\n          go get -u golang.org/x/lint/golint\n          go get -u github.com/loongy/covermerge\n          go get -u github.com/mattn/goveralls\n          go get -u github.com/xlab/c-for-go@cef5ec7\n\n      - name: Install dependencies (Filecoin FFI)\n        if: steps.cache-extern.outputs.cache-hit != 'true'\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          cd $GITHUB_WORKSPACE\n          mkdir .extern && cd .extern\n          git clone https://github.com/filecoin-project/filecoin-ffi.git\n          cd filecoin-ffi\n          git checkout ${{ env.FILECOIN_FFI_COMMIT }}\n          make\n\n      - name: Install dependencies (Solana FFI)\n        if: steps.cache-extern.outputs.cache-hit != 'true'\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          cd $GITHUB_WORKSPACE/.extern\n          git clone https://github.com/renproject/solana-ffi.git\n          cd solana-ffi\n          git checkout ${{ env.SOLANA_FFI_COMMIT }}\n          make clean\n          make\n\n      - name: Run vetting\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi\n          go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi\n          go mod tidy\n          go vet ./...\n\n      - name: Setup environment for Solana tests\n        run: |\n          sh -c \"$(curl -sSfL https://release.solana.com/v1.8.14/install)\"\n          cd $GITHUB_WORKSPACE\n          export PATH=\"/home/runner/.local/share/solana/install/active_release/bin:$PATH\"\n          echo ${{ secrets.SOLANA_KEY }} > ~/.config/solana/id.json\n          docker run -d -h 0.0.0.0 -p 8899:8899 -p 8900:8900 renbot/ren-solana:latest\n\n      - name: Sleep until the node is up\n        uses: jakejarvis/wait-action@master\n        with:\n          time: \"1m\"\n\n      - name: Check on docker containers\n        run: docker ps -a\n\n      - name: Run tests for Solana\n        run: |\n          export PATH=\"/home/runner/.local/share/solana/install/active_release/bin:$PATH\"\n          cd $GITHUB_WORKSPACE/chain/solana\n          go test -timeout 100s\n\n  test-filecoin:\n    runs-on: ubuntu-latest\n    env:\n      FILECOIN_FFI_COMMIT: 7912389334e347bbb2eac0520c836830875c39de\n      SOLANA_FFI_COMMIT: 720c0143d8655bfcd412ae73c949474df2c1dcf3\n    steps:\n      - name: Set up Go 1.17\n        uses: actions/setup-go@v2\n        with:\n          go-version: \"1.17.13\"\n        id: go\n\n      - name: Configure git for Private Modules\n        env:\n          TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n        run: git config --global url.\"https://jazg:${TOKEN}@github.com\".insteadOf \"https://github.com\"\n\n      - name: Check out code into the Go module directory\n        uses: actions/checkout@v1\n        with:\n          token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n          submodules: recursive\n\n      - name: Caching modules\n        uses: actions/cache@v1\n        with:\n          path: ~/go/pkg/mod\n          key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }}\n\n      - name: Cache extern dependencies (FFI)\n        id: cache-extern\n        uses: actions/cache@v2\n        env:\n          cache-name: cache-externs\n        with:\n          path: .extern\n          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }}\n\n      # Remove apt repos that are known to break from time to time\n      # See https://github.com/actions/virtual-environments/issues/323\n      - name: Install dependency packages\n        run: |\n          for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done\n          sudo apt-get update\n          sudo apt-get install -y build-essential\n          sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev hwloc libhwloc-dev\n          curl https://sh.rustup.rs -sSf | sh -s -- -y\n          source $HOME/.cargo/env\n\n      - name: Get dependencies\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          go get -u github.com/onsi/ginkgo/ginkgo\n          go get github.com/onsi/gomega@v1.13.0\n          go get -u golang.org/x/lint/golint\n          go get -u github.com/loongy/covermerge\n          go get -u github.com/mattn/goveralls\n          go get -u github.com/xlab/c-for-go@cef5ec7\n\n      - name: Install dependencies (Filecoin FFI)\n        if: steps.cache-extern.outputs.cache-hit != 'true'\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          cd $GITHUB_WORKSPACE\n          mkdir .extern && cd .extern\n          git clone https://github.com/filecoin-project/filecoin-ffi.git\n          cd filecoin-ffi\n          git checkout ${{ env.FILECOIN_FFI_COMMIT }}\n          make\n\n      - name: Install dependencies (Solana FFI)\n        if: steps.cache-extern.outputs.cache-hit != 'true'\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          cd $GITHUB_WORKSPACE/.extern\n          git clone https://github.com/renproject/solana-ffi.git\n          cd solana-ffi\n          git checkout ${{ env.SOLANA_FFI_COMMIT }}\n          make clean\n          make\n\n      - name: Run vetting\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi\n          go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi\n          go mod tidy\n          go vet ./...\n\n      - name: Run linting\n        run: |\n          cd $GITHUB_WORKSPACE\n          export PATH=$PATH:$(go env GOPATH)/bin\n          go get -u golang.org/x/lint/golint\n          golint $(go list ./... | grep -v filecoin-ffi)\n\n      - name: Run multichain infrastructure\n        run: |\n          cd $GITHUB_WORKSPACE/infra\n          source .env\n          docker run -d -p 1234:1234 -h 0.0.0.0 \\\n            --name infra_filecoin_1 rohitnarurkar/multichain_filecoin:latest\n\n      - name: Sleep until the nodes are up\n        uses: jakejarvis/wait-action@master\n        with:\n          time: \"10m\"\n\n      - name: Check on docker containers\n        run: docker ps -a\n\n      - name: Run tests and report test coverage\n        env:\n          COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source ./infra/.env\n          cd $GITHUB_WORKSPACE\n          go test \\\n            -fil=true \\\n            -timeout 1500s\n\n  test-zcash:\n    runs-on: ubuntu-latest\n    env:\n      FILECOIN_FFI_COMMIT: 7912389334e347bbb2eac0520c836830875c39de\n      SOLANA_FFI_COMMIT: 720c0143d8655bfcd412ae73c949474df2c1dcf3\n    steps:\n      - name: Set up Go 1.17\n        uses: actions/setup-go@v2\n        with:\n          go-version: \"1.17.13\"\n        id: go\n\n      - name: Configure git for Private Modules\n        env:\n          TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n        run: git config --global url.\"https://jazg:${TOKEN}@github.com\".insteadOf \"https://github.com\"\n\n      - name: Check out code into the Go module directory\n        uses: actions/checkout@v1\n        with:\n          token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n          submodules: recursive\n\n      - name: Caching modules\n        uses: actions/cache@v1\n        with:\n          path: ~/go/pkg/mod\n          key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }}\n\n      - name: Cache extern dependencies (FFI)\n        id: cache-extern\n        uses: actions/cache@v2\n        env:\n          cache-name: cache-externs\n        with:\n          path: .extern\n          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }}\n\n      # Remove apt repos that are known to break from time to time\n      # See https://github.com/actions/virtual-environments/issues/323\n      - name: Install dependency packages\n        run: |\n          for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done\n          sudo apt-get update\n          sudo apt-get install -y build-essential\n          sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev hwloc libhwloc-dev\n          curl https://sh.rustup.rs -sSf | sh -s -- -y\n          source $HOME/.cargo/env\n\n      - name: Get dependencies\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          go get -u github.com/onsi/ginkgo/ginkgo\n          go get github.com/onsi/gomega@v1.13.0\n          go get -u golang.org/x/lint/golint\n          go get -u github.com/loongy/covermerge\n          go get -u github.com/mattn/goveralls\n          go get -u github.com/xlab/c-for-go@cef5ec7\n\n      - name: Install dependencies (Filecoin FFI)\n        if: steps.cache-extern.outputs.cache-hit != 'true'\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          cd $GITHUB_WORKSPACE\n          mkdir .extern && cd .extern\n          git clone https://github.com/filecoin-project/filecoin-ffi.git\n          cd filecoin-ffi\n          git checkout ${{ env.FILECOIN_FFI_COMMIT }}\n          make\n\n      - name: Install dependencies (Solana FFI)\n        if: steps.cache-extern.outputs.cache-hit != 'true'\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          cd $GITHUB_WORKSPACE/.extern\n          git clone https://github.com/renproject/solana-ffi.git\n          cd solana-ffi\n          git checkout ${{ env.SOLANA_FFI_COMMIT }}\n          make clean\n          make\n\n      - name: Run vetting\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi\n          go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi\n          go mod tidy\n          go vet ./...\n\n      - name: Run linting\n        run: |\n          cd $GITHUB_WORKSPACE\n          export PATH=$PATH:$(go env GOPATH)/bin\n          go get -u golang.org/x/lint/golint\n          golint $(go list ./... | grep -v filecoin-ffi)\n\n      - name: Run multichain infrastructure\n        run: |\n          cd $GITHUB_WORKSPACE/infra\n          source .env\n          docker-compose up -d --build zcash\n\n      - name: Sleep until the nodes are up\n        uses: jakejarvis/wait-action@master\n        with:\n          time: \"1m\"\n\n      - name: Check on docker containers\n        run: docker ps -a\n\n      - name: Run tests and report test coverage\n        env:\n          COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source ./infra/.env\n          cd $GITHUB_WORKSPACE\n          go test \\\n            -zec=true \\\n            -timeout 1500s\n\n  test-terra:\n    runs-on: ubuntu-latest\n    env:\n      FILECOIN_FFI_COMMIT: 7912389334e347bbb2eac0520c836830875c39de\n      SOLANA_FFI_COMMIT: 720c0143d8655bfcd412ae73c949474df2c1dcf3\n    steps:\n      - name: Set up Go 1.17\n        uses: actions/setup-go@v2\n        with:\n          go-version: \"1.17.13\"\n        id: go\n\n      - name: Configure git for Private Modules\n        env:\n          TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n        run: git config --global url.\"https://jazg:${TOKEN}@github.com\".insteadOf \"https://github.com\"\n\n      - name: Check out code into the Go module directory\n        uses: actions/checkout@v1\n        with:\n          token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n          submodules: recursive\n\n      - name: Caching modules\n        uses: actions/cache@v1\n        with:\n          path: ~/go/pkg/mod\n          key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }}\n\n      - name: Cache extern dependencies (FFI)\n        id: cache-extern\n        uses: actions/cache@v2\n        env:\n          cache-name: cache-externs\n        with:\n          path: .extern\n          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }}\n\n      # Remove apt repos that are known to break from time to time\n      # See https://github.com/actions/virtual-environments/issues/323\n      - name: Install dependency packages\n        run: |\n          for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done\n          sudo apt-get update\n          sudo apt-get install -y build-essential\n          sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev hwloc libhwloc-dev\n          curl https://sh.rustup.rs -sSf | sh -s -- -y\n          source $HOME/.cargo/env\n\n      - name: Get dependencies\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          go get -u github.com/onsi/ginkgo/ginkgo\n          go get github.com/onsi/gomega@v1.13.0\n          go get -u golang.org/x/lint/golint\n          go get -u github.com/loongy/covermerge\n          go get -u github.com/mattn/goveralls\n          go get -u github.com/xlab/c-for-go@cef5ec7\n\n      - name: Install dependencies (Filecoin FFI)\n        if: steps.cache-extern.outputs.cache-hit != 'true'\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          cd $GITHUB_WORKSPACE\n          mkdir .extern && cd .extern\n          git clone https://github.com/filecoin-project/filecoin-ffi.git\n          cd filecoin-ffi\n          git checkout ${{ env.FILECOIN_FFI_COMMIT }}\n          make\n\n      - name: Install dependencies (Solana FFI)\n        if: steps.cache-extern.outputs.cache-hit != 'true'\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          cd $GITHUB_WORKSPACE/.extern\n          git clone https://github.com/renproject/solana-ffi.git\n          cd solana-ffi\n          git checkout ${{ env.SOLANA_FFI_COMMIT }}\n          eval `ssh-agent -s`\n          make\n\n      - name: Run vetting\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi\n          go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi\n          go mod tidy\n          go vet ./...\n\n      - name: Run linting\n        run: |\n          cd $GITHUB_WORKSPACE\n          export PATH=$PATH:$(go env GOPATH)/bin\n          go get -u golang.org/x/lint/golint\n          golint $(go list ./... | grep -v filecoin-ffi)\n\n      - name: Run multichain infrastructure\n        run: |\n          cd $GITHUB_WORKSPACE/infra\n          source .env\n          docker-compose up -d --build terra\n\n      - name: Sleep until the nodes are up\n        uses: jakejarvis/wait-action@master\n        with:\n          time: \"1m\"\n\n      - name: Check on docker containers\n        run: docker ps -a\n\n      - name: Run tests and report test coverage\n        env:\n          COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source ./infra/.env\n          cd $GITHUB_WORKSPACE\n          go test \\\n            -luna=true \\\n            -timeout 1500s\n\n  test-dogecoin:\n    runs-on: ubuntu-latest\n    env:\n      FILECOIN_FFI_COMMIT: 7912389334e347bbb2eac0520c836830875c39de\n      SOLANA_FFI_COMMIT: 720c0143d8655bfcd412ae73c949474df2c1dcf3\n    steps:\n      - name: Set up Go 1.17\n        uses: actions/setup-go@v2\n        with:\n          go-version: \"1.17.13\"\n        id: go\n\n      - name: Configure git for Private Modules\n        env:\n          TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n        run: git config --global url.\"https://jazg:${TOKEN}@github.com\".insteadOf \"https://github.com\"\n\n      - name: Check out code into the Go module directory\n        uses: actions/checkout@v1\n        with:\n          token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n          submodules: recursive\n\n      - name: Caching modules\n        uses: actions/cache@v1\n        with:\n          path: ~/go/pkg/mod\n          key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }}\n\n      - name: Cache extern dependencies (FFI)\n        id: cache-extern\n        uses: actions/cache@v2\n        env:\n          cache-name: cache-externs\n        with:\n          path: .extern\n          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }}\n\n      # Remove apt repos that are known to break from time to time\n      # See https://github.com/actions/virtual-environments/issues/323\n      - name: Install dependency packages\n        run: |\n          for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done\n          sudo apt-get update\n          sudo apt-get install -y build-essential\n          sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev hwloc libhwloc-dev\n          curl https://sh.rustup.rs -sSf | sh -s -- -y\n          source $HOME/.cargo/env\n\n      - name: Get dependencies\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          go get -u github.com/onsi/ginkgo/ginkgo\n          go get github.com/onsi/gomega@v1.13.0\n          go get -u golang.org/x/lint/golint\n          go get -u github.com/loongy/covermerge\n          go get -u github.com/mattn/goveralls\n          go get -u github.com/xlab/c-for-go@cef5ec7\n\n      - name: Install dependencies (Filecoin FFI)\n        if: steps.cache-extern.outputs.cache-hit != 'true'\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          cd $GITHUB_WORKSPACE\n          mkdir .extern && cd .extern\n          git clone https://github.com/filecoin-project/filecoin-ffi.git\n          cd filecoin-ffi\n          git checkout ${{ env.FILECOIN_FFI_COMMIT }}\n          make\n\n      - name: Install dependencies (Solana FFI)\n        if: steps.cache-extern.outputs.cache-hit != 'true'\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          cd $GITHUB_WORKSPACE/.extern\n          git clone https://github.com/renproject/solana-ffi.git\n          cd solana-ffi\n          git checkout ${{ env.SOLANA_FFI_COMMIT }}\n          make clean\n          make\n\n      - name: Run vetting\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi\n          go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi\n          go mod tidy\n          go vet ./...\n\n      - name: Run linting\n        run: |\n          cd $GITHUB_WORKSPACE\n          export PATH=$PATH:$(go env GOPATH)/bin\n          go get -u golang.org/x/lint/golint\n          golint $(go list ./... | grep -v filecoin-ffi)\n\n      - name: Run multichain infrastructure\n        run: |\n          cd $GITHUB_WORKSPACE/infra\n          source .env\n          docker-compose up -d --build dogecoin\n\n      - name: Sleep until the nodes are up\n        uses: jakejarvis/wait-action@master\n        with:\n          time: \"1m\"\n\n      - name: Check on docker containers\n        run: docker ps -a\n\n      - name: Run tests and report test coverage\n        env:\n          COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source ./infra/.env\n          cd $GITHUB_WORKSPACE\n          go test \\\n            -doge=true \\\n            -timeout 1500s\n\n  test-btc-bch:\n    runs-on: ubuntu-latest\n    env:\n      FILECOIN_FFI_COMMIT: 7912389334e347bbb2eac0520c836830875c39de\n      SOLANA_FFI_COMMIT: 720c0143d8655bfcd412ae73c949474df2c1dcf3\n    steps:\n      - name: Set up Go 1.17\n        uses: actions/setup-go@v2\n        with:\n          go-version: \"1.17.13\"\n        id: go\n\n      - name: Configure git for Private Modules\n        env:\n          TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n        run: git config --global url.\"https://jazg:${TOKEN}@github.com\".insteadOf \"https://github.com\"\n\n      - name: Check out code into the Go module directory\n        uses: actions/checkout@v1\n        with:\n          token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n          submodules: recursive\n\n      - name: Caching modules\n        uses: actions/cache@v1\n        with:\n          path: ~/go/pkg/mod\n          key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }}\n\n      - name: Cache extern dependencies (FFI)\n        id: cache-extern\n        uses: actions/cache@v2\n        env:\n          cache-name: cache-externs\n        with:\n          path: .extern\n          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }}\n\n      # Remove apt repos that are known to break from time to time\n      # See https://github.com/actions/virtual-environments/issues/323\n      - name: Install dependency packages\n        run: |\n          for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done\n          sudo apt-get update\n          sudo apt-get install -y build-essential\n          sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev hwloc libhwloc-dev\n          curl https://sh.rustup.rs -sSf | sh -s -- -y\n          source $HOME/.cargo/env\n\n      - name: Get dependencies\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          go get -u github.com/onsi/ginkgo/ginkgo\n          go get github.com/onsi/gomega@v1.13.0\n          go get -u golang.org/x/lint/golint\n          go get -u github.com/loongy/covermerge\n          go get -u github.com/mattn/goveralls\n          go get -u github.com/xlab/c-for-go@cef5ec7\n\n      - name: Install dependencies (Filecoin FFI)\n        if: steps.cache-extern.outputs.cache-hit != 'true'\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          cd $GITHUB_WORKSPACE\n          mkdir .extern && cd .extern\n          git clone https://github.com/filecoin-project/filecoin-ffi.git\n          cd filecoin-ffi\n          git checkout ${{ env.FILECOIN_FFI_COMMIT }}\n          make\n\n      - name: Install dependencies (Solana FFI)\n        if: steps.cache-extern.outputs.cache-hit != 'true'\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          cd $GITHUB_WORKSPACE/.extern\n          git clone https://github.com/renproject/solana-ffi.git\n          cd solana-ffi\n          git checkout ${{ env.SOLANA_FFI_COMMIT }}\n          make clean\n          make\n\n      - name: Run vetting\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi\n          go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi\n          go mod tidy\n          go vet ./...\n\n      - name: Run linting\n        run: |\n          cd $GITHUB_WORKSPACE\n          export PATH=$PATH:$(go env GOPATH)/bin\n          go get -u golang.org/x/lint/golint\n          golint $(go list ./... | grep -v filecoin-ffi)\n\n      - name: Run multichain infrastructure\n        run: |\n          cd $GITHUB_WORKSPACE/infra\n          source .env\n          docker-compose up -d --build \\\n            bitcoin \\\n            bitcoincash\n\n      - name: Sleep until the nodes are up\n        uses: jakejarvis/wait-action@master\n        with:\n          time: \"1m\"\n\n      - name: Check on docker containers\n        run: docker ps -a\n\n      - name: Run tests and report test coverage\n        env:\n          COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source ./infra/.env\n          cd $GITHUB_WORKSPACE\n          go test \\\n            -btc=true \\\n            -bch=true \\\n            -timeout 1500s\n  test-avax:\n    runs-on: ubuntu-latest\n    env:\n      FILECOIN_FFI_COMMIT: 7912389334e347bbb2eac0520c836830875c39de\n      SOLANA_FFI_COMMIT: 720c0143d8655bfcd412ae73c949474df2c1dcf3\n    steps:\n      - name: Set up Go 1.17\n        uses: actions/setup-go@v2\n        with:\n          go-version: \"1.17.13\"\n        id: go\n\n      - name: Configure git for Private Modules\n        env:\n          TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n        run: git config --global url.\"https://jazg:${TOKEN}@github.com\".insteadOf \"https://github.com\"\n\n      - name: Check out code into the Go module directory\n        uses: actions/checkout@v1\n        with:\n          token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n          submodules: recursive\n\n      - name: Caching modules\n        uses: actions/cache@v1\n        with:\n          path: ~/go/pkg/mod\n          key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }}\n\n      - name: Cache extern dependencies (FFI)\n        id: cache-extern\n        uses: actions/cache@v2\n        env:\n          cache-name: cache-externs\n        with:\n          path: .extern\n          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }}\n\n      # Remove apt repos that are known to break from time to time\n      # See https://github.com/actions/virtual-environments/issues/323\n      - name: Install dependency packages\n        run: |\n          for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done\n          sudo apt-get update\n          sudo apt-get install -y build-essential\n          sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev hwloc libhwloc-dev\n          curl https://sh.rustup.rs -sSf | sh -s -- -y\n          source $HOME/.cargo/env\n\n      - name: Get dependencies\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          go get -u github.com/onsi/ginkgo/ginkgo\n          go get github.com/onsi/gomega@v1.13.0\n          go get -u golang.org/x/lint/golint\n          go get -u github.com/loongy/covermerge\n          go get -u github.com/mattn/goveralls\n          go get -u github.com/xlab/c-for-go@cef5ec7\n\n      - name: Install dependencies (Filecoin FFI)\n        if: steps.cache-extern.outputs.cache-hit != 'true'\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          cd $GITHUB_WORKSPACE\n          mkdir .extern && cd .extern\n          git clone https://github.com/filecoin-project/filecoin-ffi.git\n          cd filecoin-ffi\n          git checkout ${{ env.FILECOIN_FFI_COMMIT }}\n          make\n\n      - name: Install dependencies (Solana FFI)\n        if: steps.cache-extern.outputs.cache-hit != 'true'\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          cd $GITHUB_WORKSPACE/.extern\n          git clone https://github.com/renproject/solana-ffi.git\n          cd solana-ffi\n          git checkout ${{ env.SOLANA_FFI_COMMIT }}\n          make clean\n          make\n\n      - name: Run vetting\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi\n          go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi\n          go mod tidy\n          go vet ./...\n\n      - name: Run linting\n        run: |\n          cd $GITHUB_WORKSPACE\n          export PATH=$PATH:$(go env GOPATH)/bin\n          go get -u golang.org/x/lint/golint\n          golint $(go list ./... | grep -v filecoin-ffi)\n\n      - name: Run multichain infrastructure\n        run: |\n          cd $GITHUB_WORKSPACE/infra\n          source .env\n          docker-compose up -d --build avalanche\n\n      - name: Sleep until the nodes are up\n        uses: jakejarvis/wait-action@master\n        with:\n          time: \"1m\"\n\n      - name: Check on docker containers\n        run: docker ps -a\n\n      - name: Run tests and report test coverage\n        env:\n          COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source ./infra/.env\n          cd $GITHUB_WORKSPACE\n          go test \\\n            -avax=true \\\n            -timeout 1500s\n  test-ftm:\n    runs-on: ubuntu-latest\n    env:\n      FILECOIN_FFI_COMMIT: 7912389334e347bbb2eac0520c836830875c39de\n      SOLANA_FFI_COMMIT: 720c0143d8655bfcd412ae73c949474df2c1dcf3\n    steps:\n      - name: Set up Go 1.17\n        uses: actions/setup-go@v2\n        with:\n          go-version: \"1.17.13\"\n        id: go\n\n      - name: Configure git for Private Modules\n        env:\n          TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n        run: git config --global url.\"https://jazg:${TOKEN}@github.com\".insteadOf \"https://github.com\"\n\n      - name: Check out code into the Go module directory\n        uses: actions/checkout@v1\n        with:\n          token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n          submodules: recursive\n\n      - name: Caching modules\n        uses: actions/cache@v1\n        with:\n          path: ~/go/pkg/mod\n          key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }}\n\n      - name: Cache extern dependencies (FFI)\n        id: cache-extern\n        uses: actions/cache@v2\n        env:\n          cache-name: cache-externs\n        with:\n          path: .extern\n          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }}\n\n      # Remove apt repos that are known to break from time to time\n      # See https://github.com/actions/virtual-environments/issues/323\n      - name: Install dependency packages\n        run: |\n          for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done\n          sudo apt-get update\n          sudo apt-get install -y build-essential\n          sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev hwloc libhwloc-dev\n          curl https://sh.rustup.rs -sSf | sh -s -- -y\n          source $HOME/.cargo/env\n\n      - name: Get dependencies\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          go get -u github.com/onsi/ginkgo/ginkgo\n          go get github.com/onsi/gomega@v1.13.0\n          go get -u golang.org/x/lint/golint\n          go get -u github.com/loongy/covermerge\n          go get -u github.com/mattn/goveralls\n          go get -u github.com/xlab/c-for-go@cef5ec7\n\n      - name: Install dependencies (Filecoin FFI)\n        if: steps.cache-extern.outputs.cache-hit != 'true'\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          cd $GITHUB_WORKSPACE\n          mkdir .extern && cd .extern\n          git clone https://github.com/filecoin-project/filecoin-ffi.git\n          cd filecoin-ffi\n          git checkout ${{ env.FILECOIN_FFI_COMMIT }}\n          make\n\n      - name: Install dependencies (Solana FFI)\n        if: steps.cache-extern.outputs.cache-hit != 'true'\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          cd $GITHUB_WORKSPACE/.extern\n          git clone https://github.com/renproject/solana-ffi.git\n          cd solana-ffi\n          git checkout ${{ env.SOLANA_FFI_COMMIT }}\n          make clean\n          make\n\n      - name: Run vetting\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi\n          go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi\n          go mod tidy\n          go vet ./...\n\n      - name: Run linting\n        run: |\n          cd $GITHUB_WORKSPACE\n          export PATH=$PATH:$(go env GOPATH)/bin\n          go get -u golang.org/x/lint/golint\n          golint $(go list ./... | grep -v filecoin-ffi)\n\n      - name: Run multichain infrastructure\n        run: |\n          cd $GITHUB_WORKSPACE/infra\n          source .env\n          docker-compose up -d --build fantom\n\n      - name: Sleep until the nodes are up\n        uses: jakejarvis/wait-action@master\n        with:\n          time: \"1m\"\n\n      - name: Check on docker containers\n        run: docker ps -a\n\n      - name: Run tests and report test coverage\n        env:\n          COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source ./infra/.env\n          cd $GITHUB_WORKSPACE\n          go test \\\n            -ftm=true \\\n            -timeout 1500s\n  test-polygon:\n    runs-on: ubuntu-latest\n    env:\n      FILECOIN_FFI_COMMIT: 7912389334e347bbb2eac0520c836830875c39de\n      SOLANA_FFI_COMMIT: 720c0143d8655bfcd412ae73c949474df2c1dcf3\n    steps:\n      - name: Set up Go 1.17\n        uses: actions/setup-go@v2\n        with:\n          go-version: \"1.17.13\"\n        id: go\n\n      - name: Configure git for Private Modules\n        env:\n          TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n        run: git config --global url.\"https://jazg:${TOKEN}@github.com\".insteadOf \"https://github.com\"\n\n      - name: Check out code into the Go module directory\n        uses: actions/checkout@v1\n        with:\n          token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n          submodules: recursive\n\n      - name: Caching modules\n        uses: actions/cache@v1\n        with:\n          path: ~/go/pkg/mod\n          key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }}\n\n      - name: Cache extern dependencies (FFI)\n        id: cache-extern\n        uses: actions/cache@v2\n        env:\n          cache-name: cache-externs\n        with:\n          path: .extern\n          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }}\n\n      # Remove apt repos that are known to break from time to time\n      # See https://github.com/actions/virtual-environments/issues/323\n      - name: Install dependency packages\n        run: |\n          for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done\n          sudo apt-get update\n          sudo apt-get install -y build-essential\n          sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev hwloc libhwloc-dev\n          curl https://sh.rustup.rs -sSf | sh -s -- -y\n          source $HOME/.cargo/env\n\n      - name: Get dependencies\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          go get -u github.com/onsi/ginkgo/ginkgo\n          go get github.com/onsi/gomega@v1.13.0\n          go get -u golang.org/x/lint/golint\n          go get -u github.com/loongy/covermerge\n          go get -u github.com/mattn/goveralls\n          go get -u github.com/xlab/c-for-go@cef5ec7\n\n      - name: Install dependencies (Filecoin FFI)\n        if: steps.cache-extern.outputs.cache-hit != 'true'\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          cd $GITHUB_WORKSPACE\n          mkdir .extern && cd .extern\n          git clone https://github.com/filecoin-project/filecoin-ffi.git\n          cd filecoin-ffi\n          git checkout ${{ env.FILECOIN_FFI_COMMIT }}\n          make\n\n      - name: Install dependencies (Solana FFI)\n        if: steps.cache-extern.outputs.cache-hit != 'true'\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          cd $GITHUB_WORKSPACE/.extern\n          git clone https://github.com/renproject/solana-ffi.git\n          cd solana-ffi\n          git checkout ${{ env.SOLANA_FFI_COMMIT }}\n          make clean\n          make\n\n      - name: Run vetting\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi\n          go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi\n          go mod tidy\n          go vet ./...\n\n      - name: Run linting\n        run: |\n          cd $GITHUB_WORKSPACE\n          export PATH=$PATH:$(go env GOPATH)/bin\n          go get -u golang.org/x/lint/golint\n          golint $(go list ./... | grep -v filecoin-ffi)\n\n      - name: Run multichain infrastructure\n        run: |\n          cd $GITHUB_WORKSPACE/infra\n          source .env\n          docker-compose up -d --build polygon\n\n      - name: Sleep until the nodes are up\n        uses: jakejarvis/wait-action@master\n        with:\n          time: \"1m\"\n\n      - name: Check on docker containers\n        run: docker ps -a\n\n      - name: Run tests and report test coverage\n        env:\n          COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source ./infra/.env\n          cd $GITHUB_WORKSPACE\n          go test \\\n            -matic=true \\\n            -timeout 1500s\n  test-bsc:\n    runs-on: ubuntu-latest\n    env:\n      FILECOIN_FFI_COMMIT: 7912389334e347bbb2eac0520c836830875c39de\n      SOLANA_FFI_COMMIT: 720c0143d8655bfcd412ae73c949474df2c1dcf3\n    steps:\n      - name: Set up Go 1.17\n        uses: actions/setup-go@v2\n        with:\n          go-version: \"1.17.13\"\n        id: go\n\n      - name: Configure git for Private Modules\n        env:\n          TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n        run: git config --global url.\"https://jazg:${TOKEN}@github.com\".insteadOf \"https://github.com\"\n\n      - name: Check out code into the Go module directory\n        uses: actions/checkout@v1\n        with:\n          token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n          submodules: recursive\n\n      - name: Caching modules\n        uses: actions/cache@v1\n        with:\n          path: ~/go/pkg/mod\n          key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }}\n\n      - name: Cache extern dependencies (FFI)\n        id: cache-extern\n        uses: actions/cache@v2\n        env:\n          cache-name: cache-externs\n        with:\n          path: .extern\n          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }}\n\n      # Remove apt repos that are known to break from time to time\n      # See https://github.com/actions/virtual-environments/issues/323\n      - name: Install dependency packages\n        run: |\n          for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done\n          sudo apt-get update\n          sudo apt-get install -y build-essential\n          sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev hwloc libhwloc-dev\n          curl https://sh.rustup.rs -sSf | sh -s -- -y\n          source $HOME/.cargo/env\n\n      - name: Get dependencies\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          go get -u github.com/onsi/ginkgo/ginkgo\n          go get github.com/onsi/gomega@v1.13.0\n          go get -u golang.org/x/lint/golint\n          go get -u github.com/loongy/covermerge\n          go get -u github.com/mattn/goveralls\n          go get -u github.com/xlab/c-for-go@cef5ec7\n\n      - name: Install dependencies (Filecoin FFI)\n        if: steps.cache-extern.outputs.cache-hit != 'true'\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          cd $GITHUB_WORKSPACE\n          mkdir .extern && cd .extern\n          git clone https://github.com/filecoin-project/filecoin-ffi.git\n          cd filecoin-ffi\n          git checkout ${{ env.FILECOIN_FFI_COMMIT }}\n          make\n\n      - name: Install dependencies (Solana FFI)\n        if: steps.cache-extern.outputs.cache-hit != 'true'\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          cd $GITHUB_WORKSPACE/.extern\n          git clone https://github.com/renproject/solana-ffi.git\n          cd solana-ffi\n          git checkout ${{ env.SOLANA_FFI_COMMIT }}\n          make clean\n          make\n\n      - name: Run vetting\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi\n          go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi\n          go mod tidy\n          go vet ./...\n\n      - name: Run linting\n        run: |\n          cd $GITHUB_WORKSPACE\n          export PATH=$PATH:$(go env GOPATH)/bin\n          go get -u golang.org/x/lint/golint\n          golint $(go list ./... | grep -v filecoin-ffi)\n\n      - name: Run multichain infrastructure\n        run: |\n          cd $GITHUB_WORKSPACE/infra\n          source .env\n          docker-compose up -d --build binance\n\n      - name: Sleep until the nodes are up\n        uses: jakejarvis/wait-action@master\n        with:\n          time: \"1m\"\n\n      - name: Check on docker containers\n        run: docker ps -a\n\n      - name: Run tests and report test coverage\n        env:\n          COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source ./infra/.env\n          cd $GITHUB_WORKSPACE\n          go test \\\n            -bsc=true \\\n            -timeout 1500s\n  test-eth:\n    runs-on: ubuntu-latest\n    env:\n      FILECOIN_FFI_COMMIT: 7912389334e347bbb2eac0520c836830875c39de\n      SOLANA_FFI_COMMIT: 720c0143d8655bfcd412ae73c949474df2c1dcf3\n    steps:\n      - name: Set up Go 1.17\n        uses: actions/setup-go@v2\n        with:\n          go-version: \"1.17.13\"\n        id: go\n\n      - name: Configure git for Private Modules\n        env:\n          TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n        run: git config --global url.\"https://jazg:${TOKEN}@github.com\".insteadOf \"https://github.com\"\n\n      - name: Check out code into the Go module directory\n        uses: actions/checkout@v1\n        with:\n          token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}\n          submodules: recursive\n\n      - name: Caching modules\n        uses: actions/cache@v1\n        with:\n          path: ~/go/pkg/mod\n          key: ${{ runner.os }}-go-aw-${{ hashFiles('**/go.sum') }}\n\n      - name: Cache extern dependencies (FFI)\n        id: cache-extern\n        uses: actions/cache@v2\n        env:\n          cache-name: cache-externs\n        with:\n          path: .extern\n          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.FILECOIN_FFI_COMMIT }}-${{ env.SOLANA_FFI_COMMIT }}\n\n      # Remove apt repos that are known to break from time to time\n      # See https://github.com/actions/virtual-environments/issues/323\n      - name: Install dependency packages\n        run: |\n          for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done\n          sudo apt-get update\n          sudo apt-get install -y build-essential\n          sudo apt-get install -y jq mesa-opencl-icd ocl-icd-opencl-dev pkg-config libudev-dev hwloc libhwloc-dev\n          curl https://sh.rustup.rs -sSf | sh -s -- -y\n          source $HOME/.cargo/env\n\n      - name: Get dependencies\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          go get -u github.com/onsi/ginkgo/ginkgo\n          go get github.com/onsi/gomega@v1.13.0\n          go get -u golang.org/x/lint/golint\n          go get -u github.com/loongy/covermerge\n          go get -u github.com/mattn/goveralls\n          go get -u github.com/xlab/c-for-go@cef5ec7\n\n      - name: Install dependencies (Filecoin FFI)\n        if: steps.cache-extern.outputs.cache-hit != 'true'\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          cd $GITHUB_WORKSPACE\n          mkdir .extern && cd .extern\n          git clone https://github.com/filecoin-project/filecoin-ffi.git\n          cd filecoin-ffi\n          git checkout ${{ env.FILECOIN_FFI_COMMIT }}\n          make\n\n      - name: Install dependencies (Solana FFI)\n        if: steps.cache-extern.outputs.cache-hit != 'true'\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          cd $GITHUB_WORKSPACE/.extern\n          git clone https://github.com/renproject/solana-ffi.git\n          cd solana-ffi\n          git checkout ${{ env.SOLANA_FFI_COMMIT }}\n          make clean\n          make\n\n      - name: Run vetting\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source $HOME/.cargo/env\n          go mod edit -replace=github.com/filecoin-project/filecoin-ffi=./.extern/filecoin-ffi\n          go mod edit -replace=github.com/renproject/solana-ffi=./.extern/solana-ffi\n          go mod tidy\n          go vet ./...\n\n      - name: Run linting\n        run: |\n          cd $GITHUB_WORKSPACE\n          export PATH=$PATH:$(go env GOPATH)/bin\n          go get -u golang.org/x/lint/golint\n          golint $(go list ./... | grep -v filecoin-ffi)\n\n      - name: Run multichain infrastructure\n        run: |\n          cd $GITHUB_WORKSPACE/infra\n          source .env\n          docker-compose up -d --build ethereum\n\n      - name: Sleep until the nodes are up\n        uses: jakejarvis/wait-action@master\n        with:\n          time: \"1m\"\n\n      - name: Check on docker containers\n        run: docker ps -a\n\n      - name: Run tests and report test coverage\n        env:\n          COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        run: |\n          export PATH=$PATH:$(go env GOPATH)/bin\n          source ./infra/.env\n          cd $GITHUB_WORKSPACE\n          go test \\\n            -eth=true \\\n            -timeout 1500s\n"
  },
  {
    "path": ".gitignore",
    "content": "# Binaries and plugins\n*.exe\n*.exe~\n*.dll\n*.so\n*.dylib\n\n# Tests\n*.test\n\n# Outputs from tools\n*.out\n\n# IDE specific files\n.idea/"
  },
  {
    "path": ".gitmodules",
    "content": "[submodule \"chain/filecoin/filecoin-ffi\"]\n\tpath = chain/filecoin/filecoin-ffi\n\turl = https://github.com/filecoin-project/filecoin-ffi\n[submodule \"chain/solana/solana-ffi\"]\n\tpath = chain/solana/solana-ffi\n\turl = https://github.com/renproject/solana-ffi\n"
  },
  {
    "path": "Dockerfile",
    "content": "FROM golang\n\n# doing all updates and installs in a single step and removing the apt cache helps reduce the image size\nRUN apt-get update && \\\n    apt-get install -y \\\n    mesa-opencl-icd \\\n    ocl-icd-opencl-dev \\\n    libssl-dev \\\n    libudev-dev \\\n    hwloc \\\n    libhwloc-dev \\\n    gcc \\\n    git \\\n    bzr \\\n    jq \\\n    pkg-config \\\n    curl \\\n    wget && \\\n    apt-get upgrade -y && \\\n    rm -rf /var/lib/apt/lists/*\n\nENV GO111MODULE=on\nENV GOPROXY=https://proxy.golang.org\n\nRUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y\nENV PATH=\"/root/.cargo/bin:${PATH}\"\n\nRUN mkdir -p $(go env GOPATH)\nWORKDIR $GOPATH\nRUN mkdir -p src/github.com/filecoin-project\nWORKDIR $GOPATH/src/github.com/filecoin-project\nRUN git clone https://github.com/filecoin-project/filecoin-ffi\nWORKDIR $GOPATH/src/github.com/filecoin-project/filecoin-ffi\nRUN git checkout 7912389334e347bbb2eac0520c836830875c39de\nRUN make\nRUN go install\n\nCOPY ./solana-ffi $GOPATH/src/github.com/renproject/solana-ffi"
  },
  {
    "path": "LICENSE",
    "content": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>\n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n                            Preamble\n\n  The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n  The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works.  By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users.  We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors.  You can apply it to\nyour programs, too.\n\n  When we speak of free software, we are referring to freedom, not\nprice.  Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n  To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights.  Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n  For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received.  You must make sure that they, too, receive\nor can get the source code.  And you must show them these terms so they\nknow their rights.\n\n  Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n  For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software.  For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n  Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so.  This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software.  The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable.  Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts.  If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n  Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary.  To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n  The precise terms and conditions for copying, distribution and\nmodification follow.\n\n                       TERMS AND CONDITIONS\n\n  0. Definitions.\n\n  \"This License\" refers to version 3 of the GNU General Public License.\n\n  \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n  \"The Program\" refers to any copyrightable work licensed under this\nLicense.  Each licensee is addressed as \"you\".  \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n  To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy.  The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n  A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n  To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy.  Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n  To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies.  Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n  An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License.  If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n  1. Source Code.\n\n  The \"source code\" for a work means the preferred form of the work\nfor making modifications to it.  \"Object code\" means any non-source\nform of a work.\n\n  A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n  The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form.  A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n  The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities.  However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work.  For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n  The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n  The Corresponding Source for a work in source code form is that\nsame work.\n\n  2. Basic Permissions.\n\n  All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met.  This License explicitly affirms your unlimited\npermission to run the unmodified Program.  The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work.  This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n  You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force.  You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright.  Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n  Conveying under any other circumstances is permitted solely under\nthe conditions stated below.  Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n  3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n  No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n  When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n  4. Conveying Verbatim Copies.\n\n  You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n  You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n  5. Conveying Modified Source Versions.\n\n  You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n    a) The work must carry prominent notices stating that you modified\n    it, and giving a relevant date.\n\n    b) The work must carry prominent notices stating that it is\n    released under this License and any conditions added under section\n    7.  This requirement modifies the requirement in section 4 to\n    \"keep intact all notices\".\n\n    c) You must license the entire work, as a whole, under this\n    License to anyone who comes into possession of a copy.  This\n    License will therefore apply, along with any applicable section 7\n    additional terms, to the whole of the work, and all its parts,\n    regardless of how they are packaged.  This License gives no\n    permission to license the work in any other way, but it does not\n    invalidate such permission if you have separately received it.\n\n    d) If the work has interactive user interfaces, each must display\n    Appropriate Legal Notices; however, if the Program has interactive\n    interfaces that do not display Appropriate Legal Notices, your\n    work need not make them do so.\n\n  A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit.  Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n  6. Conveying Non-Source Forms.\n\n  You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n    a) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by the\n    Corresponding Source fixed on a durable physical medium\n    customarily used for software interchange.\n\n    b) Convey the object code in, or embodied in, a physical product\n    (including a physical distribution medium), accompanied by a\n    written offer, valid for at least three years and valid for as\n    long as you offer spare parts or customer support for that product\n    model, to give anyone who possesses the object code either (1) a\n    copy of the Corresponding Source for all the software in the\n    product that is covered by this License, on a durable physical\n    medium customarily used for software interchange, for a price no\n    more than your reasonable cost of physically performing this\n    conveying of source, or (2) access to copy the\n    Corresponding Source from a network server at no charge.\n\n    c) Convey individual copies of the object code with a copy of the\n    written offer to provide the Corresponding Source.  This\n    alternative is allowed only occasionally and noncommercially, and\n    only if you received the object code with such an offer, in accord\n    with subsection 6b.\n\n    d) Convey the object code by offering access from a designated\n    place (gratis or for a charge), and offer equivalent access to the\n    Corresponding Source in the same way through the same place at no\n    further charge.  You need not require recipients to copy the\n    Corresponding Source along with the object code.  If the place to\n    copy the object code is a network server, the Corresponding Source\n    may be on a different server (operated by you or a third party)\n    that supports equivalent copying facilities, provided you maintain\n    clear directions next to the object code saying where to find the\n    Corresponding Source.  Regardless of what server hosts the\n    Corresponding Source, you remain obligated to ensure that it is\n    available for as long as needed to satisfy these requirements.\n\n    e) Convey the object code using peer-to-peer transmission, provided\n    you inform other peers where the object code and Corresponding\n    Source of the work are being offered to the general public at no\n    charge under subsection 6d.\n\n  A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n  A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling.  In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage.  For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product.  A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n  \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source.  The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n  If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information.  But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n  The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed.  Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n  Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n  7. Additional Terms.\n\n  \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law.  If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n  When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit.  (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.)  You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n  Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n    a) Disclaiming warranty or limiting liability differently from the\n    terms of sections 15 and 16 of this License; or\n\n    b) Requiring preservation of specified reasonable legal notices or\n    author attributions in that material or in the Appropriate Legal\n    Notices displayed by works containing it; or\n\n    c) Prohibiting misrepresentation of the origin of that material, or\n    requiring that modified versions of such material be marked in\n    reasonable ways as different from the original version; or\n\n    d) Limiting the use for publicity purposes of names of licensors or\n    authors of the material; or\n\n    e) Declining to grant rights under trademark law for use of some\n    trade names, trademarks, or service marks; or\n\n    f) Requiring indemnification of licensors and authors of that\n    material by anyone who conveys the material (or modified versions of\n    it) with contractual assumptions of liability to the recipient, for\n    any liability that these contractual assumptions directly impose on\n    those licensors and authors.\n\n  All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10.  If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term.  If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n  If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n  Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n  8. Termination.\n\n  You may not propagate or modify a covered work except as expressly\nprovided under this License.  Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n  However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n  Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n  Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License.  If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n  9. Acceptance Not Required for Having Copies.\n\n  You are not required to accept this License in order to receive or\nrun a copy of the Program.  Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance.  However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work.  These actions infringe copyright if you do\nnot accept this License.  Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n  10. Automatic Licensing of Downstream Recipients.\n\n  Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License.  You are not responsible\nfor enforcing compliance by third parties with this License.\n\n  An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations.  If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n  You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License.  For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n  11. Patents.\n\n  A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based.  The\nwork thus licensed is called the contributor's \"contributor version\".\n\n  A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version.  For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n  Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n  In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement).  To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n  If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients.  \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n  If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n  A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License.  You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n  Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n  12. No Surrender of Others' Freedom.\n\n  If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License.  If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all.  For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n  13. Use with the GNU Affero General Public License.\n\n  Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work.  The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n  14. Revised Versions of this License.\n\n  The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time.  Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n  Each version is given a distinguishing version number.  If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation.  If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n  If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n  Later license versions may give you additional or different\npermissions.  However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n  15. Disclaimer of Warranty.\n\n  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n  16. Limitation of Liability.\n\n  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n  17. Interpretation of Sections 15 and 16.\n\n  If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n                     END OF TERMS AND CONDITIONS\n\n            How to Apply These Terms to Your New Programs\n\n  If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n  To do so, attach the following notices to the program.  It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n    <one line to give the program's name and a brief idea of what it does.>\n    Copyright (C) <year>  <name of author>\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see <https://www.gnu.org/licenses/>.\n\nAlso add information on how to contact you by electronic and paper mail.\n\n  If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n    <program>  Copyright (C) <year>  <name of author>\n    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n    This is free software, and you are welcome to redistribute it\n    under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License.  Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n  You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n<https://www.gnu.org/licenses/>.\n\n  The GNU General Public License does not permit incorporating your program\ninto proprietary programs.  If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library.  If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License.  But first, please read\n<https://www.gnu.org/licenses/why-not-lgpl.html>."
  },
  {
    "path": "README.md",
    "content": "# `🔗 multichain`\n\n## Layout\n\n`/` declares the assets and chains that exist, but provides no chain-specific implementations.\n\n`/infra` defines a local deployment of the multichain using `docker-compose`. All underlying chains provide a `Dockerfile` and service definition to make running node instances easy. All chains need to add a `Dockerfile` and service definition that allows the multichain to spin up a local development-mode instance of the chain. This is necessary for running comprehensive local test suites.\n\n`/api` defines the different compatibility APIs that exist: Account, Address, Contract, Gas, and UTXO. Chains should implement the APIs that are relevant to them. For example, Bitcoin (and its forks) implements the Address, Gas, and UTXO APIs. No actual implementations should be added to this folder.\n\n`/chain`  defines all of the chain-specific implementations of the APIs. Each chain has its own sub-package. For example, Bitcoin, Bitcoin Cash, Dogecoin, and Zcash are all chains that implement the Address, Gas, and UTXO APIs, and each of these implementations are in `/chain/bitcoin`, `/chain/bitcoincash`, `/chain/dogecoin`, and `/chain/zcash` respectively.\n\n## Example\n\nThe `🔗 multichain` is designed to be flexible enough to support any kind of chain. Anyone is free to contribute to the `🔗 multichain` by adding support for a new chain, or improving support for an existing chain. To show how this is done, we will walk-through an example: adding support for Dogecoin.\n\n### Chains and Assets\n\nBefore doing anything else, let's add an enumeration for the `Asset` and `Chain` types, which can be found in `package multichain`. To avoid favouritism, all assets and chains are listed in alphabetical order. Unless otherwise advised by an offiical team member, the names and tickers found on https://coinmarketcap.com must be used.\n\nAdding an `Asset`:\n\n```go\n// Enumeration of supported assets. When introducing a new chain, or new asset\n// from an existing chain, you must add a human-readable string to this set of\n// enumerated values. Assets must be listed in alphabetical order.\nconst (\n    BCH  = Asset(\"BCH\")  // Bitcoin Cash\n    BTC  = Asset(\"BTC\")  // Bitcoin\n    DOGE = Asset(\"DOGE\") // Dogecoin (This is our new asset!)\n    ETH  = Asset(\"ETH\")  // Ether\n    ZEC  = Asset(\"ZEC\")  // Zcash\n)\n```\n\nAdding a `Chain`:\n\n```go\n// Enumeration of supported chains. When introducing a new chain, you must add a\n// human-readable string to this set of enumerated values. Chains must be listed\n// in alphabetical order.\nconst (\n    Bitcoin     = Chain(\"Bitcoin\")\n    BitcoinCash = Chain(\"BitcoinCash\")\n    Dogecoin    = Chain(\"Dogecoin\") // (This is our new chain!)\n    Ethereum    = Chain(\"Ethereum\")\n    Zcash       = Chain(\"Zcash\")\n)\n```\n\n### Docker\n\nNext, we need to setup a Docker container in the `/infra` folder. This is needed for local test suites, allowing for end-to-end integrated testing directly against a node. Doing this requires a couple of steps.\n\nFirst, we create a new `dogecoin/` folder in the `/infra` folder:\n\n```\n/infra\n|-- /bitcoin\n|-- /bitcoincash\n|-- /dogecoin         # This is our new folder!\n|   |-- Dockerfile    # This is our new Dockerfile!\n|   |-- dogecoin.conf\n|   |-- run.sh        # This is our new run file!\n|-- /zcash\n|-- .env\n|-- docker-compose.yaml\n```\n\nThe new folder _must_ at least contain a `Dockerfile` that installs the node, and a `run.sh` file that runs the nodes. The node _should_ be run in test mode. The new folder can also contain other files that are specific to the needs of the chain being added. In our case, the `dogecoin.conf` file is also needed to configure the node. (We will omit showing all the code here, since there is quite a bit of it, but you can check it out in the `/infra/dogecoin` folder.)\n\nSecond, we add an entry to the `.env` file. Our entry _must_ include a private key that will have access to funds, and the public address associated with that private key. We will add:\n\n```sh\n#\n# Dogecoin\n#\n\n# Address that will receive mining rewards. Generally, this is set to an address\n# for which the private key is known by a test suite. This allows the test suite\n# access to plenty of testing funds.\nexport DOGECOIN_PK=cRZnRgH2ztcJupCzkWbq2mjiT8PSFAmtYRYb1phg1vSRRcNBX4w4\nexport DOGECOIN_ADDRESS=n3PSSpR4zqUKWH4tcRjP9aTwJ4GmixQXmt\n```\n\nLast, we add a service to the `docker-compose.yaml` file. This allows the node to boot alongside the other nodes in the multichain. This entry must expose the node for use in tests, and must not overlap with other nodes that already exist (ports are reserved on a first-come-first-serve basis). We will define the service as:\n\n```yaml\n##\n## Dogecoin\n##\n\ndogecoin:\n  build:\n    context: ./dogecoin\n  ports:\n    - \"0.0.0.0:18332:18332\"\n  entrypoint:\n    - \"./root/run.sh\"\n    - \"${DOGECOIN_ADDRESS}\"\n```\n\n### Address API\n\nAll chains _should_ implement the Address API. Luckily for Dogecoin, it is so similar to Bitcoin that we can re-export the Bitcoin implementation without the need for custom modifications. In `/chain/dogecoin/address.go` we add:\n\n```go\npackage dogecoin\n\nimport \"github.com/renproject/multichain/chain/bitcoin\"\n\ntype (\n\tAddressEncoder       = bitcoin.AddressEncoder\n\tAddressDecoder       = bitcoin.AddressDecoder\n\tAddressEncodeDecoder = bitcoin.AddressEncodeDecoder\n)\n```\n\nThese three interfaces allow users of the `🔗 multichain` to easily encode and decode Dogecoin addresses. Other chains will need to provide their own implementations, based on their chains address standards.\n\n### Gas API\n\nMost, but not all, chains _should_ implement the Gas API. Again, Dogecoin is so similar to Bitcoin that we can re-export the Bitcoin implementation in `/chain/dogecoin/gas.go`:\n\n```go\npackage dogecoin\n\nimport \"github.com/renproject/multichain/chain/bitcoin\"\n\ntype GasEstimator = bitcoin.GasEstimator\n\nvar NewGasEstimator = bitcoin.NewGasEstimator\n```\n\nThe interface allows users of the `🔗 multichain` to estimate gas prices (although, the current implementation is _very_ simple). The associated function allows users to construct an instance of the interface for Dogecoin.\n\n### UTXO API\n\nGenerally speaking, chains fall into two categories: account-based or UTXO-based (and some can even be both). Bitcoin, and its forks, are all UTXO-based chains. As a fork of Bitcoin, Dogecoin is a UTXO-based chain, so we implement the UTXO API. To implement the UTXO API, we must implement the `Tx`, `TxBuilder`, and `Client` interfaces. More information can be found in the comments of `/api/utxo` folder.\n\nAgain, the implementation for Dogecoin is trivial. In `/chain/dogecoin/utxo`, we have:\n\n```go\npackage dogecoin\n\nimport \"github.com/renproject/multichain/chain/bitcoin\"\n\ntype (\n\tTx            = bitcoin.Tx\n\tTxBuilder     = bitcoin.TxBuilder\n\tClient        = bitcoin.Client\n\tClientOptions = bitcoin.ClientOptions\n)\n\nvar (\n\tNewTxBuilder         = bitcoin.NewTxBuilder\n\tNewClient            = bitcoin.NewClient\n\tDefaultClientOptions = bitcoin.DefaultClientOptions\n)\n```\n\nUp to this point, we have done nothing but re-export Bitcoin. So what makes Dogecoin different? And how can we express that difference? Well, the `/chain/dogecoin` folder is the place where we must define anything else Dogecoin users will need. In the case of Dogecoin, the only thing that differentiates it from Bitcoin is the `*chaincfg.Param` object. We define this in `/chain/dogecoin/dogecoin.go`:\n\n```go\npackage dogecoin\n\nimport (\n\t\"github.com/btcsuite/btcd/chaincfg\"\n)\n\nfunc init() {\n\tif err := chaincfg.Register(&MainNetParams); err != nil {\n\t\tpanic(err)\n\t}\n\tif err := chaincfg.Register(&RegressionNetParams); err != nil {\n\t\tpanic(err)\n\t}\n}\n\nvar MainNetParams = chaincfg.Params{\n\tName: \"mainnet\",\n\tNet:  0xc0c0c0c0,\n\n\t// Address encoding magics\n\tPubKeyHashAddrID: 30,\n\tScriptHashAddrID: 22,\n\tPrivateKeyID:     158,\n\n\t// BIP32 hierarchical deterministic extended key magics\n\tHDPrivateKeyID: [4]byte{0x02, 0xfa, 0xc3, 0x98}, // starts with xprv\n\tHDPublicKeyID:  [4]byte{0x02, 0xfa, 0xca, 0xfd}, // starts with xpub\n\n\t// Human-readable part for Bech32 encoded segwit addresses, as defined in\n\t// BIP 173. Dogecoin does not actually support this, but we do not want to\n\t// collide with real addresses, so we specify it.\n\tBech32HRPSegwit: \"doge\",\n}\n\nvar RegressionNetParams = chaincfg.Params{\n\tName: \"regtest\",\n\n\t// Dogecoin has 0xdab5bffa as RegTest (same as Bitcoin's RegTest).\n\t// Setting it to an arbitrary value (leet_hex(dogecoin)), so that we can\n\t// register the regtest network.\n\tNet: 0xd063c017,\n\n\t// Address encoding magics\n\tPubKeyHashAddrID: 111,\n\tScriptHashAddrID: 196,\n\tPrivateKeyID:     239,\n\n\t// BIP32 hierarchical deterministic extended key magics\n\tHDPrivateKeyID: [4]byte{0x04, 0x35, 0x83, 0x94}, // starts with xprv\n\tHDPublicKeyID:  [4]byte{0x04, 0x35, 0x87, 0xcf}, // starts with xpub\n\n\t// Human-readable part for Bech32 encoded segwit addresses, as defined in\n\t// BIP 173. Dogecoin does not actually support this, but we do not want to\n\t// collide with real addresses, so we specify it.\n\tBech32HRPSegwit: \"dogert\",\n}\n```\n\nMost of the functions that we have re-exported expected `*chaincfg.Params` as an argument. By defining one for regnet and mainnet, users can construct Dogecoin instances of the UTXO API by using these params.\n\n## Test Suite\n\n1. Install Docker\n2. Install Docker Compose\n3. Run Docker\n4. Run `./test.sh`\n\nExample output:\n\n```sh\nCreating network \"docker_default\" with the default driver\nBuilding bitcoin\n\n...\n\nSuccessfully built 1ebb03faa04f\nSuccessfully tagged docker_bitcoin:latest\nBuilding bitcoincash\n\n...\n\nSuccessfully built e12e98011869\nSuccessfully tagged docker_bitcoincash:latest\nBuilding zcash\n\n...\n\nSuccessfully built 56231a29ca2e\nSuccessfully tagged docker_zcash:latest\ndocker_bitcoin_1 is up-to-date\ndocker_bitcoincash_1 is up-to-date\ndocker_zcash_1 is up-to-date\nWaiting for multichain to boot...\n=== RUN   TestMultichain\nRunning Suite: Multichain Suite\n===============================\n\n...\n\nStopping docker_bitcoincash_1 ... done\nStopping docker_zcash_1       ... done\nStopping docker_bitcoin_1     ... done\nRemoving docker_bitcoincash_1 ... done\nRemoving docker_zcash_1       ... done\nRemoving docker_bitcoin_1     ... done\nRemoving network docker_default\nDone!\n```\n"
  },
  {
    "path": "api/account/account.go",
    "content": "// Package account defines the Account API. All chains that use an account-based\n// model should implement this API. The Account API is used to send and confirm\n// transactions between addresses.\npackage account\n\nimport (\n\t\"context\"\n\n\t\"github.com/renproject/id\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/multichain/api/contract\"\n\t\"github.com/renproject/pack\"\n)\n\n// The Tx interfaces defines the functionality that must be exposed by\n// account-based transactions.\ntype Tx interface {\n\t// Hash that uniquely identifies the transaction. Hashes are usually the\n\t// result of an irreversible hashing function applied to some serialized\n\t// representation of the transaction.\n\tHash() pack.Bytes\n\n\t// From returns the address from which value is being sent.\n\tFrom() address.Address\n\n\t// To returns the address to which value is being sent.\n\tTo() address.Address\n\n\t// Value being sent from one address to another.\n\tValue() pack.U256\n\n\t// Nonce used to order the transaction with respect to all other\n\t// transactions signed and submitted by the sender of this transaction.\n\tNonce() pack.U256\n\n\t// Payload returns arbitrary data that is associated with the transaction.\n\t// This payload is often used to send notes between external accounts, or\n\t// call functions on a contract.\n\tPayload() contract.CallData\n\n\t// Sighashes that must be signed before the transaction can be submitted by\n\t// the client.\n\tSighashes() ([]pack.Bytes32, error)\n\n\t// Sign the transaction by injecting signatures for the required sighashes.\n\t// The serialized public key used to sign the sighashes should also be\n\t// specified whenever it is available.\n\tSign([]pack.Bytes65, pack.Bytes) error\n\n\t// Serialize the transaction into bytes. This is the format in which the\n\t// transaction will be submitted by the client.\n\tSerialize() (pack.Bytes, error)\n}\n\n// The TxBuilder interface defines the functionality required to build\n// account-based transactions. Most chain implementations require additional\n// information, and this should be accepted during the construction of the\n// chain-specific transaction builder.\ntype TxBuilder interface {\n\tBuildTx(ctx context.Context, fromPubKey *id.PubKey, to address.Address, value, nonce, gasLimit, gasPrice, gasCap pack.U256, payload pack.Bytes) (Tx, error)\n}\n\n// The Client interface defines the functionality required to interact with a\n// chain over RPC.\ntype Client interface {\n\t// LatestBlock returns the block number of the latest block.\n\tLatestBlock(context.Context) (pack.U64, error)\n\n\t// AccountBalance returns the current balance of the given account.\n\tAccountBalance(context.Context, address.Address) (pack.U256, error)\n\n\t// AccountNonce is the current nonce of this account, which must be used to\n\t// build a new transaction.\n\tAccountNonce(context.Context, address.Address) (pack.U256, error)\n\n\t// Tx returns the transaction uniquely identified by the given transaction\n\t// hash. It also returns the number of confirmations for the transaction. If\n\t// the transaction cannot be found before the context is done, or the\n\t// transaction is invalid, then an error should be returned.\n\tTx(context.Context, pack.Bytes) (Tx, pack.U64, error)\n\n\t// SubmitTx to the underlying chain. If the transaction cannot be found\n\t// before the context is done, or the transaction is invalid, then an error\n\t// should be returned.\n\tSubmitTx(context.Context, Tx) error\n}\n"
  },
  {
    "path": "api/address/address.go",
    "content": "// Package address defines the Address API. All chains must implement this API,\n// so that addresses can be encoded/decoded.\npackage address\n\nimport \"github.com/renproject/pack\"\n\n// An Address is a human-readable representation of a public identity. It can be\n// the address of an external account, contract, or script.\ntype Address pack.String\n\n// SizeHint returns the number of bytes required to represent the address in\n// binary.\nfunc (addr Address) SizeHint() int {\n\treturn pack.String(addr).SizeHint()\n}\n\n// Marshal the address to binary. You should not call this function directly,\n// unless you are implementing marshalling for a container type.\nfunc (addr Address) Marshal(buf []byte, rem int) ([]byte, int, error) {\n\treturn pack.String(addr).Marshal(buf, rem)\n}\n\n// Unmarshal the address from binary. You should not call this function\n// directly, unless you are implementing unmarshalling for a container type.\nfunc (addr *Address) Unmarshal(buf []byte, rem int) ([]byte, int, error) {\n\treturn (*pack.String)(addr).Unmarshal(buf, rem)\n}\n\n// RawAddress is an address that has been decoded into its binary form.\ntype RawAddress pack.Bytes\n\n// SizeHint returns the number of bytes required to represent the address in\n// binary.\nfunc (addr RawAddress) SizeHint() int {\n\treturn pack.Bytes(addr).SizeHint()\n}\n\n// Marshal the address to binary. You should not call this function directly,\n// unless you are implementing marshalling for a container type.\nfunc (addr RawAddress) Marshal(buf []byte, rem int) ([]byte, int, error) {\n\treturn pack.Bytes(addr).Marshal(buf, rem)\n}\n\n// Unmarshal the address from binary. You should not call this function\n// directly, unless you are implementing unmarshalling for a container type.\nfunc (addr *RawAddress) Unmarshal(buf []byte, rem int) ([]byte, int, error) {\n\treturn (*pack.Bytes)(addr).Unmarshal(buf, rem)\n}\n\n// The Encoder interface is used to convert raw addresses into human-readable\n// addresses.\ntype Encoder interface {\n\tEncodeAddress(RawAddress) (Address, error)\n}\n\n// The Decoder interfaces is used to convert human-readable addresses into raw\n// addresses.\ntype Decoder interface {\n\tDecodeAddress(Address) (RawAddress, error)\n}\n\n// The EncodeDecoder interfaces combines encoding and decoding functionality\n// into one interface.\ntype EncodeDecoder interface {\n\tEncoder\n\tDecoder\n}\n"
  },
  {
    "path": "api/contract/contract.go",
    "content": "// Package contract defines the Contract API. All chains that have \"smart\n// contracts\" should implement this API. UTXO-based chains that support\n// scripting must not attempt to implementing scripting using this API.\npackage contract\n\nimport (\n\t\"context\"\n\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/pack\"\n)\n\n// CallData is used to specify a function and its parameters when invoking\n// business logic on a contract.\ntype CallData pack.Bytes\n\n// SizeHint returns the number of bytes required to represent the calldata in\n// binary.\nfunc (data CallData) SizeHint() int {\n\treturn pack.Bytes(data).SizeHint()\n}\n\n// Marshal the address to binary. You should not call this function directly,\n// unless you are implementing marshalling for a container type.\nfunc (data CallData) Marshal(buf []byte, rem int) ([]byte, int, error) {\n\treturn pack.Bytes(data).Marshal(buf, rem)\n}\n\n// Unmarshal the address from binary. You should not call this function\n// directly, unless you are implementing unmarshalling for a container type.\nfunc (data *CallData) Unmarshal(buf []byte, rem int) ([]byte, int, error) {\n\treturn (*pack.Bytes)(data).Unmarshal(buf, rem)\n}\n\n// The Caller interface defines the functionality required to call readonly\n// functions on a contract. Calling functions that mutate contract state should\n// be done using the Account API.\ntype Caller interface {\n\t// CallContract at the specified address, using the specified calldata as\n\t// input (this encodes the function and its parameters). The function output\n\t// is returned as raw uninterpreted bytes. It is up to the application to\n\t// interpret these bytes in a meaningful way.  If the call cannot be\n\t// completed before the context is done, or the call is invalid, then an\n\t// error should be returned.\n\tCallContract(context.Context, address.Address, CallData) (pack.Bytes, error)\n}\n"
  },
  {
    "path": "api/gas/gas.go",
    "content": "// Package gas defines the Gas API. All chains that support transactions (either\n// account-based or utxo-based) should implement this API. This API is used to\n// understand the current recommended gas costs required to get confirmations in\n// a reasonable amount of time.\npackage gas\n\nimport (\n\t\"context\"\n\n\t\"github.com/renproject/pack\"\n)\n\n// The Estimator interface defines the functionality required to know the\n// current recommended gas price per gas unit and gas cap per gas unit. Not all\n// chains have the concept of a gas cap, in which case it should be set to be\n// equal to the gas price.\ntype Estimator interface {\n\t// EstimateGas base/price that should be used in order to get a transaction\n\t// confirmed within a reasonable amount of time. The precise definition of\n\t// \"reasonable amount of time\" varies from chain to chain, and so is left\n\t// open to interpretation by the implementation.\n\n\t// For example, in Bitcoin, the gas price (and gas cap) would be the\n\t// recommended SATs-per-byte required to get a transaction into the next\n\t// block.\n\n\t// In Ethereum without EIP-1559, the gas price (and gas cap) would be the\n\t// recommended GWEI-per-gas required to get a transaction into one of the\n\t// next few blocks (because blocks happen a lot faster). In Ethereum with\n\t// EIP1559, the gas price and gas cap would be back calculated given the gas\n\t// cap and an estimate of the current gas base.\n\t//\n\t// The assumption is that the total gas cost will be gasLimit * gasPrice <\n\t// gasLimit * gasCap. If chain nodes give back values based on different\n\t// assumptions, then the values must be normalised as needed.\n\tEstimateGas(context.Context) (gasPrice, gasCap pack.U256, err error)\n}\n"
  },
  {
    "path": "api/utxo/utxo.go",
    "content": "// Package utxo defines the UTXO API. All chains that use a utxo-based model\n// should implement this API. The UTXO API is used to send and confirm\n// transactions between addresses.\npackage utxo\n\nimport (\n\t\"context\"\n\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/pack\"\n)\n\n// An Outpoint identifies a specific output produced by a transaction.\ntype Outpoint struct {\n\tHash  pack.Bytes `json:\"hash\"`\n\tIndex pack.U32   `json:\"index\"`\n}\n\n// An Output is produced by a transaction. It includes the conditions required\n// to spend the output (called the pubkey script, based on Bitcoin).\ntype Output struct {\n\tOutpoint     `json:\"outpoint\"`\n\tValue        pack.U256  `json:\"value\"`\n\tPubKeyScript pack.Bytes `json:\"pubKeyScript\"`\n}\n\n// An Input specifies an existing output, produced by a previous transaction, to\n// be consumed by another transaction. It includes the script that meets the\n// conditions specified by the consumed output (called the sig script, based on\n// Bitcoin).\ntype Input struct {\n\tOutput    `json:\"output\"`\n\tSigScript pack.Bytes `json:\"sigScript\"`\n}\n\n// A Recipient specifies an address, and an amount, for which a transaction will\n// produce an output. Depending on the output, the address can take on different\n// formats (e.g. in Bitcoin, addresses can be P2PK, P2PKH, or P2SH).\ntype Recipient struct {\n\tTo    address.Address `json:\"to\"`\n\tValue pack.U256       `json:\"value\"`\n}\n\n// The Tx interfaces defines the functionality that must be exposed by\n// utxo-based transactions.\ntype Tx interface {\n\t// Hash returns the hash that uniquely identifies the transaction.\n\t// Generally, hashes are irreversible hash functions that consume the\n\t// content of the transaction.\n\tHash() (pack.Bytes, error)\n\n\t// Inputs consumed by the transaction.\n\tInputs() ([]Input, error)\n\n\t// Outputs produced by the transaction.\n\tOutputs() ([]Output, error)\n\n\t// Sighashes that must be signed before the transaction can be submitted by\n\t// the client.\n\tSighashes() ([]pack.Bytes32, error)\n\n\t// Sign the transaction by injecting signatures for the required sighashes.\n\t// The serialized public key used to sign the sighashes should also be\n\t// specified whenever it is available.\n\tSign([]pack.Bytes65, pack.Bytes) error\n\n\t// Serialize the transaction into bytes. This is the format in which the\n\t// transaction will be submitted by the client.\n\tSerialize() (pack.Bytes, error)\n}\n\n// The TxBuilder interface defines the functionality required to build\n// account-based transactions. Most chain implementations require additional\n// information, and this should be accepted during the construction of the\n// chain-specific transaction builder.\ntype TxBuilder interface {\n\tBuildTx([]Input, []Recipient) (Tx, error)\n}\n\n// The Client interface defines the functionality required to interact with a\n// chain over RPC.\ntype Client interface {\n\t// LatestBlock returns the height of the longest blockchain.\n\tLatestBlock(context.Context) (pack.U64, error)\n\n\t// Output returns the transaction output identified by the given outpoint.\n\t// It also returns the number of confirmations for the output. If the output\n\t// cannot be found before the context is done, or the output is invalid,\n\t// then an error should be returned. This method will not error, even if the\n\t// output has been spent.\n\tOutput(context.Context, Outpoint) (Output, pack.U64, error)\n\n\t// UnspentOutput returns the unspent transaction output identified by the\n\t// given outpoint. It also returns the number of confirmations for the\n\t// output. If the output cannot be found before the context is done, the\n\t// output is invalid, or the output has been spent, then an error should be\n\t// returned.\n\tUnspentOutput(context.Context, Outpoint) (Output, pack.U64, error)\n\n\t// SubmitTx to the underlying chain. If the transaction cannot be found\n\t// before the context is done, or the transaction is invalid, then an error\n\t// should be returned.\n\tSubmitTx(context.Context, Tx) error\n\n\t// TxSenders returns the senders' addresses of the transaction.\n\tTxSenders(context.Context, pack.Bytes) ([]pack.String, error)\n}\n"
  },
  {
    "path": "chain/arbitrum/address.go",
    "content": "package arbitrum\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\ntype (\n\t// AddressEncodeDecoder re-exports evm.AddressEncodeDecoder.\n\tAddressEncodeDecoder = evm.AddressEncodeDecoder\n\n\t// AddressEncoder re-exports evm.AddressEncoder.\n\tAddressEncoder = evm.AddressEncoder\n\n\t// AddressDecoder re-exports evm.AddressDecoder.\n\tAddressDecoder = evm.AddressDecoder\n\n\t// Address re-exports evm.Address.\n\tAddress = evm.Address\n)\n\nvar (\n\t// NewAddressEncodeDecoder re-exports evm.NewAddressEncodeDecoder.\n\tNewAddressEncodeDecoder = evm.NewAddressEncodeDecoder\n\n\t// NewAddressDecoder re-exports evm.NewAddressDecoder.\n\tNewAddressDecoder = evm.NewAddressDecoder\n\n\t// NewAddressEncoder re-exports evm.NewAddressEncoder.\n\tNewAddressEncoder = evm.NewAddressEncoder\n\n\t// NewAddressFromHex re-exports evm.NewAddressFromHex.\n\tNewAddressFromHex = evm.NewAddressFromHex\n)\n"
  },
  {
    "path": "chain/arbitrum/address_test.go",
    "content": "package arbitrum_test\n\nimport (\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"testing/quick\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n\t\"github.com/renproject/multichain/chain/arbitrum\"\n\t\"github.com/renproject/surge\"\n)\n\nvar _ = Describe(\"Address\", func() {\n\tContext(\"when unmarshaling and unmarshaling\", func() {\n\t\tIt(\"should equal itself\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\taddr := arbitrum.Address(x)\n\t\t\t\tExpect(addr.SizeHint()).To(Equal(20))\n\n\t\t\t\tbytes, err := surge.ToBinary(addr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tvar newAddr arbitrum.Address\n\t\t\t\terr = surge.FromBinary(&newAddr, bytes)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tExpect(addr).To(Equal(newAddr))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when unmarshaling and unmarshaling to/from JSON\", func() {\n\t\tIt(\"should equal itself\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\taddr := arbitrum.Address(x)\n\n\t\t\t\tbytes, err := json.Marshal(addr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tvar newAddr arbitrum.Address\n\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tExpect(addr).To(Equal(newAddr))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\n\t\tContext(\"when the address is invalid hex\", func() {\n\t\t\tIt(\"should return an error\", func() {\n\t\t\t\tf := func(x [40]byte) bool {\n\t\t\t\t\tbytes, err := json.Marshal(string(x[:]))\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tvar newAddr arbitrum.Address\n\t\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\terr := quick.Check(f, nil)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t})\n\t\t})\n\n\t\tContext(\"when the address is invalid length\", func() {\n\t\t\tIt(\"should return an error\", func() {\n\t\t\t\tf := func(x [10]byte) bool {\n\t\t\t\t\taddr := hex.EncodeToString(x[:])\n\t\t\t\t\tbytes, err := json.Marshal(addr)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tvar newAddr arbitrum.Address\n\t\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\terr := quick.Check(f, nil)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t})\n\t\t})\n\t})\n\n\tContext(\"when unmarshalling random data\", func() {\n\t\tIt(\"should not panic\", func() {\n\t\t\tf := func(x []byte) bool {\n\t\t\t\tvar addr arbitrum.Address\n\t\t\t\tExpect(func() { addr.Unmarshal(x, surge.MaxBytes) }).ToNot(Panic())\n\t\t\t\tExpect(func() { json.Unmarshal(x, &addr) }).ToNot(Panic())\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/arbitrum/client.go",
    "content": "package arbitrum\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\nconst (\n\t// DefaultClientRPCURL is the RPC URL used by default, to interact with the\n\t// arbitrum node.\n\tDefaultClientRPCURL = \"http://127.0.0.1:8547\"\n)\n\n// Client re-exports evm.Client.\ntype Client = evm.Client\n\n// NewClient re-exports evm.NewClient.\nvar NewClient = evm.NewClient\n"
  },
  {
    "path": "chain/arbitrum/encode.go",
    "content": "package arbitrum\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\n// Payload re-exports evm.Payload.\ntype Payload = evm.Payload\n\n// Encode re-exports evm.Encode.\nvar Encode = evm.Encode\n"
  },
  {
    "path": "chain/arbitrum/encode_test.go",
    "content": "package arbitrum_test\n\nimport (\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"math\"\n\t\"testing/quick\"\n\n\t\"github.com/renproject/multichain/chain/arbitrum\"\n\n\t\"github.com/renproject/pack\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/ginkgo/extensions/table\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Encoding\", func() {\n\tContext(\"when encoding bytes\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x []byte) bool {\n\t\t\t\targ := pack.NewBytes(x)\n\n\t\t\t\tresBytes := arbitrum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\n\t\t\t\texpectedBytes := make([]byte, int(math.Ceil(float64(len(x))/32)*32))\n\t\t\t\tcopy(expectedBytes, x)\n\t\t\t\t// Note: since the first parameter has a dynamic length, the\n\t\t\t\t// first 32 bytes instead contain a pointer to the data.\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", 32) + fmt.Sprintf(\"%064x\", len(x)) + hex.EncodeToString(expectedBytes)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 32 bytes\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [32]byte) bool {\n\t\t\t\targ := pack.NewBytes32(x)\n\n\t\t\t\tresBytes := arbitrum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := hex.EncodeToString(x[:])\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 8-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint8) bool {\n\t\t\t\targ := pack.NewU8(x)\n\n\t\t\t\tresBytes := arbitrum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 16-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint16) bool {\n\t\t\t\targ := pack.NewU16(x)\n\n\t\t\t\tresBytes := arbitrum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 32-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint32) bool {\n\t\t\t\targ := pack.NewU32(x)\n\n\t\t\t\tresBytes := arbitrum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 64-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint64) bool {\n\t\t\t\targ := pack.NewU64(x)\n\n\t\t\t\tresBytes := arbitrum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 128-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [16]byte) bool {\n\t\t\t\targ := pack.NewU128(x)\n\n\t\t\t\tresBytes := arbitrum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 256-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [32]byte) bool {\n\t\t\t\targ := pack.NewU256(x)\n\n\t\t\t\tresBytes := arbitrum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding Ethereum addresses\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\targ := arbitrum.Address(x)\n\n\t\t\t\tresBytes := arbitrum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\n\t\t\t\texpectedBytes := make([]byte, 32)\n\t\t\t\tcopy(expectedBytes, x[:])\n\t\t\t\texpectedString := hex.EncodeToString(expectedBytes)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding an unsupported type\", func() {\n\t\tIt(\"should panic\", func() {\n\t\t\tf := func(x bool) bool {\n\t\t\t\targ := pack.NewBool(x)\n\t\t\t\tExpect(func() { arbitrum.Encode(arg) }).To(Panic())\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\ttype testCase struct {\n\t\taddr   string\n\t\tamount uint64\n\t\thash   string\n\t\tresult string\n\t}\n\n\ttestCases := []testCase{\n\t\t{\n\t\t\taddr:   \"797522Fb74d42bB9fbF6b76dEa24D01A538d5D66\",\n\t\t\tamount: 10000,\n\t\t\thash:   \"702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed\",\n\t\t\tresult: \"797522fb74d42bb9fbf6b76dea24d01a538d5d660000000000000000000000000000000000000000000000000000000000000000000000000000000000002710702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed\",\n\t\t},\n\t\t{\n\t\t\taddr:   \"58afb504ef2444a267b8c7ce57279417f1377ceb\",\n\t\t\tamount: 50000000000000000,\n\t\t\thash:   \"dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93\",\n\t\t\tresult: \"58afb504ef2444a267b8c7ce57279417f1377ceb00000000000000000000000000000000000000000000000000000000000000000000000000b1a2bc2ec50000dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93\",\n\t\t},\n\t\t{\n\t\t\taddr:   \"0000000000000000000000000000000000000000\",\n\t\t\tamount: 0,\n\t\t\thash:   \"0000000000000000000000000000000000000000000000000000000000000000\",\n\t\t\tresult: \"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n\t\t},\n\t}\n\n\tDescribeTable(\"when encoding args\",\n\t\tfunc(test testCase) {\n\t\t\taddrBytes, err := hex.DecodeString(test.addr)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\tvar addr arbitrum.Address\n\t\t\tcopy(addr[:], addrBytes)\n\n\t\t\thashBytes32 := [32]byte{}\n\t\t\thashBytes, err := hex.DecodeString(test.hash)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\tcopy(hashBytes32[:], hashBytes)\n\n\t\t\targs := []interface{}{\n\t\t\t\taddr,\n\t\t\t\tpack.NewU64(test.amount),\n\t\t\t\tpack.NewBytes32(hashBytes32),\n\t\t\t}\n\t\t\tresult := arbitrum.Encode(args...)\n\t\t\tExpect(hex.EncodeToString(result)).To(Equal(test.result))\n\t\t},\n\n\t\tEntry(\"should return the same result as solidity for small transactions\", testCases[0]),\n\t\tEntry(\"should return the same result as solidity for large transactions\", testCases[1]),\n\t\tEntry(\"should return the same result as solidity for empty transactions\", testCases[2]),\n\t)\n})\n"
  },
  {
    "path": "chain/arbitrum/gas.go",
    "content": "package arbitrum\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\n// GasEstimator re-exports evm.GasEstimator.\ntype GasEstimator = evm.GasEstimator\n\n// NewGasEstimator re-exports evm.NewGasEstimator.\nvar NewGasEstimator = evm.NewGasEstimator\n"
  },
  {
    "path": "chain/arbitrum/tx.go",
    "content": "package arbitrum\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\ntype (\n\t// TxBuilder re-exports evm.TxBuilder.\n\tTxBuilder = evm.TxBuilder\n\n\t// Tx re-exports evm.Tx.\n\tTx = evm.Tx\n)\n\n// NewTxBuilder re-exports evm.NewTxBuilder.\nvar NewTxBuilder = evm.NewTxBuilder\n"
  },
  {
    "path": "chain/avalanche/address.go",
    "content": "package avalanche\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\ntype (\n\t// AddressEncodeDecoder re-exports evm.AddressEncodeDecoder.\n\tAddressEncodeDecoder = evm.AddressEncodeDecoder\n\n\t// AddressEncoder re-exports evm.AddressEncoder.\n\tAddressEncoder = evm.AddressEncoder\n\n\t// AddressDecoder re-exports evm.AddressDecoder.\n\tAddressDecoder = evm.AddressDecoder\n\n\t// Address re-exports evm.Address.\n\tAddress = evm.Address\n)\n\nvar (\n\t// NewAddressEncodeDecoder re-exports evm.NewAddressEncodeDecoder.\n\tNewAddressEncodeDecoder = evm.NewAddressEncodeDecoder\n\n\t// NewAddressDecoder re-exports evm.NewAddressDecoder.\n\tNewAddressDecoder = evm.NewAddressDecoder\n\n\t// NewAddressEncoder re-exports evm.NewAddressEncoder.\n\tNewAddressEncoder = evm.NewAddressEncoder\n\n\t// NewAddressFromHex re-exports evm.NewAddressFromHex.\n\tNewAddressFromHex = evm.NewAddressFromHex\n)\n"
  },
  {
    "path": "chain/avalanche/address_test.go",
    "content": "package avalanche_test\n\nimport (\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"testing/quick\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n\t\"github.com/renproject/multichain/chain/avalanche\"\n\t\"github.com/renproject/surge\"\n)\n\nvar _ = Describe(\"Address\", func() {\n\tContext(\"when unmarshaling and unmarshaling\", func() {\n\t\tIt(\"should equal itself\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\taddr := avalanche.Address(x)\n\t\t\t\tExpect(addr.SizeHint()).To(Equal(20))\n\n\t\t\t\tbytes, err := surge.ToBinary(addr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tvar newAddr avalanche.Address\n\t\t\t\terr = surge.FromBinary(&newAddr, bytes)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tExpect(addr).To(Equal(newAddr))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when unmarshaling and unmarshaling to/from JSON\", func() {\n\t\tIt(\"should equal itself\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\taddr := avalanche.Address(x)\n\n\t\t\t\tbytes, err := json.Marshal(addr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tvar newAddr avalanche.Address\n\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tExpect(addr).To(Equal(newAddr))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\n\t\tContext(\"when the address is invalid hex\", func() {\n\t\t\tIt(\"should return an error\", func() {\n\t\t\t\tf := func(x [40]byte) bool {\n\t\t\t\t\tbytes, err := json.Marshal(string(x[:]))\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tvar newAddr avalanche.Address\n\t\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\terr := quick.Check(f, nil)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t})\n\t\t})\n\n\t\tContext(\"when the address is invalid length\", func() {\n\t\t\tIt(\"should return an error\", func() {\n\t\t\t\tf := func(x [10]byte) bool {\n\t\t\t\t\taddr := hex.EncodeToString(x[:])\n\t\t\t\t\tbytes, err := json.Marshal(addr)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tvar newAddr avalanche.Address\n\t\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\terr := quick.Check(f, nil)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t})\n\t\t})\n\t})\n\n\tContext(\"when unmarshalling random data\", func() {\n\t\tIt(\"should not panic\", func() {\n\t\t\tf := func(x []byte) bool {\n\t\t\t\tvar addr avalanche.Address\n\t\t\t\tExpect(func() { addr.Unmarshal(x, surge.MaxBytes) }).ToNot(Panic())\n\t\t\t\tExpect(func() { json.Unmarshal(x, &addr) }).ToNot(Panic())\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/avalanche/client.go",
    "content": "package avalanche\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\nconst (\n\t// DefaultClientRPCURL is the RPC URL used by default, to interact with the\n\t// avalanche node.\n\tDefaultClientRPCURL = \"http://127.0.0.1:9650/ext/bc/C/rpc\"\n)\n\n// Client re-exports evm.Client.\ntype Client = evm.Client\n\n// NewClient re-exports evm.NewClient.\nvar NewClient = evm.NewClient\n"
  },
  {
    "path": "chain/avalanche/encode.go",
    "content": "package avalanche\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\n// Payload re-exports evm.Payload.\ntype Payload = evm.Payload\n\n// Encode re-exports evm.Encode.\nvar Encode = evm.Encode\n"
  },
  {
    "path": "chain/avalanche/encode_test.go",
    "content": "package avalanche_test\n\nimport (\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"math\"\n\t\"testing/quick\"\n\n\t\"github.com/renproject/multichain/chain/avalanche\"\n\n\t\"github.com/renproject/pack\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/ginkgo/extensions/table\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Encoding\", func() {\n\tContext(\"when encoding bytes\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x []byte) bool {\n\t\t\t\targ := pack.NewBytes(x)\n\n\t\t\t\tresBytes := avalanche.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\n\t\t\t\texpectedBytes := make([]byte, int(math.Ceil(float64(len(x))/32)*32))\n\t\t\t\tcopy(expectedBytes, x)\n\t\t\t\t// Note: since the first parameter has a dynamic length, the\n\t\t\t\t// first 32 bytes instead contain a pointer to the data.\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", 32) + fmt.Sprintf(\"%064x\", len(x)) + hex.EncodeToString(expectedBytes)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 32 bytes\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [32]byte) bool {\n\t\t\t\targ := pack.NewBytes32(x)\n\n\t\t\t\tresBytes := avalanche.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := hex.EncodeToString(x[:])\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 8-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint8) bool {\n\t\t\t\targ := pack.NewU8(x)\n\n\t\t\t\tresBytes := avalanche.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 16-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint16) bool {\n\t\t\t\targ := pack.NewU16(x)\n\n\t\t\t\tresBytes := avalanche.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 32-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint32) bool {\n\t\t\t\targ := pack.NewU32(x)\n\n\t\t\t\tresBytes := avalanche.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 64-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint64) bool {\n\t\t\t\targ := pack.NewU64(x)\n\n\t\t\t\tresBytes := avalanche.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 128-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [16]byte) bool {\n\t\t\t\targ := pack.NewU128(x)\n\n\t\t\t\tresBytes := avalanche.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 256-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [32]byte) bool {\n\t\t\t\targ := pack.NewU256(x)\n\n\t\t\t\tresBytes := avalanche.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding Ethereum addresses\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\targ := avalanche.Address(x)\n\n\t\t\t\tresBytes := avalanche.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\n\t\t\t\texpectedBytes := make([]byte, 32)\n\t\t\t\tcopy(expectedBytes, x[:])\n\t\t\t\texpectedString := hex.EncodeToString(expectedBytes)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding an unsupported type\", func() {\n\t\tIt(\"should panic\", func() {\n\t\t\tf := func(x bool) bool {\n\t\t\t\targ := pack.NewBool(x)\n\t\t\t\tExpect(func() { avalanche.Encode(arg) }).To(Panic())\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\ttype testCase struct {\n\t\taddr   string\n\t\tamount uint64\n\t\thash   string\n\t\tresult string\n\t}\n\n\ttestCases := []testCase{\n\t\t{\n\t\t\taddr:   \"797522Fb74d42bB9fbF6b76dEa24D01A538d5D66\",\n\t\t\tamount: 10000,\n\t\t\thash:   \"702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed\",\n\t\t\tresult: \"797522fb74d42bb9fbf6b76dea24d01a538d5d660000000000000000000000000000000000000000000000000000000000000000000000000000000000002710702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed\",\n\t\t},\n\t\t{\n\t\t\taddr:   \"58afb504ef2444a267b8c7ce57279417f1377ceb\",\n\t\t\tamount: 50000000000000000,\n\t\t\thash:   \"dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93\",\n\t\t\tresult: \"58afb504ef2444a267b8c7ce57279417f1377ceb00000000000000000000000000000000000000000000000000000000000000000000000000b1a2bc2ec50000dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93\",\n\t\t},\n\t\t{\n\t\t\taddr:   \"0000000000000000000000000000000000000000\",\n\t\t\tamount: 0,\n\t\t\thash:   \"0000000000000000000000000000000000000000000000000000000000000000\",\n\t\t\tresult: \"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n\t\t},\n\t}\n\n\tDescribeTable(\"when encoding args\",\n\t\tfunc(test testCase) {\n\t\t\taddrBytes, err := hex.DecodeString(test.addr)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\tvar addr avalanche.Address\n\t\t\tcopy(addr[:], addrBytes)\n\n\t\t\thashBytes32 := [32]byte{}\n\t\t\thashBytes, err := hex.DecodeString(test.hash)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\tcopy(hashBytes32[:], hashBytes)\n\n\t\t\targs := []interface{}{\n\t\t\t\taddr,\n\t\t\t\tpack.NewU64(test.amount),\n\t\t\t\tpack.NewBytes32(hashBytes32),\n\t\t\t}\n\t\t\tresult := avalanche.Encode(args...)\n\t\t\tExpect(hex.EncodeToString(result)).To(Equal(test.result))\n\t\t},\n\n\t\tEntry(\"should return the same result as solidity for small transactions\", testCases[0]),\n\t\tEntry(\"should return the same result as solidity for large transactions\", testCases[1]),\n\t\tEntry(\"should return the same result as solidity for empty transactions\", testCases[2]),\n\t)\n})\n"
  },
  {
    "path": "chain/avalanche/gas.go",
    "content": "package avalanche\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\n// GasEstimator re-exports evm.GasEstimator.\ntype GasEstimator = evm.GasEstimator\n\n// NewGasEstimator re-exports evm.NewGasEstimator.\nvar NewGasEstimator = evm.NewGasEstimator\n"
  },
  {
    "path": "chain/avalanche/tx.go",
    "content": "package avalanche\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\ntype (\n\t// TxBuilder re-exports evm.TxBuilder.\n\tTxBuilder = evm.TxBuilder\n\n\t// Tx re-exports evm.Tx.\n\tTx = evm.Tx\n)\n\n// NewTxBuilder re-exports evm.NewTxBuilder.\nvar NewTxBuilder = evm.NewTxBuilder\n"
  },
  {
    "path": "chain/bitcoin/address.go",
    "content": "package bitcoin\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/btcsuite/btcd/chaincfg\"\n\t\"github.com/btcsuite/btcutil\"\n\t\"github.com/btcsuite/btcutil/base58\"\n\t\"github.com/renproject/multichain/api/address\"\n)\n\n// AddressEncodeDecoder implements the address.EncodeDecoder interface\ntype AddressEncodeDecoder struct {\n\tAddressEncoder\n\tAddressDecoder\n}\n\n// NewAddressEncodeDecoder constructs a new AddressEncodeDecoder with the\n// chain specific configurations\nfunc NewAddressEncodeDecoder(params *chaincfg.Params) AddressEncodeDecoder {\n\treturn AddressEncodeDecoder{\n\t\tAddressEncoder: NewAddressEncoder(params),\n\t\tAddressDecoder: NewAddressDecoder(params),\n\t}\n}\n\n// AddressEncoder encapsulates the chain specific configurations and implements\n// the address.Encoder interface\ntype AddressEncoder struct {\n\tparams *chaincfg.Params\n}\n\n// NewAddressEncoder constructs a new AddressEncoder with the chain specific\n// configurations\nfunc NewAddressEncoder(params *chaincfg.Params) AddressEncoder {\n\treturn AddressEncoder{params: params}\n}\n\n// EncodeAddress implements the address.Encoder interface\nfunc (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) {\n\tswitch len(rawAddr) {\n\tcase 25:\n\t\treturn encoder.encodeBase58(rawAddr)\n\tcase 21, 33:\n\t\treturn encoder.encodeBech32(rawAddr)\n\tdefault:\n\t\treturn address.Address(\"\"), fmt.Errorf(\"non-exhaustive pattern: address length %v\", len(rawAddr))\n\t}\n}\n\nfunc (encoder AddressEncoder) encodeBase58(rawAddr address.RawAddress) (address.Address, error) {\n\t// Validate that the base58 address is in fact in correct format.\n\tencodedAddr := base58.Encode([]byte(rawAddr))\n\tif _, err := btcutil.DecodeAddress(encodedAddr, encoder.params); err != nil {\n\t\treturn address.Address(\"\"), err\n\t}\n\n\treturn address.Address(encodedAddr), nil\n}\n\nfunc (encoder AddressEncoder) encodeBech32(rawAddr address.RawAddress) (address.Address, error) {\n\tswitch len(rawAddr) {\n\tcase 21:\n\t\taddr, err := btcutil.NewAddressWitnessPubKeyHash(rawAddr[1:], encoder.params)\n\t\tif err != nil {\n\t\t\treturn address.Address(\"\"), fmt.Errorf(\"new address witness pubkey hash: %v\", err)\n\t\t}\n\t\treturn address.Address(addr.EncodeAddress()), nil\n\tcase 33:\n\t\taddr, err := btcutil.NewAddressWitnessScriptHash(rawAddr[1:], encoder.params)\n\t\tif err != nil {\n\t\t\treturn address.Address(\"\"), fmt.Errorf(\"new address witness script hash: %v\", err)\n\t\t}\n\t\treturn address.Address(addr.EncodeAddress()), nil\n\tdefault:\n\t\treturn address.Address(\"\"), fmt.Errorf(\"non-exhaustive pattern: bech32 address length %v\", len(rawAddr))\n\t}\n}\n\n// AddressDecoder encapsulates the chain specific configurations and implements\n// the address.Decoder interface\ntype AddressDecoder struct {\n\tparams *chaincfg.Params\n}\n\n// NewAddressDecoder constructs a new AddressDecoder with the chain specific\n// configurations\nfunc NewAddressDecoder(params *chaincfg.Params) AddressDecoder {\n\treturn AddressDecoder{params: params}\n}\n\n// DecodeAddress implements the address.Decoder interface\nfunc (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) {\n\t// The btcutil package assumes the address being decoded only contains\n\t// valid ASCII characters between 0-255.\n\tfor _, c := range addr {\n\t\tif c > 255 {\n\t\t\treturn nil, fmt.Errorf(\"invalid address: bad character %v\", c)\n\t\t}\n\t}\n\tdecodedAddr, err := btcutil.DecodeAddress(string(addr), decoder.params)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"decode address: %v\", err)\n\t}\n\tif !decodedAddr.IsForNet(decoder.params) {\n\t\treturn nil, fmt.Errorf(\"address of different network\")\n\t}\n\n\tswitch a := decodedAddr.(type) {\n\tcase *btcutil.AddressPubKeyHash, *btcutil.AddressScriptHash:\n\t\treturn address.RawAddress(base58.Decode(string(addr))), nil\n\tcase *btcutil.AddressWitnessPubKeyHash:\n\t\trawAddr := append([]byte{a.WitnessVersion()}, a.WitnessProgram()...)\n\t\treturn address.RawAddress(rawAddr), nil\n\tcase *btcutil.AddressWitnessScriptHash:\n\t\trawAddr := append([]byte{a.WitnessVersion()}, a.WitnessProgram()...)\n\t\treturn address.RawAddress(rawAddr), nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"non-exhaustive pattern: address %T\", a)\n\t}\n}\n"
  },
  {
    "path": "chain/bitcoin/address_test.go",
    "content": "package bitcoin_test\n\nimport (\n\t\"github.com/btcsuite/btcd/chaincfg\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/multichain/chain/bitcoin\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Bitcoin\", func() {\n\tContext(\"when decoding address with invalid characters\", func() {\n\t\tIt(\"should not panic\", func() {\n\t\t\tdecoder := bitcoin.NewAddressDecoder(&chaincfg.MainNetParams)\n\t\t\tExpect(func() {\n\t\t\t\t_, err := decoder.DecodeAddress(address.Address(rune(256)))\n\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t}).ToNot(Panic())\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/bitcoin/bitcoin.go",
    "content": "package bitcoin\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"math/rand\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/btcsuite/btcd/btcjson\"\n\t\"github.com/btcsuite/btcd/chaincfg/chainhash\"\n\t\"github.com/btcsuite/btcutil\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/multichain/api/utxo\"\n\t\"github.com/renproject/pack\"\n)\n\nconst (\n\t// DefaultClientTimeout used by the Client.\n\tDefaultClientTimeout = time.Minute\n\t// DefaultClientTimeoutRetry used by the Client.\n\tDefaultClientTimeoutRetry = time.Second\n\t// DefaultClientHost used by the Client. This should only be used for local\n\t// deployments of the multichain.\n\tDefaultClientHost = \"http://0.0.0.0:18443\"\n\t// DefaultClientUser used by the Client. This is insecure, and should only\n\t// be used for local — or publicly accessible — deployments of the\n\t// multichain.\n\tDefaultClientUser = \"user\"\n\t// DefaultClientPassword used by the Client. This is insecure, and should\n\t// only be used for local — or publicly accessible — deployments of the\n\t// multichain.\n\tDefaultClientPassword = \"password\"\n)\n\n// ClientOptions are used to parameterise the behaviour of the Client.\ntype ClientOptions struct {\n\tTimeout      time.Duration\n\tTimeoutRetry time.Duration\n\tHost         string\n\tUser         string\n\tPassword     string\n}\n\n// DefaultClientOptions returns ClientOptions with the default settings. These\n// settings are valid for use with the default local deployment of the\n// multichain. In production, the host, user, and password should be changed.\nfunc DefaultClientOptions() ClientOptions {\n\treturn ClientOptions{\n\t\tTimeout:      DefaultClientTimeout,\n\t\tTimeoutRetry: DefaultClientTimeoutRetry,\n\t\tHost:         DefaultClientHost,\n\t\tUser:         DefaultClientUser,\n\t\tPassword:     DefaultClientPassword,\n\t}\n}\n\n// WithHost sets the URL of the Bitcoin node.\nfunc (opts ClientOptions) WithHost(host string) ClientOptions {\n\topts.Host = host\n\treturn opts\n}\n\n// WithUser sets the username that will be used to authenticate with the Bitcoin\n// node.\nfunc (opts ClientOptions) WithUser(user string) ClientOptions {\n\topts.User = user\n\treturn opts\n}\n\n// WithPassword sets the password that will be used to authenticate with the\n// Bitcoin node.\nfunc (opts ClientOptions) WithPassword(password string) ClientOptions {\n\topts.Password = password\n\treturn opts\n}\n\n// A Client interacts with an instance of the Bitcoin network using the RPC\n// interface exposed by a Bitcoin node.\ntype Client interface {\n\tutxo.Client\n\t// UnspentOutputs spendable by the given address.\n\tUnspentOutputs(ctx context.Context, minConf, maxConf int64, address address.Address) ([]utxo.Output, error)\n\t// Confirmations of a transaction in the Bitcoin network.\n\tConfirmations(ctx context.Context, txHash pack.Bytes) (int64, error)\n\t// EstimateSmartFee\n\tEstimateSmartFee(ctx context.Context, numBlocks int64) (float64, error)\n\t// EstimateFeeLegacy\n\tEstimateFeeLegacy(ctx context.Context, numBlocks int64) (float64, error)\n}\n\ntype client struct {\n\topts       ClientOptions\n\thttpClient http.Client\n}\n\n// NewClient returns a new Client.\nfunc NewClient(opts ClientOptions) Client {\n\thttpClient := http.Client{}\n\thttpClient.Timeout = opts.Timeout\n\treturn &client{\n\t\topts:       opts,\n\t\thttpClient: httpClient,\n\t}\n}\n\n// LatestBlock returns the height of the longest blockchain.\nfunc (client *client) LatestBlock(ctx context.Context) (pack.U64, error) {\n\tvar resp int64\n\tif err := client.send(ctx, &resp, \"getblockcount\"); err != nil {\n\t\treturn pack.NewU64(0), fmt.Errorf(\"get block count: %v\", err)\n\t}\n\tif resp < 0 {\n\t\treturn pack.NewU64(0), fmt.Errorf(\"unexpected block count, expected > 0, got: %v\", resp)\n\t}\n\n\treturn pack.NewU64(uint64(resp)), nil\n}\n\n// Output associated with an outpoint, and its number of confirmations.\nfunc (client *client) Output(ctx context.Context, outpoint utxo.Outpoint) (utxo.Output, pack.U64, error) {\n\tresp := btcjson.TxRawResult{}\n\thash := chainhash.Hash{}\n\tcopy(hash[:], outpoint.Hash)\n\tif err := client.send(ctx, &resp, \"getrawtransaction\", hash.String(), 1); err != nil {\n\t\treturn utxo.Output{}, pack.NewU64(0), fmt.Errorf(\"bad \\\"getrawtransaction\\\": %v\", err)\n\t}\n\tif outpoint.Index.Uint32() >= uint32(len(resp.Vout)) {\n\t\treturn utxo.Output{}, pack.NewU64(0), fmt.Errorf(\"bad index: %v is out of range\", outpoint.Index)\n\t}\n\tvout := resp.Vout[outpoint.Index.Uint32()]\n\tamount, err := btcutil.NewAmount(vout.Value)\n\tif err != nil {\n\t\treturn utxo.Output{}, pack.NewU64(0), fmt.Errorf(\"bad amount: %v\", err)\n\t}\n\tif amount < 0 {\n\t\treturn utxo.Output{}, pack.NewU64(0), fmt.Errorf(\"bad amount: %v\", amount)\n\t}\n\tpubKeyScript, err := hex.DecodeString(vout.ScriptPubKey.Hex)\n\tif err != nil {\n\t\treturn utxo.Output{}, pack.NewU64(0), fmt.Errorf(\"bad pubkey script: %v\", err)\n\t}\n\toutput := utxo.Output{\n\t\tOutpoint:     outpoint,\n\t\tValue:        pack.NewU256FromU64(pack.NewU64(uint64(amount))),\n\t\tPubKeyScript: pack.NewBytes(pubKeyScript),\n\t}\n\treturn output, pack.NewU64(resp.Confirmations), nil\n}\n\n// UnspentOutput returns the unspent transaction output identified by the\n// given outpoint. It also returns the number of confirmations for the\n// output. If the output cannot be found before the context is done, the\n// output is invalid, or the output has been spent, then an error should be\n// returned.\nfunc (client *client) UnspentOutput(ctx context.Context, outpoint utxo.Outpoint) (utxo.Output, pack.U64, error) {\n\tresp := btcjson.GetTxOutResult{}\n\thash := chainhash.Hash{}\n\tcopy(hash[:], outpoint.Hash)\n\tif err := client.send(ctx, &resp, \"gettxout\", hash.String(), outpoint.Index.Uint32()); err != nil {\n\t\treturn utxo.Output{}, pack.NewU64(0), fmt.Errorf(\"bad \\\"gettxout\\\": %v\", err)\n\t}\n\tamount, err := btcutil.NewAmount(resp.Value)\n\tif err != nil {\n\t\treturn utxo.Output{}, pack.NewU64(0), fmt.Errorf(\"bad amount: %v\", err)\n\t}\n\tif amount < 0 {\n\t\treturn utxo.Output{}, pack.NewU64(0), fmt.Errorf(\"bad amount: %v\", amount)\n\t}\n\tif resp.Confirmations < 0 {\n\t\treturn utxo.Output{}, pack.NewU64(0), fmt.Errorf(\"bad confirmations: %v\", resp.Confirmations)\n\t}\n\tpubKeyScript, err := hex.DecodeString(resp.ScriptPubKey.Hex)\n\tif err != nil {\n\t\treturn utxo.Output{}, pack.NewU64(0), fmt.Errorf(\"bad pubkey script: %v\", err)\n\t}\n\toutput := utxo.Output{\n\t\tOutpoint:     outpoint,\n\t\tValue:        pack.NewU256FromU64(pack.NewU64(uint64(amount))),\n\t\tPubKeyScript: pack.NewBytes(pubKeyScript),\n\t}\n\treturn output, pack.NewU64(uint64(resp.Confirmations)), nil\n}\n\n// SubmitTx to the Bitcoin network.\nfunc (client *client) SubmitTx(ctx context.Context, tx utxo.Tx) error {\n\tserial, err := tx.Serialize()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"bad tx: %v\", err)\n\t}\n\tresp := \"\"\n\tif err := client.send(ctx, &resp, \"sendrawtransaction\", hex.EncodeToString(serial)); err != nil {\n\t\treturn fmt.Errorf(\"bad \\\"sendrawtransaction\\\": %v\", err)\n\t}\n\treturn nil\n}\n\n// TxSenders returns the senders of the transaction.\nfunc (client *client) TxSenders(ctx context.Context, id pack.Bytes) ([]pack.String, error) {\n\tresp, err := client.getRawTransaction(ctx, id)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"bad \\\"getrawtransaction\\\": %v\", err)\n\t}\n\taddrs := make([]pack.String, 0)\n\tfor _, vin := range resp.Vin {\n\t\ttxHash, err := chainhash.NewHashFromStr(vin.Txid)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\trawTx, err := client.getRawTransaction(ctx, txHash.CloneBytes())\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tfor _, addr := range rawTx.Vout[int(vin.Vout)].ScriptPubKey.Addresses {\n\t\t\taddrs = append(addrs, pack.String(addr))\n\t\t}\n\t}\n\treturn addrs, nil\n}\n\n// UnspentOutputs spendable by the given address.\nfunc (client *client) UnspentOutputs(ctx context.Context, minConf, maxConf int64, addr address.Address) ([]utxo.Output, error) {\n\tresp := []btcjson.ListUnspentResult{}\n\tif err := client.send(ctx, &resp, \"listunspent\", minConf, maxConf, []string{string(addr)}); err != nil && err != io.EOF {\n\t\treturn []utxo.Output{}, fmt.Errorf(\"bad \\\"listunspent\\\": %v\", err)\n\t}\n\toutputs := make([]utxo.Output, len(resp))\n\tfor i := range outputs {\n\t\tamount, err := btcutil.NewAmount(resp[i].Amount)\n\t\tif err != nil {\n\t\t\treturn []utxo.Output{}, fmt.Errorf(\"bad amount: %v\", err)\n\t\t}\n\t\tif amount < 0 {\n\t\t\treturn []utxo.Output{}, fmt.Errorf(\"bad amount: %v\", amount)\n\t\t}\n\t\tpubKeyScript, err := hex.DecodeString(resp[i].ScriptPubKey)\n\t\tif err != nil {\n\t\t\treturn []utxo.Output{}, fmt.Errorf(\"bad pubkey script: %v\", err)\n\t\t}\n\t\ttxid, err := chainhash.NewHashFromStr(resp[i].TxID)\n\t\tif err != nil {\n\t\t\treturn []utxo.Output{}, fmt.Errorf(\"bad txid: %v\", err)\n\t\t}\n\t\toutputs[i] = utxo.Output{\n\t\t\tOutpoint: utxo.Outpoint{\n\t\t\t\tHash:  pack.NewBytes(txid[:]),\n\t\t\t\tIndex: pack.NewU32(resp[i].Vout),\n\t\t\t},\n\t\t\tValue:        pack.NewU256FromU64(pack.NewU64(uint64(amount))),\n\t\t\tPubKeyScript: pack.NewBytes(pubKeyScript),\n\t\t}\n\t}\n\treturn outputs, nil\n}\n\n// Confirmations of a transaction in the Bitcoin network.\nfunc (client *client) Confirmations(ctx context.Context, txHash pack.Bytes) (int64, error) {\n\tresp := btcjson.GetTransactionResult{}\n\n\tsize := len(txHash)\n\ttxHashReversed := make([]byte, size)\n\tcopy(txHashReversed[:], txHash[:])\n\tfor i := 0; i < size/2; i++ {\n\t\ttxHashReversed[i], txHashReversed[size-1-i] = txHashReversed[size-1-i], txHashReversed[i]\n\t}\n\n\tif err := client.send(ctx, &resp, \"gettransaction\", hex.EncodeToString(txHashReversed)); err != nil {\n\t\treturn 0, fmt.Errorf(\"bad \\\"gettransaction\\\": %v\", err)\n\t}\n\tconfirmations := resp.Confirmations\n\tif confirmations < 0 {\n\t\tconfirmations = 0\n\t}\n\treturn confirmations, nil\n}\n\n// EstimateSmartFee fetches the estimated bitcoin network fees to be paid (in\n// BTC per kilobyte) needed for a transaction to be confirmed within `numBlocks`\n// blocks. An error will be returned if the bitcoin node hasn't observed enough\n// blocks to make an estimate for the provided target `numBlocks`.\nfunc (client *client) EstimateSmartFee(ctx context.Context, numBlocks int64) (float64, error) {\n\tresp := btcjson.EstimateSmartFeeResult{}\n\n\tif err := client.send(ctx, &resp, \"estimatesmartfee\", numBlocks); err != nil {\n\t\treturn 0.0, fmt.Errorf(\"estimating smart fee: %v\", err)\n\t}\n\n\tif resp.Errors != nil && len(resp.Errors) > 0 {\n\t\treturn 0.0, fmt.Errorf(\"estimating smart fee: %v\", resp.Errors[0])\n\t}\n\n\treturn *resp.FeeRate, nil\n}\n\nfunc (client *client) EstimateFeeLegacy(ctx context.Context, numBlocks int64) (float64, error) {\n\tvar resp float64\n\n\tswitch numBlocks {\n\tcase int64(0):\n\t\tif err := client.send(ctx, &resp, \"estimatefee\"); err != nil {\n\t\t\treturn 0.0, fmt.Errorf(\"estimating fee: %v\", err)\n\t\t}\n\tdefault:\n\t\tif err := client.send(ctx, &resp, \"estimatefee\", numBlocks); err != nil {\n\t\t\treturn 0.0, fmt.Errorf(\"estimating fee: %v\", err)\n\t\t}\n\t}\n\n\treturn resp, nil\n}\n\nfunc (client *client) getRawTransaction(ctx context.Context, txhash pack.Bytes) (btcjson.TxRawResult, error) {\n\tresp := btcjson.TxRawResult{}\n\thash := chainhash.Hash{}\n\tcopy(hash[:], txhash)\n\tif err := client.send(ctx, &resp, \"getrawtransaction\", hash.String(), 1); err != nil {\n\t\treturn resp, fmt.Errorf(\"bad \\\"getrawtransaction\\\": %v\", err)\n\t}\n\treturn resp, nil\n}\n\nfunc (client *client) send(ctx context.Context, resp interface{}, method string, params ...interface{}) error {\n\t// Encode the request.\n\tdata, err := encodeRequest(method, params)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn retry(ctx, client.opts.TimeoutRetry, func() error {\n\t\t// Create request and add basic authentication headers. The context is\n\t\t// not attached to the request, and instead we all each attempt to run\n\t\t// for the timeout duration, and we keep attempting until success, or\n\t\t// the context is done.\n\t\treq, err := http.NewRequest(\"POST\", client.opts.Host, bytes.NewBuffer(data))\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"building http request: %v\", err)\n\t\t}\n\t\treq.SetBasicAuth(client.opts.User, client.opts.Password)\n\n\t\t// Send the request and decode the response.\n\t\tres, err := client.httpClient.Do(req)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"sending http request: %v\", err)\n\t\t}\n\t\tdefer res.Body.Close()\n\t\tif err := decodeResponse(resp, res.Body); err != nil {\n\t\t\treturn fmt.Errorf(\"decoding http response: %v\", err)\n\t\t}\n\t\treturn nil\n\t})\n}\n\nfunc encodeRequest(method string, params []interface{}) ([]byte, error) {\n\trawParams, err := json.Marshal(params)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"encoding params: %v\", err)\n\t}\n\treq := struct {\n\t\tVersion string          `json:\"version\"`\n\t\tID      int             `json:\"id\"`\n\t\tMethod  string          `json:\"method\"`\n\t\tParams  json.RawMessage `json:\"params\"`\n\t}{\n\t\tVersion: \"2.0\",\n\t\tID:      rand.Int(),\n\t\tMethod:  method,\n\t\tParams:  rawParams,\n\t}\n\trawReq, err := json.Marshal(req)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"encoding request: %v\", err)\n\t}\n\treturn rawReq, nil\n}\n\nfunc decodeResponse(resp interface{}, r io.Reader) error {\n\tres := struct {\n\t\tVersion string           `json:\"version\"`\n\t\tID      int              `json:\"id\"`\n\t\tResult  *json.RawMessage `json:\"result\"`\n\t\tError   *json.RawMessage `json:\"error\"`\n\t}{}\n\tif err := json.NewDecoder(r).Decode(&res); err != nil {\n\t\treturn fmt.Errorf(\"decoding response: %v\", err)\n\t}\n\tif res.Error != nil {\n\t\treturn fmt.Errorf(\"decoding response: %v\", string(*res.Error))\n\t}\n\tif res.Result == nil {\n\t\treturn fmt.Errorf(\"decoding result: result is nil\")\n\t}\n\tif err := json.Unmarshal(*res.Result, resp); err != nil {\n\t\treturn fmt.Errorf(\"decoding result: %v\", err)\n\t}\n\treturn nil\n}\n\nfunc retry(ctx context.Context, dur time.Duration, f func() error) error {\n\tticker := time.NewTicker(dur)\n\terr := f()\n\tfor err != nil {\n\t\tlog.Printf(\"retrying: %v\", err)\n\t\tselect {\n\t\tcase <-ctx.Done():\n\t\t\treturn fmt.Errorf(\"%v: %v\", ctx.Err(), err)\n\t\tcase <-ticker.C:\n\t\t\terr = f()\n\t\t}\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "chain/bitcoin/bitcoin_suite_test.go",
    "content": "package bitcoin_test\n\nimport (\n\t\"testing\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nfunc TestBitcoin(t *testing.T) {\n\tRegisterFailHandler(Fail)\n\tRunSpecs(t, \"Bitcoin Suite\")\n}\n"
  },
  {
    "path": "chain/bitcoin/bitcoin_test.go",
    "content": "package bitcoin_test\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\t\"reflect\"\n\t\"time\"\n\n\t\"github.com/btcsuite/btcd/chaincfg\"\n\t\"github.com/btcsuite/btcutil\"\n\t\"github.com/renproject/id\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/multichain/api/utxo\"\n\t\"github.com/renproject/multichain/chain/bitcoin\"\n\t\"github.com/renproject/pack\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Bitcoin\", func() {\n\tContext(\"when submitting transactions\", func() {\n\t\tContext(\"when sending BTC to multiple addresses\", func() {\n\t\t\tIt(\"should work\", func() {\n\t\t\t\t// Load private key, and assume that the associated address has\n\t\t\t\t// funds to spend. You can do this by setting BITCOIN_PK to the\n\t\t\t\t// value specified in the `./multichaindeploy/.env` file.\n\t\t\t\tpkEnv := os.Getenv(\"BITCOIN_PK\")\n\t\t\t\tif pkEnv == \"\" {\n\t\t\t\t\tpanic(\"BITCOIN_PK is undefined\")\n\t\t\t\t}\n\t\t\t\twif, err := btcutil.DecodeWIF(pkEnv)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t// PKH\n\t\t\t\tpkhAddr, err := btcutil.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeCompressed()), &chaincfg.RegressionNetParams)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tpkhAddrUncompressed, err := btcutil.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &chaincfg.RegressionNetParams)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tlog.Printf(\"PKH                %v\", pkhAddr.EncodeAddress())\n\t\t\t\tlog.Printf(\"PKH (uncompressed) %v\", pkhAddrUncompressed.EncodeAddress())\n\n\t\t\t\t// WPKH\n\t\t\t\twpkAddr, err := btcutil.NewAddressWitnessPubKeyHash([]byte{0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19}, &chaincfg.RegressionNetParams)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tlog.Printf(\"WPKH               %v\", wpkAddr.EncodeAddress())\n\n\t\t\t\t// Setup the client and load the unspent transaction outputs.\n\t\t\t\tclient := bitcoin.NewClient(bitcoin.DefaultClientOptions())\n\t\t\t\toutputs, err := client.UnspentOutputs(context.Background(), 0, 999999999, address.Address(pkhAddr.EncodeAddress()))\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tExpect(len(outputs)).To(BeNumerically(\">\", 0))\n\t\t\t\toutput := outputs[0]\n\n\t\t\t\t// Check that we can load the output and that it is equal.\n\t\t\t\t// Otherwise, something strange is happening with the RPC\n\t\t\t\t// client.\n\t\t\t\toutput2, _, err := client.Output(context.Background(), output.Outpoint)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tExpect(reflect.DeepEqual(output, output2)).To(BeTrue())\n\t\t\t\toutput2, _, err = client.UnspentOutput(context.Background(), output.Outpoint)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tExpect(reflect.DeepEqual(output, output2)).To(BeTrue())\n\n\t\t\t\t// Build the transaction by consuming the outputs and spending\n\t\t\t\t// them to a set of recipients.\n\t\t\t\tinputs := []utxo.Input{\n\t\t\t\t\t{Output: utxo.Output{\n\t\t\t\t\t\tOutpoint: utxo.Outpoint{\n\t\t\t\t\t\t\tHash:  output.Outpoint.Hash[:],\n\t\t\t\t\t\t\tIndex: output.Outpoint.Index,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tPubKeyScript: output.PubKeyScript,\n\t\t\t\t\t\tValue:        output.Value,\n\t\t\t\t\t}},\n\t\t\t\t}\n\t\t\t\trecipients := []utxo.Recipient{\n\t\t\t\t\t{\n\t\t\t\t\t\tTo:    address.Address(pkhAddr.EncodeAddress()),\n\t\t\t\t\t\tValue: pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) / 3)),\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tTo:    address.Address(pkhAddrUncompressed.EncodeAddress()),\n\t\t\t\t\t\tValue: pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) / 3)),\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tTo:    address.Address(wpkAddr.EncodeAddress()),\n\t\t\t\t\t\tValue: pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) / 3)),\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t\ttx, err := bitcoin.NewTxBuilder(&chaincfg.RegressionNetParams).BuildTx(inputs, recipients)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t// Get the digests that need signing from the transaction, and\n\t\t\t\t// sign them. In production, this would be done using the RZL\n\t\t\t\t// MPC algorithm, but for the purposes of this test, using an\n\t\t\t\t// explicit privkey is ok.\n\t\t\t\tsighashes, err := tx.Sighashes()\n\t\t\t\tsignatures := make([]pack.Bytes65, len(sighashes))\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tfor i := range sighashes {\n\t\t\t\t\thash := id.Hash(sighashes[i])\n\t\t\t\t\tprivKey := (*id.PrivKey)(wif.PrivKey)\n\t\t\t\t\tsignature, err := privKey.Sign(&hash)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\tsignatures[i] = pack.NewBytes65(signature)\n\t\t\t\t}\n\t\t\t\tExpect(tx.Sign(signatures, pack.NewBytes(wif.SerializePubKey()))).To(Succeed())\n\n\t\t\t\t// Submit the transaction to the Bitcoin node. Again, this\n\t\t\t\t// should be running a la `./multichaindeploy`.\n\t\t\t\ttxHash, err := tx.Hash()\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\terr = client.SubmitTx(context.Background(), tx)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tlog.Printf(\"TXID               %v\", txHash)\n\n\t\t\t\tfor {\n\t\t\t\t\t// Loop until the transaction has at least a few\n\t\t\t\t\t// confirmations. This implies that the transaction is\n\t\t\t\t\t// definitely valid, and the test has passed. We were\n\t\t\t\t\t// successfully able to use the multichain to construct and\n\t\t\t\t\t// submit a Bitcoin transaction!\n\t\t\t\t\tconfs, err := client.Confirmations(context.Background(), txHash)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\tlog.Printf(\"                   %v/3 confirmations\", confs)\n\t\t\t\t\tif confs >= 1 {\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\ttime.Sleep(10 * time.Second)\n\t\t\t\t}\n\t\t\t\tctxWithTimeout, cancelCtxWithTimeout := context.WithTimeout(context.Background(), time.Second)\n\t\t\t\tdefer cancelCtxWithTimeout()\n\t\t\t\t_, _, err = client.UnspentOutput(ctxWithTimeout, output.Outpoint)\n\t\t\t\tExpect(err).To(HaveOccurred())\n\n\t\t\t\t// Check that we can load the output and that it is equal.\n\t\t\t\t// Otherwise, something strange is happening with the RPC\n\t\t\t\t// client.\n\t\t\t\toutput2, _, err = client.Output(context.Background(), output.Outpoint)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tExpect(reflect.DeepEqual(output, output2)).To(BeTrue())\n\n\t\t\t\t// Check we can get the transaction inputs\n\t\t\t\tsenders, err := client.TxSenders(context.Background(), txHash)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tExpect(len(senders)).Should(Equal(1))\n\t\t\t\tExpect(senders[0]).Should(Equal(pkhAddr.EncodeAddress()))\n\t\t\t})\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/bitcoin/gas.go",
    "content": "package bitcoin\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"math\"\n\n\t\"github.com/renproject/pack\"\n)\n\nconst (\n\tbtcToSatoshis  = 1e8\n\tkilobyteToByte = 1024\n)\n\n// A GasEstimator returns the SATs-per-byte that is needed in order to confirm\n// transactions with an estimated maximum delay of one block. In distributed\n// networks that collectively build, sign, and submit transactions, it is\n// important that all nodes in the network have reached consensus on the\n// SATs-per-byte.\ntype GasEstimator struct {\n\tclient      Client\n\tnumBlocks   int64\n\tfallbackGas pack.U256\n}\n\n// NewGasEstimator returns a simple gas estimator that always returns the given\n// number of SATs-per-byte.\nfunc NewGasEstimator(client Client, numBlocks int64, fallbackGas pack.U256) GasEstimator {\n\treturn GasEstimator{\n\t\tclient:      client,\n\t\tnumBlocks:   numBlocks,\n\t\tfallbackGas: fallbackGas,\n\t}\n}\n\n// EstimateGas returns the number of SATs-per-byte (for both price and cap) that\n// is needed in order to confirm transactions with an estimated maximum delay of\n// `numBlocks` block. It is the responsibility of the caller to know the number\n// of bytes in their transaction. This method calls the `estimatesmartfee` RPC\n// call to the node, which based on a conservative (considering longer history)\n// strategy returns the estimated BTC per kilobyte of data in the transaction.\n// An error will be returned if the bitcoin node hasn't observed enough blocks\n// to make an estimate for the provided target `numBlocks`.\nfunc (gasEstimator GasEstimator) EstimateGas(ctx context.Context) (pack.U256, pack.U256, error) {\n\tfeeRate, err := gasEstimator.client.EstimateSmartFee(ctx, gasEstimator.numBlocks)\n\tif err != nil {\n\t\treturn gasEstimator.fallbackGas, gasEstimator.fallbackGas, err\n\t}\n\n\tif feeRate <= 0.0 {\n\t\treturn gasEstimator.fallbackGas, gasEstimator.fallbackGas, fmt.Errorf(\"invalid fee rate: %v\", feeRate)\n\t}\n\n\tsatsPerByte := uint64(math.Ceil(feeRate * btcToSatoshis / kilobyteToByte))\n\treturn pack.NewU256FromUint64(satsPerByte), pack.NewU256FromUint64(satsPerByte), nil\n}\n"
  },
  {
    "path": "chain/bitcoin/gas_test.go",
    "content": "package bitcoin_test\n\nimport (\n\t\"context\"\n\n\t\"github.com/renproject/multichain/chain/bitcoin\"\n\t\"github.com/renproject/pack\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Gas\", func() {\n\tContext(\"when estimating bitcoin network fee\", func() {\n\t\tIt(\"should work\", func() {\n\t\t\tctx, cancel := context.WithCancel(context.Background())\n\t\t\tdefer cancel()\n\n\t\t\tclient := bitcoin.NewClient(bitcoin.DefaultClientOptions())\n\n\t\t\t// estimate fee to include tx within 1 block.\n\t\t\tfallback1 := uint64(123)\n\t\t\tgasEstimator1 := bitcoin.NewGasEstimator(client, 1, pack.NewU256FromUint64(fallback1))\n\t\t\tgasPrice1, _, err := gasEstimator1.EstimateGas(ctx)\n\t\t\tif err != nil {\n\t\t\t\tExpect(gasPrice1).To(Equal(pack.NewU256FromUint64(fallback1)))\n\t\t\t}\n\n\t\t\t// estimate fee to include tx within 10 blocks.\n\t\t\tfallback2 := uint64(234)\n\t\t\tgasEstimator2 := bitcoin.NewGasEstimator(client, 10, pack.NewU256FromUint64(fallback2))\n\t\t\tgasPrice2, _, err := gasEstimator2.EstimateGas(ctx)\n\t\t\tif err != nil {\n\t\t\t\tExpect(gasPrice2).To(Equal(pack.NewU256FromUint64(fallback2)))\n\t\t\t}\n\n\t\t\t// estimate fee to include tx within 100 blocks.\n\t\t\tfallback3 := uint64(345)\n\t\t\tgasEstimator3 := bitcoin.NewGasEstimator(client, 100, pack.NewU256FromUint64(fallback3))\n\t\t\tgasPrice3, _, err := gasEstimator3.EstimateGas(ctx)\n\t\t\tif err != nil {\n\t\t\t\tExpect(gasPrice3).To(Equal(pack.NewU256FromUint64(fallback3)))\n\t\t\t}\n\n\t\t\t// expect fees in this order at the very least.\n\t\t\tif err == nil {\n\t\t\t\tExpect(gasPrice1.GreaterThanEqual(gasPrice2)).To(BeTrue())\n\t\t\t\tExpect(gasPrice2.GreaterThanEqual(gasPrice3)).To(BeTrue())\n\t\t\t}\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/bitcoin/utxo.go",
    "content": "package bitcoin\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"math/big\"\n\n\t\"github.com/btcsuite/btcd/btcec\"\n\t\"github.com/btcsuite/btcd/chaincfg\"\n\t\"github.com/btcsuite/btcd/chaincfg/chainhash\"\n\t\"github.com/btcsuite/btcd/txscript\"\n\t\"github.com/btcsuite/btcd/wire\"\n\t\"github.com/btcsuite/btcutil\"\n\t\"github.com/renproject/multichain/api/utxo\"\n\t\"github.com/renproject/pack\"\n)\n\n// Version of Bitcoin transactions supported by the multichain.\nconst Version int32 = 2\n\n// The TxBuilder is an implementation of a UTXO-compatible transaction builder\n// for Bitcoin.\ntype TxBuilder struct {\n\tparams *chaincfg.Params\n}\n\n// NewTxBuilder returns a transaction builder that builds UTXO-compatible\n// Bitcoin transactions for the given chain configuration (this means that it\n// can be used for regnet, testnet, and mainnet, but also for networks that are\n// minimally modified forks of the Bitcoin network).\nfunc NewTxBuilder(params *chaincfg.Params) TxBuilder {\n\treturn TxBuilder{params: params}\n}\n\n// BuildTx returns a Bitcoin transaction that consumes funds from the given\n// inputs, and sends them to the given recipients. The difference in the sum\n// value of the inputs and the sum value of the recipients is paid as a fee to\n// the Bitcoin network. This fee must be calculated independently of this\n// function. Outputs produced for recipients will use P2PKH, P2SH, P2WPKH, or\n// P2WSH scripts as the pubkey script, based on the format of the recipient\n// address.\nfunc (txBuilder TxBuilder) BuildTx(inputs []utxo.Input, recipients []utxo.Recipient) (utxo.Tx, error) {\n\tmsgTx := wire.NewMsgTx(Version)\n\n\t// Inputs\n\tfor _, input := range inputs {\n\t\thash := chainhash.Hash{}\n\t\tcopy(hash[:], input.Hash)\n\t\tindex := input.Index.Uint32()\n\t\tmsgTx.AddTxIn(wire.NewTxIn(wire.NewOutPoint(&hash, index), nil, nil))\n\t}\n\n\t// Outputs\n\tfor _, recipient := range recipients {\n\t\taddr, err := btcutil.DecodeAddress(string(recipient.To), txBuilder.params)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif !addr.IsForNet(txBuilder.params) {\n\t\t\treturn nil, fmt.Errorf(\"addr of a different network\")\n\t\t}\n\t\tscript, err := txscript.PayToAddrScript(addr)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tvalue := recipient.Value.Int().Int64()\n\t\tif value < 0 {\n\t\t\treturn nil, fmt.Errorf(\"expected value >= 0, got value %v\", value)\n\t\t}\n\t\tmsgTx.AddTxOut(wire.NewTxOut(value, script))\n\t}\n\n\treturn &Tx{inputs: inputs, recipients: recipients, msgTx: msgTx, signed: false}, nil\n}\n\n// Tx represents a simple Bitcoin transaction that implements the Bitcoin Compat\n// API.\ntype Tx struct {\n\tinputs     []utxo.Input\n\trecipients []utxo.Recipient\n\n\tmsgTx *wire.MsgTx\n\n\tsigned bool\n}\n\n// Hash returns the transaction hash of the given underlying transaction.\nfunc (tx *Tx) Hash() (pack.Bytes, error) {\n\ttxhash := tx.msgTx.TxHash()\n\treturn pack.NewBytes(txhash[:]), nil\n}\n\n// Inputs returns the UTXO inputs in the underlying transaction.\nfunc (tx *Tx) Inputs() ([]utxo.Input, error) {\n\treturn tx.inputs, nil\n}\n\n// Outputs returns the UTXO outputs in the underlying transaction.\nfunc (tx *Tx) Outputs() ([]utxo.Output, error) {\n\thash, err := tx.Hash()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"bad hash: %v\", err)\n\t}\n\toutputs := make([]utxo.Output, len(tx.msgTx.TxOut))\n\tfor i := range outputs {\n\t\toutputs[i].Outpoint = utxo.Outpoint{\n\t\t\tHash:  hash,\n\t\t\tIndex: pack.NewU32(uint32(i)),\n\t\t}\n\t\toutputs[i].PubKeyScript = pack.Bytes(tx.msgTx.TxOut[i].PkScript)\n\t\tif tx.msgTx.TxOut[i].Value < 0 {\n\t\t\treturn nil, fmt.Errorf(\"bad output %v: value is less than zero\", i)\n\t\t}\n\t\toutputs[i].Value = pack.NewU256FromU64(pack.NewU64(uint64(tx.msgTx.TxOut[i].Value)))\n\t}\n\treturn outputs, nil\n}\n\n// Sighashes returns the digests that must be signed before the transaction\n// can be submitted by the client.\nfunc (tx *Tx) Sighashes() ([]pack.Bytes32, error) {\n\tsighashes := make([]pack.Bytes32, len(tx.inputs))\n\n\tfor i, txin := range tx.inputs {\n\t\tpubKeyScript := txin.PubKeyScript\n\t\tsigScript := txin.SigScript\n\t\tvalue := txin.Value.Int().Int64()\n\t\tif value < 0 {\n\t\t\treturn []pack.Bytes32{}, fmt.Errorf(\"expected value >= 0, got value %v\", value)\n\t\t}\n\n\t\tvar hash []byte\n\t\tvar err error\n\t\tif sigScript == nil {\n\t\t\tif txscript.IsPayToWitnessPubKeyHash(pubKeyScript) {\n\t\t\t\thash, err = txscript.CalcWitnessSigHash(pubKeyScript, txscript.NewTxSigHashes(tx.msgTx), txscript.SigHashAll, tx.msgTx, i, value)\n\t\t\t} else {\n\t\t\t\thash, err = txscript.CalcSignatureHash(pubKeyScript, txscript.SigHashAll, tx.msgTx, i)\n\t\t\t}\n\t\t} else {\n\t\t\tif txscript.IsPayToWitnessScriptHash(pubKeyScript) {\n\t\t\t\thash, err = txscript.CalcWitnessSigHash(sigScript, txscript.NewTxSigHashes(tx.msgTx), txscript.SigHashAll, tx.msgTx, i, value)\n\t\t\t} else {\n\t\t\t\thash, err = txscript.CalcSignatureHash(sigScript, txscript.SigHashAll, tx.msgTx, i)\n\t\t\t}\n\t\t}\n\t\tif err != nil {\n\t\t\treturn []pack.Bytes32{}, err\n\t\t}\n\n\t\tsighash := [32]byte{}\n\t\tcopy(sighash[:], hash)\n\t\tsighashes[i] = pack.NewBytes32(sighash)\n\t}\n\n\treturn sighashes, nil\n}\n\n// Sign consumes a list of signatures, and adds them to the list of UTXOs in\n// the underlying transactions.\nfunc (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error {\n\tif tx.signed {\n\t\treturn fmt.Errorf(\"already signed\")\n\t}\n\tif len(signatures) != len(tx.msgTx.TxIn) {\n\t\treturn fmt.Errorf(\"expected %v signatures, got %v signatures\", len(tx.msgTx.TxIn), len(signatures))\n\t}\n\n\tfor i, rsv := range signatures {\n\t\tvar err error\n\n\t\t// Decode the signature and the pubkey script.\n\t\tr := new(big.Int).SetBytes(rsv[:32])\n\t\ts := new(big.Int).SetBytes(rsv[32:64])\n\t\tsignature := btcec.Signature{\n\t\t\tR: r,\n\t\t\tS: s,\n\t\t}\n\t\tpubKeyScript := tx.inputs[i].Output.PubKeyScript\n\t\tsigScript := tx.inputs[i].SigScript\n\n\t\t// Support segwit.\n\t\tif sigScript == nil {\n\t\t\tif txscript.IsPayToWitnessPubKeyHash(pubKeyScript) || txscript.IsPayToWitnessScriptHash(pubKeyScript) {\n\t\t\t\ttx.msgTx.TxIn[i].Witness = wire.TxWitness([][]byte{append(signature.Serialize(), byte(txscript.SigHashAll)), pubKey})\n\t\t\t\tcontinue\n\t\t\t}\n\t\t} else {\n\t\t\tif txscript.IsPayToWitnessPubKeyHash(sigScript) || txscript.IsPayToWitnessScriptHash(sigScript) {\n\t\t\t\ttx.msgTx.TxIn[i].Witness = wire.TxWitness([][]byte{append(signature.Serialize(), byte(txscript.SigHashAll)), pubKey, sigScript})\n\t\t\t\tcontinue\n\t\t\t}\n\t\t}\n\n\t\t// Support non-segwit\n\t\tbuilder := txscript.NewScriptBuilder()\n\t\tbuilder.AddData(append(signature.Serialize(), byte(txscript.SigHashAll)))\n\t\tbuilder.AddData(pubKey)\n\t\tif sigScript != nil {\n\t\t\tbuilder.AddData(sigScript)\n\t\t}\n\t\ttx.msgTx.TxIn[i].SignatureScript, err = builder.Script()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\ttx.signed = true\n\treturn nil\n}\n\n// Serialize serializes the UTXO transaction to bytes\nfunc (tx *Tx) Serialize() (pack.Bytes, error) {\n\tbuf := new(bytes.Buffer)\n\tif err := tx.msgTx.Serialize(buf); err != nil {\n\t\treturn pack.Bytes{}, err\n\t}\n\treturn pack.NewBytes(buf.Bytes()), nil\n}\n"
  },
  {
    "path": "chain/bitcoin/utxo_test.go",
    "content": "package bitcoin_test\n"
  },
  {
    "path": "chain/bitcoincash/address.go",
    "content": "package bitcoincash\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/btcsuite/btcd/chaincfg\"\n\t\"github.com/btcsuite/btcutil\"\n\t\"github.com/btcsuite/btcutil/base58\"\n\t\"github.com/btcsuite/btcutil/bech32\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/pack\"\n\t\"golang.org/x/crypto/ripemd160\"\n)\n\nvar (\n\t// Alphabet used by Bitcoin Cash to encode addresses.\n\tAlphabet = \"qpzry9x8gf2tvdw0s3jn54khce6mua7l\"\n\t// AlphabetReverseLookup used by Bitcoin Cash to decode addresses.\n\tAlphabetReverseLookup = func() map[rune]byte {\n\t\tlookup := map[rune]byte{}\n\t\tfor i, char := range Alphabet {\n\t\t\tlookup[char] = byte(i)\n\t\t}\n\t\treturn lookup\n\t}()\n)\n\n// AddressEncodeDecoder implements the address.EncodeDecoder interface\ntype AddressEncodeDecoder struct {\n\tAddressEncoder\n\tAddressDecoder\n}\n\n// NewAddressEncodeDecoder constructs a new AddressEncodeDecoder with the\n// chain specific configurations\nfunc NewAddressEncodeDecoder(params *chaincfg.Params) AddressEncodeDecoder {\n\treturn AddressEncodeDecoder{\n\t\tAddressEncoder: NewAddressEncoder(params),\n\t\tAddressDecoder: NewAddressDecoder(params),\n\t}\n}\n\n// AddressEncoder encapsulates the chain specific configurations and implements\n// the address.Encoder interface\ntype AddressEncoder struct {\n\tparams *chaincfg.Params\n}\n\n// NewAddressEncoder constructs a new AddressEncoder with the chain specific\n// configurations\nfunc NewAddressEncoder(params *chaincfg.Params) AddressEncoder {\n\treturn AddressEncoder{params: params}\n}\n\n// AddressDecoder encapsulates the chain specific configurations and implements\n// the address.Decoder interface\ntype AddressDecoder struct {\n\tparams *chaincfg.Params\n}\n\n// NewAddressDecoder constructs a new AddressDecoder with the chain specific\n// configurations\nfunc NewAddressDecoder(params *chaincfg.Params) AddressDecoder {\n\treturn AddressDecoder{params: params}\n}\n\n// EncodeAddress implements the address.Encoder interface\nfunc (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) {\n\trawAddrBytes := []byte(rawAddr)\n\tvar encodedAddr string\n\tvar err error\n\n\tswitch len(rawAddrBytes) - 1 {\n\tcase ripemd160.Size: // P2PKH or P2SH\n\t\tswitch rawAddrBytes[0] {\n\t\tcase 0: // P2PKH\n\t\t\tencodedAddr, err = encodeAddress(0x00, rawAddrBytes[1:21], encoder.params)\n\t\tcase 8: // P2SH\n\t\t\tencodedAddr, err = encodeAddress(8, rawAddrBytes[1:21], encoder.params)\n\t\tdefault:\n\t\t\treturn address.Address(\"\"), btcutil.ErrUnknownAddressType\n\t\t}\n\tdefault:\n\t\treturn encodeLegacyAddress(rawAddr, encoder.params)\n\t}\n\n\tif err != nil {\n\t\treturn address.Address(\"\"), fmt.Errorf(\"encoding: %v\", err)\n\t}\n\n\treturn address.Address(encodedAddr), nil\n}\n\n// DecodeAddress implements the address.Decoder interface\nfunc (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) {\n\t// Legacy address decoding\n\tif legacyAddr, err := btcutil.DecodeAddress(string(addr), decoder.params); err == nil {\n\t\tif !legacyAddr.IsForNet(decoder.params) {\n\t\t\treturn nil, fmt.Errorf(\"address of different network\")\n\t\t}\n\t\tswitch legacyAddr.(type) {\n\t\tcase *btcutil.AddressPubKeyHash, *btcutil.AddressScriptHash, *btcutil.AddressPubKey:\n\t\t\treturn decodeLegacyAddress(addr, decoder.params)\n\t\tcase *btcutil.AddressWitnessPubKeyHash, *btcutil.AddressWitnessScriptHash:\n\t\t\treturn nil, fmt.Errorf(\"unsuported segwit bitcoin address type %T\", legacyAddr)\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"unsuported legacy bitcoin address type %T\", legacyAddr)\n\t\t}\n\t}\n\n\tif addrParts := strings.Split(string(addr), \":\"); len(addrParts) != 1 {\n\t\taddr = address.Address(addrParts[1])\n\t}\n\n\tdecoded := DecodeString(string(addr))\n\tif !VerifyChecksum(AddressPrefix(decoder.params), decoded) {\n\t\treturn nil, btcutil.ErrChecksumMismatch\n\t}\n\n\taddrBytes, err := bech32.ConvertBits(decoded[:len(decoded)-8], 5, 8, false)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tswitch len(addrBytes) - 1 {\n\tcase ripemd160.Size: // P2PKH or P2SH\n\t\tswitch addrBytes[0] {\n\t\tcase 0, 8: // P2PKH or P2SH\n\t\t\treturn address.RawAddress(addrBytes), nil\n\t\tdefault:\n\t\t\treturn nil, btcutil.ErrUnknownAddressType\n\t\t}\n\tdefault:\n\t\treturn nil, errors.New(\"decoded address is of unknown size\")\n\t}\n}\n\nfunc encodeLegacyAddress(rawAddr address.RawAddress, params *chaincfg.Params) (address.Address, error) {\n\t// Validate that the base58 address is in fact in correct format.\n\tencodedAddr := base58.Encode([]byte(rawAddr))\n\tif _, err := btcutil.DecodeAddress(encodedAddr, params); err != nil {\n\t\treturn address.Address(\"\"), fmt.Errorf(\"address validation error: %v\", err)\n\t}\n\n\treturn address.Address(encodedAddr), nil\n}\n\nfunc decodeLegacyAddress(addr address.Address, params *chaincfg.Params) (address.RawAddress, error) {\n\t// Decode the checksummed base58 format address.\n\tdecoded, ver, err := base58.CheckDecode(string(addr))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"checking: %v\", err)\n\t}\n\tif len(decoded) != 20 {\n\t\treturn nil, fmt.Errorf(\"expected len 20, got len %v\", len(decoded))\n\t}\n\n\t// Validate the address format.\n\tswitch ver {\n\tcase params.PubKeyHashAddrID, params.ScriptHashAddrID:\n\t\treturn address.RawAddress(pack.NewBytes(base58.Decode(string(addr)))), nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unexpected address prefix\")\n\t}\n}\n\n// An Address represents a Bitcoin Cash address.\ntype Address interface {\n\tbtcutil.Address\n\tBitcoinAddress() btcutil.Address\n}\n\n// AddressLegacy represents a legacy Bitcoin address.\ntype AddressLegacy struct {\n\tbtcutil.Address\n}\n\n// BitcoinAddress returns the address as if it was a Bitcoin address.\nfunc (addr AddressLegacy) BitcoinAddress() btcutil.Address {\n\treturn addr.Address\n}\n\n// AddressPubKeyHash represents an address for P2PKH transactions for\n// Bitcoin Cash that is compatible with the Bitcoin-compat API.\ntype AddressPubKeyHash struct {\n\t*btcutil.AddressPubKeyHash\n\tparams *chaincfg.Params\n}\n\n// NewAddressPubKeyHash returns a new AddressPubKeyHash\n// that is compatible with the Bitcoin-compat API.\nfunc NewAddressPubKeyHash(pkh []byte, params *chaincfg.Params) (AddressPubKeyHash, error) {\n\taddr, err := btcutil.NewAddressPubKeyHash(pkh, params)\n\treturn AddressPubKeyHash{AddressPubKeyHash: addr, params: params}, err\n}\n\n// NewAddressPubKey returns a new AddressPubKey\n// that is compatible with the Bitcoin-compat API.\nfunc NewAddressPubKey(pk []byte, params *chaincfg.Params) (AddressPubKeyHash, error) {\n\treturn NewAddressPubKeyHash(btcutil.Hash160(pk), params)\n}\n\n// String returns the string encoding of the transaction output\n// destination.\n//\n// Please note that String differs subtly from EncodeAddress: String\n// will return the value as a string without any conversion, while\n// EncodeAddress may convert destination types (for example,\n// converting pubkeys to P2PKH addresses) before encoding as a\n// payment address string.\nfunc (addr AddressPubKeyHash) String() string {\n\treturn addr.EncodeAddress()\n}\n\n// EncodeAddress returns the string encoding of the payment address\n// associated with the Address value.  See the comment on String\n// for how this method differs from String.\nfunc (addr AddressPubKeyHash) EncodeAddress() string {\n\thash := *addr.AddressPubKeyHash.Hash160()\n\tencoded, err := encodeAddress(0x00, hash[:], addr.params)\n\tif err != nil {\n\t\tpanic(fmt.Errorf(\"invalid address: %v\", err))\n\t}\n\treturn encoded\n}\n\n// ScriptAddress returns the raw bytes of the address to be used\n// when inserting the address into a txout's script.\nfunc (addr AddressPubKeyHash) ScriptAddress() []byte {\n\treturn addr.AddressPubKeyHash.ScriptAddress()\n}\n\n// IsForNet returns whether or not the address is associated with the passed\n// bitcoin network.\nfunc (addr AddressPubKeyHash) IsForNet(params *chaincfg.Params) bool {\n\treturn addr.AddressPubKeyHash.IsForNet(params)\n}\n\n// BitcoinAddress returns the address as if it was a Bitcoin address.\nfunc (addr AddressPubKeyHash) BitcoinAddress() btcutil.Address {\n\treturn addr.AddressPubKeyHash\n}\n\n// AddressScriptHash represents an address for P2SH transactions for\n// Bitcoin Cash that is compatible with the Bitcoin-compat API.\ntype AddressScriptHash struct {\n\t*btcutil.AddressScriptHash\n\tparams *chaincfg.Params\n}\n\n// NewAddressScriptHash returns a new AddressScriptHash\n// that is compatible with the Bitcoin-compat API.\nfunc NewAddressScriptHash(script []byte, params *chaincfg.Params) (AddressScriptHash, error) {\n\taddr, err := btcutil.NewAddressScriptHash(script, params)\n\treturn AddressScriptHash{AddressScriptHash: addr, params: params}, err\n}\n\n// NewAddressScriptHashFromHash returns a new AddressScriptHash\n// that is compatible with the Bitcoin-compat API.\nfunc NewAddressScriptHashFromHash(scriptHash []byte, params *chaincfg.Params) (AddressScriptHash, error) {\n\taddr, err := btcutil.NewAddressScriptHashFromHash(scriptHash, params)\n\treturn AddressScriptHash{AddressScriptHash: addr, params: params}, err\n}\n\n// String returns the string encoding of the transaction output\n// destination.\n//\n// Please note that String differs subtly from EncodeAddress: String\n// will return the value as a string without any conversion, while\n// EncodeAddress may convert destination types (for example,\n// converting pubkeys to P2PKH addresses) before encoding as a\n// payment address string.\nfunc (addr AddressScriptHash) String() string {\n\treturn addr.EncodeAddress()\n}\n\n// EncodeAddress returns the string encoding of the payment address\n// associated with the Address value.  See the comment on String\n// for how this method differs from String.\nfunc (addr AddressScriptHash) EncodeAddress() string {\n\thash := *addr.AddressScriptHash.Hash160()\n\tencoded, err := encodeAddress(8, hash[:], addr.params)\n\tif err != nil {\n\t\tpanic(fmt.Errorf(\"invalid address: %v\", err))\n\t}\n\treturn encoded\n}\n\n// ScriptAddress returns the raw bytes of the address to be used\n// when inserting the address into a txout's script.\nfunc (addr AddressScriptHash) ScriptAddress() []byte {\n\treturn addr.AddressScriptHash.ScriptAddress()\n}\n\n// IsForNet returns whether or not the address is associated with the passed\n// bitcoin network.\nfunc (addr AddressScriptHash) IsForNet(params *chaincfg.Params) bool {\n\treturn addr.AddressScriptHash.IsForNet(params)\n}\n\n// BitcoinAddress returns the address as if it was a Bitcoin address.\nfunc (addr AddressScriptHash) BitcoinAddress() btcutil.Address {\n\treturn addr.AddressScriptHash\n}\n\n// encodeAddress using Bitcoin Cash address encoding, assuming that the hash\n// data has no prefix or checksum.\nfunc encodeAddress(version byte, hash []byte, params *chaincfg.Params) (string, error) {\n\tif (len(hash)-20)/4 != int(version)%8 {\n\t\treturn \"\", fmt.Errorf(\"invalid version: %d\", version)\n\t}\n\tdata, err := bech32.ConvertBits(append([]byte{version}, hash...), 8, 5, true)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"invalid bech32 encoding: %v\", err)\n\t}\n\treturn EncodeToString(AppendChecksum(AddressPrefix(params), data)), nil\n}\n\n// addressFromRawBytes consumes raw bytes representation of a bitcoincash\n// address and returns a type that implements the bitcoincash.Address interface.\nfunc addressFromRawBytes(addrBytes []byte, params *chaincfg.Params) (Address, error) {\n\tswitch len(addrBytes) - 1 {\n\tcase ripemd160.Size: // P2PKH or P2SH\n\t\tswitch addrBytes[0] {\n\t\tcase 0: // P2PKH\n\t\t\treturn NewAddressPubKeyHash(addrBytes[1:21], params)\n\t\tcase 8: // P2SH\n\t\t\treturn NewAddressScriptHashFromHash(addrBytes[1:21], params)\n\t\tdefault:\n\t\t\treturn nil, btcutil.ErrUnknownAddressType\n\t\t}\n\tdefault:\n\t\taddr, err := btcutil.DecodeAddress(base58.Encode(addrBytes), params)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\treturn AddressLegacy{Address: addr}, nil\n\t}\n}\n\n// EncodeToString using Bitcoin Cash address encoding, assuming that the data\n// has a prefix and checksum.\nfunc EncodeToString(data []byte) string {\n\taddr := strings.Builder{}\n\tfor _, d := range data {\n\t\taddr.WriteByte(Alphabet[d])\n\t}\n\treturn addr.String()\n}\n\n// DecodeString using Bitcoin Cash address encoding.\nfunc DecodeString(address string) []byte {\n\tdata := []byte{}\n\tfor _, c := range address {\n\t\tdata = append(data, AlphabetReverseLookup[c])\n\t}\n\treturn data\n}\n\n// AppendChecksum to the data payload.\n//\n// https://github.com/bitcoincashorg/bitcoincash.org/blob/master/spec/cashaddr.md#checksum\nfunc AppendChecksum(prefix string, payload []byte) []byte {\n\tprefixedPayload := append(EncodePrefix(prefix), payload...)\n\n\t// Append 8 zeroes.\n\tprefixedPayload = append(prefixedPayload, 0, 0, 0, 0, 0, 0, 0, 0)\n\n\t// Determine what to XOR into those 8 zeroes.\n\tmod := PolyMod(prefixedPayload)\n\n\tchecksum := make([]byte, 8)\n\tfor i := 0; i < 8; i++ {\n\t\t// Convert the 5-bit groups in mod to checksum values.\n\t\tchecksum[i] = byte((mod >> uint(5*(7-i))) & 0x1f)\n\t}\n\treturn append(payload, checksum...)\n}\n\n// VerifyChecksum verifies whether the given payload is well-formed.\n//\n// https://github.com/bitcoincashorg/bitcoincash.org/blob/master/spec/cashaddr.md#checksum\nfunc VerifyChecksum(prefix string, payload []byte) bool {\n\treturn PolyMod(append(EncodePrefix(prefix), payload...)) == 0\n}\n\n// EncodePrefix string into bytes.\n//\n// https://github.com/bitcoincashorg/bitcoincash.org/blob/master/spec/cashaddr.md#checksum\nfunc EncodePrefix(prefixString string) []byte {\n\tprefixBytes := make([]byte, len(prefixString)+1)\n\tfor i := 0; i < len(prefixString); i++ {\n\t\tprefixBytes[i] = byte(prefixString[i]) & 0x1f\n\t}\n\tprefixBytes[len(prefixString)] = 0\n\treturn prefixBytes\n}\n\n// AddressPrefix returns the string representations of an address prefix based\n// on the network parameters: \"bitcoincash\" (for mainnet), \"bchtest\" (for\n// testnet), and \"bchreg\" (for regtest). This function panics if the network\n// parameters are not recognised.\nfunc AddressPrefix(params *chaincfg.Params) string {\n\tif params == nil {\n\t\tpanic(fmt.Errorf(\"non-exhaustive pattern: params %v\", params))\n\t}\n\tswitch params {\n\tcase &chaincfg.MainNetParams:\n\t\treturn \"bitcoincash\"\n\tcase &chaincfg.TestNet3Params:\n\t\treturn \"bchtest\"\n\tcase &chaincfg.RegressionNetParams:\n\t\treturn \"bchreg\"\n\tdefault:\n\t\tpanic(fmt.Errorf(\"non-exhaustive pattern: params %v\", params.Name))\n\t}\n}\n\n// PolyMod is used to calculate the checksum for Bitcoin Cash\n// addresses.\n//\n//  uint64_t PolyMod(const data &v) {\n//      uint64_t c = 1;\n//      for (uint8_t d : v) {\n//          uint8_t c0 = c >> 35;\n//          c = ((c & 0x07ffffffff) << 5) ^ d;\n//          if (c0 & 0x01) c ^= 0x98f2bc8e61;\n//          if (c0 & 0x02) c ^= 0x79b76d99e2;\n//          if (c0 & 0x04) c ^= 0xf33e5fb3c4;\n//          if (c0 & 0x08) c ^= 0xae2eabe2a8;\n//          if (c0 & 0x10) c ^= 0x1e4f43e470;\n//      }\n//      return c ^ 1;\n//  }\n//\n// https://github.com/bitcoincashorg/bitcoincash.org/blob/master/spec/cashaddr.md\nfunc PolyMod(v []byte) uint64 {\n\tc := uint64(1)\n\tfor _, d := range v {\n\t\tc0 := byte(c >> 35)\n\t\tc = ((c & 0x07ffffffff) << 5) ^ uint64(d)\n\n\t\tif c0&0x01 > 0 {\n\t\t\tc ^= 0x98f2bc8e61\n\t\t}\n\t\tif c0&0x02 > 0 {\n\t\t\tc ^= 0x79b76d99e2\n\t\t}\n\t\tif c0&0x04 > 0 {\n\t\t\tc ^= 0xf33e5fb3c4\n\t\t}\n\t\tif c0&0x08 > 0 {\n\t\t\tc ^= 0xae2eabe2a8\n\t\t}\n\t\tif c0&0x10 > 0 {\n\t\t\tc ^= 0x1e4f43e470\n\t\t}\n\t}\n\treturn c ^ 1\n}\n"
  },
  {
    "path": "chain/bitcoincash/address_test.go",
    "content": "package bitcoincash_test\n\nimport (\n\t\"fmt\"\n\t\"math/rand\"\n\n\t\"github.com/btcsuite/btcd/btcec\"\n\t\"github.com/btcsuite/btcd/chaincfg\"\n\t\"github.com/btcsuite/btcutil\"\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n\t\"github.com/renproject/id\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/multichain/chain/bitcoincash\"\n)\n\nvar _ = Describe(\"Bitcoin Cash\", func() {\n\tContext(\"Address Encode/Decode\", func() {\n\t\taddrEncodeDecoders := []struct {\n\t\t\tnetwork       *chaincfg.Params\n\t\t\tencodeDecoder bitcoincash.AddressEncodeDecoder\n\t\t}{\n\t\t\t{\n\t\t\t\t&chaincfg.MainNetParams,\n\t\t\t\tbitcoincash.NewAddressEncodeDecoder(&chaincfg.MainNetParams),\n\t\t\t},\n\t\t\t{\n\t\t\t\t&chaincfg.TestNet3Params,\n\t\t\t\tbitcoincash.NewAddressEncodeDecoder(&chaincfg.TestNet3Params),\n\t\t\t},\n\t\t\t{\n\t\t\t\t&chaincfg.RegressionNetParams,\n\t\t\t\tbitcoincash.NewAddressEncodeDecoder(&chaincfg.RegressionNetParams),\n\t\t\t},\n\t\t}\n\n\t\tfor _, addrEncodeDecoder := range addrEncodeDecoders {\n\t\t\taddrEncodeDecoder := addrEncodeDecoder\n\t\t\tContext(fmt.Sprintf(\"Encode/Decode for %v network\", addrEncodeDecoder.network.Name), func() {\n\t\t\t\tSpecify(\"AddressPubKeyHash\", func() {\n\t\t\t\t\tpk := id.NewPrivKey()\n\t\t\t\t\twif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), addrEncodeDecoder.network, true)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\taddrPubKeyHash, err := bitcoincash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), addrEncodeDecoder.network)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\taddr := address.Address(addrPubKeyHash.EncodeAddress())\n\n\t\t\t\t\tdecodedRawAddr, err := addrEncodeDecoder.encodeDecoder.DecodeAddress(addr)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tencodedAddr, err := addrEncodeDecoder.encodeDecoder.EncodeAddress(decodedRawAddr)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tExpect(encodedAddr).To(Equal(addr))\n\t\t\t\t})\n\n\t\t\t\tSpecify(\"AddressScriptHash\", func() {\n\t\t\t\t\tscript := make([]byte, rand.Intn(100))\n\t\t\t\t\trand.Read(script)\n\t\t\t\t\taddrScriptHash, err := bitcoincash.NewAddressScriptHash(script, addrEncodeDecoder.network)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\taddr := address.Address(addrScriptHash.EncodeAddress())\n\n\t\t\t\t\tdecodedRawAddr, err := addrEncodeDecoder.encodeDecoder.DecodeAddress(addr)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tencodedAddr, err := addrEncodeDecoder.encodeDecoder.EncodeAddress(decodedRawAddr)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tExpect(encodedAddr).To(Equal(addr))\n\t\t\t\t})\n\n\t\t\t\tSpecify(\"AddressLegacy\", func() {\n\t\t\t\t\tpk := id.NewPrivKey()\n\t\t\t\t\twif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), addrEncodeDecoder.network, true)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\taddrPubKeyHash, err := btcutil.NewAddressPubKeyHash(btcutil.Hash160(wif.SerializePubKey()), addrEncodeDecoder.network)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\taddr := address.Address(addrPubKeyHash.EncodeAddress())\n\n\t\t\t\t\tdecodedRawAddr, err := addrEncodeDecoder.encodeDecoder.DecodeAddress(addr)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tencodedAddr, err := addrEncodeDecoder.encodeDecoder.EncodeAddress(decodedRawAddr)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tExpect(encodedAddr).To(Equal(addr))\n\t\t\t\t})\n\t\t\t})\n\t\t}\n\t})\n})\n"
  },
  {
    "path": "chain/bitcoincash/bitcoincash.go",
    "content": "package bitcoincash\n"
  },
  {
    "path": "chain/bitcoincash/bitcoincash_suite_test.go",
    "content": "package bitcoincash_test\n\nimport (\n\t\"testing\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nfunc TestBitcoinCash(t *testing.T) {\n\tRegisterFailHandler(Fail)\n\tRunSpecs(t, \"Bitcoin Cash Suite\")\n}\n"
  },
  {
    "path": "chain/bitcoincash/bitcoincash_test.go",
    "content": "package bitcoincash_test\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\t\"reflect\"\n\t\"time\"\n\n\t\"github.com/btcsuite/btcd/chaincfg\"\n\t\"github.com/btcsuite/btcutil\"\n\t\"github.com/renproject/id\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/multichain/api/utxo\"\n\t\"github.com/renproject/multichain/chain/bitcoincash\"\n\t\"github.com/renproject/pack\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Bitcoin Cash\", func() {\n\tContext(\"when submitting transactions\", func() {\n\t\tContext(\"when sending BCH to multiple addresses\", func() {\n\t\t\tIt(\"should work\", func() {\n\t\t\t\t// Load private key, and assume that the associated address has\n\t\t\t\t// funds to spend. You can do this by setting BITCOINCASH_PK to\n\t\t\t\t// the value specified in the `./multichaindeploy/.env` file.\n\t\t\t\tpkEnv := os.Getenv(\"BITCOINCASH_PK\")\n\t\t\t\tif pkEnv == \"\" {\n\t\t\t\t\tpanic(\"BITCOINCASH_PK is undefined\")\n\t\t\t\t}\n\t\t\t\twif, err := btcutil.DecodeWIF(pkEnv)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t// PKH\n\t\t\t\tpkhAddr, err := bitcoincash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeCompressed()), &chaincfg.RegressionNetParams)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tpkhAddrUncompressed, err := bitcoincash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &chaincfg.RegressionNetParams)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tlog.Printf(\"PKH                %v\", pkhAddr.EncodeAddress())\n\t\t\t\tlog.Printf(\"PKH (uncompressed) %v\", pkhAddrUncompressed.EncodeAddress())\n\n\t\t\t\t// Setup the client and load the unspent transaction outputs.\n\t\t\t\tclient := bitcoincash.NewClient(bitcoincash.DefaultClientOptions())\n\t\t\t\toutputs, err := client.UnspentOutputs(context.Background(), 0, 999999999, address.Address(pkhAddr.EncodeAddress()))\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tExpect(len(outputs)).To(BeNumerically(\">\", 0))\n\t\t\t\toutput := outputs[0]\n\n\t\t\t\t// Check that we can load the output and that it is equal.\n\t\t\t\t// Otherwise, something strange is happening with the RPC\n\t\t\t\t// client.\n\t\t\t\toutput2, _, err := client.Output(context.Background(), output.Outpoint)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tExpect(reflect.DeepEqual(output, output2)).To(BeTrue())\n\n\t\t\t\t// Build the transaction by consuming the outputs and spending\n\t\t\t\t// them to a set of recipients.\n\t\t\t\tinputs := []utxo.Input{\n\t\t\t\t\t{Output: output},\n\t\t\t\t}\n\t\t\t\trecipients := []utxo.Recipient{\n\t\t\t\t\t{\n\t\t\t\t\t\tTo:    address.Address(pkhAddr.EncodeAddress()),\n\t\t\t\t\t\tValue: pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) / 2)),\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tTo:    address.Address(pkhAddrUncompressed.EncodeAddress()),\n\t\t\t\t\t\tValue: pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) / 2)),\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t\ttx, err := bitcoincash.NewTxBuilder(&chaincfg.RegressionNetParams).BuildTx(inputs, recipients)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t// Get the digests that need signing from the transaction, and\n\t\t\t\t// sign them. In production, this would be done using the RZL\n\t\t\t\t// MPC algorithm, but for the purposes of this test, using an\n\t\t\t\t// explicit privkey is ok.\n\t\t\t\tsighashes, err := tx.Sighashes()\n\t\t\t\tsignatures := make([]pack.Bytes65, len(sighashes))\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tfor i := range sighashes {\n\t\t\t\t\thash := id.Hash(sighashes[i])\n\t\t\t\t\tprivKey := (*id.PrivKey)(wif.PrivKey)\n\t\t\t\t\tsignature, err := privKey.Sign(&hash)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\tsignatures[i] = pack.NewBytes65(signature)\n\t\t\t\t}\n\t\t\t\tExpect(tx.Sign(signatures, pack.NewBytes(wif.SerializePubKey()))).To(Succeed())\n\n\t\t\t\t// Submit the transaction to the Bitcoin Cash node. Again, this\n\t\t\t\t// should be running a la `./multichaindeploy`.\n\t\t\t\ttxHash, err := tx.Hash()\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\terr = client.SubmitTx(context.Background(), tx)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tlog.Printf(\"TXID               %v\", txHash)\n\n\t\t\t\tfor {\n\t\t\t\t\t// Loop until the transaction has at least a few\n\t\t\t\t\t// confirmations. This implies that the transaction is\n\t\t\t\t\t// definitely valid, and the test has passed. We were\n\t\t\t\t\t// successfully able to use the multichain to construct and\n\t\t\t\t\t// submit a Bitcoin Cash transaction!\n\t\t\t\t\tconfs, err := client.Confirmations(context.Background(), txHash)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\tlog.Printf(\"                   %v/3 confirmations\", confs)\n\t\t\t\t\tif confs >= 3 {\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\ttime.Sleep(10 * time.Second)\n\t\t\t\t}\n\n\t\t\t\t// Check that we can load the output and that it is equal.\n\t\t\t\t// Otherwise, something strange is happening with the RPC\n\t\t\t\t// client.\n\t\t\t\toutput2, _, err = client.Output(context.Background(), output.Outpoint)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tExpect(reflect.DeepEqual(output, output2)).To(BeTrue())\n\n\t\t\t\t// Check we can get the transaction inputs\n\t\t\t\tsenders, err := client.TxSenders(context.Background(), txHash)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tExpect(len(senders)).Should(Equal(1))\n\t\t\t\tExpect(senders[0]).Should(Equal(pkhAddr.EncodeAddress()))\n\t\t\t})\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/bitcoincash/gas.go",
    "content": "package bitcoincash\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"math\"\n\n\t\"github.com/renproject/pack\"\n)\n\nconst (\n\tbchToSatoshis  = 1e8\n\tkilobyteToByte = 1024\n)\n\n// A GasEstimator returns the SATs-per-byte that is needed in order to confirm\n// transactions with an estimated maximum delay of one block. In distributed\n// networks that collectively build, sign, and submit transactions, it is\n// important that all nodes in the network have reached consensus on the\n// SATs-per-byte.\ntype GasEstimator struct {\n\tclient      Client\n\tfallbackGas pack.U256\n}\n\n// NewGasEstimator returns a simple gas estimator that always returns the given\n// number of SATs-per-byte.\nfunc NewGasEstimator(client Client, fallbackGas pack.U256) GasEstimator {\n\treturn GasEstimator{\n\t\tclient:      client,\n\t\tfallbackGas: fallbackGas,\n\t}\n}\n\n// EstimateGas returns the number of SATs-per-byte (for both price and cap) that\n// is needed in order to confirm transactions with a minimal delay. It is the\n// responsibility of the caller to know the number of bytes in their\n// transaction. This method calls the `estimatefee` RPC call to the node, which\n// based on a conservative (considering longer history) strategy returns the\n// estimated BCH per kilobyte of data in the transaction. An error will be\n// returned if the node hasn't observed enough blocks to make an estimate.\nfunc (gasEstimator GasEstimator) EstimateGas(ctx context.Context) (pack.U256, pack.U256, error) {\n\tfeeRate, err := gasEstimator.client.EstimateFeeLegacy(ctx, int64(0))\n\tif err != nil {\n\t\treturn gasEstimator.fallbackGas, gasEstimator.fallbackGas, err\n\t}\n\n\tif feeRate <= 0.0 {\n\t\treturn gasEstimator.fallbackGas, gasEstimator.fallbackGas, fmt.Errorf(\"invalid fee rate: %v\", feeRate)\n\t}\n\n\tsatsPerByte := uint64(math.Ceil(feeRate * bchToSatoshis / kilobyteToByte))\n\treturn pack.NewU256FromUint64(satsPerByte), pack.NewU256FromUint64(satsPerByte), nil\n}\n"
  },
  {
    "path": "chain/bitcoincash/gas_test.go",
    "content": "package bitcoincash_test\n\nimport (\n\t\"context\"\n\n\t\"github.com/renproject/multichain/chain/bitcoincash\"\n\t\"github.com/renproject/pack\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Gas\", func() {\n\tContext(\"when estimating bitcoincash network fee\", func() {\n\t\tIt(\"should work\", func() {\n\t\t\tctx, cancel := context.WithCancel(context.Background())\n\t\t\tdefer cancel()\n\n\t\t\tclient := bitcoincash.NewClient(bitcoincash.DefaultClientOptions())\n\n\t\t\tfallbackGas := uint64(123)\n\t\t\tgasEstimator := bitcoincash.NewGasEstimator(client, pack.NewU256FromUint64(fallbackGas))\n\t\t\tgasPrice, _, err := gasEstimator.EstimateGas(ctx)\n\t\t\tif err != nil {\n\t\t\t\tExpect(gasPrice).To(Equal(pack.NewU256FromUint64(fallbackGas)))\n\t\t\t} else {\n\t\t\t\tExpect(gasPrice.Int().Uint64()).To(BeNumerically(\">\", 0))\n\t\t\t}\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/bitcoincash/utxo.go",
    "content": "package bitcoincash\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"math/big\"\n\n\t\"github.com/btcsuite/btcd/btcec\"\n\t\"github.com/btcsuite/btcd/chaincfg\"\n\t\"github.com/btcsuite/btcd/chaincfg/chainhash\"\n\t\"github.com/btcsuite/btcd/txscript\"\n\t\"github.com/btcsuite/btcd/wire\"\n\t\"github.com/renproject/multichain/api/utxo\"\n\t\"github.com/renproject/multichain/chain/bitcoin\"\n\t\"github.com/renproject/pack\"\n)\n\n// SighashForkID used to distinguish between Bitcoin Cash and Bitcoin\n// transactions by masking hash types.\nconst SighashForkID = txscript.SigHashType(0x40)\n\n// SighashMask used to mask hash types.\nconst SighashMask = txscript.SigHashType(0x1F)\n\n// Version of Bitcoin Cash transactions supported by the multichain.\nconst Version int32 = 1\n\n// ClientOptions are used to parameterise the behaviour of the Client.\ntype ClientOptions = bitcoin.ClientOptions\n\n// DefaultClientOptions returns ClientOptions with the default settings. These\n// settings are valid for use with the default local deployment of the\n// multichain. In production, the host, user, and password should be changed.\nfunc DefaultClientOptions() ClientOptions {\n\treturn bitcoin.DefaultClientOptions().WithHost(\"http://127.0.0.1:19443\")\n}\n\n// A Client interacts with an instance of the Bitcoin network using the RPC\n// interface exposed by a Bitcoin node.\ntype Client = bitcoin.Client\n\n// NewClient returns a new Client.\nvar NewClient = bitcoin.NewClient\n\n// The TxBuilder is an implementation of a UTXO-compatible transaction builder\n// for Bitcoin.\ntype TxBuilder struct {\n\tparams *chaincfg.Params\n}\n\n// NewTxBuilder returns an implementation of the transaction builder interface\n// from the Bitcoin Compat API, and exposes the functionality to build simple\n// Bitcoin Cash transactions.\nfunc NewTxBuilder(params *chaincfg.Params) utxo.TxBuilder {\n\treturn TxBuilder{params: params}\n}\n\n// BuildTx returns a simple Bitcoin Cash transaction that consumes the funds\n// from the given outputs, and sends the to the given recipients. The difference\n// in the sum value of the inputs and the sum value of the recipients is paid as\n// a fee to the Bitcoin Cash network.\n//\n// It is assumed that the required signature scripts require the SIGHASH_ALL\n// signatures and the serialized public key:\n//\n//  builder := txscript.NewScriptBuilder()\n//  builder.AddData(append(signature.Serialize(), byte(txscript.SigHashAll|SighashForkID)))\n//  builder.AddData(serializedPubKey)\n//\n// Outputs produced for recipients will use P2PKH, or P2SH scripts as the pubkey\n// script, based on the format of the recipient address.\nfunc (txBuilder TxBuilder) BuildTx(inputs []utxo.Input, recipients []utxo.Recipient) (utxo.Tx, error) {\n\tmsgTx := wire.NewMsgTx(Version)\n\n\t// Address encoder-decoder\n\taddrEncodeDecoder := NewAddressEncodeDecoder(txBuilder.params)\n\n\t// Inputs\n\tfor _, input := range inputs {\n\t\thash := chainhash.Hash{}\n\t\tcopy(hash[:], input.Hash)\n\t\tindex := input.Index.Uint32()\n\t\tmsgTx.AddTxIn(wire.NewTxIn(wire.NewOutPoint(&hash, index), nil, nil))\n\t}\n\n\t// Outputs\n\tfor _, recipient := range recipients {\n\t\taddrBytes, err := addrEncodeDecoder.DecodeAddress(recipient.To)\n\t\tif err != nil {\n\t\t\treturn &Tx{}, err\n\t\t}\n\t\taddr, err := addressFromRawBytes(addrBytes, txBuilder.params)\n\t\tif err != nil {\n\t\t\treturn &Tx{}, err\n\t\t}\n\t\tscript, err := txscript.PayToAddrScript(addr.BitcoinAddress())\n\t\tif err != nil {\n\t\t\treturn &Tx{}, err\n\t\t}\n\t\tvalue := recipient.Value.Int().Int64()\n\t\tif value < 0 {\n\t\t\treturn nil, fmt.Errorf(\"expected value >= 0, got value = %v\", value)\n\t\t}\n\t\tmsgTx.AddTxOut(wire.NewTxOut(value, script))\n\t}\n\n\treturn &Tx{inputs: inputs, recipients: recipients, msgTx: msgTx, signed: false}, nil\n}\n\n// Tx represents a simple Bitcoin Cash transaction that implements the Bitcoin\n// Compat API.\ntype Tx struct {\n\tinputs     []utxo.Input\n\trecipients []utxo.Recipient\n\n\tmsgTx *wire.MsgTx\n\n\tsigned bool\n}\n\n// Hash returns the transaction hash of the given underlying transaction. It\n// implements the multichain.UTXOTx interface\nfunc (tx *Tx) Hash() (pack.Bytes, error) {\n\ttxhash := tx.msgTx.TxHash()\n\treturn pack.NewBytes(txhash[:]), nil\n}\n\n// Inputs returns the UTXO inputs in the underlying transaction. It implements\n// the multichain.UTXOTx interface\nfunc (tx *Tx) Inputs() ([]utxo.Input, error) {\n\treturn tx.inputs, nil\n}\n\n// Outputs returns the UTXO outputs in the underlying transaction. It implements\n// the multichain.UTXOTx interface\nfunc (tx *Tx) Outputs() ([]utxo.Output, error) {\n\thash, err := tx.Hash()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\toutputs := make([]utxo.Output, len(tx.msgTx.TxOut))\n\tfor i := range outputs {\n\t\toutputs[i].Outpoint = utxo.Outpoint{\n\t\t\tHash:  hash,\n\t\t\tIndex: pack.NewU32(uint32(i)),\n\t\t}\n\t\toutputs[i].PubKeyScript = pack.Bytes(tx.msgTx.TxOut[i].PkScript)\n\t\tif tx.msgTx.TxOut[i].Value < 0 {\n\t\t\treturn nil, fmt.Errorf(\"bad output %v: value is less than zero\", i)\n\t\t}\n\t\toutputs[i].Value = pack.NewU256FromU64(pack.NewU64(uint64(tx.msgTx.TxOut[i].Value)))\n\t}\n\treturn outputs, nil\n}\n\n// Sighashes returns the digests that must be signed before the transaction\n// can be submitted by the client.\nfunc (tx *Tx) Sighashes() ([]pack.Bytes32, error) {\n\tsighashes := make([]pack.Bytes32, len(tx.inputs))\n\n\tfor i, txin := range tx.inputs {\n\t\tpubKeyScript := txin.Output.PubKeyScript\n\t\tsigScript := txin.SigScript\n\t\tvalue := txin.Output.Value.Int().Int64()\n\t\tif value < 0 {\n\t\t\treturn []pack.Bytes32{}, fmt.Errorf(\"expected value >= 0, got value = %v\", value)\n\t\t}\n\n\t\tvar hash []byte\n\t\tif sigScript == nil {\n\t\t\thash = CalculateBip143Sighash(pubKeyScript, txscript.NewTxSigHashes(tx.msgTx), txscript.SigHashAll, tx.msgTx, i, value)\n\t\t} else {\n\t\t\thash = CalculateBip143Sighash(sigScript, txscript.NewTxSigHashes(tx.msgTx), txscript.SigHashAll, tx.msgTx, i, value)\n\t\t}\n\n\t\tsighash := [32]byte{}\n\t\tcopy(sighash[:], hash)\n\t\tsighashes[i] = pack.NewBytes32(sighash)\n\t}\n\treturn sighashes, nil\n}\n\n// Sign consumes a list of signatures, and adds them to the list of UTXOs in\n// the underlying transactions. It implements the multichain.UTXOTx interface\nfunc (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error {\n\tif tx.signed {\n\t\treturn fmt.Errorf(\"already signed\")\n\t}\n\tif len(signatures) != len(tx.msgTx.TxIn) {\n\t\treturn fmt.Errorf(\"expected %v signatures, got %v signatures\", len(tx.msgTx.TxIn), len(signatures))\n\t}\n\n\tfor i, rsv := range signatures {\n\t\tr := new(big.Int).SetBytes(rsv[:32])\n\t\ts := new(big.Int).SetBytes(rsv[32:64])\n\t\tsignature := btcec.Signature{\n\t\t\tR: r,\n\t\t\tS: s,\n\t\t}\n\n\t\tbuilder := txscript.NewScriptBuilder()\n\t\tbuilder.AddData(append(signature.Serialize(), byte(txscript.SigHashAll|SighashForkID)))\n\t\tbuilder.AddData(pubKey)\n\t\tif tx.inputs[i].SigScript != nil {\n\t\t\tbuilder.AddData(tx.inputs[i].SigScript)\n\t\t}\n\t\tsignatureScript, err := builder.Script()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttx.msgTx.TxIn[i].SignatureScript = signatureScript\n\t}\n\n\ttx.signed = true\n\treturn nil\n}\n\n// Serialize serializes the UTXO transaction to bytes\nfunc (tx *Tx) Serialize() (pack.Bytes, error) {\n\tbuf := new(bytes.Buffer)\n\tif err := tx.msgTx.Serialize(buf); err != nil {\n\t\treturn pack.Bytes{}, err\n\t}\n\treturn pack.NewBytes(buf.Bytes()), nil\n}\n\n// CalculateBip143Sighash computes the sighash digest of a transaction's input\n// using the new, optimized digest calculation algorithm defined in BIP0143.\n// This function makes use of pre-calculated sighash fragments stored within the\n// passed HashCache to eliminate duplicate hashing computations when calculating\n// the final digest, reducing the complexity from O(N^2) to O(N). Additionally,\n// signatures now cover the input value of the referenced unspent output. This\n// allows offline, or hardware wallets to compute the exact amount being spent,\n// in addition to the final transaction fee. In the case the wallet if fed an\n// invalid input amount, the real sighash will differ causing the produced\n// signature to be invalid.\n//\n// https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki\nfunc CalculateBip143Sighash(subScript []byte, sigHashes *txscript.TxSigHashes, hashType txscript.SigHashType, tx *wire.MsgTx, idx int, amt int64) []byte {\n\n\t// As a sanity check, ensure the passed input index for the transaction\n\t// is valid.\n\tif idx > len(tx.TxIn)-1 {\n\t\tfmt.Printf(\"CalculateBip143Sighash: i %d with %d inputs\", idx, len(tx.TxIn))\n\t\treturn nil\n\t}\n\n\t// We'll utilize this buffer throughout to incrementally calculate\n\t// the signature hash for this transaction.\n\tvar sigHash bytes.Buffer\n\n\t// First write out, then encode the transaction's version number.\n\tvar bVersion [4]byte\n\tbinary.LittleEndian.PutUint32(bVersion[:], uint32(tx.Version))\n\tsigHash.Write(bVersion[:])\n\n\t// Next write out the possibly pre-calculated hashes for the sequence\n\t// numbers of all inputs, and the hashes of the previous outs for all\n\t// outputs.\n\tvar zeroHash chainhash.Hash\n\n\t// If anyone can pay isn't active, then we can use the cached\n\t// hashPrevOuts, otherwise we just write zeroes for the prev outs.\n\tif hashType&txscript.SigHashAnyOneCanPay == 0 {\n\t\tsigHash.Write(sigHashes.HashPrevOuts[:])\n\t} else {\n\t\tsigHash.Write(zeroHash[:])\n\t}\n\n\t// If the sighash isn't anyone can pay, single, or none, the use the\n\t// cached hash sequences, otherwise write all zeroes for the\n\t// hashSequence.\n\tif hashType&txscript.SigHashAnyOneCanPay == 0 &&\n\t\thashType&SighashMask != txscript.SigHashSingle &&\n\t\thashType&SighashMask != txscript.SigHashNone {\n\t\tsigHash.Write(sigHashes.HashSequence[:])\n\t} else {\n\t\tsigHash.Write(zeroHash[:])\n\t}\n\n\t// Next, write the outpoint being spent.\n\tsigHash.Write(tx.TxIn[idx].PreviousOutPoint.Hash[:])\n\tvar bIndex [4]byte\n\tbinary.LittleEndian.PutUint32(bIndex[:], tx.TxIn[idx].PreviousOutPoint.Index)\n\tsigHash.Write(bIndex[:])\n\n\t// For p2wsh outputs, and future outputs, the script code is the\n\t// original script, with all code separators removed, serialized\n\t// with a var int length prefix.\n\twire.WriteVarBytes(&sigHash, 0, subScript)\n\n\t// Next, add the input amount, and sequence number of the input being\n\t// signed.\n\tvar bAmount [8]byte\n\tbinary.LittleEndian.PutUint64(bAmount[:], uint64(amt))\n\tsigHash.Write(bAmount[:])\n\tvar bSequence [4]byte\n\tbinary.LittleEndian.PutUint32(bSequence[:], tx.TxIn[idx].Sequence)\n\tsigHash.Write(bSequence[:])\n\n\t// If the current signature mode isn't single, or none, then we can\n\t// re-use the pre-generated hashoutputs sighash fragment. Otherwise,\n\t// we'll serialize and add only the target output index to the signature\n\t// pre-image.\n\tif hashType&SighashMask != txscript.SigHashSingle &&\n\t\thashType&SighashMask != txscript.SigHashNone {\n\t\tsigHash.Write(sigHashes.HashOutputs[:])\n\t} else if hashType&SighashMask == txscript.SigHashSingle && idx < len(tx.TxOut) {\n\t\tvar b bytes.Buffer\n\t\twire.WriteTxOut(&b, 0, 0, tx.TxOut[idx])\n\t\tsigHash.Write(chainhash.DoubleHashB(b.Bytes()))\n\t} else {\n\t\tsigHash.Write(zeroHash[:])\n\t}\n\n\t// Finally, write out the transaction's locktime, and the sig hash\n\t// type.\n\tvar bLockTime [4]byte\n\tbinary.LittleEndian.PutUint32(bLockTime[:], tx.LockTime)\n\tsigHash.Write(bLockTime[:])\n\tvar bHashType [4]byte\n\tbinary.LittleEndian.PutUint32(bHashType[:], uint32(hashType|SighashForkID))\n\tsigHash.Write(bHashType[:])\n\n\treturn chainhash.DoubleHashB(sigHash.Bytes())\n}\n"
  },
  {
    "path": "chain/bitcoincash/utxo_test.go",
    "content": "package bitcoincash_test\n"
  },
  {
    "path": "chain/bsc/address.go",
    "content": "package bsc\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\ntype (\n\t// AddressEncodeDecoder re-exports evm.AddressEncodeDecoder.\n\tAddressEncodeDecoder = evm.AddressEncodeDecoder\n\n\t// AddressEncoder re-exports evm.AddressEncoder.\n\tAddressEncoder = evm.AddressEncoder\n\n\t// AddressDecoder re-exports evm.AddressDecoder.\n\tAddressDecoder = evm.AddressDecoder\n\n\t// Address re-exports evm.Address.\n\tAddress = evm.Address\n)\n\nvar (\n\t// NewAddressEncodeDecoder re-exports evm.NewAddressEncodeDecoder.\n\tNewAddressEncodeDecoder = evm.NewAddressEncodeDecoder\n\n\t// NewAddressDecoder re-exports evm.NewAddressDecoder.\n\tNewAddressDecoder = evm.NewAddressDecoder\n\n\t// NewAddressEncoder re-exports evm.NewAddressEncoder.\n\tNewAddressEncoder = evm.NewAddressEncoder\n\n\t// NewAddressFromHex re-exports evm.NewAddressFromHex.\n\tNewAddressFromHex = evm.NewAddressFromHex\n)\n"
  },
  {
    "path": "chain/bsc/address_test.go",
    "content": "package bsc_test\n\nimport (\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"testing/quick\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n\t\"github.com/renproject/multichain/chain/bsc\"\n\t\"github.com/renproject/surge\"\n)\n\nvar _ = Describe(\"Address\", func() {\n\tContext(\"when unmarshaling and unmarshaling\", func() {\n\t\tIt(\"should equal itself\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\taddr := bsc.Address(x)\n\t\t\t\tExpect(addr.SizeHint()).To(Equal(20))\n\n\t\t\t\tbytes, err := surge.ToBinary(addr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tvar newAddr bsc.Address\n\t\t\t\terr = surge.FromBinary(&newAddr, bytes)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tExpect(addr).To(Equal(newAddr))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when unmarshaling and unmarshaling to/from JSON\", func() {\n\t\tIt(\"should equal itself\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\taddr := bsc.Address(x)\n\n\t\t\t\tbytes, err := json.Marshal(addr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tvar newAddr bsc.Address\n\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tExpect(addr).To(Equal(newAddr))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\n\t\tContext(\"when the address is invalid hex\", func() {\n\t\t\tIt(\"should return an error\", func() {\n\t\t\t\tf := func(x [40]byte) bool {\n\t\t\t\t\tbytes, err := json.Marshal(string(x[:]))\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tvar newAddr bsc.Address\n\t\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\terr := quick.Check(f, nil)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t})\n\t\t})\n\n\t\tContext(\"when the address is invalid length\", func() {\n\t\t\tIt(\"should return an error\", func() {\n\t\t\t\tf := func(x [10]byte) bool {\n\t\t\t\t\taddr := hex.EncodeToString(x[:])\n\t\t\t\t\tbytes, err := json.Marshal(addr)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tvar newAddr bsc.Address\n\t\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\terr := quick.Check(f, nil)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t})\n\t\t})\n\t})\n\n\tContext(\"when unmarshalling random data\", func() {\n\t\tIt(\"should not panic\", func() {\n\t\t\tf := func(x []byte) bool {\n\t\t\t\tvar addr bsc.Address\n\t\t\t\tExpect(func() { addr.Unmarshal(x, surge.MaxBytes) }).ToNot(Panic())\n\t\t\t\tExpect(func() { json.Unmarshal(x, &addr) }).ToNot(Panic())\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/bsc/client.go",
    "content": "package bsc\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\nconst (\n\t// DefaultClientRPCURL is the RPC URL used by default, to interact with the\n\t// bsc node.\n\tDefaultClientRPCURL = \"http://127.0.0.1:8575/\"\n)\n\n// Client re-exports evm.Client.\ntype Client = evm.Client\n\n// NewClient re-exports evm.NewClient.\nvar NewClient = evm.NewClient\n"
  },
  {
    "path": "chain/bsc/encode.go",
    "content": "package bsc\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\n// Payload re-exports evm.Payload.\ntype Payload = evm.Payload\n\n// Encode re-exports evm.Encode.\nvar Encode = evm.Encode\n"
  },
  {
    "path": "chain/bsc/encode_test.go",
    "content": "package bsc_test\n\nimport (\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"math\"\n\t\"testing/quick\"\n\n\t\"github.com/renproject/multichain/chain/bsc\"\n\n\t\"github.com/renproject/pack\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/ginkgo/extensions/table\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Encoding\", func() {\n\tContext(\"when encoding bytes\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x []byte) bool {\n\t\t\t\targ := pack.NewBytes(x)\n\n\t\t\t\tresBytes := bsc.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\n\t\t\t\texpectedBytes := make([]byte, int(math.Ceil(float64(len(x))/32)*32))\n\t\t\t\tcopy(expectedBytes, x)\n\t\t\t\t// Note: since the first parameter has a dynamic length, the\n\t\t\t\t// first 32 bytes instead contain a pointer to the data.\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", 32) + fmt.Sprintf(\"%064x\", len(x)) + hex.EncodeToString(expectedBytes)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 32 bytes\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [32]byte) bool {\n\t\t\t\targ := pack.NewBytes32(x)\n\n\t\t\t\tresBytes := bsc.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := hex.EncodeToString(x[:])\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 8-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint8) bool {\n\t\t\t\targ := pack.NewU8(x)\n\n\t\t\t\tresBytes := bsc.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 16-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint16) bool {\n\t\t\t\targ := pack.NewU16(x)\n\n\t\t\t\tresBytes := bsc.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 32-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint32) bool {\n\t\t\t\targ := pack.NewU32(x)\n\n\t\t\t\tresBytes := bsc.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 64-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint64) bool {\n\t\t\t\targ := pack.NewU64(x)\n\n\t\t\t\tresBytes := bsc.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 128-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [16]byte) bool {\n\t\t\t\targ := pack.NewU128(x)\n\n\t\t\t\tresBytes := bsc.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 256-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [32]byte) bool {\n\t\t\t\targ := pack.NewU256(x)\n\n\t\t\t\tresBytes := bsc.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding Ethereum addresses\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\targ := bsc.Address(x)\n\n\t\t\t\tresBytes := bsc.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\n\t\t\t\texpectedBytes := make([]byte, 32)\n\t\t\t\tcopy(expectedBytes, x[:])\n\t\t\t\texpectedString := hex.EncodeToString(expectedBytes)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding an unsupported type\", func() {\n\t\tIt(\"should panic\", func() {\n\t\t\tf := func(x bool) bool {\n\t\t\t\targ := pack.NewBool(x)\n\t\t\t\tExpect(func() { bsc.Encode(arg) }).To(Panic())\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\ttype testCase struct {\n\t\taddr   string\n\t\tamount uint64\n\t\thash   string\n\t\tresult string\n\t}\n\n\ttestCases := []testCase{\n\t\t{\n\t\t\taddr:   \"797522Fb74d42bB9fbF6b76dEa24D01A538d5D66\",\n\t\t\tamount: 10000,\n\t\t\thash:   \"702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed\",\n\t\t\tresult: \"797522fb74d42bb9fbf6b76dea24d01a538d5d660000000000000000000000000000000000000000000000000000000000000000000000000000000000002710702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed\",\n\t\t},\n\t\t{\n\t\t\taddr:   \"58afb504ef2444a267b8c7ce57279417f1377ceb\",\n\t\t\tamount: 50000000000000000,\n\t\t\thash:   \"dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93\",\n\t\t\tresult: \"58afb504ef2444a267b8c7ce57279417f1377ceb00000000000000000000000000000000000000000000000000000000000000000000000000b1a2bc2ec50000dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93\",\n\t\t},\n\t\t{\n\t\t\taddr:   \"0000000000000000000000000000000000000000\",\n\t\t\tamount: 0,\n\t\t\thash:   \"0000000000000000000000000000000000000000000000000000000000000000\",\n\t\t\tresult: \"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n\t\t},\n\t}\n\n\tDescribeTable(\"when encoding args\",\n\t\tfunc(test testCase) {\n\t\t\taddrBytes, err := hex.DecodeString(test.addr)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\tvar addr bsc.Address\n\t\t\tcopy(addr[:], addrBytes)\n\n\t\t\thashBytes32 := [32]byte{}\n\t\t\thashBytes, err := hex.DecodeString(test.hash)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\tcopy(hashBytes32[:], hashBytes)\n\n\t\t\targs := []interface{}{\n\t\t\t\taddr,\n\t\t\t\tpack.NewU64(test.amount),\n\t\t\t\tpack.NewBytes32(hashBytes32),\n\t\t\t}\n\t\t\tresult := bsc.Encode(args...)\n\t\t\tExpect(hex.EncodeToString(result)).To(Equal(test.result))\n\t\t},\n\n\t\tEntry(\"should return the same result as solidity for small transactions\", testCases[0]),\n\t\tEntry(\"should return the same result as solidity for large transactions\", testCases[1]),\n\t\tEntry(\"should return the same result as solidity for empty transactions\", testCases[2]),\n\t)\n})\n"
  },
  {
    "path": "chain/bsc/gas.go",
    "content": "package bsc\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\n// GasEstimator re-exports evm.GasEstimator.\ntype GasEstimator = evm.GasEstimator\n\n// NewGasEstimator re-exports evm.NewGasEstimator.\nvar NewGasEstimator = evm.NewGasEstimator\n"
  },
  {
    "path": "chain/bsc/tx.go",
    "content": "package bsc\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\ntype (\n\t// TxBuilder re-exports evm.TxBuilder.\n\tTxBuilder = evm.TxBuilder\n\n\t// Tx re-exports evm.Tx.\n\tTx = evm.Tx\n)\n\n// NewTxBuilder re-exports evm.NewTxBuilder.\nvar NewTxBuilder = evm.NewTxBuilder\n"
  },
  {
    "path": "chain/cosmos/address.go",
    "content": "package cosmos\n\nimport (\n\tsdk \"github.com/cosmos/cosmos-sdk/types\"\n\t\"github.com/renproject/multichain/api/address\"\n)\n\n// An Address is a public address that can be encoded/decoded to/from strings.\n// Addresses are usually formatted different between different network\n// configurations.\ntype Address sdk.AccAddress\n\n// AccAddress convert Address to sdk.AccAddress\nfunc (addr Address) AccAddress() sdk.AccAddress {\n\treturn sdk.AccAddress(addr)\n}\n\n// String implements the Stringer interface\nfunc (addr Address) String() string {\n\treturn sdk.AccAddress(addr).String()\n}\n\n// AddressEncodeDecoder encapsulates fields that implement the\n// address.EncodeDecoder interface\ntype AddressEncodeDecoder struct {\n\tAddressEncoder\n\tAddressDecoder\n}\n\n// NewAddressEncodeDecoder creates a new address encoder-decoder\nfunc NewAddressEncodeDecoder() AddressEncodeDecoder {\n\treturn AddressEncodeDecoder{\n\t\tAddressEncoder: NewAddressEncoder(),\n\t\tAddressDecoder: NewAddressDecoder(),\n\t}\n}\n\n// AddressEncoder implements the address.Encoder interface\ntype AddressEncoder struct {\n}\n\n// AddressDecoder implements the address.Decoder interface\ntype AddressDecoder struct {\n}\n\n// NewAddressDecoder creates a new address decoder\nfunc NewAddressDecoder() AddressDecoder {\n\treturn AddressDecoder{}\n}\n\n// NewAddressEncoder creates a new address encoder\nfunc NewAddressEncoder() AddressEncoder {\n\treturn AddressEncoder{}\n}\n\n// DecodeAddress consumes a human-readable representation of a cosmos\n// compatible address and decodes it to its raw bytes representation.\nfunc (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) {\n\trawAddr, err := sdk.AccAddressFromBech32(string(addr))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn address.RawAddress(rawAddr), nil\n}\n\n// EncodeAddress consumes raw bytes and encodes them to a human-readable\n// address format.\nfunc (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) {\n\tif err := sdk.VerifyAddressFormat(rawAddr); err != nil {\n\t\treturn address.Address(\"\"), err\n\t}\n\tbech32Addr := sdk.AccAddress(rawAddr)\n\treturn address.Address(bech32Addr.String()), nil\n}\n"
  },
  {
    "path": "chain/cosmos/address_test.go",
    "content": "package cosmos_test\n"
  },
  {
    "path": "chain/cosmos/client.go",
    "content": "package cosmos\n\nimport (\n\t\"context\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"time\"\n\n\tcodecTypes \"github.com/cosmos/cosmos-sdk/codec/types\"\n\tauthTypes \"github.com/cosmos/cosmos-sdk/x/auth/types\"\n\t\"github.com/renproject/multichain/api/account\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/pack\"\n\n\tcosmClient \"github.com/cosmos/cosmos-sdk/client\"\n\tcliRpc \"github.com/cosmos/cosmos-sdk/client/rpc\"\n\t\"github.com/cosmos/cosmos-sdk/codec\"\n\t\"github.com/cosmos/cosmos-sdk/types\"\n\t\"github.com/cosmos/cosmos-sdk/types/tx\"\n\tcosmTx \"github.com/cosmos/cosmos-sdk/x/auth/tx\"\n\tbankType \"github.com/cosmos/cosmos-sdk/x/bank/types\"\n\trpchttp \"github.com/tendermint/tendermint/rpc/client/http\"\n)\n\nconst (\n\t// DefaultClientTimeout used by the Client.\n\tDefaultClientTimeout = time.Minute\n\t// DefaultClientTimeoutRetry used by the Client.\n\tDefaultClientTimeoutRetry = time.Second\n\t// DefaultClientHost used by the Client. This should only be used for local\n\t// deployments of the multichain.\n\tDefaultClientHost = pack.String(\"http://0.0.0.0:26657\")\n\t// DefaultBroadcastMode configures the behaviour of a cosmos client while it\n\t// interacts with the cosmos node. Allowed broadcast modes can be async, sync\n\t// and block. \"async\" returns immediately after broadcasting, \"sync\" returns\n\t// after the transaction has been checked and \"block\" waits until the\n\t// transaction is committed to the chain.\n\tDefaultBroadcastMode = pack.String(\"sync\")\n\t// DefaultCoinDenom used by the Client.\n\tDefaultCoinDenom = pack.String(\"uluna\")\n)\n\n// ClientOptions are used to parameterise the behaviour of the Client.\ntype ClientOptions struct {\n\tTimeout       time.Duration\n\tTimeoutRetry  time.Duration\n\tHost          pack.String\n\tBroadcastMode pack.String\n\tCoinDenom     pack.String\n\tChainID       pack.String\n}\n\n// DefaultClientOptions returns ClientOptions with the default settings. These\n// settings are valid for use with the default local deployment of the\n// multichain. In production, the host, user, and password should be changed.\nfunc DefaultClientOptions() ClientOptions {\n\treturn ClientOptions{\n\t\tTimeout:       DefaultClientTimeout,\n\t\tTimeoutRetry:  DefaultClientTimeoutRetry,\n\t\tHost:          DefaultClientHost,\n\t\tBroadcastMode: DefaultBroadcastMode,\n\t\tCoinDenom:     DefaultCoinDenom,\n\t\tChainID:       DefaultChainID,\n\t}\n}\n\n// WithTimeout sets the timeout used by the Client.\nfunc (opts ClientOptions) WithTimeout(timeout time.Duration) ClientOptions {\n\topts.Timeout = timeout\n\treturn opts\n}\n\n// WithTimeoutRetry sets the timeout retry used by the Client.\nfunc (opts ClientOptions) WithTimeoutRetry(timeoutRetry time.Duration) ClientOptions {\n\topts.TimeoutRetry = timeoutRetry\n\treturn opts\n}\n\n// WithHost sets the URL of the node.\nfunc (opts ClientOptions) WithHost(host pack.String) ClientOptions {\n\topts.Host = host\n\treturn opts\n}\n\n// WithBroadcastMode sets the behaviour of the Client when interacting with the\n// underlying node.\nfunc (opts ClientOptions) WithBroadcastMode(broadcastMode pack.String) ClientOptions {\n\topts.BroadcastMode = broadcastMode\n\treturn opts\n}\n\n// WithCoinDenom sets the coin denomination used by the Client.\nfunc (opts ClientOptions) WithCoinDenom(coinDenom pack.String) ClientOptions {\n\topts.CoinDenom = coinDenom\n\treturn opts\n}\n\n// WithChainID sets the chain id used by the Client.\nfunc (opts ClientOptions) WithChainID(chainid pack.String) ClientOptions {\n\topts.ChainID = chainid\n\treturn opts\n}\n\n// Client interacts with an instance of the Cosmos based network using the REST\n// interface exposed by a lightclient node.\ntype Client struct {\n\topts ClientOptions\n\tctx  cosmClient.Context\n\thrp  string\n}\n\n// NewClient returns a new Client.\nfunc NewClient(opts ClientOptions, cdc codec.Codec, txConfig cosmClient.TxConfig, interfaceReg codecTypes.InterfaceRegistry, amino *codec.LegacyAmino, hrp string) *Client {\n\thttpClient, err := rpchttp.NewWithClient(\n\t\tstring(opts.Host),\n\t\t\"websocket\",\n\t\t&http.Client{\n\t\t\tTimeout: opts.Timeout,\n\n\t\t\t// We override the transport layer with a custom implementation as\n\t\t\t// there is an issue with the Cosmos SDK that causes it to\n\t\t\t// incorrectly parse URLs.\n\t\t\tTransport: newTransport(string(opts.Host), &http.Transport{}),\n\t\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tcliCtx := cosmClient.Context{}.WithCodec(cdc).WithClient(httpClient).WithTxConfig(txConfig).WithInterfaceRegistry(interfaceReg).WithAccountRetriever(authTypes.AccountRetriever{}).WithLegacyAmino(amino).WithChainID(string(opts.ChainID))\n\n\treturn &Client{\n\t\topts: opts,\n\t\tctx:  cliCtx,\n\t\thrp:  hrp,\n\t}\n}\n\n// LatestBlock returns the most recent block's number.\nfunc (client *Client) LatestBlock(ctx context.Context) (pack.U64, error) {\n\theight, err := cliRpc.GetChainHeight(client.ctx)\n\tif err != nil {\n\t\treturn pack.NewU64(0), fmt.Errorf(\"get chain height: %v\", err)\n\t}\n\tif height < 0 {\n\t\treturn pack.NewU64(0), fmt.Errorf(\"unexpected chain height, expected > 0, got: %v\", height)\n\t}\n\n\treturn pack.NewU64(uint64(height)), nil\n}\n\n// Tx query transaction with txHash\nfunc (client *Client) Tx(ctx context.Context, txHash pack.Bytes) (account.Tx, pack.U64, error) {\n\tres, err := cosmTx.QueryTx(client.ctx, hex.EncodeToString(txHash[:]))\n\tif err != nil {\n\t\treturn &Tx{}, pack.NewU64(0), fmt.Errorf(\"query fail: %v\", err)\n\t}\n\n\tauthStdTx := res.Tx.GetCachedValue().(*tx.Tx)\n\tif res.Code != 0 {\n\t\treturn &Tx{}, pack.NewU64(0), fmt.Errorf(\"tx failed code: %v, log: %v\", res.Code, res.RawLog)\n\t}\n\treturn &Tx{originalTx: authStdTx, encoder: client.ctx.TxConfig.TxEncoder(), denom: string(client.opts.CoinDenom)}, pack.NewU64(1), nil\n}\n\n// SubmitTx to the Cosmos based network.\nfunc (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error {\n\ttxBytes, err := tx.Serialize()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"bad \\\"submittx\\\": %v\", err)\n\t}\n\n\tres, err := client.ctx.WithBroadcastMode(client.opts.BroadcastMode.String()).BroadcastTx(txBytes)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to broadcast tx : %w\", err)\n\t}\n\n\tif res.Code != 0 {\n\t\treturn fmt.Errorf(\"tx failed code: %v, log: %v\", res.Code, res.RawLog)\n\t}\n\n\treturn nil\n}\n\n// AccountNonce returns the current nonce of the account. This is the nonce to\n// be used while building a new transaction.\nfunc (client *Client) AccountNonce(ctx context.Context, addr address.Address) (pack.U256, error) {\n\tcosmosAddr, err := types.AccAddressFromBech32(string(addr))\n\tif err != nil {\n\t\treturn pack.U256{}, fmt.Errorf(\"bad address: '%v': %v\", addr, err)\n\t}\n\n\tacc, err := client.ctx.AccountRetriever.GetAccount(client.ctx, Address(cosmosAddr).AccAddress())\n\tif err != nil {\n\t\treturn pack.U256{}, fmt.Errorf(\"failed to get account nonce : '%v': %v\", addr, err)\n\t}\n\n\treturn pack.NewU256FromU64(pack.NewU64(acc.GetSequence())), nil\n}\n\n// AccountNumber returns the account number for a given address.\nfunc (client *Client) AccountNumber(ctx context.Context, addr address.Address) (pack.U64, error) {\n\tcosmosAddr, err := types.AccAddressFromBech32(string(addr))\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"bad address: '%v': %v\", addr, err)\n\t}\n\n\tacc, err := client.ctx.AccountRetriever.GetAccount(client.ctx, Address(cosmosAddr).AccAddress())\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"failed to get account : '%v': %w\", addr, err)\n\t}\n\treturn pack.U64(acc.GetAccountNumber()), nil\n}\n\n// AccountBalance returns the account balancee for a given address.\nfunc (client *Client) AccountBalance(ctx context.Context, addr address.Address) (pack.U256, error) {\n\tcosmosAddr, err := types.AccAddressFromBech32(string(addr))\n\tif err != nil {\n\t\treturn pack.U256{}, fmt.Errorf(\"bad address: '%v': %v\", addr, err)\n\t}\n\n\tbalResp, err := bankType.NewQueryClient(client.ctx).Balance(ctx, bankType.NewQueryBalanceRequest(Address(cosmosAddr).AccAddress(), string(client.opts.CoinDenom)))\n\tif err != nil {\n\t\treturn pack.U256{}, fmt.Errorf(\"failed to get account balance : '%v': %v\", addr, err)\n\t}\n\tbalance := balResp.GetBalance().Amount.BigInt()\n\n\t// If the balance exceeds `MaxU256`, return an error.\n\tif pack.MaxU256.Int().Cmp(balance) == -1 {\n\t\treturn pack.U256{}, fmt.Errorf(\"balance %v for %v exceeds MaxU256\", balance.String(), addr)\n\t}\n\n\treturn pack.NewU256FromInt(balance), nil\n}\n\ntype transport struct {\n\tremote string\n\tproxy  http.RoundTripper\n}\n\n// newTransport returns a custom implementation of http.RoundTripper that\n// overrides the request URL prior to sending the request.\nfunc newTransport(remote string, proxy http.RoundTripper) *transport {\n\treturn &transport{\n\t\tremote: remote,\n\t\tproxy:  proxy,\n\t}\n}\n\nfunc (t *transport) RoundTrip(req *http.Request) (*http.Response, error) {\n\tu, err := url.Parse(t.remote)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treq.URL = u\n\treq.Host = u.Host\n\n\t// Proxy request.\n\treturn t.proxy.RoundTrip(req)\n}\n"
  },
  {
    "path": "chain/cosmos/cosmos.go",
    "content": "package cosmos\n"
  },
  {
    "path": "chain/cosmos/cosmos_suite_test.go",
    "content": "package cosmos_test\n\nimport (\n\t\"testing\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nfunc TestCosmos(t *testing.T) {\n\tRegisterFailHandler(Fail)\n\tRunSpecs(t, \"Cosmos Suite\")\n}\n"
  },
  {
    "path": "chain/cosmos/cosmos_test.go",
    "content": "package cosmos_test\n"
  },
  {
    "path": "chain/cosmos/gas.go",
    "content": "package cosmos\n\nimport (\n\t\"context\"\n\n\t\"github.com/renproject/multichain/api/gas\"\n\t\"github.com/renproject/pack\"\n)\n\n// A GasEstimator returns the gas-per-byte that is needed in order to confirm\n// transactions with an estimated maximum delay of one block. In distributed\n// networks that collectively build, sign, and submit transactions, it is\n// important that all nodes in the network have reached consensus on the\n// gas-per-byte.\ntype GasEstimator struct {\n\tgasPerByte pack.U256\n}\n\n// NewGasEstimator returns a simple gas estimator that always returns the same\n// amount of gas-per-byte.\nfunc NewGasEstimator(gasPerByte pack.U256) gas.Estimator {\n\treturn &GasEstimator{\n\t\tgasPerByte: gasPerByte,\n\t}\n}\n\n// EstimateGas returns gas required per byte for Cosmos-compatible chains. This\n// value is used for both the price and cap, because Cosmos-compatible chains do\n// not have a distinct concept of cap.\nfunc (gasEstimator *GasEstimator) EstimateGas(ctx context.Context) (pack.U256, pack.U256, error) {\n\treturn gasEstimator.gasPerByte, gasEstimator.gasPerByte, nil\n}\n"
  },
  {
    "path": "chain/cosmos/gas_test.go",
    "content": "package cosmos_test\n\nimport (\n\t\"context\"\n\t\"testing/quick\"\n\n\t\"github.com/renproject/multichain/chain/cosmos\"\n\t\"github.com/renproject/pack\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Gas\", func() {\n\tContext(\"when estimating gas parameters\", func() {\n\t\tIt(\"should work\", func() {\n\t\t\tf := func(gasPerByte pack.U256) bool {\n\t\t\t\tgasEstimator := cosmos.NewGasEstimator(gasPerByte)\n\t\t\t\tgasPrice, _, err := gasEstimator.EstimateGas(context.Background())\n\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\tExpect(gasPrice).To(Equal(gasPerByte))\n\t\t\t\treturn true\n\t\t\t}\n\t\t\tExpect(quick.Check(f, nil)).To(Succeed())\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/cosmos/tx.go",
    "content": "package cosmos\n\nimport (\n\t\"context\"\n\t\"crypto/sha256\"\n\t\"fmt\"\n\t\"math/big\"\n\n\t\"github.com/btcsuite/btcd/btcec\"\n\t\"github.com/cosmos/cosmos-sdk/client\"\n\t\"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1\"\n\t\"github.com/cosmos/cosmos-sdk/types\"\n\ttxTypes \"github.com/cosmos/cosmos-sdk/types/tx\"\n\t\"github.com/cosmos/cosmos-sdk/types/tx/signing\"\n\tauthsigning \"github.com/cosmos/cosmos-sdk/x/auth/signing\"\n\t\"github.com/cosmos/cosmos-sdk/x/auth/tx\"\n\tbankType \"github.com/cosmos/cosmos-sdk/x/bank/types\"\n\t\"github.com/renproject/id\"\n\t\"github.com/renproject/multichain\"\n\t\"github.com/renproject/multichain/api/account\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/multichain/api/contract\"\n\t\"github.com/renproject/pack\"\n\t\"github.com/renproject/surge\"\n\t\"github.com/tendermint/tendermint/crypto/tmhash\"\n)\n\nconst (\n\t// DefaultChainID used by the Client.\n\tDefaultChainID = pack.String(\"testnet\")\n\t// DefaultSignMode used in signing the tx\n\tDefaultSignMode = 1\n\t// DefaultDecimalsDivisor is used when estimating gas prices for some Cosmos\n\t// chains, so that the result is an integer.\n\t// For example, the recommended Terra gas price is currently 0.01133 uluna.\n\t// To ensure we're only dealing with integers, the value can be represented\n\t// as 1133. When the transaction builder is calculating fees, it will divide\n\t// the total by the divisor (in this case 1e5), to calculate the actual\n\t// value.\n\tDefaultDecimalsDivisor = 1\n)\n\n// TxBuilderOptions only contains necessary options to build tx from tx builder\ntype TxBuilderOptions struct {\n\tChainID         pack.String\n\tDecimalsDivisor pack.U256\n}\n\n// DefaultTxBuilderOptions returns TxBuilderOptions with the default settings.\nfunc DefaultTxBuilderOptions() TxBuilderOptions {\n\treturn TxBuilderOptions{\n\t\tChainID:         DefaultChainID,\n\t\tDecimalsDivisor: pack.NewU256FromU64(DefaultDecimalsDivisor),\n\t}\n}\n\n// WithChainID sets the chain ID used by the transaction builder.\nfunc (opts TxBuilderOptions) WithChainID(chainID pack.String) TxBuilderOptions {\n\topts.ChainID = chainID\n\treturn opts\n}\n\nfunc (opts TxBuilderOptions) WithDecimalsDivisor(decimalDivisor pack.U256) TxBuilderOptions {\n\topts.DecimalsDivisor = decimalDivisor\n\treturn opts\n}\n\ntype txBuilder struct {\n\tclient          *Client\n\tchainID         pack.String\n\tsignMode        int32\n\tdecimalsDivisor pack.U256\n}\n\n// NewTxBuilder returns an implementation of the transaction builder interface\n// from the Cosmos Compat API, and exposes the functionality to build simple\n// Cosmos based transactions.\nfunc NewTxBuilder(options TxBuilderOptions, client *Client) account.TxBuilder {\n\treturn txBuilder{\n\t\tsignMode:        DefaultSignMode,\n\t\tclient:          client,\n\t\tchainID:         options.ChainID,\n\t\tdecimalsDivisor: options.DecimalsDivisor,\n\t}\n}\n\n// WithSignMode ad custom sign mode to the txBuilder\nfunc (builder txBuilder) WithSignMode(signMode int32) txBuilder {\n\tbuilder.signMode = signMode\n\treturn builder\n}\n\n// BuildTx consumes a list of MsgSend to build and return a cosmos transaction.\n// This transaction is unsigned, and must be signed before submitting to the\n// cosmos chain.\nfunc (builder txBuilder) BuildTx(ctx context.Context, fromPubKey *id.PubKey, to address.Address, value, nonce, gasLimit, gasPrice, gasCap pack.U256, payload pack.Bytes) (account.Tx, error) {\n\tpubKeyBytes, err := surge.ToBinary(fromPubKey)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tpubKey := secp256k1.PubKey{Key: pubKeyBytes}\n\tfrom := multichain.Address(types.AccAddress(pubKey.Address()).String())\n\n\tfromAddr, err := types.AccAddressFromBech32(string(from))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\ttoAddr, err := types.AccAddressFromBech32(string(to))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tsendMsg := MsgSend{\n\t\tFromAddress: Address(fromAddr),\n\t\tToAddress:   Address(toAddr),\n\t\tAmount: []Coin{\n\t\t\t{\n\t\t\t\tDenom:  builder.client.opts.CoinDenom,\n\t\t\t\tAmount: pack.NewU64(value.Int().Uint64()),\n\t\t\t},\n\t\t},\n\t}\n\n\tfees := Coins{Coin{\n\t\tDenom:  builder.client.opts.CoinDenom,\n\t\tAmount: pack.NewU64(gasPrice.Mul(gasLimit).Div(builder.decimalsDivisor).Int().Uint64()),\n\t}}\n\n\taccountNumber, err := builder.client.AccountNumber(ctx, from)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\ttxBuilder := builder.client.ctx.TxConfig.NewTxBuilder()\n\ttxBuilder.SetFeeAmount(fees.Coins())\n\ttxBuilder.SetGasLimit(gasLimit.Int().Uint64())\n\ttxBuilder.SetMemo(string(payload))\n\n\terr = txBuilder.SetMsgs(sendMsg.Msg())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tsigData := signing.SingleSignatureData{\n\t\tSignMode:  signing.SignMode(builder.signMode),\n\t\tSignature: nil,\n\t}\n\n\tsig := signing.SignatureV2{\n\t\tPubKey:   &pubKey,\n\t\tData:     &sigData,\n\t\tSequence: nonce.Int().Uint64(),\n\t}\n\tif err = txBuilder.SetSignatures(sig); err != nil {\n\t\treturn nil, err\n\t}\n\tsignerData := authsigning.SignerData{\n\t\tAccountNumber: accountNumber.Uint64(),\n\t\tChainID:       string(builder.chainID),\n\t\tSequence:      nonce.Int().Uint64(),\n\t}\n\ttxConfig := builder.client.ctx.TxConfig\n\tsignMsg, err := txConfig.SignModeHandler().GetSignBytes(signing.SignMode(builder.signMode), signerData, txBuilder.GetTx())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &Tx{\n\t\tencoder:   builder.client.ctx.TxConfig.TxEncoder(),\n\t\tsignMsg:   signMsg,\n\t\tsigV2:     sig,\n\t\ttxBuilder: txBuilder,\n\t\tsendMsg:   &sendMsg,\n\t\tmemo:      string(payload),\n\t\tdenom:     string(builder.client.opts.CoinDenom),\n\t}, nil\n}\n\n// Coin copy type from types.coin\ntype Coin struct {\n\tDenom  pack.String `json:\"denom\"`\n\tAmount pack.U64    `json:\"amount\"`\n}\n\n// Coins array of Coin\ntype Coins []Coin\n\n// Coins parse pack coins to sdk coins\nfunc (coins Coins) Coins() types.Coins {\n\tsdkCoins := make(types.Coins, 0, len(coins))\n\tfor _, coin := range coins {\n\t\tsdkCoins = append(sdkCoins, types.Coin{\n\t\t\tDenom:  coin.Denom.String(),\n\t\t\tAmount: types.NewInt(int64(coin.Amount.Uint64())),\n\t\t})\n\t}\n\n\tsdkCoins.Sort()\n\treturn sdkCoins\n}\n\n// MsgSend - high level transaction of the coin module\ntype MsgSend struct {\n\tFromAddress Address `json:\"from_address\" yaml:\"from_address\"`\n\tToAddress   Address `json:\"to_address\" yaml:\"to_address\"`\n\tAmount      Coins   `json:\"amount\" yaml:\"amount\"`\n}\n\n// Msg convert MsgSend to types.Msg\nfunc (msg MsgSend) Msg() types.Msg {\n\treturn bankType.NewMsgSend(\n\t\tmsg.FromAddress.AccAddress(),\n\t\tmsg.ToAddress.AccAddress(),\n\t\tmsg.Amount.Coins(),\n\t)\n}\n\n// Tx is a tx.Tx wrapper\ntype Tx struct {\n\t// Always present\n\toriginalTx *txTypes.Tx\n\tencoder    types.TxEncoder\n\tdenom      string\n\n\t// Fields only used when constucting with a tx builder\n\tsendMsg   *MsgSend\n\tmemo      string\n\tsignMsg   []byte\n\tsigV2     signing.SignatureV2\n\ttxBuilder client.TxBuilder\n}\n\n// From returns the sender of the transaction\nfunc (t Tx) From() address.Address {\n\tif t.originalTx != nil {\n\t\treturn address.Address(t.originalTx.GetBody().Messages[0].GetCachedValue().(*bankType.MsgSend).FromAddress)\n\t}\n\n\tif t.sendMsg != nil {\n\t\treturn address.Address(t.sendMsg.FromAddress.String())\n\t}\n\treturn address.Address(\"\")\n}\n\n// To returns the recipients of the transaction. For the cosmos chain, there\n// can be multiple recipients from a single transaction.\nfunc (t Tx) To() address.Address {\n\tif t.originalTx != nil {\n\t\treturn address.Address(t.originalTx.GetBody().Messages[0].GetCachedValue().(*bankType.MsgSend).ToAddress)\n\t}\n\n\tif t.sendMsg != nil {\n\t\treturn address.Address(t.sendMsg.ToAddress.String())\n\t}\n\treturn address.Address(\"\")\n}\n\n// Value returns the values being transferred in a transaction. For the cosmos\n// chain, there can be multiple messages (each with a different value being\n// transferred) in a single transaction.\nfunc (t Tx) Value() pack.U256 {\n\tvalue := pack.NewU64(0)\n\tif t.originalTx != nil {\n\t\tmsgs := t.originalTx.GetBody().Messages\n\t\tfor _, msg := range msgs {\n\t\t\tamount := msg.GetCachedValue().(*bankType.MsgSend).Amount[0]\n\t\t\tif amount.Denom == t.denom {\n\t\t\t\tvalue.AddAssign(pack.NewU64(amount.Amount.Uint64()))\n\t\t\t}\n\t\t}\n\t} else if t.sendMsg != nil {\n\t\tvalue.AddAssign(pack.NewU64(t.sendMsg.Amount.Coins()[0].Amount.Uint64()))\n\t}\n\treturn pack.NewU256FromU64(value)\n}\n\n// Nonce returns the transaction count of the transaction sender.\nfunc (t Tx) Nonce() pack.U256 {\n\tif t.originalTx != nil {\n\t\treturn pack.NewU256FromUint64(t.originalTx.GetAuthInfo().SignerInfos[0].Sequence)\n\t}\n\n\tif t.sendMsg != nil {\n\t\treturn pack.NewU256FromU64(pack.NewU64(t.sigV2.Sequence))\n\t}\n\n\treturn pack.NewU256FromU64(0)\n}\n\n// Payload returns the memo attached to the transaction.\nfunc (t Tx) Payload() contract.CallData {\n\tif t.originalTx != nil {\n\t\treturn contract.CallData(t.originalTx.GetBody().Memo)\n\t}\n\n\tif t.sendMsg != nil {\n\t\treturn contract.CallData(t.memo)\n\t}\n\treturn contract.CallData(\"\")\n}\n\n// Hash return txhash bytes.\nfunc (t Tx) Hash() pack.Bytes {\n\ttxBytes, err := t.Serialize()\n\tif err != nil {\n\t\treturn pack.Bytes{}\n\t}\n\n\treturn pack.NewBytes(tmhash.Sum(txBytes))\n}\n\n// Sighashes that need to be signed before this transaction can be submitted.\nfunc (t Tx) Sighashes() ([]pack.Bytes32, error) {\n\treturn []pack.Bytes32{sha256.Sum256(t.signMsg)}, nil\n}\n\n// Sign the transaction by injecting signatures and the serialized pubkey of\n// the signer.\nfunc (t *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error {\n\tif len(signatures) == 0 {\n\t\treturn fmt.Errorf(\"zero signatures found\")\n\t}\n\tsig := serializeSig(signatureFromBytes(signatures[0].Bytes()))\n\tsingleData := t.sigV2.Data.(*signing.SingleSignatureData)\n\tsingleData.Signature = sig\n\tt.sigV2.Data = singleData\n\terr := t.txBuilder.SetSignatures(t.sigV2)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n\n// Serialize the transaction.\nfunc (t Tx) Serialize() (pack.Bytes, error) {\n\tvar txBytes []byte\n\tvar err error = nil\n\tif t.originalTx != nil {\n\t\ttxBytes, err = t.encoder(tx.WrapTx(t.originalTx).GetTx())\n\t} else if t.sendMsg != nil {\n\t\ttxBytes, err = t.encoder(t.txBuilder.GetTx())\n\t}\n\tif err != nil {\n\t\treturn pack.Bytes{}, err\n\t}\n\n\treturn txBytes, nil\n}\n\nfunc signatureFromBytes(sigStr []byte) *btcec.Signature {\n\treturn &btcec.Signature{\n\t\tR: new(big.Int).SetBytes(sigStr[:32]),\n\t\tS: new(big.Int).SetBytes(sigStr[32:64]),\n\t}\n}\n\n// Serialize signature to R || S.\n// R, S are padded to 32 bytes respectively.\nfunc serializeSig(sig *btcec.Signature) []byte {\n\trBytes := sig.R.Bytes()\n\tsBytes := sig.S.Bytes()\n\tsigBytes := make([]byte, 64)\n\t// 0 pad the byte arrays from the left if they aren't big enough.\n\tcopy(sigBytes[32-len(rBytes):32], rBytes)\n\tcopy(sigBytes[64-len(sBytes):64], sBytes)\n\treturn sigBytes\n}\n"
  },
  {
    "path": "chain/digibyte/address.go",
    "content": "package digibyte\n\nimport \"github.com/renproject/multichain/chain/bitcoin\"\n\n// AddressEncoder encapsulates the chain specific configurations and implements\n// the address.Encoder interface\ntype AddressEncoder = bitcoin.AddressEncoder\n\n// AddressDecoder encapsulates the chain specific configurations and implements\n// the address.Decoder interface\ntype AddressDecoder = bitcoin.AddressDecoder\n\n// AddressEncodeDecoder implements the address.EncodeDecoder interface\ntype AddressEncodeDecoder = bitcoin.AddressEncodeDecoder\n"
  },
  {
    "path": "chain/digibyte/address_test.go",
    "content": "package digibyte_test\n\nimport (\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/multichain/chain/bitcoin\"\n\t\"github.com/renproject/multichain/chain/digibyte\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"DigiByte\", func() {\n\tContext(\"when decoding an address\", func() {\n\t\tIt(\"should work without errors\", func() {\n\t\t\t_, err := bitcoin.NewAddressDecoder(&digibyte.MainNetParams).DecodeAddress(address.Address(\"DBLsEv4FdFPGrMWzcagDQvoKgUL2CikhMf\"))\n\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/digibyte/digibyte.go",
    "content": "package digibyte\n\nimport (\n\t\"math/big\"\n\t\"time\"\n\n\t\"github.com/btcsuite/btcd/chaincfg\"\n\t\"github.com/btcsuite/btcd/chaincfg/chainhash\"\n\t\"github.com/btcsuite/btcd/wire\"\n)\n\nfunc init() {\n\tif err := chaincfg.Register(&MainNetParams); err != nil {\n\t\tpanic(err)\n\t}\n\tif err := chaincfg.Register(&TestnetParams); err != nil {\n\t\tpanic(err)\n\t}\n\tif err := chaincfg.Register(&RegressionNetParams); err != nil {\n\t\tpanic(err)\n\t}\n}\n\nvar (\n\tbigOne       = big.NewInt(1)\n\tmainPowLimit = new(big.Int).Sub(new(big.Int).Lsh(bigOne, 224), bigOne)\n)\n\nconst (\n\t// DeploymentTestDummy ...\n\tDeploymentTestDummy = iota\n\n\t// DeploymentCSV ...\n\tDeploymentCSV\n\n\t// DeploymentSegwit ...\n\tDeploymentSegwit\n\n\t// DefinedDeployments ...\n\tDefinedDeployments\n)\n\n// genesisCoinbaseTx is the coinbase transaction for the genesis blocks for\n// the main network, regression test network, and test network (version 3).\nvar genesisCoinbaseTx = wire.MsgTx{\n\tVersion: 1,\n\tTxIn: []*wire.TxIn{\n\t\t{\n\t\t\tPreviousOutPoint: wire.OutPoint{\n\t\t\t\tHash:  chainhash.Hash{},\n\t\t\t\tIndex: 0xffffffff,\n\t\t\t},\n\t\t\tSignatureScript: []byte{\n\t\t\t\t0x04, 0xff, 0xff, 0x00, 0x1d, 0x01, 0x04, 0x45, 0x55, 0x53, 0x41, 0x20, 0x54, 0x6f, 0x64, 0x61, /* |.......EUSA Toda| */\n\t\t\t\t0x79, 0x3a, 0x20, 0x31, 0x30, 0x2f, 0x4a, 0x61, 0x6e, 0x2f, 0x32, 0x30, 0x31, 0x34, 0x2c, 0x20, /* |y: 10/Jan/2014, | */\n\t\t\t\t0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x3a, 0x20, 0x44, 0x61, 0x74, 0x61, 0x20, 0x73, 0x74, 0x6f, /* |Target: Data sto| */\n\t\t\t\t0x6c, 0x65, 0x6e, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x75, 0x70, 0x20, 0x74, 0x6f, 0x20, 0x31, /* |len from up to 1| */\n\t\t\t\t0x31, 0x30, 0x4d, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x73, 0x61, 0x32, 0x30, /* |10M customers|    */\n\t\t\t},\n\t\t\tSequence: 0xffffffff,\n\t\t},\n\t},\n\tTxOut: []*wire.TxOut{\n\t\t{\n\t\t\tValue: 0x12a05f200,\n\t\t\tPkScript: []byte{ // ToDo\n\t\t\t\t0x41, 0x04, 0x67, 0x8a, 0xfd, 0xb0, 0xfe, 0x55, /* |A.g....U| */\n\t\t\t\t0x48, 0x27, 0x19, 0x67, 0xf1, 0xa6, 0x71, 0x30, /* |H'.g..q0| */\n\t\t\t\t0xb7, 0x10, 0x5c, 0xd6, 0xa8, 0x28, 0xe0, 0x39, /* |..\\..(.9| */\n\t\t\t\t0x09, 0xa6, 0x79, 0x62, 0xe0, 0xea, 0x1f, 0x61, /* |..yb...a| */\n\t\t\t\t0xde, 0xb6, 0x49, 0xf6, 0xbc, 0x3f, 0x4c, 0xef, /* |..I..?L.| */\n\t\t\t\t0x38, 0xc4, 0xf3, 0x55, 0x04, 0xe5, 0x1e, 0xc1, /* |8..U....| */\n\t\t\t\t0x12, 0xde, 0x5c, 0x38, 0x4d, 0xf7, 0xba, 0x0b, /* |..\\8M...| */\n\t\t\t\t0x8d, 0x57, 0x8a, 0x4c, 0x70, 0x2b, 0x6b, 0xf1, /* |.W.Lp+k.| */\n\t\t\t\t0x1d, 0x5f, 0xac, /* |._.| */\n\t\t\t},\n\t\t},\n\t},\n\tLockTime: 0,\n}\n\n// USA Today: 10/Jan/2014, Target: Data stolen from up to 110M customers\nvar genesisMerkleRoot = chainhash.Hash([chainhash.HashSize]byte{ // Make go vet happy.\n\t0x96, 0x84, 0x1e, 0x6e, 0xcc, 0x8d,\n\t0xc9, 0x64, 0x3a, 0xad, 0xdf, 0xb6,\n\t0xfc, 0xd6, 0x16, 0xe0, 0x8f, 0x07,\n\t0x77, 0xc8, 0x7b, 0x50, 0x8f, 0x1c,\n\t0x9f, 0xb3, 0x5e, 0x46, 0x1b, 0xea,\n\t0x97, 0x74,\n})\n\nvar genesisBlock = wire.MsgBlock{\n\tHeader: wire.BlockHeader{\n\t\tVersion:    1,\n\t\tPrevBlock:  chainhash.Hash{},         // 0000000000000000000000000000000000000000000000000000000000000000\n\t\tMerkleRoot: genesisMerkleRoot,        // 7497ea1b465eb39f1c8f507bc877078fe016d6fcb6dfad3a64c98dcc6e1e8496\n\t\tTimestamp:  time.Unix(1389388394, 0), // 2014-01-10T21:13:14.000Z\n\t\tBits:       0x1e0ffff0,               // 486604799 [00000000ffff0000000000000000000000000000000000000000000000000000]\n\t\tNonce:      2447652,\n\t},\n\tTransactions: []*wire.MsgTx{&genesisCoinbaseTx},\n}\n\nvar genesisHash = chainhash.Hash([chainhash.HashSize]byte{ // Make go vet happy.\n\t0x96, 0x84, 0x1e, 0x6e, 0xcc, 0x8d, 0xc9, 0x64,\n\t0x3a, 0xad, 0xdf, 0xb6, 0xfc, 0xd6, 0x16, 0xe0,\n\t0x8f, 0x07, 0x77, 0xc8, 0x7b, 0x50, 0x8f, 0x1c,\n\t0x9f, 0xb3, 0x5e, 0x46, 0x1b, 0xea, 0x97, 0x74,\n})\n\nfunc newHashFromStr(hexStr string) *chainhash.Hash {\n\thash, err := chainhash.NewHashFromStr(hexStr)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn hash\n}\n\n// MainNetParams returns the chain configuration for mainnet\nvar MainNetParams = chaincfg.Params{\n\tName:        \"mainnet\",\n\tNet:         0xdab6c3fa,\n\tDefaultPort: \"12024\",\n\n\t// Chain parameters\n\tGenesisBlock: &genesisBlock,\n\tGenesisHash:  &genesisHash,\n\n\t// Human-readable part for Bech32 encoded segwit addresses, as defined in\n\t// BIP 173.\n\tBech32HRPSegwit: \"dgb\", // always bc for main net\n\n\t// Address encoding magics\n\tPubKeyHashAddrID:        0x1e, // starts with 1\n\tScriptHashAddrID:        0x3f, // starts with 3\n\tPrivateKeyID:            0x80, // starts with 5 (uncompressed) or K (compressed)\n\tWitnessPubKeyHashAddrID: 0x06, // starts with p2\n\tWitnessScriptHashAddrID: 0x0A, // starts with 7Xh\n\n\t// BIP32 hierarchical deterministic extended key magics\n\tHDPrivateKeyID: [4]byte{0x04, 0x88, 0xad, 0xe4}, // starts with xprv\n\tHDPublicKeyID:  [4]byte{0x04, 0x88, 0xb2, 0x1e}, // starts with xpub\n\n\t// BIP44 coin type used in the hierarchical deterministic path for\n\t// address generation.\n\tHDCoinType: 0x14,\n}\n\n// TestnetParams returns the chain configuration for testnet\nvar TestnetParams = chaincfg.Params{\n\tName: \"testnet\",\n\n\t// DigiByte has 0xdab5bffa as RegTest (same as Bitcoin's RegTest).\n\t// Setting it to an arbitrary value (leet_hex(digibyte)), so that we can\n\t// register the regtest network.\n\t// DigiByte Core Developers will change this soon.\n\tNet:         0xddbdc8fd,\n\tDefaultPort: \"12026\",\n\n\t// Chain parameters\n\tGenesisBlock: &genesisBlock,\n\tGenesisHash:  &genesisHash,\n\n\t// Human-readable part for Bech32 encoded segwit addresses, as defined in\n\t// BIP 173.\n\tBech32HRPSegwit: \"dgbt\", // always bc for main net\n\n\t// Address encoding magics\n\tPubKeyHashAddrID:        0x7e, // starts with 1\n\tScriptHashAddrID:        0x8c, // starts with 3\n\tPrivateKeyID:            0xfe, // starts with 5 (uncompressed) or K (compressed)\n\tWitnessPubKeyHashAddrID: 0x06, // starts with p2\n\tWitnessScriptHashAddrID: 0x0A, // starts with 7Xh\n\n\t// BIP32 hierarchical deterministic extended key magics\n\tHDPrivateKeyID: [4]byte{0x04, 0x35, 0x83, 0x94}, // starts with xprv\n\tHDPublicKeyID:  [4]byte{0x04, 0x35, 0x87, 0xcf}, // starts with xpub\n\n\t// BIP44 coin type used in the hierarchical deterministic path for\n\t// address generation.\n\tHDCoinType: 0x14,\n}\n\n// RegressionNetParams returns the chain configuration for regression net\nvar RegressionNetParams = chaincfg.Params{\n\tName: \"regtest\",\n\n\t// DigiByte has 0xdab5bffa as RegTest (same as Bitcoin's RegTest).\n\t// Setting it to an arbitrary value (leet_hex(digibyte)), so that we can\n\t// register the regtest network.\n\t// DigiByte Core Developers will change this soon.\n\tNet:         0xd191841e,\n\tDefaultPort: \"18444\",\n\n\t// Chain parameters\n\tGenesisBlock: &genesisBlock,\n\tGenesisHash:  &genesisHash,\n\n\t// Human-readable part for Bech32 encoded segwit addresses, as defined in\n\t// BIP 173.\n\tBech32HRPSegwit: \"dgbrt\", // always bc for main net\n\n\t// Address encoding magics\n\tPubKeyHashAddrID:        0x7e, // starts with 1\n\tScriptHashAddrID:        0x8c, // starts with 3\n\tPrivateKeyID:            0xfe, // starts with 5 (uncompressed) or K (compressed)\n\tWitnessPubKeyHashAddrID: 0x06, // starts with p2\n\tWitnessScriptHashAddrID: 0x0A, // starts with 7Xh\n\n\t// BIP32 hierarchical deterministic extended key magics\n\tHDPrivateKeyID: [4]byte{0x04, 0x35, 0x83, 0x94}, // starts with xprv\n\tHDPublicKeyID:  [4]byte{0x04, 0x35, 0x87, 0xcf}, // starts with xpub\n\n\t// BIP44 coin type used in the hierarchical deterministic path for\n\t// address generation.\n\tHDCoinType: 0x14,\n}\n"
  },
  {
    "path": "chain/digibyte/digibyte_suite_test.go",
    "content": "package digibyte_test\n\nimport (\n\t\"testing\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nfunc TestDigiByte(t *testing.T) {\n\tRegisterFailHandler(Fail)\n\tRunSpecs(t, \"DigiByte Suite\")\n}\n"
  },
  {
    "path": "chain/digibyte/digibyte_test.go",
    "content": "package digibyte_test\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\t\"reflect\"\n\t\"time\"\n\n\t\"github.com/btcsuite/btcutil\"\n\t\"github.com/renproject/id\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/multichain/api/utxo\"\n\t\"github.com/renproject/multichain/chain/bitcoin\"\n\t\"github.com/renproject/multichain/chain/digibyte\"\n\t\"github.com/renproject/pack\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"DigiByte\", func() {\n\tContext(\"when submitting transactions\", func() {\n\t\tContext(\"when sending DigiByte to multiple addresses\", func() {\n\t\t\tIt(\"should work\", func() {\n\t\t\t\t// Load private key, and assume that the associated address has\n\t\t\t\t// funds to spend. You can do this by setting DIGIBYTE_PK to the\n\t\t\t\t// value specified in the `./multichaindeploy/.env` file.\n\t\t\t\tpkEnv := os.Getenv(\"DIGIBYTE_PK\")\n\t\t\t\tif pkEnv == \"\" {\n\t\t\t\t\tpanic(\"DIGIBYTE_PK is undefined\")\n\t\t\t\t}\n\t\t\t\twif, err := btcutil.DecodeWIF(pkEnv)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t// PKH\n\t\t\t\twpkhAddr, err := btcutil.NewAddressWitnessPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeCompressed()), &digibyte.RegressionNetParams)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tlog.Printf(\"WPKH               %v\", wpkhAddr.EncodeAddress())\n\n\t\t\t\t// PKH\n\t\t\t\tpkhAddr, err := btcutil.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeCompressed()), &digibyte.RegressionNetParams)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tpkhAddrUncompressed, err := btcutil.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &digibyte.RegressionNetParams)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tlog.Printf(\"PKH                %v\", pkhAddr.EncodeAddress())\n\t\t\t\tlog.Printf(\"PKH (uncompressed) %v\", pkhAddrUncompressed.EncodeAddress())\n\n\t\t\t\t// Setup the client and load the unspent transaction outputs.\n\t\t\t\tclient := bitcoin.NewClient(bitcoin.DefaultClientOptions().WithHost(\"http://127.0.0.1:20443\"))\n\t\t\t\toutputs, err := client.UnspentOutputs(context.Background(), 0, 999999999, address.Address(pkhAddr.EncodeAddress()))\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tExpect(len(outputs)).To(BeNumerically(\">\", 0))\n\t\t\t\toutput := outputs[0]\n\n\t\t\t\t// Check that we can load the output and that it is equal.\n\t\t\t\t// Otherwise, something strange is happening with the RPC\n\t\t\t\t// client.\n\t\t\t\toutput2, _, err := client.Output(context.Background(), output.Outpoint)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tExpect(reflect.DeepEqual(output, output2)).To(BeTrue())\n\n\t\t\t\t// Build the transaction by consuming the outputs and spending\n\t\t\t\t// them to a set of recipients.\n\t\t\t\tinputs := []utxo.Input{\n\t\t\t\t\t{Output: output},\n\t\t\t\t}\n\t\t\t\trecipients := []utxo.Recipient{\n\t\t\t\t\t{\n\t\t\t\t\t\tTo:    address.Address(wpkhAddr.EncodeAddress()),\n\t\t\t\t\t\tValue: pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) / 3)),\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tTo:    address.Address(pkhAddr.EncodeAddress()),\n\t\t\t\t\t\tValue: pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) / 3)),\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tTo:    address.Address(pkhAddrUncompressed.EncodeAddress()),\n\t\t\t\t\t\tValue: pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) / 3)),\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t\ttx, err := digibyte.NewTxBuilder(&digibyte.RegressionNetParams).BuildTx(inputs, recipients)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t// Get the digests that need signing from the transaction, and\n\t\t\t\t// sign them. In production, this would be done using the RZL\n\t\t\t\t// MPC algorithm, but for the purposes of this test, using an\n\t\t\t\t// explicit privkey is ok.\n\t\t\t\tsighashes, err := tx.Sighashes()\n\t\t\t\tsignatures := make([]pack.Bytes65, len(sighashes))\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tfor i := range sighashes {\n\t\t\t\t\thash := id.Hash(sighashes[i])\n\t\t\t\t\tprivKey := (*id.PrivKey)(wif.PrivKey)\n\t\t\t\t\tsignature, err := privKey.Sign(&hash)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\tsignatures[i] = pack.NewBytes65(signature)\n\t\t\t\t}\n\t\t\t\tExpect(tx.Sign(signatures, pack.NewBytes(wif.SerializePubKey()))).To(Succeed())\n\n\t\t\t\t// Submit the transaction to the DigiByte node. Again, this\n\t\t\t\t// should be running a la `./multichaindeploy`.\n\t\t\t\ttxHash, err := tx.Hash()\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\terr = client.SubmitTx(context.Background(), tx)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tlog.Printf(\"TXID               %v\", txHash)\n\n\t\t\t\tfor {\n\t\t\t\t\t// Loop until the transaction has at least a few\n\t\t\t\t\t// confirmations. This implies that the transaction is\n\t\t\t\t\t// definitely valid, and the test has passed. We were\n\t\t\t\t\t// successfully able to use the multichain to construct and\n\t\t\t\t\t// submit a DigiByte transaction!\n\t\t\t\t\tconfs, err := client.Confirmations(context.Background(), txHash)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\tlog.Printf(\"                   %v/3 confirmations\", confs)\n\t\t\t\t\tif confs >= 3 {\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\ttime.Sleep(10 * time.Second)\n\t\t\t\t}\n\n\t\t\t\t// Check that we can load the output and that it is equal.\n\t\t\t\t// Otherwise, something strange is happening with the RPC\n\t\t\t\t// client.\n\t\t\t\toutput2, _, err = client.Output(context.Background(), output.Outpoint)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tExpect(reflect.DeepEqual(output, output2)).To(BeTrue())\n\n\t\t\t\t// Check we can get the transaction inputs\n\t\t\t\tsenders, err := client.TxSenders(context.Background(), txHash)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tExpect(len(senders)).Should(Equal(1))\n\t\t\t\tExpect(senders[0]).Should(Equal(pkhAddr.EncodeAddress()))\n\t\t\t})\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/digibyte/gas.go",
    "content": "package digibyte\n\nimport \"github.com/renproject/multichain/chain/bitcoin\"\n\n// GasEstimator re-exports bitcoin.GasEstimator.\ntype GasEstimator = bitcoin.GasEstimator\n\n// NewGasEstimator re-exports bitcoin.NewGasEstimator.\nvar NewGasEstimator = bitcoin.NewGasEstimator\n"
  },
  {
    "path": "chain/digibyte/gas_test.go",
    "content": "package digibyte_test\n"
  },
  {
    "path": "chain/digibyte/utxo.go",
    "content": "package digibyte\n\nimport \"github.com/renproject/multichain/chain/bitcoin\"\n\ntype (\n\t// Tx represents a simple Bitcoin transaction that implements the Bitcoin Compat\n\t// API.\n\tTx = bitcoin.Tx\n\n\t// The TxBuilder is an implementation of a UTXO-compatible transaction builder\n\t// for Bitcoin.\n\tTxBuilder = bitcoin.TxBuilder\n\n\t// A Client interacts with an instance of the Bitcoin network using the RPC\n\t// interface exposed by a Bitcoin node.\n\tClient = bitcoin.Client\n\n\t// ClientOptions are used to parameterise the behaviour of the Client.\n\tClientOptions = bitcoin.ClientOptions\n)\n\nvar (\n\t// NewTxBuilder re-exports bitoin.NewTxBuilder\n\tNewTxBuilder = bitcoin.NewTxBuilder\n\n\t// NewClient re-exports bitcoin.NewClient\n\tNewClient = bitcoin.NewClient\n)\n\n// DefaultClientOptions returns ClientOptions with the default settings. These\n// settings are valid for use with the default local deployment of the\n// multichain. In production, the host, user, and password should be changed.\nfunc DefaultClientOptions() ClientOptions {\n\treturn bitcoin.DefaultClientOptions().WithHost(\"http://0.0.0.0:20443\")\n}\n"
  },
  {
    "path": "chain/digibyte/utxo_test.go",
    "content": "package digibyte_test\n"
  },
  {
    "path": "chain/dogecoin/address.go",
    "content": "package dogecoin\n\nimport \"github.com/renproject/multichain/chain/bitcoin\"\n\ntype (\n\t// AddressEncoder re-exports bitcoin.AddressEncoder.\n\tAddressEncoder = bitcoin.AddressEncoder\n\n\t// AddressDecoder re-exports bitcoin.AddressDecoder.\n\tAddressDecoder = bitcoin.AddressDecoder\n\n\t// AddressEncodeDecoder re-exports bitcoin.AddressEncodeDecoder.\n\tAddressEncodeDecoder = bitcoin.AddressEncodeDecoder\n)\n"
  },
  {
    "path": "chain/dogecoin/address_test.go",
    "content": "package dogecoin_test\n\nimport (\n\t\"github.com/renproject/multichain\"\n\t\"github.com/renproject/multichain/chain/bitcoin\"\n\t\"github.com/renproject/multichain/chain/dogecoin\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Dogecoin\", func() {\n\tContext(\"when decoding segwit address\", func() {\n\t\tContext(\"when decoding an address from a different network \", func() {\n\t\t\tIt(\"should return an error \", func() {\n\t\t\t\t// A valid bitcoin segwit address which is not a valid doge address\n\t\t\t\taddr := multichain.Address(\"bc1qk6yk2ctcu2pmtxfzhya692h774562vlv2g7dvl\")\n\t\t\t\tdecoder := bitcoin.NewAddressDecoder(&dogecoin.MainNetParams)\n\t\t\t\t_, err := decoder.DecodeAddress(addr)\n\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t})\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/dogecoin/dogecoin.go",
    "content": "package dogecoin\n\nimport (\n\t\"github.com/btcsuite/btcd/chaincfg\"\n)\n\nfunc init() {\n\tif err := chaincfg.Register(&MainNetParams); err != nil {\n\t\tpanic(err)\n\t}\n\tif err := chaincfg.Register(&TestNetParams); err != nil {\n\t\tpanic(err)\n\t}\n\tif err := chaincfg.Register(&RegressionNetParams); err != nil {\n\t\tpanic(err)\n\t}\n}\n\n// MainNetParams returns the chain configuration for mainnet.\nvar MainNetParams = chaincfg.Params{\n\tName: \"mainnet\",\n\tNet:  0xc0c0c0c0,\n\n\t// Address encoding magics\n\tPubKeyHashAddrID: 30,\n\tScriptHashAddrID: 22,\n\tPrivateKeyID:     158,\n\n\t// BIP32 hierarchical deterministic extended key magics\n\tHDPrivateKeyID: [4]byte{0x02, 0xfa, 0xc3, 0x98}, // starts with xprv\n\tHDPublicKeyID:  [4]byte{0x02, 0xfa, 0xca, 0xfd}, // starts with xpub\n\n\t// Human-readable part for Bech32 encoded segwit addresses, as defined in\n\t// BIP 173. Dogecoin does not actually support this, but we do not want to\n\t// collide with real addresses, so we specify it.\n\tBech32HRPSegwit: \"doge\",\n}\n\n// TestNetParams returns the chain configuration for testnet.\nvar TestNetParams = chaincfg.Params{\n\tName: \"testnet\",\n\tNet:  0xfcc1b7dc,\n\n\t// Address encoding magics\n\tPubKeyHashAddrID: 113,\n\tScriptHashAddrID: 196,\n\tPrivateKeyID:     241,\n\n\t// BIP32 hierarchical deterministic extended key magics\n\tHDPrivateKeyID: [4]byte{0x04, 0x35, 0x83, 0x94}, // starts with xprv\n\tHDPublicKeyID:  [4]byte{0x04, 0x35, 0x87, 0xcf}, // starts with xpub\n\n\t// Human-readable part for Bech32 encoded segwit addresses, as defined in\n\t// BIP 173. Dogecoin does not actually support this, but we do not want to\n\t// collide with real addresses, so we specify it.\n\tBech32HRPSegwit: \"doget\",\n}\n\n// RegressionNetParams returns the chain configuration for regression net.\nvar RegressionNetParams = chaincfg.Params{\n\tName: \"regtest\",\n\n\t// Dogecoin has 0xdab5bffa as RegTest (same as Bitcoin's RegTest).\n\t// Setting it to an arbitrary value (leet_hex(dogecoin)), so that we can\n\t// register the regtest network.\n\tNet: 0xfabfb5da,\n\n\t// Address encoding magics\n\tPubKeyHashAddrID: 111,\n\tScriptHashAddrID: 196,\n\tPrivateKeyID:     239,\n\n\t// BIP32 hierarchical deterministic extended key magics\n\tHDPrivateKeyID: [4]byte{0x04, 0x35, 0x83, 0x94}, // starts with xprv\n\tHDPublicKeyID:  [4]byte{0x04, 0x35, 0x87, 0xcf}, // starts with xpub\n\n\t// Human-readable part for Bech32 encoded segwit addresses, as defined in\n\t// BIP 173. Dogecoin does not actually support this, but we do not want to\n\t// collide with real addresses, so we specify it.\n\tBech32HRPSegwit: \"dogert\",\n}\n"
  },
  {
    "path": "chain/dogecoin/dogecoin_suite_test.go",
    "content": "package dogecoin_test\n\nimport (\n\t\"testing\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nfunc TestDogecoin(t *testing.T) {\n\tRegisterFailHandler(Fail)\n\tRunSpecs(t, \"Dogecoin Suite\")\n}\n"
  },
  {
    "path": "chain/dogecoin/dogecoin_test.go",
    "content": "package dogecoin_test\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\t\"reflect\"\n\t\"time\"\n\n\t\"github.com/btcsuite/btcutil\"\n\t\"github.com/renproject/id\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/multichain/api/utxo\"\n\t\"github.com/renproject/multichain/chain/dogecoin\"\n\t\"github.com/renproject/pack\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Dogecoin\", func() {\n\tContext(\"when submitting transactions\", func() {\n\t\tContext(\"when sending DOGE to multiple addresses\", func() {\n\t\t\tIt(\"should work\", func() {\n\t\t\t\t// Load private key, and assume that the associated address has\n\t\t\t\t// funds to spend. You can do this by setting DOGECOIN_PK to the\n\t\t\t\t// value specified in the `./multichaindeploy/.env` file.\n\t\t\t\tpkEnv := os.Getenv(\"DOGECOIN_PK\")\n\t\t\t\tif pkEnv == \"\" {\n\t\t\t\t\tpanic(\"DOGECOIN_PK is undefined\")\n\t\t\t\t}\n\t\t\t\twif, err := btcutil.DecodeWIF(pkEnv)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t// PKH\n\t\t\t\tpkhAddr, err := btcutil.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeCompressed()), &dogecoin.RegressionNetParams)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tpkhAddrUncompressed, err := btcutil.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &dogecoin.RegressionNetParams)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tlog.Printf(\"PKH                %v\", pkhAddr.EncodeAddress())\n\t\t\t\tlog.Printf(\"PKH (uncompressed) %v\", pkhAddrUncompressed.EncodeAddress())\n\n\t\t\t\t// Setup the client and load the unspent transaction outputs.\n\t\t\t\tclient := dogecoin.NewClient(dogecoin.DefaultClientOptions().WithHost(\"http://127.0.0.1:18332\"))\n\t\t\t\toutputs, err := client.UnspentOutputs(context.Background(), 0, 999999999, address.Address(pkhAddr.EncodeAddress()))\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tExpect(len(outputs)).To(BeNumerically(\">\", 0))\n\t\t\t\toutput := outputs[0]\n\n\t\t\t\t// Check that we can load the output and that it is equal.\n\t\t\t\t// Otherwise, something strange is happening with the RPC\n\t\t\t\t// client.\n\t\t\t\toutput2, _, err := client.Output(context.Background(), output.Outpoint)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tExpect(reflect.DeepEqual(output, output2)).To(BeTrue())\n\n\t\t\t\t// Build the transaction by consuming the outputs and spending\n\t\t\t\t// them to a set of recipients.\n\t\t\t\tinputs := []utxo.Input{\n\t\t\t\t\t{Output: output},\n\t\t\t\t}\n\t\t\t\trecipients := []utxo.Recipient{\n\t\t\t\t\t{\n\t\t\t\t\t\tTo:    address.Address(pkhAddr.EncodeAddress()),\n\t\t\t\t\t\tValue: pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) / 2)),\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tTo:    address.Address(pkhAddrUncompressed.EncodeAddress()),\n\t\t\t\t\t\tValue: pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) / 2)),\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t\ttx, err := dogecoin.NewTxBuilder(&dogecoin.RegressionNetParams).BuildTx(inputs, recipients)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t// Get the digests that need signing from the transaction, and\n\t\t\t\t// sign them. In production, this would be done using the RZL\n\t\t\t\t// MPC algorithm, but for the purposes of this test, using an\n\t\t\t\t// explicit privkey is ok.\n\t\t\t\tsighashes, err := tx.Sighashes()\n\t\t\t\tsignatures := make([]pack.Bytes65, len(sighashes))\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tfor i := range sighashes {\n\t\t\t\t\thash := id.Hash(sighashes[i])\n\t\t\t\t\tprivKey := (*id.PrivKey)(wif.PrivKey)\n\t\t\t\t\tsignature, err := privKey.Sign(&hash)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\tsignatures[i] = pack.NewBytes65(signature)\n\t\t\t\t}\n\t\t\t\tExpect(tx.Sign(signatures, pack.NewBytes(wif.SerializePubKey()))).To(Succeed())\n\n\t\t\t\t// Submit the transaction to the Dogecoin node. Again, this\n\t\t\t\t// should be running a la `./multichaindeploy`.\n\t\t\t\ttxHash, err := tx.Hash()\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\terr = client.SubmitTx(context.Background(), tx)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tlog.Printf(\"TXID               %v\", txHash)\n\n\t\t\t\tfor {\n\t\t\t\t\t// Loop until the transaction has at least a few\n\t\t\t\t\t// confirmations. This implies that the transaction is\n\t\t\t\t\t// definitely valid, and the test has passed. We were\n\t\t\t\t\t// successfully able to use the multichain to construct and\n\t\t\t\t\t// submit a Dogecoin transaction!\n\t\t\t\t\tconfs, err := client.Confirmations(context.Background(), txHash)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\tlog.Printf(\"                   %v/3 confirmations\", confs)\n\t\t\t\t\tif confs >= 3 {\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\ttime.Sleep(10 * time.Second)\n\t\t\t\t}\n\n\t\t\t\t// Check that we can load the output and that it is equal.\n\t\t\t\t// Otherwise, something strange is happening with the RPC\n\t\t\t\t// client.\n\t\t\t\toutput2, _, err = client.Output(context.Background(), output.Outpoint)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tExpect(reflect.DeepEqual(output, output2)).To(BeTrue())\n\n\t\t\t\t// Check we can get the transaction inputs\n\t\t\t\tsenders, err := client.TxSenders(context.Background(), txHash)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tExpect(len(senders)).Should(Equal(1))\n\t\t\t\tExpect(senders[0]).Should(Equal(pkhAddr.EncodeAddress()))\n\t\t\t})\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/dogecoin/gas.go",
    "content": "package dogecoin\n\nimport \"github.com/renproject/multichain/chain/bitcoin\"\n\n// GasEstimator re-exports bitcoin.GasEstimator.\ntype GasEstimator = bitcoin.GasEstimator\n\n// NewGasEstimator re-exports bitcoin.NewGasEstimator.\nvar NewGasEstimator = bitcoin.NewGasEstimator\n"
  },
  {
    "path": "chain/dogecoin/gas_test.go",
    "content": "package dogecoin_test\n\nimport (\n\t\"context\"\n\n\t\"github.com/renproject/multichain/chain/dogecoin\"\n\t\"github.com/renproject/pack\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Gas\", func() {\n\tContext(\"when estimating dogecoin network fee\", func() {\n\t\tIt(\"should work\", func() {\n\t\t\tctx, cancel := context.WithCancel(context.Background())\n\t\t\tdefer cancel()\n\n\t\t\tclient := dogecoin.NewClient(dogecoin.DefaultClientOptions())\n\n\t\t\t// estimate fee to include tx within 1 block.\n\t\t\tfallback1 := uint64(123)\n\t\t\tgasEstimator1 := dogecoin.NewGasEstimator(client, 1, pack.NewU256FromUint64(fallback1))\n\t\t\tgasPrice1, _, err := gasEstimator1.EstimateGas(ctx)\n\t\t\tif err != nil {\n\t\t\t\tExpect(gasPrice1).To(Equal(pack.NewU256FromUint64(fallback1)))\n\t\t\t}\n\n\t\t\t// estimate fee to include tx within 10 blocks.\n\t\t\tfallback2 := uint64(234)\n\t\t\tgasEstimator2 := dogecoin.NewGasEstimator(client, 10, pack.NewU256FromUint64(fallback2))\n\t\t\tgasPrice2, _, err := gasEstimator2.EstimateGas(ctx)\n\t\t\tif err != nil {\n\t\t\t\tExpect(gasPrice2).To(Equal(pack.NewU256FromUint64(fallback2)))\n\t\t\t}\n\n\t\t\t// estimate fee to include tx within 100 blocks.\n\t\t\tfallback3 := uint64(345)\n\t\t\tgasEstimator3 := dogecoin.NewGasEstimator(client, 100, pack.NewU256FromUint64(fallback3))\n\t\t\tgasPrice3, _, err := gasEstimator3.EstimateGas(ctx)\n\t\t\tif err != nil {\n\t\t\t\tExpect(gasPrice3).To(Equal(pack.NewU256FromUint64(fallback3)))\n\t\t\t}\n\n\t\t\t// expect fees in this order at the very least.\n\t\t\tif err == nil {\n\t\t\t\tExpect(gasPrice1.GreaterThanEqual(gasPrice2)).To(BeTrue())\n\t\t\t\tExpect(gasPrice2.GreaterThanEqual(gasPrice3)).To(BeTrue())\n\t\t\t}\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/dogecoin/utxo.go",
    "content": "package dogecoin\n\nimport \"github.com/renproject/multichain/chain/bitcoin\"\n\ntype (\n\t// Tx re-exports bitcoin.Tx.\n\tTx = bitcoin.Tx\n\n\t// TxBuilder re-exports bitcoin.TxBuilder.\n\tTxBuilder = bitcoin.TxBuilder\n\n\t// Client re-exports bitcoin.Client.\n\tClient = bitcoin.Client\n\n\t// ClientOptions re-exports bitcoin.ClientOptions.\n\tClientOptions = bitcoin.ClientOptions\n)\n\nvar (\n\t// NewTxBuilder re-exports bitcoin.NewTxBuilder.\n\tNewTxBuilder = bitcoin.NewTxBuilder\n\n\t// NewClient re-exports bitcoin.NewClient.\n\tNewClient = bitcoin.NewClient\n)\n\n// DefaultClientOptions returns ClientOptions with the default settings. These\n// settings are valid for use with the default local deployment of the\n// multichain. In production, the host, user, and password should be changed.\nfunc DefaultClientOptions() ClientOptions {\n\treturn bitcoin.DefaultClientOptions().WithHost(\"http://0.0.0.0:18332\")\n}\n"
  },
  {
    "path": "chain/dogecoin/utxo_test.go",
    "content": "package dogecoin_test\n"
  },
  {
    "path": "chain/ethereum/address.go",
    "content": "package ethereum\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\ntype (\n\t// AddressEncodeDecoder re-exports evm.AddressEncodeDecoder.\n\tAddressEncodeDecoder = evm.AddressEncodeDecoder\n\n\t// AddressEncoder re-exports evm.AddressEncoder.\n\tAddressEncoder = evm.AddressEncoder\n\n\t// AddressDecoder re-exports evm.AddressDecoder.\n\tAddressDecoder = evm.AddressDecoder\n\n\t// Address re-exports evm.Address.\n\tAddress = evm.Address\n)\n\nvar (\n\t// NewAddressEncodeDecoder re-exports evm.NewAddressEncodeDecoder.\n\tNewAddressEncodeDecoder = evm.NewAddressEncodeDecoder\n\n\t// NewAddressDecoder re-exports evm.NewAddressDecoder.\n\tNewAddressDecoder = evm.NewAddressDecoder\n\n\t// NewAddressEncoder re-exports evm.NewAddressEncoder.\n\tNewAddressEncoder = evm.NewAddressEncoder\n\n\t// NewAddressFromHex re-exports evm.NewAddressFromHex.\n\tNewAddressFromHex = evm.NewAddressFromHex\n)\n"
  },
  {
    "path": "chain/ethereum/address_test.go",
    "content": "package ethereum_test\n\nimport (\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"testing/quick\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n\t\"github.com/renproject/multichain/chain/ethereum\"\n\t\"github.com/renproject/surge\"\n)\n\nvar _ = Describe(\"Address\", func() {\n\tContext(\"when unmarshaling and unmarshaling\", func() {\n\t\tIt(\"should equal itself\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\taddr := ethereum.Address(x)\n\t\t\t\tExpect(addr.SizeHint()).To(Equal(20))\n\n\t\t\t\tbytes, err := surge.ToBinary(addr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tvar newAddr ethereum.Address\n\t\t\t\terr = surge.FromBinary(&newAddr, bytes)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tExpect(addr).To(Equal(newAddr))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when unmarshaling and unmarshaling to/from JSON\", func() {\n\t\tIt(\"should equal itself\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\taddr := ethereum.Address(x)\n\n\t\t\t\tbytes, err := json.Marshal(addr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tvar newAddr ethereum.Address\n\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tExpect(addr).To(Equal(newAddr))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\n\t\tContext(\"when the address is invalid hex\", func() {\n\t\t\tIt(\"should return an error\", func() {\n\t\t\t\tf := func(x [40]byte) bool {\n\t\t\t\t\tbytes, err := json.Marshal(string(x[:]))\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tvar newAddr ethereum.Address\n\t\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\terr := quick.Check(f, nil)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t})\n\t\t})\n\n\t\tContext(\"when the address is invalid length\", func() {\n\t\t\tIt(\"should return an error\", func() {\n\t\t\t\tf := func(x [10]byte) bool {\n\t\t\t\t\taddr := hex.EncodeToString(x[:])\n\t\t\t\t\tbytes, err := json.Marshal(addr)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tvar newAddr ethereum.Address\n\t\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\terr := quick.Check(f, nil)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t})\n\t\t})\n\t})\n\n\tContext(\"when unmarshalling random data\", func() {\n\t\tIt(\"should not panic\", func() {\n\t\t\tf := func(x []byte) bool {\n\t\t\t\tvar addr ethereum.Address\n\t\t\t\tExpect(func() { addr.Unmarshal(x, surge.MaxBytes) }).ToNot(Panic())\n\t\t\t\tExpect(func() { json.Unmarshal(x, &addr) }).ToNot(Panic())\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/ethereum/client.go",
    "content": "package ethereum\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\nconst (\n\t// DefaultClientRPCURL is the RPC URL used by default, to interact with the\n\t// ethereum node.\n\tDefaultClientRPCURL = \"http://127.0.0.1:8545/\"\n)\n\n// Client re-exports evm.Client.\ntype Client = evm.Client\n\n// NewClient re-exports evm.NewClient.\nvar NewClient = evm.NewClient\n"
  },
  {
    "path": "chain/ethereum/encode.go",
    "content": "package ethereum\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\n// Payload re-exports evm.Payload.\ntype Payload = evm.Payload\n\n// Encode re-exports evm.Encode.\nvar Encode = evm.Encode\n"
  },
  {
    "path": "chain/ethereum/encode_test.go",
    "content": "package ethereum_test\n\nimport (\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"math\"\n\t\"testing/quick\"\n\n\t\"github.com/renproject/multichain/chain/ethereum\"\n\n\t\"github.com/renproject/pack\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/ginkgo/extensions/table\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Encoding\", func() {\n\tContext(\"when encoding bytes\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x []byte) bool {\n\t\t\t\targ := pack.NewBytes(x)\n\n\t\t\t\tresBytes := ethereum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\n\t\t\t\texpectedBytes := make([]byte, int(math.Ceil(float64(len(x))/32)*32))\n\t\t\t\tcopy(expectedBytes, x)\n\t\t\t\t// Note: since the first parameter has a dynamic length, the\n\t\t\t\t// first 32 bytes instead contain a pointer to the data.\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", 32) + fmt.Sprintf(\"%064x\", len(x)) + hex.EncodeToString(expectedBytes)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 32 bytes\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [32]byte) bool {\n\t\t\t\targ := pack.NewBytes32(x)\n\n\t\t\t\tresBytes := ethereum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := hex.EncodeToString(x[:])\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 8-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint8) bool {\n\t\t\t\targ := pack.NewU8(x)\n\n\t\t\t\tresBytes := ethereum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 16-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint16) bool {\n\t\t\t\targ := pack.NewU16(x)\n\n\t\t\t\tresBytes := ethereum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 32-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint32) bool {\n\t\t\t\targ := pack.NewU32(x)\n\n\t\t\t\tresBytes := ethereum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 64-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint64) bool {\n\t\t\t\targ := pack.NewU64(x)\n\n\t\t\t\tresBytes := ethereum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 128-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [16]byte) bool {\n\t\t\t\targ := pack.NewU128(x)\n\n\t\t\t\tresBytes := ethereum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 256-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [32]byte) bool {\n\t\t\t\targ := pack.NewU256(x)\n\n\t\t\t\tresBytes := ethereum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding Ethereum addresses\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\targ := ethereum.Address(x)\n\n\t\t\t\tresBytes := ethereum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\n\t\t\t\texpectedBytes := make([]byte, 32)\n\t\t\t\tcopy(expectedBytes, x[:])\n\t\t\t\texpectedString := hex.EncodeToString(expectedBytes)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding an unsupported type\", func() {\n\t\tIt(\"should panic\", func() {\n\t\t\tf := func(x bool) bool {\n\t\t\t\targ := pack.NewBool(x)\n\t\t\t\tExpect(func() { ethereum.Encode(arg) }).To(Panic())\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\ttype testCase struct {\n\t\taddr   string\n\t\tamount uint64\n\t\thash   string\n\t\tresult string\n\t}\n\n\ttestCases := []testCase{\n\t\t{\n\t\t\taddr:   \"797522Fb74d42bB9fbF6b76dEa24D01A538d5D66\",\n\t\t\tamount: 10000,\n\t\t\thash:   \"702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed\",\n\t\t\tresult: \"797522fb74d42bb9fbf6b76dea24d01a538d5d660000000000000000000000000000000000000000000000000000000000000000000000000000000000002710702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed\",\n\t\t},\n\t\t{\n\t\t\taddr:   \"58afb504ef2444a267b8c7ce57279417f1377ceb\",\n\t\t\tamount: 50000000000000000,\n\t\t\thash:   \"dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93\",\n\t\t\tresult: \"58afb504ef2444a267b8c7ce57279417f1377ceb00000000000000000000000000000000000000000000000000000000000000000000000000b1a2bc2ec50000dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93\",\n\t\t},\n\t\t{\n\t\t\taddr:   \"0000000000000000000000000000000000000000\",\n\t\t\tamount: 0,\n\t\t\thash:   \"0000000000000000000000000000000000000000000000000000000000000000\",\n\t\t\tresult: \"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n\t\t},\n\t}\n\n\tDescribeTable(\"when encoding args\",\n\t\tfunc(test testCase) {\n\t\t\taddrBytes, err := hex.DecodeString(test.addr)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\tvar addr ethereum.Address\n\t\t\tcopy(addr[:], addrBytes)\n\n\t\t\thashBytes32 := [32]byte{}\n\t\t\thashBytes, err := hex.DecodeString(test.hash)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\tcopy(hashBytes32[:], hashBytes)\n\n\t\t\targs := []interface{}{\n\t\t\t\taddr,\n\t\t\t\tpack.NewU64(test.amount),\n\t\t\t\tpack.NewBytes32(hashBytes32),\n\t\t\t}\n\t\t\tresult := ethereum.Encode(args...)\n\t\t\tExpect(hex.EncodeToString(result)).To(Equal(test.result))\n\t\t},\n\n\t\tEntry(\"should return the same result as solidity for small transactions\", testCases[0]),\n\t\tEntry(\"should return the same result as solidity for large transactions\", testCases[1]),\n\t\tEntry(\"should return the same result as solidity for empty transactions\", testCases[2]),\n\t)\n})\n"
  },
  {
    "path": "chain/ethereum/gas.go",
    "content": "package ethereum\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"math/big\"\n\t\"sort\"\n\n\t\"github.com/renproject/pack\"\n)\n\nconst (\n\t// FeeHistoryBlocks specifies how many blocks to consider for priority fee estimation\n\tFeeHistoryBlocks = 10\n\t// FeeHistoryPercentile specifies the percentile of effective priority fees to include\n\tFeeHistoryPercentile = 5\n\t// FallbackMaxFeePerGas is the fallback value used when MaxFeePerGas cannot be calculated\n\tFallbackMaxFeePerGas = 20000000000\n)\n\nvar (\n\t// PriorityFeeEstimationTrigger specifies which base fee to trigger priority fee estimation at\n\tPriorityFeeEstimationTrigger = big.NewInt(100000000000) // WEI\n\t// DefaultPriorityFee is returned if above trigger is not met\n\tDefaultPriorityFee = big.NewInt(3000000000)\n\t// PriorityFeeIncreaseBoundary signifies a big bump in fee history priority reward, due to which we choose\n\t// not to consider values under it while calculating the median priority fee.\n\tPriorityFeeIncreaseBoundary = big.NewInt(200)\n)\n\n// GasOptions allow a user to configure the parameters used while heuristically recommending\n// fees for EIP-1559 compatible transactions.\ntype GasOptions struct {\n\tFeeHistoryBlocks             uint64\n\tFeeHistoryPercentile         uint64\n\tFallbackMaxFeePerGas         uint64\n\tPriorityFeeEstimationTrigger *big.Int\n\tDefaultPriorityFee           *big.Int\n\tPriorityFeeIncreaseBoundary  *big.Int\n}\n\n// A GasEstimator returns the gas price and the provide gas limit that is needed in\n// order to confirm transactions with an estimated maximum delay of one block.\ntype GasEstimator struct {\n\tclient  *Client\n\toptions *GasOptions\n}\n\n// NewGasEstimator returns a simple gas estimator that fetches the ideal gas\n// price for an ethereum transaction to be included in a block\n// with minimal delay.\nfunc NewGasEstimator(client *Client, opts GasOptions) *GasEstimator {\n\treturn &GasEstimator{\n\t\tclient:  client,\n\t\toptions: &opts,\n\t}\n}\n\n// NewDefaultGasEstimator returns a simple gas estimator with default gas options\n// that fetches the ideal gas price for an ethereum transaction to be included\n// in a block with minimal delay.\nfunc NewDefaultGasEstimator(client *Client) *GasEstimator {\n\treturn &GasEstimator{\n\t\tclient: client,\n\t\toptions: &GasOptions{\n\t\t\tFeeHistoryBlocks,\n\t\t\tFeeHistoryPercentile,\n\t\t\tFallbackMaxFeePerGas,\n\t\t\tPriorityFeeEstimationTrigger,\n\t\t\tDefaultPriorityFee,\n\t\t\tPriorityFeeIncreaseBoundary,\n\t\t},\n\t}\n}\n\n// EstimateGas returns an estimate of the current gas price\n// and returns the gas limit provided. These numbers change with congestion. These estimates\n// are often a little off, and this should be considered when using them.\nfunc (gasEstimator *GasEstimator) EstimateGas(ctx context.Context) (pack.U256, pack.U256, error) {\n\tlatest, err := gasEstimator.client.EthClient.HeaderByNumber(ctx, nil)\n\tif err != nil {\n\t\treturn pack.NewU256([32]byte{}), pack.NewU256([32]byte{}), fmt.Errorf(\"failed to get eth suggested gas price: %v\", err)\n\t}\n\t// base fee is in wei\n\tif latest.BaseFee == nil {\n\t\t// fallback values\n\t\treturn pack.NewU256FromInt(gasEstimator.options.DefaultPriorityFee), pack.NewU256FromUint64(gasEstimator.options.FallbackMaxFeePerGas), nil\n\t}\n\n\tbaseFee := new(big.Int).Set(latest.BaseFee)\n\testimatedPriorityFee, err := gasEstimator.estimatePriorityFee(ctx, baseFee, latest.Number)\n\tif err != nil {\n\t\treturn pack.NewU256([32]byte{}), pack.NewU256([32]byte{}), err\n\t}\n\tif estimatedPriorityFee == nil {\n\t\t// fallback values\n\t\treturn pack.NewU256FromInt(gasEstimator.options.DefaultPriorityFee), pack.NewU256FromUint64(gasEstimator.options.FallbackMaxFeePerGas), nil\n\t}\n\n\tmaxPriorityFeePerGas := gasEstimator.options.DefaultPriorityFee\n\tif estimatedPriorityFee.Cmp(maxPriorityFeePerGas) == 1 {\n\t\tmaxPriorityFeePerGas = estimatedPriorityFee\n\t}\n\n\tpotentialMaxFee := new(big.Int).Mul(baseFee, big.NewInt(12))\n\tif baseFee.Cmp(big.NewInt(40000000000)) == -1 {\n\t\tpotentialMaxFee = new(big.Int).Mul(baseFee, big.NewInt(20))\n\t} else if baseFee.Cmp(big.NewInt(100000000000)) == -1 {\n\t\tpotentialMaxFee = new(big.Int).Mul(baseFee, big.NewInt(16))\n\t} else if baseFee.Cmp(big.NewInt(200000000000)) == -1 {\n\t\tpotentialMaxFee = new(big.Int).Mul(baseFee, big.NewInt(14))\n\t}\n\tpotentialMaxFee.Div(potentialMaxFee, big.NewInt(10))\n\n\tmaxFeePerGas := potentialMaxFee\n\tif maxPriorityFeePerGas.Cmp(potentialMaxFee) == 1 {\n\t\tmaxFeePerGas = potentialMaxFee.Add(potentialMaxFee, maxPriorityFeePerGas)\n\t}\n\treturn pack.NewU256FromInt(maxPriorityFeePerGas), pack.NewU256FromInt(maxFeePerGas), nil\n}\n\nfunc (gasEstimator *GasEstimator) estimatePriorityFee(ctx context.Context, baseFee *big.Int, blockNumber *big.Int) (*big.Int, error) {\n\tif baseFee.Cmp(gasEstimator.options.PriorityFeeEstimationTrigger) == -1 {\n\t\treturn gasEstimator.options.DefaultPriorityFee, nil\n\t}\n\n\tfeeHistory, err := gasEstimator.client.EthClient.FeeHistory(ctx, gasEstimator.options.FeeHistoryBlocks, blockNumber, []float64{float64(gasEstimator.options.FeeHistoryPercentile)})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get eth fee history: %v\", err)\n\t}\n\n\trewards := make([]*big.Int, 0, len(feeHistory.Reward))\n\tfor _, r := range feeHistory.Reward {\n\t\tif len(r) > 0 && r[0].Cmp(big.NewInt(0)) != 0 {\n\t\t\trewards = append(rewards, r[0])\n\t\t}\n\t}\n\n\t// sort in ascending order\n\tsort.Slice(rewards, func(i, j int) bool { return rewards[j].Cmp(rewards[i]) >= 0 })\n\n\t// if len <=1 percentage increase cannot be calculated\n\tif len(rewards) <= 1 {\n\t\treturn nil, nil\n\t}\n\n\tpercentageIncreases := []*big.Int{}\n\tfor i, r := range rewards {\n\t\tif i == (len(rewards) - 1) {\n\t\t\tcontinue\n\t\t}\n\t\tnext := new(big.Int).Set(rewards[i+1])\n\t\ttemp := next.Sub(next, r)\n\t\ttemp = temp.Div(temp, r)\n\t\ttemp = temp.Mul(temp, big.NewInt(100))\n\t\tpercentageIncreases = append(percentageIncreases, temp)\n\t}\n\thighestIncrease := percentageIncreases[0]\n\thighestIncreaseIndex := 0\n\tfor i := 1; i < len(percentageIncreases); i++ {\n\t\tif highestIncrease.Cmp(percentageIncreases[i]) == -1 {\n\t\t\thighestIncrease = percentageIncreases[i]\n\t\t\thighestIncreaseIndex = i\n\t\t}\n\t}\n\tif highestIncrease.Cmp(gasEstimator.options.PriorityFeeIncreaseBoundary) == 1 && highestIncreaseIndex >= (len(rewards)/2) {\n\t\trewards = rewards[highestIncreaseIndex:]\n\t}\n\treturn rewards[len(rewards)/2], nil\n}\n"
  },
  {
    "path": "chain/ethereum/tx.go",
    "content": "package ethereum\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"math/big\"\n\n\t\"github.com/ethereum/go-ethereum/common\"\n\t\"github.com/ethereum/go-ethereum/core/types\"\n\t\"github.com/renproject/id\"\n\t\"github.com/renproject/multichain/api/account\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/multichain/chain/evm\"\n\t\"github.com/renproject/pack\"\n)\n\n// TxBuilder represents a transaction builder that builds transactions to be\n// broadcasted to the ethereum network. The TxBuilder is configured using a\n// chain id.\ntype TxBuilder struct {\n\tChainID *big.Int\n}\n\n// NewTxBuilder creates a new transaction builder.\nfunc NewTxBuilder(chainID *big.Int) TxBuilder {\n\treturn TxBuilder{chainID}\n}\n\n// BuildTx receives transaction fields and constructs a new transaction.\nfunc (txBuilder TxBuilder) BuildTx(ctx context.Context, fromPubKey *id.PubKey, to address.Address, value, nonce, gas, gasTipCap, gasFeeCap pack.U256, payload pack.Bytes) (account.Tx, error) {\n\ttoAddr, err := NewAddressFromHex(string(pack.String(to)))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"bad to address '%v': %v\", to, err)\n\t}\n\taddr := common.Address(toAddr)\n\treturn &evm.Tx{\n\t\tEthTx: types.NewTx(&types.DynamicFeeTx{\n\t\t\tChainID:   txBuilder.ChainID,\n\t\t\tNonce:     nonce.Int().Uint64(),\n\t\t\tGasTipCap: gasTipCap.Int(),\n\t\t\tGasFeeCap: gasFeeCap.Int(),\n\t\t\tGas:       gas.Int().Uint64(),\n\t\t\tTo:        &addr,\n\t\t\tValue:     value.Int(),\n\t\t\tData:      payload,\n\t\t}),\n\t\tSigner: types.LatestSignerForChainID(txBuilder.ChainID),\n\t}, nil\n}\n"
  },
  {
    "path": "chain/evm/address.go",
    "content": "package evm\n\nimport (\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/ethereum/go-ethereum/common\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/pack\"\n\t\"github.com/renproject/surge\"\n)\n\n// AddressEncodeDecoder implements the address.EncodeDecoder interface\ntype AddressEncodeDecoder struct {\n\tAddressEncoder\n\tAddressDecoder\n}\n\n// AddressEncoder implements the address.Encoder interface.\ntype AddressEncoder interface {\n\tEncodeAddress(address.RawAddress) (address.Address, error)\n}\n\ntype addressEncoder struct{}\n\n// NewAddressEncodeDecoder constructs a new AddressEncodeDecoder.\nfunc NewAddressEncodeDecoder() address.EncodeDecoder {\n\treturn AddressEncodeDecoder{\n\t\tAddressEncoder: NewAddressEncoder(),\n\t\tAddressDecoder: NewAddressDecoder(),\n\t}\n}\n\n// AddressDecoder implements the address.Decoder interface.\ntype AddressDecoder interface {\n\tDecodeAddress(address.Address) (address.RawAddress, error)\n}\n\ntype addressDecoder struct{}\n\n// NewAddressDecoder constructs a new AddressDecoder.\nfunc NewAddressDecoder() AddressDecoder {\n\treturn addressDecoder{}\n}\n\n// NewAddressEncoder constructs a new AddressEncoder.\nfunc NewAddressEncoder() AddressEncoder {\n\treturn addressEncoder{}\n}\n\nfunc (addressDecoder) DecodeAddress(encoded address.Address) (address.RawAddress, error) {\n\tethaddr, err := NewAddressFromHex(string(pack.String(encoded)))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn address.RawAddress(pack.Bytes(ethaddr[:])), nil\n}\n\nfunc (addressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) {\n\taddr := common.BytesToAddress([]byte(rawAddr))\n\treturn address.Address(addr.Hex()), nil\n}\n\n// An Address represents a public address on the Ethereum blockchain. It can be\n// the address of an external account, or the address of a smart contract.\ntype Address common.Address\n\n// NewAddressFromHex returns an Address decoded from a hex\n// string.\nfunc NewAddressFromHex(str string) (Address, error) {\n\tif strings.HasPrefix(str, \"0x\") {\n\t\tstr = str[2:]\n\t}\n\tif len(str) != 40 {\n\t\treturn Address{}, fmt.Errorf(\"invalid ethaddress %v\", str)\n\t}\n\tethaddrData, err := hex.DecodeString(str)\n\tif err != nil {\n\t\treturn Address{}, fmt.Errorf(\"invalid ethaddress %v: %v\", str, err)\n\t}\n\tethaddr := common.Address{}\n\tcopy(ethaddr[:], ethaddrData)\n\treturn Address(ethaddr), nil\n}\n\n// SizeHint returns the number of bytes needed to represent this address in\n// binary.\nfunc (Address) SizeHint() int {\n\treturn common.AddressLength\n}\n\n// Marshal the address to binary.\nfunc (addr Address) Marshal(buf []byte, rem int) ([]byte, int, error) {\n\tif len(buf) < common.AddressLength || rem < common.AddressLength {\n\t\treturn buf, rem, surge.ErrUnexpectedEndOfBuffer\n\t}\n\tcopy(buf, addr[:])\n\treturn buf[common.AddressLength:], rem - common.AddressLength, nil\n}\n\n// Unmarshal the address from binary.\nfunc (addr *Address) Unmarshal(buf []byte, rem int) ([]byte, int, error) {\n\tif len(buf) < common.AddressLength || rem < common.AddressLength {\n\t\treturn buf, rem, surge.ErrUnexpectedEndOfBuffer\n\t}\n\tcopy(addr[:], buf[:common.AddressLength])\n\treturn buf[common.AddressLength:], rem - common.AddressLength, nil\n}\n\n// MarshalJSON implements JSON marshaling by encoding the address as a hex\n// string.\nfunc (addr Address) MarshalJSON() ([]byte, error) {\n\treturn json.Marshal(common.Address(addr).Hex())\n}\n\n// UnmarshalJSON implements JSON unmarshaling by expected the data be a hex\n// encoded string representation of an address.\nfunc (addr *Address) UnmarshalJSON(data []byte) error {\n\tvar str string\n\tif err := json.Unmarshal(data, &str); err != nil {\n\t\treturn err\n\t}\n\tethaddr, err := NewAddressFromHex(str)\n\tif err != nil {\n\t\treturn err\n\t}\n\t*addr = ethaddr\n\treturn nil\n}\n\n// String returns the address as a human-readable hex string.\nfunc (addr Address) String() string {\n\treturn hex.EncodeToString(addr[:])\n}\n\n// Bytes returns the address as a slice of 20 bytes.\nfunc (addr Address) Bytes() pack.Bytes {\n\treturn pack.Bytes(addr[:])\n}\n"
  },
  {
    "path": "chain/evm/address_test.go",
    "content": "package evm_test\n\nimport (\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"testing/quick\"\n\n\t\"github.com/renproject/multichain/chain/ethereum\"\n\t\"github.com/renproject/surge\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Address\", func() {\n\tContext(\"when unmarshaling and unmarshaling\", func() {\n\t\tIt(\"should equal itself\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\taddr := ethereum.Address(x)\n\t\t\t\tExpect(addr.SizeHint()).To(Equal(20))\n\n\t\t\t\tbytes, err := surge.ToBinary(addr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tvar newAddr ethereum.Address\n\t\t\t\terr = surge.FromBinary(&newAddr, bytes)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tExpect(addr).To(Equal(newAddr))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when unmarshaling and unmarshaling to/from JSON\", func() {\n\t\tIt(\"should equal itself\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\taddr := ethereum.Address(x)\n\n\t\t\t\tbytes, err := json.Marshal(addr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tvar newAddr ethereum.Address\n\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tExpect(addr).To(Equal(newAddr))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\n\t\tContext(\"when the address is invalid hex\", func() {\n\t\t\tIt(\"should return an error\", func() {\n\t\t\t\tf := func(x [40]byte) bool {\n\t\t\t\t\tbytes, err := json.Marshal(string(x[:]))\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tvar newAddr ethereum.Address\n\t\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\terr := quick.Check(f, nil)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t})\n\t\t})\n\n\t\tContext(\"when the address is invalid length\", func() {\n\t\t\tIt(\"should return an error\", func() {\n\t\t\t\tf := func(x [10]byte) bool {\n\t\t\t\t\taddr := hex.EncodeToString(x[:])\n\t\t\t\t\tbytes, err := json.Marshal(addr)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tvar newAddr ethereum.Address\n\t\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\terr := quick.Check(f, nil)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t})\n\t\t})\n\t})\n\n\tContext(\"when unmarshalling random data\", func() {\n\t\tIt(\"should not panic\", func() {\n\t\t\tf := func(x []byte) bool {\n\t\t\t\tvar addr ethereum.Address\n\t\t\t\tExpect(func() { addr.Unmarshal(x, surge.MaxBytes) }).ToNot(Panic())\n\t\t\t\tExpect(func() { json.Unmarshal(x, &addr) }).ToNot(Panic())\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/evm/client.go",
    "content": "package evm\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"math/big\"\n\n\t\"github.com/ethereum/go-ethereum\"\n\t\"github.com/ethereum/go-ethereum/common\"\n\t\"github.com/ethereum/go-ethereum/core/types\"\n\t\"github.com/ethereum/go-ethereum/ethclient\"\n\t\"github.com/renproject/multichain/api/account\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/multichain/api/contract\"\n\t\"github.com/renproject/pack\"\n)\n\nconst (\n\t// DefaultClientRPCURL is the RPC URL used by default, to interact with the\n\t// ethereum node.\n\tDefaultClientRPCURL = \"http://127.0.0.1:8545/\"\n)\n\n// Client holds the underlying RPC client instance.\ntype Client struct {\n\tEthClient *ethclient.Client\n\tChainID   *big.Int\n}\n\n// NewClient creates and returns a new JSON-RPC client to the Ethereum node\nfunc NewClient(rpcURL string, chainID *big.Int) (*Client, error) {\n\tclient, err := ethclient.Dial(rpcURL)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"dialing url: %v\", rpcURL)\n\t}\n\tclientChainID, err := client.ChainID(context.Background())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"mismatched chain id: expected %v, got %v\", chainID, clientChainID)\n\t}\n\treturn &Client{\n\t\tclient,\n\t\tchainID,\n\t}, nil\n}\n\n// LatestBlock returns the block number at the current chain head.\nfunc (client *Client) LatestBlock(ctx context.Context) (pack.U64, error) {\n\theader, err := client.EthClient.HeaderByNumber(ctx, nil)\n\tif err != nil {\n\t\treturn pack.NewU64(0), fmt.Errorf(\"fetching header: %v\", err)\n\t}\n\treturn pack.NewU64(header.Number.Uint64()), nil\n}\n\n// Tx returns the transaction uniquely identified by the given transaction\n// hash. It also returns the number of confirmations for the transaction.\nfunc (client *Client) Tx(ctx context.Context, txID pack.Bytes) (account.Tx, pack.U64, error) {\n\ttx, pending, err := client.EthClient.TransactionByHash(ctx, common.BytesToHash(txID))\n\tif err != nil {\n\t\treturn nil, pack.NewU64(0), fmt.Errorf(fmt.Sprintf(\"fetching tx by hash '%v': %v\", txID, err))\n\t}\n\n\t// Check the chain id for replay-protected tx.\n\tif tx.Protected() {\n\t\tchainID := tx.ChainId()\n\t\tif client.ChainID != nil {\n\t\t\tif chainID == nil {\n\t\t\t\treturn nil, 0, fmt.Errorf(\"nil chain ID\")\n\t\t\t}\n\t\t\tif chainID.Cmp(client.ChainID) != 0 {\n\t\t\t\treturn nil, 0, fmt.Errorf(\"invalid chain ID, expected = %v, got = %v\", client.ChainID.String(), chainID.String())\n\t\t\t}\n\t\t}\n\t}\n\n\t// If the transaction is still pending, use default EIP-155 Signer.\n\tpendingTx := Tx{\n\t\tEthTx:  tx,\n\t\tSigner: types.NewEIP155Signer(client.ChainID),\n\t}\n\tif pending {\n\t\t// Transaction has not been included in a block yet.\n\t\treturn nil, 0, fmt.Errorf(\"tx %v is pending\", txID)\n\t}\n\n\treceipt, err := client.EthClient.TransactionReceipt(ctx, common.BytesToHash(txID))\n\tif err != nil {\n\t\treturn nil, pack.NewU64(0), fmt.Errorf(\"fetching recipt for tx %v : %v\", txID, err)\n\t}\n\n\tif receipt == nil {\n\t\t// Transaction has 0 confirmations.\n\t\treturn &pendingTx, 0, nil\n\t}\n\n\tif receipt.Status == 0 {\n\t\t// Transaction has been reverted.\n\t\treturn nil, pack.NewU64(0), fmt.Errorf(\"tx %v reverted, reciept status 0\", txID)\n\t}\n\n\t// Transaction has been confirmed.\n\tconfirmedTx := Tx{\n\t\ttx,\n\t\ttypes.LatestSignerForChainID(client.ChainID),\n\t}\n\n\theader, err := client.EthClient.HeaderByNumber(ctx, nil)\n\tif err != nil {\n\t\treturn nil, pack.NewU64(0), fmt.Errorf(\"fetching header : %v\", err)\n\t}\n\n\treturn &confirmedTx, pack.NewU64(header.Number.Uint64() - receipt.BlockNumber.Uint64()), nil\n}\n\n// SubmitTx to the underlying blockchain network.\nfunc (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error {\n\tswitch tx := tx.(type) {\n\tcase *Tx:\n\t\terr := client.EthClient.SendTransaction(ctx, tx.EthTx)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(fmt.Sprintf(\"sending transaction '%v': %v\", tx.Hash(), err))\n\t\t}\n\t\treturn nil\n\tdefault:\n\t\treturn fmt.Errorf(\"expected type %T, got type %T\", new(Tx), tx)\n\t}\n}\n\n// AccountNonce returns the current nonce of the account. This is the nonce to\n// be used while building a new transaction.\nfunc (client *Client) AccountNonce(ctx context.Context, addr address.Address) (pack.U256, error) {\n\ttargetAddr, err := NewAddressFromHex(string(pack.String(addr)))\n\tif err != nil {\n\t\treturn pack.U256{}, fmt.Errorf(\"bad to address '%v': %v\", addr, err)\n\t}\n\tnonce, err := client.EthClient.NonceAt(ctx, common.Address(targetAddr), nil)\n\tif err != nil {\n\t\treturn pack.U256{}, fmt.Errorf(\"failed to get nonce for '%v': %v\", addr, err)\n\t}\n\n\treturn pack.NewU256FromU64(pack.NewU64(nonce)), nil\n}\n\n// AccountBalance returns the account balancee for a given address.\nfunc (client *Client) AccountBalance(ctx context.Context, addr address.Address) (pack.U256, error) {\n\ttargetAddr, err := NewAddressFromHex(string(pack.String(addr)))\n\tif err != nil {\n\t\treturn pack.U256{}, fmt.Errorf(\"bad to address '%v': %v\", addr, err)\n\t}\n\tbalance, err := client.EthClient.BalanceAt(ctx, common.Address(targetAddr), nil)\n\tif err != nil {\n\t\treturn pack.U256{}, fmt.Errorf(\"failed to get balance for '%v': %v\", addr, err)\n\t}\n\n\treturn pack.NewU256FromInt(balance), nil\n}\n\n// CallContract implements the multichain Contract API.\nfunc (client *Client) CallContract(ctx context.Context, program address.Address, calldata contract.CallData) (pack.Bytes, error) {\n\ttargetAddr, err := NewAddressFromHex(string(pack.String(program)))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"bad to address '%v': %v\", program, err)\n\t}\n\taddr := common.Address(targetAddr)\n\n\tcallMsg := ethereum.CallMsg{\n\t\tTo:   &addr,\n\t\tData: calldata,\n\t}\n\treturn client.EthClient.CallContract(ctx, callMsg, nil)\n}\n"
  },
  {
    "path": "chain/evm/encode.go",
    "content": "package evm\n\nimport (\n\t\"fmt\"\n\t\"math/big\"\n\n\t\"github.com/ethereum/go-ethereum/accounts/abi\"\n\t\"github.com/renproject/pack\"\n)\n\n// A Payload is an Ethereum encoded function call. It includes an ABI, the\n// function being called from the ABI, and the data being passed to the\n// function.\ntype Payload struct {\n\tABI  pack.Bytes `json:\"abi\"`\n\tFn   pack.Bytes `json:\"fn\"`\n\tData pack.Bytes `json:\"data\"`\n}\n\n// Encode values into an Ethereum ABI compatible byte slice.\nfunc Encode(vals ...interface{}) []byte {\n\tethargs := make(abi.Arguments, 0, len(vals))\n\tethvals := make([]interface{}, 0, len(vals))\n\n\tfor _, val := range vals {\n\t\tvar ethval interface{}\n\t\tvar ty abi.Type\n\t\tvar err error\n\n\t\tswitch val := val.(type) {\n\t\tcase pack.Bytes:\n\t\t\tethval = val\n\t\t\tty, err = abi.NewType(\"bytes\", \"\", nil)\n\t\tcase pack.Bytes32:\n\t\t\tethval = val\n\t\t\tty, err = abi.NewType(\"bytes32\", \"\", nil)\n\n\t\tcase pack.U8:\n\t\t\tethval = big.NewInt(0).SetUint64(uint64(val.Uint8()))\n\t\t\tty, err = abi.NewType(\"uint256\", \"\", nil)\n\t\tcase pack.U16:\n\t\t\tethval = big.NewInt(0).SetUint64(uint64(val.Uint16()))\n\t\t\tty, err = abi.NewType(\"uint256\", \"\", nil)\n\t\tcase pack.U32:\n\t\t\tethval = big.NewInt(0).SetUint64(uint64(val.Uint32()))\n\t\t\tty, err = abi.NewType(\"uint256\", \"\", nil)\n\t\tcase pack.U64:\n\t\t\tethval = big.NewInt(0).SetUint64(uint64(val.Uint64()))\n\t\t\tty, err = abi.NewType(\"uint256\", \"\", nil)\n\t\tcase pack.U128:\n\t\t\tethval = val.Int()\n\t\t\tty, err = abi.NewType(\"uint256\", \"\", nil)\n\t\tcase pack.U256:\n\t\t\tethval = val.Int()\n\t\t\tty, err = abi.NewType(\"uint256\", \"\", nil)\n\n\t\tcase Address:\n\t\t\tethval = val\n\t\t\tty, err = abi.NewType(\"address\", \"\", nil)\n\n\t\tcase []pack.U256:\n\t\t\tv := make([]*big.Int, len(val))\n\t\t\tfor i := range val {\n\t\t\t\telem, ok := big.NewInt(0).SetString(val[i].String(), 10)\n\t\t\t\tif !ok {\n\t\t\t\t\tpanic(fmt.Errorf(\"encoding list item: %v\", err))\n\t\t\t\t}\n\t\t\t\tv[i] = elem\n\t\t\t}\n\t\t\tethval = v\n\t\t\tty, err = abi.NewType(\"uint256[]\", \"\", nil)\n\t\tcase []Address:\n\t\t\tethval = val\n\t\t\tty, err = abi.NewType(\"address[]\", \"\", nil)\n\n\t\tdefault:\n\t\t\tpanic(fmt.Errorf(\"non-exhaustive pattern: %T\", val))\n\t\t}\n\n\t\tif err != nil {\n\t\t\tpanic(fmt.Errorf(\"error encoding: %v\", err))\n\t\t}\n\t\tethargs = append(ethargs, abi.Argument{\n\t\t\tType: ty,\n\t\t})\n\t\tethvals = append(ethvals, ethval)\n\t}\n\n\tpacked, err := ethargs.Pack(ethvals...)\n\tif err != nil {\n\t\tpanic(fmt.Errorf(\"error packing: %v\", err))\n\t}\n\treturn packed\n}\n"
  },
  {
    "path": "chain/evm/encode_test.go",
    "content": "package evm_test\n\nimport (\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"math\"\n\t\"testing/quick\"\n\n\t\"github.com/renproject/multichain/chain/ethereum\"\n\t\"github.com/renproject/pack\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/ginkgo/extensions/table\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Encoding\", func() {\n\tContext(\"when encoding bytes\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x []byte) bool {\n\t\t\t\targ := pack.NewBytes(x)\n\n\t\t\t\tresBytes := ethereum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\n\t\t\t\texpectedBytes := make([]byte, int(math.Ceil(float64(len(x))/32)*32))\n\t\t\t\tcopy(expectedBytes, x)\n\t\t\t\t// Note: since the first parameter has a dynamic length, the\n\t\t\t\t// first 32 bytes instead contain a pointer to the data.\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", 32) + fmt.Sprintf(\"%064x\", len(x)) + hex.EncodeToString(expectedBytes)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 32 bytes\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [32]byte) bool {\n\t\t\t\targ := pack.NewBytes32(x)\n\n\t\t\t\tresBytes := ethereum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := hex.EncodeToString(x[:])\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 8-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint8) bool {\n\t\t\t\targ := pack.NewU8(x)\n\n\t\t\t\tresBytes := ethereum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 16-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint16) bool {\n\t\t\t\targ := pack.NewU16(x)\n\n\t\t\t\tresBytes := ethereum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 32-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint32) bool {\n\t\t\t\targ := pack.NewU32(x)\n\n\t\t\t\tresBytes := ethereum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 64-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint64) bool {\n\t\t\t\targ := pack.NewU64(x)\n\n\t\t\t\tresBytes := ethereum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 128-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [16]byte) bool {\n\t\t\t\targ := pack.NewU128(x)\n\n\t\t\t\tresBytes := ethereum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 256-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [32]byte) bool {\n\t\t\t\targ := pack.NewU256(x)\n\n\t\t\t\tresBytes := ethereum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding Ethereum addresses\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\targ := ethereum.Address(x)\n\n\t\t\t\tresBytes := ethereum.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\n\t\t\t\texpectedBytes := make([]byte, 32)\n\t\t\t\tcopy(expectedBytes[12:], x[:])\n\t\t\t\texpectedString := hex.EncodeToString(expectedBytes)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding slices\", func() {\n\t\tContext(\"when the elements are 256-bit unsigned integers\", func() {\n\t\t\tIt(\"should return the correct result\", func() {\n\t\t\t\tf := func(x [][32]byte) bool {\n\t\t\t\t\targ := make([]pack.U256, len(x))\n\t\t\t\t\tfor i := range arg {\n\t\t\t\t\t\targ[i] = pack.NewU256(x[i])\n\t\t\t\t\t}\n\n\t\t\t\t\tresBytes := ethereum.Encode(arg)\n\t\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\t\texpectedString := fmt.Sprintf(\"%064x%064x\", 32, len(x))\n\t\t\t\t\tfor i := range x {\n\t\t\t\t\t\texpectedString = expectedString + fmt.Sprintf(\"%064x\", x[i])\n\t\t\t\t\t}\n\n\t\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\terr := quick.Check(f, nil)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t})\n\t\t})\n\n\t\tContext(\"when the elements are Ethereum addresses\", func() {\n\t\t\tIt(\"should return the correct result\", func() {\n\t\t\t\tf := func(x [][20]byte) bool {\n\t\t\t\t\targ := make([]ethereum.Address, len(x))\n\t\t\t\t\tfor i := range arg {\n\t\t\t\t\t\targ[i] = ethereum.Address(x[i])\n\t\t\t\t\t}\n\n\t\t\t\t\tresBytes := ethereum.Encode(arg)\n\t\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\t\texpectedString := fmt.Sprintf(\"%064x%064x\", 32, len(x))\n\t\t\t\t\tfor i := range x {\n\t\t\t\t\t\texpectedBytes := make([]byte, 32)\n\t\t\t\t\t\tcopy(expectedBytes[12:], x[i][:])\n\t\t\t\t\t\texpectedString = expectedString + hex.EncodeToString(expectedBytes)\n\t\t\t\t\t}\n\n\t\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\terr := quick.Check(f, nil)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t})\n\t\t})\n\t})\n\n\tContext(\"when encoding an unsupported type\", func() {\n\t\tIt(\"should panic\", func() {\n\t\t\tf := func(x bool) bool {\n\t\t\t\targ := pack.NewBool(x)\n\t\t\t\tExpect(func() { ethereum.Encode(arg) }).To(Panic())\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\ttype testCase struct {\n\t\taddr   string\n\t\tamount uint64\n\t\thash   string\n\t\tresult string\n\t}\n\n\ttestCases := []testCase{\n\t\t{\n\t\t\taddr:   \"797522Fb74d42bB9fbF6b76dEa24D01A538d5D66\",\n\t\t\tamount: 10000,\n\t\t\thash:   \"702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed\",\n\t\t\tresult: \"797522fb74d42bb9fbf6b76dea24d01a538d5d660000000000000000000000000000000000000000000000000000000000000000000000000000000000002710702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed\",\n\t\t},\n\t\t{\n\t\t\taddr:   \"58afb504ef2444a267b8c7ce57279417f1377ceb\",\n\t\t\tamount: 50000000000000000,\n\t\t\thash:   \"dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93\",\n\t\t\tresult: \"58afb504ef2444a267b8c7ce57279417f1377ceb00000000000000000000000000000000000000000000000000000000000000000000000000b1a2bc2ec50000dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93\",\n\t\t},\n\t\t{\n\t\t\taddr:   \"0000000000000000000000000000000000000000\",\n\t\t\tamount: 0,\n\t\t\thash:   \"0000000000000000000000000000000000000000000000000000000000000000\",\n\t\t\tresult: \"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n\t\t},\n\t}\n\n\tDescribeTable(\"when encoding args\",\n\t\tfunc(test testCase) {\n\t\t\taddrBytes, err := hex.DecodeString(test.addr)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\tvar addr ethereum.Address\n\t\t\tcopy(addr[:], addrBytes)\n\n\t\t\thashBytes32 := [32]byte{}\n\t\t\thashBytes, err := hex.DecodeString(test.hash)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\tcopy(hashBytes32[:], hashBytes)\n\n\t\t\targs := []interface{}{\n\t\t\t\taddr,\n\t\t\t\tpack.NewU64(test.amount),\n\t\t\t\tpack.NewBytes32(hashBytes32),\n\t\t\t}\n\t\t\tresult := ethereum.Encode(args...)\n\t\t\tExpect(hex.EncodeToString(result)).To(Equal(test.result))\n\t\t},\n\n\t\tEntry(\"should return the same result as solidity for small transactions\", testCases[0]),\n\t\tEntry(\"should return the same result as solidity for large transactions\", testCases[1]),\n\t\tEntry(\"should return the same result as solidity for empty transactions\", testCases[2]),\n\t)\n})\n"
  },
  {
    "path": "chain/evm/gas.go",
    "content": "package evm\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/renproject/pack\"\n)\n\n// A GasEstimator returns the gas price and the provide gas limit that is needed in\n// order to confirm transactions with an estimated maximum delay of one block.\ntype GasEstimator struct {\n\tclient *Client\n}\n\n// NewGasEstimator returns a simple gas estimator that fetches the ideal gas\n// price for a ethereum transaction to be included in a block\n// with minimal delay.\nfunc NewGasEstimator(client *Client) *GasEstimator {\n\treturn &GasEstimator{\n\t\tclient: client,\n\t}\n}\n\n// EstimateGas returns an estimate of the current gas price\n// and returns the gas limit provided. These numbers change with congestion. These estimates\n// are often a little bit off, and this should be considered when using them.\nfunc (gasEstimator *GasEstimator) EstimateGas(ctx context.Context) (pack.U256, pack.U256, error) {\n\tgasPrice, err := gasEstimator.client.EthClient.SuggestGasPrice(ctx)\n\tif err != nil {\n\t\treturn pack.NewU256([32]byte{}), pack.NewU256([32]byte{}), fmt.Errorf(\"failed to get eth suggested gas price: %v\", err)\n\t}\n\treturn pack.NewU256FromInt(gasPrice), pack.NewU256FromInt(gasPrice), nil\n}\n"
  },
  {
    "path": "chain/evm/tx.go",
    "content": "package evm\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"math/big\"\n\n\t\"github.com/ethereum/go-ethereum/common\"\n\t\"github.com/ethereum/go-ethereum/core/types\"\n\t\"github.com/renproject/id\"\n\t\"github.com/renproject/multichain/api/account\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/multichain/api/contract\"\n\t\"github.com/renproject/pack\"\n)\n\n// TxBuilder represents a transaction builder that builds transactions to be\n// broadcasted to the ethereum network. The TxBuilder is configured using a\n// chain id.\ntype TxBuilder struct {\n\tChainID *big.Int\n}\n\n// NewTxBuilder creates a new transaction builder.\nfunc NewTxBuilder(chainID *big.Int) TxBuilder {\n\treturn TxBuilder{chainID}\n}\n\n// BuildTx receives transaction fields and constructs a new transaction.\nfunc (txBuilder TxBuilder) BuildTx(ctx context.Context, fromPubKey *id.PubKey, to address.Address, value, nonce, gasLimit, gasPrice, gasCap pack.U256, payload pack.Bytes) (account.Tx, error) {\n\ttoAddr, err := NewAddressFromHex(string(pack.String(to)))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"bad to address '%v': %v\", to, err)\n\t}\n\taddr := common.Address(toAddr)\n\treturn &Tx{\n\t\tEthTx: types.NewTransaction(nonce.Int().Uint64(),\n\t\t\taddr, value.Int(),\n\t\t\tgasLimit.Int().Uint64(),\n\t\t\tgasPrice.Int(),\n\t\t\tpayload,\n\t\t),\n\t\tSigner: types.LatestSignerForChainID(txBuilder.ChainID),\n\t}, nil\n}\n\n// Tx represents a ethereum transaction, encapsulating a payload/data and its\n// Signer.\ntype Tx struct {\n\tEthTx  *types.Transaction\n\tSigner types.Signer\n}\n\n// Hash returns the hash that uniquely identifies the transaction.\n// Generally, hashes are irreversible hash functions that consume the\n// content of the transaction.\nfunc (tx Tx) Hash() pack.Bytes {\n\treturn tx.EthTx.Hash().Bytes()\n}\n\n// From returns the address that is sending the transaction. Generally,\n// this is also the address that must sign the transaction.\nfunc (tx Tx) From() address.Address {\n\taddr, err := types.Sender(tx.Signer, tx.EthTx)\n\tif err != nil {\n\t\treturn address.Address(\"\")\n\t}\n\treturn address.Address(addr.Hex())\n}\n\n// To returns the address that is receiving the transaction. This can be the\n// address of an external account, controlled by a private key, or it can be\n// the address of a contract.\nfunc (tx Tx) To() address.Address {\n\treturn address.Address(tx.EthTx.To().Hex())\n}\n\n// Value being sent from the sender to the receiver.\nfunc (tx Tx) Value() pack.U256 {\n\treturn pack.NewU256FromInt(tx.EthTx.Value())\n}\n\n// Nonce returns the nonce used to order the transaction with respect to all\n// other transactions signed and submitted by the sender.\nfunc (tx Tx) Nonce() pack.U256 {\n\treturn pack.NewU256FromU64(pack.NewU64(tx.EthTx.Nonce()))\n}\n\n// Payload returns arbitrary data that is associated with the transaction.\n// Generally, this payload is used to send notes between external accounts,\n// or invoke business logic on a contract.\nfunc (tx Tx) Payload() contract.CallData {\n\treturn contract.CallData(tx.EthTx.Data())\n}\n\n// Sighashes returns the digests that must be signed before the transaction\n// can be submitted by the client.\nfunc (tx Tx) Sighashes() ([]pack.Bytes32, error) {\n\treturn []pack.Bytes32{pack.Bytes32(tx.Signer.Hash(tx.EthTx))}, nil\n}\n\n// Sign the transaction by injecting signatures for the required sighashes.\n// The serialized public key used to sign the sighashes must also be\n// specified.\nfunc (tx *Tx) Sign(signatures []pack.Bytes65, pubkey pack.Bytes) error {\n\tsignedtx, err := tx.EthTx.WithSignature(tx.Signer, signatures[0].Bytes())\n\tif err != nil {\n\t\treturn err\n\t}\n\ttx.EthTx = signedtx\n\treturn nil\n}\n\n// Serialize the transaction into bytes. Generally, this is the format in\n// which the transaction will be submitted by the client.\nfunc (tx Tx) Serialize() (pack.Bytes, error) {\n\treturn tx.EthTx.MarshalBinary()\n}\n"
  },
  {
    "path": "chain/fantom/address.go",
    "content": "package fantom\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\ntype (\n\t// AddressEncodeDecoder re-exports evm.AddressEncodeDecoder.\n\tAddressEncodeDecoder = evm.AddressEncodeDecoder\n\n\t// AddressEncoder re-exports evm.AddressEncoder.\n\tAddressEncoder = evm.AddressEncoder\n\n\t// AddressDecoder re-exports evm.AddressDecoder.\n\tAddressDecoder = evm.AddressDecoder\n\n\t// Address re-exports evm.Address.\n\tAddress = evm.Address\n)\n\nvar (\n\t// NewAddressEncodeDecoder re-exports evm.NewAddressEncodeDecoder.\n\tNewAddressEncodeDecoder = evm.NewAddressEncodeDecoder\n\n\t// NewAddressDecoder re-exports evm.NewAddressDecoder.\n\tNewAddressDecoder = evm.NewAddressDecoder\n\n\t// NewAddressEncoder re-exports evm.NewAddressEncoder.\n\tNewAddressEncoder = evm.NewAddressEncoder\n\n\t// NewAddressFromHex re-exports evm.NewAddressFromHex.\n\tNewAddressFromHex = evm.NewAddressFromHex\n)\n"
  },
  {
    "path": "chain/fantom/address_test.go",
    "content": "package fantom_test\n\nimport (\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"testing/quick\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n\t\"github.com/renproject/multichain/chain/fantom\"\n\t\"github.com/renproject/surge\"\n)\n\nvar _ = Describe(\"Address\", func() {\n\tContext(\"when unmarshaling and unmarshaling\", func() {\n\t\tIt(\"should equal itself\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\taddr := fantom.Address(x)\n\t\t\t\tExpect(addr.SizeHint()).To(Equal(20))\n\n\t\t\t\tbytes, err := surge.ToBinary(addr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tvar newAddr fantom.Address\n\t\t\t\terr = surge.FromBinary(&newAddr, bytes)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tExpect(addr).To(Equal(newAddr))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when unmarshaling and unmarshaling to/from JSON\", func() {\n\t\tIt(\"should equal itself\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\taddr := fantom.Address(x)\n\n\t\t\t\tbytes, err := json.Marshal(addr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tvar newAddr fantom.Address\n\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tExpect(addr).To(Equal(newAddr))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\n\t\tContext(\"when the address is invalid hex\", func() {\n\t\t\tIt(\"should return an error\", func() {\n\t\t\t\tf := func(x [40]byte) bool {\n\t\t\t\t\tbytes, err := json.Marshal(string(x[:]))\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tvar newAddr fantom.Address\n\t\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\terr := quick.Check(f, nil)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t})\n\t\t})\n\n\t\tContext(\"when the address is invalid length\", func() {\n\t\t\tIt(\"should return an error\", func() {\n\t\t\t\tf := func(x [10]byte) bool {\n\t\t\t\t\taddr := hex.EncodeToString(x[:])\n\t\t\t\t\tbytes, err := json.Marshal(addr)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tvar newAddr fantom.Address\n\t\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\terr := quick.Check(f, nil)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t})\n\t\t})\n\t})\n\n\tContext(\"when unmarshalling random data\", func() {\n\t\tIt(\"should not panic\", func() {\n\t\t\tf := func(x []byte) bool {\n\t\t\t\tvar addr fantom.Address\n\t\t\t\tExpect(func() { addr.Unmarshal(x, surge.MaxBytes) }).ToNot(Panic())\n\t\t\t\tExpect(func() { json.Unmarshal(x, &addr) }).ToNot(Panic())\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/fantom/client.go",
    "content": "package fantom\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\nconst (\n\t// DefaultClientRPCURL is the RPC URL used by default, to interact with the\n\t// fantom node.\n\tDefaultClientRPCURL = \"http://127.0.0.1:18545/\"\n)\n\n// Client re-exports evm.Client.\ntype Client = evm.Client\n\n// NewClient re-exports evm.NewClient.\nvar NewClient = evm.NewClient\n"
  },
  {
    "path": "chain/fantom/encode.go",
    "content": "package fantom\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\n// Payload re-exports evm.Payload.\ntype Payload = evm.Payload\n\n// Encode re-exports evm.Encode.\nvar Encode = evm.Encode\n"
  },
  {
    "path": "chain/fantom/encode_test.go",
    "content": "package fantom_test\n\nimport (\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"math\"\n\t\"testing/quick\"\n\n\t\"github.com/renproject/multichain/chain/fantom\"\n\n\t\"github.com/renproject/pack\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/ginkgo/extensions/table\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Encoding\", func() {\n\tContext(\"when encoding bytes\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x []byte) bool {\n\t\t\t\targ := pack.NewBytes(x)\n\n\t\t\t\tresBytes := fantom.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\n\t\t\t\texpectedBytes := make([]byte, int(math.Ceil(float64(len(x))/32)*32))\n\t\t\t\tcopy(expectedBytes, x)\n\t\t\t\t// Note: since the first parameter has a dynamic length, the\n\t\t\t\t// first 32 bytes instead contain a pointer to the data.\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", 32) + fmt.Sprintf(\"%064x\", len(x)) + hex.EncodeToString(expectedBytes)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 32 bytes\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [32]byte) bool {\n\t\t\t\targ := pack.NewBytes32(x)\n\n\t\t\t\tresBytes := fantom.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := hex.EncodeToString(x[:])\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 8-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint8) bool {\n\t\t\t\targ := pack.NewU8(x)\n\n\t\t\t\tresBytes := fantom.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 16-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint16) bool {\n\t\t\t\targ := pack.NewU16(x)\n\n\t\t\t\tresBytes := fantom.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 32-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint32) bool {\n\t\t\t\targ := pack.NewU32(x)\n\n\t\t\t\tresBytes := fantom.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 64-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint64) bool {\n\t\t\t\targ := pack.NewU64(x)\n\n\t\t\t\tresBytes := fantom.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 128-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [16]byte) bool {\n\t\t\t\targ := pack.NewU128(x)\n\n\t\t\t\tresBytes := fantom.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 256-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [32]byte) bool {\n\t\t\t\targ := pack.NewU256(x)\n\n\t\t\t\tresBytes := fantom.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding Ethereum addresses\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\targ := fantom.Address(x)\n\n\t\t\t\tresBytes := fantom.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\n\t\t\t\texpectedBytes := make([]byte, 32)\n\t\t\t\tcopy(expectedBytes, x[:])\n\t\t\t\texpectedString := hex.EncodeToString(expectedBytes)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding an unsupported type\", func() {\n\t\tIt(\"should panic\", func() {\n\t\t\tf := func(x bool) bool {\n\t\t\t\targ := pack.NewBool(x)\n\t\t\t\tExpect(func() { fantom.Encode(arg) }).To(Panic())\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\ttype testCase struct {\n\t\taddr   string\n\t\tamount uint64\n\t\thash   string\n\t\tresult string\n\t}\n\n\ttestCases := []testCase{\n\t\t{\n\t\t\taddr:   \"797522Fb74d42bB9fbF6b76dEa24D01A538d5D66\",\n\t\t\tamount: 10000,\n\t\t\thash:   \"702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed\",\n\t\t\tresult: \"797522fb74d42bb9fbf6b76dea24d01a538d5d660000000000000000000000000000000000000000000000000000000000000000000000000000000000002710702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed\",\n\t\t},\n\t\t{\n\t\t\taddr:   \"58afb504ef2444a267b8c7ce57279417f1377ceb\",\n\t\t\tamount: 50000000000000000,\n\t\t\thash:   \"dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93\",\n\t\t\tresult: \"58afb504ef2444a267b8c7ce57279417f1377ceb00000000000000000000000000000000000000000000000000000000000000000000000000b1a2bc2ec50000dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93\",\n\t\t},\n\t\t{\n\t\t\taddr:   \"0000000000000000000000000000000000000000\",\n\t\t\tamount: 0,\n\t\t\thash:   \"0000000000000000000000000000000000000000000000000000000000000000\",\n\t\t\tresult: \"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n\t\t},\n\t}\n\n\tDescribeTable(\"when encoding args\",\n\t\tfunc(test testCase) {\n\t\t\taddrBytes, err := hex.DecodeString(test.addr)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\tvar addr fantom.Address\n\t\t\tcopy(addr[:], addrBytes)\n\n\t\t\thashBytes32 := [32]byte{}\n\t\t\thashBytes, err := hex.DecodeString(test.hash)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\tcopy(hashBytes32[:], hashBytes)\n\n\t\t\targs := []interface{}{\n\t\t\t\taddr,\n\t\t\t\tpack.NewU64(test.amount),\n\t\t\t\tpack.NewBytes32(hashBytes32),\n\t\t\t}\n\t\t\tresult := fantom.Encode(args...)\n\t\t\tExpect(hex.EncodeToString(result)).To(Equal(test.result))\n\t\t},\n\n\t\tEntry(\"should return the same result as solidity for small transactions\", testCases[0]),\n\t\tEntry(\"should return the same result as solidity for large transactions\", testCases[1]),\n\t\tEntry(\"should return the same result as solidity for empty transactions\", testCases[2]),\n\t)\n})\n"
  },
  {
    "path": "chain/fantom/gas.go",
    "content": "package fantom\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\n// GasEstimator re-exports evm.GasEstimator.\ntype GasEstimator = evm.GasEstimator\n\n// NewGasEstimator re-exports evm.NewGasEstimator.\nvar NewGasEstimator = evm.NewGasEstimator\n"
  },
  {
    "path": "chain/fantom/tx.go",
    "content": "package fantom\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\ntype (\n\t// TxBuilder re-exports evm.TxBuilder.\n\tTxBuilder = evm.TxBuilder\n\n\t// Tx re-exports evm.Tx.\n\tTx = evm.Tx\n)\n\n// NewTxBuilder re-exports evm.NewTxBuilder.\nvar NewTxBuilder = evm.NewTxBuilder\n"
  },
  {
    "path": "chain/filecoin/account.go",
    "content": "package filecoin\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"crypto/ecdsa\"\n\t\"fmt\"\n\n\tethcrypto \"github.com/ethereum/go-ethereum/crypto\"\n\tfiladdress \"github.com/filecoin-project/go-address\"\n\t\"github.com/filecoin-project/go-state-types/abi\"\n\t\"github.com/filecoin-project/go-state-types/big\"\n\t\"github.com/filecoin-project/go-state-types/crypto\"\n\t\"github.com/filecoin-project/lotus/chain/types\"\n\t\"github.com/minio/blake2b-simd\"\n\t\"github.com/renproject/id\"\n\t\"github.com/renproject/multichain/api/account\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/multichain/api/contract\"\n\t\"github.com/renproject/pack\"\n)\n\n// TxBuilder represents a transaction builder that builds transactions to be\n// broadcasted to the filecoin network. The TxBuilder is configured using a\n// gas price and gas limit.\ntype TxBuilder struct {\n}\n\n// NewTxBuilder creates a new transaction builder.\nfunc NewTxBuilder() TxBuilder {\n\treturn TxBuilder{}\n}\n\n// BuildTx receives transaction fields and constructs a new transaction.\nfunc (txBuilder TxBuilder) BuildTx(ctx context.Context, fromPubKey *id.PubKey, to address.Address, value, nonce, gasLimit, gasPrice, gasCap pack.U256, payload pack.Bytes) (account.Tx, error) {\n\tpubKeyUncompressed := ethcrypto.FromECDSAPub((*ecdsa.PublicKey)(fromPubKey))\n\tfilfrom, err := filaddress.NewSecp256k1Address(pubKeyUncompressed)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"bad from pubkey: %v\", err)\n\t}\n\tfilto, err := filaddress.NewFromString(string(to))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"bad to address '%v': %v\", to, err)\n\t}\n\tmethodNum := abi.MethodNum(0)\n\treturn &Tx{\n\t\tmsg: types.Message{\n\t\t\tVersion:    types.MessageVersion,\n\t\t\tFrom:       filfrom,\n\t\t\tTo:         filto,\n\t\t\tValue:      big.Int{Int: value.Int()},\n\t\t\tNonce:      nonce.Int().Uint64(),\n\t\t\tGasFeeCap:  big.Int{Int: gasCap.Int()},\n\t\t\tGasLimit:   gasLimit.Int().Int64(),\n\t\t\tGasPremium: big.Int{Int: gasPrice.Int()},\n\t\t\tMethod:     methodNum,\n\t\t\tParams:     payload,\n\t\t},\n\t\tsignature: pack.Bytes65{},\n\t}, nil\n}\n\n// Tx represents a filecoin transaction, encapsulating a message and its\n// signature.\ntype Tx struct {\n\tmsg       types.Message\n\tsignature pack.Bytes65\n}\n\n// Hash returns the hash that uniquely identifies the transaction.\n// Generally, hashes are irreversible hash functions that consume the\n// content of the transaction.\nfunc (tx Tx) Hash() pack.Bytes {\n\tif !tx.signature.Equal(&pack.Bytes65{}) {\n\t\t// construct crypto.Signature\n\t\tsignature := crypto.Signature{\n\t\t\tType: crypto.SigTypeSecp256k1,\n\t\t\tData: tx.signature.Bytes(),\n\t\t}\n\t\t// construct types.SignedMessage\n\t\tsignedMessage := types.SignedMessage{\n\t\t\tMessage:   tx.msg,\n\t\t\tSignature: signature,\n\t\t}\n\t\treturn pack.NewBytes(signedMessage.Cid().Bytes())\n\t}\n\treturn pack.NewBytes(tx.msg.Cid().Bytes())\n}\n\n// From returns the address that is sending the transaction. Generally,\n// this is also the address that must sign the transaction.\nfunc (tx Tx) From() address.Address {\n\treturn address.Address(tx.msg.From.String())\n}\n\n// To returns the address that is receiving the transaction. This can be the\n// address of an external account, controlled by a private key, or it can be\n// the address of a contract.\nfunc (tx Tx) To() address.Address {\n\treturn address.Address(tx.msg.To.String())\n}\n\n// Value being sent from the sender to the receiver.\nfunc (tx Tx) Value() pack.U256 {\n\treturn pack.NewU256FromInt(tx.msg.Value.Int)\n}\n\n// Nonce returns the nonce used to order the transaction with respect to all\n// other transactions signed and submitted by the sender.\nfunc (tx Tx) Nonce() pack.U256 {\n\treturn pack.NewU256FromU64(pack.NewU64(tx.msg.Nonce))\n}\n\n// Payload returns arbitrary data that is associated with the transaction.\n// Generally, this payload is used to send notes between external accounts,\n// or invoke business logic on a contract.\nfunc (tx Tx) Payload() contract.CallData {\n\treturn contract.CallData(tx.msg.Params)\n}\n\n// Sighashes returns the digests that must be signed before the transaction\n// can be submitted by the client.\nfunc (tx Tx) Sighashes() ([]pack.Bytes32, error) {\n\treturn []pack.Bytes32{pack.Bytes32(blake2b.Sum256(tx.Hash()))}, nil\n}\n\n// Sign the transaction by injecting signatures for the required sighashes.\n// The serialized public key used to sign the sighashes must also be\n// specified.\nfunc (tx *Tx) Sign(signatures []pack.Bytes65, pubkey pack.Bytes) error {\n\tif len(signatures) != 1 {\n\t\treturn fmt.Errorf(\"expected 1 signature, got %v signatures\", len(signatures))\n\t}\n\ttx.signature = signatures[0]\n\treturn nil\n}\n\n// Serialize the transaction into bytes. Generally, this is the format in\n// which the transaction will be submitted by the client.\nfunc (tx Tx) Serialize() (pack.Bytes, error) {\n\tbuf := new(bytes.Buffer)\n\tif err := tx.msg.MarshalCBOR(buf); err != nil {\n\t\treturn nil, err\n\t}\n\treturn buf.Bytes(), nil\n}\n"
  },
  {
    "path": "chain/filecoin/account_test.go",
    "content": "package filecoin_test\n"
  },
  {
    "path": "chain/filecoin/address.go",
    "content": "package filecoin\n\nimport (\n\t\"fmt\"\n\n\tfiladdress \"github.com/filecoin-project/go-address\"\n\t\"github.com/renproject/multichain/api/address\"\n)\n\n// AddressEncodeDecoder implements the address.EncodeDecoder interface\ntype AddressEncodeDecoder struct {\n\tAddressEncoder\n\tAddressDecoder\n}\n\n// AddressEncoder implements the address.Encoder interface.\ntype AddressEncoder struct{}\n\n// AddressDecoder implements the address.Decoder interface.\ntype AddressDecoder struct{}\n\n// NewAddressEncodeDecoder constructs a new AddressEncodeDecoder.\nfunc NewAddressEncodeDecoder() AddressEncodeDecoder {\n\treturn AddressEncodeDecoder{\n\t\tAddressEncoder: AddressEncoder{},\n\t\tAddressDecoder: AddressDecoder{},\n\t}\n}\n\n// EncodeAddress implements the address.Encoder interface. It receives a raw\n// address and encodes it to a human-readable stringified address.\nfunc (encoder AddressEncoder) EncodeAddress(raw address.RawAddress) (address.Address, error) {\n\taddr, err := filaddress.NewFromBytes([]byte(raw))\n\tif err != nil {\n\t\treturn address.Address(\"\"), err\n\t}\n\tif addr == filaddress.Undef {\n\t\treturn address.Address(\"\"), fmt.Errorf(\"encoding address: undefined address=%v\", raw)\n\t}\n\treturn address.Address(addr.String()), nil\n}\n\n// DecodeAddress implements the address.Decoder interface. It receives a human\n// readable address and decodes it to an address represented by raw bytes.\nfunc (addrDecoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) {\n\trawAddr, err := filaddress.NewFromString(string(addr))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif rawAddr == filaddress.Undef {\n\t\treturn nil, fmt.Errorf(\"decoding address: undefined address=%v\", addr)\n\t}\n\treturn address.RawAddress(rawAddr.Bytes()), nil\n}\n"
  },
  {
    "path": "chain/filecoin/address_test.go",
    "content": "package filecoin_test\n\nimport (\n\t\"math/rand\"\n\t\"testing/quick\"\n\t\"time\"\n\n\tfiladdress \"github.com/filecoin-project/go-address\"\n\t\"github.com/multiformats/go-varint\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/multichain/chain/filecoin\"\n\t\"github.com/renproject/pack\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Address\", func() {\n\tr := rand.New(rand.NewSource(time.Now().UnixNano()))\n\n\tencoderDecoder := filecoin.NewAddressEncodeDecoder()\n\n\tContext(\"when encoding and decoding\", func() {\n\t\tContext(\"for ID protocol\", func() {\n\t\t\tIt(\"should behave correctly without errors\", func() {\n\t\t\t\tf := func() bool {\n\t\t\t\t\tx := varint.ToUvarint(uint64(r.Int63()))\n\t\t\t\t\tx = append([]byte{byte(filaddress.ID)}, x...)\n\n\t\t\t\t\trawAddr := address.RawAddress(pack.NewBytes(x[:]))\n\t\t\t\t\taddr, err := encoderDecoder.AddressEncoder.EncodeAddress(rawAddr)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tdecodedAddr, err := encoderDecoder.AddressDecoder.DecodeAddress(addr)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\tExpect(decodedAddr).To(Equal(rawAddr))\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t\tExpect(quick.Check(f, nil)).To(Succeed())\n\t\t\t})\n\t\t})\n\n\t\tContext(\"for Sepc protocol\", func() {\n\t\t\tIt(\"should behave correctly without errors\", func() {\n\t\t\t\tf := func(x [filaddress.PayloadHashLength]byte) bool {\n\t\t\t\t\ty := append([]byte{byte(filaddress.SECP256K1)}, x[:]...)\n\n\t\t\t\t\trawAddr := address.RawAddress(pack.NewBytes(y[:]))\n\t\t\t\t\taddr, err := encoderDecoder.AddressEncoder.EncodeAddress(rawAddr)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tdecodedAddr, err := encoderDecoder.AddressDecoder.DecodeAddress(addr)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\tExpect(decodedAddr).To(Equal(rawAddr))\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t\tExpect(quick.Check(f, nil)).To(Succeed())\n\t\t\t})\n\t\t})\n\n\t\tContext(\"for Actor protocol\", func() {\n\t\t\tIt(\"should behave correctly without errors\", func() {\n\t\t\t\tf := func(x [filaddress.PayloadHashLength]byte) bool {\n\t\t\t\t\ty := append([]byte{byte(filaddress.Actor)}, x[:]...)\n\n\t\t\t\t\trawAddr := address.RawAddress(pack.NewBytes(y[:]))\n\t\t\t\t\taddr, err := encoderDecoder.AddressEncoder.EncodeAddress(rawAddr)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tdecodedAddr, err := encoderDecoder.AddressDecoder.DecodeAddress(addr)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\tExpect(decodedAddr).To(Equal(rawAddr))\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t\tExpect(quick.Check(f, nil)).To(Succeed())\n\t\t\t})\n\t\t})\n\n\t\tContext(\"for BLS protocol\", func() {\n\t\t\tIt(\"should behave correctly without errors\", func() {\n\t\t\t\tf := func(x [filaddress.BlsPublicKeyBytes]byte) bool {\n\t\t\t\t\ty := append([]byte{byte(filaddress.BLS)}, x[:]...)\n\n\t\t\t\t\trawAddr := address.RawAddress(pack.NewBytes(y[:]))\n\t\t\t\t\taddr, err := encoderDecoder.AddressEncoder.EncodeAddress(rawAddr)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tdecodedAddr, err := encoderDecoder.AddressDecoder.DecodeAddress(addr)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\tExpect(decodedAddr).To(Equal(rawAddr))\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t\tExpect(quick.Check(f, nil)).To(Succeed())\n\t\t\t})\n\t\t})\n\t})\n\n\tContext(\"when encoding empty address\", func() {\n\t\tIt(\"should fail\", func() {\n\t\t\t_, err := encoderDecoder.EncodeAddress(address.RawAddress(pack.Bytes([]byte{})))\n\t\t\tExpect(err).To(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when decoding empty address\", func() {\n\t\tIt(\"should fail\", func() {\n\t\t\t_, err := encoderDecoder.DecodeAddress(address.Address(\"\"))\n\t\t\tExpect(err).To(HaveOccurred())\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/filecoin/client.go",
    "content": "package filecoin\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"net/http\"\n\n\tfiladdress \"github.com/filecoin-project/go-address\"\n\t\"github.com/filecoin-project/go-jsonrpc\"\n\t\"github.com/filecoin-project/go-state-types/crypto\"\n\tfilclient \"github.com/filecoin-project/lotus/api/client\"\n\t\"github.com/filecoin-project/lotus/api/v0api\"\n\t\"github.com/filecoin-project/lotus/chain/types\"\n\t\"github.com/filecoin-project/specs-actors/actors/builtin\"\n\t\"github.com/ipfs/go-cid\"\n\t\"github.com/renproject/multichain/api/account\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/pack\"\n)\n\nconst (\n\t// AuthorizationKey is the header key used for authorization\n\tAuthorizationKey = \"Authorization\"\n\n\t// DefaultClientRPCURL is the RPC URL used by default, to interact with the\n\t// filecoin lotus node.\n\tDefaultClientRPCURL = \"http://127.0.0.1:1234/rpc/v0\"\n\n\t// DefaultClientAuthToken is the auth token used to instantiate the lotus\n\t// client. A valid lotus auth token is required to write messages to the\n\t// filecoin storage. To do read-only queries, auth token is not required.\n\tDefaultClientAuthToken = \"\"\n)\n\n// ClientOptions are used to parameterise the behaviour of the Client.\ntype ClientOptions struct {\n\tRPCURL    string\n\tAuthToken string\n}\n\n// DefaultClientOptions returns ClientOptions with the default settings. These\n// settings are valid for use with the default local deployment of the\n// multichain. In production, the rpc-url and authentication token should be\n// changed.\nfunc DefaultClientOptions() ClientOptions {\n\treturn ClientOptions{\n\t\tRPCURL:    DefaultClientRPCURL,\n\t\tAuthToken: DefaultClientAuthToken,\n\t}\n}\n\n// WithRPCURL returns a modified version of the options with the given API\n// rpc-url\nfunc (opts ClientOptions) WithRPCURL(rpcURL pack.String) ClientOptions {\n\topts.RPCURL = string(rpcURL)\n\treturn opts\n}\n\n// WithAuthToken returns a modified version of the options with the given\n// authentication token.\nfunc (opts ClientOptions) WithAuthToken(authToken pack.String) ClientOptions {\n\topts.AuthToken = string(authToken)\n\treturn opts\n}\n\n// Client holds options to connect to a filecoin lotus node, and the underlying\n// RPC client instance.\ntype Client struct {\n\topts   ClientOptions\n\tnode   v0api.FullNode\n\tcloser jsonrpc.ClientCloser\n}\n\n// NewClient creates and returns a new JSON-RPC client to the Filecoin node\nfunc NewClient(opts ClientOptions) (*Client, error) {\n\trequestHeaders := make(http.Header)\n\tif opts.AuthToken != DefaultClientAuthToken {\n\t\trequestHeaders.Add(AuthorizationKey, opts.AuthToken)\n\t}\n\n\tnode, closer, err := filclient.NewFullNodeRPCV0(context.Background(), opts.RPCURL, requestHeaders)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &Client{opts, node, closer}, nil\n}\n\n// LatestBlock returns the block number at the current chain head.\nfunc (client *Client) LatestBlock(ctx context.Context) (pack.U64, error) {\n\theadTipset, err := client.node.ChainHead(ctx)\n\tif err != nil {\n\t\treturn pack.NewU64(0), fmt.Errorf(\"get chain head: %v\", err)\n\t}\n\tif headTipset.Height() < 0 {\n\t\treturn pack.NewU64(0), fmt.Errorf(\"unexpected chain head, expected > 0, got: %v\", headTipset.Height())\n\t}\n\n\treturn pack.NewU64(uint64(headTipset.Height())), nil\n}\n\n// Tx returns the transaction uniquely identified by the given transaction\n// hash. It also returns the number of confirmations for the transaction.\nfunc (client *Client) Tx(ctx context.Context, txID pack.Bytes) (account.Tx, pack.U64, error) {\n\t// parse the transaction ID to a message ID\n\tmsgID, err := cid.Parse([]byte(txID))\n\tif err != nil {\n\t\treturn nil, pack.NewU64(0), fmt.Errorf(\"parsing txid: %v\", err)\n\t}\n\n\t// lookup message receipt to get its height\n\tmessageLookup, err := client.node.StateSearchMsg(ctx, msgID)\n\tif err != nil {\n\t\treturn nil, pack.NewU64(0), fmt.Errorf(\"searching state for txid: %v\", err)\n\t}\n\tif messageLookup == nil {\n\t\treturn nil, pack.NewU64(0), fmt.Errorf(\"searching state for txid %v: not found\", msgID)\n\t}\n\tif messageLookup.Receipt.ExitCode.IsError() {\n\t\treturn nil, pack.NewU64(0), fmt.Errorf(\"executing transaction: %v\", messageLookup.Receipt.ExitCode.String())\n\t}\n\tif !messageLookup.Message.Equals(msgID) {\n\t\treturn nil, pack.U64(0), fmt.Errorf(\"searching state for txid: expected %v, got %v\", msgID, messageLookup.Message)\n\t}\n\n\t// get the most recent tipset and its height\n\tchainHead, err := client.LatestBlock(ctx)\n\tif err != nil {\n\t\treturn nil, pack.NewU64(0), err\n\t}\n\tconfs := uint64(chainHead) - uint64(messageLookup.Height) + 1\n\tif confs < 0 {\n\t\treturn nil, pack.NewU64(0), fmt.Errorf(\"get chain head: negative confirmations\")\n\t}\n\n\t// get the message\n\tmsg, err := client.node.ChainGetMessage(ctx, msgID)\n\tif err != nil {\n\t\treturn nil, pack.NewU64(0), fmt.Errorf(\"getting txid %v from chain: %v\", msgID, err)\n\t}\n\n\t// support `Send` method for now\n\tif msg.Method != builtin.MethodSend {\n\t\treturn nil, pack.NewU64(0), fmt.Errorf(\"unsupport tx method, expect `%v`, got `%v`\", builtin.MethodSend, msg.Method)\n\t}\n\n\treturn &Tx{msg: *msg}, pack.NewU64(confs), nil\n}\n\n// SubmitTx to the underlying blockchain network.\nfunc (client *Client) SubmitTx(ctx context.Context, tx account.Tx) error {\n\tswitch tx := tx.(type) {\n\tcase *Tx:\n\t\t// construct crypto.Signature\n\t\tsignature := crypto.Signature{\n\t\t\tType: crypto.SigTypeSecp256k1,\n\t\t\tData: tx.signature.Bytes(),\n\t\t}\n\n\t\t// construct types.SignedMessage\n\t\tsignedMessage := types.SignedMessage{\n\t\t\tMessage:   tx.msg,\n\t\t\tSignature: signature,\n\t\t}\n\n\t\t// submit transaction to mempool\n\t\tmsgID, err := client.node.MpoolPush(ctx, &signedMessage)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"pushing txid %v to mpool: %v\", msgID, err)\n\t\t}\n\t\treturn nil\n\tdefault:\n\t\treturn fmt.Errorf(\"expected type %T, got type %T\", new(Tx), tx)\n\t}\n}\n\n// AccountNonce returns the current nonce of the account. This is the nonce to\n// be used while building a new transaction.\nfunc (client *Client) AccountNonce(ctx context.Context, addr address.Address) (pack.U256, error) {\n\tfilAddr, err := filaddress.NewFromString(string(addr))\n\tif err != nil {\n\t\treturn pack.U256{}, fmt.Errorf(\"bad address '%v': %v\", addr, err)\n\t}\n\n\tactor, err := client.node.StateGetActor(ctx, filAddr, types.NewTipSetKey(cid.Undef))\n\tif err != nil {\n\t\treturn pack.U256{}, fmt.Errorf(\"searching state for addr %v: %v\", addr, err)\n\t}\n\n\treturn pack.NewU256FromU64(pack.NewU64(actor.Nonce)), nil\n}\n\n// AccountBalance returns the account balancee for a given address.\nfunc (client *Client) AccountBalance(ctx context.Context, addr address.Address) (pack.U256, error) {\n\tfilAddr, err := filaddress.NewFromString(string(addr))\n\tif err != nil {\n\t\treturn pack.U256{}, fmt.Errorf(\"bad address '%v': %v\", addr, err)\n\t}\n\n\tactor, err := client.node.StateGetActor(ctx, filAddr, types.NewTipSetKey(cid.Undef))\n\tif err != nil {\n\t\treturn pack.U256{}, fmt.Errorf(\"searching state for addr %v: %v\", addr, err)\n\t}\n\n\tbalance := actor.Balance.Int\n\n\t// If the balance exceeds `MaxU256`, return an error.\n\tif pack.MaxU256.Int().Cmp(balance) == -1 {\n\t\treturn pack.U256{}, fmt.Errorf(\"balance %v for %v exceeds MaxU256\", balance.String(), addr)\n\t}\n\n\treturn pack.NewU256FromInt(balance), nil\n}\n"
  },
  {
    "path": "chain/filecoin/client_test.go",
    "content": "package filecoin_test\n"
  },
  {
    "path": "chain/filecoin/filecoin.go",
    "content": "package filecoin\n"
  },
  {
    "path": "chain/filecoin/filecoin_suite_test.go",
    "content": "package filecoin_test\n\nimport (\n\t\"testing\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nfunc TestFilecoin(t *testing.T) {\n\tRegisterFailHandler(Fail)\n\tRunSpecs(t, \"Filecoin Suite\")\n}\n"
  },
  {
    "path": "chain/filecoin/filecoin_test.go",
    "content": "package filecoin_test\n\nimport (\n\t\"context\"\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"os\"\n\t\"time\"\n\n\tfiladdress \"github.com/filecoin-project/go-address\"\n\tfiltypes \"github.com/filecoin-project/lotus/chain/types\"\n\t\"github.com/ipfs/go-cid\"\n\t\"github.com/renproject/id\"\n\t\"github.com/renproject/multichain\"\n\t\"github.com/renproject/multichain/chain/filecoin\"\n\t\"github.com/renproject/pack\"\n\t\"github.com/renproject/surge\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Filecoin\", func() {\n\tContext(\"when broadcasting a tx\", func() {\n\t\tIt(\"should work\", func() {\n\t\t\t// create context for the test\n\t\t\tctx, cancel := context.WithCancel(context.Background())\n\t\t\tdefer cancel()\n\n\t\t\t// instantiate the client\n\t\t\tclient, err := filecoin.NewClient(\n\t\t\t\tfilecoin.DefaultClientOptions().\n\t\t\t\t\tWithAuthToken(fetchAuthToken()),\n\t\t\t)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t// read the private key that we will send transactions from\n\t\t\tsenderPrivKeyStr := os.Getenv(\"FILECOIN_PK\")\n\t\t\tif senderPrivKeyStr == \"\" {\n\t\t\t\tpanic(\"FILECOIN_PK is undefined\")\n\t\t\t}\n\t\t\tvar ki filtypes.KeyInfo\n\t\t\tdata, err := hex.DecodeString(senderPrivKeyStr)\n\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\terr = json.Unmarshal(data, &ki)\n\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\tsenderPrivKey := id.PrivKey{}\n\t\t\terr = surge.FromBinary(&senderPrivKey, ki.PrivateKey)\n\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t// read sender's address into the filecoin-compatible format\n\t\t\tsenderAddr := os.Getenv(\"FILECOIN_ADDRESS\")\n\t\t\tif senderAddr == \"\" {\n\t\t\t\tpanic(\"FILECOIN_ADDRESS is undefined\")\n\t\t\t}\n\t\t\tsenderFilAddr, err := filaddress.NewFromString(string(senderAddr))\n\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t// random recipient\n\t\t\trecipientPK := id.NewPrivKey()\n\t\t\trecipientPubKey := recipientPK.PubKey()\n\t\t\trecipientPubKeyCompressed, err := surge.ToBinary(recipientPubKey)\n\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\trecipientFilAddr, err := filaddress.NewSecp256k1Address(recipientPubKeyCompressed)\n\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t// get good gas estimates\n\t\t\tgasLimit := uint64(2200000)\n\t\t\tgasEstimator := filecoin.NewGasEstimator(client, int64(gasLimit))\n\t\t\tgasPremium, gasFeeCap, err := gasEstimator.EstimateGas(ctx)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t// construct the transaction builder\n\t\t\tfilTxBuilder := filecoin.NewTxBuilder()\n\n\t\t\t// build the transaction\n\t\t\tsender := multichain.Address(pack.String(senderFilAddr.String()))\n\t\t\tamount := pack.NewU256FromU64(pack.NewU64(100000000))\n\t\t\tnonce, err := client.AccountNonce(ctx, sender)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\ttx, err := filTxBuilder.BuildTx(\n\t\t\t\tctx,\n\t\t\t\tsenderPrivKey.PubKey(),\n\t\t\t\tmultichain.Address(pack.String(recipientFilAddr.String())),\n\t\t\t\tamount, // amount\n\t\t\t\tnonce,  // nonce\n\t\t\t\tpack.NewU256FromU64(pack.NewU64(gasLimit)), // gasLimit\n\t\t\t\tgasPremium,\n\t\t\t\tgasFeeCap,\n\t\t\t\tpack.Bytes(nil), // payload\n\t\t\t)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t// Sign the filecoin-side lock transaction\n\t\t\ttxSighashes, err := tx.Sighashes()\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\tExpect(len(txSighashes)).To(Equal(1))\n\t\t\tExpect(len(txSighashes[0])).To(Equal(32))\n\t\t\tsighash32 := txSighashes[0]\n\t\t\thash := id.Hash(sighash32)\n\t\t\tsig, err := senderPrivKey.Sign(&hash)\n\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\tsigBytes, err := surge.ToBinary(sig)\n\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\ttxSignature := pack.Bytes65{}\n\t\t\tcopy(txSignature[:], sigBytes)\n\t\t\tExpect(tx.Sign([]pack.Bytes65{txSignature}, []byte{})).To(Succeed())\n\n\t\t\t// submit the transaction\n\t\t\ttxHash := tx.Hash()\n\t\t\ttxID, err := cid.Parse([]byte(txHash))\n\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\tfmt.Printf(\"msgID = %v\\n\", txID)\n\t\t\terr = client.SubmitTx(ctx, tx)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t// Wait slightly before we query the chain's node.\n\t\t\ttime.Sleep(time.Second)\n\n\t\t\t// wait for the transaction to be included in a block\n\t\t\tfor {\n\t\t\t\t// Loop until the transaction has at least a few confirmations.\n\t\t\t\ttx, confs, err := client.Tx(ctx, txHash)\n\t\t\t\tif err == nil {\n\t\t\t\t\tExpect(confs.Uint64()).To(BeNumerically(\">\", 0))\n\t\t\t\t\tExpect(tx.From()).To(Equal(sender))\n\t\t\t\t\tExpect(tx.Value()).To(Equal(amount))\n\t\t\t\t\tbreak\n\t\t\t\t}\n\n\t\t\t\t// wait and retry querying for the transaction\n\t\t\t\ttime.Sleep(5 * time.Second)\n\t\t\t}\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/filecoin/gas.go",
    "content": "package filecoin\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"math/big\"\n\n\tfiladdress \"github.com/filecoin-project/go-address\"\n\t\"github.com/filecoin-project/go-state-types/abi\"\n\t\"github.com/filecoin-project/lotus/chain/types\"\n\t\"github.com/renproject/pack\"\n)\n\n// A GasEstimator returns the gas fee cap and gas premium that is needed in\n// order to confirm transactions with an estimated maximum delay of one block.\n// In distributed networks that collectively build, sign, and submit\n// transactions, it is important that all nodes in the network have reached\n// consensus on these values.\ntype GasEstimator struct {\n\tclient   *Client\n\tgasLimit int64\n}\n\n// NewGasEstimator returns a simple gas estimator that fetches the ideal gas\n// fee cap and gas premium for a filecoin transaction to be included in a block\n// with minimal delay.\nfunc NewGasEstimator(client *Client, gasLimit int64) *GasEstimator {\n\treturn &GasEstimator{\n\t\tclient:   client,\n\t\tgasLimit: gasLimit,\n\t}\n}\n\n// EstimateGas returns an estimate of the current gas price (also known as gas\n// premium) and gas cap. These numbers change with congestion. These estimates\n// are often a little bit off, and this should be considered when using them.\nfunc (gasEstimator *GasEstimator) EstimateGas(ctx context.Context) (pack.U256, pack.U256, error) {\n\t// Create a dummy \"Send\" message.\n\tmsgIn := types.Message{\n\t\tVersion:    types.MessageVersion,\n\t\tFrom:       filaddress.TestAddress,\n\t\tTo:         filaddress.TestAddress2,\n\t\tValue:      types.EmptyInt,\n\t\tNonce:      0,\n\t\tGasLimit:   gasEstimator.gasLimit,\n\t\tGasFeeCap:  types.EmptyInt,\n\t\tGasPremium: types.EmptyInt,\n\t\tMethod:     abi.MethodNum(0),\n\t\tParams:     []byte{},\n\t}\n\n\t// Estimate the gas fee cap and gas premium fields for this dummy message.\n\tmsgOut, err := gasEstimator.client.node.GasEstimateMessageGas(ctx, &msgIn, nil, types.EmptyTSK)\n\tif err != nil {\n\t\treturn pack.NewU256([32]byte{}), pack.NewU256([32]byte{}), fmt.Errorf(\"estimating gas price: %v\", err)\n\t}\n\n\tgasFeeCapBytes, err := msgOut.GasFeeCap.Bytes()\n\tif err != nil {\n\t\treturn pack.NewU256([32]byte{}), pack.NewU256([32]byte{}), fmt.Errorf(\"getting abi/big bytes for %v: %v\", msgOut.GasFeeCap, err)\n\t}\n\tgasPremiumBytes, err := msgOut.GasPremium.Bytes()\n\tif err != nil {\n\t\treturn pack.NewU256([32]byte{}), pack.NewU256([32]byte{}), fmt.Errorf(\"getting abi/big bytes for %v: %v\", msgOut.GasPremium, err)\n\t}\n\tgasFeeCap := big.NewInt(0).SetBytes(gasFeeCapBytes)\n\tgasPremium := big.NewInt(0).SetBytes(gasPremiumBytes)\n\n\treturn pack.NewU256FromInt(gasPremium), pack.NewU256FromInt(gasFeeCap), nil\n}\n"
  },
  {
    "path": "chain/filecoin/gas_test.go",
    "content": "package filecoin_test\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"os/exec\"\n\t\"strings\"\n\n\t\"github.com/renproject/multichain/chain/filecoin\"\n\t\"github.com/renproject/pack\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Gas\", func() {\n\tContext(\"when estimating gas parameters\", func() {\n\t\tIt(\"should work\", func() {\n\t\t\t// create context for the test\n\t\t\tctx, cancel := context.WithCancel(context.Background())\n\t\t\tdefer cancel()\n\n\t\t\t// instantiate the client\n\t\t\tclient, err := filecoin.NewClient(\n\t\t\t\tfilecoin.DefaultClientOptions().\n\t\t\t\t\tWithAuthToken(fetchAuthToken()),\n\t\t\t)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t// instantiate the gas estimator\n\t\t\tgasEstimator := filecoin.NewGasEstimator(client, 2000000)\n\n\t\t\t// estimate gas price\n\t\t\t_, _, err = gasEstimator.EstimateGas(ctx)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n})\n\nfunc fetchAuthToken() pack.String {\n\t// fetch the auth token from filecoin's running docker container\n\tcmd := exec.Command(\"docker\", \"exec\", \"infra_filecoin_1\", \"/bin/bash\", \"-c\", \"/app/lotus auth api-info --perm admin\")\n\tvar out bytes.Buffer\n\tvar stderr bytes.Buffer\n\tcmd.Stdout = &out\n\tcmd.Stderr = &stderr\n\terr := cmd.Run()\n\tif err != nil {\n\t\tfmt.Println(fmt.Sprint(err) + \": \" + stderr.String())\n\t\tpanic(fmt.Sprintf(\"could not run command: %v\", err))\n\t}\n\ttokenWithSuffix := strings.TrimPrefix(out.String(), \"FULLNODE_API_INFO=\")\n\tauthToken := strings.Split(tokenWithSuffix, \":/\")\n\treturn pack.NewString(fmt.Sprintf(\"Bearer %s\", authToken[0]))\n}\n"
  },
  {
    "path": "chain/kava/address.go",
    "content": "package kava\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\ntype (\n\t// AddressEncodeDecoder re-exports evm.AddressEncodeDecoder.\n\tAddressEncodeDecoder = evm.AddressEncodeDecoder\n\n\t// AddressEncoder re-exports evm.AddressEncoder.\n\tAddressEncoder = evm.AddressEncoder\n\n\t// AddressDecoder re-exports evm.AddressDecoder.\n\tAddressDecoder = evm.AddressDecoder\n\n\t// Address re-exports evm.Address.\n\tAddress = evm.Address\n)\n\nvar (\n\t// NewAddressEncodeDecoder re-exports evm.NewAddressEncodeDecoder.\n\tNewAddressEncodeDecoder = evm.NewAddressEncodeDecoder\n\n\t// NewAddressDecoder re-exports evm.NewAddressDecoder.\n\tNewAddressDecoder = evm.NewAddressDecoder\n\n\t// NewAddressEncoder re-exports evm.NewAddressEncoder.\n\tNewAddressEncoder = evm.NewAddressEncoder\n\n\t// NewAddressFromHex re-exports evm.NewAddressFromHex.\n\tNewAddressFromHex = evm.NewAddressFromHex\n)\n"
  },
  {
    "path": "chain/kava/address_test.go",
    "content": "package kava_test\n\nimport (\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"testing/quick\"\n\n\t\"github.com/renproject/multichain/chain/kava\"\n\t\"github.com/renproject/surge\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Address\", func() {\n\tContext(\"when unmarshaling and unmarshaling\", func() {\n\t\tIt(\"should equal itself\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\taddr := kava.Address(x)\n\t\t\t\tExpect(addr.SizeHint()).To(Equal(20))\n\n\t\t\t\tbytes, err := surge.ToBinary(addr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tvar newAddr kava.Address\n\t\t\t\terr = surge.FromBinary(&newAddr, bytes)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tExpect(addr).To(Equal(newAddr))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when unmarshaling and unmarshaling to/from JSON\", func() {\n\t\tIt(\"should equal itself\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\taddr := kava.Address(x)\n\n\t\t\t\tbytes, err := json.Marshal(addr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tvar newAddr kava.Address\n\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tExpect(addr).To(Equal(newAddr))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\n\t\tContext(\"when the address is invalid hex\", func() {\n\t\t\tIt(\"should return an error\", func() {\n\t\t\t\tf := func(x [40]byte) bool {\n\t\t\t\t\tbytes, err := json.Marshal(string(x[:]))\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tvar newAddr kava.Address\n\t\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\terr := quick.Check(f, nil)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t})\n\t\t})\n\n\t\tContext(\"when the address is invalid length\", func() {\n\t\t\tIt(\"should return an error\", func() {\n\t\t\t\tf := func(x [10]byte) bool {\n\t\t\t\t\taddr := hex.EncodeToString(x[:])\n\t\t\t\t\tbytes, err := json.Marshal(addr)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tvar newAddr kava.Address\n\t\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\terr := quick.Check(f, nil)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t})\n\t\t})\n\t})\n\n\tContext(\"when unmarshalling random data\", func() {\n\t\tIt(\"should not panic\", func() {\n\t\t\tf := func(x []byte) bool {\n\t\t\t\tvar addr kava.Address\n\t\t\t\tExpect(func() { addr.Unmarshal(x, surge.MaxBytes) }).ToNot(Panic())\n\t\t\t\tExpect(func() { json.Unmarshal(x, &addr) }).ToNot(Panic())\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/kava/client.go",
    "content": "package kava\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\nconst (\n\t// DefaultClientRPCURL is the RPC URL used by default, to interact with the\n\t// bsc node.\n\tDefaultClientRPCURL = \"http://127.0.0.1:8575/\"\n)\n\n// Client re-exports evm.Client.\ntype Client = evm.Client\n\n// NewClient re-exports evm.NewClient.\nvar NewClient = evm.NewClient\n"
  },
  {
    "path": "chain/kava/encode.go",
    "content": "package kava\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\n// Payload re-exports evm.Payload.\ntype Payload = evm.Payload\n\n// Encode re-exports evm.Encode.\nvar Encode = evm.Encode\n"
  },
  {
    "path": "chain/kava/encode_test.go",
    "content": "package kava_test\n\nimport (\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"math\"\n\t\"testing/quick\"\n\n\t\"github.com/renproject/multichain/chain/kava\"\n\t\"github.com/renproject/pack\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/ginkgo/extensions/table\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Encoding\", func() {\n\tContext(\"when encoding bytes\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x []byte) bool {\n\t\t\t\targ := pack.NewBytes(x)\n\n\t\t\t\tresBytes := kava.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\n\t\t\t\texpectedBytes := make([]byte, int(math.Ceil(float64(len(x))/32)*32))\n\t\t\t\tcopy(expectedBytes, x)\n\t\t\t\t// Note: since the first parameter has a dynamic length, the\n\t\t\t\t// first 32 bytes instead contain a pointer to the data.\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", 32) + fmt.Sprintf(\"%064x\", len(x)) + hex.EncodeToString(expectedBytes)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 32 bytes\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [32]byte) bool {\n\t\t\t\targ := pack.NewBytes32(x)\n\n\t\t\t\tresBytes := kava.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := hex.EncodeToString(x[:])\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 8-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint8) bool {\n\t\t\t\targ := pack.NewU8(x)\n\n\t\t\t\tresBytes := kava.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 16-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint16) bool {\n\t\t\t\targ := pack.NewU16(x)\n\n\t\t\t\tresBytes := kava.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 32-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint32) bool {\n\t\t\t\targ := pack.NewU32(x)\n\n\t\t\t\tresBytes := kava.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 64-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint64) bool {\n\t\t\t\targ := pack.NewU64(x)\n\n\t\t\t\tresBytes := kava.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 128-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [16]byte) bool {\n\t\t\t\targ := pack.NewU128(x)\n\n\t\t\t\tresBytes := kava.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 256-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [32]byte) bool {\n\t\t\t\targ := pack.NewU256(x)\n\n\t\t\t\tresBytes := kava.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding Ethereum addresses\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\targ := kava.Address(x)\n\n\t\t\t\tresBytes := kava.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\n\t\t\t\texpectedBytes := make([]byte, 32)\n\t\t\t\tcopy(expectedBytes, x[:])\n\t\t\t\texpectedString := hex.EncodeToString(expectedBytes)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding an unsupported type\", func() {\n\t\tIt(\"should panic\", func() {\n\t\t\tf := func(x bool) bool {\n\t\t\t\targ := pack.NewBool(x)\n\t\t\t\tExpect(func() { kava.Encode(arg) }).To(Panic())\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\ttype testCase struct {\n\t\taddr   string\n\t\tamount uint64\n\t\thash   string\n\t\tresult string\n\t}\n\n\ttestCases := []testCase{\n\t\t{\n\t\t\taddr:   \"797522Fb74d42bB9fbF6b76dEa24D01A538d5D66\",\n\t\t\tamount: 10000,\n\t\t\thash:   \"702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed\",\n\t\t\tresult: \"797522fb74d42bb9fbf6b76dea24d01a538d5d660000000000000000000000000000000000000000000000000000000000000000000000000000000000002710702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed\",\n\t\t},\n\t\t{\n\t\t\taddr:   \"58afb504ef2444a267b8c7ce57279417f1377ceb\",\n\t\t\tamount: 50000000000000000,\n\t\t\thash:   \"dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93\",\n\t\t\tresult: \"58afb504ef2444a267b8c7ce57279417f1377ceb00000000000000000000000000000000000000000000000000000000000000000000000000b1a2bc2ec50000dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93\",\n\t\t},\n\t\t{\n\t\t\taddr:   \"0000000000000000000000000000000000000000\",\n\t\t\tamount: 0,\n\t\t\thash:   \"0000000000000000000000000000000000000000000000000000000000000000\",\n\t\t\tresult: \"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n\t\t},\n\t}\n\n\tDescribeTable(\"when encoding args\",\n\t\tfunc(test testCase) {\n\t\t\taddrBytes, err := hex.DecodeString(test.addr)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\tvar addr kava.Address\n\t\t\tcopy(addr[:], addrBytes)\n\n\t\t\thashBytes32 := [32]byte{}\n\t\t\thashBytes, err := hex.DecodeString(test.hash)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\tcopy(hashBytes32[:], hashBytes)\n\n\t\t\targs := []interface{}{\n\t\t\t\taddr,\n\t\t\t\tpack.NewU64(test.amount),\n\t\t\t\tpack.NewBytes32(hashBytes32),\n\t\t\t}\n\t\t\tresult := kava.Encode(args...)\n\t\t\tExpect(hex.EncodeToString(result)).To(Equal(test.result))\n\t\t},\n\n\t\tEntry(\"should return the same result as solidity for small transactions\", testCases[0]),\n\t\tEntry(\"should return the same result as solidity for large transactions\", testCases[1]),\n\t\tEntry(\"should return the same result as solidity for empty transactions\", testCases[2]),\n\t)\n})\n"
  },
  {
    "path": "chain/kava/gas.go",
    "content": "package kava\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\n// GasEstimator re-exports evm.GasEstimator.\ntype GasEstimator = evm.GasEstimator\n\n// NewGasEstimator re-exports evm.NewGasEstimator.\nvar NewGasEstimator = evm.NewGasEstimator\n"
  },
  {
    "path": "chain/kava/tx.go",
    "content": "package kava\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\ntype (\n\t// TxBuilder re-exports evm.TxBuilder.\n\tTxBuilder = evm.TxBuilder\n\n\t// Tx re-exports evm.Tx.\n\tTx = evm.Tx\n)\n\n// NewTxBuilder re-exports evm.NewTxBuilder.\nvar NewTxBuilder = evm.NewTxBuilder\n"
  },
  {
    "path": "chain/moonbeam/address.go",
    "content": "package moonbeam\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\ntype (\n\t// AddressEncodeDecoder re-exports evm.AddressEncodeDecoder.\n\tAddressEncodeDecoder = evm.AddressEncodeDecoder\n\n\t// AddressEncoder re-exports evm.AddressEncoder.\n\tAddressEncoder = evm.AddressEncoder\n\n\t// AddressDecoder re-exports evm.AddressDecoder.\n\tAddressDecoder = evm.AddressDecoder\n\n\t// Address re-exports evm.Address.\n\tAddress = evm.Address\n)\n\nvar (\n\t// NewAddressEncodeDecoder re-exports evm.NewAddressEncodeDecoder.\n\tNewAddressEncodeDecoder = evm.NewAddressEncodeDecoder\n\n\t// NewAddressDecoder re-exports evm.NewAddressDecoder.\n\tNewAddressDecoder = evm.NewAddressDecoder\n\n\t// NewAddressEncoder re-exports evm.NewAddressEncoder.\n\tNewAddressEncoder = evm.NewAddressEncoder\n\n\t// NewAddressFromHex re-exports evm.NewAddressFromHex.\n\tNewAddressFromHex = evm.NewAddressFromHex\n)\n"
  },
  {
    "path": "chain/moonbeam/address_test.go",
    "content": "package moonbeam_test\n\nimport (\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"testing/quick\"\n\n\t\"github.com/renproject/multichain/chain/moonbeam\"\n\t\"github.com/renproject/surge\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Address\", func() {\n\tContext(\"when unmarshaling and unmarshaling\", func() {\n\t\tIt(\"should equal itself\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\taddr := moonbeam.Address(x)\n\t\t\t\tExpect(addr.SizeHint()).To(Equal(20))\n\n\t\t\t\tbytes, err := surge.ToBinary(addr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tvar newAddr moonbeam.Address\n\t\t\t\terr = surge.FromBinary(&newAddr, bytes)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tExpect(addr).To(Equal(newAddr))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when unmarshaling and unmarshaling to/from JSON\", func() {\n\t\tIt(\"should equal itself\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\taddr := moonbeam.Address(x)\n\n\t\t\t\tbytes, err := json.Marshal(addr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tvar newAddr moonbeam.Address\n\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tExpect(addr).To(Equal(newAddr))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\n\t\tContext(\"when the address is invalid hex\", func() {\n\t\t\tIt(\"should return an error\", func() {\n\t\t\t\tf := func(x [40]byte) bool {\n\t\t\t\t\tbytes, err := json.Marshal(string(x[:]))\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tvar newAddr moonbeam.Address\n\t\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\terr := quick.Check(f, nil)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t})\n\t\t})\n\n\t\tContext(\"when the address is invalid length\", func() {\n\t\t\tIt(\"should return an error\", func() {\n\t\t\t\tf := func(x [10]byte) bool {\n\t\t\t\t\taddr := hex.EncodeToString(x[:])\n\t\t\t\t\tbytes, err := json.Marshal(addr)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tvar newAddr moonbeam.Address\n\t\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\terr := quick.Check(f, nil)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t})\n\t\t})\n\t})\n\n\tContext(\"when unmarshalling random data\", func() {\n\t\tIt(\"should not panic\", func() {\n\t\t\tf := func(x []byte) bool {\n\t\t\t\tvar addr moonbeam.Address\n\t\t\t\tExpect(func() { addr.Unmarshal(x, surge.MaxBytes) }).ToNot(Panic())\n\t\t\t\tExpect(func() { json.Unmarshal(x, &addr) }).ToNot(Panic())\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/moonbeam/client.go",
    "content": "package moonbeam\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\nconst (\n\t// DefaultClientRPCURL is the RPC URL used by default, to interact with the\n\t// bsc node.\n\tDefaultClientRPCURL = \"http://127.0.0.1:8575/\"\n)\n\n// Client re-exports evm.Client.\ntype Client = evm.Client\n\n// NewClient re-exports evm.NewClient.\nvar NewClient = evm.NewClient\n"
  },
  {
    "path": "chain/moonbeam/encode.go",
    "content": "package moonbeam\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\n// Payload re-exports evm.Payload.\ntype Payload = evm.Payload\n\n// Encode re-exports evm.Encode.\nvar Encode = evm.Encode\n"
  },
  {
    "path": "chain/moonbeam/encode_test.go",
    "content": "package moonbeam_test\n\nimport (\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"math\"\n\t\"testing/quick\"\n\n\t\"github.com/renproject/multichain/chain/moonbeam\"\n\t\"github.com/renproject/pack\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/ginkgo/extensions/table\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Encoding\", func() {\n\tContext(\"when encoding bytes\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x []byte) bool {\n\t\t\t\targ := pack.NewBytes(x)\n\n\t\t\t\tresBytes := moonbeam.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\n\t\t\t\texpectedBytes := make([]byte, int(math.Ceil(float64(len(x))/32)*32))\n\t\t\t\tcopy(expectedBytes, x)\n\t\t\t\t// Note: since the first parameter has a dynamic length, the\n\t\t\t\t// first 32 bytes instead contain a pointer to the data.\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", 32) + fmt.Sprintf(\"%064x\", len(x)) + hex.EncodeToString(expectedBytes)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 32 bytes\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [32]byte) bool {\n\t\t\t\targ := pack.NewBytes32(x)\n\n\t\t\t\tresBytes := moonbeam.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := hex.EncodeToString(x[:])\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 8-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint8) bool {\n\t\t\t\targ := pack.NewU8(x)\n\n\t\t\t\tresBytes := moonbeam.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 16-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint16) bool {\n\t\t\t\targ := pack.NewU16(x)\n\n\t\t\t\tresBytes := moonbeam.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 32-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint32) bool {\n\t\t\t\targ := pack.NewU32(x)\n\n\t\t\t\tresBytes := moonbeam.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 64-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint64) bool {\n\t\t\t\targ := pack.NewU64(x)\n\n\t\t\t\tresBytes := moonbeam.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 128-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [16]byte) bool {\n\t\t\t\targ := pack.NewU128(x)\n\n\t\t\t\tresBytes := moonbeam.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 256-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [32]byte) bool {\n\t\t\t\targ := pack.NewU256(x)\n\n\t\t\t\tresBytes := moonbeam.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding Ethereum addresses\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\targ := moonbeam.Address(x)\n\n\t\t\t\tresBytes := moonbeam.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\n\t\t\t\texpectedBytes := make([]byte, 32)\n\t\t\t\tcopy(expectedBytes, x[:])\n\t\t\t\texpectedString := hex.EncodeToString(expectedBytes)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding an unsupported type\", func() {\n\t\tIt(\"should panic\", func() {\n\t\t\tf := func(x bool) bool {\n\t\t\t\targ := pack.NewBool(x)\n\t\t\t\tExpect(func() { moonbeam.Encode(arg) }).To(Panic())\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\ttype testCase struct {\n\t\taddr   string\n\t\tamount uint64\n\t\thash   string\n\t\tresult string\n\t}\n\n\ttestCases := []testCase{\n\t\t{\n\t\t\taddr:   \"797522Fb74d42bB9fbF6b76dEa24D01A538d5D66\",\n\t\t\tamount: 10000,\n\t\t\thash:   \"702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed\",\n\t\t\tresult: \"797522fb74d42bb9fbf6b76dea24d01a538d5d660000000000000000000000000000000000000000000000000000000000000000000000000000000000002710702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed\",\n\t\t},\n\t\t{\n\t\t\taddr:   \"58afb504ef2444a267b8c7ce57279417f1377ceb\",\n\t\t\tamount: 50000000000000000,\n\t\t\thash:   \"dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93\",\n\t\t\tresult: \"58afb504ef2444a267b8c7ce57279417f1377ceb00000000000000000000000000000000000000000000000000000000000000000000000000b1a2bc2ec50000dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93\",\n\t\t},\n\t\t{\n\t\t\taddr:   \"0000000000000000000000000000000000000000\",\n\t\t\tamount: 0,\n\t\t\thash:   \"0000000000000000000000000000000000000000000000000000000000000000\",\n\t\t\tresult: \"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n\t\t},\n\t}\n\n\tDescribeTable(\"when encoding args\",\n\t\tfunc(test testCase) {\n\t\t\taddrBytes, err := hex.DecodeString(test.addr)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\tvar addr moonbeam.Address\n\t\t\tcopy(addr[:], addrBytes)\n\n\t\t\thashBytes32 := [32]byte{}\n\t\t\thashBytes, err := hex.DecodeString(test.hash)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\tcopy(hashBytes32[:], hashBytes)\n\n\t\t\targs := []interface{}{\n\t\t\t\taddr,\n\t\t\t\tpack.NewU64(test.amount),\n\t\t\t\tpack.NewBytes32(hashBytes32),\n\t\t\t}\n\t\t\tresult := moonbeam.Encode(args...)\n\t\t\tExpect(hex.EncodeToString(result)).To(Equal(test.result))\n\t\t},\n\n\t\tEntry(\"should return the same result as solidity for small transactions\", testCases[0]),\n\t\tEntry(\"should return the same result as solidity for large transactions\", testCases[1]),\n\t\tEntry(\"should return the same result as solidity for empty transactions\", testCases[2]),\n\t)\n})\n"
  },
  {
    "path": "chain/moonbeam/gas.go",
    "content": "package moonbeam\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\n// GasEstimator re-exports evm.GasEstimator.\ntype GasEstimator = evm.GasEstimator\n\n// NewGasEstimator re-exports evm.NewGasEstimator.\nvar NewGasEstimator = evm.NewGasEstimator\n"
  },
  {
    "path": "chain/moonbeam/tx.go",
    "content": "package moonbeam\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\ntype (\n\t// TxBuilder re-exports evm.TxBuilder.\n\tTxBuilder = evm.TxBuilder\n\n\t// Tx re-exports evm.Tx.\n\tTx = evm.Tx\n)\n\n// NewTxBuilder re-exports evm.NewTxBuilder.\nvar NewTxBuilder = evm.NewTxBuilder\n"
  },
  {
    "path": "chain/optimism/address.go",
    "content": "package optimism\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\ntype (\n\t// AddressEncodeDecoder re-exports evm.AddressEncodeDecoder.\n\tAddressEncodeDecoder = evm.AddressEncodeDecoder\n\n\t// AddressEncoder re-exports evm.AddressEncoder.\n\tAddressEncoder = evm.AddressEncoder\n\n\t// AddressDecoder re-exports evm.AddressDecoder.\n\tAddressDecoder = evm.AddressDecoder\n\n\t// Address re-exports evm.Address.\n\tAddress = evm.Address\n)\n\nvar (\n\t// NewAddressEncodeDecoder re-exports evm.NewAddressEncodeDecoder.\n\tNewAddressEncodeDecoder = evm.NewAddressEncodeDecoder\n\n\t// NewAddressDecoder re-exports evm.NewAddressDecoder.\n\tNewAddressDecoder = evm.NewAddressDecoder\n\n\t// NewAddressEncoder re-exports evm.NewAddressEncoder.\n\tNewAddressEncoder = evm.NewAddressEncoder\n\n\t// NewAddressFromHex re-exports evm.NewAddressFromHex.\n\tNewAddressFromHex = evm.NewAddressFromHex\n)\n"
  },
  {
    "path": "chain/optimism/address_test.go",
    "content": "package optimism_test\n\nimport (\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"testing/quick\"\n\n\t\"github.com/renproject/multichain/chain/kava\"\n\t\"github.com/renproject/surge\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Address\", func() {\n\tContext(\"when unmarshaling and unmarshaling\", func() {\n\t\tIt(\"should equal itself\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\taddr := kava.Address(x)\n\t\t\t\tExpect(addr.SizeHint()).To(Equal(20))\n\n\t\t\t\tbytes, err := surge.ToBinary(addr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tvar newAddr kava.Address\n\t\t\t\terr = surge.FromBinary(&newAddr, bytes)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tExpect(addr).To(Equal(newAddr))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when unmarshaling and unmarshaling to/from JSON\", func() {\n\t\tIt(\"should equal itself\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\taddr := kava.Address(x)\n\n\t\t\t\tbytes, err := json.Marshal(addr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tvar newAddr kava.Address\n\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tExpect(addr).To(Equal(newAddr))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\n\t\tContext(\"when the address is invalid hex\", func() {\n\t\t\tIt(\"should return an error\", func() {\n\t\t\t\tf := func(x [40]byte) bool {\n\t\t\t\t\tbytes, err := json.Marshal(string(x[:]))\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tvar newAddr kava.Address\n\t\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\terr := quick.Check(f, nil)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t})\n\t\t})\n\n\t\tContext(\"when the address is invalid length\", func() {\n\t\t\tIt(\"should return an error\", func() {\n\t\t\t\tf := func(x [10]byte) bool {\n\t\t\t\t\taddr := hex.EncodeToString(x[:])\n\t\t\t\t\tbytes, err := json.Marshal(addr)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tvar newAddr kava.Address\n\t\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\terr := quick.Check(f, nil)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t})\n\t\t})\n\t})\n\n\tContext(\"when unmarshalling random data\", func() {\n\t\tIt(\"should not panic\", func() {\n\t\t\tf := func(x []byte) bool {\n\t\t\t\tvar addr kava.Address\n\t\t\t\tExpect(func() { addr.Unmarshal(x, surge.MaxBytes) }).ToNot(Panic())\n\t\t\t\tExpect(func() { json.Unmarshal(x, &addr) }).ToNot(Panic())\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/optimism/client.go",
    "content": "package optimism\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\nconst (\n\t// DefaultClientRPCURL is the RPC URL used by default, to interact with the\n\t// bsc node.\n\tDefaultClientRPCURL = \"http://127.0.0.1:8575/\"\n)\n\n// Client re-exports evm.Client.\ntype Client = evm.Client\n\n// NewClient re-exports evm.NewClient.\nvar NewClient = evm.NewClient\n"
  },
  {
    "path": "chain/optimism/encode.go",
    "content": "package optimism\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\n// Payload re-exports evm.Payload.\ntype Payload = evm.Payload\n\n// Encode re-exports evm.Encode.\nvar Encode = evm.Encode\n"
  },
  {
    "path": "chain/optimism/encode_test.go",
    "content": "package optimism_test\n\nimport (\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"math\"\n\t\"testing/quick\"\n\n\t\"github.com/renproject/multichain/chain/kava\"\n\t\"github.com/renproject/pack\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/ginkgo/extensions/table\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Encoding\", func() {\n\tContext(\"when encoding bytes\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x []byte) bool {\n\t\t\t\targ := pack.NewBytes(x)\n\n\t\t\t\tresBytes := kava.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\n\t\t\t\texpectedBytes := make([]byte, int(math.Ceil(float64(len(x))/32)*32))\n\t\t\t\tcopy(expectedBytes, x)\n\t\t\t\t// Note: since the first parameter has a dynamic length, the\n\t\t\t\t// first 32 bytes instead contain a pointer to the data.\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", 32) + fmt.Sprintf(\"%064x\", len(x)) + hex.EncodeToString(expectedBytes)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 32 bytes\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [32]byte) bool {\n\t\t\t\targ := pack.NewBytes32(x)\n\n\t\t\t\tresBytes := kava.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := hex.EncodeToString(x[:])\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 8-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint8) bool {\n\t\t\t\targ := pack.NewU8(x)\n\n\t\t\t\tresBytes := kava.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 16-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint16) bool {\n\t\t\t\targ := pack.NewU16(x)\n\n\t\t\t\tresBytes := kava.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 32-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint32) bool {\n\t\t\t\targ := pack.NewU32(x)\n\n\t\t\t\tresBytes := kava.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 64-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint64) bool {\n\t\t\t\targ := pack.NewU64(x)\n\n\t\t\t\tresBytes := kava.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 128-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [16]byte) bool {\n\t\t\t\targ := pack.NewU128(x)\n\n\t\t\t\tresBytes := kava.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 256-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [32]byte) bool {\n\t\t\t\targ := pack.NewU256(x)\n\n\t\t\t\tresBytes := kava.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding Ethereum addresses\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\targ := kava.Address(x)\n\n\t\t\t\tresBytes := kava.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\n\t\t\t\texpectedBytes := make([]byte, 32)\n\t\t\t\tcopy(expectedBytes, x[:])\n\t\t\t\texpectedString := hex.EncodeToString(expectedBytes)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding an unsupported type\", func() {\n\t\tIt(\"should panic\", func() {\n\t\t\tf := func(x bool) bool {\n\t\t\t\targ := pack.NewBool(x)\n\t\t\t\tExpect(func() { kava.Encode(arg) }).To(Panic())\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\ttype testCase struct {\n\t\taddr   string\n\t\tamount uint64\n\t\thash   string\n\t\tresult string\n\t}\n\n\ttestCases := []testCase{\n\t\t{\n\t\t\taddr:   \"797522Fb74d42bB9fbF6b76dEa24D01A538d5D66\",\n\t\t\tamount: 10000,\n\t\t\thash:   \"702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed\",\n\t\t\tresult: \"797522fb74d42bb9fbf6b76dea24d01a538d5d660000000000000000000000000000000000000000000000000000000000000000000000000000000000002710702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed\",\n\t\t},\n\t\t{\n\t\t\taddr:   \"58afb504ef2444a267b8c7ce57279417f1377ceb\",\n\t\t\tamount: 50000000000000000,\n\t\t\thash:   \"dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93\",\n\t\t\tresult: \"58afb504ef2444a267b8c7ce57279417f1377ceb00000000000000000000000000000000000000000000000000000000000000000000000000b1a2bc2ec50000dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93\",\n\t\t},\n\t\t{\n\t\t\taddr:   \"0000000000000000000000000000000000000000\",\n\t\t\tamount: 0,\n\t\t\thash:   \"0000000000000000000000000000000000000000000000000000000000000000\",\n\t\t\tresult: \"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n\t\t},\n\t}\n\n\tDescribeTable(\"when encoding args\",\n\t\tfunc(test testCase) {\n\t\t\taddrBytes, err := hex.DecodeString(test.addr)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\tvar addr kava.Address\n\t\t\tcopy(addr[:], addrBytes)\n\n\t\t\thashBytes32 := [32]byte{}\n\t\t\thashBytes, err := hex.DecodeString(test.hash)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\tcopy(hashBytes32[:], hashBytes)\n\n\t\t\targs := []interface{}{\n\t\t\t\taddr,\n\t\t\t\tpack.NewU64(test.amount),\n\t\t\t\tpack.NewBytes32(hashBytes32),\n\t\t\t}\n\t\t\tresult := kava.Encode(args...)\n\t\t\tExpect(hex.EncodeToString(result)).To(Equal(test.result))\n\t\t},\n\n\t\tEntry(\"should return the same result as solidity for small transactions\", testCases[0]),\n\t\tEntry(\"should return the same result as solidity for large transactions\", testCases[1]),\n\t\tEntry(\"should return the same result as solidity for empty transactions\", testCases[2]),\n\t)\n})\n"
  },
  {
    "path": "chain/optimism/gas.go",
    "content": "package optimism\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\n// GasEstimator re-exports evm.GasEstimator.\ntype GasEstimator = evm.GasEstimator\n\n// NewGasEstimator re-exports evm.NewGasEstimator.\nvar NewGasEstimator = evm.NewGasEstimator\n"
  },
  {
    "path": "chain/optimism/tx.go",
    "content": "package optimism\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\ntype (\n\t// TxBuilder re-exports evm.TxBuilder.\n\tTxBuilder = evm.TxBuilder\n\n\t// Tx re-exports evm.Tx.\n\tTx = evm.Tx\n)\n\n// NewTxBuilder re-exports evm.NewTxBuilder.\nvar NewTxBuilder = evm.NewTxBuilder\n"
  },
  {
    "path": "chain/polygon/address.go",
    "content": "package polygon\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\ntype (\n\t// AddressEncodeDecoder re-exports evm.AddressEncodeDecoder.\n\tAddressEncodeDecoder = evm.AddressEncodeDecoder\n\n\t// AddressEncoder re-exports evm.AddressEncoder.\n\tAddressEncoder = evm.AddressEncoder\n\n\t// AddressDecoder re-exports evm.AddressDecoder.\n\tAddressDecoder = evm.AddressDecoder\n\n\t// Address re-exports evm.Address.\n\tAddress = evm.Address\n)\n\nvar (\n\t// NewAddressEncodeDecoder re-exports evm.NewAddressEncodeDecoder.\n\tNewAddressEncodeDecoder = evm.NewAddressEncodeDecoder\n\n\t// NewAddressDecoder re-exports evm.NewAddressDecoder.\n\tNewAddressDecoder = evm.NewAddressDecoder\n\n\t// NewAddressEncoder re-exports evm.NewAddressEncoder.\n\tNewAddressEncoder = evm.NewAddressEncoder\n\n\t// NewAddressFromHex re-exports evm.NewAddressFromHex.\n\tNewAddressFromHex = evm.NewAddressFromHex\n)\n"
  },
  {
    "path": "chain/polygon/address_test.go",
    "content": "package polygon_test\n\nimport (\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"testing/quick\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n\t\"github.com/renproject/multichain/chain/polygon\"\n\t\"github.com/renproject/surge\"\n)\n\nvar _ = Describe(\"Address\", func() {\n\tContext(\"when unmarshaling and unmarshaling\", func() {\n\t\tIt(\"should equal itself\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\taddr := polygon.Address(x)\n\t\t\t\tExpect(addr.SizeHint()).To(Equal(20))\n\n\t\t\t\tbytes, err := surge.ToBinary(addr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tvar newAddr polygon.Address\n\t\t\t\terr = surge.FromBinary(&newAddr, bytes)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tExpect(addr).To(Equal(newAddr))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when unmarshaling and unmarshaling to/from JSON\", func() {\n\t\tIt(\"should equal itself\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\taddr := polygon.Address(x)\n\n\t\t\t\tbytes, err := json.Marshal(addr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tvar newAddr polygon.Address\n\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tExpect(addr).To(Equal(newAddr))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\n\t\tContext(\"when the address is invalid hex\", func() {\n\t\t\tIt(\"should return an error\", func() {\n\t\t\t\tf := func(x [40]byte) bool {\n\t\t\t\t\tbytes, err := json.Marshal(string(x[:]))\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tvar newAddr polygon.Address\n\t\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\terr := quick.Check(f, nil)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t})\n\t\t})\n\n\t\tContext(\"when the address is invalid length\", func() {\n\t\t\tIt(\"should return an error\", func() {\n\t\t\t\tf := func(x [10]byte) bool {\n\t\t\t\t\taddr := hex.EncodeToString(x[:])\n\t\t\t\t\tbytes, err := json.Marshal(addr)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\tvar newAddr polygon.Address\n\t\t\t\t\terr = json.Unmarshal(bytes, &newAddr)\n\t\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\terr := quick.Check(f, nil)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t})\n\t\t})\n\t})\n\n\tContext(\"when unmarshalling random data\", func() {\n\t\tIt(\"should not panic\", func() {\n\t\t\tf := func(x []byte) bool {\n\t\t\t\tvar addr polygon.Address\n\t\t\t\tExpect(func() { addr.Unmarshal(x, surge.MaxBytes) }).ToNot(Panic())\n\t\t\t\tExpect(func() { json.Unmarshal(x, &addr) }).ToNot(Panic())\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/polygon/client.go",
    "content": "package polygon\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\nconst (\n\t// DefaultClientRPCURL is the RPC URL used by default, to interact with the\n\t// polygon node.\n\tDefaultClientRPCURL = \"http://127.0.0.1:28545/\"\n)\n\n// Client re-exports evm.Client.\ntype Client = evm.Client\n\n// NewClient re-exports evm.NewClient.\nvar NewClient = evm.NewClient\n"
  },
  {
    "path": "chain/polygon/encode.go",
    "content": "package polygon\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\n// Payload re-exports evm.Payload.\ntype Payload = evm.Payload\n\n// Encode re-exports evm.Encode.\nvar Encode = evm.Encode\n"
  },
  {
    "path": "chain/polygon/encode_test.go",
    "content": "package polygon_test\n\nimport (\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"math\"\n\t\"testing/quick\"\n\n\t\"github.com/renproject/multichain/chain/polygon\"\n\n\t\"github.com/renproject/pack\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/ginkgo/extensions/table\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Encoding\", func() {\n\tContext(\"when encoding bytes\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x []byte) bool {\n\t\t\t\targ := pack.NewBytes(x)\n\n\t\t\t\tresBytes := polygon.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\n\t\t\t\texpectedBytes := make([]byte, int(math.Ceil(float64(len(x))/32)*32))\n\t\t\t\tcopy(expectedBytes, x)\n\t\t\t\t// Note: since the first parameter has a dynamic length, the\n\t\t\t\t// first 32 bytes instead contain a pointer to the data.\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", 32) + fmt.Sprintf(\"%064x\", len(x)) + hex.EncodeToString(expectedBytes)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 32 bytes\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [32]byte) bool {\n\t\t\t\targ := pack.NewBytes32(x)\n\n\t\t\t\tresBytes := polygon.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := hex.EncodeToString(x[:])\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 8-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint8) bool {\n\t\t\t\targ := pack.NewU8(x)\n\n\t\t\t\tresBytes := polygon.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 16-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint16) bool {\n\t\t\t\targ := pack.NewU16(x)\n\n\t\t\t\tresBytes := polygon.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 32-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint32) bool {\n\t\t\t\targ := pack.NewU32(x)\n\n\t\t\t\tresBytes := polygon.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 64-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x uint64) bool {\n\t\t\t\targ := pack.NewU64(x)\n\n\t\t\t\tresBytes := polygon.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 128-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [16]byte) bool {\n\t\t\t\targ := pack.NewU128(x)\n\n\t\t\t\tresBytes := polygon.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding 256-bit unsigned integers\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [32]byte) bool {\n\t\t\t\targ := pack.NewU256(x)\n\n\t\t\t\tresBytes := polygon.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\t\t\t\texpectedString := fmt.Sprintf(\"%064x\", x)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding Ethereum addresses\", func() {\n\t\tIt(\"should return the correct result\", func() {\n\t\t\tf := func(x [20]byte) bool {\n\t\t\t\targ := polygon.Address(x)\n\n\t\t\t\tresBytes := polygon.Encode(arg)\n\t\t\t\tresString := hex.EncodeToString(resBytes)\n\n\t\t\t\texpectedBytes := make([]byte, 32)\n\t\t\t\tcopy(expectedBytes, x[:])\n\t\t\t\texpectedString := hex.EncodeToString(expectedBytes)\n\n\t\t\t\tExpect(resString).To(Equal(expectedString))\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\tContext(\"when encoding an unsupported type\", func() {\n\t\tIt(\"should panic\", func() {\n\t\t\tf := func(x bool) bool {\n\t\t\t\targ := pack.NewBool(x)\n\t\t\t\tExpect(func() { polygon.Encode(arg) }).To(Panic())\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\terr := quick.Check(f, nil)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t})\n\t})\n\n\ttype testCase struct {\n\t\taddr   string\n\t\tamount uint64\n\t\thash   string\n\t\tresult string\n\t}\n\n\ttestCases := []testCase{\n\t\t{\n\t\t\taddr:   \"797522Fb74d42bB9fbF6b76dEa24D01A538d5D66\",\n\t\t\tamount: 10000,\n\t\t\thash:   \"702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed\",\n\t\t\tresult: \"797522fb74d42bb9fbf6b76dea24d01a538d5d660000000000000000000000000000000000000000000000000000000000000000000000000000000000002710702826c3977ee72158db2ce1fb758075ee2799db65fb27b5d0952f860a8084ed\",\n\t\t},\n\t\t{\n\t\t\taddr:   \"58afb504ef2444a267b8c7ce57279417f1377ceb\",\n\t\t\tamount: 50000000000000000,\n\t\t\thash:   \"dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93\",\n\t\t\tresult: \"58afb504ef2444a267b8c7ce57279417f1377ceb00000000000000000000000000000000000000000000000000000000000000000000000000b1a2bc2ec50000dabff9ceb1b3dabb696d143326fdb98a8c7deb260e65d08a294b16659d573f93\",\n\t\t},\n\t\t{\n\t\t\taddr:   \"0000000000000000000000000000000000000000\",\n\t\t\tamount: 0,\n\t\t\thash:   \"0000000000000000000000000000000000000000000000000000000000000000\",\n\t\t\tresult: \"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n\t\t},\n\t}\n\n\tDescribeTable(\"when encoding args\",\n\t\tfunc(test testCase) {\n\t\t\taddrBytes, err := hex.DecodeString(test.addr)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\tvar addr polygon.Address\n\t\t\tcopy(addr[:], addrBytes)\n\n\t\t\thashBytes32 := [32]byte{}\n\t\t\thashBytes, err := hex.DecodeString(test.hash)\n\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\tcopy(hashBytes32[:], hashBytes)\n\n\t\t\targs := []interface{}{\n\t\t\t\taddr,\n\t\t\t\tpack.NewU64(test.amount),\n\t\t\t\tpack.NewBytes32(hashBytes32),\n\t\t\t}\n\t\t\tresult := polygon.Encode(args...)\n\t\t\tExpect(hex.EncodeToString(result)).To(Equal(test.result))\n\t\t},\n\n\t\tEntry(\"should return the same result as solidity for small transactions\", testCases[0]),\n\t\tEntry(\"should return the same result as solidity for large transactions\", testCases[1]),\n\t\tEntry(\"should return the same result as solidity for empty transactions\", testCases[2]),\n\t)\n})\n"
  },
  {
    "path": "chain/polygon/gas.go",
    "content": "package polygon\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\n// GasEstimator re-exports evm.GasEstimator.\ntype GasEstimator = evm.GasEstimator\n\n// NewGasEstimator re-exports evm.NewGasEstimator.\nvar NewGasEstimator = evm.NewGasEstimator\n"
  },
  {
    "path": "chain/polygon/tx.go",
    "content": "package polygon\n\nimport (\n\t\"github.com/renproject/multichain/chain/evm\"\n)\n\ntype (\n\t// TxBuilder re-exports evm.TxBuilder.\n\tTxBuilder = evm.TxBuilder\n\n\t// Tx re-exports evm.Tx.\n\tTx = evm.Tx\n)\n\n// NewTxBuilder re-exports evm.NewTxBuilder.\nvar NewTxBuilder = evm.NewTxBuilder\n"
  },
  {
    "path": "chain/solana/address.go",
    "content": "package solana\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/btcsuite/btcutil/base58\"\n\t\"github.com/renproject/multichain/api/address\"\n)\n\n// AddressDecoder implements the address.Decoder interface.\ntype AddressDecoder struct{}\n\n// AddressEncoder implements the address.Encoder interface.\ntype AddressEncoder struct{}\n\n// AddressEncodeDecoder implements the address.EncodeDecoder interface.\ntype AddressEncodeDecoder struct {\n\tAddressEncoder\n\tAddressDecoder\n}\n\n// NewAddressEncodeDecoder constructs and returns a new AddressEncodeDecoder.\nfunc NewAddressEncodeDecoder() AddressEncodeDecoder {\n\treturn AddressEncodeDecoder{\n\t\tAddressEncoder: AddressEncoder{},\n\t\tAddressDecoder: AddressDecoder{},\n\t}\n}\n\n// EncodeAddress consumes a raw byte-representation of an address and encodes it\n// to the human-readable Base58 format.\nfunc (AddressEncoder) EncodeAddress(rawAddress address.RawAddress) (address.Address, error) {\n\tif len(rawAddress) != 32 {\n\t\treturn address.Address(\"\"), fmt.Errorf(\"expected address length 32, got address length %v\", len(rawAddress))\n\t}\n\treturn address.Address(base58.Encode(rawAddress)), nil\n}\n\n// DecodeAddress consumes a human-readable Base58 format and decodes it into a\n// raw byte-representation.\nfunc (AddressDecoder) DecodeAddress(encoded address.Address) (address.RawAddress, error) {\n\tdecoded := base58.Decode(string(encoded))\n\tif len(decoded) != 32 {\n\t\treturn nil, fmt.Errorf(\"expected address length 32, got address length %v\", len(decoded))\n\t}\n\treturn address.RawAddress(decoded), nil\n}\n"
  },
  {
    "path": "chain/solana/rpc.go",
    "content": "package solana\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/http\"\n\t\"strings\"\n\t\"time\"\n)\n\n// Request defines a JSON-RPC 2.0 request object. See\n// https://www.jsonrpc.org/specification for more information. A Request should\n// not be explicitly created, but instead unmarshaled from JSON.\ntype Request struct {\n\tVersion string          `json:\"jsonrpc\"`\n\tID      interface{}     `json:\"id\"`\n\tMethod  string          `json:\"method\"`\n\tParams  json.RawMessage `json:\"params,omitempty\"`\n}\n\n// Response defines a JSON-RPC 2.0 response object. See\n// https://www.jsonrpc.org/specification for more information. A Response is\n// usually marshaled into bytes and returned in response to a Request.\ntype Response struct {\n\tVersion string           `json:\"jsonrpc\"`\n\tID      interface{}      `json:\"id\"`\n\tResult  *json.RawMessage `json:\"result,omitempty\"`\n\tError   *Error           `json:\"error,omitempty\"`\n}\n\n// Error defines a JSON-RPC 2.0 error object. See\n// https://www.jsonrpc.org/specification for more information.\ntype Error struct {\n\tCode    int              `json:\"code\"`\n\tMessage string           `json:\"message\"`\n\tData    *json.RawMessage `json:\"data\"`\n}\n\n// SendData sends data to method via jsonrpc\nfunc SendData(method string, data []byte, url string) (Response, error) {\n\trequest := Request{\n\t\tVersion: \"2.0\",\n\t\tID:      1,\n\t\tMethod:  method,\n\t\tParams:  data,\n\t}\n\t// Send request to lightnode\n\tresponse, err := SendRequest(request, url)\n\tif err != nil {\n\t\treturn Response{}, err\n\t}\n\n\tvar resp Response\n\tbuf := new(bytes.Buffer)\n\tbuf.ReadFrom(response.Body)\n\tif err := json.Unmarshal(buf.Bytes(), &resp); err != nil {\n\t\treturn Response{}, fmt.Errorf(\"cannot decode %v response body = %s, err = %v\", method, buf.String(), err)\n\t}\n\tif resp.Error != nil {\n\t\treturn Response{}, fmt.Errorf(\"got err back from %v request, err = %v\", method, resp.Error)\n\t}\n\treturn resp, nil\n}\n\n// SendDataWithRetry is the same as SendData but will retry if sending the request failed\nfunc SendDataWithRetry(method string, data []byte, url string) (Response, error) {\n\trequest := Request{\n\t\tVersion: \"2.0\",\n\t\tID:      1,\n\t\tMethod:  method,\n\t\tParams:  data,\n\t}\n\t// Send request to lightnode with retry (max 10 times)\n\tresponse, err := SendRequestWithRetry(request, url, 10, 10)\n\tif err != nil {\n\t\treturn Response{}, fmt.Errorf(\"failed to send request, err = %v\", err)\n\t}\n\n\tvar resp Response\n\tbuf := new(bytes.Buffer)\n\tbuf.ReadFrom(response.Body)\n\tif err := json.Unmarshal(buf.Bytes(), &resp); err != nil {\n\t\treturn Response{}, fmt.Errorf(\"cannot decode %v response body = %s, err = %v\", method, buf.String(), err)\n\t}\n\tif resp.Error != nil {\n\t\treturn Response{}, fmt.Errorf(\"got err back from %v request, err = %v\", method, resp.Error)\n\t}\n\treturn resp, nil\n}\n\n// SendRequest sends the JSON-2.0 request to the target url and returns the response and any error.\nfunc SendRequest(request Request, url string) (*http.Response, error) {\n\tdata, err := json.Marshal(request)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tresp, err := SendRawPost(data, url)\n\tif err != nil {\n\t\tfmt.Printf(\"Sending %s to %s resulted in an error: %v\\n\", string(data), url, err)\n\t\treturn nil, err\n\t}\n\treturn resp, nil\n}\n\n// SendRawPost sends a raw bytes as a POST request to the URL specified\nfunc SendRawPost(data []byte, url string) (*http.Response, error) {\n\tif !strings.HasPrefix(url, \"http\") {\n\t\turl = \"http://\" + url\n\t}\n\tclient := newClient(10 * time.Second)\n\tbuff := bytes.NewBuffer(data)\n\treq, err := http.NewRequest(\"POST\", url, buff)\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn client.Do(req)\n}\n\n// SendRequestWithRetry calls SendRequest but with configurable retry logic\nfunc SendRequestWithRetry(request Request, url string, timeoutInSecs int, retries int) (response *http.Response, err error) {\n\tfailures := 0\n\tfor failures < retries {\n\t\tresponse, err = SendRequest(request, url)\n\t\tif err != nil {\n\t\t\tfailures++\n\t\t\tif failures >= retries {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tfmt.Printf(\"%s errored: %v. Retrying after %d seconds\\n\", url, err, timeoutInSecs)\n\t\t\ttime.Sleep(time.Duration(timeoutInSecs) * time.Second)\n\t\t\tcontinue\n\t\t}\n\t\tbreak\n\t}\n\treturn\n}\n\nfunc newClient(timeout time.Duration) *http.Client {\n\treturn &http.Client{\n\t\tTransport: &http.Transport{\n\t\t\tDialContext: (&net.Dialer{\n\t\t\t\tTimeout:   2 * time.Second,\n\t\t\t\tKeepAlive: 10 * time.Second,\n\t\t\t}).DialContext,\n\t\t\tTLSHandshakeTimeout:   10 * time.Second,\n\t\t\tExpectContinueTimeout: 4 * time.Second,\n\t\t\tResponseHeaderTimeout: 3 * time.Second,\n\t\t},\n\t\tTimeout: timeout,\n\t}\n}\n"
  },
  {
    "path": "chain/solana/solana.go",
    "content": "package solana\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/btcsuite/btcutil/base58\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/multichain/api/contract\"\n\t\"github.com/renproject/pack\"\n\t\"go.uber.org/zap\"\n)\n\n// DefaultClientRPCURL is the default RPC URL for the Solana cluster.\nconst DefaultClientRPCURL = \"http://localhost:8899\"\n\n// ClientOptions define the options to instantiate a new Solana client.\ntype ClientOptions struct {\n\tLogger *zap.Logger\n\tRPCURL string\n}\n\n// DefaultClientOptions return the client options used to instantiate a Solana\n// client by default.\nfunc DefaultClientOptions() ClientOptions {\n\tlogger, err := zap.NewDevelopment()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn ClientOptions{\n\t\tLogger: logger,\n\t\tRPCURL: DefaultClientRPCURL,\n\t}\n}\n\n// WithRPCURL returns a modified version of the options with the given API\n// rpc-url\nfunc (opts ClientOptions) WithRPCURL(rpcURL pack.String) ClientOptions {\n\topts.RPCURL = string(rpcURL)\n\treturn opts\n}\n\n// Client represents a Solana client that implements the multichain Contract API.\ntype Client struct {\n\topts ClientOptions\n}\n\n// NewClient returns a new solana.Client interface that implements the\n// multichain Contract API.\nfunc NewClient(opts ClientOptions) *Client {\n\treturn &Client{opts: opts}\n}\n\n// FindProgramAddress is a wrapper function that calls the Solana FFI to find\n// the deterministic program-derived address using the program and seeds.\nfunc FindProgramAddress(seeds []byte, program address.RawAddress) (address.Address, error) {\n\taddrEncodeDecoder := NewAddressEncodeDecoder()\n\tencoded, err := addrEncodeDecoder.EncodeAddress(program)\n\tif err != nil {\n\t\treturn address.Address(\"\"), err\n\t}\n\n\treturn ProgramDerivedAddress(seeds, encoded), nil\n}\n\n// GetAccountData fetches and returns the account data.\nfunc (client *Client) GetAccountData(account address.Address) (pack.Bytes, error) {\n\t// Fetch account info with base64 encoding. The default base58 encoding does\n\t// not support account data that is larger than 128 bytes, hence base64.\n\tparams := json.RawMessage(fmt.Sprintf(`[\"%v\", {\"encoding\":\"base64\"}]`, string(account)))\n\tres, err := SendDataWithRetry(\"getAccountInfo\", params, client.opts.RPCURL)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"calling rpc method \\\"getAccountInfo\\\": %v\", err)\n\t}\n\tif res.Result == nil {\n\t\treturn nil, fmt.Errorf(\"decoding result: empty\")\n\t}\n\n\t// Deserialise the account's info into the appropriate struct.\n\tinfo := ResponseGetAccountInfo{}\n\tif err := json.Unmarshal(*res.Result, &info); err != nil {\n\t\treturn nil, fmt.Errorf(\"decoding result: %v\", err)\n\t}\n\n\t// Decode the Base58 encoded account data into raw byte-representation. Since\n\t// this holds the burn log's data.\n\tdata, err := base64.RawStdEncoding.DecodeString(info.Value.Data[0])\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"decoding base64 value: %v\", err)\n\t}\n\n\treturn pack.Bytes(data), nil\n}\n\n// CallContract implements the multichain Contract API. In the case of Solana,\n// it is used to fetch burn logs associated with a particular burn nonce.\nfunc (client *Client) CallContract(\n\tctx context.Context,\n\tprogram address.Address,\n\tcalldata contract.CallData,\n) (pack.Bytes, error) {\n\taddrEncodeDecoder := NewAddressEncodeDecoder()\n\tdecodedProgram, err := addrEncodeDecoder.DecodeAddress(program)\n\tif err != nil {\n\t\treturn pack.Bytes(nil), fmt.Errorf(\"decode address: %v\", err)\n\t}\n\n\t// Find the program-derived address that will have persisted the burn log.\n\tburnLogAccount, err := FindProgramAddress([]byte(calldata), decodedProgram)\n\tif err != nil {\n\t\treturn pack.Bytes(nil), fmt.Errorf(\"find program-derived address: %v\", err)\n\t}\n\n\t// Make an RPC call to \"getAccountInfo\" to get the data associated with the\n\t// account (we interpret the contract address as the account identifier).\n\tparams := json.RawMessage(fmt.Sprintf(`[\"%v\", {\"encoding\":\"base58\"}]`, string(burnLogAccount)))\n\tres, err := SendDataWithRetry(\"getAccountInfo\", params, client.opts.RPCURL)\n\tif err != nil {\n\t\treturn pack.Bytes(nil), fmt.Errorf(\"calling rpc method \\\"getAccountInfo\\\": %v\", err)\n\t}\n\tif res.Result == nil {\n\t\treturn pack.Bytes(nil), fmt.Errorf(\"decoding result: empty\")\n\t}\n\n\t// Deserialise the account's info into the appropriate struct.\n\tinfo := ResponseGetAccountInfo{}\n\tif err := json.Unmarshal(*res.Result, &info); err != nil {\n\t\treturn pack.Bytes(nil), fmt.Errorf(\"decoding result: %v\", err)\n\t}\n\n\t// Decode the Base58 encoded account data into raw byte-representation. Since\n\t// this holds the burn log's data.\n\tdata := base58.Decode(info.Value.Data[0])\n\tif err != nil {\n\t\treturn pack.Bytes(nil), fmt.Errorf(\"decoding result from base58: %v\", err)\n\t}\n\n\treturn pack.NewBytes(data), nil\n}\n"
  },
  {
    "path": "chain/solana/solana_ffi.go",
    "content": "package solana\n\nimport (\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/pack\"\n\t\"github.com/renproject/solana-ffi/cgo\"\n)\n\n// UniquePubkey creates an atomically incrementing pubkey used for tests and\n// benchmarking purposes.\nfunc UniquePubkey() address.Address {\n\tpubkey := cgo.UniquePubkey()\n\treturn address.Address(pubkey)\n}\n\n// ProgramDerivedAddress derives an address for an account that only the given\n// program has the authority to sign. The address is of the same form as a\n// Solana pubkey, except they are ensured to not be on the es25519 curve and\n// thus have no associated private key. This address is deterministic, based\n// upon the program and the seeds slice.\nfunc ProgramDerivedAddress(seeds pack.Bytes, program address.Address) address.Address {\n\tprogramDerivedAddressEncoded := cgo.ProgramDerivedAddress(seeds, uint32(len(seeds)), string(program))\n\treturn address.Address(programDerivedAddressEncoded)\n}\n"
  },
  {
    "path": "chain/solana/solana_ffi_test.go",
    "content": "package solana_test\n\nimport (\n\t\"github.com/ethereum/go-ethereum/crypto\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/multichain/chain/solana\"\n\t\"github.com/renproject/pack\"\n\t\"github.com/renproject/solana-ffi/cgo\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Solana FFI\", func() {\n\tContext(\"FFI\", func() {\n\t\tIt(\"should create a unique pubkey\", func() {\n\t\t\tkey1 := solana.UniquePubkey()\n\t\t\tkey2 := solana.UniquePubkey()\n\t\t\tExpect(key1).NotTo(Equal(key2))\n\t\t})\n\t})\n\n\tContext(\"Program Derived Address\", func() {\n\t\tIt(\"should correctly compute 1\", func() {\n\t\t\tprogram := address.Address(\"6kAHanNCT1LKFoMn3fBdyvJuvHLcWhLpJbTpbHpqRiG4\")\n\t\t\tseeds := []byte(\"GatewayState\")\n\t\t\tprogramDerivedAddress := solana.ProgramDerivedAddress(pack.Bytes(seeds), program)\n\t\t\texpectedDerivedAddress := address.Address(\"APthNc29MGRJRkKahDRNrSNA2o1e8p6aFAJNRV8ZdJaV\")\n\t\t\tExpect(programDerivedAddress[:]).To(Equal(expectedDerivedAddress))\n\t\t})\n\n\t\tIt(\"should correctly compute 2\", func() {\n\t\t\tprogram := address.Address(\"6kAHanNCT1LKFoMn3fBdyvJuvHLcWhLpJbTpbHpqRiG4\")\n\t\t\tselector := \"BTC/toSolana\"\n\t\t\tselectorHash := crypto.Keccak256([]byte(selector))\n\t\t\tprogramDerivedAddress := solana.ProgramDerivedAddress(pack.Bytes(selectorHash), program)\n\t\t\texpectedDerivedAddress := address.Address(\"6SPY5x3tmjLZ9SWcZFKhwpANrhYJagNNF4Sa4LAwtbCn\")\n\t\t\tExpect(programDerivedAddress[:]).To(Equal(expectedDerivedAddress))\n\t\t})\n\t})\n\n\tContext(\"Associated Token Account\", func() {\n\t\tIt(\"should correctly calculate\", func() {\n\t\t\twalletAddress := \"fYq3qkHoVogcPnkxFWAwiJGJs29Xtg4FZ6xcAHWd51w\"\n\t\t\tselector := \"BTC/toSolana\"\n\t\t\tassTokenAccount := cgo.AssociatedTokenAccount(walletAddress, selector)\n\t\t\texpectedAssTokenAccount := \"GxMKqib75YSD5RegZP8A7ZkSv8uBFmfNsNXzGptBdqdo\"\n\t\t\tExpect(assTokenAccount).To(Equal(expectedAssTokenAccount))\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/solana/solana_suite_test.go",
    "content": "package solana_test\n\nimport (\n\t\"testing\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nfunc TestSolana(t *testing.T) {\n\tRegisterFailHandler(Fail)\n\tRunSpecs(t, \"Solana Suite\")\n}\n"
  },
  {
    "path": "chain/solana/solana_test.go",
    "content": "package solana_test\n\nimport (\n\t\"context\"\n\t\"encoding/binary\"\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/ethereum/go-ethereum/crypto\"\n\t\"github.com/near/borsh-go\"\n\t\"github.com/renproject/multichain\"\n\t\"github.com/renproject/multichain/chain/solana\"\n\t\"github.com/renproject/pack\"\n\t\"github.com/renproject/solana-ffi/cgo\"\n\t\"go.uber.org/zap\"\n\t\"go.uber.org/zap/zapcore\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\n// Bytes32 is an alias for [32]byte\ntype Bytes32 = [32]byte\n\n// GatewayRegistry defines the state of gateway registry, serialized and\n// deserialized by the borsh schema.\ntype GatewayRegistry struct {\n\tIsInitialised uint8\n\tOwner         Bytes32\n\tCount         uint64\n\tSelectors     []Bytes32\n\tGateways      []Bytes32\n}\n\nvar _ = Describe(\"Solana\", func() {\n\t// Setup logger.\n\tloggerConfig := zap.NewDevelopmentConfig()\n\tloggerConfig.EncoderConfig.EncodeLevel = zapcore.CapitalColorLevelEncoder\n\tlogger, err := loggerConfig.Build()\n\tExpect(err).ToNot(HaveOccurred())\n\n\tContext(\"When minting and burning\", func() {\n\t\tIt(\"should succeed\", func() {\n\t\t\t// Base58 address of the Gateway program that is deployed to Solana.\n\t\t\tprogram := multichain.Address(\"FDdKRjbBeFtyu5c66cZghJsTTjDTT1aD3zsgTWMTpaif\")\n\n\t\t\t// Construct user's keypair path (~/.config/solana/id.json).\n\t\t\tuserHomeDir, err := os.UserHomeDir()\n\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\tkeypairPath := userHomeDir + \"/.config/solana/id.json\"\n\n\t\t\t// RenVM secret and the selector for this gateway.\n\t\t\trenVmSecret := \"0000000000000000000000000000000000000000000000000000000000000001\"\n\t\t\tselector := \"BTC/toSolana\"\n\n\t\t\t// Mint some tokens.\n\t\t\ttime.Sleep(10 * time.Second)\n\t\t\tmintAmount := uint64(1000000000) // 10 tokens.\n\t\t\tnilSlice := make([]byte, 32)\n\t\t\tmintSig := cgo.GatewayMint(keypairPath, solana.DefaultClientRPCURL, renVmSecret, selector, mintAmount, nilSlice, nilSlice)\n\t\t\tlogger.Debug(\"Mint\", zap.String(\"tx signature\", string(mintSig)))\n\n\t\t\t// Burn some tokens.\n\t\t\ttime.Sleep(10 * time.Second)\n\t\t\trecipient := []byte(\"mwjUmhAW68zCtgZpW5b1xD5g7MZew6xPV4\")\n\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\tburnCount := cgo.GatewayGetBurnCount(solana.DefaultClientRPCURL, selector)\n\t\t\tburnAmount := uint64(500000000) // 5 tokens.\n\t\t\tburnSig := cgo.GatewayBurn(keypairPath, solana.DefaultClientRPCURL, selector, burnCount, burnAmount, uint32(len(recipient)), recipient)\n\t\t\tlogger.Debug(\"Burn\", zap.String(\"tx signature\", string(burnSig)))\n\n\t\t\t// Fetch burn log.\n\t\t\ttime.Sleep(20 * time.Second)\n\t\t\tclient := solana.NewClient(solana.DefaultClientOptions())\n\t\t\tcalldata := make([]byte, 8)\n\t\t\tbinary.LittleEndian.PutUint64(calldata, burnCount)\n\t\t\tdata, err := client.CallContract(context.Background(), program, multichain.ContractCallData(calldata))\n\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\tExpect(len(data)).To(Equal(97))\n\t\t\tfetchedAmount := [32]byte{}\n\t\t\tcopy(fetchedAmount[:], data[0:32])\n\t\t\trecipientLen := uint8(data[32:33][0])\n\t\t\tfetchedRecipient := pack.Bytes(data[33 : 33+int(recipientLen)])\n\t\t\tExpect(pack.NewU256(fetchedAmount)).To(Equal(pack.NewU256FromUint64(burnAmount)))\n\t\t\tExpect([]byte(fetchedRecipient)).To(Equal(recipient))\n\t\t})\n\t})\n\n\tContext(\"When getting Gateways from Registry\", func() {\n\t\tIt(\"should deserialize successfully\", func() {\n\t\t\t// Solana client using default client options.\n\t\t\tclient := solana.NewClient(solana.DefaultClientOptions())\n\n\t\t\t// Base58 address of the Gateway registry program deployed to Solana.\n\t\t\tregistryProgram := multichain.Address(\"DHpzwsdvAzq61PN9ZwQWg2hzwX8gYNfKAdsNKKtdKDux\")\n\t\t\tseeds := []byte(\"GatewayRegistryState\")\n\t\t\tregistryState := solana.ProgramDerivedAddress(pack.Bytes(seeds), registryProgram)\n\n\t\t\t// Fetch account data at gateway registry's state\n\t\t\taccountData, err := client.GetAccountData(registryState)\n\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t// Deserialize the account data into registry state's structure.\n\t\t\tregistry := GatewayRegistry{}\n\t\t\terr = borsh.Deserialize(&registry, []byte(accountData))\n\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t// The registry (in the CI test environment) is pre-populated with gateway\n\t\t\t// addresses for BTC/toSolana selector.\n\t\t\tzero := pack.NewU256FromU8(pack.U8(0)).Bytes32()\n\t\t\tbtcSelectorHash := [32]byte{}\n\t\t\tcopy(btcSelectorHash[:], crypto.Keccak256([]byte(\"BTC/toSolana\")))\n\t\t\tlunaSelectorHash := [32]byte{}\n\t\t\tcopy(lunaSelectorHash[:], crypto.Keccak256([]byte(\"LUNA/toSolana\")))\n\t\t\tdaiSelectorHash := [32]byte{}\n\t\t\tcopy(daiSelectorHash[:], crypto.Keccak256([]byte(\"DAI/toSolana\")))\n\n\t\t\taddrEncodeDecoder := solana.NewAddressEncodeDecoder()\n\t\t\texpectedBtcGateway, _ := addrEncodeDecoder.DecodeAddress(\"FDdKRjbBeFtyu5c66cZghJsTTjDTT1aD3zsgTWMTpaif\")\n\t\t\texpectedLunaGateway, _ := addrEncodeDecoder.DecodeAddress(\"3zfUUYDVp68fk9Z8FoKxEcEFqSMhE5UZ3Mw8mGhm5WRt\")\n\t\t\texpectedDaiGateway, _ := addrEncodeDecoder.DecodeAddress(\"rZJ8SoJBNWq8Qi6QTNTdVv78DPW6mn2fJUw7CPUvSgA\")\n\n\t\t\tExpect(registry.Count).To(Equal(uint64(3)))\n\t\t\tExpect(registry.Selectors[0]).To(Equal(btcSelectorHash))\n\t\t\tExpect(registry.Selectors[1]).To(Equal(lunaSelectorHash))\n\t\t\tExpect(registry.Selectors[2]).To(Equal(daiSelectorHash))\n\t\t\tExpect(registry.Selectors[3]).To(Equal(zero))\n\t\t\tExpect(len(registry.Selectors)).To(Equal(32))\n\t\t\tExpect(registry.Gateways[0][:]).To(Equal([]byte(expectedBtcGateway)))\n\t\t\tExpect(registry.Gateways[1][:]).To(Equal([]byte(expectedLunaGateway)))\n\t\t\tExpect(registry.Gateways[2][:]).To(Equal([]byte(expectedDaiGateway)))\n\t\t\tExpect(registry.Gateways[3]).To(Equal(zero))\n\t\t\tExpect(len(registry.Gateways)).To(Equal(32))\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/solana/solanarpc.go",
    "content": "package solana\n\n// AccountContext is the JSON-interface of the account's context representing\n// what slot the account's value has been returned for.\ntype AccountContext struct {\n\tSlot int `json:\"slot\"`\n}\n\n// AccountValue is the JSON-interface of the account's information.\ntype AccountValue struct {\n\tData       [2]string `json:\"data\"`\n\tExecutable bool      `json:\"executable\"`\n\tLamports   int       `json:\"lamports\"`\n\tOwner      string    `json:\"owner\"`\n\tRentEpoch  int       `json:\"rentEpoch\"`\n}\n\n// ResponseGetAccountInfo is the JSON-interface of the response for the\n// getAccountInfo query.\ntype ResponseGetAccountInfo struct {\n\tContext AccountContext `json:\"context\"`\n\tValue   AccountValue   `json:\"value\"`\n}\n"
  },
  {
    "path": "chain/substrate/address.go",
    "content": "package substrate\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/btcsuite/btcutil/base58\"\n\t\"github.com/renproject/pack\"\n)\n\n// An Address represents a public address on a Substrate blockchain. It can be\n// the address of an external account, or the address of a smart contract.\ntype Address pack.Bytes\n\n// The AddressDecoder defines an interface for decoding string representations\n// of Substrate address into the concrete Address type.\ntype AddressDecoder interface {\n\tDecodeAddress(pack.String) (pack.Bytes, error)\n}\n\ntype addressDecoder struct{}\n\n// NewAddressDecoder returns the default AddressDecoder for Substract chains. It\n// uses the Bitcoin base58 alphabet to decode the string, and interprets the\n// result as a 2-byte address type, 32-byte array, and 1-byte checksum.\nfunc NewAddressDecoder() AddressDecoder {\n\treturn addressDecoder{}\n}\n\n// DecodeAddress the string using the Bitcoin base58 alphabet. If the string\n// does not a 2-byte address type, 32-byte array, and 1-byte checksum, then an\n// error is returned.\nfunc (addressDecoder) DecodeAddress(encoded pack.String) (pack.Bytes, error) {\n\tdata := base58.Decode(encoded.String())\n\tif len(data) != 35 {\n\t\treturn nil, fmt.Errorf(\"expected 35 bytes, got %v bytes\", len(data))\n\t}\n\treturn pack.Bytes(data), nil\n}\n"
  },
  {
    "path": "chain/substrate/address_test.go",
    "content": "package substrate_test\n"
  },
  {
    "path": "chain/terra/address.go",
    "content": "package terra\n\nimport \"github.com/renproject/multichain/chain/cosmos\"\n\ntype (\n\t// Address re-exports cosmos-compatible address\n\tAddress = cosmos.Address\n\n\t// AddressDecoder re-exports cosmos.AddressDecoder\n\tAddressDecoder = cosmos.AddressDecoder\n\n\t// AddressEncoder re-exports cosmos.AddressEncoder\n\tAddressEncoder = cosmos.AddressEncoder\n\n\t// AddressEncodeDecoder re-exports cosmos.AddressEncodeDecoder\n\tAddressEncodeDecoder = cosmos.AddressEncodeDecoder\n)\n\nvar (\n\t// NewAddressDecoder re-exports cosmos.NewAddressDecoder\n\tNewAddressDecoder = cosmos.NewAddressDecoder\n\n\t// NewAddressEncoder re-exports cosmos.NewAddressEncoder\n\tNewAddressEncoder = cosmos.NewAddressEncoder\n\n\t// NewAddressEncodeDecoder re-exports cosmos.NewAddressEnodeDecoder\n\tNewAddressEncodeDecoder = cosmos.NewAddressEncodeDecoder\n)\n"
  },
  {
    "path": "chain/terra/address_test.go",
    "content": "package terra_test\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/renproject/multichain\"\n\t\"github.com/renproject/multichain/chain/terra\"\n\t\"github.com/renproject/pack\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Terra\", func() {\n\tContext(\"when decoding address\", func() {\n\t\tdecoder := terra.NewAddressDecoder()\n\t\tContext(\"when decoding a valid address\", func() {\n\t\t\tIt(\"should work\", func() {\n\t\t\t\taddrStr := \"terra1ztez03dp94y2x55fkhmrvj37ck204geq33msma\"\n\t\t\t\t_, err := decoder.DecodeAddress(multichain.Address(pack.NewString(addrStr)))\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t})\n\t\t})\n\t\tContext(\"when decoding an address with invalid prefix\", func() {\n\t\t\tIt(\"should fail\", func() {\n\t\t\t\taddrStr := \"cosmosztez03dp94y2x55fkhmrvj37ck204geq33msma\"\n\t\t\t\t_, err := decoder.DecodeAddress(multichain.Address(pack.NewString(addrStr)))\n\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t})\n\t\t})\n\t\tContext(\"when decoding an invalid address\", func() {\n\t\t\tIt(\"should fail\", func() {\n\t\t\t\taddrStr := \"terra1ztez03dp94y2x55fkhmrvj37ck204geq33msm\"\n\t\t\t\t_, err := decoder.DecodeAddress(multichain.Address(pack.NewString(addrStr)))\n\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t})\n\t\t})\n\t\tContext(\"when decoding an empty address\", func() {\n\t\t\tIt(\"should fail\", func() {\n\t\t\t\taddrStr := \"\"\n\t\t\t\t_, err := decoder.DecodeAddress(multichain.Address(pack.NewString(addrStr)))\n\t\t\t\tExpect(err).Should(MatchError(fmt.Errorf(\"unexpected address length: want=20, got=0\")))\n\t\t\t})\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/terra/terra.go",
    "content": "package terra\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"strconv\"\n\n\t\"github.com/cosmos/cosmos-sdk/types\"\n\t\"github.com/renproject/multichain/api/account\"\n\t\"github.com/renproject/multichain/chain/cosmos\"\n\t\"github.com/renproject/pack\"\n\t\"github.com/terra-money/core/app\"\n)\n\nconst DefaultTerraDecimalsDivisor = 1e5\n\ntype (\n\t// Client re-exports cosmos.Client\n\tClient = cosmos.Client\n\n\t// ClientOptions re-exports cosmos.ClientOptions\n\tClientOptions = cosmos.ClientOptions\n\n\t// TxBuilderOptions re-exports cosmos.TxBuilderOptions\n\tTxBuilderOptions = cosmos.TxBuilderOptions\n)\n\nvar (\n\t// DefaultClientOptions re-exports cosmos.DefaultClientOptions\n\tDefaultClientOptions = cosmos.DefaultClientOptions\n\n\t// DefaultTxBuilderOptions re-exports cosmos.DefaultTxBuilderOptions\n\tDefaultTxBuilderOptions = cosmos.DefaultTxBuilderOptions\n\n\t// NewGasEstimator re-exports cosmos.NewGasEstimator\n\tNewGasEstimator = cosmos.NewGasEstimator\n)\n\n// Set the Bech32 address prefix for the globally-defined config variable inside\n// Cosmos SDK. This is required as there are a number of functions inside the\n// SDK that make use of this global config directly, instead of allowing us to\n// provide a custom config.\nfunc init() {\n\t// TODO: This will prevent us from being able to support multiple\n\t// Cosmos-compatible chains in the Multichain. This is expected to be\n\t// resolved before v1.0 of the Cosmos SDK (issue being tracked here:\n\t// https://github.com/cosmos/cosmos-sdk/issues/7448).\n\ttypes.GetConfig().SetBech32PrefixForAccount(\"terra\", \"terrapub\")\n\ttypes.GetConfig().Seal()\n}\n\n// NewClient returns returns a new Client with Terra codec.\nfunc NewClient(opts ClientOptions) *Client {\n\tcfg := app.MakeEncodingConfig()\n\treturn cosmos.NewClient(opts, cfg.Marshaler, cfg.TxConfig, cfg.InterfaceRegistry, cfg.Amino, \"terra\")\n}\n\n// NewTxBuilder returns an implementation of the transaction builder interface\n// from the Cosmos Compat API, and exposes the functionality to build simple\n// Terra transactions.\nfunc NewTxBuilder(opts TxBuilderOptions, client *Client) account.TxBuilder {\n\treturn cosmos.NewTxBuilder(opts, client)\n}\n\ntype GasEstimator struct {\n\turl         string\n\tkey         string\n\tdecimals    int\n\tfallbackGas pack.U256\n}\n\nfunc NewHttpGasEstimator(url, key string, decimals int, fallbackGas pack.U256) GasEstimator {\n\treturn GasEstimator{\n\t\turl:         url,\n\t\tkey:         key,\n\t\tdecimals:    decimals,\n\t\tfallbackGas: fallbackGas,\n\t}\n}\n\nfunc (gasEstimator GasEstimator) EstimateGas(ctx context.Context) (pack.U256, pack.U256, error) {\n\tresponse, err := http.Get(gasEstimator.url)\n\tif err != nil {\n\t\treturn gasEstimator.fallbackGas, gasEstimator.fallbackGas, err\n\t}\n\tdefer response.Body.Close()\n\n\tvar results map[string]string\n\tif err := json.NewDecoder(response.Body).Decode(&results); err != nil {\n\t\treturn gasEstimator.fallbackGas, gasEstimator.fallbackGas, err\n\t}\n\tgasPriceStr, ok := results[gasEstimator.key]\n\tif !ok {\n\t\treturn gasEstimator.fallbackGas, gasEstimator.fallbackGas, fmt.Errorf(\"no %v in response\", gasEstimator.key)\n\t}\n\tgasPriceFloat, err := strconv.ParseFloat(gasPriceStr, 64)\n\tif err != nil {\n\t\treturn gasEstimator.fallbackGas, gasEstimator.fallbackGas, fmt.Errorf(\"invalid gas price, %v\", err)\n\t}\n\tgasPrice := uint64(gasPriceFloat * float64(gasEstimator.decimals))\n\treturn pack.NewU256FromUint64(gasPrice), pack.NewU256FromUint64(gasPrice), nil\n}\n"
  },
  {
    "path": "chain/terra/terra_suite_test.go",
    "content": "package terra_test\n\nimport (\n\t\"testing\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nfunc TestTerra(t *testing.T) {\n\tRegisterFailHandler(Fail)\n\tRunSpecs(t, \"Terra Suite\")\n}\n"
  },
  {
    "path": "chain/terra/terra_test.go",
    "content": "package terra_test\n\nimport (\n\t\"context\"\n\t\"encoding/hex\"\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/renproject/id\"\n\t\"github.com/renproject/multichain\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/multichain/chain/terra\"\n\t\"github.com/renproject/pack\"\n\t\"github.com/renproject/surge\"\n\t\"github.com/tendermint/tendermint/crypto/secp256k1\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Terra\", func() {\n\tContext(\"when submitting transactions\", func() {\n\t\tContext(\"when sending LUNA\", func() {\n\t\t\tIt(\"should work\", func() {\n\t\t\t\t// create context for the test\n\t\t\t\tctx, cancel := context.WithCancel(context.Background())\n\t\t\t\tdefer cancel()\n\n\t\t\t\t// Load private key, and assume that the associated address has\n\t\t\t\t// funds to spend. You can do this by setting TERRA_PK to the\n\t\t\t\t// value specified in the `./multichaindeploy/.env` file.\n\t\t\t\tpkEnv := os.Getenv(\"TERRA_PK\")\n\t\t\t\tif pkEnv == \"\" {\n\t\t\t\t\tpanic(\"TERRA_PK is undefined\")\n\t\t\t\t}\n\n\t\t\t\tpkBz, err := hex.DecodeString(pkEnv)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\tvar pk secp256k1.PrivKey\n\t\t\t\tcopy(pk[:], pkBz)\n\n\t\t\t\tvar privKey id.PrivKey\n\t\t\t\terr = surge.FromBinary(&privKey, pkBz)\n\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\taddr := terra.Address(pk.PubKey().Address())\n\n\t\t\t\t// random recipient\n\t\t\t\tpkRecipient := secp256k1.GenPrivKey()\n\t\t\t\taddrEncoder := terra.NewAddressEncoder()\n\t\t\t\trecipient, err := addrEncoder.EncodeAddress(address.RawAddress(pack.Bytes(pkRecipient.PubKey().Address())))\n\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\t// attach the signature to the transaction\n\t\t\t\tpubKey := pk.PubKey().(secp256k1.PubKey)\n\n\t\t\t\t// instantiate a new client\n\t\t\t\tclient := terra.NewClient(\n\t\t\t\t\tterra.DefaultClientOptions().\n\t\t\t\t\t\tWithCoinDenom(\"uluna\"),\n\t\t\t\t)\n\t\t\t\tnonce, err := client.AccountNonce(ctx, multichain.Address(addr.String()))\n\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\t// create a new cosmos-compatible transaction builder\n\t\t\t\ttxBuilder := terra.NewTxBuilder(\n\t\t\t\t\tterra.DefaultTxBuilderOptions().\n\t\t\t\t\t\tWithChainID(\"testnet\"),\n\t\t\t\t\tclient,\n\t\t\t\t)\n\n\t\t\t\t// build the transaction\n\t\t\t\tpayload := pack.NewBytes([]byte(\"multichain\"))\n\t\t\t\tamount := pack.NewU256FromU64(pack.U64(2000000))\n\t\t\t\ttx, err := txBuilder.BuildTx(\n\t\t\t\t\tctx,\n\t\t\t\t\tprivKey.PubKey(),                      // fromPubKey\n\t\t\t\t\trecipient,                             // to\n\t\t\t\t\tamount,                                // amount\n\t\t\t\t\tnonce,                                 // nonce\n\t\t\t\t\tpack.NewU256FromU64(pack.U64(200000)), // gas limit\n\t\t\t\t\tpack.NewU256FromU64(pack.U64(1)),      // gas price\n\t\t\t\t\tpack.NewU256FromU64(pack.U64(1)),      // gas cap\n\t\t\t\t\tpayload,                               // memo\n\t\t\t\t)\n\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\t// get the transaction bytes and sign it\n\t\t\t\tsighashes, err := tx.Sighashes()\n\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\tExpect(len(sighashes)).To(Equal(1))\n\t\t\t\thash := id.Hash(sighashes[0])\n\t\t\t\tsig, err := privKey.Sign(&hash)\n\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\tsigBytes, err := surge.ToBinary(sig)\n\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\tsig65 := pack.Bytes65{}\n\t\t\t\tcopy(sig65[:], sigBytes)\n\n\t\t\t\terr = tx.Sign(\n\t\t\t\t\t[]pack.Bytes65{sig65},\n\t\t\t\t\tpack.NewBytes(pubKey[:]),\n\t\t\t\t)\n\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\t// submit the transaction to the chain\n\t\t\t\ttxHash := tx.Hash()\n\t\t\t\terr = client.SubmitTx(ctx, tx)\n\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\tfor {\n\t\t\t\t\t// Loop until the transaction has at least a few\n\t\t\t\t\t// confirmations. This implies that the transaction is\n\t\t\t\t\t// definitely valid, and the test has passed. We were\n\t\t\t\t\t// successfully able to use the multichain to construct and\n\t\t\t\t\t// submit a Bitcoin transaction!\n\t\t\t\t\tfoundTx, confs, err := client.Tx(ctx, txHash)\n\t\t\t\t\tif err == nil {\n\t\t\t\t\t\tExpect(confs.Uint64()).To(Equal(uint64(1)))\n\t\t\t\t\t\tExpect(foundTx.Payload()).To(Equal(multichain.ContractCallData([]byte(payload.String()))))\n\t\t\t\t\t\tExpect(foundTx.Nonce()).To(Equal(nonce))\n\t\t\t\t\t\tExpect(foundTx.From()).To(Equal(multichain.Address(addr.String())))\n\t\t\t\t\t\tExpect(foundTx.To()).To(Equal(recipient))\n\t\t\t\t\t\tExpect(foundTx.Value()).To(Equal(amount))\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\n\t\t\t\t\t// wait and retry querying for the transaction\n\t\t\t\t\ttime.Sleep(2 * time.Second)\n\t\t\t\t}\n\t\t\t})\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/zcash/address.go",
    "content": "package zcash\n\nimport (\n\t\"bytes\"\n\t\"crypto/sha256\"\n\t\"fmt\"\n\n\t\"github.com/btcsuite/btcd/chaincfg\"\n\t\"github.com/btcsuite/btcutil\"\n\t\"github.com/btcsuite/btcutil/base58\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/pack\"\n\t\"golang.org/x/crypto/ripemd160\"\n)\n\n// AddressEncodeDecoder implements the address.EncodeDecoder interface\ntype AddressEncodeDecoder struct {\n\tAddressEncoder\n\tAddressDecoder\n}\n\n// AddressEncoder encapsulates the chain specific configurations and implements\n// the address.Encoder interface\ntype AddressEncoder struct {\n\tparams *Params\n}\n\n// AddressDecoder encapsulates the chain specific configurations and implements\n// the address.Decoder interface\ntype AddressDecoder struct {\n\tparams *Params\n}\n\n// NewAddressEncoder constructs a new AddressEncoder with the chain specific\n// configurations\nfunc NewAddressEncoder(params *Params) AddressEncoder {\n\treturn AddressEncoder{params: params}\n}\n\n// NewAddressDecoder constructs a new AddressDecoder with the chain specific\n// configurations\nfunc NewAddressDecoder(params *Params) AddressDecoder {\n\treturn AddressDecoder{params: params}\n}\n\n// NewAddressEncodeDecoder constructs a new AddressEncodeDecoder with the\n// chain specific configurations\nfunc NewAddressEncodeDecoder(params *Params) AddressEncodeDecoder {\n\treturn AddressEncodeDecoder{\n\t\tAddressEncoder: NewAddressEncoder(params),\n\t\tAddressDecoder: NewAddressDecoder(params),\n\t}\n}\n\n// EncodeAddress implements the address.Encoder interface\nfunc (encoder AddressEncoder) EncodeAddress(rawAddr address.RawAddress) (address.Address, error) {\n\tvar addrType uint8\n\tvar err error\n\tvar hash [20]byte\n\tvar prefix []byte\n\n\tswitch len(rawAddr) {\n\tcase ripemd160.Size + 5:\n\t\tprefix = rawAddr[:1]\n\t\taddrType, err = addressType(prefix, encoder.params)\n\t\tcopy(hash[:], rawAddr[1:21])\n\tcase ripemd160.Size + 6:\n\t\tprefix = rawAddr[:2]\n\t\taddrType, err = addressType(prefix, encoder.params)\n\t\tcopy(hash[:], rawAddr[2:22])\n\tdefault:\n\t\treturn address.Address(\"\"), fmt.Errorf(\"validating address length: expected %v or %v, got %v\", ripemd160.Size+5, ripemd160.Size+6, len(rawAddr))\n\t}\n\n\tif err != nil {\n\t\treturn address.Address(\"\"), fmt.Errorf(\"parsing address type: %v\", err)\n\t}\n\n\tswitch addrType {\n\tcase 0, 1: // P2PKH or P2SH\n\t\treturn address.Address(pack.String(encodeAddress(hash[:], prefix))), nil\n\tdefault:\n\t\treturn address.Address(\"\"), fmt.Errorf(\"unexpected address type: %v\", addrType)\n\t}\n}\n\n// DecodeAddress implements the address.Decoder interface\nfunc (decoder AddressDecoder) DecodeAddress(addr address.Address) (address.RawAddress, error) {\n\tvar decoded = base58.Decode(string(addr))\n\tvar addrType uint8\n\tvar err error\n\tvar hash [20]byte\n\n\tswitch len(decoded) {\n\tcase ripemd160.Size + 5:\n\t\taddrType, err = addressType(decoded[:1], decoder.params)\n\t\tcopy(hash[:], decoded[1:21])\n\tcase ripemd160.Size + 6:\n\t\taddrType, err = addressType(decoded[:2], decoder.params)\n\t\tcopy(hash[:], decoded[2:22])\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"validating address length: expected %v or %v, got %v\", ripemd160.Size+5, ripemd160.Size+6, len(decoded))\n\t}\n\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"parsing address type: %v\", err)\n\t}\n\n\tvar cksum [4]byte\n\tcopy(cksum[:], decoded[len(decoded)-4:])\n\tif checksum(decoded[:len(decoded)-4]) != cksum {\n\t\treturn nil, fmt.Errorf(\"validating checksum: %v\", base58.ErrChecksum)\n\t}\n\n\tswitch addrType {\n\tcase 0, 1: // P2PKH or P2SH\n\t\treturn address.RawAddress(pack.Bytes(decoded)), nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unexpected address type: %v\", addrType)\n\t}\n}\n\nfunc addressType(prefix []byte, params *Params) (uint8, error) {\n\tif bytes.Equal(prefix, params.P2PKHPrefix) {\n\t\treturn 0, nil\n\t}\n\tif bytes.Equal(prefix, params.P2SHPrefix) {\n\t\treturn 1, nil\n\t}\n\treturn 0, btcutil.ErrUnknownAddressType\n}\n\n// An Address represents a Zcash address.\ntype Address interface {\n\tbtcutil.Address\n\tBitcoinAddress() btcutil.Address\n}\n\n// AddressPubKeyHash represents an address for P2PKH transactions for Zcash that\n// is compatible with the Bitcoin Compat API.\ntype AddressPubKeyHash struct {\n\t*btcutil.AddressPubKeyHash\n\tparams *Params\n}\n\n// NewAddressPubKeyHash returns a new AddressPubKeyHash that is compatible with\n// the Bitcoin Compat API.\nfunc NewAddressPubKeyHash(pkh []byte, params *Params) (AddressPubKeyHash, error) {\n\taddr, err := btcutil.NewAddressPubKeyHash(pkh, params.Params)\n\treturn AddressPubKeyHash{AddressPubKeyHash: addr, params: params}, err\n}\n\n// String returns the string encoding of the transaction output destination.\n//\n// Please note that String differs subtly from EncodeAddress: String will return\n// the value as a string without any conversion, while EncodeAddress may convert\n// destination types (for example, converting pubkeys to P2PKH addresses) before\n// encoding as a payment address string.\nfunc (addr AddressPubKeyHash) String() string {\n\treturn addr.EncodeAddress()\n}\n\n// EncodeAddress returns the string encoding of the payment address associated\n// with the Address value. See the comment on String for how this method differs\n// from String.\nfunc (addr AddressPubKeyHash) EncodeAddress() string {\n\thash := *addr.AddressPubKeyHash.Hash160()\n\treturn encodeAddress(hash[:], addr.params.P2PKHPrefix)\n}\n\n// ScriptAddress returns the raw bytes of the address to be used when inserting\n// the address into a txout's script.\nfunc (addr AddressPubKeyHash) ScriptAddress() []byte {\n\treturn addr.AddressPubKeyHash.ScriptAddress()\n}\n\n// IsForNet returns whether or not the address is associated with the passed\n// bitcoin network.\nfunc (addr AddressPubKeyHash) IsForNet(params *chaincfg.Params) bool {\n\treturn addr.AddressPubKeyHash.IsForNet(params)\n}\n\n// BitcoinAddress returns the address as if it was a Bitcoin address.\nfunc (addr AddressPubKeyHash) BitcoinAddress() btcutil.Address {\n\treturn addr.AddressPubKeyHash\n}\n\n// AddressScriptHash represents an address for P2SH transactions for Zcash that\n// is compatible with the Bitcoin Compat API.\ntype AddressScriptHash struct {\n\t*btcutil.AddressScriptHash\n\tparams *Params\n}\n\n// NewAddressScriptHash returns a new AddressScriptHash that is compatible with\n// the Bitcoin Compat API.\nfunc NewAddressScriptHash(script []byte, params *Params) (AddressScriptHash, error) {\n\taddr, err := btcutil.NewAddressScriptHash(script, params.Params)\n\treturn AddressScriptHash{AddressScriptHash: addr, params: params}, err\n}\n\n// NewAddressScriptHashFromHash returns a new AddressScriptHash that is compatible with\n// the Bitcoin Compat API.\nfunc NewAddressScriptHashFromHash(scriptHash []byte, params *Params) (AddressScriptHash, error) {\n\taddr, err := btcutil.NewAddressScriptHashFromHash(scriptHash, params.Params)\n\treturn AddressScriptHash{AddressScriptHash: addr, params: params}, err\n}\n\n// String returns the string encoding of the transaction output destination.\n//\n// Please note that String differs subtly from EncodeAddress: String will return\n// the value as a string without any conversion, while EncodeAddress may convert\n// destination types (for example, converting pubkeys to P2PKH addresses) before\n// encoding as a payment address string.\nfunc (addr AddressScriptHash) String() string {\n\treturn addr.EncodeAddress()\n}\n\n// BitcoinAddress returns the address as if it was a Bitcoin address.\nfunc (addr AddressScriptHash) BitcoinAddress() btcutil.Address {\n\treturn addr.AddressScriptHash\n}\n\n// EncodeAddress returns the string encoding of the payment address associated\n// with the Address value. See the comment on String for how this method differs\n// from String.\nfunc (addr AddressScriptHash) EncodeAddress() string {\n\thash := *addr.AddressScriptHash.Hash160()\n\treturn encodeAddress(hash[:], addr.params.P2SHPrefix)\n}\n\n// ScriptAddress returns the raw bytes of the address to be used when inserting\n// the address into a txout's script.\nfunc (addr AddressScriptHash) ScriptAddress() []byte {\n\treturn addr.AddressScriptHash.ScriptAddress()\n}\n\n// IsForNet returns whether or not the address is associated with the passed\n// bitcoin network.\nfunc (addr AddressScriptHash) IsForNet(params *chaincfg.Params) bool {\n\treturn addr.AddressScriptHash.IsForNet(params)\n}\n\n// addressFromRawBytes decodes a string-representation of an address to an address\n// type that implements the zcash.Address interface\nfunc addressFromRawBytes(addrBytes []byte, params *Params) (Address, error) {\n\tvar addrType uint8\n\tvar err error\n\tvar hash [20]byte\n\n\tswitch len(addrBytes) {\n\tcase ripemd160.Size + 5:\n\t\taddrType, err = addressType(addrBytes[:1], params)\n\t\tcopy(hash[:], addrBytes[1:21])\n\tcase ripemd160.Size + 6:\n\t\taddrType, err = addressType(addrBytes[:2], params)\n\t\tcopy(hash[:], addrBytes[2:22])\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"validating address length: expected %v or %v, got %v\", ripemd160.Size+5, ripemd160.Size+6, len(addrBytes))\n\t}\n\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"parsing address type: %v\", err)\n\t}\n\n\tswitch addrType {\n\tcase 0: // P2PKH\n\t\treturn NewAddressPubKeyHash(hash[:], params)\n\tcase 1: // P2SH\n\t\treturn NewAddressScriptHashFromHash(hash[:], params)\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unexpected address type: %v\", addrType)\n\t}\n}\n\nfunc encodeAddress(hash, prefix []byte) string {\n\tvar (\n\t\tbody  = append(prefix, hash...)\n\t\tchk   = checksum(body)\n\t\tcksum [4]byte\n\t)\n\tcopy(cksum[:], chk[:4])\n\treturn base58.Encode(append(body, cksum[:]...))\n}\n\nfunc checksum(input []byte) (cksum [4]byte) {\n\tvar (\n\t\th  = sha256.Sum256(input)\n\t\th2 = sha256.Sum256(h[:])\n\t)\n\tcopy(cksum[:], h2[:4])\n\treturn\n}\n"
  },
  {
    "path": "chain/zcash/address_test.go",
    "content": "package zcash_test\n\nimport (\n\t\"bytes\"\n\t\"math/rand\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n\n\t\"github.com/btcsuite/btcd/btcec\"\n\t\"github.com/btcsuite/btcutil\"\n\t\"github.com/renproject/id\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/multichain/chain/zcash\"\n)\n\nvar _ = Describe(\"Zcash Address\", func() {\n\tContext(\"address\", func() {\n\t\taddrEncodeDecoder := zcash.NewAddressEncodeDecoder(&zcash.RegressionNetParams)\n\n\t\tIt(\"addr pub key hash\", func() {\n\t\t\tpk := id.NewPrivKey()\n\t\t\twif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), zcash.RegressionNetParams.Params, true)\n\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\taddrPubKeyHash, err := zcash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &zcash.RegressionNetParams)\n\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\taddr := address.Address(addrPubKeyHash.EncodeAddress())\n\n\t\t\tdecodedRawAddr, err := addrEncodeDecoder.DecodeAddress(addr)\n\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\tencodedAddr, err := addrEncodeDecoder.EncodeAddress(decodedRawAddr)\n\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\tExpect(encodedAddr).To(Equal(addr))\n\t\t})\n\n\t\tIt(\"addr script hash\", func() {\n\t\t\tscript := make([]byte, rand.Intn(100))\n\t\t\trand.Read(script)\n\t\t\taddrScriptHash, err := zcash.NewAddressScriptHash(script, &zcash.RegressionNetParams)\n\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\taddr := address.Address(addrScriptHash.EncodeAddress())\n\n\t\t\tdecodedRawAddr, err := addrEncodeDecoder.DecodeAddress(addr)\n\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\tencodedAddr, err := addrEncodeDecoder.EncodeAddress(decodedRawAddr)\n\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\tExpect(encodedAddr).To(Equal(addr))\n\t\t})\n\t})\n\n\tContext(\"AddressEncodeDecoder\", func() {\n\t\tIt(\"should give an error when decoding address on different network\", func() {\n\t\t\tparams := []zcash.Params{\n\t\t\t\tzcash.MainNetParams,\n\t\t\t\tzcash.TestNet3Params,\n\t\t\t\tzcash.RegressionNetParams,\n\t\t\t}\n\n\t\t\tfor i, param := range params {\n\t\t\t\t// Generate a P2PKH address with the params\n\t\t\t\tpk := id.NewPrivKey()\n\t\t\t\twif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), param.Params, true)\n\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\taddrPubKeyHash, err := zcash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &param)\n\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\tp2pkhAddr := address.Address(addrPubKeyHash.EncodeAddress())\n\n\t\t\t\t// Generate a P2SH address with the params\n\t\t\t\tscript := make([]byte, rand.Intn(100))\n\t\t\t\trand.Read(script)\n\t\t\t\taddrScriptHash, err := zcash.NewAddressScriptHash(script, &param)\n\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\tp2shAddr := address.Address(addrScriptHash.EncodeAddress())\n\n\t\t\t\t// Try decode the address using decoders with different network params\n\t\t\t\tfor j := range params {\n\t\t\t\t\taddrEncodeDecoder := zcash.NewAddressEncodeDecoder(&params[j])\n\t\t\t\t\t_, err := addrEncodeDecoder.DecodeAddress(p2pkhAddr)\n\t\t\t\t\t// Check the prefix in the params instead of comparing the network directly\n\t\t\t\t\t// because testnet and regression network has the same prefix.\n\t\t\t\t\tif bytes.Equal(params[i].P2PKHPrefix, params[j].P2PKHPrefix) {\n\t\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t} else {\n\t\t\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t\t\t}\n\n\t\t\t\t\t_, err = addrEncodeDecoder.DecodeAddress(p2shAddr)\n\t\t\t\t\tif bytes.Equal(params[i].P2PKHPrefix, params[j].P2PKHPrefix) {\n\t\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t} else {\n\t\t\t\t\t\tExpect(err).To(HaveOccurred())\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/zcash/gas.go",
    "content": "package zcash\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"math\"\n\n\t\"github.com/renproject/pack\"\n)\n\nconst (\n\tmultiplier     = 1e8\n\tkilobyteToByte = 1024\n)\n\n// A GasEstimator returns the SATs-per-byte that is needed in order to confirm\n// transactions with an estimated maximum delay of one block. In distributed\n// networks that collectively build, sign, and submit transactions, it is\n// important that all nodes in the network have reached consensus on the\n// SATs-per-byte.\ntype GasEstimator struct {\n\tclient      Client\n\tnumBlocks   int64\n\tfallbackGas pack.U256\n}\n\n// NewGasEstimator returns a simple gas estimator that always returns the given\n// number of SATs-per-byte.\nfunc NewGasEstimator(client Client, numBlocks int64, fallbackGas pack.U256) GasEstimator {\n\treturn GasEstimator{\n\t\tclient:      client,\n\t\tnumBlocks:   numBlocks,\n\t\tfallbackGas: fallbackGas,\n\t}\n}\n\n// EstimateGas returns the number of SATs-per-byte (for both price and cap) that\n// is needed in order to confirm transactions with an estimated maximum delay of\n// `numBlocks` block. It is the responsibility of the caller to know the number\n// of bytes in their transaction. This method calls the `estimatesmartfee` RPC\n// call to the node, which based on a conservative (considering longer history)\n// strategy returns the estimated BTC per kilobyte of data in the transaction.\n// An error will be returned if the bitcoin node hasn't observed enough blocks\n// to make an estimate for the provided target `numBlocks`.\nfunc (gasEstimator GasEstimator) EstimateGas(ctx context.Context) (pack.U256, pack.U256, error) {\n\tfeeRate, err := gasEstimator.client.EstimateFeeLegacy(ctx, gasEstimator.numBlocks)\n\tif err != nil {\n\t\treturn gasEstimator.fallbackGas, gasEstimator.fallbackGas, err\n\t}\n\n\tif feeRate <= 0.0 {\n\t\treturn gasEstimator.fallbackGas, gasEstimator.fallbackGas, fmt.Errorf(\"invalid fee rate: %v\", feeRate)\n\t}\n\n\tsatsPerByte := uint64(math.Ceil(feeRate * multiplier / kilobyteToByte))\n\treturn pack.NewU256FromUint64(satsPerByte), pack.NewU256FromUint64(satsPerByte), nil\n}\n"
  },
  {
    "path": "chain/zcash/gas_test.go",
    "content": "package zcash_test\n\nimport (\n\t\"context\"\n\n\t\"github.com/renproject/multichain/chain/zcash\"\n\t\"github.com/renproject/pack\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Gas\", func() {\n\tContext(\"when estimating zcash network fee\", func() {\n\t\tIt(\"should work\", func() {\n\t\t\tctx, cancel := context.WithCancel(context.Background())\n\t\t\tdefer cancel()\n\n\t\t\tclient := zcash.NewClient(zcash.DefaultClientOptions())\n\n\t\t\t// estimate fee to include tx within 1 block.\n\t\t\tfallback1 := uint64(123)\n\t\t\tgasEstimator1 := zcash.NewGasEstimator(client, 1, pack.NewU256FromUint64(fallback1))\n\t\t\tgasPrice1, _, err := gasEstimator1.EstimateGas(ctx)\n\t\t\tif err != nil {\n\t\t\t\tExpect(gasPrice1).To(Equal(pack.NewU256FromUint64(fallback1)))\n\t\t\t}\n\n\t\t\t// estimate fee to include tx within 10 blocks.\n\t\t\tfallback2 := uint64(234)\n\t\t\tgasEstimator2 := zcash.NewGasEstimator(client, 10, pack.NewU256FromUint64(fallback2))\n\t\t\tgasPrice2, _, err := gasEstimator2.EstimateGas(ctx)\n\t\t\tif err != nil {\n\t\t\t\tExpect(gasPrice2).To(Equal(pack.NewU256FromUint64(fallback2)))\n\t\t\t}\n\n\t\t\t// estimate fee to include tx within 100 blocks.\n\t\t\tfallback3 := uint64(345)\n\t\t\tgasEstimator3 := zcash.NewGasEstimator(client, 100, pack.NewU256FromUint64(fallback3))\n\t\t\tgasPrice3, _, err := gasEstimator3.EstimateGas(ctx)\n\t\t\tif err != nil {\n\t\t\t\tExpect(gasPrice3).To(Equal(pack.NewU256FromUint64(fallback3)))\n\t\t\t}\n\n\t\t\t// expect fees in this order at the very least.\n\t\t\tif err == nil {\n\t\t\t\tExpect(gasPrice1.GreaterThanEqual(gasPrice2)).To(BeTrue())\n\t\t\t\tExpect(gasPrice2.GreaterThanEqual(gasPrice3)).To(BeTrue())\n\t\t\t}\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "chain/zcash/utxo.go",
    "content": "package zcash\n\nimport (\n\t\"bytes\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"math/big\"\n\n\tblake2 \"github.com/dchest/blake2b\"\n\n\t\"github.com/btcsuite/btcd/btcec\"\n\t\"github.com/btcsuite/btcd/chaincfg/chainhash\"\n\t\"github.com/btcsuite/btcd/txscript\"\n\t\"github.com/btcsuite/btcd/wire\"\n\t\"github.com/renproject/multichain/api/utxo\"\n\t\"github.com/renproject/multichain/chain/bitcoin\"\n\t\"github.com/renproject/pack\"\n)\n\n// Version of Zcash transactions supported by the multichain.\nconst Version int32 = 4\n\n// ClientOptions are used to parameterise the behaviour of the Client.\ntype ClientOptions = bitcoin.ClientOptions\n\n// DefaultClientOptions returns ClientOptions with the default settings. These\n// settings are valid for use with the default local deployment of the\n// multichain. In production, the host, user, and password should be changed.\nfunc DefaultClientOptions() ClientOptions {\n\treturn bitcoin.DefaultClientOptions().WithHost(\"http://127.0.0.1:18232\")\n}\n\n// Client re-exports bitcoin.Client.\ntype Client = bitcoin.Client\n\n// NewClient re-exports bitcoin.Client\nvar NewClient = bitcoin.NewClient\n\n// The TxBuilder is an implementation of a UTXO-compatible transaction builder\n// for Bitcoin.\ntype TxBuilder struct {\n\tparams       *Params\n\texpiryHeight uint32\n}\n\n// NewTxBuilder returns an implementation the transaction builder interface from\n// the Bitcoin Compat API, and exposes the functionality to build simple Zcash\n// transactions.\nfunc NewTxBuilder(params *Params, expiryHeight uint32) utxo.TxBuilder {\n\treturn TxBuilder{params: params, expiryHeight: expiryHeight}\n}\n\n// BuildTx returns a simple Zcash transaction that consumes the funds from the\n// given outputs, and sends the to the given recipients. The difference in the\n// sum value of the inputs and the sum value of the recipients is paid as a fee\n// to the Zcash network.\n//\n// It is assumed that the required signature scripts require the SIGHASH_ALL\n// signatures and the serialized public key:\n//\n//  builder := txscript.NewScriptBuilder()\n//  builder.AddData(append(signature.Serialize(), byte(txscript.SigHashAll|SighashForkID)))\n//  builder.AddData(serializedPubKey)\n//\n// Outputs produced for recipients will use P2PKH, or P2SH scripts as the pubkey\n// script, based on the format of the recipient address.\nfunc (txBuilder TxBuilder) BuildTx(inputs []utxo.Input, recipients []utxo.Recipient) (utxo.Tx, error) {\n\tmsgTx := wire.NewMsgTx(Version)\n\n\t// Address encoder-decoder\n\taddrEncodeDecoder := NewAddressEncodeDecoder(txBuilder.params)\n\n\t// Inputs\n\tfor _, input := range inputs {\n\t\thash := chainhash.Hash{}\n\t\tcopy(hash[:], input.Hash)\n\t\tindex := input.Output.Outpoint.Index.Uint32()\n\t\tmsgTx.AddTxIn(wire.NewTxIn(wire.NewOutPoint(&hash, index), nil, nil))\n\t}\n\n\t// Outputs\n\tfor _, recipient := range recipients {\n\t\taddrBytes, err := addrEncodeDecoder.DecodeAddress(recipient.To)\n\t\tif err != nil {\n\t\t\treturn &Tx{}, err\n\t\t}\n\t\taddr, err := addressFromRawBytes(addrBytes, txBuilder.params)\n\t\tif err != nil {\n\t\t\treturn &Tx{}, err\n\t\t}\n\t\tscript, err := txscript.PayToAddrScript(addr.BitcoinAddress())\n\t\tif err != nil {\n\t\t\treturn &Tx{}, err\n\t\t}\n\t\tvalue := recipient.Value.Int().Int64()\n\t\tif value < 0 {\n\t\t\treturn nil, fmt.Errorf(\"expected value >= 0, got value = %v\", value)\n\t\t}\n\t\tmsgTx.AddTxOut(wire.NewTxOut(value, script))\n\t}\n\treturn &Tx{inputs: inputs, recipients: recipients, msgTx: msgTx, params: txBuilder.params, expiryHeight: txBuilder.expiryHeight, signed: false}, nil\n}\n\n// Tx represents a simple Zcash transaction that implements the Bitcoin Compat\n// API.\ntype Tx struct {\n\tinputs     []utxo.Input\n\trecipients []utxo.Recipient\n\n\tmsgTx        *wire.MsgTx\n\tparams       *Params\n\texpiryHeight uint32\n\n\tsigned bool\n}\n\n// Hash returns the transaction hash of the given underlying transaction.\nfunc (tx *Tx) Hash() (pack.Bytes, error) {\n\tserial, err := tx.Serialize()\n\tif err != nil {\n\t\treturn pack.Bytes{}, err\n\t}\n\ttxhash := chainhash.DoubleHashH(serial)\n\treturn pack.NewBytes(txhash[:]), nil\n}\n\n// Inputs returns the UTXO inputs in the underlying transaction.\nfunc (tx *Tx) Inputs() ([]utxo.Input, error) {\n\treturn tx.inputs, nil\n}\n\n// Outputs returns the UTXO outputs in the underlying transaction.\nfunc (tx *Tx) Outputs() ([]utxo.Output, error) {\n\thash, err := tx.Hash()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"bad hash: %v\", err)\n\t}\n\toutputs := make([]utxo.Output, len(tx.msgTx.TxOut))\n\tfor i := range outputs {\n\t\toutputs[i].Outpoint = utxo.Outpoint{\n\t\t\tHash:  hash,\n\t\t\tIndex: pack.NewU32(uint32(i)),\n\t\t}\n\t\toutputs[i].PubKeyScript = pack.Bytes(tx.msgTx.TxOut[i].PkScript)\n\t\tif tx.msgTx.TxOut[i].Value < 0 {\n\t\t\treturn nil, fmt.Errorf(\"bad output %v: value is less than zero\", i)\n\t\t}\n\t\toutputs[i].Value = pack.NewU256FromU64(pack.NewU64(uint64(tx.msgTx.TxOut[i].Value)))\n\t}\n\treturn outputs, nil\n}\n\n// Sighashes returns the digests that must be signed before the transaction\n// can be submitted by the client.\nfunc (tx *Tx) Sighashes() ([]pack.Bytes32, error) {\n\tsighashes := make([]pack.Bytes32, len(tx.inputs))\n\tfor i, txin := range tx.inputs {\n\t\tpubKeyScript := txin.Output.PubKeyScript\n\t\tsigScript := txin.SigScript\n\t\tvalue := txin.Output.Value.Int().Int64()\n\t\tif value < 0 {\n\t\t\treturn []pack.Bytes32{}, fmt.Errorf(\"expected value >= 0, got value = %v\", value)\n\t\t}\n\n\t\tvar hash []byte\n\t\tvar err error\n\t\tif sigScript == nil {\n\t\t\thash, err = calculateSighash(tx.params, pubKeyScript, txscript.SigHashAll, tx.msgTx, i, value, tx.expiryHeight)\n\t\t} else {\n\t\t\thash, err = calculateSighash(tx.params, sigScript, txscript.SigHashAll, tx.msgTx, i, value, tx.expiryHeight)\n\t\t}\n\t\tif err != nil {\n\t\t\treturn []pack.Bytes32{}, err\n\t\t}\n\n\t\tsighash := [32]byte{}\n\t\tcopy(sighash[:], hash)\n\t\tsighashes[i] = pack.NewBytes32(sighash)\n\t}\n\treturn sighashes, nil\n}\n\n// Sign consumes a list of signatures, and adds them to the list of UTXOs in\n// the underlying transactions.\nfunc (tx *Tx) Sign(signatures []pack.Bytes65, pubKey pack.Bytes) error {\n\tif tx.signed {\n\t\treturn fmt.Errorf(\"already signed\")\n\t}\n\tif len(signatures) != len(tx.msgTx.TxIn) {\n\t\treturn fmt.Errorf(\"expected %v signatures, got %v signatures\", len(tx.msgTx.TxIn), len(signatures))\n\t}\n\n\tfor i, rsv := range signatures {\n\t\tr := new(big.Int).SetBytes(rsv[:32])\n\t\ts := new(big.Int).SetBytes(rsv[32:64])\n\t\tsignature := btcec.Signature{\n\t\t\tR: r,\n\t\t\tS: s,\n\t\t}\n\n\t\tbuilder := txscript.NewScriptBuilder()\n\t\tbuilder.AddData(append(signature.Serialize(), byte(txscript.SigHashAll)))\n\t\tbuilder.AddData(pubKey)\n\t\tif tx.inputs[i].SigScript != nil {\n\t\t\tbuilder.AddData(tx.inputs[i].SigScript)\n\t\t}\n\t\tsignatureScript, err := builder.Script()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\ttx.msgTx.TxIn[i].SignatureScript = signatureScript\n\t}\n\ttx.signed = true\n\treturn nil\n}\n\n// Serialize serializes the UTXO transaction to bytes.\nfunc (tx *Tx) Serialize() (pack.Bytes, error) {\n\tw := new(bytes.Buffer)\n\tpver := uint32(0)\n\tenc := wire.BaseEncoding\n\n\tif err := binary.Write(w, binary.LittleEndian, uint32(tx.msgTx.Version)|(1<<31)); err != nil {\n\t\treturn pack.Bytes{}, err\n\t}\n\n\tvar versionGroupID = versionOverwinterGroupID\n\tif tx.msgTx.Version == versionSapling {\n\t\tversionGroupID = versionSaplingGroupID\n\t}\n\n\tif err := binary.Write(w, binary.LittleEndian, versionGroupID); err != nil {\n\t\treturn pack.Bytes{}, err\n\t}\n\n\t// If the encoding nVersion is set to WitnessEncoding, and the Flags\n\t// field for the MsgTx aren't 0x00, then this indicates the transaction\n\t// is to be encoded using the new witness inclusionary structure\n\t// defined in BIP0144.\n\tdoWitness := enc == wire.WitnessEncoding && tx.msgTx.HasWitness()\n\tif doWitness {\n\t\t// After the txn's Version field, we include two additional\n\t\t// bytes specific to the witness encoding. The first byte is an\n\t\t// always 0x00 marker byte, which allows decoders to\n\t\t// distinguish a serialized transaction with witnesses from a\n\t\t// regular (legacy) one. The second byte is the Flag field,\n\t\t// which at the moment is always 0x01, but may be extended in\n\t\t// the future to accommodate auxiliary non-committed fields.\n\t\tif _, err := w.Write(witnessMarkerBytes); err != nil {\n\t\t\treturn pack.Bytes{}, err\n\t\t}\n\t}\n\n\tcount := uint64(len(tx.msgTx.TxIn))\n\tif err := writeVarInt(w, pver, count); err != nil {\n\t\treturn pack.Bytes{}, err\n\t}\n\n\tfor _, ti := range tx.msgTx.TxIn {\n\t\tif err := writeTxIn(w, pver, tx.msgTx.Version, ti); err != nil {\n\t\t\treturn pack.Bytes{}, err\n\t\t}\n\t}\n\n\tcount = uint64(len(tx.msgTx.TxOut))\n\tif err := writeVarInt(w, pver, count); err != nil {\n\t\treturn pack.Bytes{}, err\n\t}\n\n\tfor _, to := range tx.msgTx.TxOut {\n\t\tif err := writeTxOut(w, pver, tx.msgTx.Version, to); err != nil {\n\t\t\treturn pack.Bytes{}, err\n\t\t}\n\t}\n\n\t// If this transaction is a witness transaction, and the witness\n\t// encoded is desired, then encode the witness for each of the inputs\n\t// within the transaction.\n\tif doWitness {\n\t\tfor _, ti := range tx.msgTx.TxIn {\n\t\t\tif err := writeTxWitness(w, pver, tx.msgTx.Version, ti.Witness); err != nil {\n\t\t\t\treturn pack.Bytes{}, err\n\t\t\t}\n\t\t}\n\t}\n\n\tif err := binary.Write(w, binary.LittleEndian, tx.msgTx.LockTime); err != nil {\n\t\treturn pack.Bytes{}, err\n\t}\n\n\tif err := binary.Write(w, binary.LittleEndian, tx.expiryHeight); err != nil {\n\t\treturn pack.Bytes{}, err\n\t}\n\n\tif tx.msgTx.Version == versionSapling {\n\t\t// valueBalance\n\t\tif err := binary.Write(w, binary.LittleEndian, uint64(0)); err != nil {\n\t\t\treturn pack.Bytes{}, err\n\t\t}\n\n\t\t// nShieldedSpend\n\t\tif err := writeVarInt(w, pver, 0); err != nil {\n\t\t\treturn pack.Bytes{}, err\n\t\t}\n\n\t\t// nShieldedOutput\n\t\tif err := writeVarInt(w, pver, 0); err != nil {\n\t\t\treturn pack.Bytes{}, err\n\t\t}\n\t}\n\n\tif err := writeVarInt(w, pver, 0); err != nil {\n\t\treturn pack.Bytes{}, err\n\t}\n\n\treturn pack.NewBytes(w.Bytes()), nil\n}\n\nfunc calculateSighash(\n\tnetwork *Params,\n\tsubScript []byte,\n\thashType txscript.SigHashType,\n\ttx *wire.MsgTx,\n\tidx int,\n\tamt int64,\n\texpiryHeight uint32,\n) ([]byte, error) {\n\tsigHashes, err := txSighashes(tx)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// As a sanity check, ensure the passed input index for the transaction\n\t// is valid.\n\tif idx > len(tx.TxIn)-1 {\n\t\treturn nil, fmt.Errorf(\"blake2bSignatureHash error: idx %d but %d txins\", idx, len(tx.TxIn))\n\t}\n\n\t// We'll utilize this buffer throughout to incrementally calculate\n\t// the signature hash for this transaction.\n\tvar sigHash bytes.Buffer\n\n\t// << GetHeader\n\t// First write out, then encode the transaction's nVersion number. Zcash current nVersion = 3\n\tvar bVersion [4]byte\n\tbinary.LittleEndian.PutUint32(bVersion[:], uint32(tx.Version)|(1<<31))\n\tsigHash.Write(bVersion[:])\n\n\tvar versionGroupID = versionOverwinterGroupID\n\tif tx.Version == versionSapling {\n\t\tversionGroupID = versionSaplingGroupID\n\t}\n\n\t// << nVersionGroupId\n\t// Version group ID\n\tvar nVersion [4]byte\n\tbinary.LittleEndian.PutUint32(nVersion[:], versionGroupID)\n\tsigHash.Write(nVersion[:])\n\n\t// Next write out the possibly pre-calculated hashes for the sequence\n\t// numbers of all inputs, and the hashes of the previous outs for all\n\t// outputs.\n\tvar zeroHash chainhash.Hash\n\n\t// << hashPrevouts\n\t// If anyone can pay isn't active, then we can use the cached\n\t// hashPrevOuts, otherwise we just write zeroes for the prev outs.\n\tif hashType&txscript.SigHashAnyOneCanPay == 0 {\n\t\tsigHash.Write(sigHashes.HashPrevOuts[:])\n\t} else {\n\t\tsigHash.Write(zeroHash[:])\n\t}\n\n\t// << hashSequence\n\t// If the sighash isn't anyone can pay, single, or none, the use the\n\t// cached hash sequences, otherwise write all zeroes for the\n\t// hashSequence.\n\tif hashType&txscript.SigHashAnyOneCanPay == 0 &&\n\t\thashType&sighashMask != txscript.SigHashSingle &&\n\t\thashType&sighashMask != txscript.SigHashNone {\n\t\tsigHash.Write(sigHashes.HashSequence[:])\n\t} else {\n\t\tsigHash.Write(zeroHash[:])\n\t}\n\n\t// << hashOutputs\n\t// If the current signature mode isn't single, or none, then we can\n\t// re-use the pre-generated hashoutputs sighash fragment. Otherwise,\n\t// we'll serialize and add only the target output index to the signature\n\t// pre-image.\n\tif hashType&sighashMask != txscript.SigHashSingle && hashType&sighashMask != txscript.SigHashNone {\n\t\tsigHash.Write(sigHashes.HashOutputs[:])\n\t} else if hashType&sighashMask == txscript.SigHashSingle && idx < len(tx.TxOut) {\n\t\tvar (\n\t\t\tb bytes.Buffer\n\t\t\th chainhash.Hash\n\t\t)\n\t\tif err := wire.WriteTxOut(&b, 0, 0, tx.TxOut[idx]); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tvar err error\n\t\tif h, err = blake2b(b.Bytes(), []byte(outputsHashPersonalization)); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tsigHash.Write(h.CloneBytes())\n\t} else {\n\t\tsigHash.Write(zeroHash[:])\n\t}\n\n\t// << hashJoinSplits\n\tsigHash.Write(zeroHash[:])\n\n\t// << hashShieldedSpends\n\tif tx.Version == versionSapling {\n\t\tsigHash.Write(zeroHash[:])\n\t}\n\n\t// << hashShieldedOutputs\n\tif tx.Version == versionSapling {\n\t\tsigHash.Write(zeroHash[:])\n\t}\n\n\t// << nLockTime\n\tvar lockTime [4]byte\n\tbinary.LittleEndian.PutUint32(lockTime[:], tx.LockTime)\n\tsigHash.Write(lockTime[:])\n\n\t// << nExpiryHeight\n\tvar expiryTime [4]byte\n\tbinary.LittleEndian.PutUint32(expiryTime[:], expiryHeight)\n\tsigHash.Write(expiryTime[:])\n\n\t// << valueBalance\n\tif tx.Version == versionSapling {\n\t\tvar valueBalance [8]byte\n\t\tbinary.LittleEndian.PutUint64(valueBalance[:], 0)\n\t\tsigHash.Write(valueBalance[:])\n\t}\n\n\t// << nHashType\n\tvar bHashType [4]byte\n\tbinary.LittleEndian.PutUint32(bHashType[:], uint32(hashType))\n\tsigHash.Write(bHashType[:])\n\n\tif idx != math.MaxUint32 {\n\t\t// << prevout\n\t\t// Next, write the outpoint being spent.\n\t\tsigHash.Write(tx.TxIn[idx].PreviousOutPoint.Hash[:])\n\t\tvar bIndex [4]byte\n\t\tbinary.LittleEndian.PutUint32(bIndex[:], tx.TxIn[idx].PreviousOutPoint.Index)\n\t\tsigHash.Write(bIndex[:])\n\n\t\t// << scriptCode\n\t\t// For p2wsh outputs, and future outputs, the script code is the\n\t\t// original script, with all code separators removed, serialized\n\t\t// with a var int length prefix.\n\t\t// wire.WriteVarBytes(&sigHash, 0, subScript)\n\t\tif err := wire.WriteVarBytes(&sigHash, 0, subScript); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\t// << amount\n\t\t// Next, add the input amount, and sequence number of the input being\n\t\t// signed.\n\t\tif err := binary.Write(&sigHash, binary.LittleEndian, amt); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\t// << nSequence\n\t\tvar bSequence [4]byte\n\t\tbinary.LittleEndian.PutUint32(bSequence[:], tx.TxIn[idx].Sequence)\n\t\tsigHash.Write(bSequence[:])\n\t}\n\n\tvar h chainhash.Hash\n\tif h, err = blake2b(sigHash.Bytes(), sighashKey(expiryHeight, network)); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn h.CloneBytes(), nil\n}\n\nfunc blake2b(data, key []byte) (h chainhash.Hash, err error) {\n\thash, err := blake2.New(&blake2.Config{Person: key, Size: 32})\n\tif err != nil {\n\t\treturn h, err\n\t}\n\tif _, err = hash.Write(data); err != nil {\n\t\treturn h, err\n\t}\n\n\terr = (&h).SetBytes(hash.Sum(nil))\n\treturn h, err\n}\n\nfunc sighashKey(activationHeight uint32, network *Params) []byte {\n\tvar i int\n\tupgradeParams := network.Upgrades\n\tfor i = len(upgradeParams) - 1; i >= 0; i-- {\n\t\tif activationHeight >= upgradeParams[i].ActivationHeight {\n\t\t\tbreak\n\t\t}\n\t}\n\treturn append([]byte(blake2BSighash), upgradeParams[i].BranchID...)\n}\n\n// txSighashes computes, and returns the cached sighashes of the given\n// transaction.\nfunc txSighashes(tx *wire.MsgTx) (h *txscript.TxSigHashes, err error) {\n\th = &txscript.TxSigHashes{}\n\n\tif h.HashPrevOuts, err = calculateHashPrevOuts(tx); err != nil {\n\t\treturn\n\t}\n\n\tif h.HashSequence, err = calculateHashSequence(tx); err != nil {\n\t\treturn\n\t}\n\n\tif h.HashOutputs, err = calculateHashOutputs(tx); err != nil {\n\t\treturn\n\t}\n\n\treturn\n}\n\n// calculateHashPrevOuts calculates a single hash of all the previous\n// outputs (txid:index) referenced within the passed transaction. This\n// calculated hash can be re-used when validating all inputs spending segwit\n// outputs, with a signature hash type of SigHashAll. This allows validation to\n// re-use previous hashing computation, reducing the complexity of validating\n// SigHashAll inputs from  O(N^2) to O(N).\nfunc calculateHashPrevOuts(tx *wire.MsgTx) (chainhash.Hash, error) {\n\tvar b bytes.Buffer\n\tfor _, in := range tx.TxIn {\n\t\t// First write out the 32-byte transaction ID one of whose outputs are\n\t\t// being referenced by this input.\n\n\t\tb.Write(in.PreviousOutPoint.Hash[:])\n\n\t\t// Next, we'll encode the index of the referenced output as a little\n\t\t// endian integer.\n\t\tvar buf [4]byte\n\t\tbinary.LittleEndian.PutUint32(buf[:], in.PreviousOutPoint.Index)\n\t\tb.Write(buf[:])\n\t}\n\n\treturn blake2b(b.Bytes(), []byte(prevoutsHashPersonalization))\n}\n\n// calculateHashSequence computes an aggregated hash of each of the\n// sequence numbers within the inputs of the passed transaction. This single\n// hash can be re-used when validating all inputs spending segwit outputs, which\n// include signatures using the SigHashAll sighash type. This allows validation\n// to re-use previous hashing computation, reducing the complexity of validating\n// SigHashAll inputs from O(N^2) to O(N).\nfunc calculateHashSequence(tx *wire.MsgTx) (chainhash.Hash, error) {\n\tvar b bytes.Buffer\n\tfor _, in := range tx.TxIn {\n\t\tvar buf [4]byte\n\t\tbinary.LittleEndian.PutUint32(buf[:], in.Sequence)\n\t\tb.Write(buf[:])\n\t}\n\n\treturn blake2b(b.Bytes(), []byte(sequenceHashPersonalization))\n}\n\n// calculateHashOutputs computes a hash digest of all outputs created by\n// the transaction encoded using the wire format. This single hash can be\n// re-used when validating all inputs spending witness programs, which include\n// signatures using the SigHashAll sighash type. This allows computation to be\n// cached, reducing the total hashing complexity from O(N^2) to O(N).\nfunc calculateHashOutputs(tx *wire.MsgTx) (_ chainhash.Hash, err error) {\n\tvar b bytes.Buffer\n\tfor _, out := range tx.TxOut {\n\t\tif err = wire.WriteTxOut(&b, 0, 0, out); err != nil {\n\t\t\treturn chainhash.Hash{}, err\n\t\t}\n\t}\n\n\treturn blake2b(b.Bytes(), []byte(outputsHashPersonalization))\n}\n\n// writeTxOut encodes to into the bitcoin protocol encoding for a transaction\n// output (TxOut) to w.\n//\n// NOTE: This function is exported in order to allow txscript to compute the\n// new sighashes for witness transactions (BIP0143).\nfunc writeTxOut(w io.Writer, pver uint32, version int32, to *wire.TxOut) error {\n\tif err := binary.Write(w, binary.LittleEndian, uint64(to.Value)); err != nil {\n\t\treturn err\n\t}\n\treturn writeVarBytes(w, pver, to.PkScript)\n}\n\n// writeTxIn encodes ti to the bitcoin protocol encoding for a transaction\n// input (TxIn) to w.\nfunc writeTxIn(w io.Writer, pver uint32, version int32, ti *wire.TxIn) error {\n\terr := writeOutPoint(w, pver, version, &ti.PreviousOutPoint)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = writeVarBytes(w, pver, ti.SignatureScript)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn binary.Write(w, binary.LittleEndian, ti.Sequence)\n}\n\n// writeOutPoint encodes op to the bitcoin protocol encoding for an OutPoint\n// to w.\nfunc writeOutPoint(w io.Writer, pver uint32, version int32, op *wire.OutPoint) error {\n\t_, err := w.Write(op.Hash[:])\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn binary.Write(w, binary.LittleEndian, op.Index)\n}\n\n// writeTxWitness encodes the bitcoin protocol encoding for a transaction\n// input's witness into to w.\nfunc writeTxWitness(w io.Writer, pver uint32, version int32, wit [][]byte) error {\n\terr := writeVarInt(w, pver, uint64(len(wit)))\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor _, item := range wit {\n\t\terr = writeVarBytes(w, pver, item)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// writeVarInt serializes val to w using a variable number of bytes depending\n// on its value.\nfunc writeVarInt(w io.Writer, pver uint32, val uint64) error {\n\tif val < 0xfd {\n\t\treturn binary.Write(w, binary.LittleEndian, uint8(val))\n\t}\n\n\tif val <= math.MaxUint16 {\n\t\terr := binary.Write(w, binary.LittleEndian, 0xfd)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn binary.Write(w, binary.LittleEndian, uint16(val))\n\t}\n\n\tif val <= math.MaxUint32 {\n\t\terr := binary.Write(w, binary.LittleEndian, 0xfe)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn binary.Write(w, binary.LittleEndian, uint32(val))\n\t}\n\n\tif err := binary.Write(w, binary.LittleEndian, 0xff); err != nil {\n\t\treturn err\n\t}\n\treturn binary.Write(w, binary.LittleEndian, val)\n}\n\n// writeVarBytes serializes a variable length byte array to w as a varInt\n// containing the number of bytes, followed by the bytes themselves.\nfunc writeVarBytes(w io.Writer, pver uint32, bytes []byte) error {\n\tslen := uint64(len(bytes))\n\terr := writeVarInt(w, pver, slen)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t_, err = w.Write(bytes)\n\treturn err\n}\n"
  },
  {
    "path": "chain/zcash/utxo_test.go",
    "content": "package zcash_test\n"
  },
  {
    "path": "chain/zcash/zcash.go",
    "content": "package zcash\n\nimport (\n\t\"github.com/btcsuite/btcd/chaincfg\"\n)\n\nconst (\n\tsighashMask                 = 0x1f\n\tblake2BSighash              = \"ZcashSigHash\"\n\tprevoutsHashPersonalization = \"ZcashPrevoutHash\"\n\tsequenceHashPersonalization = \"ZcashSequencHash\"\n\toutputsHashPersonalization  = \"ZcashOutputsHash\"\n\n\tversionOverwinter        int32  = 3\n\tversionOverwinterGroupID uint32 = 0x3C48270\n\tversionSapling                  = 4\n\tversionSaplingGroupID           = 0x892f2085\n)\n\n// Params signifies the chain specific parameters of the Zcash network.\ntype Params struct {\n\t// TODO: We do not actually need to embed the entire chaincfg params object.\n\t*chaincfg.Params\n\n\tP2SHPrefix  []byte\n\tP2PKHPrefix []byte\n\tUpgrades    []ParamsUpgrade\n}\n\n// ParamsUpgrade ...\ntype ParamsUpgrade struct {\n\tActivationHeight uint32\n\tBranchID         []byte\n}\n\nvar (\n\twitnessMarkerBytes = []byte{0x00, 0x01}\n\n\t// MainNetParams defines the mainnet configuration.\n\tMainNetParams = Params{\n\t\tParams: &chaincfg.MainNetParams,\n\n\t\tP2PKHPrefix: []byte{0x1C, 0xB8},\n\t\tP2SHPrefix:  []byte{0x1C, 0xBD},\n\t\tUpgrades: []ParamsUpgrade{\n\t\t\t{0, []byte{0x00, 0x00, 0x00, 0x00}},\n\t\t\t{347500, []byte{0x19, 0x1B, 0xA8, 0x5B}},\n\t\t\t{419200, []byte{0xBB, 0x09, 0xB8, 0x76}},\n\t\t\t{653600, []byte{0x60, 0x0E, 0xB4, 0x2B}},\n\t\t\t{903000, []byte{0x0B, 0x23, 0xB9, 0xF5}},\n\t\t\t{1046400, []byte{0xA6, 0x75, 0xFF, 0xE9}},\n\t\t\t{1687104, []byte{0xB4, 0xD0, 0xD6, 0xC2}},\n\t\t},\n\t}\n\n\t// TestNet3Params defines the testnet configuration.\n\tTestNet3Params = Params{\n\t\tParams: &chaincfg.TestNet3Params,\n\n\t\tP2PKHPrefix: []byte{0x1D, 0x25},\n\t\tP2SHPrefix:  []byte{0x1C, 0xBA},\n\t\tUpgrades: []ParamsUpgrade{\n\t\t\t{0, []byte{0x00, 0x00, 0x00, 0x00}},\n\t\t\t{207500, []byte{0x19, 0x1B, 0xA8, 0x5B}},\n\t\t\t{280000, []byte{0xBB, 0x09, 0xB8, 0x76}},\n\t\t\t{584000, []byte{0x60, 0x0E, 0xB4, 0x2B}},\n\t\t\t{903800, []byte{0x0B, 0x23, 0xB9, 0xF5}},\n\t\t\t{1028500, []byte{0xA6, 0x75, 0xFF, 0xE9}},\n\t\t\t{1842420, []byte{0xB4, 0xD0, 0xD6, 0xC2}},\n\t\t},\n\t}\n\n\t// RegressionNetParams defines a devet/regnet configuration.\n\tRegressionNetParams = Params{\n\t\tParams: &chaincfg.RegressionNetParams,\n\n\t\tP2PKHPrefix: []byte{0x1D, 0x25},\n\t\tP2SHPrefix:  []byte{0x1C, 0xBA},\n\t\tUpgrades: []ParamsUpgrade{\n\t\t\t{0, []byte{0x00, 0x00, 0x00, 0x00}},\n\t\t\t{10, []byte{0x19, 0x1B, 0xA8, 0x5B}},\n\t\t\t{20, []byte{0xBB, 0x09, 0xB8, 0x76}},\n\t\t\t{30, []byte{0x60, 0x0E, 0xB4, 0x2B}},\n\t\t\t{40, []byte{0x0B, 0x23, 0xB9, 0xF5}},\n\t\t\t{50, []byte{0xA6, 0x75, 0xFF, 0xE9}},\n\t\t\t{60, []byte{0xB4, 0xD0, 0xD6, 0xC2}},\n\t\t},\n\t}\n)\n"
  },
  {
    "path": "chain/zcash/zcash_suite_test.go",
    "content": "package zcash_test\n\nimport (\n\t\"testing\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nfunc TestZcash(t *testing.T) {\n\tRegisterFailHandler(Fail)\n\tRunSpecs(t, \"Zcash Suite\")\n}\n"
  },
  {
    "path": "chain/zcash/zcash_test.go",
    "content": "package zcash_test\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\t\"reflect\"\n\t\"time\"\n\n\t\"github.com/btcsuite/btcutil\"\n\t\"github.com/renproject/id\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/multichain/api/utxo\"\n\t\"github.com/renproject/multichain/chain/zcash\"\n\t\"github.com/renproject/pack\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Zcash\", func() {\n\tContext(\"when submitting transactions\", func() {\n\t\tContext(\"when sending ZEC to multiple addresses\", func() {\n\t\t\tIt(\"should work\", func() {\n\t\t\t\t// Load private key, and assume that the associated address has\n\t\t\t\t// funds to spend. You can do this by setting ZCASH_PK to\n\t\t\t\t// the value specified in the `./multichaindeploy/.env` file.\n\t\t\t\tpkEnv := os.Getenv(\"ZCASH_PK\")\n\t\t\t\tif pkEnv == \"\" {\n\t\t\t\t\tpanic(\"ZCASH_PK is undefined\")\n\t\t\t\t}\n\t\t\t\twif, err := btcutil.DecodeWIF(pkEnv)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t// PKH\n\t\t\t\tpkhAddr, err := zcash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeCompressed()), &zcash.RegressionNetParams)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tpkhAddrUncompressed, err := zcash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &zcash.RegressionNetParams)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tlog.Printf(\"PKH                %v\", pkhAddr.EncodeAddress())\n\t\t\t\tlog.Printf(\"PKH (uncompressed) %v\", pkhAddrUncompressed.EncodeAddress())\n\n\t\t\t\t// Setup the client and load the unspent transaction outputs.\n\t\t\t\tclient := zcash.NewClient(zcash.DefaultClientOptions())\n\t\t\t\toutputs, err := client.UnspentOutputs(context.Background(), 0, 999999999, address.Address(pkhAddr.EncodeAddress()))\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tExpect(len(outputs)).To(BeNumerically(\">\", 0))\n\t\t\t\toutput := outputs[0]\n\n\t\t\t\t// Check that we can load the output and that it is equal.\n\t\t\t\t// Otherwise, something strange is happening with the RPC\n\t\t\t\t// client.\n\t\t\t\toutput2, _, err := client.Output(context.Background(), output.Outpoint)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tExpect(reflect.DeepEqual(output, output2)).To(BeTrue())\n\n\t\t\t\t// Build the transaction by consuming the outputs and spending\n\t\t\t\t// them to a set of recipients.\n\t\t\t\tinputs := []utxo.Input{\n\t\t\t\t\t{Output: output},\n\t\t\t\t}\n\t\t\t\trecipients := []utxo.Recipient{\n\t\t\t\t\t{\n\t\t\t\t\t\tTo:    address.Address(pkhAddr.EncodeAddress()),\n\t\t\t\t\t\tValue: pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) / 2)),\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tTo:    address.Address(pkhAddrUncompressed.EncodeAddress()),\n\t\t\t\t\t\tValue: pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) / 2)),\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t\ttx, err := zcash.NewTxBuilder(&zcash.RegressionNetParams, 1000000).BuildTx(inputs, recipients)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t// Get the digests that need signing from the transaction, and\n\t\t\t\t// sign them. In production, this would be done using the RZL\n\t\t\t\t// MPC algorithm, but for the purposes of this test, using an\n\t\t\t\t// explicit privkey is ok.\n\t\t\t\tsighashes, err := tx.Sighashes()\n\t\t\t\tsignatures := make([]pack.Bytes65, len(sighashes))\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tfor i := range sighashes {\n\t\t\t\t\thash := id.Hash(sighashes[i])\n\t\t\t\t\tprivKey := (*id.PrivKey)(wif.PrivKey)\n\t\t\t\t\tsignature, err := privKey.Sign(&hash)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\tsignatures[i] = pack.NewBytes65(signature)\n\t\t\t\t}\n\t\t\t\tExpect(tx.Sign(signatures, pack.NewBytes(wif.SerializePubKey()))).To(Succeed())\n\n\t\t\t\t// Submit the transaction to the Bitcoin Cash node. Again, this\n\t\t\t\t// should be running a la `./multichaindeploy`.\n\t\t\t\ttxHash, err := tx.Hash()\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\terr = client.SubmitTx(context.Background(), tx)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tlog.Printf(\"TXID               %v\", txHash)\n\n\t\t\t\t// Zcash nodes are a little slow, so we wait for 1000 ms before\n\t\t\t\t// beginning to check confirmations.\n\t\t\t\ttime.Sleep(1 * time.Second)\n\n\t\t\t\tfor {\n\t\t\t\t\t// Loop until the transaction has at least a few\n\t\t\t\t\t// confirmations. This implies that the transaction is\n\t\t\t\t\t// definitely valid, and the test has passed. We were\n\t\t\t\t\t// successfully able to use the multichain to construct and\n\t\t\t\t\t// submit a Bitcoin Cash transaction!\n\t\t\t\t\tconfs, err := client.Confirmations(context.Background(), txHash)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\tlog.Printf(\"                   %v/3 confirmations\", confs)\n\t\t\t\t\tif confs >= 3 {\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\ttime.Sleep(10 * time.Second)\n\t\t\t\t}\n\n\t\t\t\t// Check that we can load the output and that it is equal.\n\t\t\t\t// Otherwise, something strange is happening with the RPC\n\t\t\t\t// client.\n\t\t\t\toutput2, _, err = client.Output(context.Background(), output.Outpoint)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tExpect(reflect.DeepEqual(output, output2)).To(BeTrue())\n\n\t\t\t\t// Check we can get the transaction inputs\n\t\t\t\tsenders, err := client.TxSenders(context.Background(), txHash)\n\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\tExpect(len(senders)).Should(Equal(1))\n\t\t\t\tExpect(senders[0]).Should(Equal(pkhAddr.EncodeAddress()))\n\t\t\t})\n\t\t})\n\t})\n})\n"
  },
  {
    "path": "go.mod",
    "content": "module github.com/renproject/multichain\n\ngo 1.16\n\nrequire (\n\tgithub.com/btcsuite/btcd v0.22.1\n\tgithub.com/btcsuite/btcd/chaincfg/chainhash v1.0.1\n\tgithub.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce\n\tgithub.com/cosmos/cosmos-sdk v0.44.0\n\tgithub.com/dchest/blake2b v1.0.0\n\tgithub.com/ethereum/go-ethereum v1.10.23\n\tgithub.com/filecoin-project/go-address v0.0.5\n\tgithub.com/filecoin-project/go-jsonrpc v0.1.4-0.20210217175800-45ea43ac2bec\n\tgithub.com/filecoin-project/go-state-types v0.1.1-0.20210506134452-99b279731c48\n\tgithub.com/filecoin-project/lotus v1.10.0\n\tgithub.com/filecoin-project/specs-actors v0.9.13\n\tgithub.com/ipfs/go-cid v0.0.7\n\tgithub.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1\n\tgithub.com/multiformats/go-varint v0.0.6\n\tgithub.com/near/borsh-go v0.3.0\n\tgithub.com/onsi/ginkgo v1.14.0\n\tgithub.com/onsi/gomega v1.10.1\n\tgithub.com/renproject/id v0.4.2\n\tgithub.com/renproject/pack v0.2.5\n\tgithub.com/renproject/solana-ffi v0.1.2\n\tgithub.com/renproject/surge v1.2.6\n\tgithub.com/tendermint/tendermint v0.34.12\n\tgithub.com/terra-money/core v0.5.5\n\tgithub.com/tyler-smith/go-bip39 v1.1.0\n\tgo.uber.org/zap v1.17.0\n\tgolang.org/x/crypto v0.0.0-20210921155107-089bfa567519\n)\n\nreplace github.com/filecoin-project/filecoin-ffi => ./chain/filecoin/filecoin-ffi\n\nreplace github.com/renproject/solana-ffi => ./chain/solana/solana-ffi\n\nreplace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1\n"
  },
  {
    "path": "go.sum",
    "content": "cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.37.0/go.mod h1:TS1dMSSfndXH133OKGwekG838Om/cQT0BUHV3HcBgoo=\ncloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=\ncloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg=\ncloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=\ncloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=\ncloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=\ncloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=\ncloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=\ncloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw=\ncloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=\ncloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=\ncloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=\ncloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=\ncloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=\ncloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=\ncloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=\ncloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=\ncloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=\ncloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=\ncloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=\ncloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=\ncloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=\ncloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=\ncloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=\ncloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=\ncloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=\ncloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=\ncloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o=\ncloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=\ncloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=\ncloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=\ncloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=\ncloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=\ncloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=\ncloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=\ncloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=\ncloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=\ncloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=\ncloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=\ncloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=\ncollectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE=\ncontrib.go.opencensus.io/exporter/jaeger v0.1.0/go.mod h1:VYianECmuFPwU37O699Vc1GOcy+y8kOsfaxHRImmjbA=\ncontrib.go.opencensus.io/exporter/prometheus v0.1.0 h1:SByaIoWwNgMdPSgl5sMqM2KDE5H/ukPWBRo314xiDvg=\ncontrib.go.opencensus.io/exporter/prometheus v0.1.0/go.mod h1:cGFniUXGZlKRjzOyuZJ6mgB+PgBcCIa79kEKR8YCW+A=\ndmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU=\ndmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=\ndmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU=\ndmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4=\ndmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU=\nfilippo.io/edwards25519 v1.0.0-beta.2 h1:/BZRNzm8N4K4eWfK28dL4yescorxtO7YG1yun8fy+pI=\nfilippo.io/edwards25519 v1.0.0-beta.2/go.mod h1:X+pm78QAUPtFLi1z9PYIlS/bdDnvbCOGKtZ+ACWEf7o=\ngit.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=\ngithub.com/99designs/keyring v1.1.6 h1:kVDC2uCgVwecxCk+9zoCt2uEL6dt+dfVzMvGgnVcIuM=\ngithub.com/99designs/keyring v1.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU=\ngithub.com/AndreasBriese/bbloom v0.0.0-20180913140656-343706a395b7/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8=\ngithub.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8=\ngithub.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4=\ngithub.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc=\ngithub.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM=\ngithub.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I=\ngithub.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo=\ngithub.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4=\ngithub.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=\ngithub.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=\ngithub.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc=\ngithub.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA=\ngithub.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g=\ngithub.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=\ngithub.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0=\ngithub.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM=\ngithub.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=\ngithub.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=\ngithub.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=\ngithub.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I=\ngithub.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=\ngithub.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=\ngithub.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg=\ngithub.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4=\ngithub.com/CosmWasm/wasmvm v0.16.0 h1:87jyCTcCpuSx7a8s5ed9N/E/XV13XZflxa0/OplwSmA=\ngithub.com/CosmWasm/wasmvm v0.16.0/go.mod h1:Id107qllDJyJjVQQsKMOy2YYF98sqPJ2t+jX1QES40A=\ngithub.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=\ngithub.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=\ngithub.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=\ngithub.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ=\ngithub.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo=\ngithub.com/GeertJohan/go.incremental v1.0.0 h1:7AH+pY1XUgQE4Y1HcXYaMqAI0m9yrFqo/jt0CW30vsg=\ngithub.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0=\ngithub.com/GeertJohan/go.rice v1.0.0 h1:KkI6O9uMaQU3VEKaj01ulavtF7o1fWT7+pk/4voiMLQ=\ngithub.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0=\ngithub.com/Gurpartap/async v0.0.0-20180927173644-4f7f499dd9ee/go.mod h1:W0GbEAA4uFNYOGG2cJpmFJ04E6SD1NLELPYZB57/7AY=\ngithub.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=\ngithub.com/Kubuxu/go-os-helper v0.0.1/go.mod h1:N8B+I7vPCT80IcP58r50u4+gEEcsZETFUpAzWW2ep1Y=\ngithub.com/Masterminds/glide v0.13.2/go.mod h1:STyF5vcenH/rUqTEv+/hBXlSTo7KYwg2oc2f4tzPWic=\ngithub.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=\ngithub.com/Masterminds/vcs v1.13.0/go.mod h1:N09YCmOQr6RLxC6UNHzuVwAdodYbbnycGHSmwVJjcKA=\ngithub.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE=\ngithub.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=\ngithub.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=\ngithub.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=\ngithub.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=\ngithub.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=\ngithub.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=\ngithub.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk=\ngithub.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=\ngithub.com/Stebalien/go-bitfield v0.0.0-20180330043415-076a62f9ce6e/go.mod h1:3oM7gXIttpYDAJXpVNnSCiUMYBLIZ6cb1t+Ip982MRo=\ngithub.com/Stebalien/go-bitfield v0.0.1 h1:X3kbSSPUaJK60wV2hjOPZwmpljr6VGCqdq4cBLhbQBo=\ngithub.com/Stebalien/go-bitfield v0.0.1/go.mod h1:GNjFpasyUVkHMsfEOk8EFLJ9syQ6SI+XWrX9Wf2XH0s=\ngithub.com/VictoriaMetrics/fastcache v1.5.7/go.mod h1:ptDBkNMQI4RtmVo8VS/XwRY6RoTu1dAWCbrk+6WsEM8=\ngithub.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o=\ngithub.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw=\ngithub.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE=\ngithub.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=\ngithub.com/Workiva/go-datastructures v1.0.52 h1:PLSK6pwn8mYdaoaCZEMsXBpBotr4HHn9abU0yMQt0NI=\ngithub.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3UkzuWYS/oBZz5a7VVA=\ngithub.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20201201074141-dd0ecada1be6/go.mod h1:eSYp2T6f0apnuW8TzhV3f6Aff2SE8Dwio++U4ha4yEM=\ngithub.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo=\ngithub.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=\ngithub.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=\ngithub.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=\ngithub.com/akavel/rsrc v0.8.0 h1:zjWn7ukO9Kc5Q62DOJCcxGpXC18RawVtYAGdz2aLlfw=\ngithub.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c=\ngithub.com/alecthomas/jsonschema v0.0.0-20200530073317-71f438968921/go.mod h1:/n6+1/DWPltRLWL/VKyUxg6tzsl5kHUCcraimt4vr60=\ngithub.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=\ngithub.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=\ngithub.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=\ngithub.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=\ngithub.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=\ngithub.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=\ngithub.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=\ngithub.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=\ngithub.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=\ngithub.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0=\ngithub.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=\ngithub.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=\ngithub.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ=\ngithub.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=\ngithub.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=\ngithub.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=\ngithub.com/armon/go-metrics v0.3.9 h1:O2sNqxBdvq8Eq5xmzljcYzAORli6RWCvEym4cJf9m18=\ngithub.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc=\ngithub.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=\ngithub.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=\ngithub.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A=\ngithub.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU=\ngithub.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=\ngithub.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=\ngithub.com/aws/aws-sdk-go v1.32.11/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=\ngithub.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=\ngithub.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo=\ngithub.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y=\ngithub.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo=\ngithub.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM=\ngithub.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8=\ngithub.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4=\ngithub.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0=\ngithub.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM=\ngithub.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw=\ngithub.com/beevik/ntp v0.2.0/go.mod h1:hIHWr+l3+/clUnF44zdK+CWW7fO8dR5cIylAQ76NRpg=\ngithub.com/benbjohnson/clock v1.0.1/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM=\ngithub.com/benbjohnson/clock v1.0.2/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM=\ngithub.com/benbjohnson/clock v1.0.3 h1:vkLuvpK4fmtSCuo60+yC63p7y0BmQ8gm5ZXGuBCJyXg=\ngithub.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM=\ngithub.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=\ngithub.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=\ngithub.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=\ngithub.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=\ngithub.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY=\ngithub.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=\ngithub.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84=\ngithub.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM=\ngithub.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c=\ngithub.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=\ngithub.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g=\ngithub.com/briandowns/spinner v1.11.1/go.mod h1:QOuQk7x+EaDASo80FEXwlwiA+j/PPIcX3FScO+3/ZPQ=\ngithub.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ=\ngithub.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0=\ngithub.com/btcsuite/btcd v0.0.0-20190213025234-306aecffea32/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8=\ngithub.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8=\ngithub.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI=\ngithub.com/btcsuite/btcd v0.0.0-20190605094302-a0d1e3e36d50/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI=\ngithub.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI=\ngithub.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ=\ngithub.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94=\ngithub.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA=\ngithub.com/btcsuite/btcd v0.22.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c=\ngithub.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y=\ngithub.com/btcsuite/btcd/btcec/v2 v2.2.0 h1:fzn1qaOt32TuLjFlkzYSsBC35Q3KUjT1SwPxiMSCF5k=\ngithub.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU=\ngithub.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U=\ngithub.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc=\ngithub.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f h1:bAs4lUbRJpnnkd9VhRV3jjAVU7DJVjMaK+IsvSeZvFo=\ngithub.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA=\ngithub.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=\ngithub.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=\ngithub.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=\ngithub.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts=\ngithub.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pYCvA5t0RPmAaLUhREsKuKd+SLhxFbFeQ=\ngithub.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o=\ngithub.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg=\ngithub.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY=\ngithub.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I=\ngithub.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc=\ngithub.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc=\ngithub.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY=\ngithub.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs=\ngithub.com/buger/goterm v0.0.0-20200322175922-2f3e71b85129/go.mod h1:u9UyCz2eTrSGy6fbupqJ54eY5c4IC8gREQ1053dK12U=\ngithub.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=\ngithub.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34=\ngithub.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=\ngithub.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=\ngithub.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=\ngithub.com/certifi/gocertifi v0.0.0-20200211180108-c7c1fbc02894/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=\ngithub.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk=\ngithub.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s=\ngithub.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=\ngithub.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=\ngithub.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=\ngithub.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=\ngithub.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ=\ngithub.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=\ngithub.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=\ngithub.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=\ngithub.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs=\ngithub.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=\ngithub.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=\ngithub.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE=\ngithub.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=\ngithub.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U=\ngithub.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304=\ngithub.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=\ngithub.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=\ngithub.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=\ngithub.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=\ngithub.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA=\ngithub.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI=\ngithub.com/cockroachdb/pebble v0.0.0-20200916222308-4e219a90ba5b/go.mod h1:hU7vhtrqonEphNF+xt8/lHdaBprxmV1h8BOGrd9XwmQ=\ngithub.com/cockroachdb/pebble v0.0.0-20201001221639-879f3bfeef07/go.mod h1:hU7vhtrqonEphNF+xt8/lHdaBprxmV1h8BOGrd9XwmQ=\ngithub.com/cockroachdb/redact v0.0.0-20200622112456-cd282804bbd3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=\ngithub.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=\ngithub.com/codegangsta/cli v1.20.0/go.mod h1:/qJNoX69yVSKu5o4jLyXAENLRyk1uhi7zkbQ3slBdOA=\ngithub.com/coinbase/rosetta-sdk-go v0.6.10 h1:rgHD/nHjxLh0lMEdfGDqpTtlvtSBwULqrrZ2qPdNaCM=\ngithub.com/coinbase/rosetta-sdk-go v0.6.10/go.mod h1:J/JFMsfcePrjJZkwQFLh+hJErkAmdm9Iyy3D5Y0LfXo=\ngithub.com/confio/ics23/go v0.0.0-20200817220745-f173e6211efb/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg=\ngithub.com/confio/ics23/go v0.6.3/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg=\ngithub.com/confio/ics23/go v0.6.6 h1:pkOy18YxxJ/r0XFDCnrl4Bjv6h4LkBSpLS6F38mrKL8=\ngithub.com/confio/ics23/go v0.6.6/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg=\ngithub.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ=\ngithub.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q=\ngithub.com/containerd/cgroups v0.0.0-20201119153540-4cbc285b3327/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE=\ngithub.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=\ngithub.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=\ngithub.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=\ngithub.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=\ngithub.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=\ngithub.com/coreos/go-semver v0.2.1-0.20180108230905-e214231b295a/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=\ngithub.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=\ngithub.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=\ngithub.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=\ngithub.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=\ngithub.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=\ngithub.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=\ngithub.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=\ngithub.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=\ngithub.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=\ngithub.com/corpix/uarand v0.1.1/go.mod h1:SFKZvkcRoLqVRFZ4u25xPmp6m9ktANfbpXZ7SJ0/FNU=\ngithub.com/cosmos/cosmos-sdk v0.44.0 h1:eOSjACNtTnThEJ62IsS+pMm3OIU6hgMVqrp4TZClLZo=\ngithub.com/cosmos/cosmos-sdk v0.44.0/go.mod h1:orG0jzFJ2KsDfzLd/X0JSOMzF4Oxc/BQz2GkcYF4gRE=\ngithub.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y=\ngithub.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY=\ngithub.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw=\ngithub.com/cosmos/iavl v0.15.0-rc3.0.20201009144442-230e9bdf52cd/go.mod h1:3xOIaNNX19p0QrX0VqWa6voPRoJRGGYtny+DH8NEPvE=\ngithub.com/cosmos/iavl v0.15.0-rc5/go.mod h1:WqoPL9yPTQ85QBMT45OOUzPxG/U/JcJoN7uMjgxke/I=\ngithub.com/cosmos/iavl v0.15.3/go.mod h1:OLjQiAQ4fGD2KDZooyJG9yz+p2ao2IAYSbke8mVvSA4=\ngithub.com/cosmos/iavl v0.16.0 h1:ICIOB8xysirTX27GmVAaoeSpeozzgSu9d49w36xkVJA=\ngithub.com/cosmos/iavl v0.16.0/go.mod h1:2A8O/Jz9YwtjqXMO0CjnnbTYEEaovE8jWcwrakH3PoE=\ngithub.com/cosmos/ibc-go v1.1.0 h1:qtiBbiFR1hbxQ0h66FbjTZnzUjZNpndHghl9gZcoZjY=\ngithub.com/cosmos/ibc-go v1.1.0/go.mod h1:1y0rXG5xsOIrmVGb0pv1poYbiTW+1cz4GX0VGDwJAgA=\ngithub.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4=\ngithub.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY=\ngithub.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI=\ngithub.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI=\ngithub.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk=\ngithub.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=\ngithub.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=\ngithub.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=\ngithub.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=\ngithub.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=\ngithub.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 h1:HVTnpeuvF6Owjd5mniCL8DEXo7uYXdQEmOP4FJbV5tg=\ngithub.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE=\ngithub.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=\ngithub.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=\ngithub.com/cskr/pubsub v1.0.2 h1:vlOzMhl6PFn60gRlTQQsIfVwaPB/B/8MziK8FhEPt/0=\ngithub.com/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis=\ngithub.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=\ngithub.com/daaku/go.zipexe v1.0.0 h1:VSOgZtH418pH9L16hC/JrgSNJbbAL26pj7lmD1+CGdY=\ngithub.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E=\ngithub.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU=\ngithub.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U=\ngithub.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg=\ngithub.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=\ngithub.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4=\ngithub.com/davidlazar/go-crypto v0.0.0-20190912175916-7055855a373f h1:BOaYiTvg8p9vBUXpklC22XSK/mifLF7lG9jtmYYi3Tc=\ngithub.com/davidlazar/go-crypto v0.0.0-20190912175916-7055855a373f/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4=\ngithub.com/dchest/blake2b v1.0.0 h1:KK9LimVmE0MjRl9095XJmKqZ+iLxWATvlcpVFRtaw6s=\ngithub.com/dchest/blake2b v1.0.0/go.mod h1:U034kXgbJpCle2wSk5ybGIVhOSHCVLMDqOzcPEA0F7s=\ngithub.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ=\ngithub.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4=\ngithub.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo=\ngithub.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0=\ngithub.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc=\ngithub.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc=\ngithub.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs=\ngithub.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218=\ngithub.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M=\ngithub.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw=\ngithub.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I=\ngithub.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE=\ngithub.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e h1:lj77EKYUpYXTd8CD/+QMIf8b6OIOTsfEBSXiAzuEHTU=\ngithub.com/detailyang/go-fallocate v0.0.0-20180908115635-432fa640bd2e/go.mod h1:3ZQK6DMPSz/QZ73jlWxBtUhNA8xZx7LzUFSq/OfP8vk=\ngithub.com/dgraph-io/badger v1.5.5-0.20190226225317-8115aed38f8f/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ=\ngithub.com/dgraph-io/badger v1.6.0-rc1/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4=\ngithub.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4=\ngithub.com/dgraph-io/badger v1.6.1 h1:w9pSFNSdq/JPM1N12Fz/F/bzo993Is1W+Q7HjPzi7yg=\ngithub.com/dgraph-io/badger v1.6.1/go.mod h1:FRmFw3uxvcpa8zG3Rxs0th+hCLIuaQg8HlNV5bjgnuU=\ngithub.com/dgraph-io/badger/v2 v2.0.3/go.mod h1:3KY8+bsP8wI0OEnQJAKpd4wIJW/Mm32yw2j/9FUVnIM=\ngithub.com/dgraph-io/badger/v2 v2.2007.1/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE=\ngithub.com/dgraph-io/badger/v2 v2.2007.2 h1:EjjK0KqwaFMlPin1ajhP943VPENHJdEz1KLIegjaI3k=\ngithub.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE=\ngithub.com/dgraph-io/ristretto v0.0.2-0.20200115201040-8f368f2f2ab3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E=\ngithub.com/dgraph-io/ristretto v0.0.2/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E=\ngithub.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E=\ngithub.com/dgraph-io/ristretto v0.0.3 h1:jh22xisGBjrEVnRZ1DVTpBVQm0Xndu8sMl0CWDzSIBI=\ngithub.com/dgraph-io/ristretto v0.0.3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E=\ngithub.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=\ngithub.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ=\ngithub.com/dgryski/go-farm v0.0.0-20190104051053-3adb47b1fb0f/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=\ngithub.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=\ngithub.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y=\ngithub.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=\ngithub.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=\ngithub.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=\ngithub.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=\ngithub.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko=\ngithub.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ=\ngithub.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=\ngithub.com/docker/docker v1.6.2/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=\ngithub.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=\ngithub.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=\ngithub.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA=\ngithub.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk=\ngithub.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y=\ngithub.com/drand/bls12-381 v0.3.2/go.mod h1:dtcLgPtYT38L3NO6mPDYH0nbpc5tjPassDqiniuAt4Y=\ngithub.com/drand/drand v1.2.1/go.mod h1:j0P7RGmVaY7E/OuO2yQOcQj7OgeZCuhgu2gdv0JAm+g=\ngithub.com/drand/kyber v1.0.1-0.20200110225416-8de27ed8c0e2/go.mod h1:UpXoA0Upd1N9l4TvRPHr1qAUBBERj6JQ/mnKI3BPEmw=\ngithub.com/drand/kyber v1.0.2/go.mod h1:x6KOpK7avKj0GJ4emhXFP5n7M7W7ChAPmnQh/OL6vRw=\ngithub.com/drand/kyber v1.1.4/go.mod h1:9+IgTq7kadePhZg7eRwSD7+bA+bmvqRK+8DtmoV5a3U=\ngithub.com/drand/kyber-bls12381 v0.2.0/go.mod h1:zQip/bHdeEB6HFZSU3v+d3cQE0GaBVQw9aR2E7AdoeI=\ngithub.com/drand/kyber-bls12381 v0.2.1/go.mod h1:JwWn4nHO9Mp4F5qCie5sVIPQZ0X6cw8XAeMRvc/GXBE=\ngithub.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=\ngithub.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=\ngithub.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=\ngithub.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b h1:HBah4D48ypg3J7Np4N+HY/ZR76fx3HEUGxDU6Uk39oQ=\ngithub.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM=\ngithub.com/dvyukov/go-fuzz v0.0.0-20200318091601-be3528f3a813/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw=\ngithub.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=\ngithub.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=\ngithub.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=\ngithub.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts=\ngithub.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=\ngithub.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw=\ngithub.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=\ngithub.com/elastic/go-sysinfo v1.3.0 h1:eb2XFGTMlSwG/yyU9Y8jVAYLIzU2sFzWXwo2gmetyrE=\ngithub.com/elastic/go-sysinfo v1.3.0/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0=\ngithub.com/elastic/go-windows v1.0.0 h1:qLURgZFkkrYyTTkvYpsZIgf83AUsdIHfvlJaqaZ7aSY=\ngithub.com/elastic/go-windows v1.0.0/go.mod h1:TsU0Nrp7/y3+VwE82FoZF8gC/XFg/Elz6CcloAxnPgU=\ngithub.com/elastic/gosigar v0.12.0/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs=\ngithub.com/ema/qdisc v0.0.0-20190904071900-b82c76788043/go.mod h1:ix4kG2zvdUd8kEKSW0ZTr1XLks0epFpI4j745DXxlNE=\ngithub.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25 h1:2vLKys4RBU4pn2T/hjXMbvwTr1Cvy5THHrQkbeY9HRk=\ngithub.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25/go.mod h1:hTr8+TLQmkUkgcuh3mcr5fjrT9c64ZzsBCdCEC6UppY=\ngithub.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g=\ngithub.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=\ngithub.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=\ngithub.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=\ngithub.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=\ngithub.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=\ngithub.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=\ngithub.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=\ngithub.com/etclabscore/go-jsonschema-walk v0.0.6/go.mod h1:VdfDY72AFAiUhy0ZXEaWSpveGjMT5JcDIm903NGqFwQ=\ngithub.com/etclabscore/go-openrpc-reflect v0.0.36/go.mod h1:0404Ky3igAasAOpyj1eESjstTyneBAIk5PgJFbK4s5E=\ngithub.com/ethereum/go-ethereum v1.9.5/go.mod h1:PwpWDrCLZrV+tfrhqqF6kPknbISMHaJv9Ln3kPCZLwY=\ngithub.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM=\ngithub.com/ethereum/go-ethereum v1.10.23 h1:Xk8XAT4/UuqcjMLIMF+7imjkg32kfVFKoeyQDaO2yWM=\ngithub.com/ethereum/go-ethereum v1.10.23/go.mod h1:EYFyF19u3ezGLD4RqOkLq+ZCXzYbLoNDdZlMt7kyKFg=\ngithub.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5 h1:BBso6MBKW8ncyZLv37o+KNyy0HrrHgfnOaGQC2qvN+A=\ngithub.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5/go.mod h1:JpoxHjuQauoxiFMl1ie8Xc/7TfLuMZ5eOCONd1sUBHg=\ngithub.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ=\ngithub.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64=\ngithub.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A=\ngithub.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg=\ngithub.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870 h1:E2s37DuLxFhQDg5gKsWoLBOB0n+ZW8s599zru8FJ2/Y=\ngithub.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0=\ngithub.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=\ngithub.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=\ngithub.com/fatih/color v1.8.0/go.mod h1:3l45GVGkyrnYNl9HoIjnp2NnNWvh6hLAqD8yTfGjnw8=\ngithub.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=\ngithub.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=\ngithub.com/fd/go-nat v1.0.0/go.mod h1:BTBu/CKvMmOMUPkKVef1pngt2WFH/lg7E6yQnulfp6E=\ngithub.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ=\ngithub.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=\ngithub.com/filecoin-project/go-address v0.0.3/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8=\ngithub.com/filecoin-project/go-address v0.0.5 h1:SSaFT/5aLfPXycUlFyemoHYhRgdyXClXCyDdNJKPlDM=\ngithub.com/filecoin-project/go-address v0.0.5/go.mod h1:jr8JxKsYx+lQlQZmF5i2U0Z+cGQ59wMIps/8YW/lDj8=\ngithub.com/filecoin-project/go-amt-ipld/v2 v2.1.0/go.mod h1:nfFPoGyX0CU9SkXX8EoCcSuHN1XcbN0c6KBh7yvP5fs=\ngithub.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20201006184820-924ee87a1349 h1:pIuR0dnMD0i+as8wNnjjHyQrnhP5O5bmba/lmgQeRgU=\ngithub.com/filecoin-project/go-amt-ipld/v2 v2.1.1-0.20201006184820-924ee87a1349/go.mod h1:vgmwKBkx+ca5OIeEvstiQgzAZnb7R6QaqE1oEDSqa6g=\ngithub.com/filecoin-project/go-amt-ipld/v3 v3.0.0/go.mod h1:Qa95YNAbtoVCTSVtX38aAC1ptBnJfPma1R/zZsKmx4o=\ngithub.com/filecoin-project/go-amt-ipld/v3 v3.1.0 h1:ZNJ9tEG5bE72vBWYiuh5bkxJVM3ViHNOmQ7qew9n6RE=\ngithub.com/filecoin-project/go-amt-ipld/v3 v3.1.0/go.mod h1:UjM2QhDFrrjD5s1CdnkJkat4ga+LqZBZgTMniypABRo=\ngithub.com/filecoin-project/go-bitfield v0.2.0/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM=\ngithub.com/filecoin-project/go-bitfield v0.2.3/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM=\ngithub.com/filecoin-project/go-bitfield v0.2.4 h1:uZ7MeE+XfM5lqrHJZ93OnhQKc/rveW8p9au0C68JPgk=\ngithub.com/filecoin-project/go-bitfield v0.2.4/go.mod h1:CNl9WG8hgR5mttCnUErjcQjGvuiZjRqK9rHVBsQF4oM=\ngithub.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2 h1:av5fw6wmm58FYMgJeoB/lK9XXrgdugYiTqkdxjTy9k8=\ngithub.com/filecoin-project/go-cbor-util v0.0.0-20191219014500-08c40a1e63a2/go.mod h1:pqTiPHobNkOVM5thSRsHYjyQfq7O5QSCMhvuu9JoDlg=\ngithub.com/filecoin-project/go-commp-utils v0.0.0-20201119054358-b88f7a96a434/go.mod h1:6s95K91mCyHY51RPWECZieD3SGWTqIFLf1mPOes9l5U=\ngithub.com/filecoin-project/go-commp-utils v0.1.0 h1:PaDxoXYh1TXnnz5kA/xSObpAQwcJSUs4Szb72nuaNdk=\ngithub.com/filecoin-project/go-commp-utils v0.1.0/go.mod h1:6s95K91mCyHY51RPWECZieD3SGWTqIFLf1mPOes9l5U=\ngithub.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03 h1:2pMXdBnCiXjfCYx/hLqFxccPoqsSveQFxVLvNxy9bus=\ngithub.com/filecoin-project/go-crypto v0.0.0-20191218222705-effae4ea9f03/go.mod h1:+viYnvGtUTgJRdy6oaeF4MTFKAfatX071MPDPBL11EQ=\ngithub.com/filecoin-project/go-data-transfer v1.0.1/go.mod h1:UxvfUAY9v3ub0a21BSK9u3pB2aq30Y0KMsG+w9/ysyo=\ngithub.com/filecoin-project/go-data-transfer v1.4.3 h1:ECEw69NOfmEZ7XN1NSBvj3KTbbH2mIczQs+Z2w4bD7c=\ngithub.com/filecoin-project/go-data-transfer v1.4.3/go.mod h1:n8kbDQXWrY1c4UgfMa9KERxNCWbOTDwdNhf2MpN9dpo=\ngithub.com/filecoin-project/go-ds-versioning v0.1.0 h1:y/X6UksYTsK8TLCI7rttCKEvl8btmWxyFMEeeWGUxIQ=\ngithub.com/filecoin-project/go-ds-versioning v0.1.0/go.mod h1:mp16rb4i2QPmxBnmanUx8i/XANp+PFCCJWiAb+VW4/s=\ngithub.com/filecoin-project/go-fil-commcid v0.0.0-20200716160307-8f644712406f/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ=\ngithub.com/filecoin-project/go-fil-commcid v0.0.0-20201016201715-d41df56b4f6a h1:hyJ+pUm/4U4RdEZBlg6k8Ma4rDiuvqyGpoICXAxwsTg=\ngithub.com/filecoin-project/go-fil-commcid v0.0.0-20201016201715-d41df56b4f6a/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ=\ngithub.com/filecoin-project/go-fil-markets v1.0.5-0.20201113164554-c5eba40d5335/go.mod h1:AJySOJC00JRWEZzRG2KsfUnqEf5ITXxeX09BE9N4f9c=\ngithub.com/filecoin-project/go-fil-markets v1.2.5 h1:bQgtXbwxKyPxSEQoUI5EaTHJ0qfzyd5NosspuADCm6Y=\ngithub.com/filecoin-project/go-fil-markets v1.2.5/go.mod h1:7JIqNBmFvOyBzk/EiPYnweVdQnWhshixb5B9b1653Ag=\ngithub.com/filecoin-project/go-hamt-ipld v0.1.5 h1:uoXrKbCQZ49OHpsTCkrThPNelC4W3LPEk0OrS/ytIBM=\ngithub.com/filecoin-project/go-hamt-ipld v0.1.5/go.mod h1:6Is+ONR5Cd5R6XZoCse1CWaXZc0Hdb/JeX+EQCQzX24=\ngithub.com/filecoin-project/go-hamt-ipld/v2 v2.0.0 h1:b3UDemBYN2HNfk3KOXNuxgTTxlWi3xVvbQP0IT38fvM=\ngithub.com/filecoin-project/go-hamt-ipld/v2 v2.0.0/go.mod h1:7aWZdaQ1b16BVoQUYR+eEvrDCGJoPLxFpDynFjYfBjI=\ngithub.com/filecoin-project/go-hamt-ipld/v3 v3.0.1/go.mod h1:gXpNmr3oQx8l3o7qkGyDjJjYSRX7hp/FGOStdqrWyDI=\ngithub.com/filecoin-project/go-hamt-ipld/v3 v3.1.0 h1:rVVNq0x6RGQIzCo1iiJlGFm9AGIZzeifggxtKMU7zmI=\ngithub.com/filecoin-project/go-hamt-ipld/v3 v3.1.0/go.mod h1:bxmzgT8tmeVQA1/gvBwFmYdT8SOFUwB3ovSUfG1Ux0g=\ngithub.com/filecoin-project/go-jsonrpc v0.1.4-0.20210217175800-45ea43ac2bec h1:rGI5I7fdU4viManxmDdbk5deZO7afe6L1Wc04dAmlOM=\ngithub.com/filecoin-project/go-jsonrpc v0.1.4-0.20210217175800-45ea43ac2bec/go.mod h1:XBBpuKIMaXIIzeqzO1iucq4GvbF8CxmXRFoezRh+Cx4=\ngithub.com/filecoin-project/go-multistore v0.0.3 h1:vaRBY4YiA2UZFPK57RNuewypB8u0DzzQwqsL0XarpnI=\ngithub.com/filecoin-project/go-multistore v0.0.3/go.mod h1:kaNqCC4IhU4B1uyr7YWFHd23TL4KM32aChS0jNkyUvQ=\ngithub.com/filecoin-project/go-padreader v0.0.0-20200903213702-ed5fae088b20 h1:+/4aUeUoKr6AKfPE3mBhXA5spIV6UcKdTYDPNU2Tdmg=\ngithub.com/filecoin-project/go-padreader v0.0.0-20200903213702-ed5fae088b20/go.mod h1:mPn+LRRd5gEKNAtc+r3ScpW2JRU/pj4NBKdADYWHiak=\ngithub.com/filecoin-project/go-paramfetch v0.0.2-0.20210614165157-25a6c7769498 h1:G10ezOvpH1CLXQ19EA9VWNwyL0mg536ujSayjV0yg0k=\ngithub.com/filecoin-project/go-paramfetch v0.0.2-0.20210614165157-25a6c7769498/go.mod h1:1FH85P8U+DUEmWk1Jkw3Bw7FrwTVUNHk/95PSPG+dts=\ngithub.com/filecoin-project/go-state-types v0.0.0-20200903145444-247639ffa6ad/go.mod h1:IQ0MBPnonv35CJHtWSN3YY1Hz2gkPru1Q9qoaYLxx9I=\ngithub.com/filecoin-project/go-state-types v0.0.0-20200904021452-1883f36ca2f4/go.mod h1:IQ0MBPnonv35CJHtWSN3YY1Hz2gkPru1Q9qoaYLxx9I=\ngithub.com/filecoin-project/go-state-types v0.0.0-20200928172055-2df22083d8ab/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g=\ngithub.com/filecoin-project/go-state-types v0.0.0-20201102161440-c8033295a1fc/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g=\ngithub.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g=\ngithub.com/filecoin-project/go-state-types v0.1.1-0.20210506134452-99b279731c48 h1:Jc4OprDp3bRDxbsrXNHPwJabZJM3iDy+ri8/1e0ZnX4=\ngithub.com/filecoin-project/go-state-types v0.1.1-0.20210506134452-99b279731c48/go.mod h1:ezYnPf0bNkTsDibL/psSz5dy4B5awOJ/E7P2Saeep8g=\ngithub.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe h1:dF8u+LEWeIcTcfUcCf3WFVlc81Fr2JKg8zPzIbBDKDw=\ngithub.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig=\ngithub.com/filecoin-project/go-statestore v0.1.0/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI=\ngithub.com/filecoin-project/go-statestore v0.1.1 h1:ufMFq00VqnT2CAuDpcGnwLnCX1I/c3OROw/kXVNSTZk=\ngithub.com/filecoin-project/go-statestore v0.1.1/go.mod h1:LFc9hD+fRxPqiHiaqUEZOinUJB4WARkRfNl10O7kTnI=\ngithub.com/filecoin-project/go-storedcounter v0.0.0-20200421200003-1c99c62e8a5b/go.mod h1:Q0GQOBtKf1oE10eSXSlhN45kDBdGvEcVOqMiffqX+N8=\ngithub.com/filecoin-project/lotus v1.10.0 h1:pZX+yVteyBQqLzfQq/5x6aEKrlR+po8OVf8syg8lgWw=\ngithub.com/filecoin-project/lotus v1.10.0/go.mod h1:GjqPFYGMIy4x+2FLA6m8Oa2+21sqewHRPZv9TcAgHaU=\ngithub.com/filecoin-project/specs-actors v0.9.4/go.mod h1:BStZQzx5x7TmCkLv0Bpa07U6cPKol6fd3w9KjMPZ6Z4=\ngithub.com/filecoin-project/specs-actors v0.9.12/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao=\ngithub.com/filecoin-project/specs-actors v0.9.13 h1:rUEOQouefi9fuVY/2HOroROJlZbOzWYXXeIh41KF2M4=\ngithub.com/filecoin-project/specs-actors v0.9.13/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao=\ngithub.com/filecoin-project/specs-actors/v2 v2.0.1/go.mod h1:v2NZVYinNIKA9acEMBm5wWXxqv5+frFEbekBFemYghY=\ngithub.com/filecoin-project/specs-actors/v2 v2.3.2/go.mod h1:UuJQLoTx/HPvvWeqlIFmC/ywlOLHNe8SNQ3OunFbu2Y=\ngithub.com/filecoin-project/specs-actors/v2 v2.3.5-0.20210114162132-5b58b773f4fb h1:orr/sMzrDZUPAveRE+paBdu1kScIUO5zm+HYeh+VlhA=\ngithub.com/filecoin-project/specs-actors/v2 v2.3.5-0.20210114162132-5b58b773f4fb/go.mod h1:LljnY2Mn2homxZsmokJZCpRuhOPxfXhvcek5gWkmqAc=\ngithub.com/filecoin-project/specs-actors/v3 v3.1.0 h1:s4qiPw8pgypqBGAy853u/zdZJ7K9cTZdM1rTiSonHrg=\ngithub.com/filecoin-project/specs-actors/v3 v3.1.0/go.mod h1:mpynccOLlIRy0QnR008BwYBwT9fen+sPR13MA1VmMww=\ngithub.com/filecoin-project/specs-actors/v4 v4.0.0 h1:vMALksY5G3J5rj3q9rbcyB+f4Tk1xrLqSgdB3jOok4s=\ngithub.com/filecoin-project/specs-actors/v4 v4.0.0/go.mod h1:TkHXf/l7Wyw4ZejyXIPS2rK8bBO0rdwhTZyQQgaglng=\ngithub.com/filecoin-project/specs-actors/v5 v5.0.0-20210512015452-4fe3889fff57/go.mod h1:283yBMMUSDB2abcjP/hhrwTkhb9h3sfM6KGrep/ZlBI=\ngithub.com/filecoin-project/specs-actors/v5 v5.0.1 h1:PrYm5AKdMlJ/55eRW5laWcnaX66gyyDYBWvH38kNAMo=\ngithub.com/filecoin-project/specs-actors/v5 v5.0.1/go.mod h1:74euMDIXorusOBs/QL/LNkYsXZdDpLJwojWw6T03pdE=\ngithub.com/filecoin-project/specs-storage v0.1.1-0.20201105051918-5188d9774506 h1:Ur/l2+6qN+lQiqjozWWc5p9UDaAMDZKTlDS98oRnlIw=\ngithub.com/filecoin-project/specs-storage v0.1.1-0.20201105051918-5188d9774506/go.mod h1:nJRRM7Aa9XVvygr3W9k6xGF46RWzr2zxF/iGoAIfA/g=\ngithub.com/filecoin-project/test-vectors/schema v0.0.5/go.mod h1:iQ9QXLpYWL3m7warwvK1JC/pTri8mnfEmKygNDqqY6E=\ngithub.com/fjl/gencodec v0.0.0-20220412091415-8bb9e558978c/go.mod h1:AzA8Lj6YtixmJWL+wkKoBGsLWy9gFrAzi4g+5bCKwpY=\ngithub.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=\ngithub.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c=\ngithub.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=\ngithub.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=\ngithub.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:1i71OnUq3iUe1ma7Lr6yG6/rjvM3emb6yoL7xLFzcVQ=\ngithub.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=\ngithub.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=\ngithub.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=\ngithub.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY=\ngithub.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=\ngithub.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20=\ngithub.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=\ngithub.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=\ngithub.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=\ngithub.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61/go.mod h1:Q0X6pkwTILDlzrGEckF6HKjXe48EgsY/l7K7vhY4MW8=\ngithub.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI=\ngithub.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww=\ngithub.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1 h1:EzDjxMg43q1tA2c0MV3tNbaontnHLplHyFF6M5KiVP0=\ngithub.com/gbrlsnchs/jwt/v3 v3.0.0-beta.1/go.mod h1:0eHX/BVySxPc6SE2mZRoppGq7qcEagxdmQnA3dzork8=\ngithub.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4=\ngithub.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4=\ngithub.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ=\ngithub.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs=\ngithub.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=\ngithub.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=\ngithub.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=\ngithub.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=\ngithub.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE=\ngithub.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24=\ngithub.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98=\ngithub.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs=\ngithub.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=\ngithub.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=\ngithub.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=\ngithub.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=\ngithub.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=\ngithub.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=\ngithub.com/go-kit/kit v0.10.0 h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo=\ngithub.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o=\ngithub.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=\ngithub.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=\ngithub.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=\ngithub.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4=\ngithub.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=\ngithub.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8=\ngithub.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI=\ngithub.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM=\ngithub.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg=\ngithub.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=\ngithub.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=\ngithub.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc=\ngithub.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8=\ngithub.com/go-openapi/jsonreference v0.19.4/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg=\ngithub.com/go-openapi/spec v0.19.7/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk=\ngithub.com/go-openapi/spec v0.19.11/go.mod h1:vqK/dIdLGCosfvYsQV3WfC7N3TiZSnGY2RZKoFK7X28=\ngithub.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=\ngithub.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=\ngithub.com/go-openapi/swag v0.19.8/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY=\ngithub.com/go-openapi/swag v0.19.11/go.mod h1:Uc0gKkdR+ojzsEpjh39QChyu92vPgIr72POcgHMAgSY=\ngithub.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=\ngithub.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=\ngithub.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=\ngithub.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=\ngithub.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg=\ngithub.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg=\ngithub.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=\ngithub.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=\ngithub.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=\ngithub.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=\ngithub.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=\ngithub.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=\ngithub.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=\ngithub.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=\ngithub.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=\ngithub.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0=\ngithub.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4=\ngithub.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=\ngithub.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=\ngithub.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=\ngithub.com/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0=\ngithub.com/gogo/gateway v1.1.0/go.mod h1:S7rR8FRQyG3QFESeSv4l2WnsyzlCLG0CzBbUUo/mbic=\ngithub.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=\ngithub.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=\ngithub.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c=\ngithub.com/gogo/status v1.0.3/go.mod h1:SavQ51ycCLnc7dGyJxp8YAmudx8xqiVrRf+6IXRsugc=\ngithub.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM=\ngithub.com/golang-jwt/jwt/v4 v4.3.0 h1:kHL1vqdqWNfATmA0FNMdmZNMyZI1U6O31X4rlIPoBog=\ngithub.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=\ngithub.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=\ngithub.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI=\ngithub.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=\ngithub.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/groupcache v0.0.0-20191027212112-611e8accdfc9/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY=\ngithub.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=\ngithub.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E=\ngithub.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=\ngithub.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=\ngithub.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=\ngithub.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\ngithub.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\ngithub.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=\ngithub.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=\ngithub.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=\ngithub.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=\ngithub.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=\ngithub.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0=\ngithub.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=\ngithub.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=\ngithub.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=\ngithub.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=\ngithub.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=\ngithub.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=\ngithub.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=\ngithub.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=\ngithub.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=\ngithub.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=\ngithub.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=\ngithub.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=\ngithub.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=\ngithub.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=\ngithub.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=\ngithub.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=\ngithub.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=\ngithub.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=\ngithub.com/golang/snappy v0.0.2-0.20190904063534-ff6b7dc882cf/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=\ngithub.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=\ngithub.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=\ngithub.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=\ngithub.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=\ngithub.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y=\ngithub.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=\ngithub.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=\ngithub.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=\ngithub.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=\ngithub.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=\ngithub.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=\ngithub.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=\ngithub.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=\ngithub.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=\ngithub.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=\ngithub.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=\ngithub.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI=\ngithub.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=\ngithub.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa h1:Q75Upo5UN4JbPFURXZ8nLKYUvF85dyFRop/vQ0Rv+64=\ngithub.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=\ngithub.com/google/gopacket v1.1.17/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM=\ngithub.com/google/gopacket v1.1.18 h1:lum7VRA9kdlvBi7/v2p7/zcbkduHaCH/SVVyurs7OpY=\ngithub.com/google/gopacket v1.1.18/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM=\ngithub.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=\ngithub.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=\ngithub.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=\ngithub.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us=\ngithub.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20=\ngithub.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=\ngithub.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=\ngithub.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=\ngithub.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=\ngithub.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=\ngithub.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs=\ngithub.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=\ngithub.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY=\ngithub.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg=\ngithub.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=\ngithub.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=\ngithub.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=\ngithub.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=\ngithub.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f h1:KMlcu9X58lhTA/KrfX8Bi1LQSO4pzoVjTiL3h4Jk+Zk=\ngithub.com/gopherjs/gopherjs v0.0.0-20190812055157-5d271430af9f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=\ngithub.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU=\ngithub.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=\ngithub.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=\ngithub.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4=\ngithub.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q=\ngithub.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=\ngithub.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=\ngithub.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=\ngithub.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=\ngithub.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=\ngithub.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=\ngithub.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=\ngithub.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=\ngithub.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=\ngithub.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=\ngithub.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=\ngithub.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc=\ngithub.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc=\ngithub.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=\ngithub.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=\ngithub.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=\ngithub.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE=\ngithub.com/grpc-ecosystem/go-grpc-middleware v1.2.0/go.mod h1:mJzapYve32yjrKlk9GbyCZHuPgZsrbyIbyKhSzOpg6s=\ngithub.com/grpc-ecosystem/go-grpc-middleware v1.2.1/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI=\ngithub.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI=\ngithub.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw=\ngithub.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y=\ngithub.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=\ngithub.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw=\ngithub.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=\ngithub.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=\ngithub.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=\ngithub.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw=\ngithub.com/grpc-ecosystem/grpc-gateway v1.14.7/go.mod h1:oYZKL012gGh6LMyg/xA7Q2yq6j8bu0wa+9w14EEthWU=\ngithub.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=\ngithub.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=\ngithub.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw=\ngithub.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU=\ngithub.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0=\ngithub.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s=\ngithub.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is=\ngithub.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s=\ngithub.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc=\ngithub.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o=\ngithub.com/gxed/go-shellwords v1.0.3/go.mod h1:N7paucT91ByIjmVJHhvoarjoQnmsi3Jd3vH7VqgtMxQ=\ngithub.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU=\ngithub.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48=\ngithub.com/gxed/pubsub v0.0.0-20180201040156-26ebdf44f824/go.mod h1:OiEWyHgK+CWrmOlVquHaIK1vhpUJydC9m0Je6mhaiNE=\ngithub.com/hako/durafmt v0.0.0-20200710122514-c0fb7b4da026/go.mod h1:5Scbynm8dF1XAPwIwkGPqzkM/shndPm79Jd1003hTjE=\ngithub.com/hannahhoward/cbor-gen-for v0.0.0-20200817222906-ea96cece81f1 h1:F9k+7wv5OIk1zcq23QpdiL0hfDuXPjuOmMNaC6fgQ0Q=\ngithub.com/hannahhoward/cbor-gen-for v0.0.0-20200817222906-ea96cece81f1/go.mod h1:jvfsLIxk0fY/2BKSQ1xf2406AKA5dwMmKKv0ADcOfN8=\ngithub.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e h1:3YKHER4nmd7b5qy5t0GWDTwSn4OyRgfAXSmo6VnryBY=\ngithub.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e/go.mod h1:I8h3MITA53gN9OnWGCgaMa0JWVRdXthWw4M3CPM54OY=\ngithub.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=\ngithub.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE=\ngithub.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=\ngithub.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=\ngithub.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=\ngithub.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=\ngithub.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE=\ngithub.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0=\ngithub.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=\ngithub.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=\ngithub.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0=\ngithub.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=\ngithub.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=\ngithub.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=\ngithub.com/hashicorp/go-multierror v1.1.0 h1:B9UzwGQJehnUY1yNrnwREHc3fGbC2xefo8g4TbElacI=\ngithub.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA=\ngithub.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=\ngithub.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=\ngithub.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=\ngithub.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=\ngithub.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=\ngithub.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE=\ngithub.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=\ngithub.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=\ngithub.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=\ngithub.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=\ngithub.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=\ngithub.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=\ngithub.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=\ngithub.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs=\ngithub.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=\ngithub.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=\ngithub.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=\ngithub.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=\ngithub.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=\ngithub.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=\ngithub.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=\ngithub.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87 h1:uUjLpLt6bVvZ72SQc/B4dXcPBw4Vgd7soowdRl52qEM=\ngithub.com/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87/go.mod h1:XGsKKeXxeRr95aEOgipvluMPlgjr7dGlk9ZTWOjcUcg=\ngithub.com/hodgesds/perf-utils v0.0.8/go.mod h1:F6TfvsbtrF88i++hou29dTXlI2sfsJv+gRZDtmTJkAs=\ngithub.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao=\ngithub.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA=\ngithub.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw=\ngithub.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM=\ngithub.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw=\ngithub.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=\ngithub.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg=\ngithub.com/huin/goupnp v0.0.0-20180415215157-1395d1447324/go.mod h1:MZ2ZmwcBpvOoJ22IJsc7va19ZwoheaBk43rKg12SKag=\ngithub.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc=\ngithub.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ=\ngithub.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y=\ngithub.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o=\ngithub.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA=\ngithub.com/iancoleman/orderedmap v0.1.0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA=\ngithub.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=\ngithub.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=\ngithub.com/icrowley/fake v0.0.0-20180203215853-4178557ae428/go.mod h1:uhpZMVGznybq1itEKXj6RYw9I71qK4kH+OGMjRC4KEo=\ngithub.com/improbable-eng/grpc-web v0.14.0 h1:GdoK+cXABdB+1keuqsV1drSFO2XLYIxqt/4Rj8SWGBk=\ngithub.com/improbable-eng/grpc-web v0.14.0/go.mod h1:6hRR09jOEG81ADP5wCQju1z71g6OL4eEvELdran/3cs=\ngithub.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=\ngithub.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=\ngithub.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY=\ngithub.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY=\ngithub.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI=\ngithub.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8=\ngithub.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=\ngithub.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk=\ngithub.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE=\ngithub.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo=\ngithub.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo=\ngithub.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8=\ngithub.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE=\ngithub.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0=\ngithub.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po=\ngithub.com/ipfs/bbloom v0.0.1/go.mod h1:oqo8CVWsJFMOZqTglBG4wydCE4IQA/G2/SEofB0rjUI=\ngithub.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs=\ngithub.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0=\ngithub.com/ipfs/go-bitswap v0.0.3/go.mod h1:jadAZYsP/tcRMl47ZhFxhaNuDQoXawT8iHMg+iFoQbg=\ngithub.com/ipfs/go-bitswap v0.0.9/go.mod h1:kAPf5qgn2W2DrgAcscZ3HrM9qh4pH+X8Fkk3UPrwvis=\ngithub.com/ipfs/go-bitswap v0.1.0/go.mod h1:FFJEf18E9izuCqUtHxbWEvq+reg7o4CW5wSAE1wsxj0=\ngithub.com/ipfs/go-bitswap v0.1.2/go.mod h1:qxSWS4NXGs7jQ6zQvoPY3+NmOfHHG47mhkiLzBpJQIs=\ngithub.com/ipfs/go-bitswap v0.1.8/go.mod h1:TOWoxllhccevbWFUR2N7B1MTSVVge1s6XSMiCSA4MzM=\ngithub.com/ipfs/go-bitswap v0.3.2 h1:TdKx7lpidYe2dMAKfdeNS26y6Pc/AZX/i8doI1GV210=\ngithub.com/ipfs/go-bitswap v0.3.2/go.mod h1:AyWWfN3moBzQX0banEtfKOfbXb3ZeoOeXnZGNPV9S6w=\ngithub.com/ipfs/go-block-format v0.0.1/go.mod h1:DK/YYcsSUIVAFNwo/KZCdIIbpN0ROH/baNLgayt4pFc=\ngithub.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY=\ngithub.com/ipfs/go-block-format v0.0.3 h1:r8t66QstRp/pd/or4dpnbVfXT5Gt7lOqRvC+/dDTpMc=\ngithub.com/ipfs/go-block-format v0.0.3/go.mod h1:4LmD4ZUw0mhO+JSKdpWwrzATiEfM7WWgQ8H5l6P8MVk=\ngithub.com/ipfs/go-blockservice v0.0.3/go.mod h1:/NNihwTi6V2Yr6g8wBI+BSwPuURpBRMtYNGrlxZ8KuI=\ngithub.com/ipfs/go-blockservice v0.0.7/go.mod h1:EOfb9k/Y878ZTRY/CH0x5+ATtaipfbRhbvNSdgc/7So=\ngithub.com/ipfs/go-blockservice v0.1.0/go.mod h1:hzmMScl1kXHg3M2BjTymbVPjv627N7sYcvYaKbop39M=\ngithub.com/ipfs/go-blockservice v0.1.3/go.mod h1:OTZhFpkgY48kNzbgyvcexW9cHrpjBYIjSR0KoDOFOLU=\ngithub.com/ipfs/go-blockservice v0.1.4-0.20200624145336-a978cec6e834/go.mod h1:OTZhFpkgY48kNzbgyvcexW9cHrpjBYIjSR0KoDOFOLU=\ngithub.com/ipfs/go-blockservice v0.1.4 h1:Vq+MlsH8000KbbUciRyYMEw/NNP8UAGmcqKi4uWmFGA=\ngithub.com/ipfs/go-blockservice v0.1.4/go.mod h1:OTZhFpkgY48kNzbgyvcexW9cHrpjBYIjSR0KoDOFOLU=\ngithub.com/ipfs/go-cid v0.0.1/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM=\ngithub.com/ipfs/go-cid v0.0.2/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM=\ngithub.com/ipfs/go-cid v0.0.3/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM=\ngithub.com/ipfs/go-cid v0.0.4-0.20191112011718-79e75dffeb10/go.mod h1:/BYOuUoxkE+0f6tGzlzMvycuN+5l35VOR4Bpg2sCmds=\ngithub.com/ipfs/go-cid v0.0.4/go.mod h1:4LLaPOQwmk5z9LBgQnpkivrx8BJjUyGwTXCd5Xfj6+M=\ngithub.com/ipfs/go-cid v0.0.5/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog=\ngithub.com/ipfs/go-cid v0.0.6-0.20200501230655-7c82f3b81c00/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog=\ngithub.com/ipfs/go-cid v0.0.6/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I=\ngithub.com/ipfs/go-cid v0.0.7 h1:ysQJVJA3fNDF1qigJbsSQOdjhVLsOEoPdh0+R97k3jY=\ngithub.com/ipfs/go-cid v0.0.7/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I=\ngithub.com/ipfs/go-cidutil v0.0.2/go.mod h1:ewllrvrxG6AMYStla3GD7Cqn+XYSLqjK0vc+086tB6s=\ngithub.com/ipfs/go-datastore v0.0.1/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE=\ngithub.com/ipfs/go-datastore v0.0.5/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE=\ngithub.com/ipfs/go-datastore v0.1.0/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE=\ngithub.com/ipfs/go-datastore v0.1.1/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw=\ngithub.com/ipfs/go-datastore v0.3.0/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw=\ngithub.com/ipfs/go-datastore v0.3.1/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw=\ngithub.com/ipfs/go-datastore v0.4.0/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA=\ngithub.com/ipfs/go-datastore v0.4.1/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA=\ngithub.com/ipfs/go-datastore v0.4.2/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA=\ngithub.com/ipfs/go-datastore v0.4.4/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA=\ngithub.com/ipfs/go-datastore v0.4.5 h1:cwOUcGMLdLPWgu3SlrCckCMznaGADbPqE0r8h768/Dg=\ngithub.com/ipfs/go-datastore v0.4.5/go.mod h1:eXTcaaiN6uOlVCLS9GjJUJtlvJfM3xk23w3fyfrmmJs=\ngithub.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps=\ngithub.com/ipfs/go-ds-badger v0.0.2/go.mod h1:Y3QpeSFWQf6MopLTiZD+VT6IC1yZqaGmjvRcKeSGij8=\ngithub.com/ipfs/go-ds-badger v0.0.5/go.mod h1:g5AuuCGmr7efyzQhLL8MzwqcauPojGPUaHzfGTzuE3s=\ngithub.com/ipfs/go-ds-badger v0.0.7/go.mod h1:qt0/fWzZDoPW6jpQeqUjR5kBfhDNB65jd9YlmAvpQBk=\ngithub.com/ipfs/go-ds-badger v0.2.1/go.mod h1:Tx7l3aTph3FMFrRS838dcSJh+jjA7cX9DrGVwx/NOwE=\ngithub.com/ipfs/go-ds-badger v0.2.3/go.mod h1:pEYw0rgg3FIrywKKnL+Snr+w/LjJZVMTBRn4FS6UHUk=\ngithub.com/ipfs/go-ds-badger2 v0.1.0/go.mod h1:pbR1p817OZbdId9EvLOhKBgUVTM3BMCSTan78lDDVaw=\ngithub.com/ipfs/go-ds-badger2 v0.1.1-0.20200708190120-187fc06f714e/go.mod h1:lJnws7amT9Ehqzta0gwMrRsURU04caT0iRPr1W8AsOU=\ngithub.com/ipfs/go-ds-leveldb v0.0.1/go.mod h1:feO8V3kubwsEF22n0YRQCffeb79OOYIykR4L04tMOYc=\ngithub.com/ipfs/go-ds-leveldb v0.1.0/go.mod h1:hqAW8y4bwX5LWcCtku2rFNX3vjDZCy5LZCg+cSZvYb8=\ngithub.com/ipfs/go-ds-leveldb v0.4.1/go.mod h1:jpbku/YqBSsBc1qgME8BkWS4AxzF2cEu1Ii2r79Hh9s=\ngithub.com/ipfs/go-ds-leveldb v0.4.2/go.mod h1:jpbku/YqBSsBc1qgME8BkWS4AxzF2cEu1Ii2r79Hh9s=\ngithub.com/ipfs/go-ds-measure v0.1.0/go.mod h1:1nDiFrhLlwArTME1Ees2XaBOl49OoCgd2A3f8EchMSY=\ngithub.com/ipfs/go-ds-pebble v0.0.2-0.20200921225637-ce220f8ac459/go.mod h1:oh4liWHulKcDKVhCska5NLelE3MatWl+1FwSz3tY91g=\ngithub.com/ipfs/go-filestore v1.0.0 h1:QR7ekKH+q2AGiWDc7W2Q0qHuYSRZGUJqUn0GsegEPb0=\ngithub.com/ipfs/go-filestore v1.0.0/go.mod h1:/XOCuNtIe2f1YPbiXdYvD0BKLA0JR1MgPiFOdcuu9SM=\ngithub.com/ipfs/go-fs-lock v0.0.6 h1:sn3TWwNVQqSeNjlWy6zQ1uUGAZrV3hPOyEA6y1/N2a0=\ngithub.com/ipfs/go-fs-lock v0.0.6/go.mod h1:OTR+Rj9sHiRubJh3dRhD15Juhd/+w6VPOY28L7zESmM=\ngithub.com/ipfs/go-graphsync v0.1.0/go.mod h1:jMXfqIEDFukLPZHqDPp8tJMbHO9Rmeb9CEGevngQbmE=\ngithub.com/ipfs/go-graphsync v0.4.2/go.mod h1:/VmbZTUdUMTbNkgzAiCEucIIAU3BkLE2cZrDCVUhyi0=\ngithub.com/ipfs/go-graphsync v0.4.3/go.mod h1:mPOwDYv128gf8gxPFgXnz4fNrSYPsWyqisJ7ych+XDY=\ngithub.com/ipfs/go-graphsync v0.6.0 h1:x6UvDUGA7wjaKNqx5Vbo7FGT8aJ5ryYA0dMQ5jN3dF0=\ngithub.com/ipfs/go-graphsync v0.6.0/go.mod h1:e2ZxnClqBBYAtd901g9vXMJzS47labjAtOzsWtOzKNk=\ngithub.com/ipfs/go-hamt-ipld v0.1.1/go.mod h1:1EZCr2v0jlCnhpa+aZ0JZYp8Tt2w16+JJOAVz17YcDk=\ngithub.com/ipfs/go-ipfs-blockstore v0.0.1/go.mod h1:d3WClOmRQKFnJ0Jz/jj/zmksX0ma1gROTlovZKBmN08=\ngithub.com/ipfs/go-ipfs-blockstore v0.1.0/go.mod h1:5aD0AvHPi7mZc6Ci1WCAhiBQu2IsfTduLl+422H6Rqw=\ngithub.com/ipfs/go-ipfs-blockstore v0.1.4/go.mod h1:Jxm3XMVjh6R17WvxFEiyKBLUGr86HgIYJW/D/MwqeYQ=\ngithub.com/ipfs/go-ipfs-blockstore v1.0.0/go.mod h1:knLVdhVU9L7CC4T+T4nvGdeUIPAXlnd9zmXfp+9MIjU=\ngithub.com/ipfs/go-ipfs-blockstore v1.0.1/go.mod h1:MGNZlHNEnR4KGgPHM3/k8lBySIOK2Ve+0KjZubKlaOE=\ngithub.com/ipfs/go-ipfs-blockstore v1.0.3 h1:RDhK6fdg5YsonkpMuMpdvk/pRtOQlrIRIybuQfkvB2M=\ngithub.com/ipfs/go-ipfs-blockstore v1.0.3/go.mod h1:MGNZlHNEnR4KGgPHM3/k8lBySIOK2Ve+0KjZubKlaOE=\ngithub.com/ipfs/go-ipfs-blocksutil v0.0.1 h1:Eh/H4pc1hsvhzsQoMEP3Bke/aW5P5rVM1IWFJMcGIPQ=\ngithub.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtLb449gwKqXjIsnRk=\ngithub.com/ipfs/go-ipfs-chunker v0.0.1/go.mod h1:tWewYK0we3+rMbOh7pPFGDyypCtvGcBFymgY4rSDLAw=\ngithub.com/ipfs/go-ipfs-chunker v0.0.5 h1:ojCf7HV/m+uS2vhUGWcogIIxiO5ubl5O57Q7NapWLY8=\ngithub.com/ipfs/go-ipfs-chunker v0.0.5/go.mod h1:jhgdF8vxRHycr00k13FM8Y0E+6BoalYeobXmUyTreP8=\ngithub.com/ipfs/go-ipfs-cmds v0.1.0 h1:0CEde9EcxByej8+L6d1PST57J4ambRPyCTjLG5Ymou8=\ngithub.com/ipfs/go-ipfs-cmds v0.1.0/go.mod h1:TiK4e7/V31tuEb8YWDF8lN3qrnDH+BS7ZqWIeYJlAs8=\ngithub.com/ipfs/go-ipfs-config v0.0.11 h1:5/4nas2CQXiKr2/MLxU24GDGTBvtstQIQezuk7ltOQQ=\ngithub.com/ipfs/go-ipfs-config v0.0.11/go.mod h1:wveA8UT5ywN26oKStByzmz1CO6cXwLKKM6Jn/Hfw08I=\ngithub.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw=\ngithub.com/ipfs/go-ipfs-delay v0.0.1 h1:r/UXYyRcddO6thwOnhiznIAiSvxMECGgtv35Xs1IeRQ=\ngithub.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw=\ngithub.com/ipfs/go-ipfs-ds-help v0.0.1/go.mod h1:gtP9xRaZXqIQRh1HRpp595KbBEdgqWFxefeVKOV8sxo=\ngithub.com/ipfs/go-ipfs-ds-help v0.1.1/go.mod h1:SbBafGJuGsPI/QL3j9Fc5YPLeAu+SzOkI0gFwAg+mOs=\ngithub.com/ipfs/go-ipfs-ds-help v1.0.0 h1:bEQ8hMGs80h0sR8O4tfDgV6B01aaF9qeTrujrTLYV3g=\ngithub.com/ipfs/go-ipfs-ds-help v1.0.0/go.mod h1:ujAbkeIgkKAWtxxNkoZHWLCyk5JpPoKnGyCcsoF6ueE=\ngithub.com/ipfs/go-ipfs-exchange-interface v0.0.1 h1:LJXIo9W7CAmugqI+uofioIpRb6rY30GUu7G6LUfpMvM=\ngithub.com/ipfs/go-ipfs-exchange-interface v0.0.1/go.mod h1:c8MwfHjtQjPoDyiy9cFquVtVHkO9b9Ob3FG91qJnWCM=\ngithub.com/ipfs/go-ipfs-exchange-offline v0.0.1 h1:P56jYKZF7lDDOLx5SotVh5KFxoY6C81I1NSHW1FxGew=\ngithub.com/ipfs/go-ipfs-exchange-offline v0.0.1/go.mod h1:WhHSFCVYX36H/anEKQboAzpUws3x7UeEGkzQc3iNkM0=\ngithub.com/ipfs/go-ipfs-files v0.0.2/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4=\ngithub.com/ipfs/go-ipfs-files v0.0.3/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4=\ngithub.com/ipfs/go-ipfs-files v0.0.4/go.mod h1:INEFm0LL2LWXBhNJ2PMIIb2w45hpXgPjNoE7yA8Y1d4=\ngithub.com/ipfs/go-ipfs-files v0.0.8 h1:8o0oFJkJ8UkO/ABl8T6ac6tKF3+NIpj67aAB6ZpusRg=\ngithub.com/ipfs/go-ipfs-files v0.0.8/go.mod h1:wiN/jSG8FKyk7N0WyctKSvq3ljIa2NNTiZB55kpTdOs=\ngithub.com/ipfs/go-ipfs-flags v0.0.1/go.mod h1:RnXBb9WV53GSfTrSDVK61NLTFKvWc60n+K9EgCDh+rA=\ngithub.com/ipfs/go-ipfs-http-client v0.0.5 h1:niW5M0qqa0O/VRCAzr3f5Y7i3MjTpf0lhpkisjRtHR8=\ngithub.com/ipfs/go-ipfs-http-client v0.0.5/go.mod h1:8EKP9RGUrUex4Ff86WhnKU7seEBOtjdgXlY9XHYvYMw=\ngithub.com/ipfs/go-ipfs-posinfo v0.0.1 h1:Esoxj+1JgSjX0+ylc0hUmJCOv6V2vFoZiETLR6OtpRs=\ngithub.com/ipfs/go-ipfs-posinfo v0.0.1/go.mod h1:SwyeVP+jCwiDu0C313l/8jg6ZxM0qqtlt2a0vILTc1A=\ngithub.com/ipfs/go-ipfs-pq v0.0.1/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY=\ngithub.com/ipfs/go-ipfs-pq v0.0.2 h1:e1vOOW6MuOwG2lqxcLA+wEn93i/9laCY8sXAw76jFOY=\ngithub.com/ipfs/go-ipfs-pq v0.0.2/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY=\ngithub.com/ipfs/go-ipfs-routing v0.0.1/go.mod h1:k76lf20iKFxQTjcJokbPM9iBXVXVZhcOwc360N4nuKs=\ngithub.com/ipfs/go-ipfs-routing v0.1.0 h1:gAJTT1cEeeLj6/DlLX6t+NxD9fQe2ymTO6qWRDI/HQQ=\ngithub.com/ipfs/go-ipfs-routing v0.1.0/go.mod h1:hYoUkJLyAUKhF58tysKpids8RNDPO42BVMgK5dNsoqY=\ngithub.com/ipfs/go-ipfs-util v0.0.1/go.mod h1:spsl5z8KUnrve+73pOhSVZND1SIxPW5RyBCNzQxlJBc=\ngithub.com/ipfs/go-ipfs-util v0.0.2 h1:59Sswnk1MFaiq+VcaknX7aYEyGyGDAA73ilhEK2POp8=\ngithub.com/ipfs/go-ipfs-util v0.0.2/go.mod h1:CbPtkWJzjLdEcezDns2XYaehFVNXG9zrdrtMecczcsQ=\ngithub.com/ipfs/go-ipld-cbor v0.0.1/go.mod h1:RXHr8s4k0NE0TKhnrxqZC9M888QfsBN9rhS5NjfKzY8=\ngithub.com/ipfs/go-ipld-cbor v0.0.2/go.mod h1:wTBtrQZA3SoFKMVkp6cn6HMRteIB1VsmHA0AQFOn7Nc=\ngithub.com/ipfs/go-ipld-cbor v0.0.3/go.mod h1:wTBtrQZA3SoFKMVkp6cn6HMRteIB1VsmHA0AQFOn7Nc=\ngithub.com/ipfs/go-ipld-cbor v0.0.4/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4=\ngithub.com/ipfs/go-ipld-cbor v0.0.5-0.20200204214505-252690b78669/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4=\ngithub.com/ipfs/go-ipld-cbor v0.0.5 h1:ovz4CHKogtG2KB/h1zUp5U0c/IzZrL435rCh5+K/5G8=\ngithub.com/ipfs/go-ipld-cbor v0.0.5/go.mod h1:BkCduEx3XBCO6t2Sfo5BaHzuok7hbhdMm9Oh8B2Ftq4=\ngithub.com/ipfs/go-ipld-format v0.0.1/go.mod h1:kyJtbkDALmFHv3QR6et67i35QzO3S0dCDnkOJhcZkms=\ngithub.com/ipfs/go-ipld-format v0.0.2/go.mod h1:4B6+FM2u9OJ9zCV+kSbgFAZlOrv1Hqbf0INGQgiKf9k=\ngithub.com/ipfs/go-ipld-format v0.2.0 h1:xGlJKkArkmBvowr+GMCX0FEZtkro71K1AwiKnL37mwA=\ngithub.com/ipfs/go-ipld-format v0.2.0/go.mod h1:3l3C1uKoadTPbeNfrDi+xMInYKlx2Cvg1BuydPSdzQs=\ngithub.com/ipfs/go-ipns v0.0.2/go.mod h1:WChil4e0/m9cIINWLxZe1Jtf77oz5L05rO2ei/uKJ5U=\ngithub.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM=\ngithub.com/ipfs/go-log v1.0.0/go.mod h1:JO7RzlMK6rA+CIxFMLOuB6Wf5b81GDiKElL7UPSIKjA=\ngithub.com/ipfs/go-log v1.0.1/go.mod h1:HuWlQttfN6FWNHRhlY5yMk/lW7evQC0HHGOxEwMRR8I=\ngithub.com/ipfs/go-log v1.0.2/go.mod h1:1MNjMxe0u6xvJZgeqbJ8vdo2TKaGwZ1a0Bpza+sr2Sk=\ngithub.com/ipfs/go-log v1.0.3/go.mod h1:OsLySYkwIbiSUR/yBTdv1qPtcE4FW3WPWk/ewz9Ru+A=\ngithub.com/ipfs/go-log v1.0.4 h1:6nLQdX4W8P9yZZFH7mO+X/PzjN8Laozm/lMJ6esdgzY=\ngithub.com/ipfs/go-log v1.0.4/go.mod h1:oDCg2FkjogeFOhqqb+N39l2RpTNPL6F/StPkB3kPgcs=\ngithub.com/ipfs/go-log/v2 v2.0.1/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0=\ngithub.com/ipfs/go-log/v2 v2.0.2/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0=\ngithub.com/ipfs/go-log/v2 v2.0.3/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0=\ngithub.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw=\ngithub.com/ipfs/go-log/v2 v2.0.8/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw=\ngithub.com/ipfs/go-log/v2 v2.1.1/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHntrv9KM=\ngithub.com/ipfs/go-log/v2 v2.1.2-0.20200626104915-0016c0b4b3e4/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHntrv9KM=\ngithub.com/ipfs/go-log/v2 v2.1.3 h1:1iS3IU7aXRlbgUpN8yTTpJ53NXYjAe37vcI5+5nYrzk=\ngithub.com/ipfs/go-log/v2 v2.1.3/go.mod h1:/8d0SH3Su5Ooc31QlL1WysJhvyOTDCjcCZ9Axpmri6g=\ngithub.com/ipfs/go-merkledag v0.0.3/go.mod h1:Oc5kIXLHokkE1hWGMBHw+oxehkAaTOqtEb7Zbh6BhLA=\ngithub.com/ipfs/go-merkledag v0.0.6/go.mod h1:QYPdnlvkOg7GnQRofu9XZimC5ZW5Wi3bKys/4GQQfto=\ngithub.com/ipfs/go-merkledag v0.2.3/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk=\ngithub.com/ipfs/go-merkledag v0.2.4/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk=\ngithub.com/ipfs/go-merkledag v0.3.1/go.mod h1:fvkZNNZixVW6cKSZ/JfLlON5OlgTXNdRLz0p6QG/I2M=\ngithub.com/ipfs/go-merkledag v0.3.2 h1:MRqj40QkrWkvPswXs4EfSslhZ4RVPRbxwX11js0t1xY=\ngithub.com/ipfs/go-merkledag v0.3.2/go.mod h1:fvkZNNZixVW6cKSZ/JfLlON5OlgTXNdRLz0p6QG/I2M=\ngithub.com/ipfs/go-metrics-interface v0.0.1 h1:j+cpbjYvu4R8zbleSs36gvB7jR+wsL2fGD6n0jO4kdg=\ngithub.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY=\ngithub.com/ipfs/go-metrics-prometheus v0.0.2/go.mod h1:ELLU99AQQNi+zX6GCGm2lAgnzdSH3u5UVlCdqSXnEks=\ngithub.com/ipfs/go-path v0.0.3/go.mod h1:zIRQUez3LuQIU25zFjC2hpBTHimWx7VK5bjZgRLbbdo=\ngithub.com/ipfs/go-path v0.0.7 h1:H06hKMquQ0aYtHiHryOMLpQC1qC3QwXwkahcEVD51Ho=\ngithub.com/ipfs/go-path v0.0.7/go.mod h1:6KTKmeRnBXgqrTvzFrPV3CamxcgvXX/4z79tfAd2Sno=\ngithub.com/ipfs/go-peertaskqueue v0.0.4/go.mod h1:03H8fhyeMfKNFWqzYEVyMbcPUeYrqP1MX6Kd+aN+rMQ=\ngithub.com/ipfs/go-peertaskqueue v0.1.0/go.mod h1:Jmk3IyCcfl1W3jTW3YpghSwSEC6IJ3Vzz/jUmWw8Z0U=\ngithub.com/ipfs/go-peertaskqueue v0.1.1/go.mod h1:Jmk3IyCcfl1W3jTW3YpghSwSEC6IJ3Vzz/jUmWw8Z0U=\ngithub.com/ipfs/go-peertaskqueue v0.2.0 h1:2cSr7exUGKYyDeUyQ7P/nHPs9P7Ht/B+ROrpN1EJOjc=\ngithub.com/ipfs/go-peertaskqueue v0.2.0/go.mod h1:5/eNrBEbtSKWCG+kQK8K8fGNixoYUnr+P7jivavs9lY=\ngithub.com/ipfs/go-todocounter v0.0.1/go.mod h1:l5aErvQc8qKE2r7NDMjmq5UNAvuZy0rC8BHOplkWvZ4=\ngithub.com/ipfs/go-unixfs v0.0.4/go.mod h1:eIo/p9ADu/MFOuyxzwU+Th8D6xoxU//r590vUpWyfz8=\ngithub.com/ipfs/go-unixfs v0.2.1/go.mod h1:IwAAgul1UQIcNZzKPYZWOCijryFBeCV79cNubPzol+k=\ngithub.com/ipfs/go-unixfs v0.2.2-0.20190827150610-868af2e9e5cb/go.mod h1:IwAAgul1UQIcNZzKPYZWOCijryFBeCV79cNubPzol+k=\ngithub.com/ipfs/go-unixfs v0.2.4 h1:6NwppOXefWIyysZ4LR/qUBPvXd5//8J3jiMdvpbw6Lo=\ngithub.com/ipfs/go-unixfs v0.2.4/go.mod h1:SUdisfUjNoSDzzhGVxvCL9QO/nKdwXdr+gbMUdqcbYw=\ngithub.com/ipfs/go-verifcid v0.0.1 h1:m2HI7zIuR5TFyQ1b79Da5N9dnnCP1vcu2QqawmWlK2E=\ngithub.com/ipfs/go-verifcid v0.0.1/go.mod h1:5Hrva5KBeIog4A+UpqlaIU+DEstipcJYQQZc0g37pY0=\ngithub.com/ipfs/interface-go-ipfs-core v0.2.3 h1:E6uQ+1fJjkxJWlL9lAE72a5FWeyeeNL3GitLy8+jq3Y=\ngithub.com/ipfs/interface-go-ipfs-core v0.2.3/go.mod h1:Tihp8zxGpUeE3Tokr94L6zWZZdkRQvG5TL6i9MuNE+s=\ngithub.com/ipfs/iptb v1.4.0 h1:YFYTrCkLMRwk/35IMyC6+yjoQSHTEcNcefBStLJzgvo=\ngithub.com/ipfs/iptb v1.4.0/go.mod h1:1rzHpCYtNp87/+hTxG5TfCVn/yMY3dKnLn8tBiMfdmg=\ngithub.com/ipfs/iptb-plugins v0.2.1 h1:au4HWn9/pRPbkxA08pDx2oRAs4cnbgQWgV0teYXuuGA=\ngithub.com/ipfs/iptb-plugins v0.2.1/go.mod h1:QXMbtIWZ+jRsW8a4h13qAKU7jcM7qaittO8wOsTP0Rs=\ngithub.com/ipld/go-car v0.1.0/go.mod h1:RCWzaUh2i4mOEkB3W45Vc+9jnS/M6Qay5ooytiBHl3g=\ngithub.com/ipld/go-car v0.1.1-0.20200923150018-8cdef32e2da4/go.mod h1:xrMEcuSq+D1vEwl+YAXsg/JfA98XGpXDwnkIL4Aimqw=\ngithub.com/ipld/go-car v0.1.1-0.20201119040415-11b6074b6d4d h1:iphSzTuPqyDgH7WUVZsdqUnQNzYgIblsVr1zhVNA33U=\ngithub.com/ipld/go-car v0.1.1-0.20201119040415-11b6074b6d4d/go.mod h1:2Gys8L8MJ6zkh1gktTSXreY63t4UbyvNp5JaudTyxHQ=\ngithub.com/ipld/go-ipld-prime v0.0.2-0.20191108012745-28a82f04c785/go.mod h1:bDDSvVz7vaK12FNvMeRYnpRFkSUPNQOiCYQezMD/P3w=\ngithub.com/ipld/go-ipld-prime v0.0.2-0.20200428162820-8b59dc292b8e/go.mod h1:uVIwe/u0H4VdKv3kaN1ck7uCb6yD9cFLS9/ELyXbsw8=\ngithub.com/ipld/go-ipld-prime v0.5.1-0.20200828233916-988837377a7f/go.mod h1:0xEgdD6MKbZ1vF0GC+YcR/C4SQCAlRuOjIJ2i0HxqzM=\ngithub.com/ipld/go-ipld-prime v0.5.1-0.20201021195245-109253e8a018 h1:RbRHv8epkmvBYA5cGfz68GUSbOgx5j/7ObLIl4Rsif0=\ngithub.com/ipld/go-ipld-prime v0.5.1-0.20201021195245-109253e8a018/go.mod h1:0xEgdD6MKbZ1vF0GC+YcR/C4SQCAlRuOjIJ2i0HxqzM=\ngithub.com/ipld/go-ipld-prime-proto v0.0.0-20191113031812-e32bd156a1e5/go.mod h1:gcvzoEDBjwycpXt3LBE061wT9f46szXGHAmj9uoP6fU=\ngithub.com/ipld/go-ipld-prime-proto v0.0.0-20200428191222-c1ffdadc01e1/go.mod h1:OAV6xBmuTLsPZ+epzKkPB1e25FHk/vCtyatkdHcArLs=\ngithub.com/ipld/go-ipld-prime-proto v0.0.0-20200922192210-9a2bfd4440a6/go.mod h1:3pHYooM9Ea65jewRwrb2u5uHZCNkNTe9ABsVB+SrkH0=\ngithub.com/ipld/go-ipld-prime-proto v0.1.0 h1:j7gjqrfwbT4+gXpHwEx5iMssma3mnctC7YaCimsFP70=\ngithub.com/ipld/go-ipld-prime-proto v0.1.0/go.mod h1:11zp8f3sHVgIqtb/c9Kr5ZGqpnCLF1IVTNOez9TopzE=\ngithub.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52 h1:QG4CGBqCeuBo6aZlGAamSkxWdgWfZGeE49eUOWJPA4c=\ngithub.com/ipsn/go-secp256k1 v0.0.0-20180726113642-9d62b9f0bc52/go.mod h1:fdg+/X9Gg4AsAIzWpEHwnqd+QY3b7lajxyjE1m4hkq4=\ngithub.com/jackpal/gateway v1.0.4/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA=\ngithub.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA=\ngithub.com/jackpal/go-nat-pmp v1.0.1/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=\ngithub.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=\ngithub.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus=\ngithub.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=\ngithub.com/jbenet/go-cienv v0.0.0-20150120210510-1bb1476777ec/go.mod h1:rGaEvXB4uRSZMmzKNLoXvTu1sfx+1kv/DojUlPrSZGs=\ngithub.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA=\ngithub.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c h1:uUx61FiAa1GI6ZmVd2wf2vULeQZIKG66eybjNXKYCz4=\ngithub.com/jbenet/go-random v0.0.0-20190219211222-123a90aedc0c/go.mod h1:sdx1xVM9UuLw1tXnhJWN3piypTUO3vCIHYmG15KE/dU=\ngithub.com/jbenet/go-temp-err-catcher v0.0.0-20150120210811-aac704a3f4f2/go.mod h1:8GXXJV31xl8whumTzdZsTt3RnUIiPqzkyf7mxToRCMs=\ngithub.com/jbenet/go-temp-err-catcher v0.1.0 h1:zpb3ZH6wIE8Shj2sKS+khgRvf7T7RABoLk/+KKHggpk=\ngithub.com/jbenet/go-temp-err-catcher v0.1.0/go.mod h1:0kJRvmDZXNMIiJirNPEYfhpPwbGVtZVWC34vc5WLsDk=\ngithub.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8/go.mod h1:Ly/wlsjFq/qrU3Rar62tu1gASgGw6chQbSh/XgIIXCY=\ngithub.com/jbenet/goprocess v0.1.3/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4=\ngithub.com/jbenet/goprocess v0.1.4 h1:DRGOFReOMqqDNXwW70QkacFW0YN9QnwLV0Vqk+3oU0o=\ngithub.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4=\ngithub.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU=\ngithub.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU=\ngithub.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=\ngithub.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA=\ngithub.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=\ngithub.com/jhump/protoreflect v1.8.2/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg=\ngithub.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=\ngithub.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik=\ngithub.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=\ngithub.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U=\ngithub.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U=\ngithub.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ=\ngithub.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 h1:rp+c0RAYOWj8l6qbCUTSiRLG/iKnW3K3/QfPPuSsBt4=\ngithub.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901/go.mod h1:Z86h9688Y0wesXCyonoVr47MasHilkuLMqGhRZ4Hpak=\ngithub.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=\ngithub.com/jonboulle/clockwork v0.1.1-0.20190114141812-62fb9bc030d1/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=\ngithub.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=\ngithub.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=\ngithub.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=\ngithub.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ=\ngithub.com/jsimonetti/rtnetlink v0.0.0-20190606172950-9527aa82566a/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw=\ngithub.com/jsimonetti/rtnetlink v0.0.0-20190830100107-3784a6c7c552/go.mod h1:Oz+70psSo5OFh8DBl0Zv2ACw7Esh6pPUphlvZG9x7uw=\ngithub.com/jsimonetti/rtnetlink v0.0.0-20200117123717-f846d4f6c1f4/go.mod h1:WGuG/smIU4J/54PblvSbh+xvCZmpJnFgr3ds6Z55XMQ=\ngithub.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=\ngithub.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=\ngithub.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=\ngithub.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=\ngithub.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=\ngithub.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=\ngithub.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=\ngithub.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=\ngithub.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o=\ngithub.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=\ngithub.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=\ngithub.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=\ngithub.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=\ngithub.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=\ngithub.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=\ngithub.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=\ngithub.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0=\ngithub.com/kabukky/httpscerts v0.0.0-20150320125433-617593d7dcb3/go.mod h1:BYpt4ufZiIGv2nXn4gMxnfKV306n3mWXgNu/d2TqdTU=\ngithub.com/kami-zh/go-capturer v0.0.0-20171211120116-e492ea43421d/go.mod h1:P2viExyCEfeWGU259JnaQ34Inuec4R38JCyBx2edgD0=\ngithub.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU=\ngithub.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU=\ngithub.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8=\ngithub.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=\ngithub.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM=\ngithub.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc=\ngithub.com/kilic/bls12-381 v0.0.0-20200607163746-32e1441c8a9f/go.mod h1:XXfR6YFCRSrkEXbNlIyDsgXVNJWVUV30m/ebkVy9n6s=\ngithub.com/kilic/bls12-381 v0.0.0-20200731194930-64c428e1bff5/go.mod h1:XXfR6YFCRSrkEXbNlIyDsgXVNJWVUV30m/ebkVy9n6s=\ngithub.com/kilic/bls12-381 v0.0.0-20200820230200-6b2c19996391/go.mod h1:XXfR6YFCRSrkEXbNlIyDsgXVNJWVUV30m/ebkVy9n6s=\ngithub.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=\ngithub.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=\ngithub.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4=\ngithub.com/kkdai/bstream v1.0.0/go.mod h1:FDnDOHt5Yx4p3FaHcioFT0QjDOtgUpvjeZqAs+NVZZA=\ngithub.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=\ngithub.com/klauspost/compress v1.10.3 h1:OP96hzwJVBIHYU52pVTI6CczrxPvrGfgqF9N5eTO0Q8=\ngithub.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=\ngithub.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=\ngithub.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg=\ngithub.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=\ngithub.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=\ngithub.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=\ngithub.com/koron/go-ssdp v0.0.0-20180514024734-4a0ed625a78b/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk=\ngithub.com/koron/go-ssdp v0.0.0-20191105050749-2e1c40ed0b5d h1:68u9r4wEvL3gYg2jvAOgROwZ3H+Y3hIDk4tbbmIjcYQ=\ngithub.com/koron/go-ssdp v0.0.0-20191105050749-2e1c40ed0b5d/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk=\ngithub.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=\ngithub.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=\ngithub.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=\ngithub.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=\ngithub.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=\ngithub.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=\ngithub.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=\ngithub.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=\ngithub.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=\ngithub.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=\ngithub.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=\ngithub.com/kylelemons/godebug v0.0.0-20170224010052-a616ab194758/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=\ngithub.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=\ngithub.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg=\ngithub.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=\ngithub.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8=\ngithub.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=\ngithub.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=\ngithub.com/lib/pq v1.7.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=\ngithub.com/libp2p/go-addr-util v0.0.1/go.mod h1:4ac6O7n9rIAKB1dnd+s8IbbMXkt+oBpzX4/+RACcnlQ=\ngithub.com/libp2p/go-addr-util v0.0.2 h1:7cWK5cdA5x72jX0g8iLrQWm5TRJZ6CzGdPEhWj7plWU=\ngithub.com/libp2p/go-addr-util v0.0.2/go.mod h1:Ecd6Fb3yIuLzq4bD7VcywcVSBtefcAwnUISBM3WG15E=\ngithub.com/libp2p/go-buffer-pool v0.0.1/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ=\ngithub.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs=\ngithub.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM=\ngithub.com/libp2p/go-cidranger v1.1.0/go.mod h1:KWZTfSr+r9qEo9OkI9/SIEeAtw+NNoU0dXIXt15Okic=\ngithub.com/libp2p/go-conn-security v0.0.1/go.mod h1:bGmu51N0KU9IEjX7kl2PQjgZa40JQWnayTvNMgD/vyk=\ngithub.com/libp2p/go-conn-security-multistream v0.0.1/go.mod h1:nc9vud7inQ+d6SO0I/6dSWrdMnHnzZNHeyUQqrAJulE=\ngithub.com/libp2p/go-conn-security-multistream v0.0.2/go.mod h1:nc9vud7inQ+d6SO0I/6dSWrdMnHnzZNHeyUQqrAJulE=\ngithub.com/libp2p/go-conn-security-multistream v0.1.0/go.mod h1:aw6eD7LOsHEX7+2hJkDxw1MteijaVcI+/eP2/x3J1xc=\ngithub.com/libp2p/go-conn-security-multistream v0.2.0 h1:uNiDjS58vrvJTg9jO6bySd1rMKejieG7v45ekqHbZ1M=\ngithub.com/libp2p/go-conn-security-multistream v0.2.0/go.mod h1:hZN4MjlNetKD3Rq5Jb/P5ohUnFLNzEAR4DLSzpn2QLU=\ngithub.com/libp2p/go-eventbus v0.0.2/go.mod h1:Hr/yGlwxA/stuLnpMiu82lpNKpvRy3EaJxPu40XYOwk=\ngithub.com/libp2p/go-eventbus v0.1.0/go.mod h1:vROgu5cs5T7cv7POWlWxBaVLxfSegC5UGQf8A2eEmx4=\ngithub.com/libp2p/go-eventbus v0.2.1 h1:VanAdErQnpTioN2TowqNcOijf6YwhuODe4pPKSDpxGc=\ngithub.com/libp2p/go-eventbus v0.2.1/go.mod h1:jc2S4SoEVPP48H9Wpzm5aiGwUCBMfGhVhhBjyhhCJs8=\ngithub.com/libp2p/go-flow-metrics v0.0.1/go.mod h1:Iv1GH0sG8DtYN3SVJ2eG221wMiNpZxBdp967ls1g+k8=\ngithub.com/libp2p/go-flow-metrics v0.0.2/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs=\ngithub.com/libp2p/go-flow-metrics v0.0.3 h1:8tAs/hSdNvUiLgtlSy3mxwxWP4I9y/jlkPFT7epKdeM=\ngithub.com/libp2p/go-flow-metrics v0.0.3/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs=\ngithub.com/libp2p/go-libp2p v0.0.2/go.mod h1:Qu8bWqFXiocPloabFGUcVG4kk94fLvfC8mWTDdFC9wE=\ngithub.com/libp2p/go-libp2p v0.0.30/go.mod h1:XWT8FGHlhptAv1+3V/+J5mEpzyui/5bvFsNuWYs611A=\ngithub.com/libp2p/go-libp2p v0.1.0/go.mod h1:6D/2OBauqLUoqcADOJpn9WbKqvaM07tDw68qHM0BxUM=\ngithub.com/libp2p/go-libp2p v0.1.1/go.mod h1:I00BRo1UuUSdpuc8Q2mN7yDF/oTUTRAX6JWpTiK9Rp8=\ngithub.com/libp2p/go-libp2p v0.3.1/go.mod h1:e6bwxbdYH1HqWTz8faTChKGR0BjPc8p+6SyP8GTTR7Y=\ngithub.com/libp2p/go-libp2p v0.4.0/go.mod h1:9EsEIf9p2UDuwtPd0DwJsAl0qXVxgAnuDGRvHbfATfI=\ngithub.com/libp2p/go-libp2p v0.6.0/go.mod h1:mfKWI7Soz3ABX+XEBR61lGbg+ewyMtJHVt043oWeqwg=\ngithub.com/libp2p/go-libp2p v0.6.1/go.mod h1:CTFnWXogryAHjXAKEbOf1OWY+VeAP3lDMZkfEI5sT54=\ngithub.com/libp2p/go-libp2p v0.7.0/go.mod h1:hZJf8txWeCduQRDC/WSqBGMxaTHCOYHt2xSU1ivxn0k=\ngithub.com/libp2p/go-libp2p v0.7.4/go.mod h1:oXsBlTLF1q7pxr+9w6lqzS1ILpyHsaBPniVO7zIHGMw=\ngithub.com/libp2p/go-libp2p v0.8.1/go.mod h1:QRNH9pwdbEBpx5DTJYg+qxcVaDMAz3Ee/qDKwXujH5o=\ngithub.com/libp2p/go-libp2p v0.8.3/go.mod h1:EsH1A+8yoWK+L4iKcbPYu6MPluZ+CHWI9El8cTaefiM=\ngithub.com/libp2p/go-libp2p v0.9.2/go.mod h1:cunHNLDVus66Ct9iXXcjKRLdmHdFdHVe1TAnbubJQqQ=\ngithub.com/libp2p/go-libp2p v0.10.0/go.mod h1:yBJNpb+mGJdgrwbKAKrhPU0u3ogyNFTfjJ6bdM+Q/G8=\ngithub.com/libp2p/go-libp2p v0.12.0 h1:+xai9RQnQ9l5elFOKvp5wRyjyWisSwEx+6nU2+onpUA=\ngithub.com/libp2p/go-libp2p v0.12.0/go.mod h1:FpHZrfC1q7nA8jitvdjKBDF31hguaC676g/nT9PgQM0=\ngithub.com/libp2p/go-libp2p-asn-util v0.0.0-20200825225859-85005c6cf052/go.mod h1:nRMRTab+kZuk0LnKZpxhOVH/ndsdr2Nr//Zltc/vwgo=\ngithub.com/libp2p/go-libp2p-autonat v0.0.2/go.mod h1:fs71q5Xk+pdnKU014o2iq1RhMs9/PMaG5zXRFNnIIT4=\ngithub.com/libp2p/go-libp2p-autonat v0.0.6/go.mod h1:uZneLdOkZHro35xIhpbtTzLlgYturpu4J5+0cZK3MqE=\ngithub.com/libp2p/go-libp2p-autonat v0.1.0/go.mod h1:1tLf2yXxiE/oKGtDwPYWTSYG3PtvYlJmg7NeVtPRqH8=\ngithub.com/libp2p/go-libp2p-autonat v0.1.1/go.mod h1:OXqkeGOY2xJVWKAGV2inNF5aKN/djNA3fdpCWloIudE=\ngithub.com/libp2p/go-libp2p-autonat v0.2.0/go.mod h1:DX+9teU4pEEoZUqR1PiMlqliONQdNbfzE1C718tcViI=\ngithub.com/libp2p/go-libp2p-autonat v0.2.1/go.mod h1:MWtAhV5Ko1l6QBsHQNSuM6b1sRkXrpk0/LqCr+vCVxI=\ngithub.com/libp2p/go-libp2p-autonat v0.2.2/go.mod h1:HsM62HkqZmHR2k1xgX34WuWDzk/nBwNHoeyyT4IWV6A=\ngithub.com/libp2p/go-libp2p-autonat v0.2.3/go.mod h1:2U6bNWCNsAG9LEbwccBDQbjzQ8Krdjge1jLTE9rdoMM=\ngithub.com/libp2p/go-libp2p-autonat v0.4.0 h1:3y8XQbpr+ssX8QfZUHekjHCYK64sj6/4hnf/awD4+Ug=\ngithub.com/libp2p/go-libp2p-autonat v0.4.0/go.mod h1:YxaJlpr81FhdOv3W3BTconZPfhaYivRdf53g+S2wobk=\ngithub.com/libp2p/go-libp2p-autonat-svc v0.1.0/go.mod h1:fqi8Obl/z3R4PFVLm8xFtZ6PBL9MlV/xumymRFkKq5A=\ngithub.com/libp2p/go-libp2p-blankhost v0.0.1/go.mod h1:Ibpbw/7cPPYwFb7PACIWdvxxv0t0XCCI10t7czjAjTc=\ngithub.com/libp2p/go-libp2p-blankhost v0.1.1/go.mod h1:pf2fvdLJPsC1FsVrNP3DUUvMzUts2dsLLBEpo1vW1ro=\ngithub.com/libp2p/go-libp2p-blankhost v0.1.3/go.mod h1:KML1//wiKR8vuuJO0y3LUd1uLv+tlkGTAr3jC0S5cLg=\ngithub.com/libp2p/go-libp2p-blankhost v0.1.4/go.mod h1:oJF0saYsAXQCSfDq254GMNmLNz6ZTHTOvtF4ZydUvwU=\ngithub.com/libp2p/go-libp2p-blankhost v0.1.6/go.mod h1:jONCAJqEP+Z8T6EQviGL4JsQcLx1LgTGtVqFNY8EMfQ=\ngithub.com/libp2p/go-libp2p-blankhost v0.2.0 h1:3EsGAi0CBGcZ33GwRuXEYJLLPoVWyXJ1bcJzAJjINkk=\ngithub.com/libp2p/go-libp2p-blankhost v0.2.0/go.mod h1:eduNKXGTioTuQAUcZ5epXi9vMl+t4d8ugUBRQ4SqaNQ=\ngithub.com/libp2p/go-libp2p-circuit v0.0.1/go.mod h1:Dqm0s/BiV63j8EEAs8hr1H5HudqvCAeXxDyic59lCwE=\ngithub.com/libp2p/go-libp2p-circuit v0.0.9/go.mod h1:uU+IBvEQzCu953/ps7bYzC/D/R0Ho2A9LfKVVCatlqU=\ngithub.com/libp2p/go-libp2p-circuit v0.1.0/go.mod h1:Ahq4cY3V9VJcHcn1SBXjr78AbFkZeIRmfunbA7pmFh8=\ngithub.com/libp2p/go-libp2p-circuit v0.1.1/go.mod h1:Ahq4cY3V9VJcHcn1SBXjr78AbFkZeIRmfunbA7pmFh8=\ngithub.com/libp2p/go-libp2p-circuit v0.1.3/go.mod h1:Xqh2TjSy8DD5iV2cCOMzdynd6h8OTBGoV1AWbWor3qM=\ngithub.com/libp2p/go-libp2p-circuit v0.1.4/go.mod h1:CY67BrEjKNDhdTk8UgBX1Y/H5c3xkAcs3gnksxY7osU=\ngithub.com/libp2p/go-libp2p-circuit v0.2.1/go.mod h1:BXPwYDN5A8z4OEY9sOfr2DUQMLQvKt/6oku45YUmjIo=\ngithub.com/libp2p/go-libp2p-circuit v0.2.2/go.mod h1:nkG3iE01tR3FoQ2nMm06IUrCpCyJp1Eo4A1xYdpjfs4=\ngithub.com/libp2p/go-libp2p-circuit v0.2.3/go.mod h1:nkG3iE01tR3FoQ2nMm06IUrCpCyJp1Eo4A1xYdpjfs4=\ngithub.com/libp2p/go-libp2p-circuit v0.4.0/go.mod h1:t/ktoFIUzM6uLQ+o1G6NuBl2ANhBKN9Bc8jRIk31MoA=\ngithub.com/libp2p/go-libp2p-connmgr v0.1.1/go.mod h1:wZxh8veAmU5qdrfJ0ZBLcU8oJe9L82ciVP/fl1VHjXk=\ngithub.com/libp2p/go-libp2p-connmgr v0.2.3/go.mod h1:Gqjg29zI8CwXX21zRxy6gOg8VYu3zVerJRt2KyktzH4=\ngithub.com/libp2p/go-libp2p-connmgr v0.2.4 h1:TMS0vc0TCBomtQJyWr7fYxcVYYhx+q/2gF++G5Jkl/w=\ngithub.com/libp2p/go-libp2p-connmgr v0.2.4/go.mod h1:YV0b/RIm8NGPnnNWM7hG9Q38OeQiQfKhHCCs1++ufn0=\ngithub.com/libp2p/go-libp2p-core v0.0.1/go.mod h1:g/VxnTZ/1ygHxH3dKok7Vno1VfpvGcGip57wjTU4fco=\ngithub.com/libp2p/go-libp2p-core v0.0.2/go.mod h1:9dAcntw/n46XycV4RnlBq3BpgrmyUi9LuoTNdPrbUco=\ngithub.com/libp2p/go-libp2p-core v0.0.3/go.mod h1:j+YQMNz9WNSkNezXOsahp9kwZBKBvxLpKD316QWSJXE=\ngithub.com/libp2p/go-libp2p-core v0.0.4/go.mod h1:jyuCQP356gzfCFtRKyvAbNkyeuxb7OlyhWZ3nls5d2I=\ngithub.com/libp2p/go-libp2p-core v0.0.6/go.mod h1:0d9xmaYAVY5qmbp/fcgxHT3ZJsLjYeYPMJAUKpaCHrE=\ngithub.com/libp2p/go-libp2p-core v0.2.0/go.mod h1:X0eyB0Gy93v0DZtSYbEM7RnMChm9Uv3j7yRXjO77xSI=\ngithub.com/libp2p/go-libp2p-core v0.2.2/go.mod h1:8fcwTbsG2B+lTgRJ1ICZtiM5GWCWZVoVrLaDRvIRng0=\ngithub.com/libp2p/go-libp2p-core v0.2.3/go.mod h1:GqhyQqyIAPsxFYXHMjfXgMv03lxsvM0mFzuYA9Ib42A=\ngithub.com/libp2p/go-libp2p-core v0.2.4/go.mod h1:STh4fdfa5vDYr0/SzYYeqnt+E6KfEV5VxfIrm0bcI0g=\ngithub.com/libp2p/go-libp2p-core v0.2.5/go.mod h1:6+5zJmKhsf7yHn1RbmYDu08qDUpIUxGdqHuEZckmZOA=\ngithub.com/libp2p/go-libp2p-core v0.3.0/go.mod h1:ACp3DmS3/N64c2jDzcV429ukDpicbL6+TrrxANBjPGw=\ngithub.com/libp2p/go-libp2p-core v0.3.1/go.mod h1:thvWy0hvaSBhnVBaW37BvzgVV68OUhgJJLAa6almrII=\ngithub.com/libp2p/go-libp2p-core v0.4.0/go.mod h1:49XGI+kc38oGVwqSBhDEwytaAxgZasHhFfQKibzTls0=\ngithub.com/libp2p/go-libp2p-core v0.5.0/go.mod h1:49XGI+kc38oGVwqSBhDEwytaAxgZasHhFfQKibzTls0=\ngithub.com/libp2p/go-libp2p-core v0.5.1/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt5/a35Sm4upn4Y=\ngithub.com/libp2p/go-libp2p-core v0.5.2/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt5/a35Sm4upn4Y=\ngithub.com/libp2p/go-libp2p-core v0.5.3/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt5/a35Sm4upn4Y=\ngithub.com/libp2p/go-libp2p-core v0.5.4/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt5/a35Sm4upn4Y=\ngithub.com/libp2p/go-libp2p-core v0.5.5/go.mod h1:vj3awlOr9+GMZJFH9s4mpt9RHHgGqeHCopzbYKZdRjM=\ngithub.com/libp2p/go-libp2p-core v0.5.6/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo=\ngithub.com/libp2p/go-libp2p-core v0.5.7/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo=\ngithub.com/libp2p/go-libp2p-core v0.6.0/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo=\ngithub.com/libp2p/go-libp2p-core v0.6.1/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8=\ngithub.com/libp2p/go-libp2p-core v0.7.0 h1:4a0TMjrWNTZlNvcqxZmrMRDi/NQWrhwO2pkTuLSQ/IQ=\ngithub.com/libp2p/go-libp2p-core v0.7.0/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8=\ngithub.com/libp2p/go-libp2p-crypto v0.0.1/go.mod h1:yJkNyDmO341d5wwXxDUGO0LykUVT72ImHNUqh5D/dBE=\ngithub.com/libp2p/go-libp2p-crypto v0.0.2/go.mod h1:eETI5OUfBnvARGOHrJz2eWNyTUxEGZnBxMcbUjfIj4I=\ngithub.com/libp2p/go-libp2p-crypto v0.1.0 h1:k9MFy+o2zGDNGsaoZl0MA3iZ75qXxr9OOoAZF+sD5OQ=\ngithub.com/libp2p/go-libp2p-crypto v0.1.0/go.mod h1:sPUokVISZiy+nNuTTH/TY+leRSxnFj/2GLjtOTW90hI=\ngithub.com/libp2p/go-libp2p-daemon v0.2.2/go.mod h1:kyrpsLB2JeNYR2rvXSVWyY0iZuRIMhqzWR3im9BV6NQ=\ngithub.com/libp2p/go-libp2p-discovery v0.0.1/go.mod h1:ZkkF9xIFRLA1xCc7bstYFkd80gBGK8Fc1JqGoU2i+zI=\ngithub.com/libp2p/go-libp2p-discovery v0.0.5/go.mod h1:YtF20GUxjgoKZ4zmXj8j3Nb2TUSBHFlOCetzYdbZL5I=\ngithub.com/libp2p/go-libp2p-discovery v0.1.0/go.mod h1:4F/x+aldVHjHDHuX85x1zWoFTGElt8HnoDzwkFZm29g=\ngithub.com/libp2p/go-libp2p-discovery v0.2.0/go.mod h1:s4VGaxYMbw4+4+tsoQTqh7wfxg97AEdo4GYBt6BadWg=\ngithub.com/libp2p/go-libp2p-discovery v0.3.0/go.mod h1:o03drFnz9BVAZdzC/QUQ+NeQOu38Fu7LJGEOK2gQltw=\ngithub.com/libp2p/go-libp2p-discovery v0.4.0/go.mod h1:bZ0aJSrFc/eX2llP0ryhb1kpgkPyTo23SJ5b7UQCMh4=\ngithub.com/libp2p/go-libp2p-discovery v0.5.0 h1:Qfl+e5+lfDgwdrXdu4YNCWyEo3fWuP+WgN9mN0iWviQ=\ngithub.com/libp2p/go-libp2p-discovery v0.5.0/go.mod h1:+srtPIU9gDaBNu//UHvcdliKBIcr4SfDcm0/PfPJLug=\ngithub.com/libp2p/go-libp2p-host v0.0.1/go.mod h1:qWd+H1yuU0m5CwzAkvbSjqKairayEHdR5MMl7Cwa7Go=\ngithub.com/libp2p/go-libp2p-host v0.0.3/go.mod h1:Y/qPyA6C8j2coYyos1dfRm0I8+nvd4TGrDGt4tA7JR8=\ngithub.com/libp2p/go-libp2p-interface-connmgr v0.0.1/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k=\ngithub.com/libp2p/go-libp2p-interface-connmgr v0.0.4/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k=\ngithub.com/libp2p/go-libp2p-interface-connmgr v0.0.5/go.mod h1:GarlRLH0LdeWcLnYM/SaBykKFl9U5JFnbBGruAk/D5k=\ngithub.com/libp2p/go-libp2p-interface-pnet v0.0.1/go.mod h1:el9jHpQAXK5dnTpKA4yfCNBZXvrzdOU75zz+C6ryp3k=\ngithub.com/libp2p/go-libp2p-kad-dht v0.2.1/go.mod h1:k7ONOlup7HKzQ68dE6lSnp07cdxdkmnRa+6B4Fh9/w0=\ngithub.com/libp2p/go-libp2p-kad-dht v0.11.0/go.mod h1:5ojtR2acDPqh/jXf5orWy8YGb8bHQDS+qeDcoscL/PI=\ngithub.com/libp2p/go-libp2p-kbucket v0.2.1/go.mod h1:/Rtu8tqbJ4WQ2KTCOMJhggMukOLNLNPY1EtEWWLxUvc=\ngithub.com/libp2p/go-libp2p-kbucket v0.4.7/go.mod h1:XyVo99AfQH0foSf176k4jY1xUJ2+jUJIZCSDm7r2YKk=\ngithub.com/libp2p/go-libp2p-loggables v0.0.1/go.mod h1:lDipDlBNYbpyqyPX/KcoO+eq0sJYEVR2JgOexcivchg=\ngithub.com/libp2p/go-libp2p-loggables v0.1.0 h1:h3w8QFfCt2UJl/0/NW4K829HX/0S4KD31PQ7m8UXXO8=\ngithub.com/libp2p/go-libp2p-loggables v0.1.0/go.mod h1:EyumB2Y6PrYjr55Q3/tiJ/o3xoDasoRYM7nOzEpoa90=\ngithub.com/libp2p/go-libp2p-metrics v0.0.1/go.mod h1:jQJ95SXXA/K1VZi13h52WZMa9ja78zjyy5rspMsC/08=\ngithub.com/libp2p/go-libp2p-mplex v0.1.1/go.mod h1:KUQWpGkCzfV7UIpi8SKsAVxyBgz1c9R5EvxgnwLsb/I=\ngithub.com/libp2p/go-libp2p-mplex v0.2.0/go.mod h1:Ejl9IyjvXJ0T9iqUTE1jpYATQ9NM3g+OtR+EMMODbKo=\ngithub.com/libp2p/go-libp2p-mplex v0.2.1/go.mod h1:SC99Rxs8Vuzrf/6WhmH41kNn13TiYdAWNYHrwImKLnE=\ngithub.com/libp2p/go-libp2p-mplex v0.2.2/go.mod h1:74S9eum0tVQdAfFiKxAyKzNdSuLqw5oadDq7+L/FELo=\ngithub.com/libp2p/go-libp2p-mplex v0.2.3/go.mod h1:CK3p2+9qH9x+7ER/gWWDYJ3QW5ZxWDkm+dVvjfuG3ek=\ngithub.com/libp2p/go-libp2p-mplex v0.3.0/go.mod h1:l9QWxRbbb5/hQMECEb908GbS9Sm2UAR2KFZKUJEynEs=\ngithub.com/libp2p/go-libp2p-nat v0.0.2/go.mod h1:QrjXQSD5Dj4IJOdEcjHRkWTSomyxRo6HnUkf/TfQpLQ=\ngithub.com/libp2p/go-libp2p-nat v0.0.4/go.mod h1:N9Js/zVtAXqaeT99cXgTV9e75KpnWCvVOiGzlcHmBbY=\ngithub.com/libp2p/go-libp2p-nat v0.0.5/go.mod h1:1qubaE5bTZMJE+E/uu2URroMbzdubFz1ChgiN79yKPE=\ngithub.com/libp2p/go-libp2p-nat v0.0.6 h1:wMWis3kYynCbHoyKLPBEMu4YRLltbm8Mk08HGSfvTkU=\ngithub.com/libp2p/go-libp2p-nat v0.0.6/go.mod h1:iV59LVhB3IkFvS6S6sauVTSOrNEANnINbI/fkaLimiw=\ngithub.com/libp2p/go-libp2p-net v0.0.1/go.mod h1:Yt3zgmlsHOgUWSXmt5V/Jpz9upuJBE8EgNU9DrCcR8c=\ngithub.com/libp2p/go-libp2p-net v0.0.2/go.mod h1:Yt3zgmlsHOgUWSXmt5V/Jpz9upuJBE8EgNU9DrCcR8c=\ngithub.com/libp2p/go-libp2p-netutil v0.0.1/go.mod h1:GdusFvujWZI9Vt0X5BKqwWWmZFxecf9Gt03cKxm2f/Q=\ngithub.com/libp2p/go-libp2p-netutil v0.1.0 h1:zscYDNVEcGxyUpMd0JReUZTrpMfia8PmLKcKF72EAMQ=\ngithub.com/libp2p/go-libp2p-netutil v0.1.0/go.mod h1:3Qv/aDqtMLTUyQeundkKsA+YCThNdbQD54k3TqjpbFU=\ngithub.com/libp2p/go-libp2p-noise v0.1.1/go.mod h1:QDFLdKX7nluB7DEnlVPbz7xlLHdwHFA9HiohJRr3vwM=\ngithub.com/libp2p/go-libp2p-noise v0.1.2/go.mod h1:9B10b7ueo7TIxZHHcjcDCo5Hd6kfKT2m77by82SFRfE=\ngithub.com/libp2p/go-libp2p-peer v0.0.1/go.mod h1:nXQvOBbwVqoP+T5Y5nCjeH4sP9IX/J0AMzcDUVruVoo=\ngithub.com/libp2p/go-libp2p-peer v0.1.1/go.mod h1:jkF12jGB4Gk/IOo+yomm+7oLWxF278F7UnrYUQ1Q8es=\ngithub.com/libp2p/go-libp2p-peer v0.2.0 h1:EQ8kMjaCUwt/Y5uLgjT8iY2qg0mGUT0N1zUjer50DsY=\ngithub.com/libp2p/go-libp2p-peer v0.2.0/go.mod h1:RCffaCvUyW2CJmG2gAWVqwePwW7JMgxjsHm7+J5kjWY=\ngithub.com/libp2p/go-libp2p-peerstore v0.0.1/go.mod h1:RabLyPVJLuNQ+GFyoEkfi8H4Ti6k/HtZJ7YKgtSq+20=\ngithub.com/libp2p/go-libp2p-peerstore v0.0.6/go.mod h1:RabLyPVJLuNQ+GFyoEkfi8H4Ti6k/HtZJ7YKgtSq+20=\ngithub.com/libp2p/go-libp2p-peerstore v0.1.0/go.mod h1:2CeHkQsr8svp4fZ+Oi9ykN1HBb6u0MOvdJ7YIsmcwtY=\ngithub.com/libp2p/go-libp2p-peerstore v0.1.3/go.mod h1:BJ9sHlm59/80oSkpWgr1MyY1ciXAXV397W6h1GH/uKI=\ngithub.com/libp2p/go-libp2p-peerstore v0.1.4/go.mod h1:+4BDbDiiKf4PzpANZDAT+knVdLxvqh7hXOujessqdzs=\ngithub.com/libp2p/go-libp2p-peerstore v0.2.0/go.mod h1:N2l3eVIeAitSg3Pi2ipSrJYnqhVnMNQZo9nkSCuAbnQ=\ngithub.com/libp2p/go-libp2p-peerstore v0.2.1/go.mod h1:NQxhNjWxf1d4w6PihR8btWIRjwRLBr4TYKfNgrUkOPA=\ngithub.com/libp2p/go-libp2p-peerstore v0.2.2/go.mod h1:NQxhNjWxf1d4w6PihR8btWIRjwRLBr4TYKfNgrUkOPA=\ngithub.com/libp2p/go-libp2p-peerstore v0.2.3/go.mod h1:K8ljLdFn590GMttg/luh4caB/3g0vKuY01psze0upRw=\ngithub.com/libp2p/go-libp2p-peerstore v0.2.4/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s=\ngithub.com/libp2p/go-libp2p-peerstore v0.2.6 h1:2ACefBX23iMdJU9Ke+dcXt3w86MIryes9v7In4+Qq3U=\ngithub.com/libp2p/go-libp2p-peerstore v0.2.6/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s=\ngithub.com/libp2p/go-libp2p-pnet v0.2.0 h1:J6htxttBipJujEjz1y0a5+eYoiPcFHhSYHH6na5f0/k=\ngithub.com/libp2p/go-libp2p-pnet v0.2.0/go.mod h1:Qqvq6JH/oMZGwqs3N1Fqhv8NVhrdYcO0BW4wssv21LA=\ngithub.com/libp2p/go-libp2p-protocol v0.0.1/go.mod h1:Af9n4PiruirSDjHycM1QuiMi/1VZNHYcK8cLgFJLZ4s=\ngithub.com/libp2p/go-libp2p-protocol v0.1.0/go.mod h1:KQPHpAabB57XQxGrXCNvbL6UEXfQqUgC/1adR2Xtflk=\ngithub.com/libp2p/go-libp2p-pubsub v0.1.1/go.mod h1:ZwlKzRSe1eGvSIdU5bD7+8RZN/Uzw0t1Bp9R1znpR/Q=\ngithub.com/libp2p/go-libp2p-pubsub v0.3.2-0.20200527132641-c0712c6e92cf/go.mod h1:TxPOBuo1FPdsTjFnv+FGZbNbWYsp74Culx+4ViQpato=\ngithub.com/libp2p/go-libp2p-pubsub v0.4.2-0.20210212194758-6c1addf493eb h1:HExLcdXn8fgtXPciUw97O5NNhBn31dt6d9fVUD4cngo=\ngithub.com/libp2p/go-libp2p-pubsub v0.4.2-0.20210212194758-6c1addf493eb/go.mod h1:izkeMLvz6Ht8yAISXjx60XUQZMq9ZMe5h2ih4dLIBIQ=\ngithub.com/libp2p/go-libp2p-quic-transport v0.1.1/go.mod h1:wqG/jzhF3Pu2NrhJEvE+IE0NTHNXslOPn9JQzyCAxzU=\ngithub.com/libp2p/go-libp2p-quic-transport v0.5.0/go.mod h1:IEcuC5MLxvZ5KuHKjRu+dr3LjCT1Be3rcD/4d8JrX8M=\ngithub.com/libp2p/go-libp2p-quic-transport v0.9.0/go.mod h1:xyY+IgxL0qsW7Kiutab0+NlxM0/p9yRtrGTYsuMWf70=\ngithub.com/libp2p/go-libp2p-record v0.0.1/go.mod h1:grzqg263Rug/sRex85QrDOLntdFAymLDLm7lxMgU79Q=\ngithub.com/libp2p/go-libp2p-record v0.1.0/go.mod h1:ujNc8iuE5dlKWVy6wuL6dd58t0n7xI4hAIl8pE6wu5Q=\ngithub.com/libp2p/go-libp2p-record v0.1.1/go.mod h1:VRgKajOyMVgP/F0L5g3kH7SVskp17vFi2xheb5uMJtg=\ngithub.com/libp2p/go-libp2p-record v0.1.2/go.mod h1:pal0eNcT5nqZaTV7UGhqeGqxFgGdsU/9W//C8dqjQDk=\ngithub.com/libp2p/go-libp2p-record v0.1.3 h1:R27hoScIhQf/A8XJZ8lYpnqh9LatJ5YbHs28kCIfql0=\ngithub.com/libp2p/go-libp2p-record v0.1.3/go.mod h1:yNUff/adKIfPnYQXgp6FQmNu3gLJ6EMg7+/vv2+9pY4=\ngithub.com/libp2p/go-libp2p-routing v0.0.1/go.mod h1:N51q3yTr4Zdr7V8Jt2JIktVU+3xBBylx1MZeVA6t1Ys=\ngithub.com/libp2p/go-libp2p-routing v0.1.0/go.mod h1:zfLhI1RI8RLEzmEaaPwzonRvXeeSHddONWkcTcB54nE=\ngithub.com/libp2p/go-libp2p-routing-helpers v0.2.3/go.mod h1:795bh+9YeoFl99rMASoiVgHdi5bjack0N1+AFAdbvBw=\ngithub.com/libp2p/go-libp2p-secio v0.0.1/go.mod h1:IdG6iQybdcYmbTzxp4J5dwtUEDTOvZrT0opIDVNPrJs=\ngithub.com/libp2p/go-libp2p-secio v0.0.3/go.mod h1:hS7HQ00MgLhRO/Wyu1bTX6ctJKhVpm+j2/S2A5UqYb0=\ngithub.com/libp2p/go-libp2p-secio v0.1.0/go.mod h1:tMJo2w7h3+wN4pgU2LSYeiKPrfqBgkOsdiKK77hE7c8=\ngithub.com/libp2p/go-libp2p-secio v0.2.0/go.mod h1:2JdZepB8J5V9mBp79BmwsaPQhRPNN2NrnB2lKQcdy6g=\ngithub.com/libp2p/go-libp2p-secio v0.2.1/go.mod h1:cWtZpILJqkqrSkiYcDBh5lA3wbT2Q+hz3rJQq3iftD8=\ngithub.com/libp2p/go-libp2p-secio v0.2.2/go.mod h1:wP3bS+m5AUnFA+OFO7Er03uO1mncHG0uVwGrwvjYlNY=\ngithub.com/libp2p/go-libp2p-swarm v0.0.1/go.mod h1:mh+KZxkbd3lQnveQ3j2q60BM1Cw2mX36XXQqwfPOShs=\ngithub.com/libp2p/go-libp2p-swarm v0.0.6/go.mod h1:s5GZvzg9xXe8sbeESuFpjt8CJPTCa8mhEusweJqyFy8=\ngithub.com/libp2p/go-libp2p-swarm v0.1.0/go.mod h1:wQVsCdjsuZoc730CgOvh5ox6K8evllckjebkdiY5ta4=\ngithub.com/libp2p/go-libp2p-swarm v0.2.1/go.mod h1:x07b4zkMFo2EvgPV2bMTlNmdQc8i+74Jjio7xGvsTgU=\ngithub.com/libp2p/go-libp2p-swarm v0.2.2/go.mod h1:fvmtQ0T1nErXym1/aa1uJEyN7JzaTNyBcHImCxRpPKU=\ngithub.com/libp2p/go-libp2p-swarm v0.2.3/go.mod h1:P2VO/EpxRyDxtChXz/VPVXyTnszHvokHKRhfkEgFKNM=\ngithub.com/libp2p/go-libp2p-swarm v0.2.4/go.mod h1:/xIpHFPPh3wmSthtxdGbkHZ0OET1h/GGZes8Wku/M5Y=\ngithub.com/libp2p/go-libp2p-swarm v0.2.7/go.mod h1:ZSJ0Q+oq/B1JgfPHJAT2HTall+xYRNYp1xs4S2FBWKA=\ngithub.com/libp2p/go-libp2p-swarm v0.2.8/go.mod h1:JQKMGSth4SMqonruY0a8yjlPVIkb0mdNSwckW7OYziM=\ngithub.com/libp2p/go-libp2p-swarm v0.3.0/go.mod h1:hdv95GWCTmzkgeJpP+GK/9D9puJegb7H57B5hWQR5Kk=\ngithub.com/libp2p/go-libp2p-swarm v0.3.1 h1:UTobu+oQHGdXTOGpZ4RefuVqYoJXcT0EBtSR74m2LkI=\ngithub.com/libp2p/go-libp2p-swarm v0.3.1/go.mod h1:hdv95GWCTmzkgeJpP+GK/9D9puJegb7H57B5hWQR5Kk=\ngithub.com/libp2p/go-libp2p-testing v0.0.1/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E=\ngithub.com/libp2p/go-libp2p-testing v0.0.2/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E=\ngithub.com/libp2p/go-libp2p-testing v0.0.3/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E=\ngithub.com/libp2p/go-libp2p-testing v0.0.4/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E=\ngithub.com/libp2p/go-libp2p-testing v0.1.0/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0=\ngithub.com/libp2p/go-libp2p-testing v0.1.1/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0=\ngithub.com/libp2p/go-libp2p-testing v0.1.2-0.20200422005655-8775583591d8/go.mod h1:Qy8sAncLKpwXtS2dSnDOP8ktexIAHKu+J+pnZOFZLTc=\ngithub.com/libp2p/go-libp2p-testing v0.3.0 h1:ZiBYstPamsi7y6NJZebRudUzsYmVkt998hltyLqf8+g=\ngithub.com/libp2p/go-libp2p-testing v0.3.0/go.mod h1:efZkql4UZ7OVsEfaxNHZPzIehtsBXMrXnCfJIgDti5g=\ngithub.com/libp2p/go-libp2p-tls v0.1.3/go.mod h1:wZfuewxOndz5RTnCAxFliGjvYSDA40sKitV4c50uI1M=\ngithub.com/libp2p/go-libp2p-transport v0.0.1/go.mod h1:UzbUs9X+PHOSw7S3ZmeOxfnwaQY5vGDzZmKPod3N3tk=\ngithub.com/libp2p/go-libp2p-transport v0.0.4/go.mod h1:StoY3sx6IqsP6XKoabsPnHCwqKXWUMWU7Rfcsubee/A=\ngithub.com/libp2p/go-libp2p-transport v0.0.5/go.mod h1:StoY3sx6IqsP6XKoabsPnHCwqKXWUMWU7Rfcsubee/A=\ngithub.com/libp2p/go-libp2p-transport-upgrader v0.0.1/go.mod h1:NJpUAgQab/8K6K0m+JmZCe5RUXG10UMEx4kWe9Ipj5c=\ngithub.com/libp2p/go-libp2p-transport-upgrader v0.0.4/go.mod h1:RGq+tupk+oj7PzL2kn/m1w6YXxcIAYJYeI90h6BGgUc=\ngithub.com/libp2p/go-libp2p-transport-upgrader v0.1.1/go.mod h1:IEtA6or8JUbsV07qPW4r01GnTenLW4oi3lOPbUMGJJA=\ngithub.com/libp2p/go-libp2p-transport-upgrader v0.2.0/go.mod h1:mQcrHj4asu6ArfSoMuyojOdjx73Q47cYD7s5+gZOlns=\ngithub.com/libp2p/go-libp2p-transport-upgrader v0.3.0 h1:q3ULhsknEQ34eVDhv4YwKS8iet69ffs9+Fir6a7weN4=\ngithub.com/libp2p/go-libp2p-transport-upgrader v0.3.0/go.mod h1:i+SKzbRnvXdVbU3D1dwydnTmKRPXiAR/fyvi1dXuL4o=\ngithub.com/libp2p/go-libp2p-yamux v0.1.2/go.mod h1:xUoV/RmYkg6BW/qGxA9XJyg+HzXFYkeXbnhjmnYzKp8=\ngithub.com/libp2p/go-libp2p-yamux v0.1.3/go.mod h1:VGSQVrqkh6y4nm0189qqxMtvyBft44MOYYPpYKXiVt4=\ngithub.com/libp2p/go-libp2p-yamux v0.2.0/go.mod h1:Db2gU+XfLpm6E4rG5uGCFX6uXA8MEXOxFcRoXUODaK8=\ngithub.com/libp2p/go-libp2p-yamux v0.2.1/go.mod h1:1FBXiHDk1VyRM1C0aez2bCfHQ4vMZKkAQzZbkSQt5fI=\ngithub.com/libp2p/go-libp2p-yamux v0.2.2/go.mod h1:lIohaR0pT6mOt0AZ0L2dFze9hds9Req3OfS+B+dv4qw=\ngithub.com/libp2p/go-libp2p-yamux v0.2.5/go.mod h1:Zpgj6arbyQrmZ3wxSZxfBmbdnWtbZ48OpsfmQVTErwA=\ngithub.com/libp2p/go-libp2p-yamux v0.2.7/go.mod h1:X28ENrBMU/nm4I3Nx4sZ4dgjZ6VhLEn0XhIoZ5viCwU=\ngithub.com/libp2p/go-libp2p-yamux v0.2.8/go.mod h1:/t6tDqeuZf0INZMTgd0WxIRbtK2EzI2h7HbFm9eAKI4=\ngithub.com/libp2p/go-libp2p-yamux v0.4.0/go.mod h1:+DWDjtFMzoAwYLVkNZftoucn7PelNoy5nm3tZ3/Zw30=\ngithub.com/libp2p/go-libp2p-yamux v0.4.1 h1:TJxRVPY9SjH7TNrNC80l1OJMBiWhs1qpKmeB+1Ug3xU=\ngithub.com/libp2p/go-libp2p-yamux v0.4.1/go.mod h1:FA/NjRYRVNjqOzpGuGqcruH7jAU2mYIjtKBicVOL3dc=\ngithub.com/libp2p/go-maddr-filter v0.0.1/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q=\ngithub.com/libp2p/go-maddr-filter v0.0.4/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q=\ngithub.com/libp2p/go-maddr-filter v0.0.5/go.mod h1:Jk+36PMfIqCJhAnaASRH83bdAvfDRp/w6ENFaC9bG+M=\ngithub.com/libp2p/go-maddr-filter v0.1.0/go.mod h1:VzZhTXkMucEGGEOSKddrwGiOv0tUhgnKqNEmIAz/bPU=\ngithub.com/libp2p/go-mplex v0.0.1/go.mod h1:pK5yMLmOoBR1pNCqDlA2GQrdAVTMkqFalaTWe7l4Yd0=\ngithub.com/libp2p/go-mplex v0.0.3/go.mod h1:pK5yMLmOoBR1pNCqDlA2GQrdAVTMkqFalaTWe7l4Yd0=\ngithub.com/libp2p/go-mplex v0.0.4/go.mod h1:pK5yMLmOoBR1pNCqDlA2GQrdAVTMkqFalaTWe7l4Yd0=\ngithub.com/libp2p/go-mplex v0.1.0/go.mod h1:SXgmdki2kwCUlCCbfGLEgHjC4pFqhTp0ZoV6aiKgxDU=\ngithub.com/libp2p/go-mplex v0.1.1/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3SFXI1lk=\ngithub.com/libp2p/go-mplex v0.1.2/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3SFXI1lk=\ngithub.com/libp2p/go-mplex v0.2.0/go.mod h1:0Oy/A9PQlwBytDRp4wSkFnzHYDKcpLot35JQ6msjvYQ=\ngithub.com/libp2p/go-msgio v0.0.1/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ=\ngithub.com/libp2p/go-msgio v0.0.2/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ=\ngithub.com/libp2p/go-msgio v0.0.3/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ=\ngithub.com/libp2p/go-msgio v0.0.4/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ=\ngithub.com/libp2p/go-msgio v0.0.6 h1:lQ7Uc0kS1wb1EfRxO2Eir/RJoHkHn7t6o+EiwsYIKJA=\ngithub.com/libp2p/go-msgio v0.0.6/go.mod h1:4ecVB6d9f4BDSL5fqvPiC4A3KivjWn+Venn/1ALLMWA=\ngithub.com/libp2p/go-nat v0.0.3/go.mod h1:88nUEt0k0JD45Bk93NIwDqjlhiOwOoV36GchpcVc1yI=\ngithub.com/libp2p/go-nat v0.0.4/go.mod h1:Nmw50VAvKuk38jUBcmNh6p9lUJLoODbJRvYAa/+KSDo=\ngithub.com/libp2p/go-nat v0.0.5 h1:qxnwkco8RLKqVh1NmjQ+tJ8p8khNLFxuElYG/TwqW4Q=\ngithub.com/libp2p/go-nat v0.0.5/go.mod h1:B7NxsVNPZmRLvMOwiEO1scOSyjA56zxYAGv1yQgRkEU=\ngithub.com/libp2p/go-netroute v0.1.2/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk=\ngithub.com/libp2p/go-netroute v0.1.3 h1:1ngWRx61us/EpaKkdqkMjKk/ufr/JlIFYQAxV2XX8Ig=\ngithub.com/libp2p/go-netroute v0.1.3/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk=\ngithub.com/libp2p/go-openssl v0.0.2/go.mod h1:v8Zw2ijCSWBQi8Pq5GAixw6DbFfa9u6VIYDXnvOXkc0=\ngithub.com/libp2p/go-openssl v0.0.3/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc=\ngithub.com/libp2p/go-openssl v0.0.4/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc=\ngithub.com/libp2p/go-openssl v0.0.5/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc=\ngithub.com/libp2p/go-openssl v0.0.7 h1:eCAzdLejcNVBzP/iZM9vqHnQm+XyCEbSSIheIPRGNsw=\ngithub.com/libp2p/go-openssl v0.0.7/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc=\ngithub.com/libp2p/go-reuseport v0.0.1/go.mod h1:jn6RmB1ufnQwl0Q1f+YxAj8isJgDCQzaaxIFYDhcYEA=\ngithub.com/libp2p/go-reuseport v0.0.2 h1:XSG94b1FJfGA01BUrT82imejHQyTxO4jEWqheyCXYvU=\ngithub.com/libp2p/go-reuseport v0.0.2/go.mod h1:SPD+5RwGC7rcnzngoYC86GjPzjSywuQyMVAheVBD9nQ=\ngithub.com/libp2p/go-reuseport-transport v0.0.1/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs=\ngithub.com/libp2p/go-reuseport-transport v0.0.2/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs=\ngithub.com/libp2p/go-reuseport-transport v0.0.3/go.mod h1:Spv+MPft1exxARzP2Sruj2Wb5JSyHNncjf1Oi2dEbzM=\ngithub.com/libp2p/go-reuseport-transport v0.0.4 h1:OZGz0RB620QDGpv300n1zaOcKGGAoGVf8h9txtt/1uM=\ngithub.com/libp2p/go-reuseport-transport v0.0.4/go.mod h1:trPa7r/7TJK/d+0hdBLOCGvpQQVOU74OXbNCIMkufGw=\ngithub.com/libp2p/go-sockaddr v0.0.2/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k=\ngithub.com/libp2p/go-sockaddr v0.1.0 h1:Y4s3/jNoryVRKEBrkJ576F17CPOaMIzUeCsg7dlTDj0=\ngithub.com/libp2p/go-sockaddr v0.1.0/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k=\ngithub.com/libp2p/go-stream-muxer v0.0.1/go.mod h1:bAo8x7YkSpadMTbtTaxGVHWUQsR/l5MEaHbKaliuT14=\ngithub.com/libp2p/go-stream-muxer v0.1.0/go.mod h1:8JAVsjeRBCWwPoZeH0W1imLOcriqXJyFvB0mR4A04sQ=\ngithub.com/libp2p/go-stream-muxer-multistream v0.1.1/go.mod h1:zmGdfkQ1AzOECIAcccoL8L//laqawOsO03zX8Sa+eGw=\ngithub.com/libp2p/go-stream-muxer-multistream v0.2.0/go.mod h1:j9eyPol/LLRqT+GPLSxvimPhNph4sfYfMoDPd7HkzIc=\ngithub.com/libp2p/go-stream-muxer-multistream v0.3.0 h1:TqnSHPJEIqDEO7h1wZZ0p3DXdvDSiLHQidKKUGZtiOY=\ngithub.com/libp2p/go-stream-muxer-multistream v0.3.0/go.mod h1:yDh8abSIzmZtqtOt64gFJUXEryejzNb0lisTt+fAMJA=\ngithub.com/libp2p/go-tcp-transport v0.0.1/go.mod h1:mnjg0o0O5TmXUaUIanYPUqkW4+u6mK0en8rlpA6BBTs=\ngithub.com/libp2p/go-tcp-transport v0.0.4/go.mod h1:+E8HvC8ezEVOxIo3V5vCK9l1y/19K427vCzQ+xHKH/o=\ngithub.com/libp2p/go-tcp-transport v0.1.0/go.mod h1:oJ8I5VXryj493DEJ7OsBieu8fcg2nHGctwtInJVpipc=\ngithub.com/libp2p/go-tcp-transport v0.1.1/go.mod h1:3HzGvLbx6etZjnFlERyakbaYPdfjg2pWP97dFZworkY=\ngithub.com/libp2p/go-tcp-transport v0.2.0/go.mod h1:vX2U0CnWimU4h0SGSEsg++AzvBcroCGYw28kh94oLe0=\ngithub.com/libp2p/go-tcp-transport v0.2.1 h1:ExZiVQV+h+qL16fzCWtd1HSzPsqWottJ8KXwWaVi8Ns=\ngithub.com/libp2p/go-tcp-transport v0.2.1/go.mod h1:zskiJ70MEfWz2MKxvFB/Pv+tPIB1PpPUrHIWQ8aFw7M=\ngithub.com/libp2p/go-testutil v0.0.1/go.mod h1:iAcJc/DKJQanJ5ws2V+u5ywdL2n12X1WbbEG+Jjy69I=\ngithub.com/libp2p/go-testutil v0.1.0/go.mod h1:81b2n5HypcVyrCg/MJx4Wgfp/VHojytjVe/gLzZ2Ehc=\ngithub.com/libp2p/go-ws-transport v0.0.1/go.mod h1:p3bKjDWHEgtuKKj+2OdPYs5dAPIjtpQGHF2tJfGz7Ww=\ngithub.com/libp2p/go-ws-transport v0.0.5/go.mod h1:Qbl4BxPfXXhhd/o0wcrgoaItHqA9tnZjoFZnxykuaXU=\ngithub.com/libp2p/go-ws-transport v0.1.0/go.mod h1:rjw1MG1LU9YDC6gzmwObkPd/Sqwhw7yT74kj3raBFuo=\ngithub.com/libp2p/go-ws-transport v0.1.2/go.mod h1:dsh2Ld8F+XNmzpkaAijmg5Is+e9l6/1tK/6VFOdN69Y=\ngithub.com/libp2p/go-ws-transport v0.2.0/go.mod h1:9BHJz/4Q5A9ludYWKoGCFC5gUElzlHoKzu0yY9p/klM=\ngithub.com/libp2p/go-ws-transport v0.3.0/go.mod h1:bpgTJmRZAvVHrgHybCVyqoBmyLQ1fiZuEaBYusP5zsk=\ngithub.com/libp2p/go-ws-transport v0.3.1/go.mod h1:bpgTJmRZAvVHrgHybCVyqoBmyLQ1fiZuEaBYusP5zsk=\ngithub.com/libp2p/go-yamux v1.2.1/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow=\ngithub.com/libp2p/go-yamux v1.2.2/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow=\ngithub.com/libp2p/go-yamux v1.2.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow=\ngithub.com/libp2p/go-yamux v1.3.0/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow=\ngithub.com/libp2p/go-yamux v1.3.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow=\ngithub.com/libp2p/go-yamux v1.3.5/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow=\ngithub.com/libp2p/go-yamux v1.3.6/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow=\ngithub.com/libp2p/go-yamux v1.3.7/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE=\ngithub.com/libp2p/go-yamux v1.4.0/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE=\ngithub.com/libp2p/go-yamux v1.4.1 h1:P1Fe9vF4th5JOxxgQvfbOHkrGqIZniTLf+ddhZp8YTI=\ngithub.com/libp2p/go-yamux v1.4.1/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE=\ngithub.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=\ngithub.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=\ngithub.com/lucas-clemente/quic-go v0.11.2/go.mod h1:PpMmPfPKO9nKJ/psF49ESTAGQSdfXxlg1otPbEB2nOw=\ngithub.com/lucas-clemente/quic-go v0.16.0/go.mod h1:I0+fcNTdb9eS1ZcjQZbDVPGchJ86chcIxPALn9lEJqE=\ngithub.com/lucas-clemente/quic-go v0.18.1/go.mod h1:yXttHsSNxQi8AWijC/vLP+OJczXqzHSOcJrM5ITUlCg=\ngithub.com/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4=\ngithub.com/lufia/iostat v1.1.0/go.mod h1:rEPNA0xXgjHQjuI5Cy05sLlS2oRcSlWHRLrvh/AQ+Pg=\ngithub.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=\ngithub.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=\ngithub.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=\ngithub.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=\ngithub.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls=\ngithub.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=\ngithub.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=\ngithub.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=\ngithub.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=\ngithub.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=\ngithub.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=\ngithub.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=\ngithub.com/marten-seemann/qpack v0.1.0/go.mod h1:LFt1NU/Ptjip0C2CPkhimBz5CGE3WGDAUWqna+CNTrI=\ngithub.com/marten-seemann/qpack v0.2.0/go.mod h1:F7Gl5L1jIgN1D11ucXefiuJS9UMVP2opoCp2jDKb7wc=\ngithub.com/marten-seemann/qtls v0.2.3/go.mod h1:xzjG7avBwGGbdZ8dTGxlBnLArsVKLvwmjgmPuiQEcYk=\ngithub.com/marten-seemann/qtls v0.9.1/go.mod h1:T1MmAdDPyISzxlK6kjRr0pcZFBVd1OZbBb/j3cvzHhk=\ngithub.com/marten-seemann/qtls v0.10.0/go.mod h1:UvMd1oaYDACI99/oZUYLzMCkBXQVT0aGm99sJhbT8hs=\ngithub.com/marten-seemann/qtls-go1-15 v0.1.0/go.mod h1:GyFwywLKkRt+6mfU99csTEY1joMZz5vmB1WNZH3P81I=\ngithub.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ=\ngithub.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=\ngithub.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=\ngithub.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=\ngithub.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=\ngithub.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=\ngithub.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=\ngithub.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=\ngithub.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=\ngithub.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=\ngithub.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc=\ngithub.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc=\ngithub.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=\ngithub.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=\ngithub.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=\ngithub.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=\ngithub.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=\ngithub.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=\ngithub.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=\ngithub.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=\ngithub.com/mattn/go-isatty v0.0.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1yA=\ngithub.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=\ngithub.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=\ngithub.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=\ngithub.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=\ngithub.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=\ngithub.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=\ngithub.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=\ngithub.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=\ngithub.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE=\ngithub.com/mattn/go-xmlrpc v0.0.3/go.mod h1:mqc2dz7tP5x5BKlCahN/n+hs7OSZKJkS9JsHNBRlrxA=\ngithub.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=\ngithub.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=\ngithub.com/mdlayher/genetlink v1.0.0/go.mod h1:0rJ0h4itni50A86M2kHcgS85ttZazNt7a8H2a2cw0Gc=\ngithub.com/mdlayher/netlink v0.0.0-20190409211403-11939a169225/go.mod h1:eQB3mZE4aiYnlUsyGGCOpPETfdQq4Jhsgf1fk3cwQaA=\ngithub.com/mdlayher/netlink v0.0.0-20190828143259-340058475d09/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M=\ngithub.com/mdlayher/netlink v1.0.0/go.mod h1:KxeJAFOFLG6AjpyDkQ/iIhxygIUKD+vcwqcnu43w/+M=\ngithub.com/mdlayher/netlink v1.1.0/go.mod h1:H4WCitaheIsdF9yOYu8CFmCgQthAPIWZmcKp9uZHgmY=\ngithub.com/mdlayher/wifi v0.0.0-20190303161829-b1436901ddee/go.mod h1:Evt/EIne46u9PtQbeTx2NTcqURpr5K4SvKtGmBuDPN8=\ngithub.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=\ngithub.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4=\ngithub.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=\ngithub.com/miekg/dns v1.1.4/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=\ngithub.com/miekg/dns v1.1.12/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=\ngithub.com/miekg/dns v1.1.28/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM=\ngithub.com/miekg/dns v1.1.31/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM=\ngithub.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0=\ngithub.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM=\ngithub.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g=\ngithub.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ=\ngithub.com/minio/highwayhash v1.0.1 h1:dZ6IIu8Z14VlC0VpfKofAhCy74wu/Qb5gcn52yWoz/0=\ngithub.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY=\ngithub.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U=\ngithub.com/minio/sha256-simd v0.0.0-20190328051042-05b4dd3047e5/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U=\ngithub.com/minio/sha256-simd v0.1.0/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U=\ngithub.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM=\ngithub.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU=\ngithub.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM=\ngithub.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=\ngithub.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=\ngithub.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=\ngithub.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=\ngithub.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=\ngithub.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=\ngithub.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=\ngithub.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=\ngithub.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=\ngithub.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=\ngithub.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag=\ngithub.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=\ngithub.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A=\ngithub.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4=\ngithub.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=\ngithub.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=\ngithub.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=\ngithub.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=\ngithub.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8=\ngithub.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8=\ngithub.com/mr-tron/base58 v1.1.1/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8=\ngithub.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=\ngithub.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=\ngithub.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o=\ngithub.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=\ngithub.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg=\ngithub.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs=\ngithub.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns=\ngithub.com/multiformats/go-base32 v0.0.3 h1:tw5+NhuwaOjJCC5Pp82QuXbrmLzWg7uxlMFp8Nq/kkI=\ngithub.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA=\ngithub.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4=\ngithub.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM=\ngithub.com/multiformats/go-multiaddr v0.0.1/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44=\ngithub.com/multiformats/go-multiaddr v0.0.2/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44=\ngithub.com/multiformats/go-multiaddr v0.0.4/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44=\ngithub.com/multiformats/go-multiaddr v0.1.0/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44=\ngithub.com/multiformats/go-multiaddr v0.1.1/go.mod h1:aMKBKNEYmzmDmxfX88/vz+J5IU55txyt0p4aiWVohjo=\ngithub.com/multiformats/go-multiaddr v0.2.0/go.mod h1:0nO36NvPpyV4QzvTLi/lafl2y95ncPj0vFwVF6k6wJ4=\ngithub.com/multiformats/go-multiaddr v0.2.1/go.mod h1:s/Apk6IyxfvMjDafnhJgJ3/46z7tZ04iMk5wP4QMGGE=\ngithub.com/multiformats/go-multiaddr v0.2.2/go.mod h1:NtfXiOtHvghW9KojvtySjH5y0u0xW5UouOmQQrn6a3Y=\ngithub.com/multiformats/go-multiaddr v0.3.0/go.mod h1:dF9kph9wfJ+3VLAaeBqo9Of8x4fJxp6ggJGteB8HQTI=\ngithub.com/multiformats/go-multiaddr v0.3.1 h1:1bxa+W7j9wZKTZREySx1vPMs2TqrYWjVZ7zE6/XLG1I=\ngithub.com/multiformats/go-multiaddr v0.3.1/go.mod h1:uPbspcUPd5AfaP6ql3ujFY+QWzmBD8uLLL4bXW0XfGc=\ngithub.com/multiformats/go-multiaddr-dns v0.0.1/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q=\ngithub.com/multiformats/go-multiaddr-dns v0.0.2/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q=\ngithub.com/multiformats/go-multiaddr-dns v0.0.3/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q=\ngithub.com/multiformats/go-multiaddr-dns v0.1.0/go.mod h1:01k2RAqtoXIuPa3DCavAE9/6jc6nM0H3EgZyfUhN2oY=\ngithub.com/multiformats/go-multiaddr-dns v0.2.0 h1:YWJoIDwLePniH7OU5hBnDZV6SWuvJqJ0YtN6pLeH9zA=\ngithub.com/multiformats/go-multiaddr-dns v0.2.0/go.mod h1:TJ5pr5bBO7Y1B18djPuRsVkduhQH2YqYSbxWJzYGdK0=\ngithub.com/multiformats/go-multiaddr-fmt v0.0.1/go.mod h1:aBYjqL4T/7j4Qx+R73XSv/8JsgnRFlf0w2KGLCmXl3Q=\ngithub.com/multiformats/go-multiaddr-fmt v0.1.0 h1:WLEFClPycPkp4fnIzoFoV9FVd49/eQsuaL3/CWe167E=\ngithub.com/multiformats/go-multiaddr-fmt v0.1.0/go.mod h1:hGtDIW4PU4BqJ50gW2quDuPVjyWNZxToGUh/HwTZYJo=\ngithub.com/multiformats/go-multiaddr-net v0.0.1/go.mod h1:nw6HSxNmCIQH27XPGBuX+d1tnvM7ihcFwHMSstNAVUU=\ngithub.com/multiformats/go-multiaddr-net v0.1.0/go.mod h1:5JNbcfBOP4dnhoZOv10JJVkJO0pCCEf8mTnipAo2UZQ=\ngithub.com/multiformats/go-multiaddr-net v0.1.1/go.mod h1:5JNbcfBOP4dnhoZOv10JJVkJO0pCCEf8mTnipAo2UZQ=\ngithub.com/multiformats/go-multiaddr-net v0.1.2/go.mod h1:QsWt3XK/3hwvNxZJp92iMQKME1qHfpYmyIjFVsSOY6Y=\ngithub.com/multiformats/go-multiaddr-net v0.1.3/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA=\ngithub.com/multiformats/go-multiaddr-net v0.1.4/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA=\ngithub.com/multiformats/go-multiaddr-net v0.1.5/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA=\ngithub.com/multiformats/go-multiaddr-net v0.2.0 h1:MSXRGN0mFymt6B1yo/6BPnIRpLPEnKgQNvVfCX5VDJk=\ngithub.com/multiformats/go-multiaddr-net v0.2.0/go.mod h1:gGdH3UXny6U3cKKYCvpXI5rnK7YaOIEOPVDI9tsJbEA=\ngithub.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs=\ngithub.com/multiformats/go-multibase v0.0.2/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs=\ngithub.com/multiformats/go-multibase v0.0.3 h1:l/B6bJDQjvQ5G52jw4QGSYeOTZoAwIO77RblWplfIqk=\ngithub.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc=\ngithub.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U=\ngithub.com/multiformats/go-multihash v0.0.5/go.mod h1:lt/HCbqlQwlPBz7lv0sQCdtfcMtlJvakRUn/0Ual8po=\ngithub.com/multiformats/go-multihash v0.0.7/go.mod h1:XuKXPp8VHcTygube3OWZC+aZrA+H1IhmjoCDtJc7PXM=\ngithub.com/multiformats/go-multihash v0.0.8/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew=\ngithub.com/multiformats/go-multihash v0.0.9/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew=\ngithub.com/multiformats/go-multihash v0.0.10/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew=\ngithub.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc=\ngithub.com/multiformats/go-multihash v0.0.14 h1:QoBceQYQQtNUuf6s7wHxnE2c8bhbMqhfGzNI032se/I=\ngithub.com/multiformats/go-multihash v0.0.14/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc=\ngithub.com/multiformats/go-multistream v0.0.1/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg=\ngithub.com/multiformats/go-multistream v0.0.4/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg=\ngithub.com/multiformats/go-multistream v0.1.0/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg=\ngithub.com/multiformats/go-multistream v0.1.1/go.mod h1:KmHZ40hzVxiaiwlj3MEbYgK9JFk2/9UktWZAF54Du38=\ngithub.com/multiformats/go-multistream v0.2.0 h1:6AuNmQVKUkRnddw2YiDjt5Elit40SFxMJkVnhmETXtU=\ngithub.com/multiformats/go-multistream v0.2.0/go.mod h1:5GZPQZbkWOLOn3J2y4Y99vVW7vOfsAflxARk3x14o6k=\ngithub.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE=\ngithub.com/multiformats/go-varint v0.0.2/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE=\ngithub.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE=\ngithub.com/multiformats/go-varint v0.0.6 h1:gk85QWKxh3TazbLxED/NlDVv8+q+ReFJk7Y2W/KhfNY=\ngithub.com/multiformats/go-varint v0.0.6/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE=\ngithub.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=\ngithub.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=\ngithub.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0=\ngithub.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E=\ngithub.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg=\ngithub.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU=\ngithub.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k=\ngithub.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w=\ngithub.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=\ngithub.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=\ngithub.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=\ngithub.com/near/borsh-go v0.3.0 h1:+DvG7eApOD3KrHIh7TwZvYzhXUF/OzMTC6aRTUEtW+8=\ngithub.com/near/borsh-go v0.3.0/go.mod h1:NeMochZp7jN/pYFuxLkrZtmLqbADmnp/y1+/dL+AsyQ=\ngithub.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo=\ngithub.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM=\ngithub.com/neilotoole/errgroup v0.1.5/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE=\ngithub.com/ngdinhtoan/glide-cleanup v0.2.0/go.mod h1:UQzsmiDOb8YV3nOsCxK/c9zPpCZVNoHScRE3EO9pVMM=\ngithub.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=\ngithub.com/nikkolasg/hexjson v0.0.0-20181101101858-78e39397e00c/go.mod h1:7qN3Y0BvzRUf4LofcoJplQL10lsFDb4PYlePTVwrP28=\ngithub.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso=\ngithub.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229 h1:E2B8qYyeSgv5MXpmzZXRNp8IAQ4vjxIjhpAf5hv/tAg=\ngithub.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E=\ngithub.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=\ngithub.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=\ngithub.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs=\ngithub.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=\ngithub.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=\ngithub.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=\ngithub.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=\ngithub.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=\ngithub.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=\ngithub.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=\ngithub.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=\ngithub.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=\ngithub.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=\ngithub.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=\ngithub.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=\ngithub.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg=\ngithub.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=\ngithub.com/onsi/ginkgo v1.12.3/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=\ngithub.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA=\ngithub.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=\ngithub.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=\ngithub.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=\ngithub.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=\ngithub.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=\ngithub.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA=\ngithub.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA=\ngithub.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE=\ngithub.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=\ngithub.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=\ngithub.com/open-rpc/meta-schema v0.0.0-20201029221707-1b72ef2ea333/go.mod h1:Ag6rSXkHIckQmjFBCweJEEt1mrTPBv8b9W4aU/NQWfI=\ngithub.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=\ngithub.com/opentracing-contrib/go-grpc v0.0.0-20180928155321-4b5a12d3ff02/go.mod h1:JNdpVEzCpXBgIiv4ds+TzhN1hrtxq6ClLrTlT9OQRSc=\ngithub.com/opentracing-contrib/go-grpc v0.0.0-20191001143057-db30781987df/go.mod h1:DYR5Eij8rJl8h7gblRrOZ8g0kW1umSpKqYIBTgeDtLo=\ngithub.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=\ngithub.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w=\ngithub.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU=\ngithub.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74=\ngithub.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=\ngithub.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=\ngithub.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=\ngithub.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=\ngithub.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=\ngithub.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA=\ngithub.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8=\ngithub.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=\ngithub.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=\ngithub.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=\ngithub.com/otiai10/copy v1.6.0 h1:IinKAryFFuPONZ7cm6T6E2QX/vcJwSnlaA5lfoaXIiQ=\ngithub.com/otiai10/copy v1.6.0/go.mod h1:XWfuS3CrI0R6IE0FbgHsEazaXO8G0LpMp9o8tos0x4E=\ngithub.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=\ngithub.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs=\ngithub.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo=\ngithub.com/otiai10/mint v1.3.2/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc=\ngithub.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM=\ngithub.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=\ngithub.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY=\ngithub.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=\ngithub.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE=\ngithub.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34=\ngithub.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=\ngithub.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=\ngithub.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ=\ngithub.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=\ngithub.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac=\ngithub.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc=\ngithub.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0=\ngithub.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ=\ngithub.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o=\ngithub.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU=\ngithub.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=\ngithub.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=\ngithub.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=\ngithub.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=\ngithub.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA=\ngithub.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=\ngithub.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ=\ngithub.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=\ngithub.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/polydawn/refmt v0.0.0-20190221155625-df39d6c2d992/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o=\ngithub.com/polydawn/refmt v0.0.0-20190408063855-01bf1e26dd14/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o=\ngithub.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o=\ngithub.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a h1:hjZfReYVLbqFkAtr2us7vdy04YWz3LVAirzP7reh8+M=\ngithub.com/polydawn/refmt v0.0.0-20190809202753-05966cbd336a/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o=\ngithub.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=\ngithub.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=\ngithub.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=\ngithub.com/prometheus/client_golang v0.9.2/go.mod h1:OsXs2jCmiKlQ1lTBmv21f2mNfw4xf/QclQDMrYNZzcM=\ngithub.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=\ngithub.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=\ngithub.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=\ngithub.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g=\ngithub.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og=\ngithub.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=\ngithub.com/prometheus/client_golang v1.4.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=\ngithub.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4=\ngithub.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=\ngithub.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM=\ngithub.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ=\ngithub.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=\ngithub.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=\ngithub.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=\ngithub.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=\ngithub.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=\ngithub.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=\ngithub.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=\ngithub.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=\ngithub.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=\ngithub.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=\ngithub.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=\ngithub.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=\ngithub.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=\ngithub.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=\ngithub.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc=\ngithub.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA=\ngithub.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=\ngithub.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=\ngithub.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s=\ngithub.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=\ngithub.com/prometheus/common v0.29.0 h1:3jqPBvKT4OHAbje2Ql7KeaaSicDBCxMYwEJU1zRJceE=\ngithub.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=\ngithub.com/prometheus/node_exporter v1.0.0-rc.0.0.20200428091818-01054558c289/go.mod h1:FGbBv5OPKjch+jNUJmEQpMZytIdyW0NdBtWFcfSKusc=\ngithub.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=\ngithub.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=\ngithub.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=\ngithub.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=\ngithub.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=\ngithub.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=\ngithub.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=\ngithub.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=\ngithub.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=\ngithub.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=\ngithub.com/prometheus/procfs v0.1.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=\ngithub.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=\ngithub.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=\ngithub.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4=\ngithub.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=\ngithub.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=\ngithub.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA=\ngithub.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=\ngithub.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ=\ngithub.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc=\ngithub.com/raulk/clock v1.1.0 h1:dpb29+UKMbLqiU/jqIJptgLR1nn23HLgMY0sTCDza5Y=\ngithub.com/raulk/clock v1.1.0/go.mod h1:3MpVxdZ/ODBQDxbN+kzshf5OSZwPjtMDx6BBXBmOeY0=\ngithub.com/raulk/go-watchdog v1.0.1/go.mod h1:lzSbAl5sh4rtI8tYHU01BWIDzgzqaQLj6RcA1i4mlqI=\ngithub.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=\ngithub.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ=\ngithub.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=\ngithub.com/regen-network/cosmos-proto v0.3.1 h1:rV7iM4SSFAagvy8RiyhiACbWEGotmqzywPxOvwMdxcg=\ngithub.com/regen-network/cosmos-proto v0.3.1/go.mod h1:jO0sVX6a1B36nmE8C9xBFXpNwWejXC7QqCOnH3O0+YM=\ngithub.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4=\ngithub.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI=\ngithub.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk=\ngithub.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=\ngithub.com/renproject/id v0.4.2 h1:XseNDPPCJtsZjIWR7Qgf+zxy0Gt5xsLrfwpQxJt5wFQ=\ngithub.com/renproject/id v0.4.2/go.mod h1:bCzV4zZkyWetf0GvhJxMT9HQNnGUwzQpImtXOUXqq0k=\ngithub.com/renproject/pack v0.2.5 h1:BNfam8PCb5qJuIX36IqOkcRgaZLOZsM1lZZSakbOxb4=\ngithub.com/renproject/pack v0.2.5/go.mod h1:pzX3Hc04RoPft89LaZJVp0xgngVGi90V7GvyC3mOGg4=\ngithub.com/renproject/surge v1.2.2/go.mod h1:jNVsKCM3/2PAllkc2cx7g2saG9NrHRX5x20I/TDMXOs=\ngithub.com/renproject/surge v1.2.5/go.mod h1:jNVsKCM3/2PAllkc2cx7g2saG9NrHRX5x20I/TDMXOs=\ngithub.com/renproject/surge v1.2.6 h1:4EV2jbBPvQM8Wnv5zL1N1X/UbaH6AZiRUv7r4xZ8ncA=\ngithub.com/renproject/surge v1.2.6/go.mod h1:jNVsKCM3/2PAllkc2cx7g2saG9NrHRX5x20I/TDMXOs=\ngithub.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc=\ngithub.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE=\ngithub.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho=\ngithub.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=\ngithub.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=\ngithub.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=\ngithub.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=\ngithub.com/rs/cors v1.6.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=\ngithub.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik=\ngithub.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=\ngithub.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ=\ngithub.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=\ngithub.com/rs/zerolog v1.23.0 h1:UskrK+saS9P9Y789yNNulYKdARjPZuS35B8gJF2x60g=\ngithub.com/rs/zerolog v1.23.0/go.mod h1:6c7hFfxPOy7TacJc4Fcdi24/J0NKYGzjG8FWRI916Qo=\ngithub.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=\ngithub.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=\ngithub.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=\ngithub.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=\ngithub.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=\ngithub.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk=\ngithub.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=\ngithub.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=\ngithub.com/sasha-s/go-deadlock v0.2.0/go.mod h1:StQn567HiB1fF2yJ44N9au7wOhrPS3iZqiDbRupzT10=\ngithub.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4=\ngithub.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM=\ngithub.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=\ngithub.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY=\ngithub.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo=\ngithub.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo=\ngithub.com/sercand/kuberesolver v2.1.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJPl/ZshwPsX/n4Y7u0CW9E7aQIQ=\ngithub.com/sercand/kuberesolver v2.4.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJPl/ZshwPsX/n4Y7u0CW9E7aQIQ=\ngithub.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=\ngithub.com/shirou/gopsutil v2.18.12+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=\ngithub.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=\ngithub.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU=\ngithub.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=\ngithub.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY=\ngithub.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM=\ngithub.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0=\ngithub.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=\ngithub.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ=\ngithub.com/shurcooL/gofontwoff v0.0.0-20180329035133-29b52fc0a18d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw=\ngithub.com/shurcooL/gopherjslib v0.0.0-20160914041154-feb6d3990c2c/go.mod h1:8d3azKNyqcHP1GaQE/c6dDgjkgSx2BZ4IoEi4F1reUI=\ngithub.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU=\ngithub.com/shurcooL/highlight_go v0.0.0-20181028180052-98c3abbbae20/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag=\ngithub.com/shurcooL/home v0.0.0-20181020052607-80b7ffcb30f9/go.mod h1:+rgNQw2P9ARFAs37qieuu7ohDNQ3gds9msbT2yn85sg=\ngithub.com/shurcooL/htmlg v0.0.0-20170918183704-d01228ac9e50/go.mod h1:zPn1wHpTIePGnXSHpsVPWEktKXHr6+SS6x/IKRb7cpw=\ngithub.com/shurcooL/httperror v0.0.0-20170206035902-86b7830d14cc/go.mod h1:aYMfkZ6DWSJPJ6c4Wwz3QtW22G7mf/PEgaB9k/ik5+Y=\ngithub.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg=\ngithub.com/shurcooL/httpgzip v0.0.0-20180522190206-b1c53ac65af9/go.mod h1:919LwcH0M7/W4fcZ0/jy0qGght1GIhqyS/EgWGH2j5Q=\ngithub.com/shurcooL/issues v0.0.0-20181008053335-6292fdc1e191/go.mod h1:e2qWDig5bLteJ4fwvDAc2NHzqFEthkqn7aOZAOpj+PQ=\ngithub.com/shurcooL/issuesapp v0.0.0-20180602232740-048589ce2241/go.mod h1:NPpHK2TI7iSaM0buivtFUc9offApnI0Alt/K8hcHy0I=\ngithub.com/shurcooL/notifications v0.0.0-20181007000457-627ab5aea122/go.mod h1:b5uSkrEVM1jQUspwbixRBhaIjIzL2xazXp6kntxYle0=\ngithub.com/shurcooL/octicon v0.0.0-20181028054416-fa4f57f9efb2/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ=\ngithub.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1lToEk4d2s07G3XGfz2QrgHXg4RJBvjrOozvoWfk=\ngithub.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=\ngithub.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=\ngithub.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4=\ngithub.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw=\ngithub.com/siebenmann/go-kstat v0.0.0-20160321171754-d34789b79745/go.mod h1:G81aIFAMS9ECrwBYR9YxhlPjWgrItd+Kje78O6+uqm8=\ngithub.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=\ngithub.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=\ngithub.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=\ngithub.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=\ngithub.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=\ngithub.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM=\ngithub.com/smartystreets/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHeiJApdr3r4w=\ngithub.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM=\ngithub.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa/go.mod h1:2RVY1rIf+2J2o/IM9+vPq9RzmHDSseB7FoXiSNIUsoU=\ngithub.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=\ngithub.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=\ngithub.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=\ngithub.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=\ngithub.com/smola/gocompat v0.2.0/go.mod h1:1B0MlxbmoZNo3h8guHp8HztB3BSYR5itql9qtVc0ypY=\ngithub.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4=\ngithub.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=\ngithub.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=\ngithub.com/soundcloud/go-runit v0.0.0-20150630195641-06ad41a06c4a/go.mod h1:LeFCbQYJ3KJlPs/FvPz2dy1tkpxyeNESVyCNNzRXFR0=\ngithub.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE=\ngithub.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA=\ngithub.com/spacemonkeygo/openssl v0.0.0-20181017203307-c2dcc5cca94a/go.mod h1:7AyxJNCJ7SBZ1MfVQCWD6Uqo2oubI2Eq2y2eqf+A5r0=\ngithub.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU=\ngithub.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc=\ngithub.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=\ngithub.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=\ngithub.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=\ngithub.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=\ngithub.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY=\ngithub.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=\ngithub.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=\ngithub.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng=\ngithub.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=\ngithub.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=\ngithub.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=\ngithub.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=\ngithub.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI=\ngithub.com/spf13/cobra v1.1.3 h1:xghbfqPkxzxP3C/f3n5DdpAbdKLj4ZE4BWQI362l53M=\ngithub.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo=\ngithub.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=\ngithub.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=\ngithub.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=\ngithub.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=\ngithub.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=\ngithub.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=\ngithub.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=\ngithub.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=\ngithub.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=\ngithub.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=\ngithub.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=\ngithub.com/spf13/viper v1.8.0 h1:QRwDgoG8xX+kp69di68D+YYTCWfYEckbZRfUlEIAal0=\ngithub.com/spf13/viper v1.8.0/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns=\ngithub.com/src-d/envconfig v1.0.0/go.mod h1:Q9YQZ7BKITldTBnoxsE5gOeB5y66RyPXeue/R4aaNBc=\ngithub.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4 h1:Gb2Tyox57NRNuZ2d3rmvB3pcmbu7O1RS3m8WRx7ilrg=\ngithub.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q=\ngithub.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw=\ngithub.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU=\ngithub.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=\ngithub.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=\ngithub.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI=\ngithub.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=\ngithub.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48=\ngithub.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=\ngithub.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=\ngithub.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=\ngithub.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=\ngithub.com/stretchr/testify v1.3.1-0.20190311161405-34c6fa2dc709/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=\ngithub.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=\ngithub.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=\ngithub.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=\ngithub.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s=\ngithub.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=\ngithub.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=\ngithub.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=\ngithub.com/supranational/blst v0.3.8-0.20220526154634-513d2456b344/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw=\ngithub.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=\ngithub.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA=\ngithub.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM=\ngithub.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY=\ngithub.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc=\ngithub.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA=\ngithub.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok=\ngithub.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8=\ngithub.com/tendermint/btcd v0.1.1 h1:0VcxPfflS2zZ3RiOAHkBiFUcPvbtRj5O7zHmcJWHV7s=\ngithub.com/tendermint/btcd v0.1.1/go.mod h1:DC6/m53jtQzr/NFmMNEu0rxf18/ktVoVtMrnDD5pN+U=\ngithub.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RMWx1aInLzndwxKalgi5rTqgfXxOxbEI=\ngithub.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk=\ngithub.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E=\ngithub.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME=\ngithub.com/tendermint/tendermint v0.34.0-rc4/go.mod h1:yotsojf2C1QBOw4dZrTcxbyxmPUrT4hNuOQWX9XUwB4=\ngithub.com/tendermint/tendermint v0.34.0-rc6/go.mod h1:ugzyZO5foutZImv0Iyx/gOFCX6mjJTgbLHTwi17VDVg=\ngithub.com/tendermint/tendermint v0.34.0/go.mod h1:Aj3PIipBFSNO21r+Lq3TtzQ+uKESxkbA3yo/INM4QwQ=\ngithub.com/tendermint/tendermint v0.34.10/go.mod h1:aeHL7alPh4uTBIJQ8mgFEE8VwJLXI1VD3rVOmH2Mcy0=\ngithub.com/tendermint/tendermint v0.34.12 h1:m+kUYNhONedhJfHmHG8lqsdZvbR5t6vmhaok1yXjpKg=\ngithub.com/tendermint/tendermint v0.34.12/go.mod h1:aeHL7alPh4uTBIJQ8mgFEE8VwJLXI1VD3rVOmH2Mcy0=\ngithub.com/tendermint/tm-db v0.5.1/go.mod h1:g92zWjHpCYlEvQXvy9M168Su8V1IBEeawpXVVBaK4f4=\ngithub.com/tendermint/tm-db v0.6.2/go.mod h1:GYtQ67SUvATOcoY8/+x6ylk8Qo02BQyLrAs+yAcLvGI=\ngithub.com/tendermint/tm-db v0.6.3/go.mod h1:lfA1dL9/Y/Y8wwyPp2NMLyn5P5Ptr/gvDFNWtrCWSf8=\ngithub.com/tendermint/tm-db v0.6.4 h1:3N2jlnYQkXNQclQwd/eKV/NzlqPlfK21cpRRIx80XXQ=\ngithub.com/tendermint/tm-db v0.6.4/go.mod h1:dptYhIpJ2M5kUuenLr+Yyf3zQOv1SgBZcl8/BmWlMBw=\ngithub.com/terra-money/core v0.5.5 h1:wgNUa0yNHkhtECF7w45uOvlzWMeKuefmE/fW0imM4Qc=\ngithub.com/terra-money/core v0.5.5/go.mod h1:hC15x6CgPCbV6b8NQybzaPTq2gy0MYMbcm4oQON1T9w=\ngithub.com/texttheater/golang-levenshtein v0.0.0-20180516184445-d188e65d659e/go.mod h1:XDKHRm5ThF8YJjx001LtgelzsoaEcvnA7lVWz9EeX3g=\ngithub.com/tidwall/gjson v1.6.0/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls=\ngithub.com/tidwall/gjson v1.6.7/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI=\ngithub.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E=\ngithub.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=\ngithub.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=\ngithub.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=\ngithub.com/tidwall/sjson v1.1.4/go.mod h1:wXpKXu8CtDjKAZ+3DrKY5ROCorDFahq8l0tey/Lx1fg=\ngithub.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=\ngithub.com/tj/go-spin v1.1.0 h1:lhdWZsvImxvZ3q1C5OIB7d72DuOwP4O2NdBg9PyzNds=\ngithub.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4=\ngithub.com/tklauser/go-sysconf v0.3.5 h1:uu3Xl4nkLzQfXNsWn15rPc/HQCJKObbt1dKJeWp3vU4=\ngithub.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI=\ngithub.com/tklauser/numcpus v0.2.2 h1:oyhllyrScuYI6g+h/zUvNXNp1wy7x8qQy3t/piefldA=\ngithub.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM=\ngithub.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=\ngithub.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=\ngithub.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=\ngithub.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs=\ngithub.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs=\ngithub.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8=\ngithub.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U=\ngithub.com/uber/jaeger-client-go v2.15.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=\ngithub.com/uber/jaeger-client-go v2.23.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=\ngithub.com/uber/jaeger-lib v1.5.1-0.20181102163054-1fc5c315e03c/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U=\ngithub.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U=\ngithub.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=\ngithub.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=\ngithub.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=\ngithub.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=\ngithub.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=\ngithub.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=\ngithub.com/urfave/cli v1.22.2 h1:gsqYFH8bb9ekPA12kRo0hfjngWQjkJPlN9R0N78BoUo=\ngithub.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=\ngithub.com/urfave/cli/v2 v2.0.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ=\ngithub.com/urfave/cli/v2 v2.2.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ=\ngithub.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=\ngithub.com/urfave/cli/v2 v2.10.2 h1:x3p8awjp/2arX+Nl/G2040AZpOCHS/eMJJ1/a+mye4Y=\ngithub.com/urfave/cli/v2 v2.10.2/go.mod h1:f8iq5LtQ/bLxafbdBSLPPNsgaW0l/2fYYEHhAyPlwvo=\ngithub.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=\ngithub.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=\ngithub.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=\ngithub.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4=\ngithub.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=\ngithub.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU=\ngithub.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM=\ngithub.com/vmihailenco/msgpack/v5 v5.1.4/go.mod h1:C5gboKD0TJPqWDTVTtrQNfRbiBwHZGo8UTqP/9/XvLI=\ngithub.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI=\ngithub.com/warpfork/go-wish v0.0.0-20180510122957-5ad1f5abf436/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw=\ngithub.com/warpfork/go-wish v0.0.0-20190328234359-8b3e70f8e830/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw=\ngithub.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a h1:G++j5e0OC488te356JvdhaM8YS6nMsjLAYF7JxCv07w=\ngithub.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw=\ngithub.com/weaveworks/common v0.0.0-20200512154658-384f10054ec5/go.mod h1:c98fKi5B9u8OsKGiWHLRKus6ToQ1Tubeow44ECO1uxY=\ngithub.com/weaveworks/promrus v1.2.0/go.mod h1:SaE82+OJ91yqjrE1rsvBWVzNZKcHYFtMUyS1+Ogs/KA=\ngithub.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc/go.mod h1:r45hJU7yEoA81k6MWNhpMj/kms0n14dkzkxYHoB96UM=\ngithub.com/whyrusleeping/bencher v0.0.0-20190829221104-bb6607aa8bba h1:X4n8JG2e2biEZZXdBKt9HX7DN3bYGFUqljqqy0DqgnY=\ngithub.com/whyrusleeping/bencher v0.0.0-20190829221104-bb6607aa8bba/go.mod h1:CHQnYnQUEPydYCwuy8lmTHfGmdw9TKrhWV0xLx8l0oM=\ngithub.com/whyrusleeping/cbor-gen v0.0.0-20191216205031-b047b6acb3c0/go.mod h1:xdlJQaiqipF0HW+Mzpg7XRM3fWbGvfgFlcppuvlkIvY=\ngithub.com/whyrusleeping/cbor-gen v0.0.0-20200123233031-1cdf64d27158/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI=\ngithub.com/whyrusleeping/cbor-gen v0.0.0-20200402171437-3d27c146c105/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI=\ngithub.com/whyrusleeping/cbor-gen v0.0.0-20200414195334-429a0b5e922e/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI=\ngithub.com/whyrusleeping/cbor-gen v0.0.0-20200504204219-64967432584d/go.mod h1:W5MvapuoHRP8rz4vxjwCK1pDqF1aQcWsV5PZ+AHbqdg=\ngithub.com/whyrusleeping/cbor-gen v0.0.0-20200710004633-5379fc63235d/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ=\ngithub.com/whyrusleeping/cbor-gen v0.0.0-20200715143311-227fab5a2377/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ=\ngithub.com/whyrusleeping/cbor-gen v0.0.0-20200723185710-6a3894a6352b/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ=\ngithub.com/whyrusleeping/cbor-gen v0.0.0-20200806213330-63aa96ca5488/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ=\ngithub.com/whyrusleeping/cbor-gen v0.0.0-20200810223238-211df3b9e24c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ=\ngithub.com/whyrusleeping/cbor-gen v0.0.0-20200812213548-958ddffe352c/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ=\ngithub.com/whyrusleeping/cbor-gen v0.0.0-20200826160007-0b9f6c5fb163/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ=\ngithub.com/whyrusleeping/cbor-gen v0.0.0-20210118024343-169e9d70c0c2/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ=\ngithub.com/whyrusleeping/cbor-gen v0.0.0-20210219115102-f37d292932f2 h1:bsUlNhdmbtlfdLVXAVfuvKQ01RnWAM09TVrJkI7NZs4=\ngithub.com/whyrusleeping/cbor-gen v0.0.0-20210219115102-f37d292932f2/go.mod h1:fgkXqYy7bV2cFeIEOkVTZS/WjXARfBqSH6Q2qHL33hQ=\ngithub.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f h1:jQa4QT2UP9WYv2nzyawpKMOCl+Z/jW7djv2/J50lj9E=\ngithub.com/whyrusleeping/chunker v0.0.0-20181014151217-fe64bd25879f/go.mod h1:p9UJB6dDgdPgMJZs7UjUOdulKyRr9fqkS+6JKAInPy8=\ngithub.com/whyrusleeping/go-ctrlnet v0.0.0-20180313164037-f564fbbdaa95/go.mod h1:SJqKCCPXRfBFCwXjfNT/skfsceF7+MBFLI2OrvuRA7g=\ngithub.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc=\ngithub.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc/go.mod h1:bopw91TMyo8J3tvftk8xmU2kPmlrt4nScJQZU2hE5EM=\ngithub.com/whyrusleeping/go-logging v0.0.1/go.mod h1:lDPYj54zutzG1XYfHAhcc7oNXEburHQBn+Iqd4yS4vE=\ngithub.com/whyrusleeping/go-notifier v0.0.0-20170827234753-097c5d47330f/go.mod h1:cZNvX9cFybI01GriPRMXDtczuvUhgbcYr9iCGaNlRv8=\ngithub.com/whyrusleeping/go-smux-multiplex v3.0.16+incompatible/go.mod h1:34LEDbeKFZInPUrAG+bjuJmUXONGdEFW7XL0SpTY1y4=\ngithub.com/whyrusleeping/go-smux-multistream v2.0.2+incompatible/go.mod h1:dRWHHvc4HDQSHh9gbKEBbUZ+f2Q8iZTPG3UOGYODxSQ=\ngithub.com/whyrusleeping/go-smux-yamux v2.0.8+incompatible/go.mod h1:6qHUzBXUbB9MXmw3AUdB52L8sEb/hScCqOdW2kj/wuI=\ngithub.com/whyrusleeping/go-smux-yamux v2.0.9+incompatible/go.mod h1:6qHUzBXUbB9MXmw3AUdB52L8sEb/hScCqOdW2kj/wuI=\ngithub.com/whyrusleeping/ledger-filecoin-go v0.9.1-0.20201010031517-c3dcc1bddce4/go.mod h1:K+EVq8d5QcQ2At5VECsA+SNZvWefyBXh8TnIsxo1OvQ=\ngithub.com/whyrusleeping/mafmt v1.2.8/go.mod h1:faQJFPbLSxzD9xpA02ttW/tS9vZykNvXwGvqIpk20FA=\ngithub.com/whyrusleeping/mdns v0.0.0-20180901202407-ef14215e6b30/go.mod h1:j4l84WPFclQPj320J9gp0XwNKBb3U0zt5CBqjPp22G4=\ngithub.com/whyrusleeping/mdns v0.0.0-20190826153040-b9b60ed33aa9/go.mod h1:j4l84WPFclQPj320J9gp0XwNKBb3U0zt5CBqjPp22G4=\ngithub.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7 h1:E9S12nwJwEOXe2d6gT6qxdvqMnNq+VnSsKPgm2ZZNds=\ngithub.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7/go.mod h1:X2c0RVCI1eSUFI8eLcY3c0423ykwiUdxLJtkDvruhjI=\ngithub.com/whyrusleeping/pubsub v0.0.0-20190708150250-92bcb0691325/go.mod h1:g7ckxrjiFh8mi1AY7ox23PZD0g6QU/TxW3U3unX7I3A=\ngithub.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee h1:lYbXeSvJi5zk5GLKVuid9TVjS9a0OmLIDKTfoZBL6Ow=\ngithub.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee/go.mod h1:m2aV4LZI4Aez7dP5PMyVKEHhUyEJ/RjmPEDOpDvudHg=\ngithub.com/whyrusleeping/yamux v1.1.5/go.mod h1:E8LnQQ8HKx5KD29HZFUwM1PxCOdPRzGwur1mcYhXcD8=\ngithub.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=\ngithub.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees=\ngithub.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE=\ngithub.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=\ngithub.com/xlab/c-for-go v0.0.0-20201112171043-ea6dce5809cb h1:/7/dQyiKnxAOj9L69FhST7uMe17U015XPzX7cy+5ykM=\ngithub.com/xlab/c-for-go v0.0.0-20201112171043-ea6dce5809cb/go.mod h1:pbNsDSxn1ICiNn9Ct4ZGNrwzfkkwYbx/lw8VuyutFIg=\ngithub.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245 h1:Sw125DKxZhPUI4JLlWugkzsrlB50jR9v2khiD9FxuSo=\ngithub.com/xlab/pkgconfig v0.0.0-20170226114623-cea12a0fd245/go.mod h1:C+diUUz7pxhNY6KAoLgrTYARGWnt82zWTylZlxT92vk=\ngithub.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg=\ngithub.com/xorcare/golden v0.6.0/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ=\ngithub.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542 h1:oWgZJmC1DorFZDpfMfWg7xk29yEOZiXmo/wZl+utTI8=\ngithub.com/xorcare/golden v0.6.1-0.20191112154924-b87f686d7542/go.mod h1:7T39/ZMvaSEZlBPoYfVFmsBLmUl3uz9IuzWj/U6FtvQ=\ngithub.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=\ngithub.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=\ngithub.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=\ngithub.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE=\ngithub.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=\ngithub.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=\ngithub.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=\ngithub.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8=\ngithub.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM=\ngithub.com/zondax/ledger-go v0.12.1/go.mod h1:KatxXrVDzgWwbssUWsF5+cOJHXPvzQ09YSlzGNuhOEo=\ngo.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw=\ngo.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ=\ngo.dedis.ch/kyber/v3 v3.0.9/go.mod h1:rhNjUUg6ahf8HEg5HUvVBYoWY4boAafX8tYxX+PS+qg=\ngo.dedis.ch/protobuf v1.0.5/go.mod h1:eIV4wicvi6JK0q/QnfIEGeSFNG0ZeB24kzut5+HaRLo=\ngo.dedis.ch/protobuf v1.0.7/go.mod h1:pv5ysfkDX/EawiPqcW3ikOxsL5t+BqnV6xHSmE79KI4=\ngo.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYrJ4=\ngo.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=\ngo.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=\ngo.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=\ngo.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0=\ngo.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=\ngo.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=\ngo.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=\ngo.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=\ngo.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ=\ngo.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA=\ngo.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=\ngo.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=\ngo.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=\ngo.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=\ngo.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA=\ngo.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=\ngo.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=\ngo.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=\ngo.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=\ngo.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=\ngo.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=\ngo.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=\ngo.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=\ngo.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=\ngo.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=\ngo.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=\ngo.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=\ngo.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=\ngo.uber.org/dig v1.10.0/go.mod h1:X34SnWGr8Fyla9zQNO2GSO2D+TIuqB14OS8JhYocIyw=\ngo.uber.org/fx v1.9.0/go.mod h1:mFdUyAUuJ3w4jAckiKSKbldsxy1ojpAMJ+dVZg5Y0Aw=\ngo.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=\ngo.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=\ngo.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=\ngo.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=\ngo.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=\ngo.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=\ngo.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=\ngo.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=\ngo.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=\ngo.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=\ngo.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=\ngo.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc=\ngo.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc=\ngo.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ=\ngo.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=\ngo.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=\ngo4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE=\ngo4.org v0.0.0-20200411211856-f5505b9728dd h1:BNJlw5kRTzdmyfh5U8F93HA2OwkP7ZGwA51eJ/0wKOU=\ngo4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZMZXMSBGhxRdsvzbkg=\ngolang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw=\ngolang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=\ngolang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=\ngolang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=\ngolang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=\ngolang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=\ngolang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=\ngolang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=\ngolang.org/x/crypto v0.0.0-20190225124518-7f87c0fbb88b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=\ngolang.org/x/crypto v0.0.0-20190228161510-8dd112bcdc25/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=\ngolang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=\ngolang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=\ngolang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190618222545-ea8f1a30c443/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=\ngolang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=\ngolang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20200128174031-69ecbb4d6d5d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20200423211502-4bdfaf469ed5/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20200429183012-4b2356b1ed79/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=\ngolang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=\ngolang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=\ngolang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=\ngolang.org/x/crypto v0.0.0-20210921155107-089bfa567519 h1:7I4JAnoQBe7ZtJcBaYHi5UtiO8tQHbUSXxL+pnGRANg=\ngolang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=\ngolang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/exp v0.0.0-20181106170214-d68db9428509/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=\ngolang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=\ngolang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4=\ngolang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=\ngolang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=\ngolang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=\ngolang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=\ngolang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=\ngolang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=\ngolang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=\ngolang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw=\ngolang.org/x/exp v0.0.0-20200513190911-00229845015e/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw=\ngolang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5 h1:rxKZ2gOnYxjfmakvUUqh9Gyb6KXfrj7JWTxORTYqb0E=\ngolang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE=\ngolang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=\ngolang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=\ngolang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=\ngolang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=\ngolang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=\ngolang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=\ngolang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=\ngolang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=\ngolang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=\ngolang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=\ngolang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=\ngolang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=\ngolang.org/x/mobile v0.0.0-20200801112145-973feb4309de/go.mod h1:skQtrUTUwhdJvXM/2KKJzY8pDgNr9I/FOMqDVRPBUS4=\ngolang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=\ngolang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=\ngolang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=\ngolang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=\ngolang.org/x/mod v0.1.1-0.20191209134235-331c550502dd/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=\ngolang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=\ngolang.org/x/mod v0.6.0-dev.0.20211013180041-c96bc1413d57 h1:LQmS1nU0twXLA96Kt7U9qtHJEbBk3z6Q0V4UXjZkpr4=\ngolang.org/x/mod v0.6.0-dev.0.20211013180041-c96bc1413d57/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=\ngolang.org/x/net v0.0.0-20180524181706-dfa909b99c79/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190227160552-c95aed5357e7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190228165749-92fc7df08ae7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=\ngolang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=\ngolang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=\ngolang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=\ngolang.org/x/net v0.0.0-20190611141213-3f473d35a33a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190921015927-1a5e07d1ff72/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20191007182048-72f939374954/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=\ngolang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200519113804-d87ec0cfa476/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=\ngolang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=\ngolang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20201022231255-08b38378de70/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=\ngolang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=\ngolang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=\ngolang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=\ngolang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=\ngolang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=\ngolang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=\ngolang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=\ngolang.org/x/net v0.0.0-20220607020251-c690dde0001d h1:4SFsTMi4UahlKoloni7L4eYzhFRifURQLw+yv0QDCx8=\ngolang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=\ngolang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=\ngolang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=\ngolang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=\ngolang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=\ngolang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=\ngolang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw=\ngolang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=\ngolang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=\ngolang.org/x/sys v0.0.0-20180202135801-37707fdb30a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190124100055-b90733256f2e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190228124157-a34e9553db1e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190302025703-b6889370fb10/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=\ngolang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190411185658-b44545bcd369/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190524122548-abf6ff778158/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190524152521-dbbf3f1254d4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190526052359-791d8a0f4d09/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190610200419-93c9922d18ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190902133755-9109b7679e13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191025021431-6c3a3bfe00ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191025090151-53bf42e6b339/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200509044756-6aff5f38e54f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200812155832-6a926be9bd1d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200824131525-c12d262b63d8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200926100807-9d91bd62050c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k=\ngolang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=\ngolang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=\ngolang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=\ngolang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=\ngolang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=\ngolang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=\ngolang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=\ngolang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=\ngolang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=\ngolang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE=\ngolang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=\ngolang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20181130052023-1c3d964395ce/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=\ngolang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=\ngolang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=\ngolang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=\ngolang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=\ngolang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=\ngolang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=\ngolang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191030062658-86caa796c7ab/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191126055441-b0650ceb63d9/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=\ngolang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=\ngolang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=\ngolang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=\ngolang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=\ngolang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=\ngolang.org/x/tools v0.0.0-20200711155855-7342f9734a7d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20200827010519-17fd2f27a9e3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=\ngolang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE=\ngolang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20201112185108-eeaa07dd7696/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=\ngolang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=\ngolang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=\ngolang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=\ngolang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023 h1:0c3L82FDQ5rt1bjTBlchS8t6RQ6299/+5bWMnRLh+uI=\ngolang.org/x/tools v0.1.8-0.20211029000441-d6a9af8af023/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=\ngolang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=\ngolang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df h1:5Pf6pFKu98ODmgnpvkJ3kFUOQGGLIzLIkbzUHp47618=\ngolang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=\ngonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=\ngonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=\ngonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU=\ngonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=\ngonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=\ngonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc=\ngoogle.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=\ngoogle.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=\ngoogle.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y=\ngoogle.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=\ngoogle.golang.org/api v0.3.2/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=\ngoogle.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=\ngoogle.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=\ngoogle.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=\ngoogle.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=\ngoogle.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=\ngoogle.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=\ngoogle.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=\ngoogle.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=\ngoogle.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=\ngoogle.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=\ngoogle.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=\ngoogle.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=\ngoogle.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=\ngoogle.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=\ngoogle.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=\ngoogle.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=\ngoogle.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=\ngoogle.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8=\ngoogle.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=\ngoogle.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=\ngoogle.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=\ngoogle.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=\ngoogle.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=\ngoogle.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=\ngoogle.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=\ngoogle.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=\ngoogle.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=\ngoogle.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=\ngoogle.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=\ngoogle.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=\ngoogle.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=\ngoogle.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg=\ngoogle.golang.org/genproto v0.0.0-20190306203927-b5d61aea6440/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=\ngoogle.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s=\ngoogle.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=\ngoogle.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=\ngoogle.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=\ngoogle.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=\ngoogle.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=\ngoogle.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=\ngoogle.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=\ngoogle.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=\ngoogle.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=\ngoogle.golang.org/genproto v0.0.0-20200608115520-7c474a2e3482/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=\ngoogle.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=\ngoogle.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201111145450-ac7456db90a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201119123407-9b1e624d6bc4/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=\ngoogle.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=\ngoogle.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c h1:wtujag7C+4D6KMoulW9YauvK2lgdvCMS260jsqqBXr0=\ngoogle.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=\ngoogle.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=\ngoogle.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=\ngoogle.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio=\ngoogle.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=\ngoogle.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=\ngoogle.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=\ngoogle.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM=\ngoogle.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=\ngoogle.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=\ngoogle.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=\ngoogle.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=\ngoogle.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=\ngoogle.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=\ngoogle.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=\ngoogle.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=\ngoogle.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=\ngoogle.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=\ngoogle.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=\ngoogle.golang.org/grpc v1.28.1/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=\ngoogle.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=\ngoogle.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=\ngoogle.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=\ngoogle.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=\ngoogle.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=\ngoogle.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=\ngoogle.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=\ngoogle.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=\ngoogle.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=\ngoogle.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=\ngoogle.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=\ngoogle.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=\ngoogle.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0=\ngoogle.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=\ngoogle.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=\ngoogle.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=\ngoogle.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=\ngoogle.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=\ngoogle.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=\ngoogle.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=\ngoogle.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=\ngoogle.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=\ngoogle.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=\ngoogle.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=\ngoogle.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=\ngoogle.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=\ngopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=\ngopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=\ngopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=\ngopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=\ngopkg.in/cheggaaa/pb.v1 v1.0.28 h1:n1tBJnnK2r7g9OW2btFH91V92STTUevLXYFb8gy9EMk=\ngopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=\ngopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=\ngopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=\ngopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=\ngopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=\ngopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=\ngopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU=\ngopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=\ngopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU=\ngopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c=\ngopkg.in/olebedev/go-duktape.v3 v3.0.0-20200619000410-60c24ae608a6/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns=\ngopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=\ngopkg.in/src-d/go-cli.v0 v0.0.0-20181105080154-d492247bbc0d/go.mod h1:z+K8VcOYVYcSwSjGebuDL6176A1XskgbtNl64NSg+n8=\ngopkg.in/src-d/go-log.v1 v1.0.1/go.mod h1:GN34hKP0g305ysm2/hctJ0Y8nWP3zxXXJ8GFabTyABE=\ngopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=\ngopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=\ngopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0=\ngopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=\ngopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=\ngopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=\ngopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=\ngopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=\ngopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=\ngopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=\ngotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=\ngotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=\ngrpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o=\nhonnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=\nhonnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=\nhonnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=\nhonnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=\nhonnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las=\nhowett.net/plist v0.0.0-20181124034731-591f970eefbb h1:jhnBjNi9UFpfpl8YZhA9CrOqpnJdvzuiHsl/dnxl11M=\nhowett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0=\nmodernc.org/cc v1.0.0 h1:nPibNuDEx6tvYrUAtvDTTw98rx5juGsa5zuDnKwEEQQ=\nmodernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=\nmodernc.org/fileutil v1.0.0/go.mod h1:JHsWpkrk/CnVV1H/eGlFf85BEpfkrp56ro8nojIq9Q8=\nmodernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=\nmodernc.org/golex v1.0.1 h1:EYKY1a3wStt0RzHaH8mdSRNg78Ub0OHxYfCRWw35YtM=\nmodernc.org/golex v1.0.1/go.mod h1:QCA53QtsT1NdGkaZZkF5ezFwk4IXh4BGNafAARTC254=\nmodernc.org/lex v1.0.0/go.mod h1:G6rxMTy3cH2iA0iXL/HRRv4Znu8MK4higxph/lE7ypk=\nmodernc.org/lexer v1.0.0/go.mod h1:F/Dld0YKYdZCLQ7bD0USbWL4YKCyTDRDHiDTOs0q0vk=\nmodernc.org/mathutil v1.1.1 h1:FeylZSVX8S+58VsyJlkEj2bcpdytmp9MmDKZkKx8OIE=\nmodernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E=\nmodernc.org/strutil v1.1.0 h1:+1/yCzZxY2pZwwrsbH+4T7BQMoLQ9QiBshRC9eicYsc=\nmodernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs=\nmodernc.org/xc v1.0.0 h1:7ccXrupWZIS3twbUGrtKmHS2DXY6xegFua+6O3xgAFU=\nmodernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I=\nnhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k=\nnhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=\nrsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=\nrsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=\nrsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=\nrsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=\nsigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=\nsourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=\nsourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck=\nsourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0=\n"
  },
  {
    "path": "infra/acala/Dockerfile",
    "content": "FROM ubuntu:xenial\n\nRUN apt-get update && apt-get install --yes --fix-missing software-properties-common curl git clang\nRUN apt-get install --yes --fix-missing --no-install-recommends build-essential\n\n# Install Rust\nRUN curl https://sh.rustup.rs -sSf | sh -s -- -y\nENV PATH=\"/root/.cargo/bin:${PATH}\"\n\n# Clone repository\nRUN git clone https://github.com/AcalaNetwork/Acala.git\n\nRUN mv Acala /app\nWORKDIR /app\n\n# TEMPORARY: use the branch that has a good reference to the submodules\n# TODO: remove when the `master` branch of Acala is updated\nRUN git fetch\nRUN git checkout update-orml\nRUN git pull\n\n# Make sure submodule.recurse is set to true to make life with submodule easier.\nRUN git config --global submodule.recurse true\n\n# Build\nRUN make init\nRUN make build\n\nWORKDIR /\nCOPY run.sh /root/\nRUN chmod +x /root/run.sh\n\n# rpc port\nEXPOSE 9933\n# ws port\nEXPOSE 9944\n\nENTRYPOINT [\"./root/run.sh\"]\n"
  },
  {
    "path": "infra/acala/run.sh",
    "content": "#!/bin/bash\nADDRESS=$1\n\n# Start\ncd /app\nmake run\nsleep 10\n\n# Print setup\necho \"ACALA_ADDRESS=$ADDRESS\"\n"
  },
  {
    "path": "infra/avalanche/Dockerfile",
    "content": "FROM ubuntu:bionic\n\nRUN apt update -y\nRUN apt-get install -y wget curl build-essential\n\n# INSTALL GO AND RUST\nRUN wget -c https://golang.org/dl/go1.15.5.linux-amd64.tar.gz\nRUN tar -C /usr/local -xzf go1.15.5.linux-amd64.tar.gz\nENV PATH=$PATH:/usr/local/go/bin\n\n# Fetch avalanchego\nWORKDIR /app\nRUN wget https://github.com/ava-labs/avalanchego/releases/download/v1.4.5/avalanchego-linux-amd64-v1.4.5.tar.gz\nRUN tar -xzf avalanchego-linux-amd64-v1.4.5.tar.gz\nRUN rm avalanchego-linux-amd64-v1.4.5.tar.gz\nENV PATH=$PATH:/app/avalanchego-v1.4.5\n\n# COPY run script\nCOPY run.sh run.sh\nRUN chmod +x run.sh\n\n# RPC SERVER PORT\nEXPOSE 9650\n\n# RUN\nENTRYPOINT [ \"./run.sh\" ]\n"
  },
  {
    "path": "infra/avalanche/run.sh",
    "content": "#!/bin/bash\n\nAVAX_USERNAME=$1\nAVAX_PASSWORD=$2\nAVAX_PK=$3\nAVAX_ADDRESS=$4\nC_AVAX_PK=$5\nC_AVAX_HEX_ADDRESS=$6\nC_AVAX_BECH32_ADDRESS=$7\n\navalanchego \\\n\t--assertions-enabled=true \\\n\t--tx-fee=1000000 \\\n\t--public-ip=0.0.0.0 \\\n\t--network-id=local \\\n\t--signature-verification-enabled=true \\\n\t--api-admin-enabled=true \\\n\t--api-ipcs-enabled=true \\\n\t--api-keystore-enabled=true \\\n\t--api-metrics-enabled=true \\\n\t--http-host=0.0.0.0 \\\n\t--http-port=9650 \\\n\t--http-tls-enabled=false \\\n\t--plugin-dir=/app/avalanchego-v1.4.5/avalanchego-latest/plugins \\\n\t--log-level=info \\\n\t--snow-avalanche-batch-size=30 \\\n\t--snow-avalanche-num-parents=5 \\\n\t--snow-sample-size=1 \\\n\t--snow-quorum-size=1 \\\n\t--snow-virtuous-commit-threshold=1 \\\n\t--snow-rogue-commit-threshold=4 \\\n\t--staking-enabled=false \\\n\t--staking-port=9651 \\\n\t--api-auth-required=false &\n\n# create a new user\nsleep 10\necho \"\"\necho \"---create new user---\"\necho \"\"\ncurl -X POST --data '{\n    \"jsonrpc\":\"2.0\",\n    \"id\"     :1,\n    \"method\" :\"keystore.createUser\",\n    \"params\" :{\n        \"username\":\"'\"$AVAX_USERNAME\"'\",\n\t      \"password\":\"'\"$AVAX_PASSWORD\"'\"\n    }\n}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/keystore\n\n# import private key that contains AVAX into X-chain\nsleep 1\necho \"\"\necho \"---import private key that contains AVAX into X-chain---\"\necho \"\"\ncurl -X POST --data '{\n    \"jsonrpc\":\"2.0\",\n    \"id\"     :1,\n    \"method\" :\"avm.importKey\",\n    \"params\" :{\n        \"username\":\"'\"$AVAX_USERNAME\"'\",\n\t      \"password\":\"'\"$AVAX_PASSWORD\"'\",\n\t      \"privateKey\":\"'\"$AVAX_PK\"'\"\n    }\n}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/X\n\n# import private key into C-chain\nsleep 1\necho \"\"\necho \"---import private key into C-chain---\"\necho \"\"\ncurl -X POST --data '{\n    \"jsonrpc\":\"2.0\",\n    \"id\"     :1,\n    \"method\" :\"avax.importKey\",\n    \"params\" :{\n        \"username\" :\"'\"$AVAX_USERNAME\"'\",\n        \"password\":\"'\"$AVAX_PASSWORD\"'\",\n        \"privateKey\":\"'\"$AVAX_PK\"'\"\n    }\n}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/avax\n\n# export the AVAX to C-chain\nsleep 1\necho \"\"\necho \"---export the AVAX to C-chain---\"\necho \"\"\ncurl -X POST --data '{\n    \"jsonrpc\":\"2.0\",\n    \"id\"     :1,\n    \"method\" :\"avm.exportAVAX\",\n    \"params\" :{\n        \"to\":\"'\"$C_AVAX_BECH32_ADDRESS\"'\",\n        \"destinationChain\": \"C\",\n        \"amount\": 5000000000000,\n        \"username\":\"'\"$AVAX_USERNAME\"'\",\n        \"password\":\"'\"$AVAX_PASSWORD\"'\"\n    }\n}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/X\n\n# import AVAX to the hex address\nsleep 1\necho \"\"\necho \"---import AVAX to the hex address---\"\necho \"\"\ncurl -X POST --data '{\n    \"jsonrpc\":\"2.0\",\n    \"id\"     :1,\n    \"method\" :\"avax.importAVAX\",\n    \"params\" :{\n        \"to\":\"'\"$C_AVAX_HEX_ADDRESS\"'\",\n        \"sourceChain\":\"X\",\n        \"username\":\"'\"$AVAX_USERNAME\"'\",\n        \"password\":\"'\"$AVAX_PASSWORD\"'\"\n    }\n}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/avax\n\nwait %1\n"
  },
  {
    "path": "infra/binance/Dockerfile",
    "content": "FROM ubuntu:xenial\n\nRUN apt-get update --fix-missing\nRUN apt-get install --yes curl\n\nRUN curl -sL https://deb.nodesource.com/setup_12.x | bash -\nRUN apt-get install --yes nodejs\nRUN npm install -g ganache-cli\n\nCOPY run.sh /root/run.sh\nRUN chmod +x /root/run.sh\n\nEXPOSE 8575\n\nENTRYPOINT [\"./root/run.sh\"]\n"
  },
  {
    "path": "infra/binance/Dockerfile-riolta",
    "content": "# Build Geth in a stock Go builder container\nFROM golang:1.14-alpine as builder\n\nRUN apk add --no-cache make gcc musl-dev linux-headers git\n\nWORKDIR /app\nRUN git clone -b 1.0.1.beta.2 https://github.com/binance-chain/bsc\nWORKDIR /app/bsc\n\nRUN make geth\n\nRUN touch genesis.json\nRUN touch config.yaml\nRUN wget -q -O genesis.json https://github.com/binance-chain/bsc/releases/download/v1.0.0-beta.1/genesis.json\nRUN wget -q -O config.yaml https://github.com/binance-chain/bsc/releases/download/v1.0.0-beta.1/config.toml\n\n# RPC port\nEXPOSE 8575\n\n# init the node with genesis file\nRUN ./build/bin/geth --datadir node init genesis.json\n\nENTRYPOINT [\"./build/bin/geth\", \"--config\", \"./config.yaml\", \"--datadir\", \"./node\", \"--rpc\", \"--rpcport\", \"8575\"]\n"
  },
  {
    "path": "infra/binance/run.sh",
    "content": "#!/bin/bash\nMNEMONIC=$1\nADDRESS=$2\n\nganache-cli      \\\n  -h 0.0.0.0     \\\n  -a 105         \\\n  -k muirGlacier \\\n  -i 420         \\\n  -m \"$MNEMONIC\" \\\n  -p 8575        \\\n  -u $ADDRESS    \\\n  -b 1           \\\n  -l 60000000    \\\n  --chainId 420\n"
  },
  {
    "path": "infra/bitcoin/Dockerfile",
    "content": "FROM ubuntu:bionic\n\nRUN apt-get update && apt-get install --yes software-properties-common\nRUN apt-get install --yes curl\n\n# bitcoind PPA is unmaintained, so we download it from the bitcoincore website.\n# This can sometimes stall, which can be fixed by killing and restarting the\n# build.\nRUN curl https://bitcoincore.org/bin/bitcoin-core-0.21.0/bitcoin-0.21.0-x86_64-linux-gnu.tar.gz | tar -xz\nRUN mv ./bitcoin-0.21.0 /app\nRUN chmod +x /app/bin/bitcoind\nRUN chmod +x /app/bin/bitcoin-cli\n\nCOPY bitcoin.conf /root/.bitcoin/\nCOPY run.sh /root/\nRUN chmod +x /root/run.sh\n\nEXPOSE 18443\n\nENTRYPOINT [\"./root/run.sh\"]"
  },
  {
    "path": "infra/bitcoin/bitcoin.conf",
    "content": "daemon=1\nregtest=1\nrpcuser=user\nrpcpassword=password\nrpcallowip=0.0.0.0/0\nserver=1\ntxindex=1\n\n[regtest]\nrpcbind=0.0.0.0"
  },
  {
    "path": "infra/bitcoin/keygen.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/btcsuite/btcd/btcec\"\n\t\"github.com/btcsuite/btcd/chaincfg\"\n\t\"github.com/btcsuite/btcutil\"\n\t\"github.com/renproject/id\"\n)\n\nfunc main() {\n\tprivKey := id.NewPrivKey()\n\twif, err := btcutil.NewWIF((*btcec.PrivateKey)(privKey), &chaincfg.RegressionNetParams, true)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\taddrPubKeyHash, err := btcutil.NewAddressPubKeyHash(btcutil.Hash160(wif.SerializePubKey()), &chaincfg.RegressionNetParams)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Printf(\"BITCOIN_PK=%v\\n\", wif)\n\tfmt.Printf(\"BITCOIN_ADDRESS=%v\\n\", addrPubKeyHash)\n}\n"
  },
  {
    "path": "infra/bitcoin/run.sh",
    "content": "#!/bin/bash\nADDRESS=$1\nPRIV_KEY=$2\n\n# Start\n/app/bin/bitcoind -regtest -daemon\nsleep 20\n\n# Print setup\necho \"BITCOIN_ADDRESS=$ADDRESS\"\n\n/app/bin/bitcoin-cli createwallet \"testwallet\"\n\n\n# Import the address\n/app/bin/bitcoin-cli -regtest importaddress $ADDRESS\n\n# Import the private key to spend UTXOs\n/app/bin/bitcoin-cli -regtest importprivkey $PRIV_KEY\n\n# Generate enough block to pass the maturation time\n/app/bin/bitcoin-cli -regtest generatetoaddress 101 $ADDRESS\n\n# Simulate mining\nwhile :\ndo\n    # generate new btc to the address\n    /app/bin/bitcoin-cli -regtest generatetoaddress 1 $ADDRESS\n    sleep 5\n    # send tx to own address while paying fee to the miner\n    /app/bin/bitcoin-cli -regtest -named sendtoaddress address=$ADDRESS amount=0.1 subtractfeefromamount=true fee_rate=1\n    sleep 5\ndone\n"
  },
  {
    "path": "infra/bitcoincash/Dockerfile",
    "content": "FROM ubuntu:bionic\n\n# Install bitcoind-abc.\nRUN apt-get update && apt-get install --yes software-properties-common && \\\nadd-apt-repository ppa:ubuntu-toolchain-r/test && apt-get update && \\\napt-get install --yes g++-7 && \\\nadd-apt-repository ppa:bitcoin-cash-node/ppa && apt-get update && \\\napt-get install --yes bitcoind\n\nCOPY bitcoin.conf /root/.bitcoin/\nCOPY run.sh /root/\nRUN chmod +x /root/run.sh\n\nEXPOSE 19443\n\nENTRYPOINT [\"./root/run.sh\"]\n"
  },
  {
    "path": "infra/bitcoincash/bitcoin.conf",
    "content": "daemon=1\nregtest=1\nrpcuser=user\nrpcpassword=password\nrpcallowip=0.0.0.0/0\nserver=1\ntxindex=1\n\n[regtest]\nrpcport=19443"
  },
  {
    "path": "infra/bitcoincash/run.sh",
    "content": "#!/bin/bash\nADDRESS=$1\n\n# Start\nbitcoind\nsleep 10\n\n# Print setup\necho \"BITCOINCASH_ADDRESS=$ADDRESS\"\n\n# Import the address\nbitcoin-cli importaddress $ADDRESS\n\n# Generate enough block to pass the maturation time\nbitcoin-cli generatetoaddress 101 $ADDRESS\n\n# Simulate mining\nwhile :\ndo\n    bitcoin-cli generatetoaddress 1 $ADDRESS\n    sleep 10\ndone"
  },
  {
    "path": "infra/digibyte/Dockerfile",
    "content": "FROM ubuntu:xenial\n\nARG VERSION=7.17.2\nARG ARCH=x86_64\nARG RPCUSERNAME=user\nARG RPCPASSWORD=password\nARG ROOTDATADIR=/app\nARG RUN_AS_DAEMON=1\n\n# Set to 1 for running it in testnet mode\nARG TESTNET=0\n\n# Do we want any blockchain pruning to take place? Set to 4096 for a 4GB blockchain prune.\n# Alternatively set size=1 to prune with RPC call 'pruneblockchainheight <height>'\n# Must have txindex=0 if set\nARG PRUNESIZE=0\n\n# Install and clean again\nRUN apt-get update && \\\n    apt-get install --yes software-properties-common wget && \\\n    rm -rf /var/lib/apt/lists\n\n# Download DigiByte Binary\nRUN wget -c https://github.com/DigiByte-Core/DigiByte/releases/download/v${VERSION}/digibyte-${VERSION}-${ARCH}-linux-gnu.tar.gz -O - | tar xz\n\nRUN mv ./digibyte-${VERSION} \"${ROOTDATADIR}\"\nRUN chmod +x \"${ROOTDATADIR}/bin/digibyted\"\nRUN chmod +x \"${ROOTDATADIR}/bin/digibyte-cli\"\nRUN ln -s \"${ROOTDATADIR}/bin/digibyte-cli\" \"/usr/bin/digibyte-cli\"\nRUN ln -s \"${ROOTDATADIR}/bin/digibyted\" \"/usr/bin/digibyted\"\nRUN export ROOTDATADIR=\"${ROOTDATADIR}\"\n\n# Generate config\nRUN mkdir -p \"/root/.digibyte\"\nRUN bash -c 'echo -e \"server=1\\n\\\nprune=${PRUNESIZE}\\n\\\nmaxconnections=300\\n\\\nrpcallowip=127.0.0.1\\n\\\ndaemon=${RUN_AS_DAEMON}\\n\\\nrpcuser=${RPCUSERNAME}\\n\\\nrpcpassword=${RPCPASSWORD}\\n\\\ntxindex=1\\n\\\naddresstype=bech32\\n\\\n# Uncomment below if you need Dandelion disabled for any reason but it is left on by default intentionally\\n\\\n#disabledandelion=1\\n\\\ntestnet=${TESTNET}\\n\\\nregtest=1\\n\\\n\\n\\\n[regtest]\\n\\\nrpcallowip=0.0.0.0/0\\n\\\nrpcbind=0.0.0.0\\n\\\ndaemon=${RUN_AS_DAEMON}\\n\"' > \"/root/.digibyte/digibyte.conf\"\n\n# Allow Mainnet RPC\nEXPOSE 14022\n\n# Allow Testnet RPC\nEXPOSE 14023\n\n# Allow Regtest RPC\nEXPOSE 18443\n\nCOPY run.sh \"/root\"\nRUN chmod +x \"/root/run.sh\"\n\nENTRYPOINT [\"/root/run.sh\"]\n"
  },
  {
    "path": "infra/digibyte/README.md",
    "content": "# README\n\n## Generate a keypair (privatekey + address)\n```bash\n$ go run keygen.go\nDIGIBYTE_PK=eagPs6RBxmTQyjni3K7vqPNBwjN4o5R8CEwP4eyHavMJMz29MCen\nDIGIBYTE_ADDRESS=smtdQvMJRLaWwNaFUjdBtFzUR4evxQJcB9\n```\n\n## Build your docker container\n```bash\ndocker build .\n```\n\n## Run the container\n```bash\n# Regtest\ndocker run -p 18443:18443 digibyte:latest \"smtdQvMJRLaWwNaFUjdBtFzUR4evxQJcB9\"\n```"
  },
  {
    "path": "infra/digibyte/keygen.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/btcsuite/btcd/btcec\"\n\t\"github.com/btcsuite/btcutil\"\n\t\"github.com/renproject/id\"\n\t\"github.com/renproject/multichain/chain/digibyte\"\n)\n\nfunc main() {\n\tprivKey := id.NewPrivKey()\n\twif, err := btcutil.NewWIF((*btcec.PrivateKey)(privKey), &digibyte.RegressionNetParams, true)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\taddrPubKeyHash, err := btcutil.NewAddressPubKeyHash(btcutil.Hash160(wif.SerializePubKey()), &digibyte.RegressionNetParams)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Printf(\"DIGIBYTE_PK=%v\\n\", wif)\n\tfmt.Printf(\"DIGIBYTE_ADDRESS=%v\\n\", addrPubKeyHash)\n}\n"
  },
  {
    "path": "infra/digibyte/run.sh",
    "content": "#!/bin/bash\nADDRESS=$1\n\n# Start\ndigibyted\nsleep 10\n\n# Print setup\necho \"DIGIBYTE_ADDRESS=$ADDRESS\"\n\n# Import the address\ndigibyte-cli importaddress $ADDRESS\n\n# Generate enough block to pass the maturation time\ndigibyte-cli generatetoaddress 101 $ADDRESS\n\n# Simulate mining\nwhile :\ndo\n digibyte-cli generatetoaddress 1 $ADDRESS\n sleep 10\ndone"
  },
  {
    "path": "infra/docker-compose.yaml",
    "content": "version: \"2\"\nservices:\n  #\n  # Acala\n  #\n  acala:\n    build:\n      context: ./acala\n    ports:\n      - \"0.0.0.0:9933:9933\"\n      - \"0.0.0.0:9944:9944\"\n    entrypoint:\n      - \"./root/run.sh\"\n      - \"${ACALA_ADDRESS}\"\n\n  #\n  # Binance Smart Chain\n  #\n  binance:\n    build:\n      context: ./binance\n    ports:\n      - \"0.0.0.0:8575:8575\"\n    entrypoint:\n      - \"./root/run.sh\"\n      - \"${BINANCE_MNEMONIC}\"\n      - \"${BINANCE_ADDRESS}\"\n\n  #\n  # Bitcoin\n  #\n  bitcoin:\n    build:\n      context: ./bitcoin\n    ports:\n      - \"0.0.0.0:18443:18443\"\n    entrypoint:\n      - \"./root/run.sh\"\n      - \"${BITCOIN_ADDRESS}\"\n      - \"${BITCOIN_PK}\"\n\n  #\n  # Bitcoin Cash\n  #\n  bitcoincash:\n    build:\n      context: ./bitcoincash\n    ports:\n      - \"0.0.0.0:19443:19443\"\n    entrypoint:\n      - \"./root/run.sh\"\n      - \"${BITCOINCASH_ADDRESS}\"\n\n  #\n  # DigiByte\n  #\n  digibyte:\n    build:\n      context: ./digibyte\n    ports:\n      - \"0.0.0.0:20443:18443\"\n    entrypoint:\n      - \"/root/run.sh\"\n      - \"${DIGIBYTE_ADDRESS}\"\n\n  #\n  # Dogecoin\n  #\n  dogecoin:\n    build:\n      context: ./dogecoin\n    ports:\n      - \"0.0.0.0:18332:18332\"\n    entrypoint:\n      - \"./root/run.sh\"\n      - \"${DOGECOIN_ADDRESS}\"\n\n  #\n  # Ethereum (EIP-1559 compatible)\n  #\n  ethereum:\n    build:\n      context: ./ethereum\n    ports:\n      - \"0.0.0.0:8545:8545\"\n\n  #\n  # Fantom\n  #\n  fantom:\n    build:\n      context: ./fantom\n    ports:\n      - \"0.0.0.0:18545:18545\"\n\n  #\n  # Filecoin\n  #\n  filecoin:\n    build:\n      context: ./filecoin\n    ports:\n      - \"0.0.0.0:1234:1234\"\n    entrypoint:\n      - \"/root/run.sh\"\n\n  #\n  # Zcash\n  #\n  zcash:\n    build:\n      context: ./zcash\n    ports:\n      - \"0.0.0.0:18232:18232\"\n    entrypoint:\n      - \"./root/run.sh\"\n      - \"${ZCASH_ADDRESS}\"\n\n  ##\n  ## Terra\n  ##\n  terra:\n    build:\n      context: ./terra\n    ports:\n      - \"0.0.0.0:26657:26657\"\n    entrypoint:\n      - \"./root/run.sh\"\n      - \"${TERRA_ADDRESS}\"\n\n  ##\n  ## Polygon\n  ##\n  polygon:\n    build:\n      context: ./polygon\n    ports:\n      - \"0.0.0.0:28545:8545\"\n    entrypoint:\n      - \"./root/run.sh\"\n\n  ##\n  ## Solana\n  ##\n  solana:\n    image: renbot/ren-solana:latest\n    ports:\n      - \"0.0.0.0:8899-8900:8899-8900\"\n\n  ##\n  ## Moonbeam\n  ##\n  moonbeam:\n    image: purestake/moonbeam:tutorial-v7\n    ports:\n      - \"0.0.0.0:9944:9944\"\n      - \"0.0.0.0:9933:9933\"\n    command: --dev --ws-external --rpc-external\n\n  #\n  # Avalanche\n  #\n  avalanche:\n    build:\n      context: ./avalanche\n    ports:\n      - \"0.0.0.0:9650:9650\"\n    entrypoint:\n      - \"./run.sh\"\n      - \"${AVAX_USERNAME}\"\n      - \"${AVAX_PASSWORD}\"\n      - \"${AVAX_PK}\"\n      - \"${AVAX_ADDRESS}\"\n      - \"${C_AVAX_PK}\"\n      - \"${C_AVAX_HEX_ADDRESS}\"\n      - \"${C_AVAX_BECH32_ADDRESS}\"\n\n  #\n  # Goerli (EIP-1559 compatible)\n  #\n  goerli:\n    build:\n      context: ./goerli\n    ports:\n      - \"0.0.0.0:1545:8545\"\n"
  },
  {
    "path": "infra/dogecoin/Dockerfile",
    "content": "FROM ubuntu:xenial\n\nRUN apt-get update --fix-missing && apt-get install --yes software-properties-common wget\n\nRUN wget -c https://github.com/dogecoin/dogecoin/releases/download/v1.14.2/dogecoin-1.14.2-x86_64-linux-gnu.tar.gz -O - | tar xz\nRUN mv ./dogecoin-1.14.2 /app\nRUN chmod +x /app/bin/dogecoind\nRUN chmod +x /app/bin/dogecoin-cli\n\nCOPY dogecoin.conf /root/.dogecoin/dogecoin.conf\nCOPY run.sh /root/run.sh\nRUN chmod +x /root/run.sh\n\nEXPOSE 18332\n\nENTRYPOINT [\"./root/run.sh\"]\n"
  },
  {
    "path": "infra/dogecoin/dogecoin.conf",
    "content": "daemon=1\nregtest=1\nrpcuser=user\nrpcpassword=password\nrpcallowip=0.0.0.0/0\nserver=1\ntxindex=1\n\n[regtest]\nrpcbind=0.0.0.0"
  },
  {
    "path": "infra/dogecoin/keygen.go",
    "content": "package main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/btcsuite/btcd/btcec\"\n\t\"github.com/btcsuite/btcutil\"\n\n\t\"github.com/renproject/id\"\n\t\"github.com/renproject/multichain/chain/dogecoin\"\n)\n\nfunc main() {\n\tprivKey := id.NewPrivKey()\n\twif, err := btcutil.NewWIF((*btcec.PrivateKey)(privKey), &dogecoin.RegressionNetParams, true)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\taddrPubKeyHash, err := btcutil.NewAddressPubKeyHash(btcutil.Hash160(wif.SerializePubKey()), &dogecoin.RegressionNetParams)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tfmt.Printf(\"DOGECOIN_PK=%v\\n\", wif)\n\tfmt.Printf(\"DOGECOIN_ADDRESS=%v\\n\", addrPubKeyHash)\n}\n"
  },
  {
    "path": "infra/dogecoin/run.sh",
    "content": "#!/bin/bash\nADDRESS=$1\n\n# Start\n/app/bin/dogecoind -conf=/root/.dogecoin/dogecoin.conf # -server -rpcbind=0.0.0.0 -rpcallowip=0.0.0.0/0 -rpcuser=user -rpcpassword=password\nsleep 10\n\n# Print setup\necho \"DOGECOIN_ADDRESS=$ADDRESS\"\n\n# Import the address\n/app/bin/dogecoin-cli importaddress $ADDRESS\n\n# Generate enough block to pass the maturation time\n/app/bin/dogecoin-cli generatetoaddress 101 $ADDRESS\n\n# Simulate mining\nwhile :\ndo\n    /app/bin/dogecoin-cli generatetoaddress 1 $ADDRESS\n    sleep 10\ndone"
  },
  {
    "path": "infra/ethereum/Dockerfile",
    "content": "FROM node:16-alpine\n\nWORKDIR /root/app\n\nCOPY package.json .\nRUN npm install\n\nCOPY hardhat.config.js .\nCOPY run.sh .\nRUN chmod +x run.sh\n\nEXPOSE 8545\n\nENTRYPOINT [\"./run.sh\"]\n"
  },
  {
    "path": "infra/ethereum/hardhat.config.js",
    "content": "/**\n * @type import('hardhat/config').HardhatUserConfig\n */\nmodule.exports = {\n  solidity: \"0.7.3\",\n  defaultNetwork: \"hardhat\",\n  networks: {\n    hardhat: {\n      chainId: 1337,\n      initialBaseFeePerGas: 30000000,\n      blockGasLimit: 15000000,\n      hardfork: \"london\",\n      mining: {\n        auto: false,\n        interval: 1000\n      },\n      accounts: {\n        mnemonic: \"clutch captain shoe salt awake harvest setup primary inmate ugly among become\",\n        count: 105\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "infra/ethereum/package.json",
    "content": "{\n  \"name\": \"hardhat-project\",\n  \"devDependencies\": {\n    \"hardhat\": \"^2.5.0\"\n  }\n}\n"
  },
  {
    "path": "infra/ethereum/run.sh",
    "content": "#!/bin/sh\n\nnpx hardhat --config hardhat.config.js node\n"
  },
  {
    "path": "infra/fantom/Dockerfile",
    "content": "FROM ubuntu:bionic\n\n# Install dependencies\nRUN apt-get update -y\nRUN apt-get install -y build-essential git wget\n\n# Install Go\nRUN wget -c https://golang.org/dl/go1.15.5.linux-amd64.tar.gz\nRUN tar -C /usr/local -xzf go1.15.5.linux-amd64.tar.gz\nENV PATH=$PATH:/usr/local/go/bin\n\n# Build Opera\nWORKDIR /app\nRUN git clone https://github.com/Fantom-foundation/go-opera.git\nWORKDIR /app/go-opera\nRUN git checkout release/1.0.0-rc.4\nRUN make\nENV PATH=$PATH:/app/go-opera/build\n\n# Expose the default port of the JSON-RPC server\nEXPOSE 18545\n\nENTRYPOINT [ \"opera\", \"--fakenet\", \"1/1\", \"--http\", \"--http.api=eth,net\", \"--http.vhosts\", \"*\", \"--http.addr\", \"0.0.0.0\" ]\n"
  },
  {
    "path": "infra/filecoin/Dockerfile",
    "content": "FROM ubuntu:bionic\n\nRUN apt update -y\nRUN apt install -y mesa-opencl-icd ocl-icd-opencl-dev gcc git bzr jq pkg-config curl wget nano\nRUN apt upgrade -y\n\nRUN wget -c https://golang.org/dl/go1.14.6.linux-amd64.tar.gz\nRUN tar -C /usr/local -xzf go1.14.6.linux-amd64.tar.gz\nENV PATH=$PATH:/usr/local/go/bin\n\nWORKDIR /app\n\nRUN git clone https://github.com/filecoin-project/lotus .\nRUN git checkout d4cdc6d3340b8496c9f98e2d0daed8d1bd9b271e\nRUN make 2k\nRUN ./lotus fetch-params 2048\nRUN ./lotus-seed pre-seal --sector-size 2KiB --num-sectors 2\nRUN ./lotus-seed genesis new localnet.json\nRUN ./lotus-seed genesis add-miner localnet.json ~/.genesis-sectors/pre-seal-t01000.json\n\nCOPY run.sh /root/run.sh\nCOPY miner.key /root/miner.key\nCOPY user.key /root/user.key\nRUN chmod +x /root/run.sh\nRUN chmod +x /root/miner.key\nRUN chmod +x /root/user.key\n\nEXPOSE 1234\n\nCMD /root/run.sh\n"
  },
  {
    "path": "infra/filecoin/miner.key",
    "content": "7b2254797065223a22736563703235366b31222c22507269766174654b6579223a223168436f364f617442746f58636d304f6565665849473873374e505573576472372f6666735a58755964493d227d\n"
  },
  {
    "path": "infra/filecoin/run.sh",
    "content": "#!/bin/bash\n\ncd /app/\n\nexport LOTUS_SKIP_GENESIS_CHECK=_yes_\n\n./lotus daemon --lotus-make-genesis=dev.gen --genesis-template=localnet.json --bootstrap=false &\n\nPID=$!\n\nsleep 10\n\n./lotus wallet import ~/.genesis-sectors/pre-seal-t01000.key\n\n./lotus wallet import /root/miner.key\n\n./lotus wallet import /root/user.key\n\n./lotus auth create-token --perm admin\n\nkill $PID\n\necho '\n# Default config:\n[API]\nListenAddress = \"/ip4/0.0.0.0/tcp/1234/http\"\nRemoteListenAddress = \"127.0.0.1:1234\"\nTimeout = \"30s\"\n#\n[Libp2p]\n#  ListenAddresses = [\"/ip4/0.0.0.0/tcp/0\", \"/ip6/::/tcp/0\"]\n#  AnnounceAddresses = []\n#  NoAnnounceAddresses = []\n#  ConnMgrLow = 150\n#  ConnMgrHigh = 180\n#  ConnMgrGrace = \"20s\"\n#\n[Pubsub]\n#  Bootstrapper = false\n#  RemoteTracer = \"/ip4/147.75.67.199/tcp/4001/p2p/QmTd6UvR47vUidRNZ1ZKXHrAFhqTJAD27rKL9XYghEKgKX\"\n#\n[Client]\n#  UseIpfs = false\n#  IpfsMAddr = \"\"\n#  IpfsUseForRetrieval = false\n#\n[Metrics]\n#  Nickname = \"\"\n#  HeadNotifs = false\n#' > ~/.lotus/config.toml\n\n./lotus daemon --lotus-make-genesis=/root/dev.gen --genesis-template=/app/localnet.json --bootstrap=false &\n\nsleep 5\n\n./lotus-miner init --genesis-miner --actor=t01000 --sector-size=2KiB --pre-sealed-sectors=~/.genesis-sectors --pre-sealed-metadata=~/.genesis-sectors/pre-seal-t01000.json --nosync\n\n./lotus-miner run --nosync &\n\nsleep 15\n\nMAIN_WALLET=\"$(jq -r '.t01000.Owner' ~/.genesis-sectors/pre-seal-t01000.json)\"\n\n./lotus send --from $MAIN_WALLET t1ej2tountzqwnu6uswhqdzvw6yy5xvcig6rxl2qa 1000000\n\nwhile :\ndo\n    sleep 10\ndone\n"
  },
  {
    "path": "infra/filecoin/user.key",
    "content": "7b2254797065223a22736563703235366b31222c22507269766174654b6579223a22756d6a634e436a487a5438455757485849754a4c4b58745035437153323435666238626c656c756e5448493d227d\n"
  },
  {
    "path": "infra/goerli/Dockerfile",
    "content": "FROM node:alpine\n\nWORKDIR /root/app\n\nCOPY package.json .\nRUN npm install\n\nCOPY hardhat.config.js .\nCOPY run.sh .\nRUN chmod +x run.sh\n\nEXPOSE 8545\n\nENTRYPOINT [\"./run.sh\"]\n"
  },
  {
    "path": "infra/goerli/hardhat.config.js",
    "content": "/**\n * @type import('hardhat/config').HardhatUserConfig\n */\nmodule.exports = {\n  solidity: \"0.7.3\",\n  defaultNetwork: \"hardhat\",\n  networks: {\n    hardhat: {\n      chainId: 5,\n      blockGasLimit: 15000000,\n      hardfork: \"london\",\n      mining: {\n        auto: false,\n        interval: 1000\n      },\n      accounts: {\n        mnemonic: \"clutch captain shoe salt awake harvest setup primary inmate ugly among become\",\n        count: 105\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "infra/goerli/package.json",
    "content": "{\n  \"name\": \"hardhat-project\",\n  \"devDependencies\": {\n    \"hardhat\": \"^2.5.0\"\n  }\n}\n"
  },
  {
    "path": "infra/goerli/run.sh",
    "content": "#!/bin/sh\n\nnpx hardhat --config hardhat.config.js node\n"
  },
  {
    "path": "infra/polygon/Dockerfile",
    "content": "FROM maticnetwork/bor:master\n\nCOPY run.sh /root/run.sh\nRUN chmod +x /root/run.sh\n\nRUN mkdir -p /root/.bor/keystore\nCOPY genesis.json /root/.bor/genesis.json\nCOPY nodekey /root/.bor/nodekey\nCOPY static-nodes.json /root/.bor/static-nodes.json\nCOPY json-keystore /root/.bor/keystore/UTC--2021-05-11T14-27-08.753Z--0xbf7A416377ed8f1F745A739C8ff59094EB2FEFD2\nCOPY password.txt /root/.bor/password.txt\n\nENTRYPOINT [ \"./root/run.sh\" ]\n"
  },
  {
    "path": "infra/polygon/genesis.json",
    "content": "{\n  \"config\": {\n    \"chainId\": 15001,\n    \"homesteadBlock\": 0,\n    \"eip150Block\": 0,\n    \"eip150Hash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n    \"eip155Block\": 0,\n    \"eip158Block\": 0,\n    \"byzantiumBlock\": 0,\n    \"constantinopleBlock\": 0,\n    \"petersburgBlock\": 0,\n    \"istanbulBlock\": 0,\n    \"muirGlacierBlock\": 0,\n    \"bor\": {\n      \"period\": 1,\n      \"producerDelay\": 4,\n      \"sprint\": 64,\n      \"backupMultiplier\": 1,\n      \"validatorContract\": \"0x0000000000000000000000000000000000001000\",\n      \"stateReceiverContract\": \"0x0000000000000000000000000000000000001001\"\n    }\n  },\n  \"nonce\": \"0x0\",\n  \"timestamp\": \"0x5ce28211\",\n  \"extraData\": \"\",\n  \"gasLimit\": \"0x989680\",\n  \"difficulty\": \"0x1\",\n  \"mixHash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n  \"coinbase\": \"0x0000000000000000000000000000000000000000\",\n  \"alloc\": {\n    \"0000000000000000000000000000000000001000\": {\n      \"balance\": \"0x0\",\n      \"code\": \"0x608060405234801561001057600080fd5b50600436106101f05760003560e01c806360c8614d1161010f578063af26aa96116100a2578063d5b844eb11610071578063d5b844eb14610666578063dcf2793a14610684578063e3b7c924146106b6578063f59cf565146106d4576101f0565b8063af26aa96146105c7578063b71d7a69146105e7578063b7ab4db514610617578063c1b3c91914610636576101f0565b806370ba5707116100de57806370ba57071461052b57806398ab2b621461055b5780639d11b80714610579578063ae756451146105a9576101f0565b806360c8614d1461049c57806365b3a1e2146104bc57806366332354146104db578063687a9bd6146104f9576101f0565b80633434735f1161018757806344d6528f1161015657806344d6528f146103ee5780634dbc959f1461041e57806355614fcc1461043c578063582a8d081461046c576101f0565b80633434735f1461035257806335ddfeea1461037057806343ee8213146103a057806344c15cb1146103be576101f0565b806323f2a73f116101c357806323f2a73f146102a45780632bc06564146102d45780632de3a180146102f25780632eddf35214610322576101f0565b8063047a6c5b146101f55780630c35b1cb146102275780631270b5741461025857806323c2a2b414610288575b600080fd5b61020f600480360361020a9190810190612944565b610706565b60405161021e93929190613283565b60405180910390f35b610241600480360361023c9190810190612944565b61075d565b60405161024f9291906130a4565b60405180910390f35b610272600480360361026d919081019061296d565b610939565b60405161027f91906130db565b60405180910390f35b6102a2600480360361029d9190810190612a4c565b610a91565b005b6102be60048036036102b9919081019061296d565b61112a565b6040516102cb91906130db565b60405180910390f35b6102dc611281565b6040516102e99190613231565b60405180910390f35b61030c600480360361030791908101906128a1565b611286565b60405161031991906130f6565b60405180910390f35b61033c60048036036103379190810190612944565b611307565b6040516103499190613231565b60405180910390f35b61035a611437565b6040516103679190613089565b60405180910390f35b61038a600480360361038591908101906128dd565b61144f565b60405161039791906130db565b60405180910390f35b6103a861151a565b6040516103b591906130f6565b60405180910390f35b6103d860048036036103d391908101906129a9565b611531565b6040516103e59190613231565b60405180910390f35b6104086004803603610403919081019061296d565b611619565b6040516104159190613216565b60405180910390f35b610426611781565b6040516104339190613231565b60405180910390f35b61045660048036036104519190810190612826565b611791565b60405161046391906130db565b60405180910390f35b6104866004803603610481919081019061284f565b6117ab565b60405161049391906130f6565b60405180910390f35b6104a4611829565b6040516104b393929190613283565b60405180910390f35b6104c461189d565b6040516104d29291906130a4565b60405180910390f35b6104e361198e565b6040516104f09190613231565b60405180910390f35b610513600480360361050e9190810190612a10565b611993565b6040516105229392919061324c565b60405180910390f35b61054560048036036105409190810190612826565b6119f7565b60405161055291906130db565b60405180910390f35b610563611a11565b60405161057091906130f6565b60405180910390f35b610593600480360361058e9190810190612944565b611a28565b6040516105a09190613231565b60405180910390f35b6105b1611b59565b6040516105be91906130f6565b60405180910390f35b6105cf611b70565b6040516105de93929190613283565b60405180910390f35b61060160048036036105fc9190810190612944565b611bd1565b60405161060e9190613231565b60405180910390f35b61061f611cd1565b60405161062d9291906130a4565b60405180910390f35b610650600480360361064b9190810190612944565b611ce5565b60405161065d9190613231565b60405180910390f35b61066e611d06565b60405161067b91906132ba565b60405180910390f35b61069e60048036036106999190810190612a10565b611d0b565b6040516106ad9392919061324c565b60405180910390f35b6106be611d6f565b6040516106cb9190613231565b60405180910390f35b6106ee60048036036106e99190810190612944565b611d81565b6040516106fd93929190613283565b60405180910390f35b60008060006002600085815260200190815260200160002060000154600260008681526020019081526020016000206001015460026000878152602001908152602001600020600201549250925092509193909250565b60608060ff83116107795761077061189d565b91509150610934565b600061078484611bd1565b9050606060016000838152602001908152602001600020805490506040519080825280602002602001820160405280156107cd5781602001602082028038833980820191505090505b509050606060016000848152602001908152602001600020805490506040519080825280602002602001820160405280156108175781602001602082028038833980820191505090505b50905060008090505b60016000858152602001908152602001600020805490508110156109295760016000858152602001908152602001600020818154811061085c57fe5b906000526020600020906003020160020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683828151811061089a57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506001600085815260200190815260200160002081815481106108f257fe5b90600052602060002090600302016001015482828151811061091057fe5b6020026020010181815250508080600101915050610820565b508181945094505050505b915091565b6000606060016000858152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015610a0c578382906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152505081526020019060010190610970565b50505050905060008090505b8151811015610a84578373ffffffffffffffffffffffffffffffffffffffff16828281518110610a4457fe5b60200260200101516040015173ffffffffffffffffffffffffffffffffffffffff161415610a7757600192505050610a8b565b8080600101915050610a18565b5060009150505b92915050565b73fffffffffffffffffffffffffffffffffffffffe73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0a906131f6565b60405180910390fd5b6000610b1d611781565b90506000811415610b3157610b30611dab565b5b610b456001826120cc90919063ffffffff16565b8814610b86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7d90613176565b60405180910390fd5b868611610bc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbf906131d6565b60405180910390fd5b6000604060018989030181610bd957fe5b0614610c1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c11906131b6565b60405180910390fd5b8660026000838152602001908152602001600020600101541115610c73576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6a90613156565b60405180910390fd5b6000600260008a81526020019081526020016000206000015414610ccc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cc390613196565b60405180910390fd5b604051806060016040528089815260200188815260200187815250600260008a8152602001908152602001600020600082015181600001556020820151816001015560408201518160020155905050600388908060018154018082558091505090600182039060005260206000200160009091929091909150555060008060008a815260200190815260200160002081610d669190612620565b506000600160008a815260200190815260200160002081610d879190612620565b506060610ddf610dda87878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506120eb565b612119565b905060008090505b8151811015610f51576060610e0e838381518110610e0157fe5b6020026020010151612119565b90506000808c81526020019081526020016000208054809190600101610e349190612620565b506040518060600160405280610e5d83600081518110610e5057fe5b60200260200101516121f6565b8152602001610e7f83600181518110610e7257fe5b60200260200101516121f6565b8152602001610ea183600281518110610e9457fe5b6020026020010151612267565b73ffffffffffffffffffffffffffffffffffffffff168152506000808d81526020019081526020016000208381548110610ed757fe5b9060005260206000209060030201600082015181600001556020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050508080600101915050610de7565b506060610fa9610fa486868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506120eb565b612119565b905060008090505b815181101561111d576060610fd8838381518110610fcb57fe5b6020026020010151612119565b9050600160008d81526020019081526020016000208054809190600101610fff9190612620565b5060405180606001604052806110288360008151811061101b57fe5b60200260200101516121f6565b815260200161104a8360018151811061103d57fe5b60200260200101516121f6565b815260200161106c8360028151811061105f57fe5b6020026020010151612267565b73ffffffffffffffffffffffffffffffffffffffff16815250600160008e815260200190815260200160002083815481106110a357fe5b9060005260206000209060030201600082015181600001556020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050508080600101915050610fb1565b5050505050505050505050565b60006060600080858152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156111fc578382906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152505081526020019060010190611160565b50505050905060008090505b8151811015611274578373ffffffffffffffffffffffffffffffffffffffff1682828151811061123457fe5b60200260200101516040015173ffffffffffffffffffffffffffffffffffffffff1614156112675760019250505061127b565b8080600101915050611208565b5060009150505b92915050565b604081565b60006002600160f81b84846040516020016112a393929190612ff6565b6040516020818303038152906040526040516112bf9190613033565b602060405180830381855afa1580156112dc573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052506112ff9190810190612878565b905092915050565b60006060600080848152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156113d9578382906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815250508152602001906001019061133d565b505050509050600080905060008090505b825181101561142c5761141d83828151811061140257fe5b602002602001015160200151836120cc90919063ffffffff16565b915080806001019150506113ea565b508092505050919050565b73fffffffffffffffffffffffffffffffffffffffe81565b600080600080859050600060218087518161146657fe5b04029050600081111561147f5761147c876117ab565b91505b6000602190505b818111611509576000600182038801519050818801519550806000602081106114ab57fe5b1a60f81b9450600060f81b857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156114f0576114e98685611286565b93506114fd565b6114fa8487611286565b93505b50602181019050611486565b508782149450505050509392505050565b6040516115269061305f565b604051809103902081565b60008060009050600080905060008090505b84518167ffffffffffffffff16101561160c57606061156e868367ffffffffffffffff16604161228a565b90506000611585828961231690919063ffffffff16565b905061158f612652565b6115998a83611619565b90506115a58a8361112a565b80156115dc57508473ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16115b156115fe578194506115fb8160200151876120cc90919063ffffffff16565b95505b505050604181019050611543565b5081925050509392505050565b611621612652565b6060600080858152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b828210156116f1578382906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152505081526020019060010190611655565b50505050905060008090505b8151811015611779578373ffffffffffffffffffffffffffffffffffffffff1682828151811061172957fe5b60200260200101516040015173ffffffffffffffffffffffffffffffffffffffff16141561176c5781818151811061175d57fe5b60200260200101519250611779565b80806001019150506116fd565b505092915050565b600061178c43611bd1565b905090565b60006117a461179e611781565b8361112a565b9050919050565b60006002600060f81b836040516020016117c6929190612fca565b6040516020818303038152906040526040516117e29190613033565b602060405180830381855afa1580156117ff573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052506118229190810190612878565b9050919050565b60008060008061184a600161183c611781565b6120cc90919063ffffffff16565b905060026000828152602001908152602001600020600001546002600083815260200190815260200160002060010154600260008481526020019081526020016000206002015493509350935050909192565b606080606060016040519080825280602002602001820160405280156118d25781602001602082028038833980820191505090505b50905073bf7a416377ed8f1f745a739c8ff59094eb2fefd2816000815181106118f757fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050606060016040519080825280602002602001820160405280156119635781602001602082028038833980820191505090505b5090506127108160008151811061197657fe5b60200260200101818152505081819350935050509091565b60ff81565b600160205281600052604060002081815481106119ac57fe5b9060005260206000209060030201600091509150508060000154908060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905083565b6000611a0a611a04611781565b83610939565b9050919050565b604051611a1d9061304a565b604051809103902081565b6000606060016000848152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015611afb578382906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152505081526020019060010190611a5f565b505050509050600080905060008090505b8251811015611b4e57611b3f838281518110611b2457fe5b602002602001015160200151836120cc90919063ffffffff16565b91508080600101915050611b0c565b508092505050919050565b604051611b6590613074565b604051809103902081565b600080600080611b7e611781565b905060026000828152602001908152602001600020600001546002600083815260200190815260200160002060010154600260008481526020019081526020016000206002015493509350935050909192565b60008060038054905090505b6000811115611c9157611bee612689565b6002600060036001850381548110611c0257fe5b906000526020600020015481526020019081526020016000206040518060600160405290816000820154815260200160018201548152602001600282015481525050905083816020015111158015611c5f57506000816040015114155b8015611c6f575080604001518411155b15611c8257806000015192505050611ccc565b50808060019003915050611bdd565b5060006003805490501115611cc757600360016003805490500381548110611cb557fe5b90600052602060002001549050611ccc565b600090505b919050565b606080611cdd4361075d565b915091509091565b60038181548110611cf257fe5b906000526020600020016000915090505481565b600281565b60006020528160005260406000208181548110611d2457fe5b9060005260206000209060030201600091509150508060000154908060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905083565b600060404381611d7b57fe5b04905090565b60026020528060005260406000206000915090508060000154908060010154908060020154905083565b606080611db661189d565b8092508193505050600080905060405180606001604052808281526020016000815260200160ff815250600260008381526020019081526020016000206000820151816000015560208201518160010155604082015181600201559050506003819080600181540180825580915050906001820390600052602060002001600090919290919091505550600080600083815260200190815260200160002081611e5f9190612620565b5060006001600083815260200190815260200160002081611e809190612620565b5060008090505b8351811015611fa2576000808381526020019081526020016000208054809190600101611eb49190612620565b506040518060600160405280828152602001848381518110611ed257fe5b60200260200101518152602001858381518110611eeb57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff168152506000808481526020019081526020016000208281548110611f2957fe5b9060005260206000209060030201600082015181600001556020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509050508080600101915050611e87565b5060008090505b83518110156120c657600160008381526020019081526020016000208054809190600101611fd79190612620565b506040518060600160405280828152602001848381518110611ff557fe5b6020026020010151815260200185838151811061200e57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1681525060016000848152602001908152602001600020828154811061204d57fe5b9060005260206000209060030201600082015181600001556020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509050508080600101915050611fa9565b50505050565b6000808284019050838110156120e157600080fd5b8091505092915050565b6120f36126aa565b600060208301905060405180604001604052808451815260200182815250915050919050565b606061212482612420565b61212d57600080fd5b60006121388361246e565b905060608160405190808252806020026020018201604052801561217657816020015b6121636126c4565b81526020019060019003908161215b5790505b509050600061218885602001516124df565b8560200151019050600080600090505b848110156121e9576121a983612568565b91506040518060400160405280838152602001848152508482815181106121cc57fe5b602002602001018190525081830192508080600101915050612198565b5082945050505050919050565b600080826000015111801561221057506021826000015111155b61221957600080fd5b600061222883602001516124df565b9050600081846000015103905060008083866020015101905080519150602083101561225b57826020036101000a820491505b81945050505050919050565b6000601582600001511461227a57600080fd5b612283826121f6565b9050919050565b60608183018451101561229c57600080fd5b60608215600081146122b95760405191506020820160405261230a565b6040519150601f8416801560200281840101858101878315602002848b0101015b818310156122f757805183526020830192506020810190506122da565b50868552601f19601f8301166040525050505b50809150509392505050565b6000806000806041855114612331576000935050505061241a565b602085015192506040850151915060ff6041860151169050601b8160ff16101561235c57601b810190505b601b8160ff16141580156123745750601c8160ff1614155b15612385576000935050505061241a565b6000600187838686604051600081526020016040526040516123aa9493929190613111565b6020604051602081039080840390855afa1580156123cc573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561241257600080fd5b809450505050505b92915050565b600080826000015114156124375760009050612469565b60008083602001519050805160001a915060c060ff168260ff16101561246257600092505050612469565b6001925050505b919050565b6000808260000151141561248557600090506124da565b6000809050600061249984602001516124df565b84602001510190506000846000015185602001510190505b808210156124d3576124c282612568565b8201915082806001019350506124b1565b8293505050505b919050565b600080825160001a9050608060ff168110156124ff576000915050612563565b60b860ff16811080612524575060c060ff168110158015612523575060f860ff1681105b5b15612533576001915050612563565b60c060ff168110156125535760018060b80360ff16820301915050612563565b60018060f80360ff168203019150505b919050565b6000806000835160001a9050608060ff168110156125895760019150612616565b60b860ff168110156125a6576001608060ff168203019150612615565b60c060ff168110156125d65760b78103600185019450806020036101000a85510460018201810193505050612614565b60f860ff168110156125f357600160c060ff168203019150612613565b60f78103600185019450806020036101000a855104600182018101935050505b5b5b5b8192505050919050565b81548183558181111561264d5760030281600302836000526020600020918201910161264c91906126de565b5b505050565b60405180606001604052806000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b60405180606001604052806000815260200160008152602001600081525090565b604051806040016040528060008152602001600081525090565b604051806040016040528060008152602001600081525090565b61273191905b8082111561272d5760008082016000905560018201600090556002820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055506003016126e4565b5090565b90565b600081359050612743816134b3565b92915050565b600081359050612758816134ca565b92915050565b60008151905061276d816134ca565b92915050565b60008083601f84011261278557600080fd5b8235905067ffffffffffffffff81111561279e57600080fd5b6020830191508360018202830111156127b657600080fd5b9250929050565b600082601f8301126127ce57600080fd5b81356127e16127dc82613302565b6132d5565b915080825260208301602083018583830111156127fd57600080fd5b61280883828461345d565b50505092915050565b600081359050612820816134e1565b92915050565b60006020828403121561283857600080fd5b600061284684828501612734565b91505092915050565b60006020828403121561286157600080fd5b600061286f84828501612749565b91505092915050565b60006020828403121561288a57600080fd5b60006128988482850161275e565b91505092915050565b600080604083850312156128b457600080fd5b60006128c285828601612749565b92505060206128d385828601612749565b9150509250929050565b6000806000606084860312156128f257600080fd5b600061290086828701612749565b935050602061291186828701612749565b925050604084013567ffffffffffffffff81111561292e57600080fd5b61293a868287016127bd565b9150509250925092565b60006020828403121561295657600080fd5b600061296484828501612811565b91505092915050565b6000806040838503121561298057600080fd5b600061298e85828601612811565b925050602061299f85828601612734565b9150509250929050565b6000806000606084860312156129be57600080fd5b60006129cc86828701612811565b93505060206129dd86828701612749565b925050604084013567ffffffffffffffff8111156129fa57600080fd5b612a06868287016127bd565b9150509250925092565b60008060408385031215612a2357600080fd5b6000612a3185828601612811565b9250506020612a4285828601612811565b9150509250929050565b600080600080600080600060a0888a031215612a6757600080fd5b6000612a758a828b01612811565b9750506020612a868a828b01612811565b9650506040612a978a828b01612811565b955050606088013567ffffffffffffffff811115612ab457600080fd5b612ac08a828b01612773565b9450945050608088013567ffffffffffffffff811115612adf57600080fd5b612aeb8a828b01612773565b925092505092959891949750929550565b6000612b088383612b2c565b60208301905092915050565b6000612b208383612f9d565b60208301905092915050565b612b35816133d2565b82525050565b612b44816133d2565b82525050565b6000612b558261334e565b612b5f8185613389565b9350612b6a8361332e565b8060005b83811015612b9b578151612b828882612afc565b9750612b8d8361336f565b925050600181019050612b6e565b5085935050505092915050565b6000612bb382613359565b612bbd818561339a565b9350612bc88361333e565b8060005b83811015612bf9578151612be08882612b14565b9750612beb8361337c565b925050600181019050612bcc565b5085935050505092915050565b612c0f816133e4565b82525050565b612c26612c21826133f0565b61349f565b82525050565b612c358161341c565b82525050565b612c4c612c478261341c565b6134a9565b82525050565b6000612c5d82613364565b612c6781856133ab565b9350612c7781856020860161346c565b80840191505092915050565b6000612c906004836133c7565b91507f766f7465000000000000000000000000000000000000000000000000000000006000830152600482019050919050565b6000612cd0602d836133b6565b91507f537461727420626c6f636b206d7573742062652067726561746572207468616e60008301527f2063757272656e74207370616e000000000000000000000000000000000000006020830152604082019050919050565b6000612d36600f836133b6565b91507f496e76616c6964207370616e20696400000000000000000000000000000000006000830152602082019050919050565b6000612d766013836133b6565b91507f5370616e20616c726561647920657869737473000000000000000000000000006000830152602082019050919050565b6000612db66045836133b6565b91507f446966666572656e6365206265747765656e20737461727420616e6420656e6460008301527f20626c6f636b206d75737420626520696e206d756c7469706c6573206f66207360208301527f7072696e740000000000000000000000000000000000000000000000000000006040830152606082019050919050565b6000612e42602a836133b6565b91507f456e6420626c6f636b206d7573742062652067726561746572207468616e207360008301527f7461727420626c6f636b000000000000000000000000000000000000000000006020830152604082019050919050565b6000612ea8600e836133c7565b91507f6865696d64616c6c2d31353030310000000000000000000000000000000000006000830152600e82019050919050565b6000612ee86005836133c7565b91507f31353030310000000000000000000000000000000000000000000000000000006000830152600582019050919050565b6000612f286012836133b6565b91507f4e6f742053797374656d204164646573732100000000000000000000000000006000830152602082019050919050565b606082016000820151612f716000850182612f9d565b506020820151612f846020850182612f9d565b506040820151612f976040850182612b2c565b50505050565b612fa681613446565b82525050565b612fb581613446565b82525050565b612fc481613450565b82525050565b6000612fd68285612c15565b600182019150612fe68284612c3b565b6020820191508190509392505050565b60006130028286612c15565b6001820191506130128285612c3b565b6020820191506130228284612c3b565b602082019150819050949350505050565b600061303f8284612c52565b915081905092915050565b600061305582612c83565b9150819050919050565b600061306a82612e9b565b9150819050919050565b600061307f82612edb565b9150819050919050565b600060208201905061309e6000830184612b3b565b92915050565b600060408201905081810360008301526130be8185612b4a565b905081810360208301526130d28184612ba8565b90509392505050565b60006020820190506130f06000830184612c06565b92915050565b600060208201905061310b6000830184612c2c565b92915050565b60006080820190506131266000830187612c2c565b6131336020830186612fbb565b6131406040830185612c2c565b61314d6060830184612c2c565b95945050505050565b6000602082019050818103600083015261316f81612cc3565b9050919050565b6000602082019050818103600083015261318f81612d29565b9050919050565b600060208201905081810360008301526131af81612d69565b9050919050565b600060208201905081810360008301526131cf81612da9565b9050919050565b600060208201905081810360008301526131ef81612e35565b9050919050565b6000602082019050818103600083015261320f81612f1b565b9050919050565b600060608201905061322b6000830184612f5b565b92915050565b60006020820190506132466000830184612fac565b92915050565b60006060820190506132616000830186612fac565b61326e6020830185612fac565b61327b6040830184612b3b565b949350505050565b60006060820190506132986000830186612fac565b6132a56020830185612fac565b6132b26040830184612fac565b949350505050565b60006020820190506132cf6000830184612fbb565b92915050565b6000604051905081810181811067ffffffffffffffff821117156132f857600080fd5b8060405250919050565b600067ffffffffffffffff82111561331957600080fd5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b60006133dd82613426565b9050919050565b60008115159050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b8381101561348a57808201518184015260208101905061346f565b83811115613499576000848401525b50505050565b6000819050919050565b6000819050919050565b6134bc816133d2565b81146134c757600080fd5b50565b6134d38161341c565b81146134de57600080fd5b50565b6134ea81613446565b81146134f557600080fd5b5056fea365627a7a72315820421f0e2879cc0d2332ed8ec9bd7d2e5227bba908a312849a3318dfaf3b5bd3106c6578706572696d656e74616cf564736f6c634300050b0040\"\n    },\n    \"0000000000000000000000000000000000001001\": {\n      \"balance\": \"0x0\",\n      \"code\": \"0x608060405234801561001057600080fd5b50600436106100415760003560e01c806319494a17146100465780633434735f146100e15780635407ca671461012b575b600080fd5b6100c76004803603604081101561005c57600080fd5b81019080803590602001909291908035906020019064010000000081111561008357600080fd5b82018360208201111561009557600080fd5b803590602001918460018302840111640100000000831117156100b757600080fd5b9091929391929390505050610149565b604051808215151515815260200191505060405180910390f35b6100e961047a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610133610492565b6040518082815260200191505060405180910390f35b600073fffffffffffffffffffffffffffffffffffffffe73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610200576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4e6f742053797374656d2041646465737321000000000000000000000000000081525060200191505060405180910390fd5b606061025761025285858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610498565b6104c6565b905060006102788260008151811061026b57fe5b60200260200101516105a3565b905080600160005401146102f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f537461746549647320617265206e6f742073657175656e7469616c000000000081525060200191505060405180910390fd5b600080815480929190600101919050555060006103248360018151811061031757fe5b6020026020010151610614565b905060606103458460028151811061033857fe5b6020026020010151610637565b9050610350826106c3565b1561046f576000624c4b409050606084836040516024018083815260200180602001828103825283818151815260200191508051906020019080838360005b838110156103aa57808201518184015260208101905061038f565b50505050905090810190601f1680156103d75780820380516001836020036101000a031916815260200191505b5093505050506040516020818303038152906040527f26c53bea000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905060008082516020840160008887f1965050505b505050509392505050565b73fffffffffffffffffffffffffffffffffffffffe81565b60005481565b6104a0610943565b600060208301905060405180604001604052808451815260200182815250915050919050565b60606104d1826106dc565b6104da57600080fd5b60006104e58361072a565b905060608160405190808252806020026020018201604052801561052357816020015b61051061095d565b8152602001906001900390816105085790505b5090506000610535856020015161079b565b8560200151019050600080600090505b848110156105965761055683610824565b915060405180604001604052808381526020018481525084828151811061057957fe5b602002602001018190525081830192508080600101915050610545565b5082945050505050919050565b60008082600001511180156105bd57506021826000015111155b6105c657600080fd5b60006105d5836020015161079b565b9050600081846000015103905060008083866020015101905080519150602083101561060857826020036101000a820491505b81945050505050919050565b6000601582600001511461062757600080fd5b610630826105a3565b9050919050565b6060600082600001511161064a57600080fd5b6000610659836020015161079b565b905060008184600001510390506060816040519080825280601f01601f19166020018201604052801561069b5781602001600182028038833980820191505090505b50905060008160200190506106b78487602001510182856108dc565b81945050505050919050565b600080823b905060008163ffffffff1611915050919050565b600080826000015114156106f35760009050610725565b60008083602001519050805160001a915060c060ff168260ff16101561071e57600092505050610725565b6001925050505b919050565b600080826000015114156107415760009050610796565b60008090506000610755846020015161079b565b84602001510190506000846000015185602001510190505b8082101561078f5761077e82610824565b82019150828060010193505061076d565b8293505050505b919050565b600080825160001a9050608060ff168110156107bb57600091505061081f565b60b860ff168110806107e0575060c060ff1681101580156107df575060f860ff1681105b5b156107ef57600191505061081f565b60c060ff1681101561080f5760018060b80360ff1682030191505061081f565b60018060f80360ff168203019150505b919050565b6000806000835160001a9050608060ff1681101561084557600191506108d2565b60b860ff16811015610862576001608060ff1682030191506108d1565b60c060ff168110156108925760b78103600185019450806020036101000a855104600182018101935050506108d0565b60f860ff168110156108af57600160c060ff1682030191506108cf565b60f78103600185019450806020036101000a855104600182018101935050505b5b5b5b8192505050919050565b60008114156108ea5761093e565b5b602060ff16811061091a5782518252602060ff1683019250602060ff1682019150602060ff16810390506108eb565b6000600182602060ff16036101000a03905080198451168184511681811785525050505b505050565b604051806040016040528060008152602001600081525090565b60405180604001604052806000815260200160008152509056fea265627a7a7231582083fbdacb76f32b4112d0f7db9a596937925824798a0026ba0232322390b5263764736f6c634300050b0032\"\n    },\n    \"0000000000000000000000000000000000001010\": {\n      \"balance\": \"0x204fce28085b549b31600000\",\n      \"code\": \"0x60806040526004361061019c5760003560e01c806377d32e94116100ec578063acd06cb31161008a578063e306f77911610064578063e306f77914610a7b578063e614d0d614610aa6578063f2fde38b14610ad1578063fc0c546a14610b225761019c565b8063acd06cb31461097a578063b789543c146109cd578063cc79f97b14610a505761019c565b80639025e64c116100c65780639025e64c146107c957806395d89b4114610859578063a9059cbb146108e9578063abceeba21461094f5761019c565b806377d32e94146106315780638da5cb5b146107435780638f32d59b1461079a5761019c565b806347e7ef24116101595780637019d41a116101335780637019d41a1461053357806370a082311461058a578063715018a6146105ef578063771282f6146106065761019c565b806347e7ef2414610410578063485cc9551461046b57806360f96a8f146104dc5761019c565b806306fdde03146101a15780631499c5921461023157806318160ddd1461028257806319d27d9c146102ad5780632e1a7d4d146103b1578063313ce567146103df575b600080fd5b3480156101ad57600080fd5b506101b6610b79565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101f65780820151818401526020810190506101db565b50505050905090810190601f1680156102235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561023d57600080fd5b506102806004803603602081101561025457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bb6565b005b34801561028e57600080fd5b50610297610c24565b6040518082815260200191505060405180910390f35b3480156102b957600080fd5b5061036f600480360360a08110156102d057600080fd5b81019080803590602001906401000000008111156102ed57600080fd5b8201836020820111156102ff57600080fd5b8035906020019184600183028401116401000000008311171561032157600080fd5b9091929391929390803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c3a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103dd600480360360208110156103c757600080fd5b8101908080359060200190929190505050610e06565b005b3480156103eb57600080fd5b506103f4610f58565b604051808260ff1660ff16815260200191505060405180910390f35b34801561041c57600080fd5b506104696004803603604081101561043357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f61565b005b34801561047757600080fd5b506104da6004803603604081101561048e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061111d565b005b3480156104e857600080fd5b506104f16111ec565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561053f57600080fd5b50610548611212565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561059657600080fd5b506105d9600480360360208110156105ad57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611238565b6040518082815260200191505060405180910390f35b3480156105fb57600080fd5b50610604611259565b005b34801561061257600080fd5b5061061b611329565b6040518082815260200191505060405180910390f35b34801561063d57600080fd5b506107016004803603604081101561065457600080fd5b81019080803590602001909291908035906020019064010000000081111561067b57600080fd5b82018360208201111561068d57600080fd5b803590602001918460018302840111640100000000831117156106af57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505061132f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561074f57600080fd5b506107586114b4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156107a657600080fd5b506107af6114dd565b604051808215151515815260200191505060405180910390f35b3480156107d557600080fd5b506107de611534565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561081e578082015181840152602081019050610803565b50505050905090810190601f16801561084b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561086557600080fd5b5061086e61156d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156108ae578082015181840152602081019050610893565b50505050905090810190601f1680156108db5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610935600480360360408110156108ff57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506115aa565b604051808215151515815260200191505060405180910390f35b34801561095b57600080fd5b506109646115d0565b6040518082815260200191505060405180910390f35b34801561098657600080fd5b506109b36004803603602081101561099d57600080fd5b810190808035906020019092919050505061165d565b604051808215151515815260200191505060405180910390f35b3480156109d957600080fd5b50610a3a600480360360808110156109f057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919050505061167d565b6040518082815260200191505060405180910390f35b348015610a5c57600080fd5b50610a6561169d565b6040518082815260200191505060405180910390f35b348015610a8757600080fd5b50610a906116a3565b6040518082815260200191505060405180910390f35b348015610ab257600080fd5b50610abb6116a9565b6040518082815260200191505060405180910390f35b348015610add57600080fd5b50610b2060048036036020811015610af457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611736565b005b348015610b2e57600080fd5b50610b37611753565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60606040518060400160405280600b81526020017f4d6174696320546f6b656e000000000000000000000000000000000000000000815250905090565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f44697361626c656420666561747572650000000000000000000000000000000081525060200191505060405180910390fd5b6000601260ff16600a0a6402540be40002905090565b6000808511610c4857600080fd5b6000831480610c575750824311155b610cc9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5369676e6174757265206973206578706972656400000000000000000000000081525060200191505060405180910390fd5b6000610cd73387878761167d565b9050600015156005600083815260200190815260200160002060009054906101000a900460ff16151514610d73576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f536967206465616374697661746564000000000000000000000000000000000081525060200191505060405180910390fd5b60016005600083815260200190815260200160002060006101000a81548160ff021916908315150217905550610ded8189898080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061132f565b9150610dfa828488611779565b50509695505050505050565b60003390506000610e1682611238565b9050610e2d83600654611b3690919063ffffffff16565b600681905550600083118015610e4257508234145b610eb4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f496e73756666696369656e7420616d6f756e740000000000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167febff2602b3f468259e1e99f613fed6691f3a6526effe6ef3e768ba7ae7a36c4f8584610f3087611238565b60405180848152602001838152602001828152602001935050505060405180910390a3505050565b60006012905090565b610f696114dd565b610f7257600080fd5b600081118015610faf5750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b611004576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611f046023913960400191505060405180910390fd5b600061100f83611238565b905060008390508073ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f1935050505015801561105c573d6000803e3d6000fd5b5061107283600654611b5690919063ffffffff16565b6006819055508373ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f4e2ca0515ed1aef1395f66b5303bb5d6f1bf9d61a353fa53f73f8ac9973fa9f685856110f489611238565b60405180848152602001838152602001828152602001935050505060405180910390a350505050565b600760009054906101000a900460ff1615611183576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611ee16023913960400191505060405180910390fd5b6001600760006101000a81548160ff02191690831515021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506111e882611b75565b5050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b6112616114dd565b61126a57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60065481565b600080600080604185511461134a57600093505050506114ae565b602085015192506040850151915060ff6041860151169050601b8160ff16101561137557601b810190505b601b8160ff161415801561138d5750601c8160ff1614155b1561139e57600093505050506114ae565b60018682858560405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156113fb573d6000803e3d6000fd5b505050602060405103519350600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156114aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f4572726f7220696e2065637265636f766572000000000000000000000000000081525060200191505060405180910390fd5b5050505b92915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b6040518060400160405280600281526020017f3a9900000000000000000000000000000000000000000000000000000000000081525081565b60606040518060400160405280600581526020017f4d41544943000000000000000000000000000000000000000000000000000000815250905090565b60008134146115bc57600090506115ca565b6115c7338484611779565b90505b92915050565b6040518060800160405280605b8152602001611f79605b91396040516020018082805190602001908083835b6020831061161f57805182526020820191506020810190506020830392506115fc565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012081565b60056020528060005260406000206000915054906101000a900460ff1681565b600061169361168e86868686611c6d565b611d43565b9050949350505050565b613a9981565b60015481565b604051806080016040528060528152602001611f27605291396040516020018082805190602001908083835b602083106116f857805182526020820191506020810190506020830392506116d5565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012081565b61173e6114dd565b61174757600080fd5b61175081611b75565b50565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000803073ffffffffffffffffffffffffffffffffffffffff166370a08231866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156117f957600080fd5b505afa15801561180d573d6000803e3d6000fd5b505050506040513d602081101561182357600080fd5b8101908080519060200190929190505050905060003073ffffffffffffffffffffffffffffffffffffffff166370a08231866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156118b557600080fd5b505afa1580156118c9573d6000803e3d6000fd5b505050506040513d60208110156118df57600080fd5b810190808051906020019092919050505090506118fd868686611d8d565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fe6497e3ee548a3372136af2fcb0696db31fc6cf20260707645068bd3fe97f3c48786863073ffffffffffffffffffffffffffffffffffffffff166370a082318e6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611a0557600080fd5b505afa158015611a19573d6000803e3d6000fd5b505050506040513d6020811015611a2f57600080fd5b81019080805190602001909291905050503073ffffffffffffffffffffffffffffffffffffffff166370a082318e6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611abd57600080fd5b505afa158015611ad1573d6000803e3d6000fd5b505050506040513d6020811015611ae757600080fd5b8101908080519060200190929190505050604051808681526020018581526020018481526020018381526020018281526020019550505050505060405180910390a46001925050509392505050565b600082821115611b4557600080fd5b600082840390508091505092915050565b600080828401905083811015611b6b57600080fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611baf57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000806040518060800160405280605b8152602001611f79605b91396040516020018082805190602001908083835b60208310611cbf5780518252602082019150602081019050602083039250611c9c565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405280519060200120905060405181815273ffffffffffffffffffffffffffffffffffffffff8716602082015285604082015284606082015283608082015260a0812092505081915050949350505050565b60008060015490506040517f190100000000000000000000000000000000000000000000000000000000000081528160028201528360228201526042812092505081915050919050565b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611e2f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f63616e27742073656e6420746f204d524332300000000000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611e75573d6000803e3d6000fd5b508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a350505056fe54686520636f6e747261637420697320616c726561647920696e697469616c697a6564496e73756666696369656e7420616d6f756e74206f7220696e76616c69642075736572454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429546f6b656e5472616e736665724f726465722861646472657373207370656e6465722c75696e7432353620746f6b656e49644f72416d6f756e742c6279746573333220646174612c75696e743235362065787069726174696f6e29a265627a7a72315820bb602c3c6bcd412ef9bc4b050494e16a2ec21725618669ec9857d8853ab3333a64736f6c634300050b0032\"\n    },\n    \"bf7A416377ed8f1F745A739C8ff59094EB2FEFD2\": {\n      \"balance\": \"0x3635c9adc5dea00000\"\n    }\n  },\n  \"number\": \"0x0\",\n  \"gasUsed\": \"0x0\",\n  \"parentHash\": \"0x0000000000000000000000000000000000000000000000000000000000000000\"\n}\n"
  },
  {
    "path": "infra/polygon/json-keystore",
    "content": "{\n  \"version\": 3,\n  \"id\": \"6f3e9ee2-0db1-464b-8977-3d6dab963efa\",\n  \"address\": \"bf7a416377ed8f1f745a739c8ff59094eb2fefd2\",\n  \"crypto\": {\n    \"ciphertext\": \"8bce0b16e5b34d3cf5f9090e49253450e39f8c56a2e7344514e9d81b1db51c0b\",\n    \"cipherparams\": {\n      \"iv\": \"df9eaeaedbf9ee8c29c1416db77abaff\"\n    },\n    \"cipher\": \"aes-128-ctr\",\n    \"kdf\": \"scrypt\",\n    \"kdfparams\": {\n      \"dklen\": 32,\n      \"salt\": \"b30d9d712a504e7c96d4331b351b38ce5e121b6d4d33290345ab2def479fb408\",\n      \"n\": 8192,\n      \"r\": 8,\n      \"p\": 1\n    },\n    \"mac\": \"b5465c6825699d4e441454cba0e8cc508c07438077c359ab0ca516ace51f0218\"\n  }\n}\n"
  },
  {
    "path": "infra/polygon/nodekey",
    "content": "bf7f3c94e16d94784358f555c2ac58ea9f77f009816af471a0aab815d5578848\n"
  },
  {
    "path": "infra/polygon/password.txt",
    "content": "password0\n"
  },
  {
    "path": "infra/polygon/run.sh",
    "content": "#!/bin/sh\n\nNODE_DIR=/root/.bor\nDATA_DIR=/root/.bor/data\nADDRESS=\"bf7A416377ed8f1F745A739C8ff59094EB2FEFD2\"\n\nbor --datadir $DATA_DIR init $NODE_DIR/genesis.json\ncp $NODE_DIR/nodekey $DATA_DIR/bor/\ncp $NODE_DIR/static-nodes.json $DATA_DIR/bor/\n\nbor --nousb \\\n  --datadir $DATA_DIR \\\n  --port 30303 \\\n  --bor.withoutheimdall \\\n  --http --http.addr '0.0.0.0' \\\n  --http.vhosts '*' \\\n  --http.corsdomain '*' \\\n  --http.port 8545 \\\n  --http.api 'personal,eth,net,web3,txpool,miner,admin,bor' \\\n  --syncmode 'full' \\\n  --networkid '15001' \\\n  --miner.gaslimit '2000000000' \\\n  --txpool.nolocals \\\n  --txpool.accountslots '128' \\\n  --txpool.globalslots '20000' \\\n  --txpool.lifetime '0h16m0s' \\\n  --unlock $ADDRESS \\\n  --keystore $NODE_DIR/keystore \\\n  --password $NODE_DIR/password.txt \\\n  --allow-insecure-unlock \\\n  --mine\n"
  },
  {
    "path": "infra/polygon/static-nodes.json",
    "content": "[\n  \"enode://344282ecde713de509be84a6aa0e65d2b36c9a8475373ef0b62dc3e086eacf4b58083c65eaf039f1097d80048699643a05aeea215afe97c27170346501f16fac@172.20.1.100:30303\"\n]\n"
  },
  {
    "path": "infra/terra/Dockerfile",
    "content": "FROM ubuntu:xenial\n\nRUN apt-get update --fix-missing && apt-get install --yes software-properties-common build-essential wget curl git\n\nRUN wget -c https://golang.org/dl/go1.16.8.linux-amd64.tar.gz\nRUN tar -C /usr/local -xzf go1.16.8.linux-amd64.tar.gz\nENV PATH=$PATH:/usr/local/go/bin\n\nWORKDIR /app\nRUN git clone https://github.com/terra-money/classic-core.git\nWORKDIR /app/classic-core\nRUN git fetch --all -p\nRUN git checkout v0.5.5\nRUN make install\n\nCOPY run.sh /root/run.sh\nRUN chmod +x /root/run.sh\n\nEXPOSE 26657\n\nENV PATH=$PATH:/root/go/bin\n\nWORKDIR /\n\nENTRYPOINT [\"./root/run.sh\"]\n"
  },
  {
    "path": "infra/terra/run.sh",
    "content": "#!/bin/bash\nADDRESS=$1\n\n# Print setup\necho \"TERRA_ADDRESS=$ADDRESS\"\n\n# Register client key\nterrad keys add validator --keyring-backend=test\necho $(terrad keys show validator --keyring-backend=test)\n\n# Initialize tesnet\nterrad init testnet --chain-id testnet\nterrad add-genesis-account $(terrad keys show validator -a --keyring-backend=test) 10000000000uluna\nterrad add-genesis-account $ADDRESS 10000000000uluna,10000000000ukrw,10000000000uusd,10000000000usdr,10000000000umnt\nterrad gentx validator 10000000000uluna --keyring-backend=test --chain-id=testnet\nterrad collect-gentxs\n\n# Start terrad\nterrad start --rpc.laddr \"tcp://0.0.0.0:26657\"\n"
  },
  {
    "path": "infra/zcash/Dockerfile",
    "content": "FROM debian:buster\n\n# Install zcashd.\nRUN apt-get update                                                                                    && \\\n    apt-get install -y --no-install-recommends apt-transport-https gnupg2 ca-certificates wget        && \\\n    wget -qO - https://apt.z.cash/zcash.asc | apt-key add -                                           && \\\n    echo \"deb [arch=amd64] https://apt.z.cash/ buster main\" | tee /etc/apt/sources.list.d/zcash.list  && \\\n    apt-get update && apt-get install -y --no-install-recommends zcash                                && \\\n    mkdir -p /root/.zcash-params && zcash-fetch-params\n\n\nCOPY zcash.conf /root/.zcash/zcash.conf\nCOPY run.sh /root/run.sh\nRUN chmod +x /root/run.sh\n\nEXPOSE 18232\n\nENTRYPOINT [\"./root/run.sh\"]\n"
  },
  {
    "path": "infra/zcash/run.sh",
    "content": "#!/bin/bash\nADDRESS=$1\n\n# Start\nzcashd \\\n  -mineraddress=$ADDRESS \\\n  -nuparams=5ba81b19:10  \\\n  -nuparams=76b809bb:20  \\\n  -nuparams=2bb40e60:30  \\\n  -nuparams=f5b9230b:40  \\\n  -nuparams=e9ff75a6:50  \\\n  -nuparams=c2d6d0b4:60\nsleep 20\n\necho \"ZCASH_ADDRESS=$ADDRESS\"\n\n# Import the address\nzcash-cli importaddress $ADDRESS\n\n# Generate enough block to pass the maturation tim=\nzcash-cli generate 101\n\n# Simulate mining\nwhile :\ndo\n    zcash-cli generate 1\n    sleep 10\ndone\n"
  },
  {
    "path": "infra/zcash/zcash.conf",
    "content": "daemon=1\nregtest=1\nrpcuser=user\nrpcpassword=password\nrpcallowip=0.0.0.0/0\nrpcport=18232\nserver=1\ntxindex=1\ngen=1\nminetolocalwallet=0\n"
  },
  {
    "path": "multichain.go",
    "content": "// Package multichain defines all supported assets and chains. It also\n// re-exports the individual multichain APIs.\npackage multichain\n\nimport (\n\t\"github.com/renproject/multichain/api/account\"\n\t\"github.com/renproject/multichain/api/address\"\n\t\"github.com/renproject/multichain/api/contract\"\n\t\"github.com/renproject/multichain/api/gas\"\n\t\"github.com/renproject/multichain/api/utxo\"\n\t\"github.com/renproject/surge\"\n)\n\ntype (\n\t// An Address is a human-readable representation of a public identity. It can\n\t// be the address of an external account, contract, or script.\n\tAddress = address.Address\n\n\t// The AddressEncodeDecoder interfaces combines encoding and decoding\n\t// functionality into one interface.\n\tAddressEncodeDecoder = address.EncodeDecoder\n\n\t// RawAddress is an address that has been decoded into its binary form.\n\tRawAddress = address.RawAddress\n)\n\ntype (\n\t// The AccountTx interface defines the functionality that must be exposed by\n\t// account-based transactions.\n\tAccountTx = account.Tx\n\n\t// The AccountTxBuilder interface defines the functionality required to build\n\t// account-based transactions. Most chain implementations require additional\n\t// information, and this should be accepted during the construction of the\n\t// chain-specific transaction builder.\n\tAccountTxBuilder = account.TxBuilder\n\n\t// The AccountClient interface defines the functionality required to interact\n\t// with a chain over RPC.\n\tAccountClient = account.Client\n)\n\ntype (\n\t// A UTXOutpoint identifies a specific output produced by a transaction.\n\tUTXOutpoint = utxo.Outpoint\n\n\t// A UTXOutput is produced by a transaction. It includes the conditions\n\t// required to spend the output (called the pubkey script, based on Bitcoin).\n\tUTXOutput = utxo.Output\n\n\t// A UTXOInput specifies an existing output, produced by a previous\n\t// transaction, to be consumed by another transaction. It includes the script\n\t// that meets the conditions specified by the consumed output (called the sig\n\t// script, based on Bitcoin).\n\tUTXOInput = utxo.Input\n\n\t// A UTXORecipient specifies an address, and an amount, for which a\n\t// transaction will produce an output. Depending on the output, the address\n\t// can take on different formats (e.g. in Bitcoin, addresses can be P2PK,\n\t// P2PKH, or P2SH).\n\tUTXORecipient = utxo.Recipient\n\n\t// A UTXOTx interfaces defines the functionality that must be exposed by\n\t// utxo-based transactions.\n\tUTXOTx = utxo.Tx\n\n\t// A UTXOTxBuilder interface defines the functionality required to build\n\t// account-based transactions. Most chain implementations require additional\n\t// information, and this should be accepted during the construction of the\n\t// chain-specific transaction builder.\n\tUTXOTxBuilder = utxo.TxBuilder\n\n\t// A UTXOClient interface defines the functionality required to interact with\n\t// a chain over RPC.\n\tUTXOClient = utxo.Client\n)\n\ntype (\n\t// ContractCallData is used to specify a function and its parameters when\n\t// invoking business logic on a contract.\n\tContractCallData = contract.CallData\n\n\t// The ContractCaller interface defines the functionality required to call\n\t// readonly functions on a contract. Calling functions that mutate contract\n\t// state should be done using the Account API.\n\tContractCaller = contract.Caller\n)\n\ntype (\n\t// The GasEstimator interface defines the functionality required to know the\n\t// current recommended gas prices.\n\tGasEstimator = gas.Estimator\n)\n\n// An Asset uniquely identifies assets using human-readable strings.\ntype Asset string\n\n// Enumeration of supported assets. When introducing a new chain, or new asset\n// from an existing chain, you must add a human-readable string to this set of\n// enumerated values. Assets must be listed in alphabetical order.\nconst (\n\tArbETH = Asset(\"ArbETH\") // Arbitrum Ether\n\tAVAX   = Asset(\"AVAX\")   // Avalanche\n\tBCH    = Asset(\"BCH\")    // Bitcoin Cash\n\tBNB    = Asset(\"BNB\")    // Binance Coin\n\tBTC    = Asset(\"BTC\")    // Bitcoin\n\tCAT    = Asset(\"CAT\")    // Catalog\n\tDGB    = Asset(\"DGB\")    // DigiByte\n\tDOGE   = Asset(\"DOGE\")   // Dogecoin\n\tETH    = Asset(\"ETH\")    // Ether\n\tFIL    = Asset(\"FIL\")    // Filecoin\n\tFTM    = Asset(\"FTM\")    // Fantom\n\tGETH   = Asset(\"gETH\")   // Goerli Ether\n\tGLMR   = Asset(\"GLMR\")   // Glimmer\n\tKAVA   = Asset(\"KAVA\")   // Kava\n\tLUNA   = Asset(\"LUNA\")   // Luna\n\tMATIC  = Asset(\"MATIC\")  // Matic PoS (Polygon)\n\toETH   = Asset(\"oETH\")   // Optimism Ether\n\tSOL    = Asset(\"SOL\")    // Solana\n\tZEC    = Asset(\"ZEC\")    // Zcash\n\n\tUSDC_Avalanche = Asset(\"USDC_Avalanche\") // Circle USD (Avalanche)\n\tUSDT_Avalanche = Asset(\"USDT_Avalanche\") // Tether (Avalanche)\n\n\tBADGER = Asset(\"BADGER\") // Badger DAO\n\tBUSD   = Asset(\"BUSD\")   // Binance USD\n\tCRV    = Asset(\"CRV\")    // Curve\n\tDAI    = Asset(\"DAI\")    // Dai\n\tEURT   = Asset(\"EURT\")   // Euro Tether\n\tFTT    = Asset(\"FTT\")    // FTX\n\tibBTC  = Asset(\"ibBTC\")  // Interest Bearing Bitcoin\n\tKNC    = Asset(\"KNC\")    // Kyber Network\n\tLINK   = Asset(\"LINK\")   // Chainlink\n\tMIM    = Asset(\"MIM\")    // Magic Internet Money\n\tREN    = Asset(\"REN\")    // Ren\n\tROOK   = Asset(\"ROOK\")   // KeeperDAO\n\tSUSHI  = Asset(\"SUSHI\")  // Sushiswap\n\tUNI    = Asset(\"UNI\")    // Uniswap\n\tUSDC   = Asset(\"USDC\")   // Circle USD (Ethereum)\n\tUSDT   = Asset(\"USDT\")   // Tether (Ethereum)\n\n\tDAI_Goerli  = Asset(\"DAI_Goerli\")  // Dai (Goerli)\n\tREN_Goerli  = Asset(\"REN_Goerli\")  // Ren (Goerli)\n\tUSDC_Goerli = Asset(\"USDC_Goerli\") // Circle USD (Goerli)\n\tUSDT_Goerli = Asset(\"USDT_Goerli\") // Tether (Goerli)\n\n\tUSDC_Polygon = Asset(\"USDC_Polygon\") // Circle USD (Polygon)\n\tUSDT_Polygon = Asset(\"USDT_Polygon\") // Tether (Polygon)\n\n\t// These assets are defined separately because they are mock assets. These\n\t// assets should only be used for testing.\n\n\tAMOCK1 = Asset(\"AMOCK1\") // Account-based mock asset\n\tAMOCK2 = Asset(\"AMOCK2\") // Account-based mock asset\n\tAMOCK3 = Asset(\"AMOCK3\") // ERC-20 mock token asset on chain AccountMocker1\n\tUMOCK  = Asset(\"UMOCK\")  // UTXO-based mock asset\n)\n\n// AssetType represents the type of asset, whether native-asset of an account\n// chain or a token on an account chain.\ntype AssetType string\n\nconst (\n\t// AssetTypeNative is an identifier for all the native assets of account\n\t// based chains namely. For instance, ETH for Ethereum, BNB for\n\t// BinanceSmartChain.\n\tAssetTypeNative = AssetType(\"NativeAsset\")\n\n\t// AssetTypeToken is an identifier for all tokens (ERC20, BEP20) deployed on\n\t// programmable account-based chains. For instance, REN and USDC are ERC-20\n\t// tokens on Ethereum.\n\tAssetTypeToken = AssetType(\"TokenAsset\")\n)\n\n// SizeHint returns the number of bytes required to represent the asset type in\n// binary.\nfunc (assetType AssetType) SizeHint() int {\n\treturn surge.SizeHintString(string(assetType))\n}\n\n// Marshal the asset type to binary. You should not call this function directly,\n// unless you are implementing marshalling for a container type.\nfunc (assetType AssetType) Marshal(buf []byte, rem int) ([]byte, int, error) {\n\treturn surge.MarshalString(string(assetType), buf, rem)\n}\n\n// Unmarshal the asset type from binary. You should not call this function\n// directly, unless you are implementing unmarshalling for a container type.\nfunc (assetType *AssetType) Unmarshal(buf []byte, rem int) ([]byte, int, error) {\n\treturn surge.UnmarshalString((*string)(assetType), buf, rem)\n}\n\n// OriginChain returns the chain upon which the asset originates. For example,\n// the origin chain of BTC is Bitcoin.\nfunc (asset Asset) OriginChain() Chain {\n\tswitch asset {\n\tcase ArbETH:\n\t\treturn Arbitrum\n\tcase AVAX:\n\t\treturn Avalanche\n\tcase BCH:\n\t\treturn BitcoinCash\n\tcase BNB:\n\t\treturn BinanceSmartChain\n\tcase BTC:\n\t\treturn Bitcoin\n\tcase CAT:\n\t\treturn Catalog\n\tcase DGB:\n\t\treturn DigiByte\n\tcase DOGE:\n\t\treturn Dogecoin\n\tcase ETH:\n\t\treturn Ethereum\n\tcase FIL:\n\t\treturn Filecoin\n\tcase FTM:\n\t\treturn Fantom\n\tcase GETH:\n\t\treturn Goerli\n\tcase GLMR:\n\t\treturn Moonbeam\n\tcase KAVA:\n\t\treturn Kava\n\tcase LUNA:\n\t\treturn Terra\n\tcase MATIC:\n\t\treturn Polygon\n\tcase oETH:\n\t\treturn Optimism\n\tcase SOL:\n\t\treturn Solana\n\tcase ZEC:\n\t\treturn Zcash\n\n\tcase USDC_Avalanche, USDT_Avalanche:\n\t\treturn Avalanche\n\tcase BADGER, BUSD, CRV, DAI, EURT, FTT, ibBTC, KNC, LINK, MIM, REN, ROOK,\n\t\tSUSHI, UNI, USDC, USDT:\n\t\treturn Ethereum\n\tcase DAI_Goerli, REN_Goerli, USDC_Goerli, USDT_Goerli:\n\t\treturn Goerli\n\tcase USDC_Polygon, USDT_Polygon:\n\t\treturn Polygon\n\n\t// These assets are handled separately because they are mock assets. These\n\t// assets should only be used for testing.\n\n\tcase AMOCK1, AMOCK3:\n\t\treturn AccountMocker1\n\tcase AMOCK2:\n\t\treturn AccountMocker2\n\tcase UMOCK:\n\t\treturn UTXOMocker\n\n\tdefault:\n\t\treturn Chain(\"\")\n\t}\n}\n\n// ChainType returns the chain-type (Account or UTXO) for the given asset\nfunc (asset Asset) ChainType() ChainType {\n\tswitch asset {\n\tcase BCH, BTC, DGB, DOGE, ZEC:\n\t\treturn ChainTypeUTXOBased\n\tcase ArbETH, AVAX, BNB, CAT, ETH, FIL, FTM, GETH, GLMR, KAVA, LUNA, MATIC,\n\t\toETH, SOL:\n\t\treturn ChainTypeAccountBased\n\n\tcase USDC_Avalanche, USDT_Avalanche:\n\t\treturn ChainTypeAccountBased\n\tcase BADGER, BUSD, CRV, DAI, EURT, FTT, ibBTC, KNC, LINK, MIM,\n\t\tREN, ROOK, SUSHI, UNI, USDC, USDT:\n\t\treturn ChainTypeAccountBased\n\tcase DAI_Goerli, REN_Goerli, USDC_Goerli, USDT_Goerli:\n\t\treturn ChainTypeAccountBased\n\tcase USDC_Polygon, USDT_Polygon:\n\t\treturn ChainTypeAccountBased\n\n\t// These assets are handled separately because they are mock assets. These\n\t// assets should only be used for testing.\n\n\tcase AMOCK1, AMOCK2, AMOCK3:\n\t\treturn ChainTypeAccountBased\n\tcase UMOCK:\n\t\treturn ChainTypeUTXOBased\n\n\tdefault:\n\t\treturn ChainType(\"\")\n\t}\n}\n\n// Type returns the asset-type (Native or Token) for the given asset.\nfunc (asset Asset) Type() AssetType {\n\tswitch asset {\n\tcase ArbETH, AVAX, BNB, CAT, ETH, FTM, GETH, GLMR, KAVA, MATIC, oETH, SOL:\n\t\treturn AssetTypeNative\n\n\tcase USDC_Avalanche, USDT_Avalanche:\n\t\treturn AssetTypeToken\n\tcase BADGER, BUSD, CRV, DAI, EURT, FTT, ibBTC, KNC, LINK, MIM,\n\t\tREN, ROOK, SUSHI, UNI, USDC, USDT:\n\t\treturn AssetTypeToken\n\tcase DAI_Goerli, REN_Goerli, USDC_Goerli, USDT_Goerli:\n\t\treturn AssetTypeToken\n\tcase USDC_Polygon, USDT_Polygon:\n\t\treturn AssetTypeToken\n\n\t// These assets are handled separately because they are mock assets. These\n\t// assets should only be used for testing.\n\n\tcase AMOCK1, AMOCK2:\n\t\treturn AssetTypeNative\n\tcase AMOCK3:\n\t\treturn AssetTypeToken\n\n\tdefault:\n\t\treturn AssetType(\"\")\n\t}\n}\n\n// SizeHint returns the number of bytes required to represent the asset in\n// binary.\nfunc (asset Asset) SizeHint() int {\n\treturn surge.SizeHintString(string(asset))\n}\n\n// Marshal the asset to binary.\nfunc (asset Asset) Marshal(buf []byte, rem int) ([]byte, int, error) {\n\treturn surge.MarshalString(string(asset), buf, rem)\n}\n\n// Unmarshal the asset from binary.\nfunc (asset *Asset) Unmarshal(buf []byte, rem int) ([]byte, int, error) {\n\treturn surge.UnmarshalString((*string)(asset), buf, rem)\n}\n\n// A Chain uniquely identifies a blockchain using a human-readable string.\ntype Chain string\n\n// Enumeration of supported chains. When introducing a new chain, you must add a\n// human-readable string to this set of enumerated values. Chains must be listed\n// in alphabetical order.\nconst (\n\tArbitrum          = Chain(\"Arbitrum\")\n\tAvalanche         = Chain(\"Avalanche\")\n\tBinanceSmartChain = Chain(\"BinanceSmartChain\")\n\tBitcoin           = Chain(\"Bitcoin\")\n\tBitcoinCash       = Chain(\"BitcoinCash\")\n\tCatalog           = Chain(\"Catalog\")\n\tDigiByte          = Chain(\"DigiByte\")\n\tDogecoin          = Chain(\"Dogecoin\")\n\tEthereum          = Chain(\"Ethereum\")\n\tFantom            = Chain(\"Fantom\")\n\tFilecoin          = Chain(\"Filecoin\")\n\tKava              = Chain(\"Kava\")\n\tMoonbeam          = Chain(\"Moonbeam\")\n\tOptimism          = Chain(\"Optimism\")\n\tPolygon           = Chain(\"Polygon\")\n\tSolana            = Chain(\"Solana\")\n\tTerra             = Chain(\"Terra\")\n\tZcash             = Chain(\"Zcash\")\n\n\tKovan  = Chain(\"Kovan\")\n\tGoerli = Chain(\"Goerli\")\n\n\t// These chains are defined separately because they are mock chains. These\n\t// chains should only be used for testing.\n\n\tAccountMocker1 = Chain(\"AccountMocker1\")\n\tAccountMocker2 = Chain(\"AccountMocker2\")\n\tUTXOMocker     = Chain(\"UTXOMocker\")\n)\n\n// SizeHint returns the number of bytes required to represent the chain in\n// binary.\nfunc (chain Chain) SizeHint() int {\n\treturn surge.SizeHintString(string(chain))\n}\n\n// Marshal the chain to binary. You should not call this function directly,\n// unless you are implementing marshalling for a container type.\nfunc (chain Chain) Marshal(buf []byte, rem int) ([]byte, int, error) {\n\treturn surge.MarshalString(string(chain), buf, rem)\n}\n\n// Unmarshal the chain from binary. You should not call this function directly,\n// unless you are implementing unmarshalling for a container type.\nfunc (chain *Chain) Unmarshal(buf []byte, rem int) ([]byte, int, error) {\n\treturn surge.UnmarshalString((*string)(chain), buf, rem)\n}\n\n// ChainType returns the chain type (whether account-based or utxo-based chain)\n// for the chain.\nfunc (chain Chain) ChainType() ChainType {\n\tswitch chain {\n\tcase Bitcoin, BitcoinCash, DigiByte, Dogecoin, Zcash:\n\t\treturn ChainTypeUTXOBased\n\tcase Avalanche, BinanceSmartChain, Catalog, Ethereum, Arbitrum, Fantom,\n\t\tFilecoin, Kava, Moonbeam, Optimism, Polygon, Solana, Terra:\n\t\treturn ChainTypeAccountBased\n\n\tcase Kovan, Goerli:\n\t\treturn ChainTypeAccountBased\n\n\t// These chains are handled separately because they are mock chains. These\n\t// chains should only be used for testing.\n\n\tcase AccountMocker1, AccountMocker2:\n\t\treturn ChainTypeAccountBased\n\tcase UTXOMocker:\n\t\treturn ChainTypeUTXOBased\n\n\tdefault:\n\t\treturn ChainType(\"\")\n\t}\n}\n\n// IsAccountBased returns true when invoked on an account-based chain, otherwise\n// returns false.\nfunc (chain Chain) IsAccountBased() bool {\n\treturn chain.ChainType() == ChainTypeAccountBased\n}\n\n// IsUTXOBased returns true when invoked on a utxo-based chain, otherwise\n// returns false.\nfunc (chain Chain) IsUTXOBased() bool {\n\treturn chain.ChainType() == ChainTypeUTXOBased\n}\n\n// NativeAsset returns the underlying native asset for a chain. For example, the\n// root asset of Bitcoin chain is BTC.\nfunc (chain Chain) NativeAsset() Asset {\n\tswitch chain {\n\tcase Arbitrum:\n\t\treturn ArbETH\n\tcase Avalanche:\n\t\treturn AVAX\n\tcase BinanceSmartChain:\n\t\treturn BNB\n\tcase BitcoinCash:\n\t\treturn BCH\n\tcase Bitcoin:\n\t\treturn BTC\n\tcase Catalog:\n\t\treturn CAT\n\tcase DigiByte:\n\t\treturn DGB\n\tcase Dogecoin:\n\t\treturn DOGE\n\tcase Ethereum:\n\t\treturn ETH\n\tcase Fantom:\n\t\treturn FTM\n\tcase Filecoin:\n\t\treturn FIL\n\tcase Goerli:\n\t\treturn GETH\n\tcase Kava:\n\t\treturn KAVA\n\tcase Moonbeam:\n\t\treturn GLMR\n\tcase Polygon:\n\t\treturn MATIC\n\tcase Optimism:\n\t\treturn oETH\n\tcase Solana:\n\t\treturn SOL\n\tcase Terra:\n\t\treturn LUNA\n\tcase Zcash:\n\t\treturn ZEC\n\n\t// These chains are handled separately because they are mock chains. These\n\t// chains should only be used for testing.\n\n\tcase AccountMocker1:\n\t\treturn AMOCK1\n\tcase AccountMocker2:\n\t\treturn AMOCK2\n\tcase UTXOMocker:\n\t\treturn UMOCK\n\n\tdefault:\n\t\treturn Asset(\"\")\n\t}\n}\n\n// ChainType represents the type of chain (whether account-based or utxo-based)\ntype ChainType string\n\nconst (\n\t// ChainTypeAccountBased is an identifier for all account-based chains,\n\t// namely, BinanceSmartChain, Ethereum, Filecoin, and so on.\n\tChainTypeAccountBased = ChainType(\"Account\")\n\n\t// ChainTypeUTXOBased is an identifier for all utxo-based chains, namely,\n\t// Bitcoin, BitcoinCash, DigiByte, and so on.\n\tChainTypeUTXOBased = ChainType(\"UTXO\")\n)\n\n// SizeHint returns the number of bytes required to represent the chain type in\n// binary.\nfunc (chainType ChainType) SizeHint() int {\n\treturn surge.SizeHintString(string(chainType))\n}\n\n// Marshal the chain type to binary. You should not call this function directly,\n// unless you are implementing marshalling for a container type.\nfunc (chainType ChainType) Marshal(buf []byte, rem int) ([]byte, int, error) {\n\treturn surge.MarshalString(string(chainType), buf, rem)\n}\n\n// Unmarshal the chain type from binary. You should not call this function\n// directly, unless you are implementing unmarshalling for a container type.\nfunc (chainType *ChainType) Unmarshal(buf []byte, rem int) ([]byte, int, error) {\n\treturn surge.UnmarshalString((*string)(chainType), buf, rem)\n}\n\n// Network identifies the network type for the multichain deployment\ntype Network string\n\nconst (\n\t// NetworkLocalnet represents a local network for chains. It is usually only\n\t// accessible from the device running the network, and is not accessible\n\t// over the Internet.  Chain rules are often slightly different to allow for\n\t// faster block times and easier access to testing funds. This is also\n\t// sometimes referred to as \"regnet\" or \"regression network\". It should only\n\t// be used for local testing.\n\tNetworkLocalnet = Network(\"localnet\")\n\n\t// NetworkDevnet represents the development network for chains. This network\n\t// is typically a deployed version of the localnet. Chain rules are often\n\t// slightly different to allow for faster block times and easier access to\n\t// testing funds.\n\tNetworkDevnet = Network(\"devnet\")\n\n\t// NetworkTestnet represents the test network for chains. This network is\n\t// typically a publicly accessible network that has the same, or very\n\t// similar, chain rules compared to mainnet. Assets on this type of network\n\t// are usually not considered to have value.\n\tNetworkTestnet = Network(\"testnet\")\n\n\t// NetworkMainnet represents the main network for chains.\n\tNetworkMainnet = Network(\"mainnet\")\n)\n\n// SizeHint returns the number of bytes required to represent the network in\n// binary.\nfunc (net Network) SizeHint() int {\n\treturn surge.SizeHintString(string(net))\n}\n\n// Marshal the network to binary. You should not call this function directly,\n// unless you are implementing marshalling for a container type.\nfunc (net Network) Marshal(buf []byte, rem int) ([]byte, int, error) {\n\treturn surge.MarshalString(string(net), buf, rem)\n}\n\n// Unmarshal the network from binary. You should not call this function\n// directly, unless you are implementing unmarshalling for a container type.\nfunc (net *Network) Unmarshal(buf []byte, rem int) ([]byte, int, error) {\n\treturn surge.UnmarshalString((*string)(net), buf, rem)\n}\n"
  },
  {
    "path": "multichain_suite_test.go",
    "content": "package multichain_test\n\nimport (\n\t\"testing\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nfunc TestMultichain(t *testing.T) {\n\tRegisterFailHandler(Fail)\n\tRunSpecs(t, \"Multichain Suite\")\n}\n"
  },
  {
    "path": "multichain_test.go",
    "content": "package multichain_test\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"flag\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"math/big\"\n\t\"math/rand\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"reflect\"\n\t\"strings\"\n\t\"testing/quick\"\n\t\"time\"\n\n\t\"github.com/btcsuite/btcd/btcec\"\n\t\"github.com/btcsuite/btcd/chaincfg\"\n\t\"github.com/btcsuite/btcd/txscript\"\n\t\"github.com/btcsuite/btcutil\"\n\t\"github.com/btcsuite/btcutil/base58\"\n\t\"github.com/btcsuite/btcutil/hdkeychain\"\n\t\"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1\"\n\tcosmossdk \"github.com/cosmos/cosmos-sdk/types\"\n\t\"github.com/ethereum/go-ethereum/accounts/keystore\"\n\t\"github.com/ethereum/go-ethereum/crypto\"\n\tfiladdress \"github.com/filecoin-project/go-address\"\n\tfiltypes \"github.com/filecoin-project/lotus/chain/types\"\n\t\"github.com/renproject/id\"\n\t\"github.com/renproject/multichain\"\n\t\"github.com/renproject/multichain/api/account\"\n\t\"github.com/renproject/multichain/chain/avalanche\"\n\t\"github.com/renproject/multichain/chain/bitcoin\"\n\t\"github.com/renproject/multichain/chain/bitcoincash\"\n\t\"github.com/renproject/multichain/chain/bsc\"\n\t\"github.com/renproject/multichain/chain/dogecoin\"\n\t\"github.com/renproject/multichain/chain/ethereum\"\n\t\"github.com/renproject/multichain/chain/fantom\"\n\t\"github.com/renproject/multichain/chain/filecoin\"\n\t\"github.com/renproject/multichain/chain/polygon\"\n\t\"github.com/renproject/multichain/chain/terra\"\n\t\"github.com/renproject/multichain/chain/zcash\"\n\t\"github.com/renproject/pack\"\n\t\"github.com/renproject/surge\"\n\t\"github.com/tyler-smith/go-bip39\"\n\t\"go.uber.org/zap\"\n\t\"go.uber.org/zap/zapcore\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar (\n\ttestBTC   = flag.Bool(\"btc\", false, \"Pass this flag to test Bitcoin\")\n\ttestBCH   = flag.Bool(\"bch\", false, \"Pass this flag to test Bitcoincash\")\n\ttestDOGE  = flag.Bool(\"doge\", false, \"Pass this flag to test Dogecoin\")\n\ttestFIL   = flag.Bool(\"fil\", false, \"Pass this flag to test Filecoin\")\n\ttestETH   = flag.Bool(\"eth\", false, \"Pass this flag to test Ethereum\")\n\ttestMATIC = flag.Bool(\"matic\", false, \"Pass this flag to test Polygon\")\n\ttestAVAX  = flag.Bool(\"avax\", false, \"Pass this flag to test Avalanche\")\n\ttestBSC   = flag.Bool(\"bsc\", false, \"Pass this flag to test Binance Smart Chain\")\n\ttestFTM   = flag.Bool(\"ftm\", false, \"Pass this flag to test Fantom\")\n\ttestLUNA  = flag.Bool(\"luna\", false, \"Pass this flag to test Terra\")\n\ttestZEC   = flag.Bool(\"zec\", false, \"Pass this flag to test Zcash\")\n)\n\nvar _ = Describe(\"Multichain\", func() {\n\t// new randomness\n\tr := rand.New(rand.NewSource(time.Now().UnixNano()))\n\n\t// Create context to work within.\n\tctx := context.Background()\n\n\t// Initialise the logger.\n\tloggerConfig := zap.NewDevelopmentConfig()\n\tloggerConfig.EncoderConfig.EncodeLevel = zapcore.CapitalColorLevelEncoder\n\tlogger, err := loggerConfig.Build()\n\tExpect(err).ToNot(HaveOccurred())\n\n\t// Populate the test flags by underlying asset chain.\n\ttestFlags := map[multichain.Chain]bool{}\n\ttestFlags[multichain.Bitcoin] = *testBTC\n\ttestFlags[multichain.BitcoinCash] = *testBCH\n\ttestFlags[multichain.Dogecoin] = *testDOGE\n\ttestFlags[multichain.Filecoin] = *testFIL\n\ttestFlags[multichain.Ethereum] = *testETH\n\ttestFlags[multichain.BinanceSmartChain] = *testBSC\n\ttestFlags[multichain.Polygon] = *testMATIC\n\ttestFlags[multichain.Avalanche] = *testAVAX\n\ttestFlags[multichain.Fantom] = *testFTM\n\ttestFlags[multichain.Terra] = *testLUNA\n\ttestFlags[multichain.Zcash] = *testZEC\n\n\t//\n\t// Multichain Configs\n\t//\n\tContext(\"Multichain Declarations\", func() {\n\t\tContext(\"All supporting chains/assets are declared\", func() {\n\t\t\taccountChains := []struct {\n\t\t\t\tchain multichain.Chain\n\t\t\t\tasset multichain.Asset\n\t\t\t}{\n\t\t\t\t{\n\t\t\t\t\tmultichain.Arbitrum,\n\t\t\t\t\tmultichain.ArbETH,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmultichain.Avalanche,\n\t\t\t\t\tmultichain.AVAX,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmultichain.Fantom,\n\t\t\t\t\tmultichain.FTM,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmultichain.Filecoin,\n\t\t\t\t\tmultichain.FIL,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmultichain.Ethereum,\n\t\t\t\t\tmultichain.ETH,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmultichain.BinanceSmartChain,\n\t\t\t\t\tmultichain.BNB,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmultichain.Moonbeam,\n\t\t\t\t\tmultichain.GLMR,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmultichain.Polygon,\n\t\t\t\t\tmultichain.MATIC,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmultichain.Solana,\n\t\t\t\t\tmultichain.SOL,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmultichain.Terra,\n\t\t\t\t\tmultichain.LUNA,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmultichain.Goerli,\n\t\t\t\t\tmultichain.GETH,\n\t\t\t\t},\n\t\t\t}\n\t\t\tutxoChains := []struct {\n\t\t\t\tchain multichain.Chain\n\t\t\t\tasset multichain.Asset\n\t\t\t}{\n\t\t\t\t{\n\t\t\t\t\tmultichain.Bitcoin,\n\t\t\t\t\tmultichain.BTC,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmultichain.BitcoinCash,\n\t\t\t\t\tmultichain.BCH,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmultichain.DigiByte,\n\t\t\t\t\tmultichain.DGB,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmultichain.Dogecoin,\n\t\t\t\t\tmultichain.DOGE,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmultichain.Zcash,\n\t\t\t\t\tmultichain.ZEC,\n\t\t\t\t},\n\t\t\t}\n\n\t\t\tfor _, accountChain := range accountChains {\n\t\t\t\taccountChain := accountChain\n\t\t\t\tSpecify(fmt.Sprintf(\"Chain=%v, Asset=%v should be supported\", accountChain.chain, accountChain.asset), func() {\n\t\t\t\t\tExpect(accountChain.chain.IsAccountBased()).To(BeTrue())\n\t\t\t\t\tExpect(accountChain.chain.ChainType()).To(Equal(multichain.ChainTypeAccountBased))\n\t\t\t\t\tExpect(accountChain.chain.NativeAsset()).To(Equal(accountChain.asset))\n\t\t\t\t\tExpect(accountChain.asset.ChainType()).To(Equal(multichain.ChainTypeAccountBased))\n\t\t\t\t\tExpect(accountChain.asset.OriginChain()).To(Equal(accountChain.chain))\n\t\t\t\t})\n\t\t\t}\n\t\t\tfor _, utxoChain := range utxoChains {\n\t\t\t\tutxoChain := utxoChain\n\t\t\t\tSpecify(fmt.Sprintf(\"Chain=%v, Asset=%v should be supported\", utxoChain.chain, utxoChain.asset), func() {\n\t\t\t\t\tExpect(utxoChain.chain.IsUTXOBased()).To(BeTrue())\n\t\t\t\t\tExpect(utxoChain.chain.ChainType()).To(Equal(multichain.ChainTypeUTXOBased))\n\t\t\t\t\tExpect(utxoChain.chain.NativeAsset()).To(Equal(utxoChain.asset))\n\t\t\t\t\tExpect(utxoChain.asset.ChainType()).To(Equal(multichain.ChainTypeUTXOBased))\n\t\t\t\t\tExpect(utxoChain.asset.OriginChain()).To(Equal(utxoChain.chain))\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\n\t\tContext(\"Assets are declared appropriately\", func() {\n\t\t\tnativeAssets := []multichain.Asset{\n\t\t\t\tmultichain.ArbETH, multichain.AVAX, multichain.BNB, multichain.ETH,\n\t\t\t\tmultichain.FTM, multichain.GLMR, multichain.MATIC, multichain.SOL,\n\t\t\t}\n\t\t\ttokenAssets := []struct {\n\t\t\t\tasset multichain.Asset\n\t\t\t\tchain multichain.Chain\n\t\t\t}{\n\t\t\t\t{\n\t\t\t\t\tmultichain.DAI,\n\t\t\t\t\tmultichain.Ethereum,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmultichain.REN,\n\t\t\t\t\tmultichain.Ethereum,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmultichain.USDC,\n\t\t\t\t\tmultichain.Ethereum,\n\t\t\t\t},\n\t\t\t}\n\n\t\t\tfor _, asset := range nativeAssets {\n\t\t\t\tasset := asset\n\t\t\t\tSpecify(fmt.Sprintf(\"Asset=%v should be supported\", asset), func() {\n\t\t\t\t\tExpect(asset.Type()).To(Equal(multichain.AssetTypeNative))\n\t\t\t\t})\n\t\t\t}\n\t\t\tfor _, asset := range tokenAssets {\n\t\t\t\tasset := asset\n\t\t\t\tSpecify(fmt.Sprintf(\"Asset=%v should be supported\", asset.asset), func() {\n\t\t\t\t\tExpect(asset.asset.Type()).To(Equal(multichain.AssetTypeToken))\n\t\t\t\t\tExpect(asset.asset.OriginChain()).To(Equal(asset.chain))\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\t})\n\n\t//\n\t// ADDRESS API\n\t//\n\tContext(\"Address API\", func() {\n\t\tchainTable := []struct {\n\t\t\tchain            multichain.Chain\n\t\t\tnewEncodeDecoder func() multichain.AddressEncodeDecoder\n\t\t\tnewAddress       func() multichain.Address\n\t\t\tnewRawAddress    func() multichain.RawAddress\n\t\t\tnewSHAddress     func() multichain.Address\n\t\t\tnewSHRawAddress  func() multichain.RawAddress\n\t\t}{\n\t\t\t{\n\t\t\t\tmultichain.Bitcoin,\n\t\t\t\tfunc() multichain.AddressEncodeDecoder {\n\t\t\t\t\taddrEncodeDecoder := bitcoin.NewAddressEncodeDecoder(&chaincfg.RegressionNetParams)\n\t\t\t\t\treturn addrEncodeDecoder\n\t\t\t\t},\n\t\t\t\tfunc() multichain.Address {\n\t\t\t\t\t// Generate a random SECP256K1 private key.\n\t\t\t\t\tpk := id.NewPrivKey()\n\t\t\t\t\t// Get bitcoin WIF private key with the pub key configured to be in\n\t\t\t\t\t// the compressed form.\n\t\t\t\t\twif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), &chaincfg.RegressionNetParams, true)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\taddrPubKeyHash, err := btcutil.NewAddressPubKeyHash(btcutil.Hash160(wif.SerializePubKey()), &chaincfg.RegressionNetParams)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t// Return the human-readable encoded bitcoin address in base58 format.\n\t\t\t\t\treturn multichain.Address(addrPubKeyHash.EncodeAddress())\n\t\t\t\t},\n\t\t\t\tfunc() multichain.RawAddress {\n\t\t\t\t\t// Generate a random SECP256K1 private key.\n\t\t\t\t\tpk := id.NewPrivKey()\n\t\t\t\t\t// Get bitcoin WIF private key with the pub key configured to be in\n\t\t\t\t\t// the compressed form.\n\t\t\t\t\twif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), &chaincfg.RegressionNetParams, true)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t// Get the address pubKey hash. This is the most commonly used format\n\t\t\t\t\t// for a bitcoin address.\n\t\t\t\t\taddrPubKeyHash, err := btcutil.NewAddressPubKeyHash(btcutil.Hash160(wif.SerializePubKey()), &chaincfg.RegressionNetParams)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t// Encode into the checksummed base58 format.\n\t\t\t\t\tencoded := addrPubKeyHash.EncodeAddress()\n\t\t\t\t\treturn multichain.RawAddress(pack.Bytes(base58.Decode(encoded)))\n\t\t\t\t},\n\t\t\t\tfunc() multichain.Address {\n\t\t\t\t\t// Random bytes of script.\n\t\t\t\t\tscript := make([]byte, r.Intn(100))\n\t\t\t\t\tr.Read(script)\n\t\t\t\t\t// Create address script hash from the random script bytes.\n\t\t\t\t\taddrScriptHash, err := btcutil.NewAddressScriptHash(script, &chaincfg.RegressionNetParams)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t// Return in human-readable encoded form.\n\t\t\t\t\treturn multichain.Address(addrScriptHash.EncodeAddress())\n\t\t\t\t},\n\t\t\t\tfunc() multichain.RawAddress {\n\t\t\t\t\t// Random bytes of script.\n\t\t\t\t\tscript := make([]byte, r.Intn(100))\n\t\t\t\t\tr.Read(script)\n\t\t\t\t\t// Create address script hash from the random script bytes.\n\t\t\t\t\taddrScriptHash, err := btcutil.NewAddressScriptHash(script, &chaincfg.RegressionNetParams)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t// Encode to the checksummed base58 format.\n\t\t\t\t\tencoded := addrScriptHash.EncodeAddress()\n\t\t\t\t\treturn multichain.RawAddress(pack.Bytes(base58.Decode(encoded)))\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tmultichain.Filecoin,\n\t\t\t\tfunc() multichain.AddressEncodeDecoder {\n\t\t\t\t\treturn filecoin.NewAddressEncodeDecoder()\n\t\t\t\t},\n\t\t\t\tfunc() multichain.Address {\n\t\t\t\t\tpubKey := make([]byte, 64)\n\t\t\t\t\tr.Read(pubKey)\n\t\t\t\t\taddr, err := filaddress.NewSecp256k1Address(pubKey)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\treturn multichain.Address(addr.String())\n\t\t\t\t},\n\t\t\t\tfunc() multichain.RawAddress {\n\t\t\t\t\trawAddr := make([]byte, 20)\n\t\t\t\t\tr.Read(rawAddr)\n\t\t\t\t\tformattedRawAddr := append([]byte{byte(filaddress.SECP256K1)}, rawAddr[:]...)\n\t\t\t\t\treturn multichain.RawAddress(pack.NewBytes(formattedRawAddr[:]))\n\t\t\t\t},\n\t\t\t\tfunc() multichain.Address {\n\t\t\t\t\treturn multichain.Address(\"\")\n\t\t\t\t},\n\t\t\t\tfunc() multichain.RawAddress {\n\t\t\t\t\treturn multichain.RawAddress([]byte{})\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tmultichain.Terra,\n\t\t\t\tfunc() multichain.AddressEncodeDecoder {\n\t\t\t\t\treturn terra.NewAddressEncodeDecoder()\n\t\t\t\t},\n\t\t\t\tfunc() multichain.Address {\n\t\t\t\t\tpk := secp256k1.GenPrivKey()\n\t\t\t\t\taddr := cosmossdk.AccAddress(pk.PubKey().Address())\n\t\t\t\t\treturn multichain.Address(addr.String())\n\t\t\t\t},\n\t\t\t\tfunc() multichain.RawAddress {\n\t\t\t\t\tpk := secp256k1.GenPrivKey()\n\t\t\t\t\trawAddr := pk.PubKey().Address()\n\t\t\t\t\treturn multichain.RawAddress(pack.Bytes(rawAddr))\n\t\t\t\t},\n\t\t\t\tfunc() multichain.Address {\n\t\t\t\t\treturn multichain.Address(\"\")\n\t\t\t\t},\n\t\t\t\tfunc() multichain.RawAddress {\n\t\t\t\t\treturn multichain.RawAddress([]byte{})\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tmultichain.BitcoinCash,\n\t\t\t\tfunc() multichain.AddressEncodeDecoder {\n\t\t\t\t\taddrEncodeDecoder := bitcoincash.NewAddressEncodeDecoder(&chaincfg.RegressionNetParams)\n\t\t\t\t\treturn addrEncodeDecoder\n\t\t\t\t},\n\t\t\t\tfunc() multichain.Address {\n\t\t\t\t\tpk := id.NewPrivKey()\n\t\t\t\t\twif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), &chaincfg.RegressionNetParams, true)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\taddrPubKeyHash, err := bitcoincash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &chaincfg.RegressionNetParams)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\treturn multichain.Address(addrPubKeyHash.EncodeAddress())\n\t\t\t\t},\n\t\t\t\tfunc() multichain.RawAddress {\n\t\t\t\t\tpk := id.NewPrivKey()\n\t\t\t\t\twif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), &chaincfg.RegressionNetParams, true)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\taddrPubKeyHash, err := bitcoincash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &chaincfg.RegressionNetParams)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\t\taddrBytes := addrPubKeyHash.ScriptAddress()\n\t\t\t\t\taddrBytes = append([]byte{0x00}, addrBytes...)\n\t\t\t\t\treturn multichain.RawAddress(pack.Bytes(addrBytes))\n\t\t\t\t},\n\t\t\t\tfunc() multichain.Address {\n\t\t\t\t\tscript := make([]byte, r.Intn(100))\n\t\t\t\t\tr.Read(script)\n\t\t\t\t\taddrScriptHash, err := bitcoincash.NewAddressScriptHash(script, &chaincfg.RegressionNetParams)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\treturn multichain.Address(addrScriptHash.EncodeAddress())\n\t\t\t\t},\n\t\t\t\tfunc() multichain.RawAddress {\n\t\t\t\t\tscript := make([]byte, r.Intn(100))\n\t\t\t\t\tr.Read(script)\n\t\t\t\t\taddrScriptHash, err := bitcoincash.NewAddressScriptHash(script, &chaincfg.RegressionNetParams)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\t\taddrBytes := addrScriptHash.ScriptAddress()\n\t\t\t\t\taddrBytes = append([]byte{8}, addrBytes...)\n\t\t\t\t\treturn multichain.RawAddress(pack.Bytes(addrBytes))\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tmultichain.Zcash,\n\t\t\t\tfunc() multichain.AddressEncodeDecoder {\n\t\t\t\t\taddrEncodeDecoder := zcash.NewAddressEncodeDecoder(&zcash.RegressionNetParams)\n\t\t\t\t\treturn addrEncodeDecoder\n\t\t\t\t},\n\t\t\t\tfunc() multichain.Address {\n\t\t\t\t\tpk := id.NewPrivKey()\n\t\t\t\t\twif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), zcash.RegressionNetParams.Params, true)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\taddrPubKeyHash, err := zcash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &zcash.RegressionNetParams)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\treturn multichain.Address(addrPubKeyHash.EncodeAddress())\n\t\t\t\t},\n\t\t\t\tfunc() multichain.RawAddress {\n\t\t\t\t\tpk := id.NewPrivKey()\n\t\t\t\t\twif, err := btcutil.NewWIF((*btcec.PrivateKey)(pk), zcash.RegressionNetParams.Params, true)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\taddrPubKeyHash, err := zcash.NewAddressPubKeyHash(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()), &zcash.RegressionNetParams)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\treturn multichain.RawAddress(pack.Bytes(base58.Decode(addrPubKeyHash.EncodeAddress())))\n\t\t\t\t},\n\t\t\t\tfunc() multichain.Address {\n\t\t\t\t\tscript := make([]byte, r.Intn(100))\n\t\t\t\t\tr.Read(script)\n\t\t\t\t\taddrScriptHash, err := zcash.NewAddressScriptHash(script, &zcash.RegressionNetParams)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\treturn multichain.Address(addrScriptHash.EncodeAddress())\n\t\t\t\t},\n\t\t\t\tfunc() multichain.RawAddress {\n\t\t\t\t\tscript := make([]byte, r.Intn(100))\n\t\t\t\t\tr.Read(script)\n\t\t\t\t\taddrScriptHash, err := zcash.NewAddressScriptHash(script, &zcash.RegressionNetParams)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\treturn multichain.RawAddress(pack.Bytes(base58.Decode(addrScriptHash.EncodeAddress())))\n\t\t\t\t},\n\t\t\t},\n\t\t}\n\n\t\tfor _, chain := range chainTable {\n\t\t\tchain := chain\n\t\t\tContext(fmt.Sprintf(\"%v\", chain.chain), func() {\n\t\t\t\tencodeDecoder := chain.newEncodeDecoder()\n\n\t\t\t\tIt(\"should encode a raw address correctly\", func() {\n\t\t\t\t\trawAddr := chain.newRawAddress()\n\t\t\t\t\tencodedAddr, err := encodeDecoder.EncodeAddress(rawAddr)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tdecodedRawAddr, err := encodeDecoder.DecodeAddress(encodedAddr)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tExpect(decodedRawAddr).To(Equal(rawAddr))\n\t\t\t\t})\n\n\t\t\t\tIt(\"should decode an address correctly\", func() {\n\t\t\t\t\taddr := chain.newAddress()\n\t\t\t\t\tdecodedRawAddr, err := encodeDecoder.DecodeAddress(addr)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tencodedAddr, err := encodeDecoder.EncodeAddress(decodedRawAddr)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tExpect(encodedAddr).To(Equal(addr))\n\t\t\t\t})\n\n\t\t\t\tif chain.chain.IsUTXOBased() {\n\t\t\t\t\tIt(\"should encoded a raw script address correctly\", func() {\n\t\t\t\t\t\trawScriptAddr := chain.newSHRawAddress()\n\t\t\t\t\t\tencodedAddr, err := encodeDecoder.EncodeAddress(rawScriptAddr)\n\t\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t\tdecodedRawAddr, err := encodeDecoder.DecodeAddress(encodedAddr)\n\t\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t\tExpect(decodedRawAddr).To(Equal(rawScriptAddr))\n\t\t\t\t\t})\n\n\t\t\t\t\tIt(\"should decode a script address correctly\", func() {\n\t\t\t\t\t\tscriptAddr := chain.newSHAddress()\n\t\t\t\t\t\tdecodedRawAddr, err := encodeDecoder.DecodeAddress(scriptAddr)\n\t\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t\tencodedAddr, err := encodeDecoder.EncodeAddress(decodedRawAddr)\n\t\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t\tExpect(encodedAddr).To(Equal(scriptAddr))\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tif chain.chain == multichain.Bitcoin {\n\t\t\t\t\tmainnetEncodeDecoder := bitcoin.NewAddressEncodeDecoder(&chaincfg.MainNetParams)\n\n\t\t\t\t\tIt(\"should decode a Bech32 address correctly\", func() {\n\t\t\t\t\t\tsegwitAddrs := []string{\n\t\t\t\t\t\t\t\"bc1qp3gcp95e85rupv9zgj57j0lvsqnzcehawzaax3\",\n\t\t\t\t\t\t\t\"bc1qh6fjfx39ae4ahvusc4eggyrwjm65zyu83mzwlx\",\n\t\t\t\t\t\t\t\"bc1q3zqxadsagdwjp2fpddn8dk5ge8lf0nn0p750ar\",\n\t\t\t\t\t\t\t\"bc1q2lthuszmh0mynte4nzsfqtjjseu6fdrmeffr62\",\n\t\t\t\t\t\t\t\"bc1qdqkfrt2hpgncqwut88809he6wxysfw8w3cgsh4\",\n\t\t\t\t\t\t\t\"bc1qna5zwwuqcst3dqqx8rmwa66jpa45w28tlypg54\",\n\t\t\t\t\t\t\t\"bc1qjk2ytl6uctuxfsyf8dn6ptwfsthfat4hd78l0m\",\n\t\t\t\t\t\t\t\"bc1qyg6zhg9dhmkj0wz4svsdz6g0ujll225v0wc5hx\",\n\t\t\t\t\t\t\t\"bc1quvtmmjccre6plqslujw7qcy820fycg2q2a73an\",\n\t\t\t\t\t\t\t\"bc1qztxl2qc3k90uud846qfeawqzz3aedhq48vv3lu\",\n\t\t\t\t\t\t\t\"bc1qvkknfkfhfr0axql478klvjs6sanwj6njym5wf2\",\n\t\t\t\t\t\t\t\"bc1qya5t2pj7hqpezcnwh72k69h4cgg3srqwtd0e6w\",\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor _, segwitAddr := range segwitAddrs {\n\t\t\t\t\t\t\tdecodedRawAddr, err := mainnetEncodeDecoder.DecodeAddress(multichain.Address(segwitAddr))\n\t\t\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t\t\tencodedAddr, err := mainnetEncodeDecoder.EncodeAddress(decodedRawAddr)\n\t\t\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t\t\tExpect(string(encodedAddr)).To(Equal(segwitAddr))\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\n\t\t\t\t\tIt(\"should encode a Bech32 address correctly\", func() {\n\t\t\t\t\t\tloop := func() bool {\n\t\t\t\t\t\t\tl := 21\n\t\t\t\t\t\t\tif r.Intn(2) == 1 {\n\t\t\t\t\t\t\t\tl = 33\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\trandBytes := make([]byte, l)\n\t\t\t\t\t\t\tr.Read(randBytes)\n\t\t\t\t\t\t\trandBytes[0] = byte(0)\n\t\t\t\t\t\t\trawAddr := multichain.RawAddress(randBytes)\n\t\t\t\t\t\t\tencodedAddr, err := mainnetEncodeDecoder.EncodeAddress(rawAddr)\n\t\t\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t\t\tdecodedRawAddr, err := mainnetEncodeDecoder.DecodeAddress(encodedAddr)\n\t\t\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t\t\tExpect(decodedRawAddr).To(Equal(rawAddr))\n\t\t\t\t\t\t\treturn true\n\t\t\t\t\t\t}\n\t\t\t\t\t\tExpect(quick.Check(loop, nil)).To(Succeed())\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t})\n\n\t//\n\t// ACCOUNT API\n\t//\n\tContext(\"Account API\", func() {\n\t\taccountChainTable := []struct {\n\t\t\tsenderEnv           func() (id.PrivKey, *id.PubKey, multichain.Address)\n\t\t\tprivKeyToAddr       func(pk id.PrivKey) multichain.Address\n\t\t\trpcURL              pack.String\n\t\t\trandomRecipientAddr func() multichain.Address\n\t\t\tinitialise          func(pack.String) (multichain.AccountClient, multichain.AccountTxBuilder)\n\t\t\ttxParams            func(multichain.AccountClient) (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes)\n\t\t\tchain               multichain.Chain\n\t\t}{\n\t\t\t{\n\t\t\t\tfunc() (id.PrivKey, *id.PubKey, multichain.Address) {\n\t\t\t\t\tmnemonic := os.Getenv(\"ETHEREUM_MNEMONIC\")\n\t\t\t\t\tif mnemonic == \"\" {\n\t\t\t\t\t\tpanic(\"ETHEREUM_MNEMONIC is undefined\")\n\t\t\t\t\t}\n\t\t\t\t\tconst ZERO uint32 = 0x80000000\n\t\t\t\t\tpath := []uint32{ZERO + 44, ZERO + 60, ZERO, 0, 0}\n\t\t\t\t\tpath[len(path)-1] = uint32(0)\n\t\t\t\t\tseed := bip39.NewSeed(mnemonic, \"\")\n\t\t\t\t\tkey, err := hdkeychain.NewMaster(seed, &chaincfg.MainNetParams)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tfor _, val := range path {\n\t\t\t\t\t\tkey, err = key.DeriveNonStandard(val)\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tprivKey, err := key.ECPrivKey()\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t}\n\n\t\t\t\t\tnewKey := privKey.ToECDSA()\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tpk := (*id.PrivKey)(newKey)\n\t\t\t\t\taddress := multichain.Address(crypto.PubkeyToAddress(pk.PublicKey).Hex())\n\t\t\t\t\treturn *pk, pk.PubKey(), address\n\t\t\t\t},\n\t\t\t\tfunc(privKey id.PrivKey) multichain.Address {\n\t\t\t\t\treturn multichain.Address(crypto.PubkeyToAddress(privKey.PublicKey).Hex())\n\t\t\t\t},\n\t\t\t\tethereum.DefaultClientRPCURL,\n\t\t\t\tfunc() multichain.Address {\n\t\t\t\t\trecipientKey := id.NewPrivKey()\n\t\t\t\t\treturn multichain.Address(crypto.PubkeyToAddress(recipientKey.PublicKey).Hex())\n\t\t\t\t},\n\t\t\t\tfunc(rpcURL pack.String) (multichain.AccountClient, multichain.AccountTxBuilder) {\n\t\t\t\t\tclient, err := ethereum.NewClient(string(rpcURL), big.NewInt(1337))\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\ttxBuilder := ethereum.NewTxBuilder(big.NewInt(1337))\n\n\t\t\t\t\treturn client, txBuilder\n\t\t\t\t},\n\t\t\t\tfunc(_ multichain.AccountClient) (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) {\n\t\t\t\t\tamount := pack.NewU256FromU64(pack.U64(2000000))\n\t\t\t\t\tgasLimit := pack.NewU256FromU64(pack.U64(1000000))\n\t\t\t\t\tgasPrice := pack.NewU256FromU64(pack.U64(3000000000))\n\t\t\t\t\tgasCap := pack.NewU256FromU64(pack.U64(100000000000))\n\t\t\t\t\tpayload := pack.NewBytes([]byte(\"multichain\"))\n\t\t\t\t\treturn amount, gasLimit, gasPrice, gasCap, payload\n\t\t\t\t},\n\t\t\t\tmultichain.Ethereum,\n\t\t\t},\n\t\t\t{\n\t\t\t\tfunc() (id.PrivKey, *id.PubKey, multichain.Address) {\n\t\t\t\t\tkeyPath := filepath.Join(\".\", \"infra\", \"polygon\", \"json-keystore\")\n\t\t\t\t\tkeyjson, err := ioutil.ReadFile(fmt.Sprintf(\"%v\", keyPath))\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tpassword := \"password0\"\n\t\t\t\t\tkeyStoreKey, err := keystore.DecryptKey(keyjson, password)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tnewKey := keyStoreKey.PrivateKey\n\t\t\t\t\tpk := (*id.PrivKey)(newKey)\n\t\t\t\t\taddress := multichain.Address(crypto.PubkeyToAddress(pk.PublicKey).Hex())\n\t\t\t\t\treturn *pk, pk.PubKey(), address\n\t\t\t\t},\n\t\t\t\tfunc(privKey id.PrivKey) multichain.Address {\n\t\t\t\t\treturn multichain.Address(crypto.PubkeyToAddress(privKey.PublicKey).Hex())\n\t\t\t\t},\n\t\t\t\tpolygon.DefaultClientRPCURL,\n\t\t\t\tfunc() multichain.Address {\n\t\t\t\t\trecipientKey := id.NewPrivKey()\n\t\t\t\t\treturn multichain.Address(crypto.PubkeyToAddress(recipientKey.PublicKey).Hex())\n\t\t\t\t},\n\t\t\t\tfunc(rpcURL pack.String) (multichain.AccountClient, multichain.AccountTxBuilder) {\n\t\t\t\t\tclient, err := polygon.NewClient(string(rpcURL), big.NewInt(15001))\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\ttxBuilder := polygon.NewTxBuilder(big.NewInt(15001))\n\n\t\t\t\t\treturn client, txBuilder\n\t\t\t\t},\n\t\t\t\tfunc(_ multichain.AccountClient) (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) {\n\t\t\t\t\tamount := pack.NewU256FromU64(pack.U64(2000000))\n\t\t\t\t\tgasLimit := pack.NewU256FromU64(pack.U64(1000000))\n\t\t\t\t\tgasPrice := pack.NewU256FromU64(pack.U64(1000000000000))\n\t\t\t\t\tgasCap := pack.NewU256FromInt(gasPrice.Int())\n\t\t\t\t\tpayload := pack.NewBytes([]byte(\"multichain\"))\n\t\t\t\t\treturn amount, gasLimit, gasPrice, gasCap, payload\n\t\t\t\t},\n\t\t\t\tmultichain.Polygon,\n\t\t\t},\n\t\t\t{\n\t\t\t\tfunc() (id.PrivKey, *id.PubKey, multichain.Address) {\n\t\t\t\t\tmnemonic := os.Getenv(\"BINANCE_MNEMONIC\")\n\t\t\t\t\tif mnemonic == \"\" {\n\t\t\t\t\t\tpanic(\"BINANCE_MNEMONIC is undefined\")\n\t\t\t\t\t}\n\t\t\t\t\tconst ZERO uint32 = 0x80000000\n\t\t\t\t\tpath := []uint32{ZERO + 44, ZERO + 60, ZERO, 0, 0}\n\t\t\t\t\tpath[len(path)-1] = uint32(0)\n\t\t\t\t\tseed := bip39.NewSeed(mnemonic, \"\")\n\t\t\t\t\tkey, err := hdkeychain.NewMaster(seed, &chaincfg.MainNetParams)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tfor _, val := range path {\n\t\t\t\t\t\tkey, err = key.DeriveNonStandard(val)\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tprivKey, err := key.ECPrivKey()\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t}\n\n\t\t\t\t\tnewKey := privKey.ToECDSA()\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tpk := (*id.PrivKey)(newKey)\n\t\t\t\t\taddress := multichain.Address(crypto.PubkeyToAddress(pk.PublicKey).Hex())\n\t\t\t\t\treturn *pk, pk.PubKey(), address\n\t\t\t\t},\n\t\t\t\tfunc(privKey id.PrivKey) multichain.Address {\n\t\t\t\t\treturn multichain.Address(crypto.PubkeyToAddress(privKey.PublicKey).Hex())\n\t\t\t\t},\n\t\t\t\tbsc.DefaultClientRPCURL,\n\t\t\t\tfunc() multichain.Address {\n\t\t\t\t\trecipientKey := id.NewPrivKey()\n\t\t\t\t\treturn multichain.Address(crypto.PubkeyToAddress(recipientKey.PublicKey).Hex())\n\t\t\t\t},\n\t\t\t\tfunc(rpcURL pack.String) (multichain.AccountClient, multichain.AccountTxBuilder) {\n\t\t\t\t\tclient, err := bsc.NewClient(string(rpcURL), big.NewInt(420))\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\ttxBuilder := bsc.NewTxBuilder(big.NewInt(420))\n\n\t\t\t\t\treturn client, txBuilder\n\t\t\t\t},\n\t\t\t\tfunc(_ multichain.AccountClient) (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) {\n\t\t\t\t\tamount := pack.NewU256FromU64(pack.U64(2000000))\n\t\t\t\t\tgasLimit := pack.NewU256FromU64(pack.U64(100000))\n\t\t\t\t\tgasPrice := pack.NewU256FromU64(pack.U64(1))\n\t\t\t\t\tgasCap := pack.NewU256FromInt(gasPrice.Int())\n\t\t\t\t\tpayload := pack.NewBytes([]byte(\"multichain\"))\n\t\t\t\t\treturn amount, gasLimit, gasPrice, gasCap, payload\n\t\t\t\t},\n\t\t\t\tmultichain.BinanceSmartChain,\n\t\t\t},\n\t\t\t{\n\t\t\t\tfunc() (id.PrivKey, *id.PubKey, multichain.Address) {\n\t\t\t\t\tpk := os.Getenv(\"C_AVAX_PK\")\n\t\t\t\t\tif pk == \"\" {\n\t\t\t\t\t\tpanic(\"C_AVAX_PK is undefined\")\n\t\t\t\t\t}\n\t\t\t\t\tpk = strings.TrimPrefix(pk, \"0x\")\n\t\t\t\t\tkey, err := crypto.HexToECDSA(pk)\n\t\t\t\t\tprivKey := (*id.PrivKey)(key)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\taddress := multichain.Address(crypto.PubkeyToAddress(privKey.PublicKey).Hex())\n\t\t\t\t\treturn *privKey, privKey.PubKey(), address\n\t\t\t\t},\n\t\t\t\tfunc(privKey id.PrivKey) multichain.Address {\n\t\t\t\t\treturn multichain.Address(crypto.PubkeyToAddress(privKey.PublicKey).Hex())\n\t\t\t\t},\n\t\t\t\tavalanche.DefaultClientRPCURL,\n\t\t\t\tfunc() multichain.Address {\n\t\t\t\t\trecipientKey := id.NewPrivKey()\n\t\t\t\t\treturn multichain.Address(crypto.PubkeyToAddress(recipientKey.PublicKey).Hex())\n\t\t\t\t},\n\t\t\t\tfunc(rpcURL pack.String) (multichain.AccountClient, multichain.AccountTxBuilder) {\n\t\t\t\t\tclient, err := avalanche.NewClient(string(rpcURL), big.NewInt(43112))\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\ttxBuilder := avalanche.NewTxBuilder(big.NewInt(43112))\n\t\t\t\t\treturn client, txBuilder\n\t\t\t\t},\n\t\t\t\tfunc(_ multichain.AccountClient) (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) {\n\t\t\t\t\tamount := pack.NewU256FromU64(pack.U64(1))\n\t\t\t\t\tgasLimit := pack.NewU256FromU64(pack.U64(100000))\n\t\t\t\t\tgasPrice := pack.NewU256FromU64(pack.U64(225000000000))\n\t\t\t\t\tgasCap := pack.NewU256FromInt(gasPrice.Int())\n\t\t\t\t\tpayload := pack.NewBytes([]byte(\"\"))\n\t\t\t\t\treturn amount, gasLimit, gasPrice, gasCap, payload\n\t\t\t\t},\n\t\t\t\tmultichain.Avalanche,\n\t\t\t},\n\t\t\t{\n\t\t\t\tfunc() (id.PrivKey, *id.PubKey, multichain.Address) {\n\t\t\t\t\tpk := os.Getenv(\"FANTOM_PK\")\n\t\t\t\t\tif pk == \"\" {\n\t\t\t\t\t\tpanic(\"FANTOM_PK is undefined\")\n\t\t\t\t\t}\n\t\t\t\t\tkey, err := crypto.HexToECDSA(pk)\n\t\t\t\t\tprivKey := (*id.PrivKey)(key)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\taddress := multichain.Address(crypto.PubkeyToAddress(privKey.PublicKey).Hex())\n\t\t\t\t\treturn *privKey, privKey.PubKey(), address\n\t\t\t\t},\n\t\t\t\tfunc(privKey id.PrivKey) multichain.Address {\n\t\t\t\t\treturn multichain.Address(crypto.PubkeyToAddress(privKey.PublicKey).Hex())\n\t\t\t\t},\n\t\t\t\tfantom.DefaultClientRPCURL,\n\t\t\t\tfunc() multichain.Address {\n\t\t\t\t\trecipientKey := id.NewPrivKey()\n\t\t\t\t\treturn multichain.Address(crypto.PubkeyToAddress(recipientKey.PublicKey).Hex())\n\t\t\t\t},\n\t\t\t\tfunc(rpcURL pack.String) (multichain.AccountClient, multichain.AccountTxBuilder) {\n\t\t\t\t\tclient, err := fantom.NewClient(string(rpcURL), big.NewInt(4003))\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\ttxBuilder := fantom.NewTxBuilder(big.NewInt(4003))\n\n\t\t\t\t\treturn client, txBuilder\n\t\t\t\t},\n\t\t\t\tfunc(_ multichain.AccountClient) (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) {\n\t\t\t\t\tamount := pack.NewU256FromU64(pack.U64(2000000))\n\t\t\t\t\tgasLimit := pack.NewU256FromU64(pack.U64(1000000))\n\t\t\t\t\tgasPrice := pack.NewU256FromU64(pack.U64(1000000000))\n\t\t\t\t\tgasCap := pack.NewU256FromInt(gasPrice.Int())\n\t\t\t\t\tpayload := pack.NewBytes([]byte(\"multichain\"))\n\t\t\t\t\treturn amount, gasLimit, gasPrice, gasCap, payload\n\t\t\t\t},\n\t\t\t\tmultichain.Fantom,\n\t\t\t},\n\t\t\t{\n\t\t\t\tsenderEnv: func() (id.PrivKey, *id.PubKey, multichain.Address) {\n\t\t\t\t\tpkEnv := os.Getenv(\"TERRA_PK\")\n\t\t\t\t\tif pkEnv == \"\" {\n\t\t\t\t\t\tpanic(\"TERRA_PK is undefined\")\n\t\t\t\t\t}\n\t\t\t\t\tpkBytes, err := hex.DecodeString(pkEnv)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tpk := secp256k1.PrivKey{Key: pkBytes}\n\t\t\t\t\taddrEncodeDecoder := terra.NewAddressEncodeDecoder()\n\t\t\t\t\tsenderAddr, err := addrEncodeDecoder.EncodeAddress(pk.PubKey().Address().Bytes())\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tsenderPrivKey := id.PrivKey{}\n\t\t\t\t\terr = surge.FromBinary(&senderPrivKey, pkBytes)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\treturn senderPrivKey, senderPrivKey.PubKey(), senderAddr\n\t\t\t\t},\n\t\t\t\tprivKeyToAddr: func(privKey id.PrivKey) multichain.Address {\n\t\t\t\t\tpkBytes, err := surge.ToBinary(privKey)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tpk := secp256k1.PrivKey{Key: pkBytes}\n\t\t\t\t\taddrEncodeDecoder := terra.NewAddressEncodeDecoder()\n\t\t\t\t\taddr, err := addrEncodeDecoder.EncodeAddress(pk.PubKey().Address().Bytes())\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\treturn addr\n\t\t\t\t},\n\t\t\t\trpcURL: \"http://127.0.0.1:26657\",\n\t\t\t\trandomRecipientAddr: func() multichain.Address {\n\t\t\t\t\trecipientKey := secp256k1.GenPrivKey()\n\t\t\t\t\trecipient := multichain.Address(cosmossdk.AccAddress(recipientKey.PubKey().Address()).String())\n\t\t\t\t\treturn recipient\n\t\t\t\t},\n\t\t\t\tinitialise: func(rpcURL pack.String) (multichain.AccountClient, multichain.AccountTxBuilder) {\n\t\t\t\t\tclient := terra.NewClient(\n\t\t\t\t\t\tterra.DefaultClientOptions().\n\t\t\t\t\t\t\tWithHost(rpcURL).\n\t\t\t\t\t\t\tWithCoinDenom(\"uluna\"),\n\t\t\t\t\t)\n\t\t\t\t\ttxBuilder := terra.NewTxBuilder(\n\t\t\t\t\t\tterra.DefaultTxBuilderOptions().\n\t\t\t\t\t\t\tWithChainID(\"testnet\"),\n\t\t\t\t\t\tclient,\n\t\t\t\t\t)\n\n\t\t\t\t\treturn client, txBuilder\n\t\t\t\t},\n\t\t\t\ttxParams: func(_ multichain.AccountClient) (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) {\n\t\t\t\t\tamount := pack.NewU256FromU64(pack.U64(2000000))\n\t\t\t\t\tgasLimit := pack.NewU256FromU64(pack.U64(100000))\n\t\t\t\t\tgasPrice := pack.NewU256FromU64(pack.U64(1))\n\t\t\t\t\tgasCap := pack.NewU256FromInt(gasPrice.Int())\n\t\t\t\t\tpayload := pack.NewBytes([]byte(\"multichain\"))\n\t\t\t\t\treturn amount, gasLimit, gasPrice, gasCap, payload\n\t\t\t\t},\n\t\t\t\tchain: multichain.Terra,\n\t\t\t},\n\t\t\t{\n\t\t\t\tfunc() (id.PrivKey, *id.PubKey, multichain.Address) {\n\t\t\t\t\tpkEnv := os.Getenv(\"FILECOIN_PK\")\n\t\t\t\t\tif pkEnv == \"\" {\n\t\t\t\t\t\tpanic(\"FILECOIN_PK is undefined\")\n\t\t\t\t\t}\n\t\t\t\t\tvar ki filtypes.KeyInfo\n\t\t\t\t\tdata, err := hex.DecodeString(pkEnv)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\terr = json.Unmarshal(data, &ki)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tprivKey := id.PrivKey{}\n\t\t\t\t\terr = surge.FromBinary(&privKey, ki.PrivateKey)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tpubKey := privKey.PubKey()\n\n\t\t\t\t\t// FIXME: add method in renproject/id to get uncompressed pubkey bytes\n\t\t\t\t\tpubKeyCompressed, err := surge.ToBinary(pubKey)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t/*addr*/ _, err = filaddress.NewSecp256k1Address(pubKeyCompressed)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\taddrStr := os.Getenv(\"FILECOIN_ADDRESS\")\n\t\t\t\t\tif addrStr == \"\" {\n\t\t\t\t\t\tpanic(\"FILECOIN_ADDRESS is undefined\")\n\t\t\t\t\t}\n\n\t\t\t\t\treturn privKey, pubKey, multichain.Address(pack.String(addrStr))\n\t\t\t\t},\n\t\t\t\tfunc(privKey id.PrivKey) multichain.Address {\n\t\t\t\t\tpubKey := privKey.PubKey()\n\t\t\t\t\tpubKeyCompressed, err := surge.ToBinary(pubKey)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\taddr, err := filaddress.NewSecp256k1Address(pubKeyCompressed)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\treturn multichain.Address(pack.String(addr.String()))\n\t\t\t\t},\n\t\t\t\t\"http://127.0.0.1:1234/rpc/v0\",\n\t\t\t\tfunc() multichain.Address {\n\t\t\t\t\tpk := id.NewPrivKey()\n\t\t\t\t\tpubKey := pk.PubKey()\n\t\t\t\t\tpubKeyCompressed, err := surge.ToBinary(pubKey)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\taddr, err := filaddress.NewSecp256k1Address(pubKeyCompressed)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\treturn multichain.Address(pack.String(addr.String()))\n\t\t\t\t},\n\t\t\t\tfunc(rpcURL pack.String) (multichain.AccountClient, multichain.AccountTxBuilder) {\n\t\t\t\t\t// dirty hack to fetch auth token\n\t\t\t\t\tclient, err := filecoin.NewClient(\n\t\t\t\t\t\tfilecoin.DefaultClientOptions().\n\t\t\t\t\t\t\tWithRPCURL(rpcURL).\n\t\t\t\t\t\t\tWithAuthToken(fetchAuthToken()),\n\t\t\t\t\t)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\t\ttxBuilder := filecoin.NewTxBuilder()\n\n\t\t\t\t\treturn client, txBuilder\n\t\t\t\t},\n\t\t\t\tfunc(client multichain.AccountClient) (pack.U256, pack.U256, pack.U256, pack.U256, pack.Bytes) {\n\t\t\t\t\tamount := pack.NewU256FromU64(pack.NewU64(100000000))\n\t\t\t\t\tgasLimit := pack.NewU256FromU64(pack.NewU64(2189560))\n\n\t\t\t\t\t// Fetch gas price and gas cap using the gas estimator.\n\t\t\t\t\tfilecoinClient := client.(*filecoin.Client)\n\t\t\t\t\tgasPrice, gasCap, err := filecoin.NewGasEstimator(filecoinClient, gasLimit.Int().Int64()).\n\t\t\t\t\t\tEstimateGas(context.Background())\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\t\tpayload := pack.Bytes(nil)\n\t\t\t\t\treturn amount, gasLimit, gasPrice, gasCap, payload\n\t\t\t\t},\n\t\t\t\tmultichain.Filecoin,\n\t\t\t},\n\t\t}\n\n\t\tfor _, accountChain := range accountChainTable {\n\t\t\taccountChain := accountChain\n\t\t\tif !testFlags[accountChain.chain] {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tContext(fmt.Sprintf(\"%v\", accountChain.chain), func() {\n\t\t\t\tSpecify(\"build, broadcast and fetch tx\", func() {\n\t\t\t\t\t// Load private key and the associated address.\n\t\t\t\t\tsenderPrivKey, senderPubKey, senderAddr := accountChain.senderEnv()\n\t\t\t\t\tsenderPubKeyBytes, err := surge.ToBinary(senderPubKey)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\t\t// Get a random recipient address.\n\t\t\t\t\trecipientAddr := accountChain.randomRecipientAddr()\n\n\t\t\t\t\t// Initialise the account chain's client, and possibly get a nonce for\n\t\t\t\t\t// the sender.\n\t\t\t\t\taccountClient, txBuilder := accountChain.initialise(accountChain.rpcURL)\n\t\t\t\t\tsendTx := func() (pack.Bytes, account.Tx) {\n\t\t\t\t\t\t// Get the appropriate nonce for sender.\n\t\t\t\t\t\tnonce, err := accountClient.AccountNonce(ctx, senderAddr)\n\t\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\t\t\t// Build a transaction.\n\t\t\t\t\t\tamount, gasLimit, gasPrice, gasCap, payload := accountChain.txParams(accountClient)\n\n\t\t\t\t\t\taccountTx, err := txBuilder.BuildTx(\n\t\t\t\t\t\t\tctx,\n\t\t\t\t\t\t\tsenderPubKey,\n\t\t\t\t\t\t\trecipientAddr,\n\t\t\t\t\t\t\tamount, nonce, gasLimit, gasPrice, gasCap,\n\t\t\t\t\t\t\tpayload,\n\t\t\t\t\t\t)\n\t\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\t\t\t// Get the transaction bytes and sign them.\n\t\t\t\t\t\tsighashes, err := accountTx.Sighashes()\n\t\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t\thash := id.Hash(sighashes[0])\n\t\t\t\t\t\tsig, err := senderPrivKey.Sign(&hash)\n\t\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t\tsigBytes, err := surge.ToBinary(sig)\n\t\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t\ttxSignature := pack.Bytes65{}\n\t\t\t\t\t\tcopy(txSignature[:], sigBytes)\n\t\t\t\t\t\terr = accountTx.Sign(\n\t\t\t\t\t\t\t[]pack.Bytes65{txSignature},\n\t\t\t\t\t\t\tpack.NewBytes(senderPubKeyBytes),\n\t\t\t\t\t\t)\n\t\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\t\t\t// Submit the transaction to the account chain.\n\t\t\t\t\t\ttxHash := accountTx.Hash()\n\t\t\t\t\t\terr = accountClient.SubmitTx(ctx, accountTx)\n\t\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t\tlogger.Debug(\"submit tx\", zap.String(\"from\", string(senderAddr)), zap.String(\"to\", string(recipientAddr)), zap.Any(\"txHash\", txHash))\n\t\t\t\t\t\treturn txHash, accountTx\n\t\t\t\t\t}\n\t\t\t\t\ttxHash, accountTx := sendTx()\n\t\t\t\t\tif accountChain.chain == multichain.Avalanche {\n\t\t\t\t\t\ttime.Sleep(5 * time.Second)\n\t\t\t\t\t\tsendTx()\n\t\t\t\t\t}\n\t\t\t\t\t// Wait slightly before we query the chain's node.\n\t\t\t\t\ttime.Sleep(time.Second)\n\n\t\t\t\t\tfor {\n\t\t\t\t\t\t// Loop until the transaction has at least a few confirmations.\n\t\t\t\t\t\ttx, confs, err := accountClient.Tx(ctx, txHash)\n\t\t\t\t\t\tif err == nil && confs > 0 {\n\t\t\t\t\t\t\tExpect(confs.Uint64()).To(BeNumerically(\">\", 0))\n\t\t\t\t\t\t\tExpect(tx.Value()).To(Equal(accountTx.Value()))\n\t\t\t\t\t\t\tExpect(tx.From()).To(Equal(accountTx.From()))\n\t\t\t\t\t\t\tExpect(tx.To()).To(Equal(accountTx.To()))\n\t\t\t\t\t\t\t// FIXME: Filecoin signed message hash is different, so we ignore this check for filecoin. Appropriate check should be added for Filecoin.\n\t\t\t\t\t\t\tif accountChain.chain != multichain.Filecoin {\n\t\t\t\t\t\t\t\tExpect(tx.Hash()).To(Equal(accountTx.Hash()))\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// wait and retry querying for the transaction\n\t\t\t\t\t\ttime.Sleep(5 * time.Second)\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tIt(\"should be able to fetch the latest block\", func() {\n\t\t\t\t\t// Initialise client\n\t\t\t\t\taccountClient, _ := accountChain.initialise(accountChain.rpcURL)\n\n\t\t\t\t\tlatestBlock, err := accountClient.LatestBlock(ctx)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tExpect(uint64(latestBlock)).To(BeNumerically(\">\", 1))\n\t\t\t\t})\n\t\t\t})\n\t\t}\n\t})\n\n\t//\n\t// UTXO API\n\t//\n\tContext(\"UTXO API\", func() {\n\t\tutxoChainTable := []struct {\n\t\t\tprivKeyEnv    string\n\t\t\tnewAddressPKH func([]byte) (btcutil.Address, error)\n\t\t\tnewAddressSH  func([]byte) (btcutil.Address, error)\n\t\t\trpcURL        pack.String\n\t\t\tinitialise    func(pack.String, btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error))\n\t\t\ttxBuilder     multichain.UTXOTxBuilder\n\t\t\tchain         multichain.Chain\n\t\t}{\n\t\t\t{\n\t\t\t\t\"BITCOIN_PK\",\n\t\t\t\tfunc(pkh []byte) (btcutil.Address, error) {\n\t\t\t\t\taddr, err := btcutil.NewAddressPubKeyHash(pkh, &chaincfg.RegressionNetParams)\n\t\t\t\t\treturn addr, err\n\t\t\t\t},\n\t\t\t\tfunc(script []byte) (btcutil.Address, error) {\n\t\t\t\t\taddr, err := btcutil.NewAddressScriptHash(script, &chaincfg.RegressionNetParams)\n\t\t\t\t\treturn addr, err\n\t\t\t\t},\n\t\t\t\tpack.NewString(\"http://0.0.0.0:18443\"),\n\t\t\t\tfunc(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) {\n\t\t\t\t\tclient := bitcoin.NewClient(bitcoin.DefaultClientOptions())\n\t\t\t\t\toutputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress()))\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\treturn client, outputs, client.Confirmations\n\t\t\t\t},\n\t\t\t\tbitcoin.NewTxBuilder(&chaincfg.RegressionNetParams),\n\t\t\t\tmultichain.Bitcoin,\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"BITCOINCASH_PK\",\n\t\t\t\tfunc(pkh []byte) (btcutil.Address, error) {\n\t\t\t\t\taddr, err := bitcoincash.NewAddressPubKeyHash(pkh, &chaincfg.RegressionNetParams)\n\t\t\t\t\treturn addr, err\n\t\t\t\t},\n\t\t\t\tfunc(script []byte) (btcutil.Address, error) {\n\t\t\t\t\taddr, err := bitcoincash.NewAddressScriptHash(script, &chaincfg.RegressionNetParams)\n\t\t\t\t\treturn addr, err\n\t\t\t\t},\n\t\t\t\tpack.NewString(\"http://0.0.0.0:19443\"),\n\t\t\t\tfunc(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) {\n\t\t\t\t\tclient := bitcoincash.NewClient(bitcoincash.DefaultClientOptions())\n\t\t\t\t\toutputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress()))\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\treturn client, outputs, client.Confirmations\n\t\t\t\t},\n\t\t\t\tbitcoincash.NewTxBuilder(&chaincfg.RegressionNetParams),\n\t\t\t\tmultichain.BitcoinCash,\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"DOGECOIN_PK\",\n\t\t\t\tfunc(pkh []byte) (btcutil.Address, error) {\n\t\t\t\t\taddr, err := btcutil.NewAddressPubKeyHash(pkh, &dogecoin.RegressionNetParams)\n\t\t\t\t\treturn addr, err\n\t\t\t\t},\n\t\t\t\tfunc(script []byte) (btcutil.Address, error) {\n\t\t\t\t\taddr, err := btcutil.NewAddressScriptHash(script, &dogecoin.RegressionNetParams)\n\t\t\t\t\treturn addr, err\n\t\t\t\t},\n\t\t\t\tpack.NewString(\"http://0.0.0.0:18332\"),\n\t\t\t\tfunc(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) {\n\t\t\t\t\tclient := dogecoin.NewClient(dogecoin.DefaultClientOptions())\n\t\t\t\t\toutputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress()))\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\treturn client, outputs, client.Confirmations\n\t\t\t\t},\n\t\t\t\tdogecoin.NewTxBuilder(&dogecoin.RegressionNetParams),\n\t\t\t\tmultichain.Dogecoin,\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"ZCASH_PK\",\n\t\t\t\tfunc(pkh []byte) (btcutil.Address, error) {\n\t\t\t\t\taddr, err := zcash.NewAddressPubKeyHash(pkh, &zcash.RegressionNetParams)\n\t\t\t\t\treturn addr, err\n\t\t\t\t},\n\t\t\t\tfunc(script []byte) (btcutil.Address, error) {\n\t\t\t\t\taddr, err := zcash.NewAddressScriptHash(script, &zcash.RegressionNetParams)\n\t\t\t\t\treturn addr, err\n\t\t\t\t},\n\t\t\t\tpack.String(\"http://0.0.0.0:18232\"),\n\t\t\t\tfunc(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) {\n\t\t\t\t\tclient := zcash.NewClient(zcash.DefaultClientOptions())\n\t\t\t\t\toutputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress()))\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\treturn client, outputs, client.Confirmations\n\t\t\t\t},\n\t\t\t\tzcash.NewTxBuilder(&zcash.RegressionNetParams, 1000000),\n\t\t\t\tmultichain.Zcash,\n\t\t\t},\n\t\t\t/*\n\t\t\t\t{\n\t\t\t\t\t\"DIGIBYTE_PK\",\n\t\t\t\t\tfunc(pkh []byte) (btcutil.Address, error) {\n\t\t\t\t\t\taddr, err := btcutil.NewAddressPubKeyHash(pkh, &digibyte.RegressionNetParams)\n\t\t\t\t\t\treturn addr, err\n\t\t\t\t\t},\n\t\t\t\t\tfunc(script []byte) (btcutil.Address, error) {\n\t\t\t\t\t\taddr, err := btcutil.NewAddressScriptHash(script, &digibyte.RegressionNetParams)\n\t\t\t\t\t\treturn addr, err\n\t\t\t\t\t},\n\t\t\t\t\tpack.NewString(\"http://0.0.0.0:20443\"),\n\t\t\t\t\tfunc(rpcURL pack.String, pkhAddr btcutil.Address) (multichain.UTXOClient, []multichain.UTXOutput, func(context.Context, pack.Bytes) (int64, error)) {\n\t\t\t\t\t\tclient := digibyte.NewClient(digibyte.DefaultClientOptions())\n\t\t\t\t\t\toutputs, err := client.UnspentOutputs(ctx, 0, 999999999, multichain.Address(pkhAddr.EncodeAddress()))\n\t\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\t\treturn client, outputs, client.Confirmations\n\t\t\t\t\t},\n\t\t\t\t\tdigibyte.NewTxBuilder(&digibyte.RegressionNetParams),\n\t\t\t\t\tmultichain.DigiByte,\n\t\t\t\t},\n\t\t\t*/\n\t\t}\n\n\t\tfor _, utxoChain := range utxoChainTable {\n\t\t\tutxoChain := utxoChain\n\t\t\tif !testFlags[utxoChain.chain] {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tContext(fmt.Sprintf(\"%v\", utxoChain.chain), func() {\n\t\t\t\tSpecify(\"(P2PKH) build, broadcast and fetch tx\", func() {\n\t\t\t\t\t// Load private key.\n\t\t\t\t\tpkEnv := os.Getenv(utxoChain.privKeyEnv)\n\t\t\t\t\tif pkEnv == \"\" {\n\t\t\t\t\t\tpanic(fmt.Sprintf(\"%v is undefined\", utxoChain.privKeyEnv))\n\t\t\t\t\t}\n\t\t\t\t\twif, err := btcutil.DecodeWIF(pkEnv)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\t\t// Get the PKH address from the loaded private key.\n\t\t\t\t\tpkhAddr, err := utxoChain.newAddressPKH(btcutil.Hash160(wif.PrivKey.PubKey().SerializeCompressed()))\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\t\t// Recipient 1\n\t\t\t\t\tpkhAddrUncompressed, err := utxoChain.newAddressPKH(btcutil.Hash160(wif.PrivKey.PubKey().SerializeUncompressed()))\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\t// Recipient 2\n\t\t\t\t\trecipientPrivKey := id.NewPrivKey()\n\t\t\t\t\trecipientPubKey := recipientPrivKey.PubKey()\n\t\t\t\t\trecipientPubKeyCompressed, err := surge.ToBinary(recipientPubKey)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\trecipientPkhAddr, err := utxoChain.newAddressPKH(btcutil.Hash160(((*btcec.PublicKey)(recipientPubKey)).SerializeCompressed()))\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\t\t// Initialise the UTXO client and fetch the unspent outputs. Also get a\n\t\t\t\t\t// function to query the number of block confirmations for a transaction.\n\t\t\t\t\tutxoClient, unspentOutputs, confsFn := utxoChain.initialise(utxoChain.rpcURL, pkhAddr)\n\t\t\t\t\tExpect(len(unspentOutputs)).To(BeNumerically(\">\", 0))\n\t\t\t\t\tvar output multichain.UTXOutput\n\t\t\t\t\tthresholdValue := pack.NewU256FromU64(pack.NewU64(2500))\n\t\t\t\t\tfor _, unspentOutput := range unspentOutputs {\n\t\t\t\t\t\tif unspentOutput.Value.GreaterThan(thresholdValue) {\n\t\t\t\t\t\t\toutput = unspentOutput\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Build a transaction\n\t\t\t\t\tinputs := []multichain.UTXOInput{\n\t\t\t\t\t\t{Output: multichain.UTXOutput{\n\t\t\t\t\t\t\tOutpoint: multichain.UTXOutpoint{\n\t\t\t\t\t\t\t\tHash:  output.Outpoint.Hash[:],\n\t\t\t\t\t\t\t\tIndex: output.Outpoint.Index,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tPubKeyScript: output.PubKeyScript,\n\t\t\t\t\t\t\tValue:        output.Value,\n\t\t\t\t\t\t}},\n\t\t\t\t\t}\n\t\t\t\t\tutxoValue1 := pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) / 4))\n\t\t\t\t\tutxoValue2 := pack.NewU256FromU64(pack.NewU64((output.Value.Int().Uint64() - 1000) * 3 / 4))\n\t\t\t\t\trecipients := []multichain.UTXORecipient{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tTo:    multichain.Address(pkhAddrUncompressed.EncodeAddress()),\n\t\t\t\t\t\t\tValue: utxoValue1,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tTo:    multichain.Address(recipientPkhAddr.EncodeAddress()),\n\t\t\t\t\t\t\tValue: utxoValue2,\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t\tutxoTx, err := utxoChain.txBuilder.BuildTx(inputs, recipients)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\t\t// Get the sighashes that need to be signed, and sign them.\n\t\t\t\t\tsighashes, err := utxoTx.Sighashes()\n\t\t\t\t\tsignatures := make([]pack.Bytes65, len(sighashes))\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\tfor i := range sighashes {\n\t\t\t\t\t\thash := id.Hash(sighashes[i])\n\t\t\t\t\t\tprivKey := (*id.PrivKey)(wif.PrivKey)\n\t\t\t\t\t\tsignature, err := privKey.Sign(&hash)\n\t\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\t\tsignatures[i] = pack.NewBytes65(signature)\n\t\t\t\t\t}\n\t\t\t\t\tExpect(utxoTx.Sign(signatures, pack.NewBytes(wif.SerializePubKey()))).To(Succeed())\n\n\t\t\t\t\t// Submit the signed transaction to the UTXO chain's node.\n\t\t\t\t\ttxHash, err := utxoTx.Hash()\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\terr = utxoClient.SubmitTx(ctx, utxoTx)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\n\t\t\t\t\t// Check confirmations after waiting for the transaction to be in the\n\t\t\t\t\t// mempool.\n\t\t\t\t\ttime.Sleep(time.Second)\n\n\t\t\t\t\tfor {\n\t\t\t\t\t\t// Loop until the transaction has at least a few\n\t\t\t\t\t\t// confirmations.\n\t\t\t\t\t\tconfs, err := confsFn(ctx, txHash)\n\t\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\t\tlogger.Debug(fmt.Sprintf(\"[%v] confirming\", utxoChain.chain), zap.Uint64(\"current\", uint64(confs)))\n\t\t\t\t\t\tif confs >= 1 {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttime.Sleep(10 * time.Second)\n\t\t\t\t\t}\n\n\t\t\t\t\t// Load the output and verify that it is equal to the original output.\n\t\t\t\t\toutput2, _, err := utxoClient.Output(ctx, output.Outpoint)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\tExpect(reflect.DeepEqual(output, output2)).To(BeTrue())\n\n\t\t\t\t\t// Load the first output and verify the value.\n\t\t\t\t\toutput3, _, err := utxoClient.Output(ctx, multichain.UTXOutpoint{\n\t\t\t\t\t\tHash:  txHash,\n\t\t\t\t\t\tIndex: pack.NewU32(0),\n\t\t\t\t\t})\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\tExpect(output3.Value).To(Equal(utxoValue1))\n\n\t\t\t\t\t// Load the second output and verify the value.\n\t\t\t\t\toutput4, _, err := utxoClient.Output(ctx, multichain.UTXOutpoint{\n\t\t\t\t\t\tHash:  txHash,\n\t\t\t\t\t\tIndex: pack.NewU32(1),\n\t\t\t\t\t})\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\tExpect(output4.Value).To(Equal(utxoValue2))\n\n\t\t\t\t\t// Construct UTXO to be signed by invalid key. This UTXO should fail\n\t\t\t\t\t// when submitted to the network, since the signer doesn't have the\n\t\t\t\t\t// right to spend it.\n\t\t\t\t\t// We submit the invalid signed UTXO (which should fail), and wait\n\t\t\t\t\t// for a maximum of 5 seconds.\n\t\t\t\t\tinputs2 := []multichain.UTXOInput{{\n\t\t\t\t\t\tOutput: output4,\n\t\t\t\t\t}}\n\t\t\t\t\trecipients2 := []multichain.UTXORecipient{{\n\t\t\t\t\t\tTo:    multichain.Address(pkhAddr.EncodeAddress()),\n\t\t\t\t\t\tValue: output4.Value.Sub(pack.NewU256FromU64(pack.U64(500))),\n\t\t\t\t\t}}\n\t\t\t\t\tutxoTx2, err := utxoChain.txBuilder.BuildTx(inputs2, recipients2)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tsighashes2, err := utxoTx2.Sighashes()\n\t\t\t\t\tsignatures2 := make([]pack.Bytes65, len(sighashes2))\n\t\t\t\t\tfor i := range sighashes2 {\n\t\t\t\t\t\thash := id.Hash(sighashes2[i])\n\t\t\t\t\t\tprivKey := (*id.PrivKey)(wif.PrivKey)\n\t\t\t\t\t\tsignature, err := privKey.Sign(&hash)\n\t\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\t\tsignatures2[i] = pack.NewBytes65(signature)\n\t\t\t\t\t}\n\t\t\t\t\tExpect(utxoTx2.Sign(signatures2, pack.NewBytes(wif.SerializePubKey()))).To(Succeed())\n\t\t\t\t\tfailingCtx, failingCancelFn := context.WithTimeout(ctx, 5*time.Second)\n\t\t\t\t\tExpect(utxoClient.SubmitTx(failingCtx, utxoTx2)).To(HaveOccurred())\n\t\t\t\t\tfailingCancelFn()\n\n\t\t\t\t\t// Try to spend UTXO from valid key. We should be able to successfully\n\t\t\t\t\t// submit the signed UTXO to the network.\n\t\t\t\t\tutxoTx3, err := utxoChain.txBuilder.BuildTx(inputs2, recipients2)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tsighashes3, err := utxoTx3.Sighashes()\n\t\t\t\t\tsignatures3 := make([]pack.Bytes65, len(sighashes3))\n\t\t\t\t\tfor i := range sighashes3 {\n\t\t\t\t\t\thash := id.Hash(sighashes3[i])\n\t\t\t\t\t\tsignature, err := recipientPrivKey.Sign(&hash)\n\t\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\t\tsignatures3[i] = pack.NewBytes65(signature)\n\t\t\t\t\t}\n\t\t\t\t\tExpect(utxoTx3.Sign(signatures3, pack.NewBytes(recipientPubKeyCompressed))).To(Succeed())\n\t\t\t\t\tExpect(utxoClient.SubmitTx(ctx, utxoTx3)).NotTo(HaveOccurred())\n\t\t\t\t})\n\n\t\t\t\tSpecify(\"(P2SH)  build, broadcast and fetch tx\", func() {\n\t\t\t\t\t// Load private key.\n\t\t\t\t\tpkEnv := os.Getenv(utxoChain.privKeyEnv)\n\t\t\t\t\tif pkEnv == \"\" {\n\t\t\t\t\t\tpanic(fmt.Sprintf(\"%v is undefined\", utxoChain.privKeyEnv))\n\t\t\t\t\t}\n\t\t\t\t\twif, err := btcutil.DecodeWIF(pkEnv)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\t\t// Get the PKH address from the loaded private key.\n\t\t\t\t\tpkhAddr, err := utxoChain.newAddressPKH(btcutil.Hash160(wif.PrivKey.PubKey().SerializeCompressed()))\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\t\t// Recipient\n\t\t\t\t\trecipientPrivKey := id.NewPrivKey()\n\t\t\t\t\trecipientPubKey := recipientPrivKey.PubKey()\n\t\t\t\t\trecipientPubKeyCompressed, err := surge.ToBinary(recipientPubKey)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tpubKey := pack.Bytes(((*btcec.PublicKey)(recipientPubKey)).SerializeCompressed())\n\t\t\t\t\tscript, err := getScript(pubKey)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tpubKeyScript, err := getPubKeyScript(pubKey)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\trecipientP2SH, err := utxoChain.newAddressSH(script)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\t\t// Initialise the UTXO client and fetch the unspent outputs. Also get a\n\t\t\t\t\t// function to query the number of block confirmations for a transaction.\n\t\t\t\t\tutxoClient, unspentOutputs, confsFn := utxoChain.initialise(utxoChain.rpcURL, pkhAddr)\n\t\t\t\t\tExpect(len(unspentOutputs)).To(BeNumerically(\">\", 0))\n\t\t\t\t\tvar output multichain.UTXOutput\n\t\t\t\t\tthresholdValue := pack.NewU256FromU64(pack.NewU64(2500))\n\t\t\t\t\tfor _, unspentOutput := range unspentOutputs {\n\t\t\t\t\t\tif unspentOutput.Value.GreaterThan(thresholdValue) {\n\t\t\t\t\t\t\toutput = unspentOutput\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Build a transaction\n\t\t\t\t\tinputs := []multichain.UTXOInput{\n\t\t\t\t\t\t{Output: multichain.UTXOutput{\n\t\t\t\t\t\t\tOutpoint: multichain.UTXOutpoint{\n\t\t\t\t\t\t\t\tHash:  output.Outpoint.Hash[:],\n\t\t\t\t\t\t\t\tIndex: output.Outpoint.Index,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tPubKeyScript: output.PubKeyScript,\n\t\t\t\t\t\t\tValue:        output.Value,\n\t\t\t\t\t\t}},\n\t\t\t\t\t}\n\t\t\t\t\trecipients := []multichain.UTXORecipient{\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tTo:    multichain.Address(recipientP2SH.EncodeAddress()),\n\t\t\t\t\t\t\tValue: output.Value.Sub(pack.NewU256FromU64(pack.U64(500))),\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t\tutxoTx, err := utxoChain.txBuilder.BuildTx(inputs, recipients)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\t\t// Get the sighashes that need to be signed, and sign them.\n\t\t\t\t\tsighashes, err := utxoTx.Sighashes()\n\t\t\t\t\tsignatures := make([]pack.Bytes65, len(sighashes))\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\tfor i := range sighashes {\n\t\t\t\t\t\thash := id.Hash(sighashes[i])\n\t\t\t\t\t\tprivKey := (*id.PrivKey)(wif.PrivKey)\n\t\t\t\t\t\tsignature, err := privKey.Sign(&hash)\n\t\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\t\tsignatures[i] = pack.NewBytes65(signature)\n\t\t\t\t\t}\n\t\t\t\t\tExpect(utxoTx.Sign(signatures, pack.NewBytes(wif.SerializePubKey()))).To(Succeed())\n\n\t\t\t\t\t// Submit the signed transaction to the UTXO chain's node.\n\t\t\t\t\ttxHash, err := utxoTx.Hash()\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\terr = utxoClient.SubmitTx(ctx, utxoTx)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\tlogger.Debug(\"[P2KH -> P2SH] submit tx\", zap.String(\"from\", pkhAddr.EncodeAddress()), zap.String(\"to\", recipientP2SH.EncodeAddress()), zap.String(\"txHash\", string(txHashToHex(txHash))))\n\n\t\t\t\t\t// Check confirmations after waiting for the transaction to be in the\n\t\t\t\t\t// mempool.\n\t\t\t\t\ttime.Sleep(time.Second)\n\n\t\t\t\t\tfor {\n\t\t\t\t\t\t// Loop until the transaction has at least a few\n\t\t\t\t\t\t// confirmations.\n\t\t\t\t\t\tconfs, err := confsFn(ctx, txHash)\n\t\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\t\tlogger.Debug(fmt.Sprintf(\"[%v] confirming\", utxoChain.chain), zap.Uint64(\"current\", uint64(confs)))\n\t\t\t\t\t\tif confs >= 1 {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttime.Sleep(10 * time.Second)\n\t\t\t\t\t}\n\n\t\t\t\t\t// Load the output and verify that the pub key script is as calculated\n\t\t\t\t\t// initially.\n\t\t\t\t\toutput2, _, err := utxoClient.Output(ctx, multichain.UTXOutpoint{\n\t\t\t\t\t\tHash:  txHash,\n\t\t\t\t\t\tIndex: pack.NewU32(0),\n\t\t\t\t\t})\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\tExpect(output2.PubKeyScript.Equal(pubKeyScript)).To(BeTrue())\n\n\t\t\t\t\t// Validate that the output2 is spendable\n\t\t\t\t\tsigScript, err := getScript(pubKey)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tinputs2 := []multichain.UTXOInput{{\n\t\t\t\t\t\tOutput:    output2,\n\t\t\t\t\t\tSigScript: sigScript,\n\t\t\t\t\t}}\n\t\t\t\t\trecipients2 := []multichain.UTXORecipient{{\n\t\t\t\t\t\tTo:    multichain.Address(pkhAddr.EncodeAddress()),\n\t\t\t\t\t\tValue: output2.Value.Sub(pack.NewU256FromU64(pack.U64(500))),\n\t\t\t\t\t}}\n\t\t\t\t\tutxoTx2, err := utxoChain.txBuilder.BuildTx(inputs2, recipients2)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\t\t// Create another transaction using the same inputs, which we will\n\t\t\t\t\t// sign with the original user's address. Validate that none other\n\t\t\t\t\t// than the recipient's signature can spend this UTXO.\n\t\t\t\t\tutxoTx3, err := utxoChain.txBuilder.BuildTx(inputs2, recipients2)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\t\t// Get the sighashes that need to be signed, and sign them.\n\t\t\t\t\tsighashes2, err := utxoTx2.Sighashes()\n\t\t\t\t\tsignatures2 := make([]pack.Bytes65, len(sighashes2))\n\t\t\t\t\tsignatures3 := make([]pack.Bytes65, len(sighashes2))\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\tfor i := range sighashes2 {\n\t\t\t\t\t\thash := id.Hash(sighashes2[i])\n\t\t\t\t\t\tsignature, err := recipientPrivKey.Sign(&hash)\n\t\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\t\tsignatures2[i] = pack.NewBytes65(signature)\n\t\t\t\t\t}\n\t\t\t\t\tfor i := range sighashes2 {\n\t\t\t\t\t\thash := id.Hash(sighashes2[i])\n\t\t\t\t\t\tprivKey := (*id.PrivKey)(wif.PrivKey)\n\t\t\t\t\t\tsignature, err := privKey.Sign(&hash)\n\t\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\t\tsignatures3[i] = pack.NewBytes65(signature)\n\t\t\t\t\t}\n\t\t\t\t\tExpect(utxoTx2.Sign(signatures2, pack.NewBytes(recipientPubKeyCompressed))).To(Succeed())\n\t\t\t\t\tExpect(utxoTx3.Sign(signatures3, pack.NewBytes(wif.SerializePubKey()))).To(Succeed())\n\n\t\t\t\t\t// Try to submit tx signed by invalid spender. This should fail since\n\t\t\t\t\tfailingCtx, failingCancelFn := context.WithTimeout(ctx, 5*time.Second)\n\t\t\t\t\tExpect(utxoClient.SubmitTx(failingCtx, utxoTx3)).To(HaveOccurred())\n\t\t\t\t\tfailingCancelFn()\n\n\t\t\t\t\t// Submit the signed transaction to the UTXO chain's node.\n\t\t\t\t\ttxHash2, err := utxoTx2.Hash()\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\terr = utxoClient.SubmitTx(ctx, utxoTx2)\n\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\tlogger.Debug(\"[P2SH -> P2KH] submit tx\", zap.String(\"from\", recipientP2SH.EncodeAddress()), zap.String(\"to\", pkhAddr.EncodeAddress()), zap.String(\"txHash\", string(txHashToHex(txHash2))))\n\n\t\t\t\t\t// Check confirmations after waiting for the transaction to be in the\n\t\t\t\t\t// mempool.\n\t\t\t\t\ttime.Sleep(time.Second)\n\n\t\t\t\t\tfor {\n\t\t\t\t\t\t// Loop until the transaction has at least a few\n\t\t\t\t\t\t// confirmations.\n\t\t\t\t\t\tconfs, err := confsFn(ctx, txHash2)\n\t\t\t\t\t\tExpect(err).ToNot(HaveOccurred())\n\t\t\t\t\t\tlogger.Debug(fmt.Sprintf(\"[%v] confirming\", utxoChain.chain), zap.Uint64(\"current\", uint64(confs)))\n\t\t\t\t\t\tif confs >= 1 {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttime.Sleep(10 * time.Second)\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tIt(\"should be able to fetch the latest block\", func() {\n\t\t\t\t\t// get a random address\n\t\t\t\t\trandAddr := make([]byte, 20)\n\t\t\t\t\tr.Read(randAddr)\n\t\t\t\t\tpkhAddr, err := utxoChain.newAddressPKH(randAddr)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\n\t\t\t\t\t// initialise client\n\t\t\t\t\tutxoClient, _, _ := utxoChain.initialise(utxoChain.rpcURL, pkhAddr)\n\n\t\t\t\t\tlatestBlock, err := utxoClient.LatestBlock(ctx)\n\t\t\t\t\tExpect(err).NotTo(HaveOccurred())\n\t\t\t\t\tExpect(uint64(latestBlock)).To(BeNumerically(\">\", 1))\n\t\t\t\t})\n\t\t\t})\n\t\t}\n\t})\n})\n\nfunc txHashToHex(txHash pack.Bytes) pack.String {\n\t// bitcoin's msgTx is a byte-reversed hash\n\t// https://github.com/btcsuite/btcd/blob/master/chaincfg/chainhash/hash.go#L27-L28\n\ttxHashCopy := make([]byte, len(txHash))\n\tcopy(txHashCopy[:], txHash)\n\thashSize := len(txHashCopy)\n\tfor i := 0; i < hashSize/2; i++ {\n\t\ttxHashCopy[i], txHashCopy[hashSize-1-i] = txHashCopy[hashSize-1-i], txHashCopy[i]\n\t}\n\treturn pack.String(hex.EncodeToString(txHashCopy))\n}\n\nfunc fetchAuthToken() pack.String {\n\t// fetch the auth token from filecoin's running docker container\n\tcmd := exec.Command(\"docker\", \"exec\", \"infra_filecoin_1\", \"/bin/bash\", \"-c\", \"/app/lotus auth api-info --perm admin\")\n\tvar out bytes.Buffer\n\tvar stderr bytes.Buffer\n\tcmd.Stdout = &out\n\tcmd.Stderr = &stderr\n\terr := cmd.Run()\n\tif err != nil {\n\t\tfmt.Println(fmt.Sprint(err) + \": \" + stderr.String())\n\t\tpanic(fmt.Sprintf(\"could not run command: %v\", err))\n\t}\n\ttokenWithSuffix := strings.TrimPrefix(out.String(), \"FULLNODE_API_INFO=\")\n\tauthToken := strings.Split(tokenWithSuffix, \":/\")\n\treturn pack.NewString(fmt.Sprintf(\"Bearer %s\", authToken[0]))\n}\n\nfunc getScript(pubKey pack.Bytes) (pack.Bytes, error) {\n\tpubKeyHash160 := btcutil.Hash160(pubKey)\n\treturn txscript.NewScriptBuilder().\n\t\tAddOp(txscript.OP_DUP).\n\t\tAddOp(txscript.OP_HASH160).\n\t\tAddData(pubKeyHash160).\n\t\tAddOp(txscript.OP_EQUALVERIFY).\n\t\tAddOp(txscript.OP_CHECKSIG).\n\t\tScript()\n}\n\nfunc getPubKeyScript(pubKey pack.Bytes) (pack.Bytes, error) {\n\tscript, err := getScript(pubKey)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"invalid script: %v\", err)\n\t}\n\tpubKeyScript, err := txscript.NewScriptBuilder().\n\t\tAddOp(txscript.OP_HASH160).\n\t\tAddData(btcutil.Hash160(script)).\n\t\tAddOp(txscript.OP_EQUAL).\n\t\tScript()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"invalid pubkeyscript: %v\", err)\n\t}\n\treturn pubKeyScript, nil\n}\n"
  },
  {
    "path": "test.sh",
    "content": "source ./infra/.env\ndocker-compose -f ./infra/docker-compose.yaml up --build -d\necho \"Waiting for multichain to boot...\"\nsleep 30\ngo test -v ./...\ndocker-compose -f ./infra/docker-compose.yaml down\necho \"Done!\""
  }
]