Compare commits

..

6 Commits

Author SHA1 Message Date
Michael Shaw
8342299dbd switch to main branch 2023-02-10 14:22:55 -05:00
Michael Shaw
e1daf8afa7 add arg to docker compose down for auction and nameservice-expiry 2023-02-08 16:07:46 -05:00
Michael Shaw
fbe510f783 always run docker compose down... possibly to avoid insufficient funds error after a failed run 2023-02-08 14:30:11 -05:00
Michael Shaw
207f940e09 x bit not set on auction tests shell script 2023-02-08 12:20:08 -05:00
Michael Shaw
deafa3e332 compose args order matters 2023-02-08 11:26:52 -05:00
Michael Shaw
627dfa7664 tests must be run against different chain configurations 2023-02-07 16:24:06 -05:00
102 changed files with 6140 additions and 9469 deletions

View File

@ -1,7 +1,5 @@
Dockerfile # localnet-setup
**/node_modules
init.sh
build
localnet-setup localnet-setup
# build
build

View File

@ -1,17 +0,0 @@
name: Build
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.21
check-latest: true
- run: |
make build

View File

@ -1,20 +0,0 @@
name: Deploy Contract
on:
pull_request:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.21
check-latest: true
- name: Test contract
run: |
make contract-tools
# This seems to be an empty placeholder.
make test-contract

View File

@ -1,21 +0,0 @@
name: Tests
on:
pull_request:
push:
branches:
- main
- release/**
jobs:
test-importer:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.21
check-latest: true
- uses: actions/checkout@v3
- name: test-importer
run: |
make test-import

View File

@ -1,21 +0,0 @@
name: Tests
on:
pull_request:
push:
branches:
- main
- release/**
jobs:
test-rpc:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.21
check-latest: true
- uses: actions/checkout@v3
- name: Test rpc endpoint
run: |
make test-rpc

View File

@ -1,40 +0,0 @@
name: Tests
on:
pull_request:
push:
branches:
- main
- release/**
jobs:
sdk_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout laconic-sdk
uses: actions/checkout@v3
with:
path: "./laconic-sdk/"
repository: cerc-io/laconic-sdk
fetch-depth: 0
ref: main
- name: Environment
run: ls -tlh && env
- name: Build laconicd container
working-directory: tests/sdk_tests
run: ./build-laconicd-container.sh
- name: Build laconic-sdk container
working-directory: laconic-sdk
run: ./scripts/build-sdk-test-container.sh
- name: Start containers (auctions enabled)
working-directory: tests/sdk_tests
env:
TEST_AUCTION_ENABLED: true
run: docker compose up -d
- name: Run auction tests
working-directory: tests/sdk_tests
run: ./run-tests.sh test:auctions

View File

@ -1,40 +0,0 @@
name: Tests
on:
pull_request:
push:
branches:
- main
- release/**
jobs:
sdk_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout laconic-sdk
uses: actions/checkout@v3
with:
path: "./laconic-sdk/"
repository: cerc-io/laconic-sdk
fetch-depth: 0
ref: main
- name: Environment
run: ls -tlh && env
- name: Build laconicd container
working-directory: tests/sdk_tests
run: ./build-laconicd-container.sh
- name: Build laconic-sdk container
working-directory: laconic-sdk
run: ./scripts/build-sdk-test-container.sh
- name: Start containers (expiry enabled)
working-directory: tests/sdk_tests
env:
TEST_REGISTRY_EXPIRY: true
run: docker compose up -d
- name: Run nameservice expiry tests
working-directory: tests/sdk_tests
run: ./run-tests.sh test:nameservice-expiry

View File

@ -1,38 +0,0 @@
name: Tests
on:
pull_request:
push:
branches:
- main
- release/**
jobs:
sdk_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout laconic-sdk
uses: actions/checkout@v3
with:
path: "./laconic-sdk/"
repository: cerc-io/laconic-sdk
fetch-depth: 0
ref: main
- name: Environment
run: ls -tlh && env
- name: Build laconicd container
working-directory: tests/sdk_tests
run: ./build-laconicd-container.sh
- name: Build laconic-sdk container
working-directory: laconic-sdk
run: ./scripts/build-sdk-test-container.sh
- name: Start containers
working-directory: tests/sdk_tests
run: docker compose up -d
- name: Run tests
working-directory: tests/sdk_tests
run: ./run-tests.sh

View File

@ -1,23 +0,0 @@
name: Tests
on:
pull_request:
push:
branches:
- main
- release/**
jobs:
test-unit:
# This test case doesn't work in CI, run as root.
env:
SKIP_UNIT_TESTS: TestInitConfigNonNotExistError
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.21
check-latest: true
- uses: actions/checkout@v3
- name: Test
run: |
make test-unit

5
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1,5 @@
# CODEOWNERS: https://help.github.com/articles/about-codeowners/
# Primary (global) repo maintainers
* @evmos/core-engineering

18
.github/ISSUE_TEMPLATE/bug-report.md vendored Normal file
View File

@ -0,0 +1,18 @@
---
name: Bug Report
about: create a bug report
---
__System info:__ [Include Ethermint commit, operating system name, and other relevant details]
__Steps to reproduce:__
1. [First Step]
2. [Second Step]
3. [and so on...]
__Expected behavior:__ [What you expected to happen]
__Actual behavior:__ [What actually happened]
__Additional info:__ [Include gist of relevant config, logs, etc.]

View File

@ -0,0 +1,15 @@
---
name: Feature request
about: Opening a feature request kicks off a discussion
---
__Proposal:__ [Description of the feature]
__Current behavior:__ [What currently happens]
__Desired behavior:__ [What you would like to happen]
__Use case:__ [Why is this important (helps with prioritizing requests)]
Requests may be closed if we're not actively planning to work on them.

34
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,34 @@
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v ✰ Thanks for creating a PR! ✰
v Before smashing the submit button please review the checkboxes.
v If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -->
Closes: #XXX
## Description
<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review.
-->
______
For contributor use:
- [ ] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [ ] Re-reviewed `Files changed` in the Github PR explorer
______
For admin use:
- [ ] Added appropriate labels to PR (ex. `WIP`, `R4R`, `docs`, etc)
- [ ] Reviewers assigned
- [ ] Squashed all commits, uses message "Merge pull request #XYZ: [title]" ([coding standards](https://github.com/tendermint/coding/blob/master/README.md#merging-a-pr))

37
.github/labeler.yml vendored Normal file
View File

@ -0,0 +1,37 @@
"C:Crypto":
- crypto/**/*
"C:Encoding":
- encoding/**/*
"C:JSON-RPC":
- ethereum/rpc/**/*
"C:Proto":
- proto/**/*
- third_party/**/*
- /**/*.pb.go
- /**/*.pb.gw.go
"C:Types":
- types/**/*
"C:x/evm":
- x/evm/**/*/
"Type: Build":
- Makefile
- Dockerfile
- docker-compose.yml
- scripts/*
- config.yml
"Type: CI":
- .github/**/*.yml
- buf.yaml
- .mergify.yml
- .golangci.yml
"C:CLI":
- client/**/*
- x/*/client/**/*
"Type: Tests":
- tests/**/*
- /**/*/*_test.go
"Type: Docs":
- docs/**/*
- x/*/spec/**/*
"Type: ADR":
- docs/architecture/**/*

33
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Build
on:
pull_request:
branches:
- main
jobs:
cleanup-runs:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.19
check-latest: true
- uses: technote-space/get-diff-action@v6.1.2
id: git_diff
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- run: |
make build
if: env.GIT_DIFF

84
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@ -0,0 +1,84 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '37 21 * * 4'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
**/**.sol
**/**.go
**/**.ts
**/**.js
go.mod
go.sum
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
queries: crypto-com/cosmos-sdk-codeql@main,security-and-quality
if: env.GIT_DIFF
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
if: env.GIT_DIFF
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
if: env.GIT_DIFF

28
.github/workflows/dependencies.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: "Dependency Review"
on: pull_request
permissions:
contents: read
jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19
check-latest: true
- name: "Checkout Repository"
uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: "Dependency Review"
uses: actions/dependency-review-action@v3
if: env.GIT_DIFF
- name: "Go vulnerability check"
run: make vulncheck
if: env.GIT_DIFF

38
.github/workflows/deploy-contract.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Deploy Contract
on:
pull_request:
branches:
- main
jobs:
cleanup-runs:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '12.x'
- name: Install dependencies
run: npm install
- uses: technote-space/get-diff-action@v6.1.2
id: git_diff
with:
PATTERNS: |
**/**.sol
**/**.go
go.mod
go.sum
- name: Test contract
run: |
sudo make contract-tools
sudo make test-contract
if: env.GIT_DIFF

View File

@ -20,7 +20,7 @@ jobs:
- name: Tag docker image - name: Tag docker image
run: docker tag git.vdb.to/cerc-io/laconicd/laconicd:${{steps.vars.outputs.sha}} git.vdb.to/cerc-io/laconicd/laconicd:${{steps.vars.outputs.tag}} run: docker tag git.vdb.to/cerc-io/laconicd/laconicd:${{steps.vars.outputs.sha}} git.vdb.to/cerc-io/laconicd/laconicd:${{steps.vars.outputs.tag}}
- name: Docker Login - name: Docker Login
run: echo ${{ secrets.CICD_PUBLISH_TOKEN }} | docker login https://git.vdb.to -u cerccicd --password-stdin run: echo ${{ secrets.GITEA_TOKEN }} | docker login https://git.vdb.to -u cerccicd --password-stdin
- name: Docker Push - name: Docker Push
run: docker push git.vdb.to/cerc-io/laconicd/laconicd:${{steps.vars.outputs.sha}} run: docker push git.vdb.to/cerc-io/laconicd/laconicd:${{steps.vars.outputs.sha}}
- name: Docker Push TAGGED - name: Docker Push TAGGED

View File

@ -15,14 +15,14 @@ jobs:
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v3 uses: actions/setup-go@v3
with: with:
go-version: 1.21 go-version: 1.19
check-latest: true check-latest: true
- name: release dry run - name: release dry run
run: make release-dry-run run: make release-dry-run
- name: setup release environment - name: setup release environment
env: env:
GITHUB_TOKEN: ${{ secrets.CICD_PUBLISH_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |- run: |-
echo 'GITHUB_TOKEN=${{secrets.CICD_PUBLISH_TOKEN}}' > .release-env echo 'GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}}' > .release-env
- name: release publish - name: release publish
run: make release run: make release

View File

@ -0,0 +1,29 @@
name: Notion Sync
on:
workflow_dispatch:
issues:
types:
[
opened,
edited,
labeled,
unlabeled,
assigned,
unassigned,
milestoned,
demilestoned,
reopened,
closed,
]
jobs:
notion_job:
runs-on: ubuntu-latest
name: Add GitHub Issues to Notion
steps:
- name: Add GitHub Issues to Notion
uses: vulcanize/notion-github-action@v1.2.4-issueid
with:
notion-token: ${{ secrets.NOTION_TOKEN }}
notion-db: ${{ secrets.NOTION_DATABASE }}

14
.github/workflows/labeler.yml vendored Normal file
View File

@ -0,0 +1,14 @@
name: "Pull Request Labeler"
on:
pull_request:
push:
branches:
- main
jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

View File

@ -16,27 +16,37 @@ jobs:
# Required: setup-go, for all versions v3.0.0+ of golangci-lint # Required: setup-go, for all versions v3.0.0+ of golangci-lint
- uses: actions/setup-go@v3 - uses: actions/setup-go@v3
with: with:
go-version: 1.21 go-version: 1.19
check-latest: true check-latest: true
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- uses: golangci/golangci-lint-action@v3.3.1 - uses: golangci/golangci-lint-action@v3.3.1
with: with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: latest version: latest
args: --timeout 10m args: --timeout 10m
github-token: ${{ secrets.github_token }} github-token: ${{ secrets.github_token }}
# Check only if there are differences in the source code
if: env.GIT_DIFF
python-lint: python-lint:
# For compatibility with Gitea
env:
USER: root
name: Run flake8 on python integration tests name: Run flake8 on python integration tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: cachix/install-nix-action@v20 - uses: cachix/install-nix-action@v18
- uses: cachix/cachix-action@v12 - uses: cachix/cachix-action@v12
with: with:
name: ethermint name: ethermint
- uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
**/**.py
- run: | - run: |
nix-shell -I nixpkgs=./nix -p test-env --run "make lint-py" nix-shell -I nixpkgs=./nix -p test-env --run "make lint-py"
if: env.GIT_DIFF

37
.github/workflows/security.yml vendored Normal file
View File

@ -0,0 +1,37 @@
name: Run Gosec
on:
pull_request:
push:
branches:
- main
jobs:
Gosec:
permissions:
security-events: write
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Checkout Source
uses: actions/checkout@v3
- name: Get Diff
uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
**/*.go
go.mod
go.sum
- name: Run Gosec Security Scanner
uses: cosmos/gosec@master
with:
# we let the report trigger content trigger a failure using the GitHub Security features.
args: '-no-fail -fmt sarif -out results.sarif -exclude=G701,G703 ./...'
if: "env.GIT_DIFF_FILTERED != ''"
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
# Path to SARIF file relative to the root of the repository
sarif_file: results.sarif
if: "env.GIT_DIFF_FILTERED != ''"

45
.github/workflows/semgrep.yml vendored Normal file
View File

@ -0,0 +1,45 @@
name: Semgrep
on:
# Scan changed files in PRs, block on new issues only (existing issues ignored)
pull_request: {}
push:
branches:
- main
paths:
- .github/workflows/semgrep.yml
schedule:
- cron: '0 0 * * 0'
jobs:
# Update from: https://semgrep.dev/docs/semgrep-ci/sample-ci-configs/#github-actions
semgrep:
name: Scan
runs-on: ubuntu-latest
container:
image: returntocorp/semgrep
if: (github.actor != 'dependabot[bot]')
steps:
- name: Permission issue fix
run: git config --global --add safe.directory /__w/laconicd/laconicd
- uses: actions/checkout@v3
- name: Get Diff
uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
**/*.go
**/*.js
**/*.ts
**/*.sol
go.mod
go.sum
- uses: actions/checkout@v3
- run: semgrep scan --sarif --output=semgrep.sarif --config auto
env:
# Upload findings to GitHub Advanced Security Dashboard [step 1/2]
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
if: "env.GIT_DIFF_FILTERED != ''"
# Upload findings to GitHub Advanced Security Dashboard [step 2/2]
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: semgrep.sarif
if: "env.GIT_DIFF_FILTERED != ''"

21
.github/workflows/stale.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: "Close stale issues & pull requests"
on:
schedule:
- cron: "0 0 * * *"
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-pr-message: "This pull request has been automatically marked as stale because it has not had
recent activity. It will be closed in 7 days-before-close if no further activity occurs."
stale-issue-message: "This issue is stale because it has been open 45 days with no activity. Remove `Status: Stale` label or comment or this will be closed in 7 days."
days-before-stale: 45
days-before-close: 7
exempt-issue-labels: "Status: Blocked, Type: Bug, pinned, automerge"
exempt-pr-labels: "Status: Blocked, Type: Bug, pinned, automerge"
stale-pr-label: "Status: Stale"
stale-issue-label: "Status: Stale"

176
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,176 @@
name: Tests
on:
pull_request:
push:
branches:
- main
- release/**
jobs:
cleanup-runs:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"
test-unit-cover:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19
check-latest: true
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: Test and Create Coverage Report
run: |
make test-unit-cover
if: env.GIT_DIFF
- uses: codecov/codecov-action@v3
with:
file: ./coverage.txt
fail_ci_if_error: false
if: env.GIT_DIFF
test-importer:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19
check-latest: true
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.1.2
id: git_diff
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: test-importer
run: |
make test-import
if: env.GIT_DIFF
test-rpc:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19
check-latest: true
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.1.2
with:
PATTERNS: |
**/**.sol
**/**.go
go.mod
go.sum
- name: Test rpc endpoint
run: |
make test-rpc
if: env.GIT_DIFF
sdk_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout laconic-sdk
uses: actions/checkout@v3
with:
path: "./laconic-sdk/"
repository: cerc-io/laconic-sdk
fetch-depth: 0
ref: jest_timeout
- name: Environment
run: ls -tlh && env
- name: build containers scripts
working-directory: tests/sdk_tests
run: ./build-laconicd-container.sh && ./build-sdk-test-container.sh
- name: start containers
working-directory: tests/sdk_tests
run: docker compose up -d
- name: run-tests.sh
working-directory: tests/sdk_tests
run: ./run-tests.sh
- name: reset containers for auction tests
working-directory: tests/sdk_tests
if: always()
run: docker compose down
- name: start auction containers
working-directory: tests/sdk_tests
run: docker compose -f docker-compose-auctions.yml up -d
- name: run-acution-tests.sh
working-directory: tests/sdk_tests
run: ./run-auction-tests.sh
- name: reset containers for nameservice tests
working-directory: tests/sdk_tests
if: always()
run: docker compose -f docker-compose-auctions.yml down
- name: start auction containers
working-directory: tests/sdk_tests
run: docker compose -f docker-compose-nameservice.yml up -d
- name: run-nameservice-expiry-tests.sh
working-directory: tests/sdk_tests
run: ./run-nameservice-expiry-tests.sh
- name: reset containers for nameservice tests
working-directory: tests/sdk_tests
if: always()
run: docker compose -f docker-compose-nameservice.yml down
# integration_tests:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: cachix/install-nix-action@v18
# - uses: cachix/cachix-action@v12
# with:
# name: ethermint
# signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
# - uses: technote-space/get-diff-action@v6.1.2
# with:
# PATTERNS: |
# **/**.sol
# **/**.go
# go.mod
# go.sum
# tests/integration_tests/**
# - name: Run integration tests
# run: make run-integration-tests
# if: env.GIT_DIFF
# - name: 'Tar debug files'
# if: failure()
# run: tar cfz debug_files.tar.gz -C /tmp/pytest-of-runner .
# - uses: actions/upload-artifact@v3
# if: failure()
# with:
# name: debug-files
# path: debug_files.tar.gz
# if-no-files-found: ignore
# upload-cache:
# if: github.event_name == 'push'
# needs: ["integration_tests"]
# strategy:
# matrix:
# os: [macos-latest]
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v2
# - uses: cachix/install-nix-action@v18
# - uses: cachix/cachix-action@v12
# with:
# name: ethermint
# signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
# - name: 'instantiate integration test env'
# run: nix-store -r "$(nix-instantiate tests/integration_tests/shell.nix)"

View File

@ -6,13 +6,14 @@ run:
linters: linters:
enable: enable:
- bodyclose - bodyclose
# - depguard # 20231120 disable until https://github.com/golangci/golangci-lint/issues/3906 is released - depguard
- dogsled - dogsled
- dupl
- errcheck - errcheck
- goconst - goconst
- gocritic - gocritic
- gofumpt - gofumpt
# - revive # 20231120 overly sensitive unused detection - revive
- gosec - gosec
- gosimple - gosimple
- govet - govet

View File

@ -19,9 +19,6 @@ test/
tests/ tests/
*_test.go *_test.go
# false positive; TODO: https://github.com/cerc-io/laconicd/issues/104
testutil/network/network.go
# Semgrep rules folder # Semgrep rules folder
.semgrep .semgrep

View File

@ -1,14 +1,14 @@
FROM golang:alpine AS build-env FROM golang:alpine AS build-env
# Install dependencies # Set up dependencies
RUN apk add --update git build-base linux-headers ENV PACKAGES git build-base
# Set working directory for the build # Set working directory for the build
WORKDIR /go/src/github.com/cerc-io/laconicd WORKDIR /go/src/github.com/cerc-io/laconicd
# Cache Go modules # Install dependencies
COPY go.mod go.sum ./ RUN apk add --update $PACKAGES
RUN go mod download RUN apk add linux-headers
# Add source files # Add source files
COPY . . COPY . .
@ -21,10 +21,10 @@ FROM alpine:3.17.0
# Install ca-certificates # Install ca-certificates
RUN apk add --update ca-certificates jq curl RUN apk add --update ca-certificates jq curl
WORKDIR /
# Copy over binaries from the build-env # Copy over binaries from the build-env
COPY --from=build-env /go/src/github.com/cerc-io/laconicd/build/laconicd /usr/bin/laconicd COPY --from=build-env /go/src/github.com/cerc-io/laconicd/build/laconicd /usr/bin/laconicd
WORKDIR /
# Run laconicd by default # Run laconicd by default
CMD ["laconicd"] CMD ["laconicd"]

View File

@ -72,7 +72,7 @@ ifeq ($(ENABLE_ROCKSDB),true)
BUILD_TAGS += rocksdb_build BUILD_TAGS += rocksdb_build
test_tags += rocksdb_build test_tags += rocksdb_build
else else
$(info RocksDB support is disabled; to build and test with RocksDB support, set ENABLE_ROCKSDB=true) $(warning RocksDB support is disabled; to build and test with RocksDB support, set ENABLE_ROCKSDB=true)
endif endif
# DB backend selection # DB backend selection
@ -145,7 +145,7 @@ docker-build:
# update old container # update old container
docker rm laconicd || true docker rm laconicd || true
# create a new container from the latest image # create a new container from the latest image
docker create --name laconic -t -i ${DOCKER_IMAGE}:${DOCKER_TAG} laconicd docker create --name laconic -t -i cerc-io/laconicd:latest laconicd
# move the binaries to the ./build directory # move the binaries to the ./build directory
mkdir -p ./build/ mkdir -p ./build/
docker cp laconic:/usr/bin/laconicd ./build/ docker cp laconic:/usr/bin/laconicd ./build/
@ -237,7 +237,7 @@ endif
ifeq (, $(shell which go-bindata)) ifeq (, $(shell which go-bindata))
@echo "Installing go-bindata..." @echo "Installing go-bindata..."
@go get github.com/kevinburke/go-bindata/go-bindata@v3 @go get github.com/kevinburke/go-bindata/go-bindata
else else
@echo "go-bindata already installed; skipping..." @echo "go-bindata already installed; skipping..."
endif endif
@ -316,7 +316,7 @@ TEST_TARGETS := test-unit test-unit-cover test-race
# Test runs-specific rules. To add a new test target, just add # Test runs-specific rules. To add a new test target, just add
# a new rule, customise ARGS or TEST_PACKAGES ad libitum, and # a new rule, customise ARGS or TEST_PACKAGES ad libitum, and
# append the new rule to the TEST_TARGETS list. # append the new rule to the TEST_TARGETS list.
test-unit: ARGS=-timeout=10m -race -test.v -skip $(SKIP_UNIT_TESTS) test-unit: ARGS=-timeout=10m -race
test-unit: TEST_PACKAGES=$(PACKAGES_UNIT) test-unit: TEST_PACKAGES=$(PACKAGES_UNIT)
test-race: ARGS=-race test-race: ARGS=-race
@ -334,10 +334,10 @@ else
endif endif
test-import: test-import:
go test -run TestImporterTestSuite -timeout=20m -v --vet=off github.com/cerc-io/laconicd/tests/importer go test -run TestImporterTestSuite -v --vet=off github.com/cerc-io/laconicd/tests/importer
test-rpc: test-rpc:
./scripts/integration-test-all.sh -t "rpc" -q 1 -z 1 -s 10 -m "rpc" -r "true" ./scripts/integration-test-all.sh -t "rpc" -q 1 -z 1 -s 2 -m "rpc" -r "true"
run-integration-tests: run-integration-tests:
@nix-shell ./tests/integration_tests/shell.nix --run ./scripts/run-integration-tests.sh @nix-shell ./tests/integration_tests/shell.nix --run ./scripts/run-integration-tests.sh

View File

@ -2,7 +2,6 @@ package eip712
import ( import (
"bytes" "bytes"
"encoding/base64"
"encoding/json" "encoding/json"
"fmt" "fmt"
"math/big" "math/big"
@ -10,22 +9,22 @@ import (
"strings" "strings"
"time" "time"
errorsmod "cosmossdk.io/errors"
sdkmath "cosmossdk.io/math" sdkmath "cosmossdk.io/math"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519" "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
sdk "github.com/cosmos/cosmos-sdk/types"
errortypes "github.com/cosmos/cosmos-sdk/types/errors"
"golang.org/x/text/cases" "golang.org/x/text/cases"
"golang.org/x/text/language" "golang.org/x/text/language"
errorsmod "cosmossdk.io/errors"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
errortypes "github.com/cosmos/cosmos-sdk/types/errors"
registry "github.com/cerc-io/laconicd/x/registry/types"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/signer/core/apitypes" "github.com/ethereum/go-ethereum/signer/core/apitypes"
) )
const bytesStr = "bytes"
// WrapTxToTypedData is an ultimate method that wraps Amino-encoded Cosmos Tx JSON data // WrapTxToTypedData is an ultimate method that wraps Amino-encoded Cosmos Tx JSON data
// into an EIP712-compatible TypedData request. // into an EIP712-compatible TypedData request.
func WrapTxToTypedData( func WrapTxToTypedData(
@ -35,6 +34,25 @@ func WrapTxToTypedData(
data []byte, data []byte,
feeDelegation *FeeDelegationOptions, feeDelegation *FeeDelegationOptions,
) (apitypes.TypedData, error) { ) (apitypes.TypedData, error) {
txData := make(map[string]interface{})
if err := json.Unmarshal(data, &txData); err != nil {
return apitypes.TypedData{}, errorsmod.Wrap(errortypes.ErrJSONUnmarshal, "failed to JSON unmarshal data")
}
if txData["msgs"].([]interface{})[0].(map[string]interface{})["value"].(map[string]interface{})["payload"] != nil {
setRecordMsg := msg.(*registry.MsgSetRecord)
var attr []interface{}
for _, b := range setRecordMsg.Payload.Record.Attributes.Value {
attr = append(attr, fmt.Sprintf("%v", b))
}
txData["msgs"].([]interface{})[0].(map[string]interface{})["value"].(map[string]interface{})["payload"].(map[string]interface{})["record"].(map[string]interface{})["attributes"] = map[string]interface{}{ //nolint:lll
"type_url": setRecordMsg.Payload.Record.Attributes.TypeUrl,
"value": attr,
}
}
domain := apitypes.TypedDataDomain{ domain := apitypes.TypedDataDomain{
Name: "Cosmos Web3", Name: "Cosmos Web3",
Version: "1.0.0", Version: "1.0.0",
@ -48,13 +66,22 @@ func WrapTxToTypedData(
return apitypes.TypedData{}, err return apitypes.TypedData{}, err
} }
txData := make(map[string]interface{}) if msgTypes["TypePayloadRecord"] != nil {
if err := json.Unmarshal(data, &txData); err != nil { msgTypes["TypePayloadRecord"] = []apitypes.Type{
return apitypes.TypedData{}, errorsmod.Wrap(errortypes.ErrJSONUnmarshal, "failed to JSON unmarshal data") {Name: "id", Type: "string"},
{Name: "bond_id", Type: "string"},
{Name: "create_time", Type: "string"},
{Name: "expiry_time", Type: "string"},
{Name: "deleted", Type: "bool"},
{Name: "attributes", Type: "TypePayloadRecordAttributes"},
} }
}
if err := patchTxData(txData, msgTypes, "Tx"); err != nil { if msgTypes["TypePayloadRecordAttributes"] != nil {
return apitypes.TypedData{}, errorsmod.Wrap(errortypes.ErrJSONUnmarshal, "failed to patch JSON data") msgTypes["TypePayloadRecordAttributes"] = []apitypes.Type{
{Name: "type_url", Type: "string"},
{Name: "value", Type: "uint8[]"},
}
delete(msgTypes, "TypePayloadRecordAttributesValue")
} }
if feeDelegation != nil { if feeDelegation != nil {
@ -293,15 +320,10 @@ func traverseFields(
ethTyp := typToEth(fieldType) ethTyp := typToEth(fieldType)
if len(ethTyp) > 0 { if len(ethTyp) > 0 {
// Support array of uint64 // Support array of uint64
if isCollection { if isCollection && fieldType.Kind() != reflect.Slice && fieldType.Kind() != reflect.Array {
if fieldType.Kind() != reflect.Slice && fieldType.Kind() != reflect.Array {
ethTyp += "[]" ethTyp += "[]"
} }
// convert uint8[] to bytes
if fieldType.Kind() == reflect.Uint8 {
ethTyp = bytesStr
}
}
if prefix == typeDefPrefix { if prefix == typeDefPrefix {
typeMap[rootType] = append(typeMap[rootType], apitypes.Type{ typeMap[rootType] = append(typeMap[rootType], apitypes.Type{
Name: fieldName, Name: fieldName,
@ -444,13 +466,14 @@ func typToEth(typ reflect.Type) string {
return "uint32" return "uint32"
case reflect.Uint64: case reflect.Uint64:
return "uint64" return "uint64"
case reflect.Slice | reflect.Array: case reflect.Slice:
// Note: this case may never be reached due to previous handling in traverseFields
ethName := typToEth(typ.Elem()) ethName := typToEth(typ.Elem())
if len(ethName) > 0 { if len(ethName) > 0 {
if ethName == "uint8" { return ethName + "[]"
return bytesStr
} }
case reflect.Array:
ethName := typToEth(typ.Elem())
if len(ethName) > 0 {
return ethName + "[]" return ethName + "[]"
} }
case reflect.Ptr: case reflect.Ptr:
@ -487,77 +510,3 @@ func doRecover(err *error) {
*err = fmt.Errorf("%v", r) *err = fmt.Errorf("%v", r)
} }
} }
// Performs extra type conversions on JSON-decoded data accoding to the provided type definitions
// for compatibility with Geth's encoding
func patchTxData(data map[string]any, schema apitypes.Types, rootType string) error {
// Scan the data for any types that need to be converted.
// This is adapted from TypedData.EncodeData
for _, field := range schema[rootType] {
encType := field.Type
encValue := data[field.Name]
switch {
case encType[len(encType)-1:] == "]":
arrayValue, ok := encValue.([]interface{})
if !ok {
return dataMismatchError(encType, encValue)
}
parsedType := strings.Split(encType, "[")[0]
if schema[parsedType] != nil {
for _, item := range arrayValue {
mapValue, ok := item.(map[string]interface{})
if !ok {
return dataMismatchError(parsedType, item)
}
err := patchTxData(mapValue, schema, parsedType)
if err != nil {
return err
}
}
} else {
for i, item := range arrayValue {
converted, err := handleConversion(parsedType, item)
if err != nil {
return err
}
arrayValue[i] = converted
}
}
case schema[encType] != nil:
mapValue, ok := encValue.(map[string]interface{})
if !ok {
return dataMismatchError(encType, encValue)
}
err := patchTxData(mapValue, schema, encType)
if err != nil {
return err
}
default:
converted, err := handleConversion(encType, encValue)
if err != nil {
return err
}
data[field.Name] = converted
}
}
return nil
}
func handleConversion(encType string, encValue any) (any, error) {
if encType == bytesStr {
// Protobuf encodes byte strings in base64
if v, ok := encValue.(string); ok {
return base64.StdEncoding.DecodeString(v)
}
}
return encValue, nil
}
// dataMismatchError generates an error for a mismatch between
// the provided type and data
func dataMismatchError(encType string, encValue any) error {
return fmt.Errorf("provided data '%v' doesn't match type '%s'", encValue, encType)
}

View File

@ -4,25 +4,28 @@ import (
"testing" "testing"
"cosmossdk.io/math" "cosmossdk.io/math"
registrytypes "github.com/cerc-io/laconicd/x/registry/types"
"github.com/cerc-io/laconicd/ethereum/eip712"
"github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
"github.com/cosmos/cosmos-sdk/simapp/params" "github.com/cosmos/cosmos-sdk/simapp/params"
"github.com/ethereum/go-ethereum/crypto"
"github.com/cerc-io/laconicd/crypto/ethsecp256k1"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cerc-io/laconicd/app"
"github.com/cerc-io/laconicd/encoding"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
txtypes "github.com/cosmos/cosmos-sdk/types/tx" txtypes "github.com/cosmos/cosmos-sdk/types/tx"
"github.com/cosmos/cosmos-sdk/types/tx/signing" "github.com/cosmos/cosmos-sdk/types/tx/signing"
authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/stretchr/testify/suite" "github.com/stretchr/testify/suite"
"github.com/cerc-io/laconicd/app"
"github.com/cerc-io/laconicd/crypto/ethsecp256k1"
"github.com/cerc-io/laconicd/encoding"
"github.com/cerc-io/laconicd/ethereum/eip712"
) )
// Unit tests for single-signer EIP-712 signature verification. Multi-signer verification tests are included // Unit tests for single-signer EIP-712 signature verification. Multi-signer verification tests are included
@ -329,54 +332,6 @@ func (suite *EIP712TestSuite) TestEIP712SignatureVerification() {
sequence: 78, sequence: 78,
expectSuccess: false, expectSuccess: false,
}, },
// test laconic registry messages
{
title: "Succeeds - Standard MsgSetName",
fee: txtypes.Fee{
Amount: suite.makeCoins("aphoton", math.NewInt(2000)),
GasLimit: 100000,
},
memo: "",
msgs: []sdk.Msg{
registrytypes.NewMsgSetName(
"testcrn",
"testcid",
suite.createTestAddress(),
),
},
accountNumber: 25,
sequence: 78,
expectSuccess: true,
},
{
title: "Succeeds - Standard MsgSetRecord",
fee: txtypes.Fee{
Amount: suite.makeCoins("aphoton", math.NewInt(2000)),
GasLimit: 100000,
},
memo: "",
msgs: []sdk.Msg{
registrytypes.NewMsgSetRecord(
registrytypes.Payload{
Record: &registrytypes.Record{
Attributes: []byte("test attributes"),
},
Signatures: []registrytypes.Signature{
{
Sig: "fake sig",
PubKey: "fake pubkey",
},
},
},
"testbondid",
suite.createTestAddress(),
),
},
accountNumber: 25,
sequence: 78,
expectSuccess: true,
},
} }
for _, tc := range testCases { for _, tc := range testCases {

28
go.mod
View File

@ -27,8 +27,10 @@ require (
github.com/holiman/uint256 v1.2.1 github.com/holiman/uint256 v1.2.1
github.com/improbable-eng/grpc-web v0.15.0 github.com/improbable-eng/grpc-web v0.15.0
github.com/ipfs/go-cid v0.3.2 github.com/ipfs/go-cid v0.3.2
github.com/ipld/go-ipld-prime v0.19.0 github.com/ipfs/go-ipld-cbor v0.0.6
github.com/ipld/go-ipld-prime v0.18.0
github.com/miguelmota/go-ethereum-hdwallet v0.1.1 github.com/miguelmota/go-ethereum-hdwallet v0.1.1
github.com/multiformats/go-multihash v0.2.0
github.com/onsi/ginkgo/v2 v2.5.1 github.com/onsi/ginkgo/v2 v2.5.1
github.com/onsi/gomega v1.24.1 github.com/onsi/gomega v1.24.1
github.com/pkg/errors v0.9.1 github.com/pkg/errors v0.9.1
@ -43,8 +45,8 @@ require (
github.com/tendermint/tm-db v0.6.7 github.com/tendermint/tm-db v0.6.7
github.com/tyler-smith/go-bip39 v1.1.0 github.com/tyler-smith/go-bip39 v1.1.0
github.com/vektah/gqlparser/v2 v2.5.1 github.com/vektah/gqlparser/v2 v2.5.1
golang.org/x/net v0.7.0 golang.org/x/net v0.4.0
golang.org/x/text v0.7.0 golang.org/x/text v0.5.0
google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c
google.golang.org/grpc v1.51.0 google.golang.org/grpc v1.51.0
google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8
@ -65,7 +67,7 @@ require (
github.com/VictoriaMetrics/fastcache v1.6.0 // indirect github.com/VictoriaMetrics/fastcache v1.6.0 // indirect
github.com/Workiva/go-datastructures v1.0.53 // indirect github.com/Workiva/go-datastructures v1.0.53 // indirect
github.com/agnivade/levenshtein v1.1.1 // indirect github.com/agnivade/levenshtein v1.1.1 // indirect
github.com/aws/aws-sdk-go v1.44.122 // indirect github.com/aws/aws-sdk-go v1.40.45 // indirect
github.com/beorn7/perks v1.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect github.com/bgentry/speakeasy v0.1.0 // indirect
@ -121,7 +123,7 @@ require (
github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/merlin v0.1.1 // indirect
github.com/gtank/ristretto255 v0.1.2 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-getter v1.7.0 // indirect github.com/hashicorp/go-getter v1.6.1 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect
@ -131,10 +133,12 @@ require (
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/huin/goupnp v1.0.3 // indirect github.com/huin/goupnp v1.0.3 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/ipfs/go-block-format v0.0.2 // indirect
github.com/ipfs/go-ipfs-util v0.0.1 // indirect
github.com/ipfs/go-ipld-format v0.0.1 // indirect
github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect
github.com/kevinburke/go-bindata v3.24.0+incompatible // indirect
github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d // indirect github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d // indirect
github.com/klauspost/compress v1.15.11 // indirect github.com/klauspost/compress v1.15.11 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/klauspost/cpuid/v2 v2.0.9 // indirect
@ -150,14 +154,13 @@ require (
github.com/minio/highwayhash v1.0.2 // indirect github.com/minio/highwayhash v1.0.2 // indirect
github.com/minio/sha256-simd v1.0.0 // indirect github.com/minio/sha256-simd v1.0.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/go-testing-interface v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect
github.com/mtibben/percent v0.2.1 // indirect github.com/mtibben/percent v0.2.1 // indirect
github.com/multiformats/go-base32 v0.0.3 // indirect github.com/multiformats/go-base32 v0.0.3 // indirect
github.com/multiformats/go-base36 v0.1.0 // indirect github.com/multiformats/go-base36 v0.1.0 // indirect
github.com/multiformats/go-multibase v0.0.3 // indirect github.com/multiformats/go-multibase v0.0.3 // indirect
github.com/multiformats/go-multihash v0.2.1 // indirect
github.com/multiformats/go-varint v0.0.6 // indirect github.com/multiformats/go-varint v0.0.6 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml v1.9.5 // indirect
@ -188,17 +191,18 @@ require (
github.com/tendermint/go-amino v0.16.0 // indirect github.com/tendermint/go-amino v0.16.0 // indirect
github.com/tklauser/go-sysconf v0.3.10 // indirect github.com/tklauser/go-sysconf v0.3.10 // indirect
github.com/tklauser/numcpus v0.4.0 // indirect github.com/tklauser/numcpus v0.4.0 // indirect
github.com/ulikunitz/xz v0.5.10 // indirect github.com/ulikunitz/xz v0.5.8 // indirect
github.com/whyrusleeping/cbor-gen v0.0.0-20200123233031-1cdf64d27158 // indirect
github.com/zondax/hid v0.9.1 // indirect github.com/zondax/hid v0.9.1 // indirect
github.com/zondax/ledger-go v0.14.0 // indirect github.com/zondax/ledger-go v0.14.0 // indirect
go.etcd.io/bbolt v1.3.6 // indirect go.etcd.io/bbolt v1.3.6 // indirect
go.opencensus.io v0.24.0 // indirect go.opencensus.io v0.24.0 // indirect
golang.org/x/crypto v0.4.0 // indirect golang.org/x/crypto v0.4.0 // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/oauth2 v0.1.0 // indirect golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect
golang.org/x/sync v0.1.0 // indirect golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.5.0 // indirect golang.org/x/sys v0.3.0 // indirect
golang.org/x/term v0.5.0 // indirect golang.org/x/term v0.3.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.103.0 // indirect google.golang.org/api v0.103.0 // indirect
google.golang.org/appengine v1.6.7 // indirect google.golang.org/appengine v1.6.7 // indirect

433
go.sum
View File

@ -19,177 +19,36 @@ cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHOb
cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI=
cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk=
cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY=
cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=
cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=
cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=
cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY=
cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM=
cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY=
cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ=
cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI=
cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4=
cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc=
cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA=
cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A=
cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc=
cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU=
cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA=
cloud.google.com/go v0.105.0 h1:DNtEKRBAAzeS4KyIory52wWHuClNaXJ5x1F7xa4q+5Y= cloud.google.com/go v0.105.0 h1:DNtEKRBAAzeS4KyIory52wWHuClNaXJ5x1F7xa4q+5Y=
cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM=
cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw=
cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY=
cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI=
cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4=
cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4=
cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0=
cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ=
cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk=
cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o=
cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s=
cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0=
cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY=
cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw=
cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI=
cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0=
cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8=
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA=
cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= cloud.google.com/go/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o=
cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY=
cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s=
cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM=
cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI=
cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY=
cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI=
cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow=
cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM=
cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M=
cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s=
cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU=
cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U=
cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU=
cloud.google.com/go/compute v1.13.0 h1:AYrLkB8NPdDRslNp4Jxmzrhdr03fUAIDbiGFjLWowoU= cloud.google.com/go/compute v1.13.0 h1:AYrLkB8NPdDRslNp4Jxmzrhdr03fUAIDbiGFjLWowoU=
cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE=
cloud.google.com/go/compute/metadata v0.2.1 h1:efOwf5ymceDhK6PKMnnrTHP4pppY5L22mle96M1yP48= cloud.google.com/go/compute/metadata v0.2.1 h1:efOwf5ymceDhK6PKMnnrTHP4pppY5L22mle96M1yP48=
cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM=
cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I=
cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4=
cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0=
cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs=
cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc=
cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM=
cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ=
cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo=
cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE=
cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I=
cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ=
cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo=
cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA=
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo=
cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ=
cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4=
cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0=
cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8=
cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU=
cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU=
cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y=
cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg=
cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk=
cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w=
cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk=
cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg=
cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM=
cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA=
cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o=
cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A=
cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0=
cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0=
cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc=
cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY=
cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc=
cloud.google.com/go/iam v0.8.0 h1:E2osAkZzxI/+8pZcxVLcDtAQx/u+hZXVryUaYQ5O0Kk= cloud.google.com/go/iam v0.8.0 h1:E2osAkZzxI/+8pZcxVLcDtAQx/u+hZXVryUaYQ5O0Kk=
cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE= cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE=
cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic=
cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI=
cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8=
cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08=
cloud.google.com/go/longrunning v0.3.0 h1:NjljC+FYPV3uh5/OwWT6pVU+doBqMg2x/rZlE+CamDs= cloud.google.com/go/longrunning v0.3.0 h1:NjljC+FYPV3uh5/OwWT6pVU+doBqMg2x/rZlE+CamDs=
cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4=
cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w=
cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE=
cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM=
cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY=
cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s=
cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA=
cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o=
cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ=
cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU=
cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY=
cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34=
cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs=
cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg=
cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E=
cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU=
cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0=
cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA=
cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0=
cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI=
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4=
cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o=
cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk=
cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo=
cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg=
cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4=
cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg=
cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c=
cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y=
cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A=
cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4=
cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY=
cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s=
cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI=
cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA=
cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4=
cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0=
cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU=
cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU=
cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc=
cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs=
cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg=
cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM=
cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ=
cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo=
cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y=
cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc=
cloud.google.com/go/storage v1.27.0 h1:YOO045NZI9RKfCj1c5A/ZtuuENUc8OAW+gHdGnDgyMQ= cloud.google.com/go/storage v1.27.0 h1:YOO045NZI9RKfCj1c5A/ZtuuENUc8OAW+gHdGnDgyMQ=
cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s=
cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw=
cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g=
cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU=
cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4=
cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0=
cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo=
cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo=
cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE=
cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg=
cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0=
cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M=
collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE=
cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w= cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w=
cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE= cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE=
@ -274,9 +133,10 @@ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A=
github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU=
github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM=
github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.44.122 h1:p6mw01WBaNpbdP2xrisz5tIkcNwzj/HysobNoaAHjgo= github.com/aws/aws-sdk-go v1.40.45 h1:QN1nsY27ssD/JmW4s83qmSb+uL6DG4GmCDzjmJB4xUI=
github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q=
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g=
github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo=
github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y=
@ -353,12 +213,6 @@ github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3h
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E=
github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw=
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
@ -476,10 +330,6 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/ethereum/go-ethereum v1.10.4/go.mod h1:nEE0TP5MtxGzOMd7egIrbPJMQBnhVU3ELNxhBglIzhg= github.com/ethereum/go-ethereum v1.10.4/go.mod h1:nEE0TP5MtxGzOMd7egIrbPJMQBnhVU3ELNxhBglIzhg=
github.com/ethereum/go-ethereum v1.10.17/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0= github.com/ethereum/go-ethereum v1.10.17/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0=
@ -590,9 +440,7 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt
github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@ -609,7 +457,6 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
@ -634,9 +481,6 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI=
@ -648,7 +492,6 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/martian/v3 v3.2.1 h1:d8MncMlErDFTwQGBK1xhv026j9kqhvw1Qv9IbWT1VLQ= github.com/google/martian/v3 v3.2.1 h1:d8MncMlErDFTwQGBK1xhv026j9kqhvw1Qv9IbWT1VLQ=
github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=
github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us=
github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
@ -661,11 +504,6 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf
github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
@ -674,22 +512,12 @@ github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8=
github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8=
github.com/googleapis/enterprise-certificate-proxy v0.2.0 h1:y8Yozv7SZtlU//QXbezB6QkpuE6jMD2/gfzk4AftXjs= github.com/googleapis/enterprise-certificate-proxy v0.2.0 h1:y8Yozv7SZtlU//QXbezB6QkpuE6jMD2/gfzk4AftXjs=
github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0=
github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM=
github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM=
github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM=
github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c=
github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo=
github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY=
github.com/googleapis/gax-go/v2 v2.7.0 h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ= github.com/googleapis/gax-go/v2 v2.7.0 h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ=
github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8=
github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4=
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
@ -723,6 +551,8 @@ github.com/gtank/merlin v0.1.1 h1:eQ90iG7K9pOhtereWsmyRJ6RAwcP4tHTDBHXNg+u5is=
github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s=
github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc=
github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o=
github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU=
github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48=
github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE=
github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
@ -732,8 +562,8 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/go-getter v1.7.0 h1:bzrYP+qu/gMrL1au7/aDvkoOVGUJpeKBgbqRHACAFDY= github.com/hashicorp/go-getter v1.6.1 h1:NASsgP4q6tL94WH6nJxKWj8As2H/2kop/bB1d8JMyRY=
github.com/hashicorp/go-getter v1.7.0/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-getter v1.6.1/go.mod h1:IZCrswsZPeWv9IkVnLElzRU/gz/QPi6pZHn4tv6vbwA=
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc=
github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
@ -748,6 +578,7 @@ github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdv
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE=
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek=
github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
@ -796,10 +627,20 @@ github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19y
github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE=
github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0=
github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po=
github.com/ipfs/go-block-format v0.0.2 h1:qPDvcP19izTjU8rgo6p7gTXZlkMkF5bz5G3fqIsSCPE=
github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY=
github.com/ipfs/go-cid v0.0.1/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM=
github.com/ipfs/go-cid v0.0.3/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM=
github.com/ipfs/go-cid v0.3.2 h1:OGgOd+JCFM+y1DjWPmVH+2/4POtpDzwcr7VgnB7mZXc= github.com/ipfs/go-cid v0.3.2 h1:OGgOd+JCFM+y1DjWPmVH+2/4POtpDzwcr7VgnB7mZXc=
github.com/ipfs/go-cid v0.3.2/go.mod h1:gQ8pKqT/sUxGY+tIwy1RPpAojYu7jAyCp5Tz1svoupw= github.com/ipfs/go-cid v0.3.2/go.mod h1:gQ8pKqT/sUxGY+tIwy1RPpAojYu7jAyCp5Tz1svoupw=
github.com/ipld/go-ipld-prime v0.19.0 h1:5axC7rJmPc17Emw6TelxGwnzALk0PdupZ2oj2roDj04= github.com/ipfs/go-ipfs-util v0.0.1 h1:Wz9bL2wB2YBJqggkA4dD7oSmqB4cAnpNbGrlHJulv50=
github.com/ipld/go-ipld-prime v0.19.0/go.mod h1:Q9j3BaVXwaA3o5JUDNvptDDr/x8+F7FG6XJ8WI3ILg4= github.com/ipfs/go-ipfs-util v0.0.1/go.mod h1:spsl5z8KUnrve+73pOhSVZND1SIxPW5RyBCNzQxlJBc=
github.com/ipfs/go-ipld-cbor v0.0.6 h1:pYuWHyvSpIsOOLw4Jy7NbBkCyzLDcl64Bf/LZW7eBQ0=
github.com/ipfs/go-ipld-cbor v0.0.6/go.mod h1:ssdxxaLJPXH7OjF5V4NSjBbcfh+evoR4ukuru0oPXMA=
github.com/ipfs/go-ipld-format v0.0.1 h1:HCu4eB/Gh+KD/Q0M8u888RFkorTWNIL3da4oc5dwc80=
github.com/ipfs/go-ipld-format v0.0.1/go.mod h1:kyJtbkDALmFHv3QR6et67i35QzO3S0dCDnkOJhcZkms=
github.com/ipld/go-ipld-prime v0.18.0 h1:xUk7NUBSWHEXdjiOu2sLXouFJOMs0yoYzeI5RAqhYQo=
github.com/ipld/go-ipld-prime v0.18.0/go.mod h1:735yXW548CKrLwVCYXzqx90p5deRJMVVxM9eJ4Qe+qE=
github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=
github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus=
github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=
@ -807,6 +648,7 @@ github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1C
github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jhump/protoreflect v1.12.1-0.20220721211354-060cc04fc18b h1:izTof8BKh/nE1wrKOrloNA5q4odOarjf+Xpe+4qow98= github.com/jhump/protoreflect v1.12.1-0.20220721211354-060cc04fc18b h1:izTof8BKh/nE1wrKOrloNA5q4odOarjf+Xpe+4qow98=
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
@ -828,6 +670,7 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o=
github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
@ -836,12 +679,6 @@ github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E
github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0=
github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU=
github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU=
github.com/kevinburke/go-bindata v1.1.0 h1:JZ8XIdxtkAszuYkgf17qwQzcU/RgsGSVLSULJdN+5bU=
github.com/kevinburke/go-bindata v1.1.0/go.mod h1:UJ72WTOoRKzbz+vwtKgARJwsy+1ZGUukVBUCc197TJo=
github.com/kevinburke/go-bindata v3.22.0+incompatible h1:/JmqEhIWQ7GRScV0WjX/0tqBrC5D21ALg0H0U/KZ/ts=
github.com/kevinburke/go-bindata v3.22.0+incompatible/go.mod h1:/pEEZ72flUW2p0yi30bslSp9YqD9pysLxunQDdb2CPM=
github.com/kevinburke/go-bindata v3.24.0+incompatible h1:qajFA3D0pH94OTLU4zcCCKCDgR+Zr2cZK/RPJHDdFoY=
github.com/kevinburke/go-bindata v3.24.0+incompatible/go.mod h1:/pEEZ72flUW2p0yi30bslSp9YqD9pysLxunQDdb2CPM=
github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM= github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM=
github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM=
github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc=
@ -850,6 +687,7 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o
github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4=
github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.11.2/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c= github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c=
@ -932,17 +770,19 @@ github.com/miguelmota/go-ethereum-hdwallet v0.1.1/go.mod h1:f9m9uXokAHA6WNoYOPjj
github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM=
github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94=
github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM=
github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ=
github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g=
github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY=
github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U=
github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM=
github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g=
github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0=
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU=
github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8=
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
@ -962,6 +802,7 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8=
github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8=
github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o=
github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg=
@ -971,11 +812,14 @@ github.com/multiformats/go-base32 v0.0.3 h1:tw5+NhuwaOjJCC5Pp82QuXbrmLzWg7uxlMFp
github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA= github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA=
github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4= github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4=
github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM=
github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs=
github.com/multiformats/go-multibase v0.0.3 h1:l/B6bJDQjvQ5G52jw4QGSYeOTZoAwIO77RblWplfIqk= github.com/multiformats/go-multibase v0.0.3 h1:l/B6bJDQjvQ5G52jw4QGSYeOTZoAwIO77RblWplfIqk=
github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc= github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc=
github.com/multiformats/go-multicodec v0.6.0 h1:KhH2kSuCARyuJraYMFxrNO3DqIaYhOdS039kbhgVwpE= github.com/multiformats/go-multicodec v0.5.0 h1:EgU6cBe/D7WRwQb1KmnBvU7lrcFGMggZVTPtOW9dDHs=
github.com/multiformats/go-multihash v0.2.1 h1:aem8ZT0VA2nCHHk7bPJ1BjUbHNciqZC/d16Vve9l108= github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U=
github.com/multiformats/go-multihash v0.2.1/go.mod h1:WxoMcYG85AZVQUyRyo9s4wULvW5qrI9vb2Lt6evduFc= github.com/multiformats/go-multihash v0.0.10/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew=
github.com/multiformats/go-multihash v0.2.0 h1:oytJb9ZA1OUW0r0f9ea18GiaPOo4SXyc7p2movyUuo4=
github.com/multiformats/go-multihash v0.2.0/go.mod h1:WxoMcYG85AZVQUyRyo9s4wULvW5qrI9vb2Lt6evduFc=
github.com/multiformats/go-varint v0.0.6 h1:gk85QWKxh3TazbLxED/NlDVv8+q+ReFJk7Y2W/KhfNY= github.com/multiformats/go-varint v0.0.6 h1:gk85QWKxh3TazbLxED/NlDVv8+q+ReFJk7Y2W/KhfNY=
github.com/multiformats/go-varint v0.0.6/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.6/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
@ -1057,6 +901,7 @@ github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qR
github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/polydawn/refmt v0.0.0-20190221155625-df39d6c2d992/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o=
github.com/polydawn/refmt v0.0.0-20201211092308-30ac6d18308e h1:ZOcivgkkFRnjfoTcGsDq3UQYiBmekwLA+qg0OjyB/ls= github.com/polydawn/refmt v0.0.0-20201211092308-30ac6d18308e h1:ZOcivgkkFRnjfoTcGsDq3UQYiBmekwLA+qg0OjyB/ls=
github.com/polydawn/refmt v0.0.0-20201211092308-30ac6d18308e/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/polydawn/refmt v0.0.0-20201211092308-30ac6d18308e/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
@ -1149,6 +994,7 @@ github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v0.0.0-20190222223459-a17d461953aa/go.mod h1:2RVY1rIf+2J2o/IM9+vPq9RzmHDSseB7FoXiSNIUsoU=
github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
@ -1239,8 +1085,8 @@ github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVM
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ=
github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY=
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
@ -1254,7 +1100,10 @@ github.com/vektah/gqlparser/v2 v2.5.1 h1:ZGu+bquAY23jsxDRcYpWjttRZrUz07LbiY77gUO
github.com/vektah/gqlparser/v2 v2.5.1/go.mod h1:mPgqFBu/woKTVYWyNk8cO3kh4S/f4aRFZrvOnp3hmCs= github.com/vektah/gqlparser/v2 v2.5.1/go.mod h1:mPgqFBu/woKTVYWyNk8cO3kh4S/f4aRFZrvOnp3hmCs=
github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc=
github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=
github.com/warpfork/go-wish v0.0.0-20180510122957-5ad1f5abf436/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw=
github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a h1:G++j5e0OC488te356JvdhaM8YS6nMsjLAYF7JxCv07w= github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a h1:G++j5e0OC488te356JvdhaM8YS6nMsjLAYF7JxCv07w=
github.com/whyrusleeping/cbor-gen v0.0.0-20200123233031-1cdf64d27158 h1:WXhVOwj2USAXB5oMDwRl3piOux2XMV9TANaYxXHdkoE=
github.com/whyrusleeping/cbor-gen v0.0.0-20200123233031-1cdf64d27158/go.mod h1:Xj/M2wWU+QdTdRbu/L/1dIZY8/Wb2K9pAhtroQuxJJI=
github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg=
@ -1285,10 +1134,8 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
@ -1302,10 +1149,12 @@ golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnf
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
@ -1353,7 +1202,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu
golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
@ -1416,27 +1264,17 @@ golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v
golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU=
golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@ -1446,23 +1284,10 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ
golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 h1:nt+Q6cXKz4MosCSpnbMtqiQ8Oz0pxTef2B4Vca2lvfk=
golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE=
golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE=
golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg=
golang.org/x/oauth2 v0.1.0 h1:isLCZuhj4v+tYv7eskaN4v/TM+A1begWWgyVJDdl1+Y=
golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@ -1474,9 +1299,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@ -1490,6 +1313,7 @@ golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@ -1542,60 +1366,37 @@ golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220517195934-5e4e11fc645e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI=
golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@ -1606,9 +1407,8 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM=
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@ -1674,10 +1474,6 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
@ -1686,9 +1482,6 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk=
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
@ -1717,35 +1510,6 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513
google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg=
google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=
google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8=
google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=
google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=
google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo=
google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4=
google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw=
google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU=
google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k=
google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI=
google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I=
google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo=
google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g=
google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA=
google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8=
google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs=
google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA=
google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA=
google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw=
google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg=
google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o=
google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g=
google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw=
google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw=
google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI=
google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s=
google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s=
google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s=
google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70=
google.golang.org/api v0.103.0 h1:9yuVqlu2JCvcLg9p8S3fcFLZij8EPSyvODIY1rkMizQ= google.golang.org/api v0.103.0 h1:9yuVqlu2JCvcLg9p8S3fcFLZij8EPSyvODIY1rkMizQ=
google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
@ -1800,73 +1564,7 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A=
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24=
google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k=
google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k=
google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w=
google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E=
google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4=
google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4=
google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4=
google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4=
google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA=
google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA=
google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA=
google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA=
google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA=
google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE=
google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc=
google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk=
google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk=
google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk=
google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk=
google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk=
google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo=
google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo=
google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo=
google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo=
google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo=
google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw=
google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI=
google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI=
google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U=
google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM=
google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM=
google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s=
google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c h1:S34D59DS2GWOEwWNt4fYmTcFrtlOgukG2k9WsomZ7tg= google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c h1:S34D59DS2GWOEwWNt4fYmTcFrtlOgukG2k9WsomZ7tg=
google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
@ -1893,27 +1591,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U=
google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@ -1926,9 +1605,7 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 h1:KR8+MyP7/qOlV+8Af01LtjL04bu7on42eVsxT4EyBQk= google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 h1:KR8+MyP7/qOlV+8Af01LtjL04bu7on42eVsxT4EyBQk=
google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,5 @@
# .gqlgen.yml example
#
# Refer to https://gqlgen.com/config/ # Refer to https://gqlgen.com/config/
# for detailed .gqlgen.yml documentation. # for detailed .gqlgen.yml documentation.
@ -10,8 +12,3 @@ model:
resolver: resolver:
filename: resolver.go filename: resolver.go
type: Resolver type: Resolver
models:
Link:
model:
- github.com/cerc-io/laconicd/gql.Link

View File

@ -2,10 +2,6 @@
package gql package gql
type Value interface {
IsValue()
}
type Account struct { type Account struct {
Address string `json:"address"` Address string `json:"address"`
PubKey *string `json:"pubKey"` PubKey *string `json:"pubKey"`
@ -14,17 +10,6 @@ type Account struct {
Balance []*Coin `json:"balance"` Balance []*Coin `json:"balance"`
} }
type ArrayValue struct {
Value []Value `json:"value"`
}
func (ArrayValue) IsValue() {}
type Attribute struct {
Key string `json:"key"`
Value Value `json:"value"`
}
type Auction struct { type Auction struct {
ID string `json:"id"` ID string `json:"id"`
Status string `json:"status"` Status string `json:"status"`
@ -68,52 +53,21 @@ type Bond struct {
Balance []*Coin `json:"balance"` Balance []*Coin `json:"balance"`
} }
type BooleanValue struct {
Value bool `json:"value"`
}
func (BooleanValue) IsValue() {}
type BytesValue struct {
Value string `json:"value"`
}
func (BytesValue) IsValue() {}
type Coin struct { type Coin struct {
Type string `json:"type"` Type string `json:"type"`
Quantity string `json:"quantity"` Quantity string `json:"quantity"`
} }
type FloatValue struct { type KeyValue struct {
Value float64 `json:"value"` Key string `json:"key"`
Value *Value `json:"value"`
} }
func (FloatValue) IsValue() {}
type IntValue struct {
Value int `json:"value"`
}
func (IntValue) IsValue() {}
type KeyValueInput struct { type KeyValueInput struct {
Key string `json:"key"` Key string `json:"key"`
Value *ValueInput `json:"value"` Value *ValueInput `json:"value"`
} }
type LinkValue struct {
Value Link `json:"value"`
}
func (LinkValue) IsValue() {}
type MapValue struct {
Value []*Attribute `json:"value"`
}
func (MapValue) IsValue() {}
type NameRecord struct { type NameRecord struct {
Latest *NameRecordEntry `json:"latest"` Latest *NameRecordEntry `json:"latest"`
History []*NameRecordEntry `json:"history"` History []*NameRecordEntry `json:"history"`
@ -148,10 +102,18 @@ type Record struct {
CreateTime string `json:"createTime"` CreateTime string `json:"createTime"`
ExpiryTime string `json:"expiryTime"` ExpiryTime string `json:"expiryTime"`
Owners []string `json:"owners"` Owners []string `json:"owners"`
Attributes []*Attribute `json:"attributes"` Attributes []*KeyValue `json:"attributes"`
References []*Record `json:"references"` References []*Record `json:"references"`
} }
type Reference struct {
ID string `json:"id"`
}
type ReferenceInput struct {
ID string `json:"id"`
}
type Status struct { type Status struct {
Version string `json:"version"` Version string `json:"version"`
Node *NodeInfo `json:"node"` Node *NodeInfo `json:"node"`
@ -163,12 +125,6 @@ type Status struct {
DiskUsage string `json:"disk_usage"` DiskUsage string `json:"disk_usage"`
} }
type StringValue struct {
Value string `json:"value"`
}
func (StringValue) IsValue() {}
type SyncInfo struct { type SyncInfo struct {
LatestBlockHash string `json:"latest_block_hash"` LatestBlockHash string `json:"latest_block_hash"`
LatestBlockHeight string `json:"latest_block_height"` LatestBlockHeight string `json:"latest_block_height"`
@ -182,12 +138,23 @@ type ValidatorInfo struct {
ProposerPriority *string `json:"proposer_priority"` ProposerPriority *string `json:"proposer_priority"`
} }
type ValueInput struct { type Value struct {
Null *bool `json:"null"`
Int *int `json:"int"` Int *int `json:"int"`
Float *float64 `json:"float"` Float *float64 `json:"float"`
String *string `json:"string"` String *string `json:"string"`
Boolean *bool `json:"boolean"` Boolean *bool `json:"boolean"`
Link *Link `json:"link"` JSON *string `json:"json"`
Array []*ValueInput `json:"array"` Reference *Reference `json:"reference"`
Map []*KeyValueInput `json:"map"` Values []*Value `json:"values"`
}
type ValueInput struct {
Null *bool `json:"null"`
Int *int `json:"int"`
Float *float64 `json:"float"`
String *string `json:"string"`
Boolean *bool `json:"boolean"`
Reference *ReferenceInput `json:"reference"`
Values []*ValueInput `json:"values"`
} }

View File

@ -121,7 +121,7 @@ func (q queryResolver) QueryRecords(ctx context.Context, attributes []*KeyValueI
res, err := nsQueryClient.ListRecords( res, err := nsQueryClient.ListRecords(
context.Background(), context.Background(),
&registrytypes.QueryListRecordsRequest{ &registrytypes.QueryListRecordsRequest{
Attributes: toRPCAttributes(attributes), Attributes: parseRequestAttributes(attributes),
All: (all != nil && *all), All: (all != nil && *all),
}, },
) )

View File

@ -1,33 +0,0 @@
package gql
import (
"context"
"encoding/json"
"fmt"
"io"
)
// Represents an IPLD link. Links are generally but not necessarily implemented as CIDs
type Link string
func (l Link) String() string {
return string(l)
}
// UnmarshalGQLContext implements the graphql.ContextUnmarshaler interface
func (l *Link) UnmarshalGQLContext(_ context.Context, v interface{}) error {
s, ok := v.(string)
if !ok {
return fmt.Errorf("Link must be a string")
}
*l = Link(s)
return nil
}
// MarshalGQLContext implements the graphql.ContextMarshaler interface
func (l Link) MarshalGQLContext(_ context.Context, w io.Writer) error {
encodable := map[string]string{
"/": l.String(),
}
return json.NewEncoder(w).Encode(encodable)
}

View File

@ -2,15 +2,15 @@ package gql
import ( import (
"context" "context"
"fmt" // #nosec G702 "encoding/json"
"fmt"
"reflect" // #nosec G702
"strconv" "strconv"
auctiontypes "github.com/cerc-io/laconicd/x/auction/types" auctiontypes "github.com/cerc-io/laconicd/x/auction/types"
bondtypes "github.com/cerc-io/laconicd/x/bond/types" bondtypes "github.com/cerc-io/laconicd/x/bond/types"
registrytypes "github.com/cerc-io/laconicd/x/registry/types" registrytypes "github.com/cerc-io/laconicd/x/registry/types"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/ipld/go-ipld-prime"
"github.com/ipld/go-ipld-prime/codec/dagjson"
) )
// OwnerAttributeName denotes the owner attribute name for a bond. // OwnerAttributeName denotes the owner attribute name for a bond.
@ -61,21 +61,13 @@ func getGQLRecord(ctx context.Context, resolver QueryResolver, record registryty
return nil, nil return nil, nil
} }
node, err := ipld.Decode(record.Attributes, dagjson.Decode) recordType := record.ToRecordType()
if err != nil { attributes, err := getAttributes(&recordType)
return nil, err
}
if node.Kind() != ipld.Kind_Map {
return nil, fmt.Errorf("invalid record attributes")
}
var links []string
attributes, err := resolveIPLDNode(node, &links)
if err != nil { if err != nil {
return nil, err return nil, err
} }
references, err := resolver.GetRecordsByIds(ctx, links) references, err := getReferences(ctx, resolver, &recordType)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -87,96 +79,11 @@ func getGQLRecord(ctx context.Context, resolver QueryResolver, record registryty
ExpiryTime: record.GetExpiryTime(), ExpiryTime: record.GetExpiryTime(),
Owners: record.GetOwners(), Owners: record.GetOwners(),
Names: record.GetNames(), Names: record.GetNames(),
Attributes: attributes.(MapValue).Value, Attributes: attributes,
References: references, References: references,
}, nil }, nil
} }
func resolveIPLDNode(node ipld.Node, links *[]string) (Value, error) {
switch node.Kind() {
case ipld.Kind_Map:
var entries []*Attribute
for itr := node.MapIterator(); !itr.Done(); {
k, v, err := itr.Next()
if err != nil {
return nil, err
}
if k.Kind() != ipld.Kind_String {
return nil, fmt.Errorf("invalid record attribute key type: %s", k.Kind())
}
s, err := k.AsString()
if err != nil {
return nil, err
}
val, err := resolveIPLDNode(v, links)
if err != nil {
return nil, err
}
entries = append(entries, &Attribute{
Key: s,
Value: val,
})
}
return MapValue{entries}, nil
case ipld.Kind_List:
var values []Value
for itr := node.ListIterator(); !itr.Done(); {
_, v, err := itr.Next()
if err != nil {
return nil, err
}
val, err := resolveIPLDNode(v, links)
if err != nil {
return nil, err
}
values = append(values, val)
}
return ArrayValue{values}, nil
case ipld.Kind_Null:
return nil, nil
case ipld.Kind_Bool:
val, err := node.AsBool()
if err != nil {
return nil, err
}
return BooleanValue{val}, nil
case ipld.Kind_Int:
val, err := node.AsInt()
if err != nil {
return nil, err
}
// TODO: handle bigger ints
return IntValue{int(val)}, nil
case ipld.Kind_Float:
val, err := node.AsFloat()
if err != nil {
return nil, err
}
return FloatValue{val}, nil
case ipld.Kind_String:
val, err := node.AsString()
if err != nil {
return nil, err
}
return StringValue{val}, nil
case ipld.Kind_Bytes:
val, err := node.AsBytes()
if err != nil {
return nil, err
}
return BytesValue{string(val)}, nil
case ipld.Kind_Link:
val, err := node.AsLink()
if err != nil {
return nil, err
}
*links = append(*links, val.String())
return LinkValue{Link(val.String())}, nil
default:
return nil, fmt.Errorf("invalid node kind")
}
}
func getGQLNameRecord(record *registrytypes.NameRecord) (*NameRecord, error) { func getGQLNameRecord(record *registrytypes.NameRecord) (*NameRecord, error) {
if record == nil { if record == nil {
return nil, fmt.Errorf("got nil record") return nil, fmt.Errorf("got nil record")
@ -256,47 +163,136 @@ func GetGQLAuction(auction *auctiontypes.Auction, bids []*auctiontypes.Bid) (*Au
return &gqlAuction, nil return &gqlAuction, nil
} }
func toRPCValue(value *ValueInput) *registrytypes.QueryListRecordsRequest_ValueInput { func getReferences(ctx context.Context, resolver QueryResolver, r *registrytypes.RecordType) ([]*Record, error) {
var rpcval registrytypes.QueryListRecordsRequest_ValueInput var ids []string
switch { // #nosec G705
case value == nil: for key := range r.Attributes {
return nil //nolint: all
case value.Int != nil: switch r.Attributes[key].(type) {
rpcval.Value = &registrytypes.QueryListRecordsRequest_ValueInput_Int{Int: int64(*value.Int)} case interface{}:
case value.Float != nil: if obj, ok := r.Attributes[key].(map[string]interface{}); ok {
rpcval.Value = &registrytypes.QueryListRecordsRequest_ValueInput_Float{Float: *value.Float} if _, ok := obj["/"]; ok && len(obj) == 1 {
case value.String != nil: if _, ok := obj["/"].(string); ok {
rpcval.Value = &registrytypes.QueryListRecordsRequest_ValueInput_String_{String_: *value.String} ids = append(ids, obj["/"].(string))
case value.Boolean != nil:
rpcval.Value = &registrytypes.QueryListRecordsRequest_ValueInput_Boolean{Boolean: *value.Boolean}
case value.Link != nil:
rpcval.Value = &registrytypes.QueryListRecordsRequest_ValueInput_Link{Link: value.Link.String()}
case value.Array != nil:
var contents registrytypes.QueryListRecordsRequest_ArrayInput
for _, val := range value.Array {
contents.Values = append(contents.Values, toRPCValue(val))
} }
rpcval.Value = &registrytypes.QueryListRecordsRequest_ValueInput_Array{Array: &contents}
case value.Map != nil:
var contents registrytypes.QueryListRecordsRequest_MapInput
for _, kv := range value.Map {
contents.Values[kv.Key] = toRPCValue(kv.Value)
} }
rpcval.Value = &registrytypes.QueryListRecordsRequest_ValueInput_Map{Map: &contents}
} }
return &rpcval }
}
return resolver.GetRecordsByIds(ctx, ids)
} }
func toRPCAttributes(attrs []*KeyValueInput) []*registrytypes.QueryListRecordsRequest_KeyValueInput { func getAttributes(r *registrytypes.RecordType) ([]*KeyValue, error) {
return mapToKeyValuePairs(r.Attributes)
}
func mapToKeyValuePairs(attrs map[string]interface{}) ([]*KeyValue, error) {
kvPairs := []*KeyValue{}
trueVal := true
falseVal := false
// #nosec G705
for key, value := range attrs {
kvPair := &KeyValue{
Key: key,
Value: &Value{},
}
switch val := value.(type) {
case nil:
kvPair.Value.Null = &trueVal
case int:
kvPair.Value.Int = &val
case float64:
kvPair.Value.Float = &val
case string:
kvPair.Value.String = &val
case bool:
kvPair.Value.Boolean = &val
case interface{}:
if obj, ok := value.(map[string]interface{}); ok {
if _, ok := obj["/"]; ok && len(obj) == 1 {
if _, ok := obj["/"].(string); ok {
kvPair.Value.Reference = &Reference{
ID: obj["/"].(string),
}
}
} else {
bytes, err := json.Marshal(obj)
if err != nil {
return nil, err
}
jsonStr := string(bytes)
kvPair.Value.JSON = &jsonStr
}
}
}
if kvPair.Value.Null == nil {
kvPair.Value.Null = &falseVal
}
valueType := reflect.ValueOf(value)
if valueType.Kind() == reflect.Slice {
bytes, err := json.Marshal(value)
if err != nil {
return nil, err
}
jsonStr := string(bytes)
kvPair.Value.JSON = &jsonStr
}
kvPairs = append(kvPairs, kvPair)
}
return kvPairs, nil
}
func parseRequestAttributes(attrs []*KeyValueInput) []*registrytypes.QueryListRecordsRequest_KeyValueInput {
kvPairs := []*registrytypes.QueryListRecordsRequest_KeyValueInput{} kvPairs := []*registrytypes.QueryListRecordsRequest_KeyValueInput{}
for _, value := range attrs { for _, value := range attrs {
parsedValue := toRPCValue(value.Value)
kvPair := &registrytypes.QueryListRecordsRequest_KeyValueInput{ kvPair := &registrytypes.QueryListRecordsRequest_KeyValueInput{
Key: value.Key, Key: value.Key,
Value: parsedValue, Value: &registrytypes.QueryListRecordsRequest_ValueInput{},
} }
if value.Value.String != nil {
kvPair.Value.String_ = *value.Value.String
kvPair.Value.Type = "string"
}
if value.Value.Int != nil {
kvPair.Value.Int = int64(*value.Value.Int)
kvPair.Value.Type = "int"
}
if value.Value.Float != nil {
kvPair.Value.Float = *value.Value.Float
kvPair.Value.Type = "float"
}
if value.Value.Boolean != nil {
kvPair.Value.Boolean = *value.Value.Boolean
kvPair.Value.Type = "boolean"
}
if value.Value.Reference != nil {
reference := &registrytypes.QueryListRecordsRequest_ReferenceInput{
Id: value.Value.Reference.ID,
}
kvPair.Value.Reference = reference
kvPair.Value.Type = "reference"
}
// TODO: Handle arrays.
kvPairs = append(kvPairs, kvPair) kvPairs = append(kvPairs, kvPair)
} }

View File

@ -1,5 +1,12 @@
# Reference to another record. # Reference to another record.
scalar Link type Reference {
id: String! # ID of linked record.
}
# Reference to another record.
input ReferenceInput {
id: String!
}
# Bonds contain funds that are used to pay rent on record registration and renewal. # Bonds contain funds that are used to pay rent on record registration and renewal.
type Bond { type Bond {
@ -30,71 +37,44 @@ type Account {
balance: [Coin!] # Current balance for each coin type. balance: [Coin!] # Current balance for each coin type.
} }
# Value describes a DAG-JSON compatible value. # Value of a given type.
union Value = type Value {
BooleanValue null: Boolean
| IntValue
| FloatValue
| StringValue
| BytesValue
| LinkValue
| ArrayValue
| MapValue
type BooleanValue {
value: Boolean!
}
type IntValue {
value: Int!
}
type FloatValue {
value: Float!
}
type StringValue {
value: String!
}
type BytesValue {
value: String!
}
type ArrayValue {
value: [Value]!
}
type LinkValue {
value: Link!
}
type MapValue {
value: [Attribute!]!
}
# Key/value pair.
type Attribute {
key: String!
value: Value
}
# Value of a given type used as input to queries.
# Note: GQL doesn't allow union input types.
input ValueInput {
int: Int int: Int
float: Float float: Float
string: String string: String
boolean: Boolean boolean: Boolean
link: Link json: String
array: [ValueInput]
map: [KeyValueInput!] reference: Reference
values: [Value]
}
# Value of a given type used as input to queries.
input ValueInput {
null: Boolean
int: Int
float: Float
string: String
boolean: Boolean
reference: ReferenceInput
values: [ValueInput]
}
# Key/value pair.
type KeyValue {
key: String!
value: Value!
} }
# Key/value pair for inputs. # Key/value pair for inputs.
input KeyValueInput { input KeyValueInput {
key: String! key: String!
value: ValueInput value: ValueInput!
} }
# Status information about a node (https://docs.tendermint.com/master/rpc/#/Info/status). # Status information about a node (https://docs.tendermint.com/master/rpc/#/Info/status).
@ -175,7 +155,7 @@ type Record {
createTime: String! # Record create time. createTime: String! # Record create time.
expiryTime: String! # Record expiry time. expiryTime: String! # Record expiry time.
owners: [String!] # Addresses of record owners. owners: [String!] # Addresses of record owners.
attributes: [Attribute!] # Record attributes. attributes: [KeyValue] # Record attributes.
references: [Record] # Record references. references: [Record] # Record references.
} }
@ -215,7 +195,7 @@ type Query {
getBondsByIds(ids: [String!]): [Bond] getBondsByIds(ids: [String!]): [Bond]
# Query bonds. # Query bonds.
queryBonds(attributes: [KeyValueInput!]): [Bond] queryBonds(attributes: [KeyValueInput]): [Bond]
# Query bonds by owner. # Query bonds by owner.
queryBondsByOwner(ownerAddresses: [String!]): [OwnerBonds] queryBondsByOwner(ownerAddresses: [String!]): [OwnerBonds]
@ -230,7 +210,7 @@ type Query {
# Query records. # Query records.
queryRecords( queryRecords(
# Multiple attribute conditions are in a logical AND. # Multiple attribute conditions are in a logical AND.
attributes: [KeyValueInput!] attributes: [KeyValueInput]
# Whether to query all records, not just named ones (false by default). # Whether to query all records, not just named ones (false by default).
all: Boolean all: Boolean

171
init.sh
View File

@ -5,137 +5,110 @@ CHAINID="laconic_9000-1"
MONIKER="localtestnet" MONIKER="localtestnet"
KEYRING="test" KEYRING="test"
KEYALGO="eth_secp256k1" KEYALGO="eth_secp256k1"
LOGLEVEL="${LOGLEVEL:-info}" LOGLEVEL="info"
# trace evm # trace evm
TRACE="--trace" TRACE="--trace"
# TRACE="" # TRACE=""
if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then # validate dependencies are installed
# validate dependencies are installed command -v jq > /dev/null 2>&1 || { echo >&2 "jq not installed. More info: https://stedolan.github.io/jq/download/"; exit 1; }
command -v jq > /dev/null 2>&1 || {
echo >&2 "jq not installed. More info: https://stedolan.github.io/jq/download/"
exit 1
}
# remove existing daemon and client # remove existing daemon and client
rm -rf $HOME/.laconicd/* rm -rf ~/.laconic*
rm -rf $HOME/.laconic/*
if [ -n "`which make`" ]; then make install
make install
fi
laconicd config keyring-backend $KEYRING laconicd config keyring-backend $KEYRING
laconicd config chain-id $CHAINID laconicd config chain-id $CHAINID
# if $KEY exists it should be deleted # if $KEY exists it should be deleted
laconicd keys add $KEY --keyring-backend $KEYRING --algo $KEYALGO laconicd keys add $KEY --keyring-backend $KEYRING --algo $KEYALGO
# Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer) # Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer)
laconicd init $MONIKER --chain-id $CHAINID laconicd init $MONIKER --chain-id $CHAINID
update_genesis() { # Change parameter token denominations to aphoton
jq "$1" $HOME/.laconicd/config/genesis.json > $HOME/.laconicd/config/tmp_genesis.json && cat $HOME/.laconicd/config/genesis.json | jq '.app_state["staking"]["params"]["bond_denom"]="aphoton"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json cat $HOME/.laconicd/config/genesis.json | jq '.app_state["crisis"]["constant_fee"]["denom"]="aphoton"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
} cat $HOME/.laconicd/config/genesis.json | jq '.app_state["gov"]["deposit_params"]["min_deposit"][0]["denom"]="aphoton"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["mint"]["params"]["mint_denom"]="aphoton"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
# Custom modules
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["record_rent"]["denom"]="aphoton"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["authority_rent"]["denom"]="aphoton"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["authority_auction_commit_fee"]["denom"]="aphoton"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["authority_auction_reveal_fee"]["denom"]="aphoton"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["authority_auction_minimum_bid"]["denom"]="aphoton"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
# Change parameter token denominations to aphoton if [[ "$TEST_REGISTRY_EXPIRY" == "true" ]]; then
update_genesis '.app_state["staking"]["params"]["bond_denom"]="aphoton"'
update_genesis '.app_state["crisis"]["constant_fee"]["denom"]="aphoton"'
update_genesis '.app_state["gov"]["deposit_params"]["min_deposit"][0]["denom"]="aphoton"'
update_genesis '.app_state["mint"]["params"]["mint_denom"]="aphoton"'
# Custom modules
update_genesis '.app_state["registry"]["params"]["record_rent"]["denom"]="aphoton"'
update_genesis '.app_state["registry"]["params"]["authority_rent"]["denom"]="aphoton"'
update_genesis '.app_state["registry"]["params"]["authority_auction_commit_fee"]["denom"]="aphoton"'
update_genesis '.app_state["registry"]["params"]["authority_auction_reveal_fee"]["denom"]="aphoton"'
update_genesis '.app_state["registry"]["params"]["authority_auction_minimum_bid"]["denom"]="aphoton"'
if [[ "$TEST_REGISTRY_EXPIRY" == "true" ]]; then
echo "Setting timers for expiry tests." echo "Setting timers for expiry tests."
update_genesis '.app_state["registry"]["params"]["record_rent_duration"]="60s"' cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["record_rent_duration"]="60s"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
update_genesis '.app_state["registry"]["params"]["authority_grace_period"]="60s"' cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["authority_grace_period"]="60s"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
update_genesis '.app_state["registry"]["params"]["authority_rent_duration"]="60s"' cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["authority_rent_duration"]="60s"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
fi fi
if [[ "$TEST_AUCTION_ENABLED" == "true" ]]; then if [[ "$TEST_AUCTION_ENABLED" == "true" ]]; then
echo "Enabling auction and setting timers." echo "Enabling auction and setting timers."
update_genesis '.app_state["registry"]["params"]["authority_auction_enabled"]=true' cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["authority_auction_enabled"]=true' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
update_genesis '.app_state["registry"]["params"]["authority_rent_duration"]="60s"' cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["authority_rent_duration"]="60s"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
update_genesis '.app_state["registry"]["params"]["authority_grace_period"]="300s"' cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["authority_grace_period"]="300s"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
update_genesis '.app_state["registry"]["params"]["authority_auction_commits_duration"]="60s"' cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["authority_auction_commits_duration"]="60s"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
update_genesis '.app_state["registry"]["params"]["authority_auction_reveals_duration"]="60s"' cat $HOME/.laconicd/config/genesis.json | jq '.app_state["registry"]["params"]["authority_auction_reveals_duration"]="60s"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
fi fi
# increase block time (?) # increase block time (?)
update_genesis '.consensus_params["block"]["time_iota_ms"]="1000"' cat $HOME/.laconicd/config/genesis.json | jq '.consensus_params["block"]["time_iota_ms"]="1000"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
# Set gas limit in genesis # Set gas limit in genesis
update_genesis '.consensus_params["block"]["max_gas"]="10000000"' cat $HOME/.laconicd/config/genesis.json | jq '.consensus_params["block"]["max_gas"]="10000000"' > $HOME/.laconicd/config/tmp_genesis.json && mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
# disable produce empty block # disable produce empty block
if [[ "$OSTYPE" == "darwin"* ]]; then if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' 's/create_empty_blocks = true/create_empty_blocks = false/g' $HOME/.laconicd/config/config.toml sed -i '' 's/create_empty_blocks = true/create_empty_blocks = false/g' $HOME/.laconicd/config/config.toml
else else
sed -i 's/create_empty_blocks = true/create_empty_blocks = false/g' $HOME/.laconicd/config/config.toml sed -i 's/create_empty_blocks = true/create_empty_blocks = false/g' $HOME/.laconicd/config/config.toml
fi fi
if [[ "$1" == "pending" ]]; then if [[ $1 == "pending" ]]; then
alias sed-i="sed -i"
if [[ "$OSTYPE" == "darwin"* ]]; then if [[ "$OSTYPE" == "darwin"* ]]; then
alias sed-i="sed -i ''" sed -i '' 's/create_empty_blocks_interval = "0s"/create_empty_blocks_interval = "30s"/g' $HOME/.laconicd/config/config.toml
fi sed -i '' 's/timeout_propose = "3s"/timeout_propose = "30s"/g' $HOME/.laconicd/config/config.toml
sed-i \ sed -i '' 's/timeout_propose_delta = "500ms"/timeout_propose_delta = "5s"/g' $HOME/.laconicd/config/config.toml
-e 's/create_empty_blocks_interval = "0s"/create_empty_blocks_interval = "30s"/g' \ sed -i '' 's/timeout_prevote = "1s"/timeout_prevote = "10s"/g' $HOME/.laconicd/config/config.toml
-e 's/timeout_propose = "3s"/timeout_propose = "30s"/g' \ sed -i '' 's/timeout_prevote_delta = "500ms"/timeout_prevote_delta = "5s"/g' $HOME/.laconicd/config/config.toml
-e 's/timeout_propose_delta = "500ms"/timeout_propose_delta = "5s"/g' \ sed -i '' 's/timeout_precommit = "1s"/timeout_precommit = "10s"/g' $HOME/.laconicd/config/config.toml
-e 's/timeout_prevote = "1s"/timeout_prevote = "10s"/g' \ sed -i '' 's/timeout_precommit_delta = "500ms"/timeout_precommit_delta = "5s"/g' $HOME/.laconicd/config/config.toml
-e 's/timeout_prevote_delta = "500ms"/timeout_prevote_delta = "5s"/g' \ sed -i '' 's/timeout_commit = "5s"/timeout_commit = "150s"/g' $HOME/.laconicd/config/config.toml
-e 's/timeout_precommit = "1s"/timeout_precommit = "10s"/g' \ sed -i '' 's/timeout_broadcast_tx_commit = "10s"/timeout_broadcast_tx_commit = "150s"/g' $HOME/.laconicd/config/config.toml
-e 's/timeout_precommit_delta = "500ms"/timeout_precommit_delta = "5s"/g' \
-e 's/timeout_commit = "5s"/timeout_commit = "150s"/g' \
-e 's/timeout_broadcast_tx_commit = "10s"/timeout_broadcast_tx_commit = "150s"/g' \
$HOME/.laconicd/config/config.toml
fi
# Enable telemetry (prometheus metrics: http://localhost:1317/metrics?format=prometheus)
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' 's/enabled = false/enabled = true/g' $HOME/.laconicd/config/app.toml
sed -i '' 's/prometheus-retention-time = 0/prometheus-retention-time = 60/g' $HOME/.laconicd/config/app.toml
sed -i '' 's/prometheus = false/prometheus = true/g' $HOME/.laconicd/config/config.toml
else else
sed -i 's/enabled = false/enabled = true/g' $HOME/.laconicd/config/app.toml sed -i 's/create_empty_blocks_interval = "0s"/create_empty_blocks_interval = "30s"/g' $HOME/.laconicd/config/config.toml
sed -i 's/prometheus-retention-time = 0/prometheus-retention-time = 60/g' $HOME/.laconicd/config/app.toml sed -i 's/timeout_propose = "3s"/timeout_propose = "30s"/g' $HOME/.laconicd/config/config.toml
sed -i 's/prometheus = false/prometheus = true/g' $HOME/.laconicd/config/config.toml sed -i 's/timeout_propose_delta = "500ms"/timeout_propose_delta = "5s"/g' $HOME/.laconicd/config/config.toml
sed -i 's/timeout_prevote = "1s"/timeout_prevote = "10s"/g' $HOME/.laconicd/config/config.toml
sed -i 's/timeout_prevote_delta = "500ms"/timeout_prevote_delta = "5s"/g' $HOME/.laconicd/config/config.toml
sed -i 's/timeout_precommit = "1s"/timeout_precommit = "10s"/g' $HOME/.laconicd/config/config.toml
sed -i 's/timeout_precommit_delta = "500ms"/timeout_precommit_delta = "5s"/g' $HOME/.laconicd/config/config.toml
sed -i 's/timeout_commit = "5s"/timeout_commit = "150s"/g' $HOME/.laconicd/config/config.toml
sed -i 's/timeout_broadcast_tx_commit = "10s"/timeout_broadcast_tx_commit = "150s"/g' $HOME/.laconicd/config/config.toml
fi fi
fi
# Allocate genesis accounts (cosmos formatted addresses) # Allocate genesis accounts (cosmos formatted addresses)
laconicd add-genesis-account $KEY 100000000000000000000000000aphoton --keyring-backend $KEYRING laconicd add-genesis-account $KEY 100000000000000000000000000aphoton --keyring-backend $KEYRING
# Sign genesis transaction # Sign genesis transaction
laconicd gentx $KEY 1000000000000000000000aphoton --keyring-backend $KEYRING --chain-id $CHAINID laconicd gentx $KEY 1000000000000000000000aphoton --keyring-backend $KEYRING --chain-id $CHAINID
# Collect genesis tx # Collect genesis tx
laconicd collect-gentxs laconicd collect-gentxs
# Run this to ensure everything worked and that the genesis file is setup correctly # Run this to ensure everything worked and that the genesis file is setup correctly
laconicd validate-genesis laconicd validate-genesis
if [[ "$1" == "pending" ]]; then if [[ $1 == "pending" ]]; then
echo "pending mode is on, please wait for the first block committed." echo "pending mode is on, please wait for the first block committed."
fi
else
echo "Using existing database at $HOME/.laconicd. To replace, run '`basename $0` clean'"
fi fi
# Start the node (remove the --pruning=nothing flag if historical queries are not needed) # Start the node (remove the --pruning=nothing flag if historical queries are not needed)
laconicd start \ laconicd start --pruning=nothing --evm.tracer=json $TRACE --log_level $LOGLEVEL --minimum-gas-prices=0.0001aphoton --json-rpc.api eth,txpool,personal,net,debug,web3,miner --api.enable --gql-server --gql-playground
--pruning=nothing \
--evm.tracer=json $TRACE \
--log_level $LOGLEVEL \
--minimum-gas-prices=0.0001aphoton \
--json-rpc.api eth,txpool,personal,net,debug,web3,miner \
--api.enable \
--gql-server --gql-playground

View File

@ -0,0 +1,33 @@
syntax = "proto3";
package vulcanize.registry.v1beta1;
import "gogoproto/gogo.proto";
option go_package = "github.com/cerc-io/laconicd/x/registry/types";
message ServiceProviderRegistration {
string bond_id = 1 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""];
string laconic_id = 2 [(gogoproto.moretags) = "json:\"laconicId\" yaml:\"laconicId\""];
X500 x500 = 3 [(gogoproto.moretags) = "json:\"x500\" yaml:\"x500\""];
string type = 4 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""];
string version = 6 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""];
}
message X500 {
string common_name = 1 [(gogoproto.moretags) = "json:\"commonName\" yaml:\"commonName\""];
string organization_unit = 2 [(gogoproto.moretags) = "json:\"organizationUnit\" yaml:\"organizationUnit\""];
string organization_name = 3 [(gogoproto.moretags) = "json:\"organizationName\" yaml:\"organizationName\""];
string locality_name = 4 [(gogoproto.moretags) = "json:\"localityName\" yaml:\"localityName\""];
string state_name = 5 [(gogoproto.moretags) = "json:\"stateName\" yaml:\"stateName\""];
string country = 6 [(gogoproto.moretags) = "json:\"country\" yaml:\"country\""];
}
message WebsiteRegistrationRecord {
string url = 1 [(gogoproto.moretags) = "json:\"url\" yaml:\"url\""];
string repo_registration_record_cid = 2
[(gogoproto.moretags) = "json:\"repoRegistrationRecordCID\" yaml:\"repoRegistrationRecordCID\""];
string build_artifact_cid = 3 [(gogoproto.moretags) = "json:\"buildArtifactCID\" yaml:\"buildArtifactCID\""];
string tls_cert_cid = 4 [(gogoproto.moretags) = "json:\"TLSCertCID\" yaml:\"TLSCertCID\""];
string type = 5 [(gogoproto.moretags) = "json:\"type\" yaml:\"type\""];
string version = 6 [(gogoproto.moretags) = "json:\"version\" yaml:\"version\""];
}

View File

@ -67,26 +67,17 @@ message QueryParamsResponse {
// QueryListRecordsRequest is request type for registry records list // QueryListRecordsRequest is request type for registry records list
message QueryListRecordsRequest { message QueryListRecordsRequest {
message LinkInput { message ReferenceInput {
string id = 1; string id = 1;
} }
message ArrayInput {
repeated ValueInput values = 1;
}
message MapInput {
map<string, ValueInput> values = 1;
}
message ValueInput { message ValueInput {
// Type of record attribute value string type = 1;
oneof value { string string = 2;
string string = 1; int64 int = 3;
int64 int = 2; double float = 4;
double float = 3; bool boolean = 5;
bool boolean = 4; ReferenceInput reference = 6;
string link = 5; repeated ValueInput values = 7;
ArrayInput array = 6;
MapInput map = 7;
}
} }
message KeyValueInput { message KeyValueInput {
string key = 1; string key = 1;

View File

@ -5,6 +5,7 @@ import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto"; import "google/protobuf/timestamp.proto";
import "gogoproto/gogo.proto"; import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto"; import "cosmos/base/v1beta1/coin.proto";
import "google/protobuf/any.proto";
option go_package = "github.com/cerc-io/laconicd/x/registry/types"; option go_package = "github.com/cerc-io/laconicd/x/registry/types";
@ -55,7 +56,7 @@ message Params {
]; ];
} }
// Record defines a registry record // Params defines the registry module records
message Record { message Record {
string id = 1 [(gogoproto.moretags) = "json:\"id\" yaml:\"id\""]; string id = 1 [(gogoproto.moretags) = "json:\"id\" yaml:\"id\""];
string bond_id = 2 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""]; string bond_id = 2 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""];
@ -63,12 +64,12 @@ message Record {
string expiry_time = 4 [(gogoproto.moretags) = "json:\"expiryTime\" yaml:\"expiryTime\""]; string expiry_time = 4 [(gogoproto.moretags) = "json:\"expiryTime\" yaml:\"expiryTime\""];
bool deleted = 5; bool deleted = 5;
repeated string owners = 6 [(gogoproto.moretags) = "json:\"owners\" yaml:\"owners\""]; repeated string owners = 6 [(gogoproto.moretags) = "json:\"owners\" yaml:\"owners\""];
bytes attributes = 7 [(gogoproto.moretags) = "json:\"attributes\" yaml:\"attributes\""]; google.protobuf.Any attributes = 7 [(gogoproto.moretags) = "json:\"attributes\" yaml:\"attributes\""];
repeated string names = 8 [(gogoproto.moretags) = "json:\"names\" yaml:\"names\""]; repeated string names = 8 [(gogoproto.moretags) = "json:\"names\" yaml:\"names\""];
string type = 9 [(gogoproto.moretags) = "json:\"types\" yaml:\"types\""]; string type = 9 [(gogoproto.moretags) = "json:\"types\" yaml:\"types\""];
} }
// AuthorityEntry defines a registry authority // AuthorityEntry defines the registry module AuthorityEntries
message AuthorityEntry { message AuthorityEntry {
string name = 1; string name = 1;
NameAuthority entry = 2; NameAuthority entry = 2;
@ -98,7 +99,7 @@ message NameEntry {
NameRecord entry = 2; NameRecord entry = 2;
} }
// NameRecord defines a versioned name record // NameRecord
message NameRecord { message NameRecord {
NameRecordEntry latest = 1; NameRecordEntry latest = 1;
repeated NameRecordEntry history = 2; repeated NameRecordEntry history = 2;

View File

@ -7,13 +7,13 @@ import "vulcanize/registry/v1beta1/registry.proto";
option go_package = "github.com/cerc-io/laconicd/x/registry/types"; option go_package = "github.com/cerc-io/laconicd/x/registry/types";
// Msg is a service which exposes the registry functionality // Msg
service Msg { service Msg {
// SetRecord records a new record with given payload and bond id // SetRecord will records a new record with given payload and bond id
rpc SetRecord(MsgSetRecord) returns (MsgSetRecordResponse) { rpc SetRecord(MsgSetRecord) returns (MsgSetRecordResponse) {
option (google.api.http).post = "/vulcanize/registry/v1beta1/set_record"; option (google.api.http).post = "/vulcanize/registry/v1beta1/set_record";
} }
// Renew Record renews an expired record // Renew Record will renew the expire record
rpc RenewRecord(MsgRenewRecord) returns (MsgRenewRecordResponse) { rpc RenewRecord(MsgRenewRecord) returns (MsgRenewRecordResponse) {
option (google.api.http).post = "/vulcanize/registry/v1beta1/renew_record"; option (google.api.http).post = "/vulcanize/registry/v1beta1/renew_record";
} }
@ -66,10 +66,8 @@ message MsgSetRecordResponse {
// Payload // Payload
message Payload { message Payload {
Record record = 1; Record record = 1;
repeated Signature signatures = 2 [ repeated Signature signatures = 2
(gogoproto.nullable) = false, [(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"signatures\" yaml:\"signatures\""];
(gogoproto.moretags) = "json:\"signatures\" yaml:\"signatures\""
];
} }
// MsgSetName // MsgSetName
@ -93,7 +91,7 @@ message MsgReserveAuthority {
// MsgReserveNameResponse // MsgReserveNameResponse
message MsgReserveAuthorityResponse {} message MsgReserveAuthorityResponse {}
// MsgSetAuthorityBond // MsgSetAuthorityBond is SDK message for SetAuthorityBond
message MsgSetAuthorityBond { message MsgSetAuthorityBond {
string name = 1; string name = 1;
string bond_id = 2 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""]; string bond_id = 2 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""];
@ -103,7 +101,7 @@ message MsgSetAuthorityBond {
// MsgSetAuthorityBondResponse // MsgSetAuthorityBondResponse
message MsgSetAuthorityBondResponse {} message MsgSetAuthorityBondResponse {}
// MsgDeleteNameAuthority // MsgDeleteNameAuthority is SDK message for DeleteNameAuthority
message MsgDeleteNameAuthority { message MsgDeleteNameAuthority {
string crn = 1; string crn = 1;
string signer = 2; string signer = 2;
@ -112,7 +110,7 @@ message MsgDeleteNameAuthority {
// MsgDeleteNameAuthorityResponse // MsgDeleteNameAuthorityResponse
message MsgDeleteNameAuthorityResponse {} message MsgDeleteNameAuthorityResponse {}
// MsgRenewRecord // MsgRenewRecord is SDK message for Renew a record
message MsgRenewRecord { message MsgRenewRecord {
string record_id = 1 [(gogoproto.moretags) = "json:\"recordId\" yaml:\"recordId\""]; string record_id = 1 [(gogoproto.moretags) = "json:\"recordId\" yaml:\"recordId\""];
string signer = 2; string signer = 2;
@ -131,30 +129,30 @@ message MsgAssociateBond {
// MsgAssociateBondResponse // MsgAssociateBondResponse
message MsgAssociateBondResponse {} message MsgAssociateBondResponse {}
// MsgDissociateBond // MsgDissociateBond is SDK message for Msg/DissociateBond
message MsgDissociateBond { message MsgDissociateBond {
string record_id = 1 [(gogoproto.moretags) = "json:\"recordId\" yaml:\"recordId\""]; string record_id = 1 [(gogoproto.moretags) = "json:\"recordId\" yaml:\"recordId\""];
string signer = 2; string signer = 2;
} }
// MsgDissociateBondResponse // MsgDissociateBondResponse is response type for MsgDissociateBond
message MsgDissociateBondResponse {} message MsgDissociateBondResponse {}
// MsgDissociateRecords // MsgDissociateRecords is SDK message for Msg/DissociateRecords
message MsgDissociateRecords { message MsgDissociateRecords {
string bond_id = 1 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""]; string bond_id = 1 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""];
string signer = 2; string signer = 2;
} }
// MsgDissociateRecordsResponse // MsgDissociateRecordsResponse is response type for MsgDissociateRecords
message MsgDissociateRecordsResponse {} message MsgDissociateRecordsResponse {}
// MsgReAssociateRecords // MsgReAssociateRecords is SDK message for Msg/ReAssociateRecords
message MsgReAssociateRecords { message MsgReAssociateRecords {
string new_bond_id = 1 [(gogoproto.moretags) = "json:\"newBondId\" yaml:\"newBondId\""]; string new_bond_id = 1 [(gogoproto.moretags) = "json:\"newBondId\" yaml:\"newBondId\""];
string old_bond_id = 2 [(gogoproto.moretags) = "json:\"oldBondId\" yaml:\"oldBondId\""]; string old_bond_id = 2 [(gogoproto.moretags) = "json:\"oldBondId\" yaml:\"oldBondId\""];
string signer = 3; string signer = 3;
} }
// MsgReAssociateRecordsResponse // MsgReAssociateRecordsResponse is response type for MsgReAssociateRecords
message MsgReAssociateRecordsResponse {} message MsgReAssociateRecordsResponse {}

View File

@ -94,10 +94,11 @@ func (s *websocketsServer) Start() {
go func() { go func() {
var err error var err error
/* #nosec G114 -- http functions have no support for timeouts */
if s.certFile == "" || s.keyFile == "" { if s.certFile == "" || s.keyFile == "" {
err = http.ListenAndServe(s.wsAddr, ws) /* #nosec G114 -- http functions have no support for timeouts */ err = http.ListenAndServe(s.wsAddr, ws)
} else { } else {
err = http.ListenAndServeTLS(s.wsAddr, s.certFile, s.keyFile, ws) // #nosec G114 err = http.ListenAndServeTLS(s.wsAddr, s.certFile, s.keyFile, ws)
} }
if err != nil { if err != nil {

View File

@ -1,48 +0,0 @@
#!/bin/bash
##
## This script generates a new account keypair, transfers funds to it, and creates
## a bond with those funds. The amount of can be optionally specified, else a
## default value estimated to be sufficient for about 5000 records.
##
## The `laconic` CLI and a valid config file for it are required. The default location
## for the config file is `~/.laconic/config.yml`, but this can be controlled with
## the environment variable LACONIC_CONFIG. A `userKey` for a source account with
## sufficient funds available must be present in this file for the funds transfer
## to succeed.
##
## Example:
##
## $ scripts/create-and-fund-account.sh 1000000000
## {
## "name": "68334d7175fd4f86befa4902657e5270",
## "type": "local",
## "address": "ethm15r5x94km0swq55aszwd7hnr9wksq7wmr38xes7",
## "pubkey": "AuKqlSldJJXj4gYMFt2HeX9DJ3aUosYA7n6zBz9Tg7/i",
## "mnemonic": "umbrella bean special unaware accident giant distance mix ghost feel possible cost road grant endless man maple derive rebuild learn mask water attract resist",
## "bond": "3d3a73f09115d289d330781455e6eac217305dc4a20e19bde808011fe3775a93",
## "balance": 1000000000,
## "privkey": "480880fde7aff1461da584b436cb3a84692413c84623fda78e127bb4e704ce76"
## }
##
AVG_RECORD_PHOTON=1000000
NUM_RECORDS=5000
BOND_OVERHEAD=200000
KEYNAME=`uuidgen | tr -d '-'`
KEYRING_DIR=`mktemp -d`
KEYRING=test
LACONIC_CONFIG=${LACONIC_CONFIG:-$HOME/.laconic/config.yml}
BOND_AMOUNT=${1:-$((AVG_RECORD_PHOTON * NUM_RECORDS))}
ACCOUNT_JSON=$(laconicd keys add $KEYNAME --keyring-backend $KEYRING --algo eth_secp256k1 --keyring-dir $KEYRING_DIR --output json)
PRIVATE_KEY=$(yes | laconicd keys export $KEYNAME --keyring-backend $KEYRING --keyring-dir $KEYRING_DIR --unarmored-hex --unsafe)
PUB_KEY=$(echo $ACCOUNT_JSON | jq -r ".pubkey | fromjson | .key")
laconicd keys delete $KEYNAME --keyring-backend $KEYRING --keyring-dir $KEYRING_DIR -y 2> /dev/null
rm -rf $KEYRING_DIR
laconic -c $LACONIC_CONFIG cns tokens send --address $(echo $ACCOUNT_JSON | jq -r '.address') --type aphoton --quantity $((BOND_AMOUNT + BOND_OVERHEAD)) > /dev/null
BOND_ID=$(laconic -c $LACONIC_CONFIG cns bond create --user-key $PRIVATE_KEY --type aphoton --quantity $BOND_AMOUNT | jq -r '.bondId')
echo $ACCOUNT_JSON | jq ".bond = \"$BOND_ID\"" | jq ".balance = $BOND_AMOUNT" | jq ".privkey = \"$PRIVATE_KEY\"" | jq ".pubkey = \"$PUB_KEY\""

View File

@ -146,7 +146,7 @@ echo "done sleeping"
set +e set +e
if [[ -z $TEST || $TEST == "rpc" || $TEST == "pending" ]]; then if [[ -z $TEST || $TEST == "rpc" || $TEST == "pending" ]]; then
time_out=900s time_out=300s
if [[ $TEST == "pending" ]]; then if [[ $TEST == "pending" ]]; then
time_out=60m0s time_out=60m0s
fi fi

View File

@ -1,4 +1,4 @@
# Validator Guide for laconic_81337-6 Testnet # Validator Guide for laconic_81337-5 Testnet
## Hardware Prerequisites ## Hardware Prerequisites
@ -48,8 +48,8 @@ sudo apt install git curl build-essential make jq -y
# Remove any existing installation of `go` # Remove any existing installation of `go`
sudo rm -rf /usr/local/go sudo rm -rf /usr/local/go
# Install Go version 1.19.7 # Install Go version 1.18.8
curl https://dl.google.com/go/go1.19.7.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf - curl https://dl.google.com/go/go1.18.8.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf -
# Update env variables to include go # Update env variables to include go
cat <<'EOF' >>$HOME/.profile cat <<'EOF' >>$HOME/.profile
@ -67,7 +67,7 @@ Check the version of go installed
```sh ```sh
go version go version
# Should return something like: go version go1.19.7 linux/amd64 # Should return something like: go version go1.17.2 linux/amd64
``` ```
--- ---
@ -80,17 +80,16 @@ cd laconicd
# Checkout main branch # Checkout main branch
git fetch --all git fetch --all
git checkout v0.8.0 git checkout v0.6.0
# Build and install laconic # Build and install laconic
make VERSION=v0.8.0 install make install
``` ```
Verify your installation Verify your installation
```sh ```sh
laconicd version --long laconicd version --long
``` ```
On running the above command, you should see a similar response like this. Make sure that the _version_ and _commit On running the above command, you should see a similar response like this. Make sure that the _version_ and _commit
@ -123,13 +122,13 @@ Make sure the directory `~/.laconicd` does not exist or is empty
>In order to run the below commands in a docker container: >In order to run the below commands in a docker container:
>```sh >```sh
>docker run -ti -v ~/.laconicd:/root/.laconicd \ >docker run -ti -v ~/.laconicd:/root/.laconicd \
>git.vdb.to/cerc-io/laconicd/laconicd:v0.8.0 /bin/sh >git.vdb.to/cerc-io/laconicd/laconicd:v0.6.0 /bin/sh
>``` >```
--- ---
```sh ```sh
# Initialize the validator node # Initialize the validator node
laconicd init <your-node-moniker> --chain-id laconic_81337-6 laconicd init <your-node-moniker> --chain-id laconic_81337-5
``` ```
Running the above commands will initialize the validator node with default configuration. The config files will be saved in the default location (`~/.laconicd/config`). Running the above commands will initialize the validator node with default configuration. The config files will be saved in the default location (`~/.laconicd/config`).
@ -169,7 +168,7 @@ Create Your `gentx` transaction file
```sh ```sh
laconicd gentx <key-name> 12900000000000000000000achk \ laconicd gentx <key-name> 12900000000000000000000achk \
--pubkey=$(laconicd tendermint show-validator) \ --pubkey=$(laconicd tendermint show-validator) \
--chain-id="laconic_81337-6" \ --chain-id="laconic_81337-5" \
--moniker="<your-moniker-name>" \ --moniker="<your-moniker-name>" \
--website="<your-validator-website>" \ --website="<your-validator-website>" \
--details="<your-validator-description>" \ --details="<your-validator-description>" \
@ -199,10 +198,10 @@ Submit your `gentx` file to the [https://github.com/cerc-io/laconic-testnet](htt
To submit the gentx file, follow the below process: To submit the gentx file, follow the below process:
- Fork the [https://github.com/cerc-io/laconic-testnet](https://github.com/cerc-io/laconic-testnet) repository - Fork the [https://github.com/cerc-io/laconic-testnet](https://github.com/cerc-io/laconic-testnet) repository
- Upload your gentx file in the `laconic_81337-6/config/gentxs` folder - Upload your gentx file in the `laconic_81337-5/config/gentxs` folder
- Submit Pull Request to [https://github.com/cerc-io/laconic-testnet](https://github.com/cerc-io/laconic-testnet) with name `ADD <your-moniker> gentx` - Submit Pull Request to [https://github.com/cerc-io/laconic-testnet](https://github.com/cerc-io/laconic-testnet) with name `ADD <your-moniker> gentx`
The genesis file will be published in the `laconic_81337-6/config/` folder within the [https://github.com/cerc-io/laconic-testnet](https://github.com/cerc-io/laconic-testnet) repository. The genesis file will be published in the `laconic_81337-5/config/` folder within the [https://github.com/cerc-io/laconic-testnet](https://github.com/cerc-io/laconic-testnet) repository.
# CONTINUE WITH BELOW STEPS ONLY AFTER GENESIS FILE HAS BEEN PUBLISHED # CONTINUE WITH BELOW STEPS ONLY AFTER GENESIS FILE HAS BEEN PUBLISHED
@ -272,33 +271,25 @@ journalctl -f -u laconicd
In this example the Tendermint RPC and Prometheus metrics ports are exposed only to localhost. You may want to change 127.0.0.1 to private or public network interface of your host if you need to access these ports remotely. In this example the Tendermint RPC and Prometheus metrics ports are exposed only to localhost. You may want to change 127.0.0.1 to private or public network interface of your host if you need to access these ports remotely.
```sh ```sh
docker create \ docker create --name laconic-testnet-5 -v ~/.laconicd:/root/.laconicd -p 26656:26656 -p 127.0.0.1:26657:26657 -p 127.0.0.1:26660:26660 git.vdb.to/cerc-io/laconicd/laconicd:v0.6.0 laconicd start --gql-playground --gql-server --log_level=warn
--name laconic-testnet-6 \
--restart always \
-v ~/.laconicd:/root/.laconicd \
-p 26656:26656 \
-p 127.0.0.1:26657:26657 \
-p 127.0.0.1:26660:26660 \
git.vdb.to/cerc-io/laconicd/laconicd:v0.8.0 \
laconicd start --gql-playground --gql-server --log_level=warn
``` ```
### Run validator node ### Run validator node
```sh ```sh
docker start laconic-testnet-6 docker start laconic-testnet-5
``` ```
### Check validator node logs ### Check validator node logs
```sh ```sh
docker logs laconic-testnet-6 docker logs laconic-testnet-5
``` ```
### Run shell inside docker container ### Run shell inside docker container
```sh ```sh
docker exec -ti laconic-testnet-6 /bin/sh docker exec -ti laconic-testnet-5 /bin/sh
``` ```
--- ---
## Helpful commands ## Helpful commands

View File

@ -0,0 +1,52 @@
# Originally from: https://github.com/devcontainers/images/blob/main/src/javascript-node/.devcontainer/Dockerfile
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
ARG VARIANT=16-bullseye
FROM node:${VARIANT}
ARG USERNAME=node
ARG NPM_GLOBAL=/usr/local/share/npm-global
# Add NPM global to PATH.
ENV PATH=${NPM_GLOBAL}/bin:${PATH}
RUN \
# Configure global npm install location, use group to adapt to UID/GID changes
if ! cat /etc/group | grep -e "^npm:" > /dev/null 2>&1; then groupadd -r npm; fi \
&& usermod -a -G npm ${USERNAME} \
&& umask 0002 \
&& mkdir -p ${NPM_GLOBAL} \
&& touch /usr/local/etc/npmrc \
&& chown ${USERNAME}:npm ${NPM_GLOBAL} /usr/local/etc/npmrc \
&& chmod g+s ${NPM_GLOBAL} \
&& npm config -g set prefix ${NPM_GLOBAL} \
&& su ${USERNAME} -c "npm config -g set prefix ${NPM_GLOBAL}" \
# Install eslint
&& su ${USERNAME} -c "umask 0002 && npm install -g eslint" \
&& npm cache clean --force > /dev/null 2>&1
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# [Optional] Uncomment if you want to install an additional version of node using nvm
# ARG EXTRA_NODE_VERSION=10
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
# [Optional] Uncomment if you want to install more global node modules
# RUN su node -c "npm install -g <your-package-list-here>"
WORKDIR /
COPY entrypoint.sh .
ENTRYPOINT ["/entrypoint.sh"]
# Placeholder CMD : generally this will be overridden at run time like :
# docker run -it -v /home/builder/cerc/laconic-sdk:/workspace cerc/builder-js sh -c 'cd /workspace && yarn && yarn build'
CMD node --version
# Temp hack, clone the laconic-sdk repo here
WORKDIR /app
RUN \
git clone https://github.com/cerc-io/laconic-sdk.git \
&& cd laconic-sdk \
&& yarn install
WORKDIR /app/laconic-sdk

View File

@ -1,2 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
docker build -t cerc/laconicd:local ../.. --progress=plain docker build -t cerc-io/laconicd:local-test ../../

View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
docker build -t cerc-io/laconic-sdk-tester:local-test -f Dockerfile-sdk .

View File

@ -0,0 +1,31 @@
services:
laconicd:
restart: unless-stopped
image: cerc-io/laconicd:local-test
environment:
- TEST_AUCTION_ENABLED=true
command: ["sh", "/docker-entrypoint-scripts.d/create-fixturenet.sh"]
volumes:
- ../../init.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh
healthcheck:
test: ["CMD", "curl", "-v", "http://127.0.0.1:6060"]
interval: 1s
timeout: 5s
retries: 30
ports:
- "6060"
- "26657"
- "26656"
- "9473"
- "8545"
- "8546"
- "9090"
- "9091"
- "1317"
sdk-test-runner:
image: cerc-io/laconic-sdk-tester:local-test
depends_on:
laconicd:
condition: service_healthy
command: tail -F /dev/null

View File

@ -0,0 +1,31 @@
services:
laconicd:
restart: unless-stopped
image: cerc-io/laconicd:local-test
environment:
- TEST_REGISTRY_EXPIRY=true
command: ["sh", "/docker-entrypoint-scripts.d/create-fixturenet.sh"]
volumes:
- ../../init.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh
healthcheck:
test: ["CMD", "curl", "-v", "http://127.0.0.1:6060"]
interval: 1s
timeout: 5s
retries: 30
ports:
- "6060"
- "26657"
- "26656"
- "9473"
- "8545"
- "8546"
- "9090"
- "9091"
- "1317"
sdk-test-runner:
image: cerc-io/laconic-sdk-tester:local-test
depends_on:
laconicd:
condition: service_healthy
command: tail -F /dev/null

View File

@ -1,12 +1,8 @@
services: services:
laconicd: laconicd:
restart: unless-stopped restart: unless-stopped
image: cerc/laconicd:local image: cerc-io/laconicd:local-test
entrypoint: ["sh", "/docker-entrypoint-scripts.d/create-fixturenet.sh"] command: ["sh", "/docker-entrypoint-scripts.d/create-fixturenet.sh"]
environment:
- TEST_AUCTION_ENABLED
- TEST_REGISTRY_EXPIRY
- LOGLEVEL
volumes: volumes:
- ../../init.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh - ../../init.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh
healthcheck: healthcheck:
@ -26,7 +22,7 @@ services:
- "1317" - "1317"
sdk-test-runner: sdk-test-runner:
image: cerc/laconic-sdk-tester:local image: cerc-io/laconic-sdk-tester:local-test
depends_on: depends_on:
laconicd: laconicd:
condition: service_healthy condition: service_healthy

3
tests/sdk_tests/entrypoint.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
exec "$@"

View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
# Get the key from laconicd
laconicd_key=$( docker compose exec laconicd echo y | docker compose exec laconicd laconicd keys export mykey --unarmored-hex --unsafe )
# Set parameters for the test suite
cosmos_chain_id=laconic_9000-1
laconicd_rest_endpoint=http://laconicd:1317
laconicd_gql_endpoint=http://laconicd:9473/api
# Run tests
docker network inspect sdk_tests_default
sleep 30s
docker logs sdk_tests-laconicd-1
docker compose exec sdk-test-runner sh -c "COSMOS_CHAIN_ID=${cosmos_chain_id} LACONICD_REST_ENDPOINT=${laconicd_rest_endpoint} LACONICD_GQL_ENDPOINT=${laconicd_gql_endpoint} PRIVATE_KEY=${laconicd_key} yarn test:auctions"

View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
# Get the key from laconicd
laconicd_key=$( docker compose exec laconicd echo y | docker compose exec laconicd laconicd keys export mykey --unarmored-hex --unsafe )
# Set parameters for the test suite
cosmos_chain_id=laconic_9000-1
laconicd_rest_endpoint=http://laconicd:1317
laconicd_gql_endpoint=http://laconicd:9473/api
# Run tests
docker network inspect sdk_tests_default
sleep 30s
docker logs sdk_tests-laconicd-1
docker compose exec sdk-test-runner sh -c "COSMOS_CHAIN_ID=${cosmos_chain_id} LACONICD_REST_ENDPOINT=${laconicd_rest_endpoint} LACONICD_GQL_ENDPOINT=${laconicd_gql_endpoint} PRIVATE_KEY=${laconicd_key} yarn test:nameservice-expiry"

View File

@ -1,28 +1,18 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Forwards all args to yarn on the sdk-test-runner container
if [ -n "$CERC_SCRIPT_DEBUG" ]; then if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x set -x
fi fi
yarn_args=("--inspect-brk=8888")
yarn_args+=("${@:-test}")
# Get the key from laconicd # Get the key from laconicd
laconicd_key=$( laconicd_key=$( docker compose exec laconicd echo y | docker compose exec laconicd laconicd keys export mykey --unarmored-hex --unsafe )
yes | docker compose exec laconicd laconicd keys export mykey --unarmored-hex --unsafe
)
# Set parameters for the test suite # Set parameters for the test suite
cosmos_chain_id=laconic_9000-1 cosmos_chain_id=laconic_9000-1
laconicd_rest_endpoint=http://laconicd:1317 laconicd_rest_endpoint=http://laconicd:1317
laconicd_gql_endpoint=http://laconicd:9473/api laconicd_gql_endpoint=http://laconicd:9473/api
docker compose exec laconicd sh -c "curl --retry 10 --retry-delay 3 --retry-connrefused http://127.0.0.1:9473/api"
# Run tests # Run tests
docker compose exec \ docker network inspect sdk_tests_default
-e COSMOS_CHAIN_ID="$cosmos_chain_id" \ sleep 30s
-e LACONICD_REST_ENDPOINT="$laconicd_rest_endpoint" \ docker logs laconicd
-e LACONICD_GQL_ENDPOINT="$laconicd_gql_endpoint" \ docker compose exec laconicd sh -c "curl http://127.0.0.1:9473/api"
-e PRIVATE_KEY="$laconicd_key" \ docker compose exec laconicd sh -c "curl http://localhost:9473/api"
sdk-test-runner yarn run "${yarn_args[@]}"
docker compose exec sdk-test-runner sh -c "COSMOS_CHAIN_ID=${cosmos_chain_id} LACONICD_REST_ENDPOINT=${laconicd_rest_endpoint} LACONICD_GQL_ENDPOINT=${laconicd_gql_endpoint} PRIVATE_KEY=${laconicd_key} yarn test"

View File

@ -519,7 +519,6 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) {
l.Log("starting test network...") l.Log("starting test network...")
for _, v := range network.Validators { for _, v := range network.Validators {
l.Log("starting validator:", v.Moniker)
err := startInProcess(cfg, v) err := startInProcess(cfg, v)
if err != nil { if err != nil {
return nil, err return nil, err

View File

@ -1,20 +0,0 @@
package utils
import (
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
)
func CtxWithCustomKVGasConfig(ctx *sdk.Context) *sdk.Context {
updatedCtx := ctx.WithKVGasConfig(storetypes.GasConfig{
HasCost: 0,
DeleteCost: 0,
ReadCostFlat: 0,
ReadCostPerByte: 0,
WriteCostFlat: 0,
WriteCostPerByte: 0,
IterNextCostFlat: 0,
})
return &updatedCtx
}

View File

@ -10,6 +10,7 @@ import (
canonicalJson "github.com/gibson042/canonicaljson-go" canonicalJson "github.com/gibson042/canonicaljson-go"
"github.com/ipfs/go-cid" "github.com/ipfs/go-cid"
cbor "github.com/ipfs/go-ipld-cbor"
"github.com/ipld/go-ipld-prime/codec/dagcbor" "github.com/ipld/go-ipld-prime/codec/dagcbor"
"github.com/ipld/go-ipld-prime/codec/dagjson" "github.com/ipld/go-ipld-prime/codec/dagjson"
"github.com/ipld/go-ipld-prime/linking" "github.com/ipld/go-ipld-prime/linking"
@ -17,6 +18,7 @@ import (
"github.com/ipld/go-ipld-prime/multicodec" "github.com/ipld/go-ipld-prime/multicodec"
basicnode "github.com/ipld/go-ipld-prime/node/basic" basicnode "github.com/ipld/go-ipld-prime/node/basic"
"github.com/ipld/go-ipld-prime/storage/memstore" "github.com/ipld/go-ipld-prime/storage/memstore"
mh "github.com/multiformats/go-multihash"
) )
var store = memstore.Store{} var store = memstore.Store{}
@ -33,7 +35,7 @@ func GenerateHash(json map[string]interface{}) (string, []byte, error) {
return "", nil, err return "", nil, err
} }
cidString, err := CIDFromJSONBytes(content) cidString, err := CIDFromJSONBytesUsingIpldPrime(content)
if err != nil { if err != nil {
return "", nil, err return "", nil, err
} }
@ -41,6 +43,16 @@ func GenerateHash(json map[string]interface{}) (string, []byte, error) {
return cidString, content, nil return cidString, content, nil
} }
// CIDFromJSONBytes returns CID (cbor) for json (as bytes).
func CIDFromJSONBytes(content []byte) (string, error) {
cid, err := cbor.FromJSON(bytes.NewReader(content), mh.SHA2_256, -1)
if err != nil {
return "", err
}
return cid.String(), nil
}
// GetAttributeAsString returns a map attribute as string, if possible. // GetAttributeAsString returns a map attribute as string, if possible.
func GetAttributeAsString(obj map[string]interface{}, attr string) (string, error) { func GetAttributeAsString(obj map[string]interface{}, attr string) (string, error) {
if value, ok := obj[attr]; ok { if value, ok := obj[attr]; ok {
@ -54,14 +66,10 @@ func GetAttributeAsString(obj map[string]interface{}, attr string) (string, erro
return "", errors.New("attribute not found") return "", errors.New("attribute not found")
} }
// CIDFromJSONBytes returns CID (dagcbor) for json (as bytes). // CIDFromJSONBytesUsingIpldPrime returns CID (dagcbor) for json (as bytes).
// This is combination of samples for unmarshalling and linking // This is combination of samples for unmarshalling and linking
// see: https://pkg.go.dev/github.com/ipld/go-ipld-prime // see: https://pkg.go.dev/github.com/ipld/go-ipld-prime
func CIDFromJSONBytes(content []byte) (string, error) { func CIDFromJSONBytesUsingIpldPrime(content []byte) (string, error) {
if len(content) == 0 {
return "", nil
}
np := basicnode.Prototype.Any // Pick a stle for the in-memory data. np := basicnode.Prototype.Any // Pick a stle for the in-memory data.
nb := np.NewBuilder() // Create a builder. nb := np.NewBuilder() // Create a builder.
err := dagjson.Decode(nb, bytes.NewReader(content)) // Hand the builder to decoding -- decoding will fill it in! err := dagjson.Decode(nb, bytes.NewReader(content)) // Hand the builder to decoding -- decoding will fill it in!

View File

@ -1,9 +1,8 @@
package utils package utils
import ( import (
"testing"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"testing"
) )
func TestAndValidateCIDGeneration(t *testing.T) { func TestAndValidateCIDGeneration(t *testing.T) {
@ -12,12 +11,13 @@ func TestAndValidateCIDGeneration(t *testing.T) {
content string content string
expected string expected string
}{ }{
{ // empty string and empty json blows up
"empty string", "", "", // {
}, // "empty string", "", "bafyreiengp2sbi6ez34a2jctv34bwyjl7yoliteleaswgcwtqzrhmpyt2m",
{ // },
"empty json", "{}", "bafyreigbtj4x7ip5legnfznufuopl4sg4knzc2cof6duas4b3q2fy6swua", // {
}, // "empty json", "{}", "bafyreihpfkdvib5muloxlj5b3tgdwibjdcu3zdsuhyft33z7gtgnlzlkpm",
// },
{ {
"test record", "{\"build_artifact_cid\":\"QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9\",\"repo_registration_record_cid\":\"QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D\",\"tls_cert_cid\":\"QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR\",\"type\":\"WebsiteRegistrationRecord\",\"url\":\"https://cerc.io\",\"version\":\"0.0.1\"}", "test record", "{\"build_artifact_cid\":\"QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9\",\"repo_registration_record_cid\":\"QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D\",\"tls_cert_cid\":\"QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR\",\"type\":\"WebsiteRegistrationRecord\",\"url\":\"https://cerc.io\",\"version\":\"0.0.1\"}",
@ -26,8 +26,10 @@ func TestAndValidateCIDGeneration(t *testing.T) {
} }
for _, tc := range testCases { for _, tc := range testCases {
newImpl, err := CIDFromJSONBytes([]byte(tc.content)) deprecatedAndCorrect, _ := CIDFromJSONBytes([]byte(tc.content))
newImpl, err := CIDFromJSONBytesUsingIpldPrime([]byte(tc.content))
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, deprecatedAndCorrect, newImpl, tc.name)
require.Equal(t, tc.expected, newImpl) require.Equal(t, tc.expected, newImpl)
} }
} }

View File

@ -3,7 +3,6 @@ package keeper
import ( import (
"context" "context"
errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
@ -27,7 +26,7 @@ func (q Querier) Auctions(c context.Context, req *types.AuctionsRequest) (*types
func (q Querier) GetAuction(c context.Context, req *types.AuctionRequest) (*types.AuctionResponse, error) { func (q Querier) GetAuction(c context.Context, req *types.AuctionRequest) (*types.AuctionResponse, error) {
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
if req.Id == "" { if req.Id == "" {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "auction ID is required") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "auction ID is required")
} }
resp := q.Keeper.GetAuction(ctx, req.Id) resp := q.Keeper.GetAuction(ctx, req.Id)
@ -38,10 +37,10 @@ func (q Querier) GetAuction(c context.Context, req *types.AuctionRequest) (*type
func (q Querier) GetBid(c context.Context, req *types.BidRequest) (*types.BidResponse, error) { func (q Querier) GetBid(c context.Context, req *types.BidRequest) (*types.BidResponse, error) {
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
if req.AuctionId == "" { if req.AuctionId == "" {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "auction ID is required") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "auction ID is required")
} }
if req.Bidder == "" { if req.Bidder == "" {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "bidder address is required") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "bidder address is required")
} }
resp := q.Keeper.GetBid(ctx, req.AuctionId, req.Bidder) resp := q.Keeper.GetBid(ctx, req.AuctionId, req.Bidder)
return &types.BidResponse{Bid: &resp}, nil return &types.BidResponse{Bid: &resp}, nil
@ -51,7 +50,7 @@ func (q Querier) GetBid(c context.Context, req *types.BidRequest) (*types.BidRes
func (q Querier) GetBids(c context.Context, req *types.BidsRequest) (*types.BidsResponse, error) { func (q Querier) GetBids(c context.Context, req *types.BidsRequest) (*types.BidsResponse, error) {
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
if req.AuctionId == "" { if req.AuctionId == "" {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "auction ID is required") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "auction ID is required")
} }
resp := q.Keeper.GetBids(ctx, req.AuctionId) resp := q.Keeper.GetBids(ctx, req.AuctionId)
return &types.BidsResponse{Bids: resp}, nil return &types.BidsResponse{Bids: resp}, nil
@ -61,7 +60,7 @@ func (q Querier) GetBids(c context.Context, req *types.BidsRequest) (*types.Bids
func (q Querier) AuctionsByBidder(c context.Context, req *types.AuctionsByBidderRequest) (*types.AuctionsByBidderResponse, error) { func (q Querier) AuctionsByBidder(c context.Context, req *types.AuctionsByBidderRequest) (*types.AuctionsByBidderResponse, error) {
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
if req.BidderAddress == "" { if req.BidderAddress == "" {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "bidder address is required") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "bidder address is required")
} }
resp := q.Keeper.QueryAuctionsByBidder(ctx, req.BidderAddress) resp := q.Keeper.QueryAuctionsByBidder(ctx, req.BidderAddress)
return &types.AuctionsByBidderResponse{Auctions: &types.Auctions{Auctions: resp}}, nil return &types.AuctionsByBidderResponse{Auctions: &types.Auctions{Auctions: resp}}, nil
@ -71,7 +70,7 @@ func (q Querier) AuctionsByBidder(c context.Context, req *types.AuctionsByBidder
func (q Querier) AuctionsByOwner(c context.Context, req *types.AuctionsByOwnerRequest) (*types.AuctionsByOwnerResponse, error) { func (q Querier) AuctionsByOwner(c context.Context, req *types.AuctionsByOwnerRequest) (*types.AuctionsByOwnerResponse, error) {
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
if req.OwnerAddress == "" { if req.OwnerAddress == "" {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "owner address is required") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "owner address is required")
} }
resp := q.Keeper.QueryAuctionsByOwner(ctx, req.OwnerAddress) resp := q.Keeper.QueryAuctionsByOwner(ctx, req.OwnerAddress)
return &types.AuctionsByOwnerResponse{Auctions: &types.Auctions{Auctions: resp}}, nil return &types.AuctionsByOwnerResponse{Auctions: &types.Auctions{Auctions: resp}}, nil

View File

@ -6,7 +6,6 @@ import (
"fmt" "fmt"
"time" "time"
errorsmod "cosmossdk.io/errors"
"github.com/cerc-io/laconicd/x/auction/types" "github.com/cerc-io/laconicd/x/auction/types"
"github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec"
storetypes "github.com/cosmos/cosmos-sdk/store/types" storetypes "github.com/cosmos/cosmos-sdk/store/types"
@ -15,7 +14,6 @@ import (
auth "github.com/cosmos/cosmos-sdk/x/auth/keeper" auth "github.com/cosmos/cosmos-sdk/x/auth/keeper"
bank "github.com/cosmos/cosmos-sdk/x/bank/keeper" bank "github.com/cosmos/cosmos-sdk/x/bank/keeper"
params "github.com/cosmos/cosmos-sdk/x/params/types" params "github.com/cosmos/cosmos-sdk/x/params/types"
"github.com/tendermint/tendermint/libs/log"
wnsUtils "github.com/cerc-io/laconicd/utils" wnsUtils "github.com/cerc-io/laconicd/utils"
) )
@ -79,11 +77,6 @@ func NewKeeper(accountKeeper auth.AccountKeeper,
} }
} }
// Logger returns a module-specific logger.
func (k Keeper) Logger(ctx sdk.Context) log.Logger {
return ctx.Logger().With("module", types.ModuleName)
}
func (k *Keeper) SetUsageKeepers(usageKeepers []types.AuctionUsageKeeper) { func (k *Keeper) SetUsageKeepers(usageKeepers []types.AuctionUsageKeeper) {
k.usageKeepers = usageKeepers k.usageKeepers = usageKeepers
} }
@ -313,7 +306,7 @@ func (k Keeper) CreateAuction(ctx sdk.Context, msg types.MsgCreateAuction) (*typ
// Generate auction Id. // Generate auction Id.
account := k.accountKeeper.GetAccount(ctx, signerAddress) account := k.accountKeeper.GetAccount(ctx, signerAddress)
if account == nil { if account == nil {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "Account not found.") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "Account not found.")
} }
auctionID := types.AuctionID{ auctionID := types.AuctionID{
@ -347,12 +340,12 @@ func (k Keeper) CreateAuction(ctx sdk.Context, msg types.MsgCreateAuction) (*typ
func (k Keeper) CommitBid(ctx sdk.Context, msg types.MsgCommitBid) (*types.Bid, error) { func (k Keeper) CommitBid(ctx sdk.Context, msg types.MsgCommitBid) (*types.Bid, error) {
if !k.HasAuction(ctx, msg.AuctionId) { if !k.HasAuction(ctx, msg.AuctionId) {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Auction not found.") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Auction not found.")
} }
auction := k.GetAuction(ctx, msg.AuctionId) auction := k.GetAuction(ctx, msg.AuctionId)
if auction.Status != types.AuctionStatusCommitPhase { if auction.Status != types.AuctionStatusCommitPhase {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Auction is not in commit phase.") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Auction is not in commit phase.")
} }
signerAddress, err := sdk.AccAddressFromBech32(msg.Signer) signerAddress, err := sdk.AccAddressFromBech32(msg.Signer)
@ -397,12 +390,12 @@ func (k Keeper) CommitBid(ctx sdk.Context, msg types.MsgCommitBid) (*types.Bid,
// RevealBid reeals a bid committed earlier. // RevealBid reeals a bid committed earlier.
func (k Keeper) RevealBid(ctx sdk.Context, msg types.MsgRevealBid) (*types.Auction, error) { func (k Keeper) RevealBid(ctx sdk.Context, msg types.MsgRevealBid) (*types.Auction, error) {
if !k.HasAuction(ctx, msg.AuctionId) { if !k.HasAuction(ctx, msg.AuctionId) {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Auction not found.") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Auction not found.")
} }
auction := k.GetAuction(ctx, msg.AuctionId) auction := k.GetAuction(ctx, msg.AuctionId)
if auction.Status != types.AuctionStatusRevealPhase { if auction.Status != types.AuctionStatusRevealPhase {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Auction is not in reveal phase.") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Auction is not in reveal phase.")
} }
signerAddress, err := sdk.AccAddressFromBech32(msg.Signer) signerAddress, err := sdk.AccAddressFromBech32(msg.Signer)
@ -411,65 +404,65 @@ func (k Keeper) RevealBid(ctx sdk.Context, msg types.MsgRevealBid) (*types.Aucti
} }
if !k.HasBid(ctx, msg.AuctionId, signerAddress.String()) { if !k.HasBid(ctx, msg.AuctionId, signerAddress.String()) {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bid not found.") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Bid not found.")
} }
bid := k.GetBid(ctx, auction.Id, signerAddress.String()) bid := k.GetBid(ctx, auction.Id, signerAddress.String())
if bid.Status != types.BidStatusCommitted { if bid.Status != types.BidStatusCommitted {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bid not in committed state.") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Bid not in committed state.")
} }
revealBytes, err := hex.DecodeString(msg.Reveal) revealBytes, err := hex.DecodeString(msg.Reveal)
if err != nil { if err != nil {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal string.") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal string.")
} }
cid, err := wnsUtils.CIDFromJSONBytes(revealBytes) cid, err := wnsUtils.CIDFromJSONBytes(revealBytes)
if err != nil { if err != nil {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal JSON.") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal JSON.")
} }
if bid.CommitHash != cid { if bid.CommitHash != cid {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Commit hash mismatch.") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Commit hash mismatch.")
} }
var reveal map[string]interface{} var reveal map[string]interface{}
err = json.Unmarshal(revealBytes, &reveal) err = json.Unmarshal(revealBytes, &reveal)
if err != nil { if err != nil {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Reveal JSON unmarshal error.") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Reveal JSON unmarshal error.")
} }
chainID, err := wnsUtils.GetAttributeAsString(reveal, "chainId") chainID, err := wnsUtils.GetAttributeAsString(reveal, "chainId")
if err != nil || chainID != ctx.ChainID() { if err != nil || chainID != ctx.ChainID() {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal chainID.") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal chainID.")
} }
auctionID, err := wnsUtils.GetAttributeAsString(reveal, "auctionId") auctionID, err := wnsUtils.GetAttributeAsString(reveal, "auctionId")
if err != nil || auctionID != msg.AuctionId { if err != nil || auctionID != msg.AuctionId {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal auction Id.") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal auction Id.")
} }
bidderAddress, err := wnsUtils.GetAttributeAsString(reveal, "bidderAddress") bidderAddress, err := wnsUtils.GetAttributeAsString(reveal, "bidderAddress")
if err != nil { if err != nil {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal bid address.") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal bid address.")
} }
if bidderAddress != signerAddress.String() { if bidderAddress != signerAddress.String() {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Reveal bid address mismatch.") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Reveal bid address mismatch.")
} }
bidAmountStr, err := wnsUtils.GetAttributeAsString(reveal, "bidAmount") bidAmountStr, err := wnsUtils.GetAttributeAsString(reveal, "bidAmount")
if err != nil { if err != nil {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal bid amount.") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal bid amount.")
} }
bidAmount, err := sdk.ParseCoinNormalized(bidAmountStr) bidAmount, err := sdk.ParseCoinNormalized(bidAmountStr)
if err != nil { if err != nil {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal bid amount.") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal bid amount.")
} }
if bidAmount.IsLT(auction.MinimumBid) { if bidAmount.IsLT(auction.MinimumBid) {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bid is lower than minimum bid.") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Bid is lower than minimum bid.")
} }
// Lock bid amount. // Lock bid amount.

View File

@ -2,11 +2,9 @@ package keeper
import ( import (
"context" "context"
"fmt"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cerc-io/laconicd/utils"
"github.com/cerc-io/laconicd/x/auction/types" "github.com/cerc-io/laconicd/x/auction/types"
) )
@ -22,7 +20,6 @@ var _ types.MsgServer = msgServer{}
func (s msgServer) CreateAuction(c context.Context, msg *types.MsgCreateAuction) (*types.MsgCreateAuctionResponse, error) { func (s msgServer) CreateAuction(c context.Context, msg *types.MsgCreateAuction) (*types.MsgCreateAuctionResponse, error) {
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
ctx = *utils.CtxWithCustomKVGasConfig(&ctx)
signerAddress, err := sdk.AccAddressFromBech32(msg.Signer) signerAddress, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil { if err != nil {
@ -49,15 +46,13 @@ func (s msgServer) CreateAuction(c context.Context, msg *types.MsgCreateAuction)
), ),
}) })
s.logTxGasConsumed(ctx, "CreateAuction")
return &types.MsgCreateAuctionResponse{Auction: resp}, nil return &types.MsgCreateAuctionResponse{Auction: resp}, nil
} }
// CommitBid is the command for committing a bid // CommitBid is the command for committing a bid
//nolint: all
func (s msgServer) CommitBid(c context.Context, msg *types.MsgCommitBid) (*types.MsgCommitBidResponse, error) { func (s msgServer) CommitBid(c context.Context, msg *types.MsgCommitBid) (*types.MsgCommitBidResponse, error) {
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
ctx = *utils.CtxWithCustomKVGasConfig(&ctx)
signerAddress, err := sdk.AccAddressFromBech32(msg.Signer) signerAddress, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil { if err != nil {
@ -82,15 +77,13 @@ func (s msgServer) CommitBid(c context.Context, msg *types.MsgCommitBid) (*types
), ),
}) })
s.logTxGasConsumed(ctx, "CommitBid")
return &types.MsgCommitBidResponse{Bid: resp}, nil return &types.MsgCommitBidResponse{Bid: resp}, nil
} }
// RevealBid is the command for revealing a bid //RevealBid is the command for revealing a bid
//nolint: all
func (s msgServer) RevealBid(c context.Context, msg *types.MsgRevealBid) (*types.MsgRevealBidResponse, error) { func (s msgServer) RevealBid(c context.Context, msg *types.MsgRevealBid) (*types.MsgRevealBidResponse, error) {
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
ctx = *utils.CtxWithCustomKVGasConfig(&ctx)
signerAddress, err := sdk.AccAddressFromBech32(msg.Signer) signerAddress, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil { if err != nil {
@ -115,12 +108,5 @@ func (s msgServer) RevealBid(c context.Context, msg *types.MsgRevealBid) (*types
), ),
}) })
s.logTxGasConsumed(ctx, "RevealBid")
return &types.MsgRevealBidResponse{Auction: resp}, nil return &types.MsgRevealBidResponse{Auction: resp}, nil
} }
func (s msgServer) logTxGasConsumed(ctx sdk.Context, tx string) {
gasConsumed := ctx.GasMeter().GasConsumed()
s.Keeper.Logger(ctx).Info("tx executed", "method", tx, "gas_consumed", fmt.Sprintf("%d", gasConsumed))
}

View File

@ -1,7 +1,6 @@
package types package types
import ( import (
errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
) )
@ -33,19 +32,19 @@ func (msg MsgCreateAuction) Type() string { return "create" }
// ValidateBasic Implements Msg. // ValidateBasic Implements Msg.
func (msg MsgCreateAuction) ValidateBasic() error { func (msg MsgCreateAuction) ValidateBasic() error {
if msg.Signer == "" { if msg.Signer == "" {
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer) return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer)
} }
if msg.CommitsDuration <= 0 { if msg.CommitsDuration <= 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "commit phase duration invalid.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "commit phase duration invalid.")
} }
if msg.RevealsDuration <= 0 { if msg.RevealsDuration <= 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "reveal phase duration invalid.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "reveal phase duration invalid.")
} }
if !msg.MinimumBid.IsPositive() { if !msg.MinimumBid.IsPositive() {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "minimum bid should be greater than zero.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "minimum bid should be greater than zero.")
} }
return nil return nil
@ -80,15 +79,15 @@ func (msg MsgCommitBid) Type() string { return "commit" }
// ValidateBasic Implements Msg. // ValidateBasic Implements Msg.
func (msg MsgCommitBid) ValidateBasic() error { func (msg MsgCommitBid) ValidateBasic() error {
if msg.Signer == "" { if msg.Signer == "" {
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer address.") return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer address.")
} }
if msg.AuctionId == "" { if msg.AuctionId == "" {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid auction ID.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "invalid auction ID.")
} }
if msg.CommitHash == "" { if msg.CommitHash == "" {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid commit hash.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "invalid commit hash.")
} }
return nil return nil
@ -123,15 +122,15 @@ func (msg MsgRevealBid) Type() string { return "reveal" }
// ValidateBasic Implements Msg. // ValidateBasic Implements Msg.
func (msg MsgRevealBid) ValidateBasic() error { func (msg MsgRevealBid) ValidateBasic() error {
if msg.Signer == "" { if msg.Signer == "" {
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer address.") return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer address.")
} }
if msg.AuctionId == "" { if msg.AuctionId == "" {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid auction ID.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "invalid auction ID.")
} }
if msg.Reveal == "" { if msg.Reveal == "" {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid reveal data.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "invalid reveal data.")
} }
return nil return nil

View File

@ -1,337 +0,0 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: vulcanize/auction/v1beta1/tx.proto
/*
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package types
import (
"context"
"io"
"net/http"
"github.com/golang/protobuf/descriptor"
"github.com/golang/protobuf/proto"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/grpc-ecosystem/grpc-gateway/utilities"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
)
// Suppress "imported and not used" errors
var _ codes.Code
var _ io.Reader
var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = descriptor.ForMessage
var _ = metadata.Join
var (
filter_Msg_CreateAuction_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_Msg_CreateAuction_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq MsgCreateAuction
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_CreateAuction_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.CreateAuction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Msg_CreateAuction_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq MsgCreateAuction
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_CreateAuction_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.CreateAuction(ctx, &protoReq)
return msg, metadata, err
}
var (
filter_Msg_CommitBid_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_Msg_CommitBid_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq MsgCommitBid
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_CommitBid_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.CommitBid(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Msg_CommitBid_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq MsgCommitBid
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_CommitBid_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.CommitBid(ctx, &protoReq)
return msg, metadata, err
}
var (
filter_Msg_RevealBid_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_Msg_RevealBid_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq MsgRevealBid
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_RevealBid_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.RevealBid(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Msg_RevealBid_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq MsgRevealBid
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_RevealBid_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.RevealBid(ctx, &protoReq)
return msg, metadata, err
}
// RegisterMsgHandlerServer registers the http handlers for service Msg to "mux".
// UnaryRPC :call MsgServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMsgHandlerFromEndpoint instead.
func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error {
mux.Handle("POST", pattern_Msg_CreateAuction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Msg_CreateAuction_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Msg_CreateAuction_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Msg_CommitBid_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Msg_CommitBid_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Msg_CommitBid_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Msg_RevealBid_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Msg_RevealBid_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Msg_RevealBid_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
// RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.Dial(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
return RegisterMsgHandler(ctx, mux, conn)
}
// RegisterMsgHandler registers the http handlers for service Msg to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterMsgHandlerClient(ctx, mux, NewMsgClient(conn))
}
// RegisterMsgHandlerClient registers the http handlers for service Msg
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "MsgClient" to call the correct interceptors.
func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error {
mux.Handle("POST", pattern_Msg_CreateAuction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Msg_CreateAuction_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Msg_CreateAuction_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Msg_CommitBid_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Msg_CommitBid_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Msg_CommitBid_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Msg_RevealBid_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Msg_RevealBid_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Msg_RevealBid_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_Msg_CreateAuction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "auction", "v1beta1", "create_auction"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Msg_CommitBid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "auction", "v1beta1", "commit_bid"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Msg_RevealBid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "auction", "v1beta1", "reveal_bid"}, "", runtime.AssumeColonVerbOpt(false)))
)
var (
forward_Msg_CreateAuction_0 = runtime.ForwardResponseMessage
forward_Msg_CommitBid_0 = runtime.ForwardResponseMessage
forward_Msg_RevealBid_0 = runtime.ForwardResponseMessage
)

View File

@ -3,7 +3,6 @@ package keeper
import ( import (
"context" "context"
errorsmod "cosmossdk.io/errors"
"github.com/cerc-io/laconicd/x/bond/types" "github.com/cerc-io/laconicd/x/bond/types"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
@ -31,7 +30,7 @@ func (q Querier) GetBondByID(c context.Context, req *types.QueryGetBondByIDReque
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
bondID := req.GetId() bondID := req.GetId()
if len(bondID) == 0 { if len(bondID) == 0 {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "bond id required") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "bond id required")
} }
bond := q.Keeper.GetBond(ctx, req.GetId()) bond := q.Keeper.GetBond(ctx, req.GetId())
return &types.QueryGetBondByIDResponse{Bond: &bond}, nil return &types.QueryGetBondByIDResponse{Bond: &bond}, nil
@ -41,7 +40,7 @@ func (q Querier) GetBondsByOwner(c context.Context, req *types.QueryGetBondsByOw
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
owner := req.GetOwner() owner := req.GetOwner()
if len(owner) == 0 { if len(owner) == 0 {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "owner id required") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "owner id required")
} }
bonds := q.Keeper.QueryBondsByOwner(ctx, owner) bonds := q.Keeper.QueryBondsByOwner(ctx, owner)
return &types.QueryGetBondsByOwnerResponse{Bonds: bonds}, nil return &types.QueryGetBondsByOwnerResponse{Bonds: bonds}, nil

View File

@ -5,7 +5,6 @@ import (
"encoding/hex" "encoding/hex"
"fmt" "fmt"
errorsmod "cosmossdk.io/errors"
"github.com/cerc-io/laconicd/x/bond/types" "github.com/cerc-io/laconicd/x/bond/types"
"github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec"
storetypes "github.com/cosmos/cosmos-sdk/store/types" storetypes "github.com/cosmos/cosmos-sdk/store/types"
@ -14,7 +13,6 @@ import (
auth "github.com/cosmos/cosmos-sdk/x/auth/keeper" auth "github.com/cosmos/cosmos-sdk/x/auth/keeper"
bank "github.com/cosmos/cosmos-sdk/x/bank/keeper" bank "github.com/cosmos/cosmos-sdk/x/bank/keeper"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
"github.com/tendermint/tendermint/libs/log"
) )
// prefixIDToBondIndex is the prefix for ID -> Bond index in the KVStore. // prefixIDToBondIndex is the prefix for ID -> Bond index in the KVStore.
@ -63,11 +61,6 @@ func NewKeeper(cdc codec.BinaryCodec,
} }
} }
// Logger returns a module-specific logger.
func (k Keeper) Logger(ctx sdk.Context) log.Logger {
return ctx.Logger().With("module", types.ModuleName)
}
// Generates Bond ID -> Bond index key. // Generates Bond ID -> Bond index key.
func getBondIndexKey(id string) []byte { func getBondIndexKey(id string) []byte {
return append(prefixIDToBondIndex, []byte(id)...) return append(prefixIDToBondIndex, []byte(id)...)
@ -120,7 +113,7 @@ func (k Keeper) CreateBond(ctx sdk.Context, ownerAddress sdk.AccAddress, coins s
for _, coin := range coins { for _, coin := range coins {
balance := k.bankKeeper.HasBalance(ctx, ownerAddress, coin) balance := k.bankKeeper.HasBalance(ctx, ownerAddress, coin)
if !balance { if !balance {
return nil, errorsmod.Wrap(sdkerrors.ErrInsufficientFunds, "failed to create bond; Insufficient funds") return nil, sdkerrors.Wrap(sdkerrors.ErrInsufficientFunds, "failed to create bond; Insufficient funds")
} }
} }
@ -136,7 +129,7 @@ func (k Keeper) CreateBond(ctx sdk.Context, ownerAddress sdk.AccAddress, coins s
bond := types.Bond{Id: bondID, Owner: ownerAddress.String(), Balance: coins} bond := types.Bond{Id: bondID, Owner: ownerAddress.String(), Balance: coins}
if bond.Balance.IsAnyGT(maxBondAmount) { if bond.Balance.IsAnyGT(maxBondAmount) {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Max bond amount exceeded.") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Max bond amount exceeded.")
} }
// Move funds into the bond account module. // Move funds into the bond account module.
@ -228,18 +221,18 @@ func (k Keeper) QueryBondsByOwner(ctx sdk.Context, ownerAddress string) []types.
// RefillBond refills an existing bond. // RefillBond refills an existing bond.
func (k Keeper) RefillBond(ctx sdk.Context, id string, ownerAddress sdk.AccAddress, coins sdk.Coins) (*types.Bond, error) { func (k Keeper) RefillBond(ctx sdk.Context, id string, ownerAddress sdk.AccAddress, coins sdk.Coins) (*types.Bond, error) {
if !k.HasBond(ctx, id) { if !k.HasBond(ctx, id) {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.")
} }
bond := k.GetBond(ctx, id) bond := k.GetBond(ctx, id)
if bond.Owner != ownerAddress.String() { if bond.Owner != ownerAddress.String() {
return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.") return nil, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.")
} }
// Check if account has funds. // Check if account has funds.
for _, coin := range coins { for _, coin := range coins {
if !k.bankKeeper.HasBalance(ctx, ownerAddress, coin) { if !k.bankKeeper.HasBalance(ctx, ownerAddress, coin) {
return nil, errorsmod.Wrap(sdkerrors.ErrInsufficientFunds, "Insufficient funds.") return nil, sdkerrors.Wrap(sdkerrors.ErrInsufficientFunds, "Insufficient funds.")
} }
} }
@ -247,7 +240,7 @@ func (k Keeper) RefillBond(ctx sdk.Context, id string, ownerAddress sdk.AccAddre
updatedBalance := bond.Balance.Add(coins...) updatedBalance := bond.Balance.Add(coins...)
if updatedBalance.IsAnyGT(maxBondAmount) { if updatedBalance.IsAnyGT(maxBondAmount) {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Max bond amount exceeded.") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Max bond amount exceeded.")
} }
// Move funds into the bond account module. // Move funds into the bond account module.
@ -266,17 +259,17 @@ func (k Keeper) RefillBond(ctx sdk.Context, id string, ownerAddress sdk.AccAddre
// WithdrawBond withdraws funds from a bond. // WithdrawBond withdraws funds from a bond.
func (k Keeper) WithdrawBond(ctx sdk.Context, id string, ownerAddress sdk.AccAddress, coins sdk.Coins) (*types.Bond, error) { func (k Keeper) WithdrawBond(ctx sdk.Context, id string, ownerAddress sdk.AccAddress, coins sdk.Coins) (*types.Bond, error) {
if !k.HasBond(ctx, id) { if !k.HasBond(ctx, id) {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.")
} }
bond := k.GetBond(ctx, id) bond := k.GetBond(ctx, id)
if bond.Owner != ownerAddress.String() { if bond.Owner != ownerAddress.String() {
return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.") return nil, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.")
} }
updatedBalance, isNeg := bond.Balance.SafeSub(coins...) updatedBalance, isNeg := bond.Balance.SafeSub(coins...)
if isNeg { if isNeg {
return nil, errorsmod.Wrap(sdkerrors.ErrInsufficientFunds, "Insufficient bond balance.") return nil, sdkerrors.Wrap(sdkerrors.ErrInsufficientFunds, "Insufficient bond balance.")
} }
// Move funds from the bond into the account. // Move funds from the bond into the account.
@ -295,18 +288,18 @@ func (k Keeper) WithdrawBond(ctx sdk.Context, id string, ownerAddress sdk.AccAdd
// CancelBond cancels a bond, returning funds to the owner. // CancelBond cancels a bond, returning funds to the owner.
func (k Keeper) CancelBond(ctx sdk.Context, id string, ownerAddress sdk.AccAddress) (*types.Bond, error) { func (k Keeper) CancelBond(ctx sdk.Context, id string, ownerAddress sdk.AccAddress) (*types.Bond, error) {
if !k.HasBond(ctx, id) { if !k.HasBond(ctx, id) {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.")
} }
bond := k.GetBond(ctx, id) bond := k.GetBond(ctx, id)
if bond.Owner != ownerAddress.String() { if bond.Owner != ownerAddress.String() {
return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.") return nil, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.")
} }
// Check if bond is used in other modules. // Check if bond is used in other modules.
for _, usageKeeper := range k.usageKeepers { for _, usageKeeper := range k.usageKeepers {
if usageKeeper.UsesBond(ctx, id) { if usageKeeper.UsesBond(ctx, id) {
return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, fmt.Sprintf("Bond in use by the '%s' module.", usageKeeper.ModuleName())) return nil, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, fmt.Sprintf("Bond in use by the '%s' module.", usageKeeper.ModuleName()))
} }
} }
@ -337,7 +330,7 @@ func (k Keeper) GetBondModuleBalances(ctx sdk.Context) sdk.Coins {
// TransferCoinsToModuleAccount moves funds from the bonds module account to another module account. // TransferCoinsToModuleAccount moves funds from the bonds module account to another module account.
func (k Keeper) TransferCoinsToModuleAccount(ctx sdk.Context, id, moduleAccount string, coins sdk.Coins) error { func (k Keeper) TransferCoinsToModuleAccount(ctx sdk.Context, id, moduleAccount string, coins sdk.Coins) error {
if !k.HasBond(ctx, id) { if !k.HasBond(ctx, id) {
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond not found.") return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Bond not found.")
} }
bondObj := k.GetBond(ctx, id) bondObj := k.GetBond(ctx, id)
@ -347,13 +340,13 @@ func (k Keeper) TransferCoinsToModuleAccount(ctx sdk.Context, id, moduleAccount
if isNeg { if isNeg {
// Check if bond has sufficient funds. // Check if bond has sufficient funds.
return errorsmod.Wrap(sdkerrors.ErrInsufficientFunds, "Insufficient funds.") return sdkerrors.Wrap(sdkerrors.ErrInsufficientFunds, "Insufficient funds.")
} }
// Move funds from bond module to record rent module. // Move funds from bond module to record rent module.
err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ModuleName, moduleAccount, coins) err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ModuleName, moduleAccount, coins)
if err != nil { if err != nil {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Error transferring funds.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Error transferring funds.")
} }
// Update bond balance. // Update bond balance.

View File

@ -2,12 +2,9 @@ package keeper
import ( import (
"context" "context"
"fmt"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cerc-io/laconicd/utils"
"github.com/cerc-io/laconicd/x/bond/types" "github.com/cerc-io/laconicd/x/bond/types"
sdk "github.com/cosmos/cosmos-sdk/types"
) )
type msgServer struct { type msgServer struct {
@ -23,8 +20,6 @@ var _ types.MsgServer = msgServer{}
func (k msgServer) CreateBond(c context.Context, msg *types.MsgCreateBond) (*types.MsgCreateBondResponse, error) { func (k msgServer) CreateBond(c context.Context, msg *types.MsgCreateBond) (*types.MsgCreateBondResponse, error) {
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
ctx = *utils.CtxWithCustomKVGasConfig(&ctx)
signerAddress, err := sdk.AccAddressFromBech32(msg.Signer) signerAddress, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil { if err != nil {
return nil, err return nil, err
@ -47,15 +42,12 @@ func (k msgServer) CreateBond(c context.Context, msg *types.MsgCreateBond) (*typ
), ),
}) })
k.logTxGasConsumed(ctx, "CreateBond")
return &types.MsgCreateBondResponse{}, nil return &types.MsgCreateBondResponse{}, nil
} }
//nolint: all
func (k msgServer) RefillBond(c context.Context, msg *types.MsgRefillBond) (*types.MsgRefillBondResponse, error) { func (k msgServer) RefillBond(c context.Context, msg *types.MsgRefillBond) (*types.MsgRefillBondResponse, error) {
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
ctx = *utils.CtxWithCustomKVGasConfig(&ctx)
signerAddress, err := sdk.AccAddressFromBech32(msg.Signer) signerAddress, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil { if err != nil {
return nil, err return nil, err
@ -80,15 +72,12 @@ func (k msgServer) RefillBond(c context.Context, msg *types.MsgRefillBond) (*typ
), ),
}) })
k.logTxGasConsumed(ctx, "RefillBond")
return &types.MsgRefillBondResponse{}, nil return &types.MsgRefillBondResponse{}, nil
} }
//nolint: all
func (k msgServer) WithdrawBond(c context.Context, msg *types.MsgWithdrawBond) (*types.MsgWithdrawBondResponse, error) { func (k msgServer) WithdrawBond(c context.Context, msg *types.MsgWithdrawBond) (*types.MsgWithdrawBondResponse, error) {
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
ctx = *utils.CtxWithCustomKVGasConfig(&ctx)
signerAddress, err := sdk.AccAddressFromBech32(msg.Signer) signerAddress, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil { if err != nil {
return nil, err return nil, err
@ -113,15 +102,11 @@ func (k msgServer) WithdrawBond(c context.Context, msg *types.MsgWithdrawBond) (
), ),
}) })
k.logTxGasConsumed(ctx, "WithdrawBond")
return &types.MsgWithdrawBondResponse{}, nil return &types.MsgWithdrawBondResponse{}, nil
} }
func (k msgServer) CancelBond(c context.Context, msg *types.MsgCancelBond) (*types.MsgCancelBondResponse, error) { func (k msgServer) CancelBond(c context.Context, msg *types.MsgCancelBond) (*types.MsgCancelBondResponse, error) {
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
ctx = *utils.CtxWithCustomKVGasConfig(&ctx)
signerAddress, err := sdk.AccAddressFromBech32(msg.Signer) signerAddress, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil { if err != nil {
return nil, err return nil, err
@ -144,12 +129,5 @@ func (k msgServer) CancelBond(c context.Context, msg *types.MsgCancelBond) (*typ
), ),
}) })
k.logTxGasConsumed(ctx, "CancelBond")
return &types.MsgCancelBondResponse{}, nil return &types.MsgCancelBondResponse{}, nil
} }
func (k msgServer) logTxGasConsumed(ctx sdk.Context, tx string) {
gasConsumed := ctx.GasMeter().GasConsumed()
k.Keeper.Logger(ctx).Info("tx executed", "method", tx, "gas_consumed", fmt.Sprintf("%d", gasConsumed))
}

View File

@ -1,7 +1,6 @@
package types package types
import ( import (
errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
) )
@ -29,10 +28,10 @@ func (msg MsgCreateBond) Type() string { return "create" }
func (msg MsgCreateBond) ValidateBasic() error { func (msg MsgCreateBond) ValidateBasic() error {
if len(msg.Signer) == 0 { if len(msg.Signer) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer) return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer)
} }
if len(msg.Coins) == 0 || !msg.Coins.IsValid() { if len(msg.Coins) == 0 || !msg.Coins.IsValid() {
return errorsmod.Wrap(sdkerrors.ErrInvalidCoins, "Invalid amount.") return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, "Invalid amount.")
} }
return nil return nil
} }
@ -65,13 +64,13 @@ func (msg MsgRefillBond) Type() string { return "refill" }
func (msg MsgRefillBond) ValidateBasic() error { func (msg MsgRefillBond) ValidateBasic() error {
if len(msg.Id) == 0 { if len(msg.Id) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, msg.Id) return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, msg.Id)
} }
if len(msg.Signer) == 0 { if len(msg.Signer) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer) return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer)
} }
if len(msg.Coins) == 0 || !msg.Coins.IsValid() { if len(msg.Coins) == 0 || !msg.Coins.IsValid() {
return errorsmod.Wrap(sdkerrors.ErrInvalidCoins, "Invalid amount.") return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, "Invalid amount.")
} }
return nil return nil
} }
@ -104,13 +103,13 @@ func (msg MsgWithdrawBond) Type() string { return "withdraw" }
func (msg MsgWithdrawBond) ValidateBasic() error { func (msg MsgWithdrawBond) ValidateBasic() error {
if len(msg.Id) == 0 { if len(msg.Id) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, msg.Id) return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, msg.Id)
} }
if len(msg.Signer) == 0 { if len(msg.Signer) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer) return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer)
} }
if len(msg.Coins) == 0 || !msg.Coins.IsValid() { if len(msg.Coins) == 0 || !msg.Coins.IsValid() {
return errorsmod.Wrap(sdkerrors.ErrInvalidCoins, "Invalid amount.") return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, "Invalid amount.")
} }
return nil return nil
} }
@ -142,10 +141,10 @@ func (msg MsgCancelBond) Type() string { return "cancel" }
func (msg MsgCancelBond) ValidateBasic() error { func (msg MsgCancelBond) ValidateBasic() error {
if len(msg.Id) == 0 { if len(msg.Id) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, msg.Id) return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, msg.Id)
} }
if len(msg.Signer) == 0 { if len(msg.Signer) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer) return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer)
} }
return nil return nil
} }

420
x/bond/types/tx.pb.gw.go generated
View File

@ -1,420 +0,0 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: vulcanize/bond/v1beta1/tx.proto
/*
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package types
import (
"context"
"io"
"net/http"
"github.com/golang/protobuf/descriptor"
"github.com/golang/protobuf/proto"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/grpc-ecosystem/grpc-gateway/utilities"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
)
// Suppress "imported and not used" errors
var _ codes.Code
var _ io.Reader
var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = descriptor.ForMessage
var _ = metadata.Join
var (
filter_Msg_CreateBond_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_Msg_CreateBond_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq MsgCreateBond
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_CreateBond_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.CreateBond(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Msg_CreateBond_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq MsgCreateBond
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_CreateBond_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.CreateBond(ctx, &protoReq)
return msg, metadata, err
}
var (
filter_Msg_RefillBond_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_Msg_RefillBond_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq MsgRefillBond
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_RefillBond_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.RefillBond(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Msg_RefillBond_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq MsgRefillBond
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_RefillBond_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.RefillBond(ctx, &protoReq)
return msg, metadata, err
}
var (
filter_Msg_WithdrawBond_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_Msg_WithdrawBond_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq MsgWithdrawBond
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_WithdrawBond_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.WithdrawBond(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Msg_WithdrawBond_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq MsgWithdrawBond
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_WithdrawBond_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.WithdrawBond(ctx, &protoReq)
return msg, metadata, err
}
var (
filter_Msg_CancelBond_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_Msg_CancelBond_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq MsgCancelBond
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_CancelBond_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.CancelBond(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Msg_CancelBond_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq MsgCancelBond
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_CancelBond_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.CancelBond(ctx, &protoReq)
return msg, metadata, err
}
// RegisterMsgHandlerServer registers the http handlers for service Msg to "mux".
// UnaryRPC :call MsgServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMsgHandlerFromEndpoint instead.
func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error {
mux.Handle("POST", pattern_Msg_CreateBond_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Msg_CreateBond_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Msg_CreateBond_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Msg_RefillBond_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Msg_RefillBond_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Msg_RefillBond_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Msg_WithdrawBond_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Msg_WithdrawBond_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Msg_WithdrawBond_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Msg_CancelBond_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Msg_CancelBond_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Msg_CancelBond_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
// RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.Dial(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
return RegisterMsgHandler(ctx, mux, conn)
}
// RegisterMsgHandler registers the http handlers for service Msg to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterMsgHandlerClient(ctx, mux, NewMsgClient(conn))
}
// RegisterMsgHandlerClient registers the http handlers for service Msg
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "MsgClient" to call the correct interceptors.
func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error {
mux.Handle("POST", pattern_Msg_CreateBond_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Msg_CreateBond_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Msg_CreateBond_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Msg_RefillBond_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Msg_RefillBond_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Msg_RefillBond_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Msg_WithdrawBond_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Msg_WithdrawBond_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Msg_WithdrawBond_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_Msg_CancelBond_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Msg_CancelBond_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Msg_CancelBond_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_Msg_CreateBond_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "bond", "v1beta1", "create_bond"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Msg_RefillBond_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "bond", "v1beta1", "refill_bond"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Msg_WithdrawBond_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "bond", "v1beta1", "withdraw_bond"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Msg_CancelBond_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "bond", "v1beta1", "cancel_bond"}, "", runtime.AssumeColonVerbOpt(false)))
)
var (
forward_Msg_CreateBond_0 = runtime.ForwardResponseMessage
forward_Msg_RefillBond_0 = runtime.ForwardResponseMessage
forward_Msg_WithdrawBond_0 = runtime.ForwardResponseMessage
forward_Msg_CancelBond_0 = runtime.ForwardResponseMessage
)

View File

@ -6,8 +6,8 @@ import (
sdkmath "cosmossdk.io/math" sdkmath "cosmossdk.io/math"
errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/params"
@ -91,61 +91,61 @@ func getBlockValue(block *sdkmath.Int) *big.Int {
// if any of the block values is uninitialized (i.e nil) or if the EIP150Hash is an invalid hash. // if any of the block values is uninitialized (i.e nil) or if the EIP150Hash is an invalid hash.
func (cc ChainConfig) Validate() error { func (cc ChainConfig) Validate() error {
if err := validateBlock(cc.HomesteadBlock); err != nil { if err := validateBlock(cc.HomesteadBlock); err != nil {
return errorsmod.Wrap(err, "homesteadBlock") return sdkerrors.Wrap(err, "homesteadBlock")
} }
if err := validateBlock(cc.DAOForkBlock); err != nil { if err := validateBlock(cc.DAOForkBlock); err != nil {
return errorsmod.Wrap(err, "daoForkBlock") return sdkerrors.Wrap(err, "daoForkBlock")
} }
if err := validateBlock(cc.EIP150Block); err != nil { if err := validateBlock(cc.EIP150Block); err != nil {
return errorsmod.Wrap(err, "eip150Block") return sdkerrors.Wrap(err, "eip150Block")
} }
if err := validateHash(cc.EIP150Hash); err != nil { if err := validateHash(cc.EIP150Hash); err != nil {
return err return err
} }
if err := validateBlock(cc.EIP155Block); err != nil { if err := validateBlock(cc.EIP155Block); err != nil {
return errorsmod.Wrap(err, "eip155Block") return sdkerrors.Wrap(err, "eip155Block")
} }
if err := validateBlock(cc.EIP158Block); err != nil { if err := validateBlock(cc.EIP158Block); err != nil {
return errorsmod.Wrap(err, "eip158Block") return sdkerrors.Wrap(err, "eip158Block")
} }
if err := validateBlock(cc.ByzantiumBlock); err != nil { if err := validateBlock(cc.ByzantiumBlock); err != nil {
return errorsmod.Wrap(err, "byzantiumBlock") return sdkerrors.Wrap(err, "byzantiumBlock")
} }
if err := validateBlock(cc.ConstantinopleBlock); err != nil { if err := validateBlock(cc.ConstantinopleBlock); err != nil {
return errorsmod.Wrap(err, "constantinopleBlock") return sdkerrors.Wrap(err, "constantinopleBlock")
} }
if err := validateBlock(cc.PetersburgBlock); err != nil { if err := validateBlock(cc.PetersburgBlock); err != nil {
return errorsmod.Wrap(err, "petersburgBlock") return sdkerrors.Wrap(err, "petersburgBlock")
} }
if err := validateBlock(cc.IstanbulBlock); err != nil { if err := validateBlock(cc.IstanbulBlock); err != nil {
return errorsmod.Wrap(err, "istanbulBlock") return sdkerrors.Wrap(err, "istanbulBlock")
} }
if err := validateBlock(cc.MuirGlacierBlock); err != nil { if err := validateBlock(cc.MuirGlacierBlock); err != nil {
return errorsmod.Wrap(err, "muirGlacierBlock") return sdkerrors.Wrap(err, "muirGlacierBlock")
} }
if err := validateBlock(cc.BerlinBlock); err != nil { if err := validateBlock(cc.BerlinBlock); err != nil {
return errorsmod.Wrap(err, "berlinBlock") return sdkerrors.Wrap(err, "berlinBlock")
} }
if err := validateBlock(cc.LondonBlock); err != nil { if err := validateBlock(cc.LondonBlock); err != nil {
return errorsmod.Wrap(err, "londonBlock") return sdkerrors.Wrap(err, "londonBlock")
} }
if err := validateBlock(cc.ArrowGlacierBlock); err != nil { if err := validateBlock(cc.ArrowGlacierBlock); err != nil {
return errorsmod.Wrap(err, "arrowGlacierBlock") return sdkerrors.Wrap(err, "arrowGlacierBlock")
} }
if err := validateBlock(cc.MergeForkBlock); err != nil { if err := validateBlock(cc.MergeForkBlock); err != nil {
return errorsmod.Wrap(err, "mergeForkBlock") return sdkerrors.Wrap(err, "mergeForkBlock")
} }
// NOTE: chain ID is not needed to check config order // NOTE: chain ID is not needed to check config order
if err := cc.EthereumConfig(nil).CheckConfigForkOrder(); err != nil { if err := cc.EthereumConfig(nil).CheckConfigForkOrder(); err != nil {
return errorsmod.Wrap(err, "invalid config fork order") return sdkerrors.Wrap(err, "invalid config fork order")
} }
return nil return nil
} }
func validateHash(hex string) error { func validateHash(hex string) error {
if hex != "" && strings.TrimSpace(hex) == "" { if hex != "" && strings.TrimSpace(hex) == "" {
return errorsmod.Wrap(types.ErrInvalidChainConfig, "hash cannot be blank") return sdkerrors.Wrap(types.ErrInvalidChainConfig, "hash cannot be blank")
} }
return nil return nil
@ -158,7 +158,7 @@ func validateBlock(block *sdkmath.Int) error {
} }
if block.IsNegative() { if block.IsNegative() {
return errorsmod.Wrapf( return sdkerrors.Wrapf(
types.ErrInvalidChainConfig, "block value cannot be negative: %s", block, types.ErrInvalidChainConfig, "block value cannot be negative: %s", block,
) )
} }

View File

@ -8,8 +8,8 @@ import (
"github.com/cerc-io/laconicd/x/evm/types" "github.com/cerc-io/laconicd/x/evm/types"
errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/params"
@ -90,61 +90,61 @@ func getBlockValue(block *sdkmath.Int) *big.Int {
// if any of the block values is uninitialized (i.e nil) or if the EIP150Hash is an invalid hash. // if any of the block values is uninitialized (i.e nil) or if the EIP150Hash is an invalid hash.
func (cc ChainConfig) Validate() error { func (cc ChainConfig) Validate() error {
if err := validateBlock(cc.HomesteadBlock); err != nil { if err := validateBlock(cc.HomesteadBlock); err != nil {
return errorsmod.Wrap(err, "homesteadBlock") return sdkerrors.Wrap(err, "homesteadBlock")
} }
if err := validateBlock(cc.DAOForkBlock); err != nil { if err := validateBlock(cc.DAOForkBlock); err != nil {
return errorsmod.Wrap(err, "daoForkBlock") return sdkerrors.Wrap(err, "daoForkBlock")
} }
if err := validateBlock(cc.EIP150Block); err != nil { if err := validateBlock(cc.EIP150Block); err != nil {
return errorsmod.Wrap(err, "eip150Block") return sdkerrors.Wrap(err, "eip150Block")
} }
if err := validateHash(cc.EIP150Hash); err != nil { if err := validateHash(cc.EIP150Hash); err != nil {
return err return err
} }
if err := validateBlock(cc.EIP155Block); err != nil { if err := validateBlock(cc.EIP155Block); err != nil {
return errorsmod.Wrap(err, "eip155Block") return sdkerrors.Wrap(err, "eip155Block")
} }
if err := validateBlock(cc.EIP158Block); err != nil { if err := validateBlock(cc.EIP158Block); err != nil {
return errorsmod.Wrap(err, "eip158Block") return sdkerrors.Wrap(err, "eip158Block")
} }
if err := validateBlock(cc.ByzantiumBlock); err != nil { if err := validateBlock(cc.ByzantiumBlock); err != nil {
return errorsmod.Wrap(err, "byzantiumBlock") return sdkerrors.Wrap(err, "byzantiumBlock")
} }
if err := validateBlock(cc.ConstantinopleBlock); err != nil { if err := validateBlock(cc.ConstantinopleBlock); err != nil {
return errorsmod.Wrap(err, "constantinopleBlock") return sdkerrors.Wrap(err, "constantinopleBlock")
} }
if err := validateBlock(cc.PetersburgBlock); err != nil { if err := validateBlock(cc.PetersburgBlock); err != nil {
return errorsmod.Wrap(err, "petersburgBlock") return sdkerrors.Wrap(err, "petersburgBlock")
} }
if err := validateBlock(cc.IstanbulBlock); err != nil { if err := validateBlock(cc.IstanbulBlock); err != nil {
return errorsmod.Wrap(err, "istanbulBlock") return sdkerrors.Wrap(err, "istanbulBlock")
} }
if err := validateBlock(cc.MuirGlacierBlock); err != nil { if err := validateBlock(cc.MuirGlacierBlock); err != nil {
return errorsmod.Wrap(err, "muirGlacierBlock") return sdkerrors.Wrap(err, "muirGlacierBlock")
} }
if err := validateBlock(cc.BerlinBlock); err != nil { if err := validateBlock(cc.BerlinBlock); err != nil {
return errorsmod.Wrap(err, "berlinBlock") return sdkerrors.Wrap(err, "berlinBlock")
} }
if err := validateBlock(cc.LondonBlock); err != nil { if err := validateBlock(cc.LondonBlock); err != nil {
return errorsmod.Wrap(err, "londonBlock") return sdkerrors.Wrap(err, "londonBlock")
} }
if err := validateBlock(cc.ArrowGlacierBlock); err != nil { if err := validateBlock(cc.ArrowGlacierBlock); err != nil {
return errorsmod.Wrap(err, "arrowGlacierBlock") return sdkerrors.Wrap(err, "arrowGlacierBlock")
} }
if err := validateBlock(cc.MergeForkBlock); err != nil { if err := validateBlock(cc.MergeForkBlock); err != nil {
return errorsmod.Wrap(err, "mergeForkBlock") return sdkerrors.Wrap(err, "mergeForkBlock")
} }
// NOTE: chain ID is not needed to check config order // NOTE: chain ID is not needed to check config order
if err := cc.EthereumConfig(nil).CheckConfigForkOrder(); err != nil { if err := cc.EthereumConfig(nil).CheckConfigForkOrder(); err != nil {
return errorsmod.Wrap(err, "invalid config fork order") return sdkerrors.Wrap(err, "invalid config fork order")
} }
return nil return nil
} }
func validateHash(hex string) error { func validateHash(hex string) error {
if hex != "" && strings.TrimSpace(hex) == "" { if hex != "" && strings.TrimSpace(hex) == "" {
return errorsmod.Wrap(types.ErrInvalidChainConfig, "hash cannot be blank") return sdkerrors.Wrap(types.ErrInvalidChainConfig, "hash cannot be blank")
} }
return nil return nil
@ -157,7 +157,7 @@ func validateBlock(block *sdkmath.Int) error {
} }
if block.IsNegative() { if block.IsNegative() {
return errorsmod.Wrapf( return sdkerrors.Wrapf(
types.ErrInvalidChainConfig, "block value cannot be negative: %s", block, types.ErrInvalidChainConfig, "block value cannot be negative: %s", block,
) )
} }

View File

@ -32,10 +32,11 @@ import (
"github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto"
) )
// #nosec 101
const ( const (
OpWeightMsgEthSimpleTransfer = "op_weight_msg_eth_simple_transfer" // #nosec G101 OpWeightMsgEthSimpleTransfer = "op_weight_msg_eth_simple_transfer"
OpWeightMsgEthCreateContract = "op_weight_msg_eth_create_contract" // #nosec G101 OpWeightMsgEthCreateContract = "op_weight_msg_eth_create_contract"
OpWeightMsgEthCallContract = "op_weight_msg_eth_call_contract" // #nosec G101 OpWeightMsgEthCallContract = "op_weight_msg_eth_call_contract"
) )
const ( const (

View File

@ -161,9 +161,9 @@ $ %s query %s list
} }
recordsList := res.GetRecords() recordsList := res.GetRecords()
records := make([]types.ReadableRecord, len(recordsList)) records := make([]types.RecordType, len(recordsList))
for i, record := range res.GetRecords() { for i, record := range res.GetRecords() {
records[i] = record.ToReadableRecord() records[i] = record.ToRecordType()
} }
bytesResult, err := json.Marshal(records) bytesResult, err := json.Marshal(records)
if err != nil { if err != nil {

View File

@ -66,10 +66,17 @@ $ %s tx %s set [payload file path] [bond-id]
return err return err
} }
payload := payloadType.ToPayload() payload, err := payloadType.ToPayload()
if err != nil {
return err
}
msg := types.NewMsgSetRecord(payload, args[1], clientCtx.GetFromAddress()) msg := types.NewMsgSetRecord(payload, args[1], clientCtx.GetFromAddress())
return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) err = msg.ValidateBasic()
if err != nil {
return err
}
return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg)
}, },
} }
@ -262,7 +269,7 @@ $ %s tx %s set-name [crn] [cid]
if err != nil { if err != nil {
return err return err
} }
return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg)
}, },
} }
@ -370,8 +377,8 @@ $ %s tx %s delete-name [crn]
} }
// GetPayloadFromFile Load payload object from YAML file. // GetPayloadFromFile Load payload object from YAML file.
func GetPayloadFromFile(filePath string) (*types.ReadablePayload, error) { func GetPayloadFromFile(filePath string) (*types.PayloadType, error) {
var payload types.ReadablePayload var payload types.PayloadType
data, err := os.ReadFile(filePath) // #nosec G304 data, err := os.ReadFile(filePath) // #nosec G304
if err != nil { if err != nil {

View File

@ -15,8 +15,6 @@ import (
tmcli "github.com/tendermint/tendermint/libs/cli" tmcli "github.com/tendermint/tendermint/libs/cli"
) )
const badPath = "/asdasd"
func (s *IntegrationTestSuite) TestGRPCQueryParams() { func (s *IntegrationTestSuite) TestGRPCQueryParams() {
val := s.network.Validators[0] val := s.network.Validators[0]
sr := s.Require() sr := s.Require()
@ -30,7 +28,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryParams() {
}{ }{
{ {
"invalid url", "invalid url",
reqURL + badPath, reqURL + "/asdasd",
true, true,
"", "",
}, },
@ -44,8 +42,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryParams() {
for _, tc := range testCases { for _, tc := range testCases {
s.Run(tc.name, func() { s.Run(tc.name, func() {
resp, err := rest.GetRequest(tc.url) resp, _ := rest.GetRequest(tc.url)
s.NoError(err)
require := s.Require() require := s.Require()
if tc.expectErr { if tc.expectErr {
require.Contains(string(resp), tc.errorMsg) require.Contains(string(resp), tc.errorMsg)
@ -78,7 +75,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryWhoIs() {
}{ }{
{ {
"invalid url", "invalid url",
reqUrl + badPath, reqUrl + "/asdasd",
true, true,
"", "",
func(authorityName string) { func(authorityName string) {
@ -113,11 +110,11 @@ func (s *IntegrationTestSuite) TestGRPCQueryWhoIs() {
for _, tc := range testCases { for _, tc := range testCases {
s.Run(tc.name, func() { s.Run(tc.name, func() {
if !tc.expectErr {
tc.preRun(authorityName) tc.preRun(authorityName)
tc.url = fmt.Sprintf(tc.url, authorityName) tc.url = fmt.Sprintf(tc.url, authorityName)
}
resp, err := rest.GetRequest(tc.url) resp, _ := rest.GetRequest(tc.url)
s.NoError(err)
require := s.Require() require := s.Require()
if tc.expectErr { if tc.expectErr {
require.Contains(string(resp), tc.errorMsg) require.Contains(string(resp), tc.errorMsg)
@ -134,7 +131,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryWhoIs() {
func (s *IntegrationTestSuite) TestGRPCQueryLookup() { func (s *IntegrationTestSuite) TestGRPCQueryLookup() {
val := s.network.Validators[0] val := s.network.Validators[0]
sr := s.Require() sr := s.Require()
reqURL := val.APIAddress + "/vulcanize/registry/v1beta1/lookup" reqURL := val.APIAddress + "/vulcanize/registry/v1beta1/lookup?crn=%s"
authorityName := "QueryLookUp" authorityName := "QueryLookUp"
testCases := []struct { testCases := []struct {
@ -146,7 +143,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryLookup() {
}{ }{
{ {
"invalid url", "invalid url",
reqURL + badPath, reqURL + "/asdasd",
true, true,
"", "",
func(authorityName string) { func(authorityName string) {
@ -154,7 +151,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryLookup() {
}, },
{ {
"Success", "Success",
fmt.Sprintf(reqURL+"?crn=crn://%s/", authorityName), reqURL,
false, false,
"", "",
func(authorityName string) { func(authorityName string) {
@ -166,9 +163,11 @@ func (s *IntegrationTestSuite) TestGRPCQueryLookup() {
for _, tc := range testCases { for _, tc := range testCases {
s.Run(tc.name, func() { s.Run(tc.name, func() {
if !tc.expectErr {
tc.preRun(authorityName) tc.preRun(authorityName)
resp, err := rest.GetRequest(tc.url) tc.url = fmt.Sprintf(reqURL, fmt.Sprintf("crn://%s/", authorityName))
s.NoError(err) }
resp, _ := rest.GetRequest(tc.url)
if tc.expectErr { if tc.expectErr {
sr.Contains(string(resp), tc.errorMsg) sr.Contains(string(resp), tc.errorMsg)
} else { } else {
@ -196,7 +195,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryRecordExpiryQueue() {
}{ }{
{ {
"invalid url", "invalid url",
reqUrl + badPath, reqUrl + "/asdasd",
true, true,
"", "",
func(bondId string) { func(bondId string) {
@ -234,11 +233,12 @@ func (s *IntegrationTestSuite) TestGRPCQueryRecordExpiryQueue() {
for _, tc := range testCases { for _, tc := range testCases {
s.Run(tc.name, func() { s.Run(tc.name, func() {
if !tc.expectErr {
tc.preRun(s.bondID) tc.preRun(s.bondID)
}
// wait 12 seconds for records expires // wait 12 seconds for records expires
time.Sleep(time.Second * 12) time.Sleep(time.Second * 12)
resp, err := rest.GetRequest(tc.url) resp, _ := rest.GetRequest(tc.url)
s.NoError(err)
require := s.Require() require := s.Require()
if tc.expectErr { if tc.expectErr {
require.Contains(string(resp), tc.errorMsg) require.Contains(string(resp), tc.errorMsg)
@ -267,7 +267,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryAuthorityExpiryQueue() {
}{ }{
{ {
"invalid url", "invalid url",
reqUrl + badPath, reqUrl + "/asdasd",
true, true,
"", "",
func(authorityName string) { func(authorityName string) {
@ -303,12 +303,13 @@ func (s *IntegrationTestSuite) TestGRPCQueryAuthorityExpiryQueue() {
for _, tc := range testCases { for _, tc := range testCases {
s.Run(tc.name, func() { s.Run(tc.name, func() {
if !tc.expectErr {
tc.preRun("QueryAuthorityExpiryQueue") tc.preRun("QueryAuthorityExpiryQueue")
}
// wait 12 seconds to name authorites expires // wait 12 seconds to name authorites expires
time.Sleep(time.Second * 12) time.Sleep(time.Second * 12)
resp, err := rest.GetRequest(tc.url) resp, _ := rest.GetRequest(tc.url)
s.NoError(err)
require := s.Require() require := s.Require()
if tc.expectErr { if tc.expectErr {
require.Contains(string(resp), tc.errorMsg) require.Contains(string(resp), tc.errorMsg)
@ -338,7 +339,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryListRecords() {
}{ }{
{ {
"invalid url", "invalid url",
reqUrl + badPath, reqUrl + "/asdasd",
true, true,
"", "",
func(bondId string) { func(bondId string) {
@ -376,9 +377,10 @@ func (s *IntegrationTestSuite) TestGRPCQueryListRecords() {
for _, tc := range testCases { for _, tc := range testCases {
s.Run(tc.name, func() { s.Run(tc.name, func() {
if !tc.expectErr {
tc.preRun(s.bondID) tc.preRun(s.bondID)
resp, err := rest.GetRequest(tc.url) }
s.NoError(err) resp, _ := rest.GetRequest(tc.url)
require := s.Require() require := s.Require()
if tc.expectErr { if tc.expectErr {
require.Contains(string(resp), tc.errorMsg) require.Contains(string(resp), tc.errorMsg)
@ -407,7 +409,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryGetRecordByID() {
}{ }{
{ {
"invalid url", "invalid url",
reqURL + badPath, reqURL + "/asdasd",
true, true,
"", "",
func(bondId string) string { func(bondId string) string {
@ -431,7 +433,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryGetRecordByID() {
} }
out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, args) out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, args)
sr.NoError(err) sr.NoError(err)
var records []nstypes.ReadableRecord var records []nstypes.RecordType
err = json.Unmarshal(out.Bytes(), &records) err = json.Unmarshal(out.Bytes(), &records)
sr.NoError(err) sr.NoError(err)
return records[0].ID return records[0].ID
@ -441,11 +443,12 @@ func (s *IntegrationTestSuite) TestGRPCQueryGetRecordByID() {
for _, tc := range testCases { for _, tc := range testCases {
s.Run(tc.name, func() { s.Run(tc.name, func() {
recordID := tc.preRun(s.bondID) var recordID string
if !tc.expectErr {
recordID = tc.preRun(s.bondID)
tc.url = fmt.Sprintf(reqURL, recordID) tc.url = fmt.Sprintf(reqURL, recordID)
}
resp, err := rest.GetRequest(tc.url) resp, _ := rest.GetRequest(tc.url)
s.NoError(err)
require := s.Require() require := s.Require()
if tc.expectErr { if tc.expectErr {
require.Contains(string(resp), tc.errorMsg) require.Contains(string(resp), tc.errorMsg)
@ -475,7 +478,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryGetRecordByBondID() {
}{ }{
{ {
"invalid url", "invalid url",
reqURL + badPath, reqURL + "/asdasd",
true, true,
"", "",
func(bondId string) { func(bondId string) {
@ -495,11 +498,11 @@ func (s *IntegrationTestSuite) TestGRPCQueryGetRecordByBondID() {
for _, tc := range testCases { for _, tc := range testCases {
s.Run(tc.name, func() { s.Run(tc.name, func() {
if !tc.expectErr {
tc.preRun(s.bondID) tc.preRun(s.bondID)
tc.url = fmt.Sprintf(reqURL, s.bondID) tc.url = fmt.Sprintf(reqURL, s.bondID)
}
resp, err := rest.GetRequest(tc.url) resp, _ := rest.GetRequest(tc.url)
s.NoError(err)
require := s.Require() require := s.Require()
if tc.expectErr { if tc.expectErr {
require.Contains(string(resp), tc.errorMsg) require.Contains(string(resp), tc.errorMsg)
@ -529,7 +532,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryGetRegistryModuleBalance() {
}{ }{
{ {
"invalid url", "invalid url",
reqURL + badPath, reqURL + "/asdasd",
true, true,
"", "",
func(bondId string) { func(bondId string) {
@ -549,9 +552,10 @@ func (s *IntegrationTestSuite) TestGRPCQueryGetRegistryModuleBalance() {
for _, tc := range testCases { for _, tc := range testCases {
s.Run(tc.name, func() { s.Run(tc.name, func() {
if !tc.expectErr {
tc.preRun(s.bondID) tc.preRun(s.bondID)
resp, err := rest.GetRequest(tc.url) }
s.NoError(err) resp, _ := rest.GetRequest(tc.url)
require := s.Require() require := s.Require()
if tc.expectErr { if tc.expectErr {
require.Contains(string(resp), tc.errorMsg) require.Contains(string(resp), tc.errorMsg)
@ -579,7 +583,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryNamesList() {
}{ }{
{ {
"invalid url", "invalid url",
reqURL + badPath, reqURL + "/asdasd",
true, true,
"", "",
func(authorityName string) { func(authorityName string) {
@ -599,9 +603,10 @@ func (s *IntegrationTestSuite) TestGRPCQueryNamesList() {
for _, tc := range testCases { for _, tc := range testCases {
s.Run(tc.name, func() { s.Run(tc.name, func() {
if !tc.expectErr {
tc.preRun("ListNameRecords") tc.preRun("ListNameRecords")
resp, err := rest.GetRequest(tc.url) }
s.NoError(err) resp, _ := rest.GetRequest(tc.url)
require := s.Require() require := s.Require()
if tc.expectErr { if tc.expectErr {
require.Contains(string(resp), tc.errorMsg) require.Contains(string(resp), tc.errorMsg)
@ -638,5 +643,5 @@ func createRecord(bondID string, s *IntegrationTestSuite) {
var d sdk.TxResponse var d sdk.TxResponse
err = val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &d) err = val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &d)
sr.NoError(err) sr.NoError(err)
sr.Zero(d.Code, d.RawLog) sr.Zero(d.Code)
} }

View File

@ -114,7 +114,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryForRecords() {
sr.Error(err) sr.Error(err)
} else { } else {
sr.NoError(err) sr.NoError(err)
var records []types.ReadableRecord var records []types.RecordType
err := json.Unmarshal(out.Bytes(), &records) err := json.Unmarshal(out.Bytes(), &records)
sr.NoError(err) sr.NoError(err)
sr.Equal(tc.noOfRecords, len(records)) sr.Equal(tc.noOfRecords, len(records))
@ -538,6 +538,9 @@ func createNameRecord(authorityName string, s *IntegrationTestSuite) {
sr.NoError(err) sr.NoError(err)
sr.Zero(d.Code) sr.Zero(d.Code)
// creating the bond
CreateBond(s)
// Get the bond-id // Get the bond-id
bondID := GetBondID(s) bondID := GetBondID(s)

View File

@ -101,23 +101,42 @@ func CreateBond(s *IntegrationTestSuite) {
val := s.network.Validators[0] val := s.network.Validators[0]
sr := s.Require() sr := s.Require()
clientCtx := val.ClientCtx testCases := []struct {
cmd := bondcli.NewCreateBondCmd() name string
args := []string{ args []string
err bool
}{
{
"create bond",
[]string{
fmt.Sprintf("100000000000%s", s.cfg.BondDenom), fmt.Sprintf("100000000000%s", s.cfg.BondDenom),
fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName), fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName),
fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock),
fmt.Sprintf("--%s=json", tmcli.OutputFlag), fmt.Sprintf("--%s=json", tmcli.OutputFlag),
fmt.Sprintf("--%s=%s", flags.FlagFees, fmt.Sprintf("3%s", s.cfg.BondDenom)), fmt.Sprintf("--%s=%s", flags.FlagFees, fmt.Sprintf("3%s", s.cfg.BondDenom)),
},
false,
},
} }
out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, args)
sr.NoError(err)
for _, tc := range testCases {
s.Run(fmt.Sprintf("Case %s", tc.name), func() {
clientCtx := val.ClientCtx
cmd := bondcli.NewCreateBondCmd()
out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args)
if tc.err {
sr.Error(err)
} else {
sr.NoError(err)
var d sdk.TxResponse var d sdk.TxResponse
err = val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &d) err = val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &d)
sr.NoError(err) sr.NoError(err)
sr.Zero(d.Code) sr.Zero(d.Code)
}
})
}
} }
func GetBondID(s *IntegrationTestSuite) string { func GetBondID(s *IntegrationTestSuite) string {
@ -141,11 +160,6 @@ func (s *IntegrationTestSuite) TestGetCmdSetRecord() {
val := s.network.Validators[0] val := s.network.Validators[0]
sr := s.Require() sr := s.Require()
bondID := GetBondID(s)
dir, err := os.Getwd()
sr.NoError(err)
payloadPath := dir + "/service_provider_example.yml"
testCases := []struct { testCases := []struct {
name string name string
args []string args []string
@ -165,7 +179,6 @@ func (s *IntegrationTestSuite) TestGetCmdSetRecord() {
{ {
"success", "success",
[]string{ []string{
payloadPath, bondID,
fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName), fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName),
fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
fmt.Sprintf("--%s=json", tmcli.OutputFlag), fmt.Sprintf("--%s=json", tmcli.OutputFlag),
@ -178,6 +191,17 @@ func (s *IntegrationTestSuite) TestGetCmdSetRecord() {
for _, tc := range testCases { for _, tc := range testCases {
s.Run(fmt.Sprintf("Case %s", tc.name), func() { s.Run(fmt.Sprintf("Case %s", tc.name), func() {
if !tc.err {
// create the bond
CreateBond(s)
// get the bond id from bond list
bondID := GetBondID(s)
dir, err := os.Getwd()
sr.NoError(err)
payloadPath := dir + "/service_provider_example.yml"
tc.args = append([]string{payloadPath, bondID}, tc.args...)
}
clientCtx := val.ClientCtx clientCtx := val.ClientCtx
cmd := cli.GetCmdSetRecord() cmd := cli.GetCmdSetRecord()
@ -317,6 +341,9 @@ func (s *IntegrationTestSuite) TestGetCmdSetName() {
sr.NoError(err) sr.NoError(err)
sr.Zero(d.Code) sr.Zero(d.Code)
// creating the bond
CreateBond(s)
// Get the bond-id // Get the bond-id
bondID := GetBondID(s) bondID := GetBondID(s)
@ -342,7 +369,9 @@ func (s *IntegrationTestSuite) TestGetCmdSetName() {
for _, tc := range testCases { for _, tc := range testCases {
s.Run(fmt.Sprintf("Case %s", tc.name), func() { s.Run(fmt.Sprintf("Case %s", tc.name), func() {
if !tc.err {
tc.preRun(authorityName) tc.preRun(authorityName)
}
clientCtx := val.ClientCtx clientCtx := val.ClientCtx
cmd := cli.GetCmdSetName() cmd := cli.GetCmdSetName()
@ -365,7 +394,6 @@ func (s *IntegrationTestSuite) TestGetCmdSetAuthorityBond() {
val := s.network.Validators[0] val := s.network.Validators[0]
sr := s.Require() sr := s.Require()
authorityName := "TestGetCmdSetAuthorityBond" authorityName := "TestGetCmdSetAuthorityBond"
bondID := GetBondID(s)
testCases := []struct { testCases := []struct {
name string name string
@ -389,7 +417,6 @@ func (s *IntegrationTestSuite) TestGetCmdSetAuthorityBond() {
{ {
"success with name and bond-id", "success with name and bond-id",
[]string{ []string{
authorityName, bondID,
fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName), fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName),
fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
fmt.Sprintf("--%s=json", tmcli.OutputFlag), fmt.Sprintf("--%s=json", tmcli.OutputFlag),
@ -422,7 +449,15 @@ func (s *IntegrationTestSuite) TestGetCmdSetAuthorityBond() {
for _, tc := range testCases { for _, tc := range testCases {
s.Run(fmt.Sprintf("Case %s", tc.name), func() { s.Run(fmt.Sprintf("Case %s", tc.name), func() {
if !tc.err {
// reserve the name
tc.preRun(authorityName) tc.preRun(authorityName)
// creating the bond
CreateBond(s)
// getting the bond-id
bondID := GetBondID(s)
tc.args = append([]string{authorityName, bondID}, tc.args...)
}
clientCtx := val.ClientCtx clientCtx := val.ClientCtx
cmd := cli.GetCmdSetAuthorityBond() cmd := cli.GetCmdSetAuthorityBond()
@ -466,7 +501,6 @@ func (s *IntegrationTestSuite) TestGetCmdDeleteName() {
{ {
"successfully delete name", "successfully delete name",
[]string{ []string{
fmt.Sprintf("crn://%s/", authorityName),
fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName), fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName),
fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
fmt.Sprintf("--%s=json", tmcli.OutputFlag), fmt.Sprintf("--%s=json", tmcli.OutputFlag),
@ -482,8 +516,10 @@ func (s *IntegrationTestSuite) TestGetCmdDeleteName() {
for _, tc := range testCasesForDeletingName { for _, tc := range testCasesForDeletingName {
s.Run(fmt.Sprintf("Case %s", tc.name), func() { s.Run(fmt.Sprintf("Case %s", tc.name), func() {
if !tc.err {
tc.preRun(authorityName, s) tc.preRun(authorityName, s)
tc.args = append([]string{fmt.Sprintf("crn://%s/", authorityName)}, tc.args...)
}
clientCtx := val.ClientCtx clientCtx := val.ClientCtx
cmd := cli.GetCmdDeleteName() cmd := cli.GetCmdDeleteName()
@ -538,6 +574,8 @@ func (s *IntegrationTestSuite) TestGetCmdDissociateBond() {
}, },
false, false,
func(s *IntegrationTestSuite) string { func(s *IntegrationTestSuite) string {
// create the bond
CreateBond(s)
// get the bond id from bond list // get the bond id from bond list
bondID := GetBondID(s) bondID := GetBondID(s)
dir, err := os.Getwd() dir, err := os.Getwd()
@ -568,7 +606,7 @@ func (s *IntegrationTestSuite) TestGetCmdDissociateBond() {
cmd = cli.GetCmdList() cmd = cli.GetCmdList()
out, err = clitestutil.ExecTestCLICmd(clientCtx, cmd, args) out, err = clitestutil.ExecTestCLICmd(clientCtx, cmd, args)
sr.NoError(err) sr.NoError(err)
var records []nstypes.ReadableRecord var records []nstypes.RecordType
err = json.Unmarshal(out.Bytes(), &records) err = json.Unmarshal(out.Bytes(), &records)
sr.NoError(err) sr.NoError(err)
return records[0].ID return records[0].ID
@ -778,6 +816,8 @@ func (s *IntegrationTestSuite) TestGetCmdAssociateBond() {
}, },
false, false,
func(s *IntegrationTestSuite) (string, string) { func(s *IntegrationTestSuite) (string, string) {
// create the bond
CreateBond(s)
// get the bond id from bond list // get the bond id from bond list
bondID := GetBondID(s) bondID := GetBondID(s)
dir, err := os.Getwd() dir, err := os.Getwd()
@ -808,7 +848,7 @@ func (s *IntegrationTestSuite) TestGetCmdAssociateBond() {
cmd = cli.GetCmdList() cmd = cli.GetCmdList()
out, err = clitestutil.ExecTestCLICmd(clientCtx, cmd, args) out, err = clitestutil.ExecTestCLICmd(clientCtx, cmd, args)
sr.NoError(err) sr.NoError(err)
var records []nstypes.ReadableRecord var records []nstypes.RecordType
err = json.Unmarshal(out.Bytes(), &records) err = json.Unmarshal(out.Bytes(), &records)
sr.NoError(err) sr.NoError(err)

View File

@ -1,7 +0,0 @@
record:
type: GeneralRecord
name: foo
version: 1.0.0
tags:
- tagA
- tagB

View File

@ -47,26 +47,30 @@ func Int64ToBytes(num int64) []byte {
return buf.Bytes() return buf.Bytes()
} }
func MustMarshalJSON[T any](val T) (bytes []byte) { // MarshalMapToJSONBytes converts map[string]interface{} to bytes.
func MarshalMapToJSONBytes(val map[string]interface{}) (bytes []byte) {
bytes, err := json.Marshal(val) bytes, err := json.Marshal(val)
if err != nil { if err != nil {
panic("JSON marshal error:" + err.Error()) panic("Marshal error.")
} }
return return
} }
func MustUnmarshalJSON[T any](bytes []byte) T { // UnMarshalMapFromJSONBytes converts bytes to map[string]interface{}.
var val T func UnMarshalMapFromJSONBytes(bytes []byte) map[string]interface{} {
var val map[string]interface{}
err := json.Unmarshal(bytes, &val) err := json.Unmarshal(bytes, &val)
if err != nil { if err != nil {
panic("JSON unmarshal error:" + err.Error()) panic("Unmarshal error.")
} }
return val return val
} }
// GetCid gets the content ID. // GetCid gets the content ID.
func GetCid(content []byte) (string, error) { func GetCid(content []byte) (string, error) {
return wnsUtils.CIDFromJSONBytes(content) return wnsUtils.CIDFromJSONBytesUsingIpldPrime(content)
} }
// BytesToBase64 encodes a byte array as a base64 string. // BytesToBase64 encodes a byte array as a base64 string.

View File

@ -3,7 +3,6 @@ package keeper
import ( import (
"context" "context"
errorsmod "cosmossdk.io/errors"
"github.com/cerc-io/laconicd/x/registry/types" "github.com/cerc-io/laconicd/x/registry/types"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
@ -49,7 +48,7 @@ func (q Querier) GetRecord(c context.Context, req *types.QueryRecordByIDRequest)
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
id := req.GetId() id := req.GetId()
if !q.Keeper.HasRecord(ctx, id) { if !q.Keeper.HasRecord(ctx, id) {
return nil, errorsmod.Wrap(sdkerrors.ErrUnknownRequest, "Record not found.") return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "Record not found.")
} }
record := q.Keeper.GetRecord(ctx, id) record := q.Keeper.GetRecord(ctx, id)
return &types.QueryRecordByIDResponse{Record: record}, nil return &types.QueryRecordByIDResponse{Record: record}, nil
@ -87,11 +86,11 @@ func (q Querier) LookupCrn(c context.Context, req *types.QueryLookupCrn) (*types
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
crn := req.GetCrn() crn := req.GetCrn()
if !q.Keeper.HasNameRecord(ctx, crn) { if !q.Keeper.HasNameRecord(ctx, crn) {
return nil, errorsmod.Wrap(sdkerrors.ErrUnknownRequest, "CRN not found.") return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "CRN not found.")
} }
nameRecord := q.Keeper.GetNameRecord(ctx, crn) nameRecord := q.Keeper.GetNameRecord(ctx, crn)
if nameRecord == nil { if nameRecord == nil {
return nil, errorsmod.Wrap(sdkerrors.ErrUnknownRequest, "name record not found.") return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "name record not found.")
} }
return &types.QueryLookupCrnResponse{Name: nameRecord}, nil return &types.QueryLookupCrnResponse{Name: nameRecord}, nil
} }
@ -101,7 +100,7 @@ func (q Querier) ResolveCrn(c context.Context, req *types.QueryResolveCrn) (*typ
crn := req.GetCrn() crn := req.GetCrn()
record := q.Keeper.ResolveCRN(ctx, crn) record := q.Keeper.ResolveCRN(ctx, crn)
if record == nil { if record == nil {
return nil, errorsmod.Wrap(sdkerrors.ErrUnknownRequest, "record not found.") return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "record not found.")
} }
return &types.QueryResolveCrnResponse{Record: record}, nil return &types.QueryResolveCrnResponse{Record: record}, nil
} }

View File

@ -4,7 +4,6 @@ import (
"context" "context"
"fmt" "fmt"
"os" "os"
"reflect"
"github.com/cerc-io/laconicd/x/registry/client/cli" "github.com/cerc-io/laconicd/x/registry/client/cli"
"github.com/cerc-io/laconicd/x/registry/helpers" "github.com/cerc-io/laconicd/x/registry/helpers"
@ -40,7 +39,6 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() {
examples := []string{ examples := []string{
"/../helpers/examples/service_provider_example.yml", "/../helpers/examples/service_provider_example.yml",
"/../helpers/examples/website_registration_example.yml", "/../helpers/examples/website_registration_example.yml",
"/../helpers/examples/general_record_example.yml",
} }
testCases := []struct { testCases := []struct {
msg string msg string
@ -61,7 +59,7 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() {
&registrytypes.QueryListRecordsRequest{}, &registrytypes.QueryListRecordsRequest{},
true, true,
false, false,
3, 2,
}, },
{ {
"Filter with type", "Filter with type",
@ -70,7 +68,8 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() {
{ {
Key: "type", Key: "type",
Value: &registrytypes.QueryListRecordsRequest_ValueInput{ Value: &registrytypes.QueryListRecordsRequest_ValueInput{
Value: &registrytypes.QueryListRecordsRequest_ValueInput_String_{"WebsiteRegistrationRecord"}, Type: "string",
String_: "WebsiteRegistrationRecord",
}, },
}, },
}, },
@ -80,69 +79,6 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() {
false, false,
1, 1,
}, },
// Skip the following test as querying with recursive values not supported (PR https://git.vdb.to/cerc-io/laconicd/pulls/112)
// See function RecordsFromAttributes (QueryValueToJSON call) in the registry keeper implementation (x/registry/keeper/keeper.go)
// {
// "Filter with tag (extant) (https://git.vdb.to/cerc-io/laconicd/issues/129)",
// &registrytypes.QueryListRecordsRequest{
// Attributes: []*registrytypes.QueryListRecordsRequest_KeyValueInput{
// {
// Key: "tags",
// // Value: &registrytypes.QueryListRecordsRequest_ValueInput{
// // Value: &registrytypes.QueryListRecordsRequest_ValueInput_String_{"tagA"},
// // },
// Value: &registrytypes.QueryListRecordsRequest_ValueInput{
// Value: &registrytypes.QueryListRecordsRequest_ValueInput_Array{Array: &registrytypes.QueryListRecordsRequest_ArrayInput{
// Values: []*registrytypes.QueryListRecordsRequest_ValueInput{
// {
// Value: &registrytypes.QueryListRecordsRequest_ValueInput_String_{"tagA"},
// },
// },
// }},
// },
// // Throws: "Recursive query values are not supported"
// },
// },
// All: true,
// },
// true,
// false,
// 1,
// },
{
"Filter with tag (non-existent) (https://git.vdb.to/cerc-io/laconicd/issues/129)",
&registrytypes.QueryListRecordsRequest{
Attributes: []*registrytypes.QueryListRecordsRequest_KeyValueInput{
{
Key: "tags",
Value: &registrytypes.QueryListRecordsRequest_ValueInput{
Value: &registrytypes.QueryListRecordsRequest_ValueInput_String_{"NOEXIST"},
},
},
},
All: true,
},
true,
false,
0,
},
{
"Filter test for key collision (https://git.vdb.to/cerc-io/laconicd/issues/122)",
&registrytypes.QueryListRecordsRequest{
Attributes: []*registrytypes.QueryListRecordsRequest_KeyValueInput{
{
Key: "typ",
Value: &registrytypes.QueryListRecordsRequest_ValueInput{
Value: &registrytypes.QueryListRecordsRequest_ValueInput_String_{"eWebsiteRegistrationRecord"},
},
},
},
All: true,
},
true,
false,
0,
},
{ {
"Filter with attributes ServiceProviderRegistration", "Filter with attributes ServiceProviderRegistration",
&registrytypes.QueryListRecordsRequest{ &registrytypes.QueryListRecordsRequest{
@ -150,7 +86,8 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() {
{ {
Key: "x500state_name", Key: "x500state_name",
Value: &registrytypes.QueryListRecordsRequest_ValueInput{ Value: &registrytypes.QueryListRecordsRequest_ValueInput{
Value: &registrytypes.QueryListRecordsRequest_ValueInput_String_{"california"}, Type: "string",
String_: "california",
}, },
}, },
}, },
@ -169,7 +106,8 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() {
sr.NoError(err) sr.NoError(err)
payloadType, err := cli.GetPayloadFromFile(fmt.Sprint(dir, example)) payloadType, err := cli.GetPayloadFromFile(fmt.Sprint(dir, example))
sr.NoError(err) sr.NoError(err)
payload := payloadType.ToPayload() payload, err := payloadType.ToPayload()
sr.NoError(err)
record, err := suite.app.RegistryKeeper.ProcessSetRecord(ctx, registrytypes.MsgSetRecord{ record, err := suite.app.RegistryKeeper.ProcessSetRecord(ctx, registrytypes.MsgSetRecord{
BondId: suite.bond.GetId(), BondId: suite.bond.GetId(),
Signer: suite.accounts[0].String(), Signer: suite.accounts[0].String(),
@ -185,37 +123,20 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() {
} else { } else {
sr.NoError(err) sr.NoError(err)
sr.Equal(test.noOfRecords, len(resp.GetRecords())) sr.Equal(test.noOfRecords, len(resp.GetRecords()))
if test.createRecords && test.noOfRecords > 0 { if test.createRecords {
recordId = resp.GetRecords()[0].GetId() recordId = resp.GetRecords()[0].GetId()
sr.NotZero(resp.GetRecords()) sr.NotZero(resp.GetRecords())
sr.Equal(resp.GetRecords()[0].GetBondId(), suite.bond.GetId()) sr.Equal(resp.GetRecords()[0].GetBondId(), suite.bond.GetId())
for _, record := range resp.GetRecords() { for _, record := range resp.GetRecords() {
recAttr := helpers.MustUnmarshalJSON[registrytypes.AttributeMap](record.Attributes) bz, err := registrytypes.GetJSONBytesFromAny(*record.Attributes)
for _, attr := range test.req.GetAttributes() {
enc, err := keeper.QueryValueToJSON(attr.Value)
sr.NoError(err) sr.NoError(err)
av := helpers.MustUnmarshalJSON[any](enc) recAttr := helpers.UnMarshalMapFromJSONBytes(bz)
for _, attr := range test.req.GetAttributes() {
if nil != av && nil != recAttr[attr.Key] &&
reflect.Slice == reflect.TypeOf(recAttr[attr.Key]).Kind() &&
reflect.Slice != reflect.TypeOf(av).Kind() {
found := false
allValues := recAttr[attr.Key].([]interface{})
for i := range allValues {
if av == allValues[i] {
fmt.Printf("Found %s in %s", allValues[i], recAttr[attr.Key])
found = true
}
}
sr.Equal(true, found, fmt.Sprintf("Unable to find %s in %s", av, recAttr[attr.Key]))
} else {
if attr.Key[:4] == "x500" { if attr.Key[:4] == "x500" {
sr.Equal(av, recAttr["x500"].(map[string]interface{})[attr.Key[4:]]) sr.Equal(keeper.GetAttributeValue(attr.Value), recAttr["x500"].(map[string]interface{})[attr.Key[4:]])
} else { } else {
sr.Equal(av, recAttr[attr.Key]) sr.Equal(keeper.GetAttributeValue(attr.Value), recAttr[attr.Key])
}
} }
} }
} }
@ -337,7 +258,8 @@ func (suite *KeeperTestSuite) TestGrpcQueryRegistryModuleBalance() {
for _, example := range examples { for _, example := range examples {
payloadType, err := cli.GetPayloadFromFile(fmt.Sprint(dir, example)) payloadType, err := cli.GetPayloadFromFile(fmt.Sprint(dir, example))
sr.NoError(err) sr.NoError(err)
payload := payloadType.ToPayload() payload, err := payloadType.ToPayload()
sr.NoError(err)
record, err := suite.app.RegistryKeeper.ProcessSetRecord(ctx, registrytypes.MsgSetRecord{ record, err := suite.app.RegistryKeeper.ProcessSetRecord(ctx, registrytypes.MsgSetRecord{
BondId: suite.bond.GetId(), BondId: suite.bond.GetId(),
Signer: suite.accounts[0].String(), Signer: suite.accounts[0].String(),

View File

@ -7,7 +7,10 @@ import (
"sort" "sort"
"time" "time"
errorsmod "cosmossdk.io/errors" auctionkeeper "github.com/cerc-io/laconicd/x/auction/keeper"
bondkeeper "github.com/cerc-io/laconicd/x/bond/keeper"
"github.com/cerc-io/laconicd/x/registry/helpers"
"github.com/cerc-io/laconicd/x/registry/types"
"github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/legacy" "github.com/cosmos/cosmos-sdk/codec/legacy"
storetypes "github.com/cosmos/cosmos-sdk/store/types" storetypes "github.com/cosmos/cosmos-sdk/store/types"
@ -16,18 +19,6 @@ import (
auth "github.com/cosmos/cosmos-sdk/x/auth/keeper" auth "github.com/cosmos/cosmos-sdk/x/auth/keeper"
bank "github.com/cosmos/cosmos-sdk/x/bank/keeper" bank "github.com/cosmos/cosmos-sdk/x/bank/keeper"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
"github.com/gibson042/canonicaljson-go"
cid "github.com/ipfs/go-cid"
"github.com/ipld/go-ipld-prime"
"github.com/ipld/go-ipld-prime/codec/dagjson"
cidlink "github.com/ipld/go-ipld-prime/linking/cid"
basicnode "github.com/ipld/go-ipld-prime/node/basic"
"github.com/tendermint/tendermint/libs/log"
auctionkeeper "github.com/cerc-io/laconicd/x/auction/keeper"
bondkeeper "github.com/cerc-io/laconicd/x/bond/keeper"
"github.com/cerc-io/laconicd/x/registry/helpers"
"github.com/cerc-io/laconicd/x/registry/types"
) )
var ( var (
@ -104,15 +95,6 @@ func NewKeeper(cdc codec.BinaryCodec, accountKeeper auth.AccountKeeper, bankKeep
} }
} }
// Logger returns a module-specific logger.
func (k Keeper) Logger(ctx sdk.Context) log.Logger {
return logger(ctx)
}
func logger(ctx sdk.Context) log.Logger {
return ctx.Logger().With("module", types.ModuleName)
}
// GetRecordIndexKey Generates Bond ID -> Bond index key. // GetRecordIndexKey Generates Bond ID -> Bond index key.
func GetRecordIndexKey(id string) []byte { func GetRecordIndexKey(id string) []byte {
return append(PrefixCIDToRecordIndex, []byte(id)...) return append(PrefixCIDToRecordIndex, []byte(id)...)
@ -129,8 +111,7 @@ func (k Keeper) GetRecord(ctx sdk.Context, id string) (record types.Record) {
store := ctx.KVStore(k.storeKey) store := ctx.KVStore(k.storeKey)
result := store.Get(GetRecordIndexKey(id)) result := store.Get(GetRecordIndexKey(id))
k.cdc.MustUnmarshal(result, &record) k.cdc.MustUnmarshal(result, &record)
decodeRecordNames(store, &record) return recordObjToRecord(store, record)
return record
} }
// ListRecords - get all records. // ListRecords - get all records.
@ -143,25 +124,20 @@ func (k Keeper) ListRecords(ctx sdk.Context) []types.Record {
for ; itr.Valid(); itr.Next() { for ; itr.Valid(); itr.Next() {
bz := store.Get(itr.Key()) bz := store.Get(itr.Key())
if bz != nil { if bz != nil {
var record types.Record var obj types.Record
k.cdc.MustUnmarshal(bz, &record) k.cdc.MustUnmarshal(bz, &obj)
decodeRecordNames(store, &record) records = append(records, recordObjToRecord(store, obj))
records = append(records, record)
} }
} }
return records return records
} }
// RecordsFromAttributes gets a list of records whose attributes match all provided values
func (k Keeper) RecordsFromAttributes(ctx sdk.Context, attributes []*types.QueryListRecordsRequest_KeyValueInput, all bool) ([]types.Record, error) { func (k Keeper) RecordsFromAttributes(ctx sdk.Context, attributes []*types.QueryListRecordsRequest_KeyValueInput, all bool) ([]types.Record, error) {
resultRecordIds := []string{} resultRecordIds := []string{}
for i, attr := range attributes { for i, attr := range attributes {
suffix, err := QueryValueToJSON(attr.Value) val := GetAttributeValue(attr.Value)
if err != nil { attributeIndex := GetAttributesIndexKey(attr.Key, val)
return nil, err
}
attributeIndex := GetAttributesIndexKey(attr.Key, suffix)
recordIds, err := k.GetAttributeMapping(ctx, attributeIndex) recordIds, err := k.GetAttributeMapping(ctx, attributeIndex)
if err != nil { if err != nil {
return nil, err return nil, err
@ -180,62 +156,32 @@ func (k Keeper) RecordsFromAttributes(ctx sdk.Context, attributes []*types.Query
continue continue
} }
store := ctx.KVStore(k.storeKey) store := ctx.KVStore(k.storeKey)
decodeRecordNames(store, &record) recordWithNames := recordObjToRecord(store, record)
if !all && len(record.Names) == 0 { if !all && len(recordWithNames.Names) == 0 {
continue continue
} }
records = append(records, record) records = append(records, recordWithNames)
} }
return records, nil return records, nil
} }
// TODO not recursive, and only should be if we want to support querying with whole sub-objects, func GetAttributeValue(input *types.QueryListRecordsRequest_ValueInput) interface{} {
// which seems unnecessary. if input.Type == "int" {
func QueryValueToJSON(input *types.QueryListRecordsRequest_ValueInput) ([]byte, error) { return input.GetInt()
np := basicnode.Prototype.Any
nb := np.NewBuilder()
switch value := input.GetValue().(type) {
case *types.QueryListRecordsRequest_ValueInput_String_:
err := nb.AssignString(value.String_)
if err != nil {
return nil, err
} }
case *types.QueryListRecordsRequest_ValueInput_Int: if input.Type == "float" {
err := nb.AssignInt(value.Int) return input.GetFloat()
if err != nil {
return nil, err
} }
case *types.QueryListRecordsRequest_ValueInput_Float: if input.Type == "string" {
err := nb.AssignFloat(value.Float) return input.GetString_()
if err != nil {
return nil, err
} }
case *types.QueryListRecordsRequest_ValueInput_Boolean: if input.Type == "boolean" {
err := nb.AssignBool(value.Boolean) return input.GetBoolean()
if err != nil {
return nil, err
} }
case *types.QueryListRecordsRequest_ValueInput_Link: if input.Type == "reference" {
link := cidlink.Link{Cid: cid.MustParse(value.Link)} return input.GetReference().GetId()
err := nb.AssignLink(link)
if err != nil {
return nil, err
} }
case *types.QueryListRecordsRequest_ValueInput_Array: return nil
return nil, fmt.Errorf("recursive query values are not supported")
case *types.QueryListRecordsRequest_ValueInput_Map:
return nil, fmt.Errorf("recursive query values are not supported")
default:
return nil, fmt.Errorf("value has unexpected type %T", value)
}
n := nb.Build()
var buf bytes.Buffer
if err := dagjson.Encode(n, &buf); err != nil {
return nil, fmt.Errorf("encoding value to JSON failed: %w", err)
}
return buf.Bytes(), nil
} }
func getIntersection(a []string, b []string) []string { func getIntersection(a []string, b []string) []string {
@ -286,15 +232,15 @@ func (k Keeper) GetRecordExpiryQueue(ctx sdk.Context) []*types.ExpiryQueueRecord
} }
// ProcessSetRecord creates a record. // ProcessSetRecord creates a record.
func (k Keeper) ProcessSetRecord(ctx sdk.Context, msg types.MsgSetRecord) (*types.ReadableRecord, error) { func (k Keeper) ProcessSetRecord(ctx sdk.Context, msg types.MsgSetRecord) (*types.RecordType, error) {
payload := msg.Payload.ToReadablePayload() payload := msg.Payload.ToReadablePayload()
record := types.ReadableRecord{Attributes: payload.RecordAttributes, BondID: msg.BondId} record := types.RecordType{Attributes: payload.Record, BondID: msg.BondId}
// Check signatures. // Check signatures.
resourceSignBytes, _ := record.GetSignBytes() resourceSignBytes, _ := record.GetSignBytes()
cid, err := record.GetCID() cid, err := record.GetCID()
if err != nil { if err != nil {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid record JSON") return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid record JSON")
} }
record.ID = cid record.ID = cid
@ -308,12 +254,14 @@ func (k Keeper) ProcessSetRecord(ctx sdk.Context, msg types.MsgSetRecord) (*type
for _, sig := range payload.Signatures { for _, sig := range payload.Signatures {
pubKey, err := legacy.PubKeyFromBytes(helpers.BytesFromBase64(sig.PubKey)) pubKey, err := legacy.PubKeyFromBytes(helpers.BytesFromBase64(sig.PubKey))
if err != nil { if err != nil {
return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, fmt.Sprint("Error decoding pubKey from bytes: ", err)) fmt.Println("Error decoding pubKey from bytes: ", err)
return nil, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Invalid public key.")
} }
sigOK := pubKey.VerifySignature(resourceSignBytes, helpers.BytesFromBase64(sig.Sig)) sigOK := pubKey.VerifySignature(resourceSignBytes, helpers.BytesFromBase64(sig.Sig))
if !sigOK { if !sigOK {
return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, fmt.Sprint("Signature mismatch: ", sig.PubKey)) fmt.Println("Signature mismatch: ", sig.PubKey)
return nil, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Invalid signature.")
} }
record.Owners = append(record.Owners, pubKey.Address().String()) record.Owners = append(record.Owners, pubKey.Address().String())
} }
@ -327,13 +275,11 @@ func (k Keeper) ProcessSetRecord(ctx sdk.Context, msg types.MsgSetRecord) (*type
return &record, nil return &record, nil
} }
func (k Keeper) processRecord(ctx sdk.Context, record *types.ReadableRecord, isRenewal bool) error { func (k Keeper) processRecord(ctx sdk.Context, record *types.RecordType, isRenewal bool) error {
params := k.GetParams(ctx) params := k.GetParams(ctx)
rent := params.RecordRent rent := params.RecordRent
err := k.bondKeeper.TransferCoinsToModuleAccount( err := k.bondKeeper.TransferCoinsToModuleAccount(ctx, record.BondID, types.RecordRentModuleAccountName, sdk.NewCoins(rent))
ctx, record.BondID, types.RecordRentModuleAccountName, sdk.NewCoins(rent),
)
if err != nil { if err != nil {
return err return err
} }
@ -348,14 +294,7 @@ func (k Keeper) processRecord(ctx sdk.Context, record *types.ReadableRecord, isR
} }
k.PutRecord(ctx, recordObj) k.PutRecord(ctx, recordObj)
// TODO look up/validate record type here if err := k.ProcessAttributes(ctx, *record); err != nil {
if err := k.processAttributes(ctx, record.Attributes, record.ID, ""); err != nil {
return err
}
expiryTimeKey := GetAttributesIndexKey(ExpiryTimeAttributeName, []byte(record.ExpiryTime))
if err := k.SetAttributeMapping(ctx, expiryTimeKey, record.ID); err != nil {
return err return err
} }
@ -376,62 +315,52 @@ func (k Keeper) PutRecord(ctx sdk.Context, record types.Record) {
k.updateBlockChangeSetForRecord(ctx, record.Id) k.updateBlockChangeSetForRecord(ctx, record.Id)
} }
func (k Keeper) processAttributes(ctx sdk.Context, attrs types.AttributeMap, id string, prefix string) error { func (k Keeper) ProcessAttributes(ctx sdk.Context, record types.RecordType) error {
np := basicnode.Prototype.Map switch record.Attributes["type"] {
nb := np.NewBuilder() case "ServiceProviderRegistration":
encAttrs, err := canonicaljson.Marshal(attrs) {
if err != nil { // #nosec G705
for key := range record.Attributes {
if key == "x500" {
// #nosec G705
for x500Key, x500Val := range record.Attributes[key].(map[string]interface{}) {
indexKey := GetAttributesIndexKey(fmt.Sprintf("x500%s", x500Key), x500Val)
if err := k.SetAttributeMapping(ctx, indexKey, record.ID); err != nil {
return err return err
} }
if len(attrs) == 0 {
encAttrs = []byte("{}")
}
err = dagjson.Decode(nb, bytes.NewReader(encAttrs))
if err != nil {
return fmt.Errorf("failed to decode attributes: %w", err)
}
n := nb.Build()
if n.Kind() != ipld.Kind_Map {
return fmt.Errorf("record attributes must be a map, not %T", n.Kind())
}
return k.processAttributeMap(ctx, n, id, prefix)
}
func (k Keeper) processAttributeMap(ctx sdk.Context, n ipld.Node, id string, prefix string) error {
for it := n.MapIterator(); !it.Done(); {
//nolint:misspell
keynode, valuenode, err := it.Next()
if err != nil {
return err
}
key, err := keynode.AsString()
if err != nil {
return err
}
if valuenode.Kind() == ipld.Kind_Map {
err := k.processAttributeMap(ctx, valuenode, id, key)
if err != nil {
return err
} }
} else { } else {
var buf bytes.Buffer indexKey := GetAttributesIndexKey(key, record.Attributes[key])
if err := dagjson.Encode(valuenode, &buf); err != nil { if err := k.SetAttributeMapping(ctx, indexKey, record.ID); err != nil {
return err
}
value := buf.Bytes()
indexKey := GetAttributesIndexKey(prefix+key, value)
if err := k.SetAttributeMapping(ctx, indexKey, id); err != nil {
return err return err
} }
} }
} }
}
case "WebsiteRegistrationRecord":
{
// #nosec G705
for key := range record.Attributes {
indexKey := GetAttributesIndexKey(key, record.Attributes[key])
if err := k.SetAttributeMapping(ctx, indexKey, record.ID); err != nil {
return err
}
}
}
default:
return fmt.Errorf("unsupported record type %s", record.Attributes["type"])
}
expiryTimeKey := GetAttributesIndexKey(ExpiryTimeAttributeName, record.ExpiryTime)
if err := k.SetAttributeMapping(ctx, expiryTimeKey, record.ID); err != nil {
return err
}
return nil return nil
} }
func GetAttributesIndexKey(key string, suffix []byte) []byte { func GetAttributesIndexKey(key string, value interface{}) []byte {
keyString := fmt.Sprintf("%s=%s", key, suffix) keyString := fmt.Sprintf("%s%s", key, value)
return append(PrefixAttributesIndex, []byte(keyString)...) return append(PrefixAttributesIndex, []byte(keyString)...)
} }
@ -443,6 +372,8 @@ func (k Keeper) SetAttributeMapping(ctx sdk.Context, key []byte, recordID string
if err != nil { if err != nil {
return fmt.Errorf("cannot unmarshal byte array, error, %w", err) return fmt.Errorf("cannot unmarshal byte array, error, %w", err)
} }
} else {
recordIds = []string{}
} }
recordIds = append(recordIds, recordID) recordIds = append(recordIds, recordID)
bz, err := json.Marshal(recordIds) bz, err := json.Marshal(recordIds)
@ -457,13 +388,12 @@ func (k Keeper) GetAttributeMapping(ctx sdk.Context, key []byte) ([]string, erro
store := ctx.KVStore(k.storeKey) store := ctx.KVStore(k.storeKey)
if !store.Has(key) { if !store.Has(key) {
k.Logger(ctx).Debug(fmt.Sprintf("store doesn't have key: %q", key)) return nil, fmt.Errorf("store doesn't have key")
return []string{}, nil
} }
var recordIds []string var recordIds []string
if err := json.Unmarshal(store.Get(key), &recordIds); err != nil { if err := json.Unmarshal(store.Get(key), &recordIds); err != nil {
return nil, fmt.Errorf("cannot unmarshal byte array, error, %w", err) return nil, fmt.Errorf("cannont unmarshal byte array, error, %w", err)
} }
return recordIds, nil return recordIds, nil
@ -641,7 +571,7 @@ func (k Keeper) GetModuleBalances(ctx sdk.Context) []*types.AccountBalance {
return balances return balances
} }
func decodeRecordNames(store sdk.KVStore, record *types.Record) { func recordObjToRecord(store sdk.KVStore, record types.Record) types.Record {
reverseNameIndexKey := GetCIDToNamesIndexKey(record.Id) reverseNameIndexKey := GetCIDToNamesIndexKey(record.Id)
if store.Has(reverseNameIndexKey) { if store.Has(reverseNameIndexKey) {
@ -652,4 +582,6 @@ func decodeRecordNames(store sdk.KVStore, record *types.Record) {
record.Names = names record.Names = names
} }
return record
} }

View File

@ -2,12 +2,9 @@ package keeper
import ( import (
"context" "context"
"fmt"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cerc-io/laconicd/utils"
"github.com/cerc-io/laconicd/x/registry/types" "github.com/cerc-io/laconicd/x/registry/types"
sdk "github.com/cosmos/cosmos-sdk/types"
) )
type msgServer struct { type msgServer struct {
@ -23,14 +20,16 @@ var _ types.MsgServer = msgServer{}
func (m msgServer) SetRecord(c context.Context, msg *types.MsgSetRecord) (*types.MsgSetRecordResponse, error) { func (m msgServer) SetRecord(c context.Context, msg *types.MsgSetRecord) (*types.MsgSetRecordResponse, error) {
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
ctx = *utils.CtxWithCustomKVGasConfig(&ctx)
_, err := sdk.AccAddressFromBech32(msg.Signer) _, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil { if err != nil {
return nil, err return nil, err
} }
record, err := m.Keeper.ProcessSetRecord(ctx, *msg) record, err := m.Keeper.ProcessSetRecord(ctx, types.MsgSetRecord{
BondId: msg.GetBondId(),
Signer: msg.GetSigner(),
Payload: msg.GetPayload(),
})
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -49,15 +48,12 @@ func (m msgServer) SetRecord(c context.Context, msg *types.MsgSetRecord) (*types
), ),
}) })
m.logTxGasConsumed(ctx, "SetRecord")
return &types.MsgSetRecordResponse{Id: record.ID}, nil return &types.MsgSetRecordResponse{Id: record.ID}, nil
} }
//nolint: all
func (m msgServer) SetName(c context.Context, msg *types.MsgSetName) (*types.MsgSetNameResponse, error) { func (m msgServer) SetName(c context.Context, msg *types.MsgSetName) (*types.MsgSetNameResponse, error) {
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
ctx = *utils.CtxWithCustomKVGasConfig(&ctx)
_, err := sdk.AccAddressFromBech32(msg.Signer) _, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil { if err != nil {
return nil, err return nil, err
@ -79,16 +75,11 @@ func (m msgServer) SetName(c context.Context, msg *types.MsgSetName) (*types.Msg
sdk.NewAttribute(types.AttributeKeySigner, msg.Signer), sdk.NewAttribute(types.AttributeKeySigner, msg.Signer),
), ),
}) })
m.logTxGasConsumed(ctx, "SetName")
return &types.MsgSetNameResponse{}, nil return &types.MsgSetNameResponse{}, nil
} }
func (m msgServer) ReserveName(c context.Context, msg *types.MsgReserveAuthority) (*types.MsgReserveAuthorityResponse, error) { func (m msgServer) ReserveName(c context.Context, msg *types.MsgReserveAuthority) (*types.MsgReserveAuthorityResponse, error) {
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
ctx = *utils.CtxWithCustomKVGasConfig(&ctx)
_, err := sdk.AccAddressFromBech32(msg.Signer) _, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil { if err != nil {
return nil, err return nil, err
@ -114,16 +105,12 @@ func (m msgServer) ReserveName(c context.Context, msg *types.MsgReserveAuthority
sdk.NewAttribute(types.AttributeKeySigner, msg.Signer), sdk.NewAttribute(types.AttributeKeySigner, msg.Signer),
), ),
}) })
m.logTxGasConsumed(ctx, "ReserveName")
return &types.MsgReserveAuthorityResponse{}, nil return &types.MsgReserveAuthorityResponse{}, nil
} }
//nolint: all
func (m msgServer) SetAuthorityBond(c context.Context, msg *types.MsgSetAuthorityBond) (*types.MsgSetAuthorityBondResponse, error) { func (m msgServer) SetAuthorityBond(c context.Context, msg *types.MsgSetAuthorityBond) (*types.MsgSetAuthorityBondResponse, error) {
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
ctx = *utils.CtxWithCustomKVGasConfig(&ctx)
_, err := sdk.AccAddressFromBech32(msg.Signer) _, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil { if err != nil {
return nil, err return nil, err
@ -145,16 +132,11 @@ func (m msgServer) SetAuthorityBond(c context.Context, msg *types.MsgSetAuthorit
sdk.NewAttribute(types.AttributeKeySigner, msg.Signer), sdk.NewAttribute(types.AttributeKeySigner, msg.Signer),
), ),
}) })
m.logTxGasConsumed(ctx, "SetAuthorityBond")
return &types.MsgSetAuthorityBondResponse{}, nil return &types.MsgSetAuthorityBondResponse{}, nil
} }
func (m msgServer) DeleteName(c context.Context, msg *types.MsgDeleteNameAuthority) (*types.MsgDeleteNameAuthorityResponse, error) { func (m msgServer) DeleteName(c context.Context, msg *types.MsgDeleteNameAuthority) (*types.MsgDeleteNameAuthorityResponse, error) {
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
ctx = *utils.CtxWithCustomKVGasConfig(&ctx)
_, err := sdk.AccAddressFromBech32(msg.Signer) _, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil { if err != nil {
return nil, err return nil, err
@ -175,16 +157,11 @@ func (m msgServer) DeleteName(c context.Context, msg *types.MsgDeleteNameAuthori
sdk.NewAttribute(types.AttributeKeySigner, msg.Signer), sdk.NewAttribute(types.AttributeKeySigner, msg.Signer),
), ),
}) })
m.logTxGasConsumed(ctx, "DeleteName")
return &types.MsgDeleteNameAuthorityResponse{}, nil return &types.MsgDeleteNameAuthorityResponse{}, nil
} }
func (m msgServer) RenewRecord(c context.Context, msg *types.MsgRenewRecord) (*types.MsgRenewRecordResponse, error) { func (m msgServer) RenewRecord(c context.Context, msg *types.MsgRenewRecord) (*types.MsgRenewRecordResponse, error) {
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
ctx = *utils.CtxWithCustomKVGasConfig(&ctx)
_, err := sdk.AccAddressFromBech32(msg.Signer) _, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil { if err != nil {
return nil, err return nil, err
@ -205,16 +182,12 @@ func (m msgServer) RenewRecord(c context.Context, msg *types.MsgRenewRecord) (*t
sdk.NewAttribute(types.AttributeKeySigner, msg.Signer), sdk.NewAttribute(types.AttributeKeySigner, msg.Signer),
), ),
}) })
m.logTxGasConsumed(ctx, "RenewRecord")
return &types.MsgRenewRecordResponse{}, nil return &types.MsgRenewRecordResponse{}, nil
} }
//nolint: all
func (m msgServer) AssociateBond(c context.Context, msg *types.MsgAssociateBond) (*types.MsgAssociateBondResponse, error) { func (m msgServer) AssociateBond(c context.Context, msg *types.MsgAssociateBond) (*types.MsgAssociateBondResponse, error) {
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
ctx = *utils.CtxWithCustomKVGasConfig(&ctx)
_, err := sdk.AccAddressFromBech32(msg.Signer) _, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil { if err != nil {
return nil, err return nil, err
@ -237,16 +210,11 @@ func (m msgServer) AssociateBond(c context.Context, msg *types.MsgAssociateBond)
sdk.NewAttribute(types.AttributeKeySigner, msg.Signer), sdk.NewAttribute(types.AttributeKeySigner, msg.Signer),
), ),
}) })
m.logTxGasConsumed(ctx, "AssociateBond")
return &types.MsgAssociateBondResponse{}, nil return &types.MsgAssociateBondResponse{}, nil
} }
func (m msgServer) DissociateBond(c context.Context, msg *types.MsgDissociateBond) (*types.MsgDissociateBondResponse, error) { func (m msgServer) DissociateBond(c context.Context, msg *types.MsgDissociateBond) (*types.MsgDissociateBondResponse, error) {
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
ctx = *utils.CtxWithCustomKVGasConfig(&ctx)
_, err := sdk.AccAddressFromBech32(msg.Signer) _, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil { if err != nil {
return nil, err return nil, err
@ -267,16 +235,11 @@ func (m msgServer) DissociateBond(c context.Context, msg *types.MsgDissociateBon
sdk.NewAttribute(types.AttributeKeySigner, msg.Signer), sdk.NewAttribute(types.AttributeKeySigner, msg.Signer),
), ),
}) })
m.logTxGasConsumed(ctx, "DissociateBond")
return &types.MsgDissociateBondResponse{}, nil return &types.MsgDissociateBondResponse{}, nil
} }
func (m msgServer) DissociateRecords(c context.Context, msg *types.MsgDissociateRecords) (*types.MsgDissociateRecordsResponse, error) { func (m msgServer) DissociateRecords(c context.Context, msg *types.MsgDissociateRecords) (*types.MsgDissociateRecordsResponse, error) {
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
ctx = *utils.CtxWithCustomKVGasConfig(&ctx)
_, err := sdk.AccAddressFromBech32(msg.Signer) _, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil { if err != nil {
return nil, err return nil, err
@ -297,16 +260,11 @@ func (m msgServer) DissociateRecords(c context.Context, msg *types.MsgDissociate
sdk.NewAttribute(types.AttributeKeySigner, msg.Signer), sdk.NewAttribute(types.AttributeKeySigner, msg.Signer),
), ),
}) })
m.logTxGasConsumed(ctx, "DissociateRecords")
return &types.MsgDissociateRecordsResponse{}, nil return &types.MsgDissociateRecordsResponse{}, nil
} }
func (m msgServer) ReAssociateRecords(c context.Context, msg *types.MsgReAssociateRecords) (*types.MsgReAssociateRecordsResponse, error) { //nolint: all func (m msgServer) ReAssociateRecords(c context.Context, msg *types.MsgReAssociateRecords) (*types.MsgReAssociateRecordsResponse, error) { //nolint: all
ctx := sdk.UnwrapSDKContext(c) ctx := sdk.UnwrapSDKContext(c)
ctx = *utils.CtxWithCustomKVGasConfig(&ctx)
_, err := sdk.AccAddressFromBech32(msg.Signer) _, err := sdk.AccAddressFromBech32(msg.Signer)
if err != nil { if err != nil {
return nil, err return nil, err
@ -328,13 +286,5 @@ func (m msgServer) ReAssociateRecords(c context.Context, msg *types.MsgReAssocia
sdk.NewAttribute(types.AttributeKeySigner, msg.Signer), sdk.NewAttribute(types.AttributeKeySigner, msg.Signer),
), ),
}) })
m.logTxGasConsumed(ctx, "ReAssociateRecords")
return &types.MsgReAssociateRecordsResponse{}, nil return &types.MsgReAssociateRecordsResponse{}, nil
} }
func (m msgServer) logTxGasConsumed(ctx sdk.Context, tx string) {
gasConsumed := ctx.GasMeter().GasConsumed()
m.Keeper.Logger(ctx).Info("tx executed", "method", tx, "gas_consumed", fmt.Sprintf("%d", gasConsumed))
}

View File

@ -7,7 +7,6 @@ import (
"strings" "strings"
"time" "time"
errorsmod "cosmossdk.io/errors"
auctiontypes "github.com/cerc-io/laconicd/x/auction/types" auctiontypes "github.com/cerc-io/laconicd/x/auction/types"
"github.com/cerc-io/laconicd/x/registry/helpers" "github.com/cerc-io/laconicd/x/registry/helpers"
"github.com/cerc-io/laconicd/x/registry/types" "github.com/cerc-io/laconicd/x/registry/types"
@ -113,12 +112,12 @@ func (k Keeper) updateBlockChangeSetForName(ctx sdk.Context, crn string) {
func (k Keeper) getAuthority(ctx sdk.Context, crn string) (string, *url.URL, *types.NameAuthority, error) { func (k Keeper) getAuthority(ctx sdk.Context, crn string) (string, *url.URL, *types.NameAuthority, error) {
parsedCRN, err := url.Parse(crn) parsedCRN, err := url.Parse(crn)
if err != nil { if err != nil {
return "", nil, nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid CRN.") return "", nil, nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid CRN.")
} }
name := parsedCRN.Host name := parsedCRN.Host
if !k.HasNameAuthority(ctx, name) { if !k.HasNameAuthority(ctx, name) {
return name, nil, nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Name authority not found.") return name, nil, nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Name authority not found.")
} }
authority := k.GetNameAuthority(ctx, name) authority := k.GetNameAuthority(ctx, name)
return name, parsedCRN, &authority, nil return name, parsedCRN, &authority, nil
@ -132,19 +131,19 @@ func (k Keeper) checkCRNAccess(ctx sdk.Context, signer sdk.AccAddress, crn strin
formattedCRN := fmt.Sprintf("crn://%s%s", name, parsedCRN.RequestURI()) formattedCRN := fmt.Sprintf("crn://%s%s", name, parsedCRN.RequestURI())
if formattedCRN != crn { if formattedCRN != crn {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid CRN.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid CRN.")
} }
if authority.OwnerAddress != signer.String() { if authority.OwnerAddress != signer.String() {
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Access denied.") return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Access denied.")
} }
if authority.Status != types.AuthorityActive { if authority.Status != types.AuthorityActive {
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Authority is not active.") return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Authority is not active.")
} }
if authority.BondId == "" || len(authority.BondId) == 0 { if authority.BondId == "" || len(authority.BondId) == 0 {
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Authority bond not found.") return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Authority bond not found.")
} }
if authority.OwnerPublicKey == "" { if authority.OwnerPublicKey == "" {
@ -324,13 +323,13 @@ func (k Keeper) ProcessReserveSubAuthority(ctx sdk.Context, name string, msg typ
// Check if parent authority exists. // Check if parent authority exists.
if !k.HasNameAuthority(ctx, parent) { if !k.HasNameAuthority(ctx, parent) {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Parent authority not found.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Parent authority not found.")
} }
parentAuthority := k.GetNameAuthority(ctx, parent) parentAuthority := k.GetNameAuthority(ctx, parent)
// Sub-authority creator needs to be the owner of the parent authority. // Sub-authority creator needs to be the owner of the parent authority.
if parentAuthority.OwnerAddress != msg.Signer { if parentAuthority.OwnerAddress != msg.Signer {
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Access denied.") return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Access denied.")
} }
// Sub-authority owner defaults to parent authority owner. // Sub-authority owner defaults to parent authority owner.
@ -363,17 +362,17 @@ func (k Keeper) createAuthority(ctx sdk.Context, name string, owner string, isRo
if k.HasNameAuthority(ctx, name) { if k.HasNameAuthority(ctx, name) {
authority := k.GetNameAuthority(ctx, name) authority := k.GetNameAuthority(ctx, name)
if authority.Status != types.AuthorityExpired { if authority.Status != types.AuthorityExpired {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Name already reserved.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Name already reserved.")
} }
} }
ownerAddress, err := sdk.AccAddressFromBech32(owner) ownerAddress, err := sdk.AccAddressFromBech32(owner)
if err != nil { if err != nil {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid owner address.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid owner address.")
} }
ownerAccount := k.accountKeeper.GetAccount(ctx, ownerAddress) ownerAccount := k.accountKeeper.GetAccount(ctx, ownerAddress)
if ownerAccount == nil { if ownerAccount == nil {
return errorsmod.Wrap(sdkerrors.ErrUnknownAddress, "Account not found.") return sdkerrors.Wrap(sdkerrors.ErrUnknownAddress, "Account not found.")
} }
authority := types.NameAuthority{ authority := types.NameAuthority{
@ -431,11 +430,11 @@ func (k Keeper) ProcessReserveAuthority(ctx sdk.Context, msg types.MsgReserveAut
crn := fmt.Sprintf("crn://%s", msg.GetName()) crn := fmt.Sprintf("crn://%s", msg.GetName())
parsedCrn, err := url.Parse(crn) parsedCrn, err := url.Parse(crn)
if err != nil { if err != nil {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid name") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid name")
} }
name := parsedCrn.Host name := parsedCrn.Host
if fmt.Sprintf("crn://%s", name) != crn { if fmt.Sprintf("crn://%s", name) != crn {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid name") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid name")
} }
if strings.Contains(name, ".") { if strings.Contains(name, ".") {
return k.ProcessReserveSubAuthority(ctx, name, msg) return k.ProcessReserveSubAuthority(ctx, name, msg)
@ -451,20 +450,20 @@ func (k Keeper) ProcessSetAuthorityBond(ctx sdk.Context, msg types.MsgSetAuthori
name := msg.GetName() name := msg.GetName()
signer := msg.GetSigner() signer := msg.GetSigner()
if !k.HasNameAuthority(ctx, name) { if !k.HasNameAuthority(ctx, name) {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Name authority not found.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Name authority not found.")
} }
authority := k.GetNameAuthority(ctx, name) authority := k.GetNameAuthority(ctx, name)
if authority.OwnerAddress != signer { if authority.OwnerAddress != signer {
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Access denied") return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Access denied")
} }
if !k.bondKeeper.HasBond(ctx, msg.BondId) { if !k.bondKeeper.HasBond(ctx, msg.BondId) {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.")
} }
// //
bond := k.bondKeeper.GetBond(ctx, msg.BondId) bond := k.bondKeeper.GetBond(ctx, msg.BondId)
if bond.Owner != signer { if bond.Owner != signer {
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.") return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.")
} }
// No-op if bond hasn't changed. // No-op if bond hasn't changed.
@ -497,7 +496,7 @@ func (k Keeper) ProcessDeleteName(ctx sdk.Context, msg types.MsgDeleteNameAuthor
} }
if !k.HasNameRecord(ctx, msg.Crn) { if !k.HasNameRecord(ctx, msg.Crn) {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Name not found.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Name not found.")
} }
// Set CID to empty string. // Set CID to empty string.
@ -611,7 +610,7 @@ func (k Keeper) ProcessAuthorityExpiryQueue(ctx sdk.Context) {
k.SetNameAuthority(ctx, name, &authority) k.SetNameAuthority(ctx, name, &authority)
k.DeleteAuthorityExpiryQueue(ctx, name, authority) k.DeleteAuthorityExpiryQueue(ctx, name, authority)
k.Logger(ctx).Info(fmt.Sprintf("Marking authority expired as no bond present: %s", name)) ctx.Logger().Info(fmt.Sprintf("Marking authority expired as no bond present: %s", name))
return return
} }
@ -672,7 +671,7 @@ func (k Keeper) AuthorityExpiryQueueIterator(ctx sdk.Context, endTime time.Time)
// TryTakeAuthorityRent tries to take rent from the authority bond. // TryTakeAuthorityRent tries to take rent from the authority bond.
func (k Keeper) TryTakeAuthorityRent(ctx sdk.Context, name string, authority types.NameAuthority) { func (k Keeper) TryTakeAuthorityRent(ctx sdk.Context, name string, authority types.NameAuthority) {
k.Logger(ctx).Info(fmt.Sprintf("Trying to take rent for authority: %s", name)) ctx.Logger().Info(fmt.Sprintf("Trying to take rent for authority: %s", name))
params := k.GetParams(ctx) params := k.GetParams(ctx)
rent := params.AuthorityRent rent := params.AuthorityRent
@ -684,7 +683,7 @@ func (k Keeper) TryTakeAuthorityRent(ctx sdk.Context, name string, authority typ
k.SetNameAuthority(ctx, name, &authority) k.SetNameAuthority(ctx, name, &authority)
k.DeleteAuthorityExpiryQueue(ctx, name, authority) k.DeleteAuthorityExpiryQueue(ctx, name, authority)
k.Logger(ctx).Info(fmt.Sprintf("Insufficient funds in owner account to pay authority rent, marking as expired: %s", name)) ctx.Logger().Info(fmt.Sprintf("Insufficient funds in owner account to pay authority rent, marking as expired: %s", name))
return return
} }
@ -699,7 +698,7 @@ func (k Keeper) TryTakeAuthorityRent(ctx sdk.Context, name string, authority typ
k.SetNameAuthority(ctx, name, &authority) k.SetNameAuthority(ctx, name, &authority)
k.AddBondToAuthorityIndexEntry(ctx, authority.BondId, name) k.AddBondToAuthorityIndexEntry(ctx, authority.BondId, name)
k.Logger(ctx).Info(fmt.Sprintf("Authority rent paid successfully: %s", name)) ctx.Logger().Info(fmt.Sprintf("Authority rent paid successfully: %s", name))
} }
// ListNameAuthorityRecords - get all name authority records. // ListNameAuthorityRecords - get all name authority records.

View File

@ -4,7 +4,6 @@ import (
"fmt" "fmt"
"time" "time"
errorsmod "cosmossdk.io/errors"
auctionkeeper "github.com/cerc-io/laconicd/x/auction/keeper" auctionkeeper "github.com/cerc-io/laconicd/x/auction/keeper"
auctiontypes "github.com/cerc-io/laconicd/x/auction/types" auctiontypes "github.com/cerc-io/laconicd/x/auction/types"
bondtypes "github.com/cerc-io/laconicd/x/bond/types" bondtypes "github.com/cerc-io/laconicd/x/bond/types"
@ -39,14 +38,14 @@ func (k RecordKeeper) OnAuctionWinnerSelected(ctx sdk.Context, auctionID string)
name := k.GetAuctionToAuthorityMapping(ctx, auctionID) name := k.GetAuctionToAuthorityMapping(ctx, auctionID)
if name == "" { if name == "" {
// We don't know about this auction, ignore. // We don't know about this auction, ignore.
logger(ctx).Info(fmt.Sprintf("Ignoring auction notification, name mapping not found: %s", auctionID)) ctx.Logger().Info(fmt.Sprintf("Ignoring auction notification, name mapping not found: %s", auctionID))
return return
} }
store := ctx.KVStore(k.storeKey) store := ctx.KVStore(k.storeKey)
if !HasNameAuthority(store, name) { if !HasNameAuthority(store, name) {
// We don't know about this authority, ignore. // We don't know about this authority, ignore.
logger(ctx).Info(fmt.Sprintf("Ignoring auction notification, authority not found: %s", auctionID)) ctx.Logger().Info(fmt.Sprintf("Ignoring auction notification, authority not found: %s", auctionID))
return return
} }
@ -71,12 +70,12 @@ func (k RecordKeeper) OnAuctionWinnerSelected(ctx sdk.Context, auctionID string)
// Can be used to check if names are older than the authority itself (stale names). // Can be used to check if names are older than the authority itself (stale names).
authority.Height = uint64(ctx.BlockHeight()) authority.Height = uint64(ctx.BlockHeight())
logger(ctx).Info(fmt.Sprintf("Winner selected, marking authority as active: %s", name)) ctx.Logger().Info(fmt.Sprintf("Winner selected, marking authority as active: %s", name))
} else { } else {
// Mark as expired. // Mark as expired.
authority.Status = types.AuthorityExpired authority.Status = types.AuthorityExpired
logger(ctx).Info(fmt.Sprintf("No winner, marking authority as expired: %s", name)) ctx.Logger().Info(fmt.Sprintf("No winner, marking authority as expired: %s", name))
} }
authority.AuctionId = "" authority.AuctionId = ""
@ -85,7 +84,7 @@ func (k RecordKeeper) OnAuctionWinnerSelected(ctx sdk.Context, auctionID string)
// Forget about this auction now, we no longer need it. // Forget about this auction now, we no longer need it.
removeAuctionToAuthorityMapping(store, auctionID) removeAuctionToAuthorityMapping(store, auctionID)
} else { } else {
logger(ctx).Info(fmt.Sprintf("Ignoring auction notification, status: %s", auctionObj.Status)) ctx.Logger().Info(fmt.Sprintf("Ignoring auction notification, status: %s", auctionObj.Status))
} }
} }
@ -147,10 +146,9 @@ func (k RecordKeeper) QueryRecordsByBond(ctx sdk.Context, bondID string) []types
cid := itr.Key()[len(bondIDPrefix):] cid := itr.Key()[len(bondIDPrefix):]
bz := store.Get(append(PrefixCIDToRecordIndex, cid...)) bz := store.Get(append(PrefixCIDToRecordIndex, cid...))
if bz != nil { if bz != nil {
var record types.Record var obj types.Record
k.cdc.MustUnmarshal(bz, &record) k.cdc.MustUnmarshal(bz, &obj)
decodeRecordNames(store, &record) records = append(records, recordObjToRecord(store, obj))
records = append(records, record)
} }
} }
@ -160,7 +158,7 @@ func (k RecordKeeper) QueryRecordsByBond(ctx sdk.Context, bondID string) []types
// ProcessRenewRecord renews a record. // ProcessRenewRecord renews a record.
func (k Keeper) ProcessRenewRecord(ctx sdk.Context, msg types.MsgRenewRecord) error { func (k Keeper) ProcessRenewRecord(ctx sdk.Context, msg types.MsgRenewRecord) error {
if !k.HasRecord(ctx, msg.RecordId) { if !k.HasRecord(ctx, msg.RecordId) {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Record not found.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Record not found.")
} }
// Check if renewal is required (i.e. expired record marked as deleted). // Check if renewal is required (i.e. expired record marked as deleted).
@ -171,10 +169,10 @@ func (k Keeper) ProcessRenewRecord(ctx sdk.Context, msg types.MsgRenewRecord) er
} }
if !record.Deleted || expiryTime.After(ctx.BlockTime()) { if !record.Deleted || expiryTime.After(ctx.BlockTime()) {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Renewal not required.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Renewal not required.")
} }
recordType := record.ToReadableRecord() recordType := record.ToRecordType()
err = k.processRecord(ctx, &recordType, true) err = k.processRecord(ctx, &recordType, true)
if err != nil { if err != nil {
return err return err
@ -186,23 +184,23 @@ func (k Keeper) ProcessRenewRecord(ctx sdk.Context, msg types.MsgRenewRecord) er
// ProcessAssociateBond associates a record with a bond. // ProcessAssociateBond associates a record with a bond.
func (k Keeper) ProcessAssociateBond(ctx sdk.Context, msg types.MsgAssociateBond) error { func (k Keeper) ProcessAssociateBond(ctx sdk.Context, msg types.MsgAssociateBond) error {
if !k.HasRecord(ctx, msg.RecordId) { if !k.HasRecord(ctx, msg.RecordId) {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Record not found.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Record not found.")
} }
if !k.bondKeeper.HasBond(ctx, msg.BondId) { if !k.bondKeeper.HasBond(ctx, msg.BondId) {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.")
} }
// Check if already associated with a bond. // Check if already associated with a bond.
record := k.GetRecord(ctx, msg.RecordId) record := k.GetRecord(ctx, msg.RecordId)
if record.BondId != "" || len(record.BondId) != 0 { if record.BondId != "" || len(record.BondId) != 0 {
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond already exists.") return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Bond already exists.")
} }
// Only the bond owner can associate a record with the bond. // Only the bond owner can associate a record with the bond.
bond := k.bondKeeper.GetBond(ctx, msg.BondId) bond := k.bondKeeper.GetBond(ctx, msg.BondId)
if msg.Signer != bond.Owner { if msg.Signer != bond.Owner {
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.") return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.")
} }
record.BondId = msg.BondId record.BondId = msg.BondId
@ -220,20 +218,20 @@ func (k Keeper) ProcessAssociateBond(ctx sdk.Context, msg types.MsgAssociateBond
// ProcessDissociateBond dissociates a record from its bond. // ProcessDissociateBond dissociates a record from its bond.
func (k Keeper) ProcessDissociateBond(ctx sdk.Context, msg types.MsgDissociateBond) error { func (k Keeper) ProcessDissociateBond(ctx sdk.Context, msg types.MsgDissociateBond) error {
if !k.HasRecord(ctx, msg.RecordId) { if !k.HasRecord(ctx, msg.RecordId) {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Record not found.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Record not found.")
} }
// Check if associated with a bond. // Check if associated with a bond.
record := k.GetRecord(ctx, msg.RecordId) record := k.GetRecord(ctx, msg.RecordId)
bondID := record.BondId bondID := record.BondId
if bondID == "" || len(bondID) == 0 { if bondID == "" || len(bondID) == 0 {
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond not found.") return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Bond not found.")
} }
// Only the bond owner can dissociate a record from the bond. // Only the bond owner can dissociate a record from the bond.
bond := k.bondKeeper.GetBond(ctx, bondID) bond := k.bondKeeper.GetBond(ctx, bondID)
if msg.Signer != bond.Owner { if msg.Signer != bond.Owner {
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.") return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.")
} }
// Clear bond ID. // Clear bond ID.
@ -247,13 +245,13 @@ func (k Keeper) ProcessDissociateBond(ctx sdk.Context, msg types.MsgDissociateBo
// ProcessDissociateRecords dissociates all records associated with a given bond. // ProcessDissociateRecords dissociates all records associated with a given bond.
func (k Keeper) ProcessDissociateRecords(ctx sdk.Context, msg types.MsgDissociateRecords) error { func (k Keeper) ProcessDissociateRecords(ctx sdk.Context, msg types.MsgDissociateRecords) error {
if !k.bondKeeper.HasBond(ctx, msg.BondId) { if !k.bondKeeper.HasBond(ctx, msg.BondId) {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.")
} }
// Only the bond owner can dissociate all records from the bond. // Only the bond owner can dissociate all records from the bond.
bond := k.bondKeeper.GetBond(ctx, msg.BondId) bond := k.bondKeeper.GetBond(ctx, msg.BondId)
if msg.Signer != bond.Owner { if msg.Signer != bond.Owner {
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.") return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.")
} }
// Dissociate all records from the bond. // Dissociate all records from the bond.
@ -271,22 +269,22 @@ func (k Keeper) ProcessDissociateRecords(ctx sdk.Context, msg types.MsgDissociat
// ProcessReAssociateRecords switches records from and old to new bond. // ProcessReAssociateRecords switches records from and old to new bond.
func (k Keeper) ProcessReAssociateRecords(ctx sdk.Context, msg types.MsgReAssociateRecords) error { func (k Keeper) ProcessReAssociateRecords(ctx sdk.Context, msg types.MsgReAssociateRecords) error {
if !k.bondKeeper.HasBond(ctx, msg.OldBondId) { if !k.bondKeeper.HasBond(ctx, msg.OldBondId) {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Old bond not found.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Old bond not found.")
} }
if !k.bondKeeper.HasBond(ctx, msg.NewBondId) { if !k.bondKeeper.HasBond(ctx, msg.NewBondId) {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "New bond not found.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "New bond not found.")
} }
// Only the bond owner can re-associate all records. // Only the bond owner can re-associate all records.
oldBond := k.bondKeeper.GetBond(ctx, msg.OldBondId) oldBond := k.bondKeeper.GetBond(ctx, msg.OldBondId)
if msg.Signer != oldBond.Owner { if msg.Signer != oldBond.Owner {
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Old bond owner mismatch.") return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Old bond owner mismatch.")
} }
newBond := k.bondKeeper.GetBond(ctx, msg.NewBondId) newBond := k.bondKeeper.GetBond(ctx, msg.NewBondId)
if msg.Signer != newBond.Owner { if msg.Signer != newBond.Owner {
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "New bond owner mismatch.") return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "New bond owner mismatch.")
} }
// Re-associate all records. // Re-associate all records.

View File

@ -0,0 +1,5 @@
package types
type Attributes interface {
GetType() string
}

1412
x/registry/types/attributes.pb.go generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -39,6 +39,17 @@ func RegisterInterfaces(registry types.InterfaceRegistry) {
&MsgReAssociateRecords{}, &MsgReAssociateRecords{},
) )
registry.RegisterInterface(
"vulcanize.registry.v1beta1.ServiceProvideRegistration",
(*Attributes)(nil),
&ServiceProviderRegistration{},
)
registry.RegisterInterface(
"vulcanize.registry.v1beta1.WebsiteRegistrationRecord",
(*Attributes)(nil),
&WebsiteRegistrationRecord{},
)
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
} }

View File

@ -3,7 +3,6 @@ package types
import ( import (
"net/url" "net/url"
errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
) )
@ -16,8 +15,8 @@ var (
) )
// NewMsgSetName is the constructor function for MsgSetName. // NewMsgSetName is the constructor function for MsgSetName.
func NewMsgSetName(crn string, cid string, signer sdk.AccAddress) *MsgSetName { func NewMsgSetName(crn string, cid string, signer sdk.AccAddress) MsgSetName {
return &MsgSetName{ return MsgSetName{
Crn: crn, Crn: crn,
Cid: cid, Cid: cid,
Signer: signer.String(), Signer: signer.String(),
@ -33,15 +32,15 @@ func (msg MsgSetName) Type() string { return "set-name" }
// ValidateBasic Implements Msg. // ValidateBasic Implements Msg.
func (msg MsgSetName) ValidateBasic() error { func (msg MsgSetName) ValidateBasic() error {
if msg.Crn == "" { if msg.Crn == "" {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "CRN is required.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "CRN is required.")
} }
if msg.Cid == "" { if msg.Cid == "" {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "CID is required.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "CID is required.")
} }
if len(msg.Signer) == 0 { if len(msg.Signer) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer") return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer")
} }
return nil return nil
@ -77,11 +76,11 @@ func (msg MsgReserveAuthority) Type() string { return "reserve-authority" }
// ValidateBasic Implements Msg. // ValidateBasic Implements Msg.
func (msg MsgReserveAuthority) ValidateBasic() error { func (msg MsgReserveAuthority) ValidateBasic() error {
if len(msg.Name) == 0 { if len(msg.Name) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "name is required.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "name is required.")
} }
if len(msg.Signer) == 0 { if len(msg.Signer) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer") return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer")
} }
return nil return nil
@ -117,15 +116,15 @@ func (msg MsgSetAuthorityBond) Type() string { return "authority-bond" }
// ValidateBasic Implements Msg. // ValidateBasic Implements Msg.
func (msg MsgSetAuthorityBond) ValidateBasic() error { func (msg MsgSetAuthorityBond) ValidateBasic() error {
if len(msg.Name) == 0 { if len(msg.Name) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "name is required.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "name is required.")
} }
if len(msg.Signer) == 0 { if len(msg.Signer) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.") return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.")
} }
if len(msg.BondId) == 0 { if len(msg.BondId) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "bond id is required.") return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "bond id is required.")
} }
return nil return nil
@ -160,16 +159,16 @@ func (msg MsgDeleteNameAuthority) Type() string { return "delete-name" }
// ValidateBasic Implements Msg. // ValidateBasic Implements Msg.
func (msg MsgDeleteNameAuthority) ValidateBasic() error { func (msg MsgDeleteNameAuthority) ValidateBasic() error {
if len(msg.Crn) == 0 { if len(msg.Crn) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "crn is required.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "crn is required.")
} }
if len(msg.Signer) == 0 { if len(msg.Signer) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.") return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.")
} }
_, err := url.Parse(msg.Crn) _, err := url.Parse(msg.Crn)
if err != nil { if err != nil {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid crn.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "invalid crn.")
} }
return nil return nil

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
package types package types
import ( import (
errorsmod "cosmossdk.io/errors" cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
) )
@ -13,11 +13,13 @@ var (
_ sdk.Msg = &MsgDissociateBond{} _ sdk.Msg = &MsgDissociateBond{}
_ sdk.Msg = &MsgDissociateRecords{} _ sdk.Msg = &MsgDissociateRecords{}
_ sdk.Msg = &MsgReAssociateRecords{} _ sdk.Msg = &MsgReAssociateRecords{}
_ cdctypes.UnpackInterfacesMessage = &MsgSetRecord{}
) )
// NewMsgSetRecord is the constructor function for MsgSetRecord. // NewMsgSetRecord is the constructor function for MsgSetRecord.
func NewMsgSetRecord(payload Payload, bondID string, signer sdk.AccAddress) *MsgSetRecord { func NewMsgSetRecord(payload Payload, bondID string, signer sdk.AccAddress) MsgSetRecord {
return &MsgSetRecord{ return MsgSetRecord{
Payload: payload, Payload: payload,
BondId: bondID, BondId: bondID,
Signer: signer.String(), Signer: signer.String(),
@ -32,17 +34,17 @@ func (msg MsgSetRecord) Type() string { return "set-record" }
func (msg MsgSetRecord) ValidateBasic() error { func (msg MsgSetRecord) ValidateBasic() error {
if len(msg.Signer) == 0 { if len(msg.Signer) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer) return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer)
} }
owners := msg.Payload.Record.Owners owners := msg.Payload.Record.Owners
for _, owner := range owners { for _, owner := range owners {
if owner == "" { if owner == "" {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Record owner not set.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Record owner not set.")
} }
} }
if len(msg.BondId) == 0 { if len(msg.BondId) == 0 {
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond ID is required.") return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Bond ID is required.")
} }
return nil return nil
} }
@ -58,6 +60,12 @@ func (msg MsgSetRecord) GetSignBytes() []byte {
return sdk.MustSortJSON(bz) return sdk.MustSortJSON(bz)
} }
// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces
func (msg MsgSetRecord) UnpackInterfaces(unpacker cdctypes.AnyUnpacker) error {
var attr Attributes
return unpacker.UnpackAny(msg.Payload.Record.Attributes, &attr)
}
// NewMsgRenewRecord is the constructor function for MsgRenewRecord. // NewMsgRenewRecord is the constructor function for MsgRenewRecord.
func NewMsgRenewRecord(recordID string, signer sdk.AccAddress) MsgRenewRecord { func NewMsgRenewRecord(recordID string, signer sdk.AccAddress) MsgRenewRecord {
return MsgRenewRecord{ return MsgRenewRecord{
@ -75,11 +83,11 @@ func (msg MsgRenewRecord) Type() string { return "renew-record" }
// ValidateBasic Implements Msg. // ValidateBasic Implements Msg.
func (msg MsgRenewRecord) ValidateBasic() error { func (msg MsgRenewRecord) ValidateBasic() error {
if len(msg.RecordId) == 0 { if len(msg.RecordId) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "record id is required.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "record id is required.")
} }
if len(msg.Signer) == 0 { if len(msg.Signer) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.") return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.")
} }
return nil return nil
@ -115,13 +123,13 @@ func (msg MsgAssociateBond) Type() string { return "associate-bond" }
// ValidateBasic Implements Msg. // ValidateBasic Implements Msg.
func (msg MsgAssociateBond) ValidateBasic() error { func (msg MsgAssociateBond) ValidateBasic() error {
if len(msg.RecordId) == 0 { if len(msg.RecordId) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "record id is required.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "record id is required.")
} }
if len(msg.BondId) == 0 { if len(msg.BondId) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "bond id is required.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "bond id is required.")
} }
if len(msg.Signer) == 0 { if len(msg.Signer) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.") return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.")
} }
return nil return nil
@ -156,10 +164,10 @@ func (msg MsgDissociateBond) Type() string { return "dissociate-bond" }
// ValidateBasic Implements Msg. // ValidateBasic Implements Msg.
func (msg MsgDissociateBond) ValidateBasic() error { func (msg MsgDissociateBond) ValidateBasic() error {
if len(msg.RecordId) == 0 { if len(msg.RecordId) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "record id is required.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "record id is required.")
} }
if len(msg.Signer) == 0 { if len(msg.Signer) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.") return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.")
} }
return nil return nil
@ -194,10 +202,10 @@ func (msg MsgDissociateRecords) Type() string { return "dissociate-records" }
// ValidateBasic Implements Msg. // ValidateBasic Implements Msg.
func (msg MsgDissociateRecords) ValidateBasic() error { func (msg MsgDissociateRecords) ValidateBasic() error {
if len(msg.BondId) == 0 { if len(msg.BondId) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "bond id is required.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "bond id is required.")
} }
if len(msg.Signer) == 0 { if len(msg.Signer) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.") return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.")
} }
return nil return nil
@ -233,13 +241,13 @@ func (msg MsgReAssociateRecords) Type() string { return "reassociate-records" }
// ValidateBasic Implements Msg. // ValidateBasic Implements Msg.
func (msg MsgReAssociateRecords) ValidateBasic() error { func (msg MsgReAssociateRecords) ValidateBasic() error {
if len(msg.OldBondId) == 0 { if len(msg.OldBondId) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "old-bond-id is required.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "old-bond-id is required.")
} }
if len(msg.NewBondId) == 0 { if len(msg.NewBondId) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "new-bond-id is required.") return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "new-bond-id is required.")
} }
if len(msg.Signer) == 0 { if len(msg.Signer) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.") return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.")
} }
return nil return nil

View File

@ -5,7 +5,7 @@ package types
import ( import (
fmt "fmt" fmt "fmt"
_ "github.com/cosmos/cosmos-sdk/codec/types" types1 "github.com/cosmos/cosmos-sdk/codec/types"
types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types"
_ "github.com/cosmos/gogoproto/gogoproto" _ "github.com/cosmos/gogoproto/gogoproto"
proto "github.com/gogo/protobuf/proto" proto "github.com/gogo/protobuf/proto"
@ -155,7 +155,7 @@ func (m *Params) GetAuthorityAuctionMinimumBid() types.Coin {
return types.Coin{} return types.Coin{}
} }
// Record defines a registry record // Params defines the registry module records
type Record struct { type Record struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" json:"id" yaml:"id"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" json:"id" yaml:"id"`
BondId string `protobuf:"bytes,2,opt,name=bond_id,json=bondId,proto3" json:"bond_id,omitempty" json:"bondId" yaml:"bondId"` BondId string `protobuf:"bytes,2,opt,name=bond_id,json=bondId,proto3" json:"bond_id,omitempty" json:"bondId" yaml:"bondId"`
@ -163,7 +163,7 @@ type Record struct {
ExpiryTime string `protobuf:"bytes,4,opt,name=expiry_time,json=expiryTime,proto3" json:"expiry_time,omitempty" json:"expiryTime" yaml:"expiryTime"` ExpiryTime string `protobuf:"bytes,4,opt,name=expiry_time,json=expiryTime,proto3" json:"expiry_time,omitempty" json:"expiryTime" yaml:"expiryTime"`
Deleted bool `protobuf:"varint,5,opt,name=deleted,proto3" json:"deleted,omitempty"` Deleted bool `protobuf:"varint,5,opt,name=deleted,proto3" json:"deleted,omitempty"`
Owners []string `protobuf:"bytes,6,rep,name=owners,proto3" json:"owners,omitempty" json:"owners" yaml:"owners"` Owners []string `protobuf:"bytes,6,rep,name=owners,proto3" json:"owners,omitempty" json:"owners" yaml:"owners"`
Attributes []byte `protobuf:"bytes,7,opt,name=attributes,proto3" json:"attributes,omitempty" json:"attributes" yaml:"attributes"` Attributes *types1.Any `protobuf:"bytes,7,opt,name=attributes,proto3" json:"attributes,omitempty" json:"attributes" yaml:"attributes"`
Names []string `protobuf:"bytes,8,rep,name=names,proto3" json:"names,omitempty" json:"names" yaml:"names"` Names []string `protobuf:"bytes,8,rep,name=names,proto3" json:"names,omitempty" json:"names" yaml:"names"`
Type string `protobuf:"bytes,9,opt,name=type,proto3" json:"type,omitempty" json:"types" yaml:"types"` Type string `protobuf:"bytes,9,opt,name=type,proto3" json:"type,omitempty" json:"types" yaml:"types"`
} }
@ -243,7 +243,7 @@ func (m *Record) GetOwners() []string {
return nil return nil
} }
func (m *Record) GetAttributes() []byte { func (m *Record) GetAttributes() *types1.Any {
if m != nil { if m != nil {
return m.Attributes return m.Attributes
} }
@ -264,7 +264,7 @@ func (m *Record) GetType() string {
return "" return ""
} }
// AuthorityEntry defines a registry authority // AuthorityEntry defines the registry module AuthorityEntries
type AuthorityEntry struct { type AuthorityEntry struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Entry *NameAuthority `protobuf:"bytes,2,opt,name=entry,proto3" json:"entry,omitempty"` Entry *NameAuthority `protobuf:"bytes,2,opt,name=entry,proto3" json:"entry,omitempty"`
@ -466,7 +466,7 @@ func (m *NameEntry) GetEntry() *NameRecord {
return nil return nil
} }
// NameRecord defines a versioned name record // NameRecord
type NameRecord struct { type NameRecord struct {
Latest *NameRecordEntry `protobuf:"bytes,1,opt,name=latest,proto3" json:"latest,omitempty"` Latest *NameRecordEntry `protobuf:"bytes,1,opt,name=latest,proto3" json:"latest,omitempty"`
History []*NameRecordEntry `protobuf:"bytes,2,rep,name=history,proto3" json:"history,omitempty"` History []*NameRecordEntry `protobuf:"bytes,2,rep,name=history,proto3" json:"history,omitempty"`
@ -781,91 +781,92 @@ func init() {
} }
var fileDescriptor_5ca0f65a0e7121be = []byte{ var fileDescriptor_5ca0f65a0e7121be = []byte{
// 1344 bytes of a gzipped FileDescriptorProto // 1347 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xdd, 0x6e, 0x1b, 0xc5, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xdd, 0x6e, 0x1b, 0x45,
0x17, 0xcf, 0xc6, 0x89, 0x13, 0x9f, 0x34, 0xf9, 0xff, 0x35, 0xa4, 0xad, 0x13, 0xa8, 0x37, 0x18, 0x14, 0xce, 0xc6, 0x89, 0x13, 0x9f, 0x34, 0x01, 0x0d, 0x69, 0xeb, 0x04, 0xea, 0x0d, 0x46, 0xa5,
0x95, 0x36, 0x84, 0xda, 0x2a, 0xbd, 0x28, 0x9f, 0x42, 0xd9, 0x24, 0x0d, 0x11, 0x02, 0xc2, 0xb4, 0x0d, 0xa1, 0xb6, 0x4a, 0x2f, 0xca, 0xaf, 0x50, 0x36, 0x49, 0x4b, 0x84, 0x80, 0x30, 0xed, 0x0d,
0x37, 0x20, 0x21, 0x6b, 0x76, 0x77, 0x6a, 0x0f, 0xf5, 0xee, 0x5a, 0xbb, 0xb3, 0xa5, 0xe6, 0x0e, 0x48, 0x95, 0x35, 0xbb, 0x3b, 0xb5, 0x87, 0x7a, 0x77, 0xad, 0xdd, 0xd9, 0x52, 0x73, 0xc7, 0x1b,
0xf1, 0x02, 0xb9, 0xec, 0x05, 0x6f, 0x00, 0x12, 0x8f, 0x41, 0x2f, 0x7b, 0x89, 0x90, 0x30, 0xa8, 0xe4, 0xb2, 0x48, 0xbc, 0x01, 0x48, 0x3c, 0x06, 0xbd, 0xec, 0x25, 0x42, 0xc2, 0xa0, 0xe6, 0x0d,
0x79, 0x03, 0x3f, 0x01, 0xda, 0xf9, 0xd8, 0x2f, 0xdb, 0x75, 0xa1, 0x77, 0x73, 0xbe, 0x7e, 0xf3, 0xfc, 0x04, 0x68, 0xe7, 0x67, 0xff, 0x6c, 0xd7, 0x85, 0xde, 0xcd, 0xf9, 0xfb, 0xe6, 0x9b, 0x33,
0x9b, 0x33, 0xe7, 0x9c, 0xd9, 0x85, 0xdd, 0x87, 0x71, 0xdf, 0x21, 0x3e, 0xfb, 0x9e, 0xb6, 0x43, 0xe7, 0x9c, 0xd9, 0x85, 0xdd, 0x87, 0x71, 0xdf, 0x21, 0x3e, 0xfb, 0x81, 0xb6, 0x43, 0xda, 0x65,
0xda, 0x65, 0x11, 0x0f, 0x87, 0xed, 0x87, 0x37, 0x6d, 0xca, 0xc9, 0xcd, 0x54, 0xd1, 0x1a, 0x84, 0x11, 0x0f, 0x87, 0xed, 0x87, 0xd7, 0x6d, 0xca, 0xc9, 0xf5, 0x54, 0xd1, 0x1a, 0x84, 0x01, 0x0f,
0x01, 0x0f, 0xd0, 0x76, 0xea, 0xda, 0x4a, 0x2d, 0xca, 0x75, 0xbb, 0xd1, 0x0d, 0x82, 0x6e, 0x9f, 0xd0, 0x76, 0xea, 0xda, 0x4a, 0x2d, 0xca, 0x75, 0xbb, 0xd1, 0x0d, 0x82, 0x6e, 0x9f, 0xb6, 0x85,
0xb6, 0x85, 0xa7, 0x1d, 0xdf, 0x6f, 0xbb, 0x71, 0x48, 0x38, 0x0b, 0x7c, 0x19, 0xbb, 0x6d, 0x96, 0xa7, 0x1d, 0xdf, 0x6f, 0xbb, 0x71, 0x48, 0x38, 0x0b, 0x7c, 0x19, 0xbb, 0x6d, 0x96, 0xed, 0x9c,
0xed, 0x9c, 0x79, 0x34, 0xe2, 0xc4, 0x1b, 0x28, 0x87, 0xcd, 0x6e, 0xd0, 0x0d, 0xc4, 0xb2, 0x9d, 0x79, 0x34, 0xe2, 0xc4, 0x1b, 0x28, 0x87, 0xcd, 0x6e, 0xd0, 0x0d, 0xc4, 0xb2, 0x9d, 0xac, 0x94,
0xac, 0x94, 0xb6, 0xe1, 0x04, 0x91, 0x17, 0x44, 0x6d, 0x9b, 0x44, 0x34, 0xa5, 0xe5, 0x04, 0x4c, 0xb6, 0xe1, 0x04, 0x91, 0x17, 0x44, 0x6d, 0x9b, 0x44, 0x34, 0xa5, 0xe5, 0x04, 0x4c, 0xc3, 0x6e,
0xc3, 0x6e, 0x95, 0x61, 0x89, 0xaf, 0xd8, 0x36, 0xff, 0x5c, 0x87, 0xea, 0x29, 0x09, 0x89, 0x17, 0x95, 0x61, 0x89, 0xaf, 0xd8, 0x36, 0xff, 0x5a, 0x87, 0xea, 0x09, 0x09, 0x89, 0x17, 0x21, 0x06,
0x21, 0x06, 0x6b, 0x21, 0x75, 0x82, 0xd0, 0xed, 0x84, 0xd4, 0xe7, 0x75, 0x63, 0xc7, 0xb8, 0xbe, 0x6b, 0x21, 0x75, 0x82, 0xd0, 0xed, 0x84, 0xd4, 0xe7, 0x75, 0x63, 0xc7, 0xb8, 0xba, 0xf6, 0xde,
0xf6, 0xce, 0x56, 0x4b, 0x62, 0xb7, 0x12, 0x6c, 0x7d, 0x8e, 0xd6, 0x41, 0xc0, 0x7c, 0xeb, 0xc6, 0x56, 0x4b, 0x62, 0xb7, 0x12, 0x6c, 0x7d, 0x8e, 0xd6, 0x41, 0xc0, 0x7c, 0xeb, 0xda, 0x93, 0x91,
0x93, 0x91, 0xb9, 0x30, 0x1e, 0x99, 0x57, 0xbf, 0x8d, 0x02, 0xff, 0xfd, 0x66, 0x2e, 0xb6, 0xb9, 0xb9, 0x30, 0x1e, 0x99, 0x97, 0xbf, 0x8b, 0x02, 0xff, 0xc3, 0x66, 0x2e, 0xb6, 0xb9, 0x33, 0x24,
0x33, 0x24, 0x5e, 0xbf, 0xa8, 0xc2, 0x20, 0x25, 0x4c, 0x7d, 0x8e, 0xce, 0x0c, 0xd8, 0xcc, 0x19, 0x5e, 0xbf, 0xa8, 0xc2, 0x20, 0x25, 0x4c, 0x7d, 0x8e, 0x4e, 0x0d, 0xd8, 0xcc, 0x19, 0x3b, 0x3a,
0x3b, 0x3a, 0x0d, 0xf5, 0x45, 0xb5, 0xa9, 0x24, 0xdc, 0xd2, 0x84, 0x5b, 0x87, 0xca, 0xc1, 0x3a, 0x0d, 0xf5, 0x45, 0xb5, 0xa9, 0x24, 0xdc, 0xd2, 0x84, 0x5b, 0x87, 0xca, 0xc1, 0x3a, 0x50, 0x9b,
0x50, 0x9b, 0xde, 0x9e, 0xd8, 0x34, 0x05, 0x99, 0xb2, 0x7b, 0x66, 0x7b, 0xfc, 0x97, 0x69, 0x60, 0xde, 0x9c, 0xd8, 0x34, 0x05, 0x99, 0xb2, 0x7b, 0x66, 0x7b, 0xfc, 0xb7, 0x69, 0x60, 0x94, 0x51,
0x94, 0x51, 0xd1, 0xc0, 0x28, 0x86, 0x0d, 0x12, 0xf3, 0x5e, 0x10, 0x32, 0x3e, 0x94, 0x09, 0xa8, 0xd1, 0xc0, 0x28, 0x86, 0x0d, 0x12, 0xf3, 0x5e, 0x10, 0x32, 0x3e, 0x94, 0x09, 0xa8, 0xcc, 0x4b,
0xcc, 0x4b, 0xc0, 0x2d, 0xc5, 0x65, 0x4f, 0x72, 0x29, 0x86, 0x6b, 0x16, 0x25, 0x2d, 0x5e, 0x4f, 0xc0, 0x0d, 0xc5, 0x65, 0x4f, 0x72, 0x29, 0x86, 0x6b, 0x16, 0x25, 0x2d, 0x5e, 0x4f, 0x15, 0x22,
0x15, 0x22, 0x13, 0x3f, 0x19, 0x70, 0xb9, 0xe8, 0x92, 0x25, 0x63, 0x69, 0x5e, 0x32, 0x4e, 0x14, 0x13, 0x3f, 0x1b, 0x70, 0xb1, 0xe8, 0x92, 0x25, 0x63, 0x69, 0x5e, 0x32, 0x8e, 0x15, 0x81, 0x4f,
0x81, 0x8f, 0xa6, 0x11, 0x98, 0xc8, 0xc7, 0x2c, 0xb3, 0x48, 0xc9, 0xc5, 0x02, 0xad, 0x34, 0x2b, 0xa6, 0x11, 0x98, 0xc8, 0xc7, 0x2c, 0xb3, 0x48, 0xc9, 0xf9, 0x02, 0xad, 0x34, 0x2b, 0x8f, 0x0d,
0x8f, 0x0d, 0xb8, 0x94, 0xc5, 0x75, 0x43, 0xe2, 0xd0, 0xce, 0x80, 0x86, 0x2c, 0x70, 0xeb, 0xcb, 0xb8, 0x90, 0xc5, 0x75, 0x43, 0xe2, 0xd0, 0xce, 0x80, 0x86, 0x2c, 0x70, 0xeb, 0xcb, 0xf3, 0xd8,
0xf3, 0xd8, 0x1d, 0x2b, 0x76, 0x1f, 0x94, 0xd9, 0xe5, 0x61, 0x26, 0xc9, 0x15, 0xac, 0x82, 0xdb, 0xdd, 0x56, 0xec, 0x3e, 0x2a, 0xb3, 0xcb, 0xc3, 0x4c, 0x92, 0x2b, 0x58, 0x05, 0xb7, 0xcd, 0xd4,
0x66, 0x6a, 0x3c, 0x4e, 0x6c, 0xa7, 0xc2, 0x84, 0x7e, 0x30, 0x60, 0x2b, 0x8b, 0x22, 0xb1, 0x93, 0x78, 0x3b, 0xb1, 0x9d, 0x08, 0x13, 0xfa, 0xd1, 0x80, 0xad, 0x2c, 0x8a, 0xc4, 0x4e, 0xb2, 0x69,
0x6c, 0xda, 0xa1, 0x3e, 0xb1, 0xfb, 0xd4, 0xad, 0x57, 0x77, 0x8c, 0xeb, 0xab, 0xd6, 0xd1, 0x78, 0x87, 0xfa, 0xc4, 0xee, 0x53, 0xb7, 0x5e, 0xdd, 0x31, 0xae, 0xae, 0x5a, 0x47, 0xe3, 0x91, 0xb9,
0x64, 0xee, 0x97, 0xb7, 0x2f, 0xb9, 0x4e, 0x32, 0x28, 0x3b, 0xe0, 0xec, 0x86, 0xf6, 0xa5, 0xe9, 0x5f, 0xde, 0xbe, 0xe4, 0x3a, 0xc9, 0xa0, 0xec, 0x80, 0xb3, 0x1b, 0xda, 0x97, 0xa6, 0x23, 0x69,
0x48, 0x5a, 0xd0, 0x6f, 0x06, 0x4c, 0x89, 0x73, 0x02, 0xcf, 0x63, 0x3c, 0xca, 0x2e, 0x72, 0x65, 0x41, 0xbf, 0x1b, 0x30, 0x25, 0xce, 0x09, 0x3c, 0x8f, 0xf1, 0x28, 0xbb, 0xc8, 0x95, 0x79, 0xa9,
0x5e, 0xaa, 0x3a, 0x2a, 0x55, 0x77, 0x67, 0x71, 0x2d, 0x43, 0xce, 0x26, 0x3d, 0xe1, 0x29, 0x52, 0xea, 0xa8, 0x54, 0xdd, 0x99, 0xc5, 0xb5, 0x0c, 0x39, 0x9b, 0xf4, 0x84, 0xa7, 0x48, 0xa1, 0x59,
0x68, 0x96, 0x4f, 0x70, 0x20, 0xdd, 0xd2, 0x8b, 0x9e, 0x7e, 0x92, 0x90, 0x3e, 0xa4, 0xa4, 0x9f, 0x3e, 0xc1, 0x81, 0x74, 0x4b, 0x2f, 0x7a, 0xfa, 0x49, 0x42, 0xfa, 0x90, 0x92, 0x7e, 0xee, 0x24,
0x3b, 0xc9, 0xea, 0x4b, 0x9f, 0xa4, 0x0c, 0x39, 0xfb, 0x24, 0x13, 0x9e, 0xd3, 0x4f, 0x82, 0xa5, 0xab, 0x2f, 0x7d, 0x92, 0x32, 0xe4, 0xec, 0x93, 0x4c, 0x78, 0x4e, 0x3f, 0x09, 0x96, 0x6e, 0xe9,
0x5b, 0x7a, 0x92, 0x9f, 0x0d, 0x78, 0x6d, 0x56, 0x5a, 0x3a, 0xf7, 0x29, 0xad, 0xd7, 0xe6, 0xf5, 0x49, 0x7e, 0x31, 0xe0, 0x8d, 0x59, 0x69, 0xe9, 0xdc, 0xa7, 0xb4, 0x5e, 0x9b, 0xd7, 0xd7, 0x5f,
0xf5, 0x17, 0xea, 0x0c, 0xc7, 0xcf, 0xbf, 0x8d, 0x04, 0x6c, 0xde, 0x3d, 0x08, 0x1f, 0xbc, 0x35, 0xa9, 0x33, 0xdc, 0x7e, 0xfe, 0x6d, 0x24, 0x60, 0xf3, 0xee, 0x41, 0xf8, 0xe0, 0xad, 0xe9, 0xd9,
0x3d, 0xfb, 0x77, 0x28, 0x9d, 0xc1, 0x56, 0x1e, 0x5d, 0xb0, 0x85, 0x97, 0x66, 0x9b, 0x81, 0xcd, 0xbf, 0x45, 0xe9, 0x0c, 0xb6, 0xf2, 0xe8, 0x82, 0x2d, 0xbc, 0x34, 0xdb, 0x0c, 0x6c, 0x5e, 0xae,
0xcb, 0xf5, 0x0c, 0xb6, 0x32, 0xc3, 0x09, 0xdb, 0x5f, 0x0d, 0xb8, 0x32, 0x19, 0xec, 0x31, 0x9f, 0x67, 0xb0, 0x95, 0x19, 0x4e, 0xd8, 0xfe, 0x66, 0xc0, 0xa5, 0xc9, 0x60, 0x8f, 0xf9, 0xcc, 0x8b,
0x79, 0xb1, 0xd7, 0xb1, 0x99, 0x5b, 0x5f, 0x9b, 0x47, 0xf7, 0x4b, 0x45, 0xf7, 0x64, 0x16, 0xdd, 0xbd, 0x8e, 0xcd, 0xdc, 0xfa, 0xda, 0x3c, 0xba, 0x5f, 0x2b, 0xba, 0xc7, 0xb3, 0xe8, 0xe6, 0xd0,
0x1c, 0xda, 0x6c, 0xbe, 0x79, 0x27, 0xbc, 0x5d, 0x26, 0xfc, 0x99, 0xb4, 0x5a, 0xcc, 0x6d, 0xfe, 0x66, 0xf3, 0xcd, 0x3b, 0xe1, 0xed, 0x32, 0xe1, 0x2f, 0xa4, 0xd5, 0x62, 0x6e, 0xf3, 0xa7, 0x25,
0xb8, 0x04, 0x55, 0x2c, 0xa6, 0x3d, 0xba, 0x06, 0x8b, 0xcc, 0x15, 0xcf, 0x5a, 0xcd, 0xba, 0x3c, 0xa8, 0x62, 0x31, 0xed, 0xd1, 0x15, 0x58, 0x64, 0xae, 0x78, 0xd6, 0x6a, 0xd6, 0xc5, 0xf1, 0xc8,
0x1e, 0x99, 0xaf, 0x48, 0x06, 0xd9, 0x36, 0x09, 0xd6, 0x22, 0x73, 0xd1, 0xbb, 0xb0, 0x62, 0x07, 0x7c, 0x4d, 0x32, 0xc8, 0xb6, 0x49, 0xb0, 0x16, 0x99, 0x8b, 0xde, 0x87, 0x15, 0x3b, 0xf0, 0xdd,
0xbe, 0xdb, 0x61, 0xae, 0x78, 0x8f, 0x6a, 0x96, 0x39, 0x1e, 0x99, 0xaf, 0x4a, 0xef, 0xc4, 0x70, 0x0e, 0x73, 0xc5, 0x7b, 0x54, 0xb3, 0xcc, 0xf1, 0xc8, 0x7c, 0x5d, 0x7a, 0x27, 0x86, 0xe3, 0x34,
0x92, 0x46, 0x28, 0x09, 0x57, 0xe5, 0x02, 0x7d, 0x02, 0x6b, 0x4e, 0x48, 0x09, 0xa7, 0x9d, 0xe4, 0x42, 0x49, 0xb8, 0x2a, 0x17, 0xe8, 0x33, 0x58, 0x73, 0x42, 0x4a, 0x38, 0xed, 0x24, 0x0f, 0xb7,
0xe1, 0x16, 0x2f, 0x48, 0xcd, 0xba, 0x36, 0x1e, 0x99, 0x6f, 0xc8, 0x68, 0x69, 0xbc, 0xc7, 0xbc, 0x78, 0x41, 0x6a, 0xd6, 0x95, 0xf1, 0xc8, 0x7c, 0x4b, 0x46, 0x4b, 0xe3, 0x5d, 0xe6, 0xa5, 0x57,
0xf4, 0x2a, 0x72, 0x1a, 0x0c, 0x99, 0x90, 0x20, 0xd1, 0x47, 0x03, 0x16, 0x0e, 0x25, 0xd2, 0x52, 0x91, 0xd3, 0x60, 0xc8, 0x84, 0x04, 0x89, 0x3e, 0x1a, 0xb0, 0x70, 0x28, 0x91, 0x96, 0xca, 0x48,
0x19, 0x49, 0x1a, 0xf3, 0x48, 0x39, 0x0d, 0x86, 0x4c, 0x40, 0x75, 0x58, 0x71, 0x69, 0x9f, 0x72, 0xd2, 0x98, 0x47, 0xca, 0x69, 0x30, 0x64, 0x02, 0xaa, 0xc3, 0x8a, 0x4b, 0xfb, 0x94, 0x53, 0x39,
0x2a, 0x47, 0xf6, 0x2a, 0xd6, 0x22, 0xba, 0x0d, 0xd5, 0xe0, 0x3b, 0x9f, 0x86, 0x51, 0xbd, 0xba, 0xb2, 0x57, 0xb1, 0x16, 0xd1, 0x4d, 0xa8, 0x06, 0xdf, 0xfb, 0x34, 0x8c, 0xea, 0xd5, 0x9d, 0x4a,
0x53, 0x29, 0x1e, 0x53, 0xea, 0x35, 0xb4, 0x92, 0xb0, 0x72, 0x47, 0xc7, 0x00, 0x84, 0xf3, 0x90, 0xf1, 0x98, 0x52, 0xaf, 0xa1, 0x95, 0x84, 0x95, 0x3b, 0xba, 0x07, 0x40, 0x38, 0x0f, 0x99, 0x1d,
0xd9, 0x31, 0xa7, 0x91, 0x98, 0x6e, 0x17, 0xf2, 0xdc, 0x32, 0x5b, 0x7a, 0x81, 0x99, 0x06, 0xe7, 0x73, 0x1a, 0xa9, 0xe9, 0xb6, 0x39, 0x31, 0x13, 0xf6, 0xfd, 0x61, 0x9e, 0x71, 0x16, 0x91, 0x5e,
0x42, 0xd1, 0x2d, 0x58, 0xf6, 0x89, 0x47, 0xa3, 0xfa, 0xaa, 0x20, 0x70, 0x65, 0x3c, 0x32, 0xb7, 0x6b, 0xa6, 0xc1, 0x39, 0x40, 0x74, 0x03, 0x96, 0x7d, 0xe2, 0xd1, 0xa8, 0xbe, 0x2a, 0x68, 0x5d,
0x24, 0x86, 0x50, 0xeb, 0x70, 0x29, 0x60, 0xe9, 0x8b, 0x6e, 0xc2, 0x12, 0x1f, 0x0e, 0x64, 0x1f, 0x1a, 0x8f, 0xcc, 0x2d, 0x89, 0x21, 0xd4, 0x3a, 0x5c, 0x0a, 0x58, 0xfa, 0xa2, 0xeb, 0xb0, 0xc4,
0x17, 0x62, 0x12, 0x6d, 0x1a, 0x23, 0x05, 0x2c, 0x5c, 0x9b, 0x14, 0x36, 0xf6, 0x75, 0x8d, 0x1c, 0x87, 0x03, 0xd9, 0xdd, 0x85, 0x98, 0x44, 0x9b, 0xc6, 0x48, 0x01, 0x0b, 0xd7, 0x26, 0x85, 0x8d,
0xf9, 0x3c, 0x1c, 0x22, 0x04, 0x4b, 0x09, 0x9a, 0x2c, 0x07, 0x2c, 0xd6, 0xe8, 0x63, 0x58, 0xa6, 0x7d, 0x5d, 0x39, 0x47, 0x3e, 0x0f, 0x87, 0x08, 0xc1, 0x52, 0x82, 0x26, 0x8b, 0x04, 0x8b, 0x35,
0x89, 0x51, 0x7d, 0x85, 0xec, 0xb6, 0x66, 0x7f, 0xc9, 0xb5, 0x3e, 0x27, 0x1e, 0x4d, 0x21, 0xb1, 0xfa, 0x14, 0x96, 0x69, 0x62, 0x54, 0xdf, 0x26, 0xbb, 0xad, 0xd9, 0xdf, 0x77, 0xad, 0x2f, 0x89,
0x8c, 0x6b, 0xfe, 0x51, 0x81, 0xf5, 0x82, 0x01, 0x7d, 0x05, 0xff, 0x17, 0x39, 0xeb, 0x0c, 0x62, 0x47, 0x53, 0x48, 0x2c, 0xe3, 0x9a, 0x7f, 0x56, 0x60, 0xbd, 0x60, 0x40, 0xdf, 0xc0, 0xab, 0x22,
0xbb, 0xcf, 0x9c, 0xce, 0x03, 0x3a, 0x54, 0x15, 0xd8, 0xce, 0x3e, 0x1c, 0x84, 0xc7, 0xa9, 0x70, 0x93, 0x9d, 0x41, 0x6c, 0xf7, 0x99, 0xd3, 0x79, 0x40, 0x87, 0xaa, 0x2e, 0xdb, 0xd9, 0xe7, 0x84,
0xf8, 0x94, 0x0e, 0x0b, 0x49, 0xcf, 0xb4, 0x78, 0xa3, 0xa8, 0x40, 0xa7, 0xb0, 0x2e, 0xa1, 0x89, 0xf0, 0x38, 0x11, 0x0e, 0x9f, 0xd3, 0x61, 0xe1, 0x2a, 0x32, 0x2d, 0xde, 0x28, 0x2a, 0xd0, 0x09,
0xeb, 0x86, 0x34, 0x8a, 0x54, 0xad, 0xee, 0x8d, 0x47, 0xe6, 0xb5, 0x1c, 0xee, 0xbe, 0xb4, 0x16, 0xac, 0x4b, 0x68, 0xe2, 0xba, 0x21, 0x8d, 0x22, 0x55, 0xc1, 0x7b, 0xe3, 0x91, 0x79, 0x25, 0x87,
0x50, 0xb5, 0x0e, 0x5f, 0xc8, 0x8b, 0xe8, 0x12, 0x54, 0x7b, 0x94, 0x75, 0x7b, 0xf2, 0xd3, 0x67, 0xbb, 0x2f, 0xad, 0x05, 0x54, 0xad, 0xc3, 0xe7, 0xf2, 0x22, 0xba, 0x00, 0xd5, 0x1e, 0x65, 0xdd,
0x09, 0x2b, 0x29, 0xd1, 0x47, 0x9c, 0xf0, 0x38, 0x92, 0x65, 0x88, 0x95, 0x84, 0x0e, 0x01, 0x74, 0x9e, 0xfc, 0x20, 0x5a, 0xc2, 0x4a, 0x4a, 0xf4, 0x11, 0x27, 0x3c, 0x8e, 0x64, 0x71, 0x62, 0x25,
0x3f, 0x32, 0x59, 0x5c, 0x35, 0xeb, 0xea, 0x78, 0x64, 0xbe, 0xae, 0x5b, 0x5b, 0xd8, 0x4e, 0x0e, 0xa1, 0x43, 0x00, 0xdd, 0xa5, 0x4c, 0x96, 0x5c, 0xcd, 0xba, 0x3c, 0x1e, 0x99, 0x6f, 0xea, 0x86,
0xb3, 0x36, 0xd6, 0x0a, 0x5c, 0xd3, 0xeb, 0x42, 0xb7, 0x55, 0xa7, 0x76, 0xdb, 0x61, 0xa1, 0xdb, 0x17, 0xb6, 0xe3, 0xc3, 0xac, 0xb9, 0xb5, 0x02, 0xd7, 0xf4, 0xba, 0xd0, 0x83, 0xd5, 0xa9, 0x3d,
0x0e, 0xb3, 0x6e, 0xeb, 0x17, 0x7b, 0x44, 0xbe, 0xb2, 0xdb, 0x13, 0x6f, 0xd3, 0x3d, 0xfd, 0x0d, 0x78, 0x58, 0xe8, 0xc1, 0xc3, 0xac, 0x07, 0xfb, 0xc5, 0xce, 0x91, 0xd5, 0xb9, 0x3d, 0x51, 0x9d,
0x6d, 0xb5, 0xd5, 0xec, 0x79, 0x91, 0x1e, 0x3a, 0x4b, 0x1e, 0x9b, 0x5c, 0x1f, 0x35, 0xbf, 0x81, 0x77, 0xf5, 0x97, 0xb5, 0xd5, 0x56, 0x13, 0xe9, 0x45, 0x3a, 0xeb, 0x34, 0x79, 0x82, 0x72, 0xdd,
0x5a, 0x72, 0xb7, 0xb3, 0xcb, 0xe7, 0xc3, 0x62, 0xf9, 0xbc, 0x39, 0xaf, 0x7c, 0xe4, 0x58, 0xd2, 0xd5, 0xbc, 0x07, 0xb5, 0xe4, 0x6e, 0x67, 0x97, 0xcf, 0xc7, 0xc5, 0xf2, 0x79, 0x7b, 0x5e, 0xf9,
0xb5, 0xf3, 0xd8, 0x00, 0xc8, 0xb4, 0xe8, 0x00, 0xaa, 0x7d, 0xc2, 0x69, 0xa4, 0xbf, 0xc3, 0xf7, 0xc8, 0x61, 0xa5, 0x6b, 0xe7, 0xb1, 0x01, 0x90, 0x69, 0xd1, 0x01, 0x54, 0xfb, 0x84, 0xd3, 0x48,
0x5e, 0x0c, 0x4d, 0xb0, 0xc3, 0x2a, 0x14, 0x1d, 0xc1, 0x4a, 0x8f, 0x45, 0x3c, 0x10, 0x9c, 0x2a, 0x7f, 0x9d, 0xef, 0xbd, 0x18, 0x9a, 0x60, 0x87, 0x55, 0x28, 0x3a, 0x82, 0x95, 0x1e, 0x8b, 0x78,
0xff, 0x16, 0x45, 0xc7, 0x36, 0xdf, 0x83, 0xff, 0x95, 0x6c, 0x68, 0x23, 0x9b, 0xa5, 0x62, 0x64, 0x20, 0x38, 0x55, 0xfe, 0x2b, 0x8a, 0x8e, 0x6d, 0x7e, 0x00, 0xaf, 0x94, 0x6c, 0x68, 0x23, 0x9b,
0x66, 0xa5, 0xb3, 0x98, 0x2f, 0x9d, 0x66, 0x08, 0xb5, 0xbb, 0xac, 0xeb, 0x13, 0x1e, 0x87, 0x14, 0xb0, 0x62, 0x90, 0x66, 0xa5, 0xb3, 0x98, 0x2f, 0x9d, 0x66, 0x08, 0xb5, 0x3b, 0xac, 0xeb, 0x13,
0xed, 0x41, 0x25, 0x62, 0x5d, 0x55, 0xff, 0x5b, 0xe3, 0x91, 0x79, 0x51, 0xde, 0x43, 0xc4, 0xba, 0x1e, 0x87, 0x14, 0xed, 0x41, 0x25, 0x62, 0x5d, 0x55, 0xff, 0x5b, 0xe3, 0x91, 0x79, 0x5e, 0xde,
0xfa, 0x02, 0x92, 0x25, 0x4e, 0xbc, 0x92, 0xb2, 0x18, 0xc4, 0xb6, 0x68, 0x98, 0x89, 0x21, 0x3c, 0x43, 0xc4, 0xba, 0xfa, 0x02, 0x92, 0x25, 0x4e, 0xbc, 0x92, 0xb2, 0x18, 0xc4, 0xb6, 0x68, 0x98,
0x88, 0xed, 0x5c, 0xa3, 0x28, 0x09, 0x57, 0xd5, 0xe2, 0x6c, 0x11, 0x36, 0xac, 0x7e, 0xe0, 0x3c, 0x89, 0xd1, 0x3c, 0x88, 0xed, 0x5c, 0xa3, 0x28, 0x09, 0x57, 0xd5, 0xe2, 0x74, 0x11, 0x36, 0xac,
0x38, 0xe8, 0x11, 0xbf, 0x4b, 0xef, 0x52, 0x9e, 0xa3, 0x97, 0x6c, 0x5e, 0x49, 0x2b, 0xbb, 0x0e, 0x7e, 0xe0, 0x3c, 0x38, 0xe8, 0x11, 0xbf, 0x4b, 0xef, 0x50, 0x9e, 0xa3, 0x97, 0x6c, 0x5e, 0x49,
0x2b, 0xf2, 0x57, 0x20, 0x12, 0x09, 0xaa, 0x61, 0x2d, 0xa2, 0x6d, 0x58, 0x55, 0x25, 0x1a, 0xd5, 0x2b, 0xbb, 0x0e, 0x2b, 0xf2, 0x07, 0x21, 0x12, 0x09, 0xaa, 0x61, 0x2d, 0xa2, 0x6d, 0x58, 0x55,
0x2b, 0xc2, 0x94, 0xca, 0xe8, 0x11, 0x5c, 0xd0, 0x75, 0x6f, 0x33, 0x37, 0xe9, 0x8a, 0x24, 0xb7, 0x25, 0x1a, 0xd5, 0x2b, 0xc2, 0x94, 0xca, 0xe8, 0x11, 0x9c, 0xd3, 0x75, 0x6f, 0x33, 0x37, 0xe9,
0x6f, 0x3d, 0x2f, 0xb7, 0xea, 0x61, 0xb2, 0x98, 0x7b, 0xe2, 0xdf, 0x0f, 0xac, 0xdd, 0xec, 0xb7, 0x8a, 0x24, 0xb7, 0xef, 0x3c, 0x2f, 0xb7, 0xea, 0xb9, 0xb2, 0x98, 0x7b, 0xec, 0xdf, 0x0f, 0xac,
0x89, 0xa4, 0x96, 0xa8, 0xd4, 0x27, 0x42, 0x85, 0xd7, 0x72, 0x12, 0xda, 0x81, 0x35, 0xfd, 0xd6, 0xdd, 0xec, 0x67, 0x8a, 0xa4, 0x96, 0xa8, 0xd4, 0x27, 0x42, 0x85, 0xd7, 0x72, 0x12, 0xda, 0x81,
0x31, 0x1a, 0xd5, 0x97, 0x05, 0xb1, 0xbc, 0x0a, 0x6d, 0xea, 0x89, 0x2a, 0x46, 0xba, 0x1a, 0x99, 0x35, 0xfd, 0x02, 0x32, 0x1a, 0xd5, 0x97, 0x05, 0xb1, 0xbc, 0x0a, 0x6d, 0xea, 0x89, 0x2a, 0x06,
0xcd, 0x5f, 0x8c, 0x64, 0x00, 0xe6, 0x29, 0x94, 0x9a, 0xd7, 0xf8, 0x8f, 0xcd, 0x7b, 0x0f, 0x36, 0xbd, 0x1a, 0x99, 0xcd, 0x5f, 0x8d, 0x64, 0x00, 0xe6, 0x29, 0x94, 0x9a, 0xd7, 0xf8, 0x9f, 0xcd,
0x6c, 0xe6, 0xba, 0x13, 0x53, 0xe8, 0xc6, 0x78, 0x64, 0xee, 0xaa, 0x1e, 0x16, 0xf6, 0xd2, 0x18, 0x7b, 0x17, 0x36, 0x6c, 0xe6, 0xba, 0x13, 0x53, 0xe8, 0xda, 0x78, 0x64, 0xee, 0xaa, 0x1e, 0x16,
0x2a, 0x2a, 0xf1, 0x7a, 0x41, 0xb6, 0xee, 0x3c, 0x79, 0xd6, 0x30, 0x9e, 0x3e, 0x6b, 0x18, 0x7f, 0xf6, 0xd2, 0x18, 0x2a, 0x2a, 0xf1, 0x7a, 0x41, 0xb6, 0x6e, 0x3d, 0x79, 0xd6, 0x30, 0x9e, 0x3e,
0x3f, 0x6b, 0x18, 0x67, 0xe7, 0x8d, 0x85, 0xa7, 0xe7, 0x8d, 0x85, 0xdf, 0xcf, 0x1b, 0x0b, 0x5f, 0x6b, 0x18, 0xff, 0x3c, 0x6b, 0x18, 0xa7, 0x67, 0x8d, 0x85, 0xa7, 0x67, 0x8d, 0x85, 0x3f, 0xce,
0xbf, 0xdd, 0x65, 0xbc, 0x17, 0xdb, 0x2d, 0x27, 0xf0, 0xda, 0x0e, 0x0d, 0x9d, 0x1b, 0x2c, 0x68, 0x1a, 0x0b, 0xdf, 0xbe, 0xdb, 0x65, 0xbc, 0x17, 0xdb, 0x2d, 0x27, 0xf0, 0xda, 0x0e, 0x0d, 0x9d,
0xf7, 0x89, 0x13, 0xf8, 0xcc, 0x71, 0xdb, 0x8f, 0xb2, 0x7f, 0x73, 0x31, 0xfd, 0xed, 0xaa, 0x98, 0x6b, 0x2c, 0x68, 0xf7, 0x89, 0x13, 0xf8, 0xcc, 0x71, 0xdb, 0x8f, 0xb2, 0x3f, 0x76, 0x31, 0xfd,
0x01, 0xb7, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x03, 0x19, 0xcc, 0xfc, 0xbe, 0x0f, 0x00, 0x00, 0xed, 0xaa, 0x98, 0x01, 0x37, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x03, 0x2e, 0xc4, 0xd4,
0x0f, 0x00, 0x00,
} }
func (m *Params) Marshal() (dAtA []byte, err error) { func (m *Params) Marshal() (dAtA []byte, err error) {
@ -1027,10 +1028,15 @@ func (m *Record) MarshalToSizedBuffer(dAtA []byte) (int, error) {
dAtA[i] = 0x42 dAtA[i] = 0x42
} }
} }
if len(m.Attributes) > 0 { if m.Attributes != nil {
i -= len(m.Attributes) {
copy(dAtA[i:], m.Attributes) size, err := m.Attributes.MarshalToSizedBuffer(dAtA[:i])
i = encodeVarintRegistry(dAtA, i, uint64(len(m.Attributes))) if err != nil {
return 0, err
}
i -= size
i = encodeVarintRegistry(dAtA, i, uint64(size))
}
i-- i--
dAtA[i] = 0x3a dAtA[i] = 0x3a
} }
@ -1146,12 +1152,12 @@ func (m *NameAuthority) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i _ = i
var l int var l int
_ = l _ = l
n12, err12 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExpiryTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpiryTime):]) n13, err13 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExpiryTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpiryTime):])
if err12 != nil { if err13 != nil {
return 0, err12 return 0, err13
} }
i -= n12 i -= n13
i = encodeVarintRegistry(dAtA, i, uint64(n12)) i = encodeVarintRegistry(dAtA, i, uint64(n13))
i-- i--
dAtA[i] = 0x3a dAtA[i] = 0x3a
if len(m.BondId) > 0 { if len(m.BondId) > 0 {
@ -1549,8 +1555,8 @@ func (m *Record) Size() (n int) {
n += 1 + l + sovRegistry(uint64(l)) n += 1 + l + sovRegistry(uint64(l))
} }
} }
l = len(m.Attributes) if m.Attributes != nil {
if l > 0 { l = m.Attributes.Size()
n += 1 + l + sovRegistry(uint64(l)) n += 1 + l + sovRegistry(uint64(l))
} }
if len(m.Names) > 0 { if len(m.Names) > 0 {
@ -2364,7 +2370,7 @@ func (m *Record) Unmarshal(dAtA []byte) error {
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType)
} }
var byteLen int var msglen int
for shift := uint(0); ; shift += 7 { for shift := uint(0); ; shift += 7 {
if shift >= 64 { if shift >= 64 {
return ErrIntOverflowRegistry return ErrIntOverflowRegistry
@ -2374,24 +2380,26 @@ func (m *Record) Unmarshal(dAtA []byte) error {
} }
b := dAtA[iNdEx] b := dAtA[iNdEx]
iNdEx++ iNdEx++
byteLen |= int(b&0x7F) << shift msglen |= int(b&0x7F) << shift
if b < 0x80 { if b < 0x80 {
break break
} }
} }
if byteLen < 0 { if msglen < 0 {
return ErrInvalidLengthRegistry return ErrInvalidLengthRegistry
} }
postIndex := iNdEx + byteLen postIndex := iNdEx + msglen
if postIndex < 0 { if postIndex < 0 {
return ErrInvalidLengthRegistry return ErrInvalidLengthRegistry
} }
if postIndex > l { if postIndex > l {
return io.ErrUnexpectedEOF return io.ErrUnexpectedEOF
} }
m.Attributes = append(m.Attributes[:0], dAtA[iNdEx:postIndex]...)
if m.Attributes == nil { if m.Attributes == nil {
m.Attributes = []byte{} m.Attributes = &types1.Any{}
}
if err := m.Attributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
} }
iNdEx = postIndex iNdEx = postIndex
case 8: case 8:

View File

@ -385,7 +385,7 @@ func (m *MsgReserveAuthorityResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_MsgReserveAuthorityResponse proto.InternalMessageInfo var xxx_messageInfo_MsgReserveAuthorityResponse proto.InternalMessageInfo
// MsgSetAuthorityBond // MsgSetAuthorityBond is SDK message for SetAuthorityBond
type MsgSetAuthorityBond struct { type MsgSetAuthorityBond struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
BondId string `protobuf:"bytes,2,opt,name=bond_id,json=bondId,proto3" json:"bond_id,omitempty" json:"bondId" yaml:"bondId"` BondId string `protobuf:"bytes,2,opt,name=bond_id,json=bondId,proto3" json:"bond_id,omitempty" json:"bondId" yaml:"bondId"`
@ -483,7 +483,7 @@ func (m *MsgSetAuthorityBondResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_MsgSetAuthorityBondResponse proto.InternalMessageInfo var xxx_messageInfo_MsgSetAuthorityBondResponse proto.InternalMessageInfo
// MsgDeleteNameAuthority // MsgDeleteNameAuthority is SDK message for DeleteNameAuthority
type MsgDeleteNameAuthority struct { type MsgDeleteNameAuthority struct {
Crn string `protobuf:"bytes,1,opt,name=crn,proto3" json:"crn,omitempty"` Crn string `protobuf:"bytes,1,opt,name=crn,proto3" json:"crn,omitempty"`
Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"`
@ -573,7 +573,7 @@ func (m *MsgDeleteNameAuthorityResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_MsgDeleteNameAuthorityResponse proto.InternalMessageInfo var xxx_messageInfo_MsgDeleteNameAuthorityResponse proto.InternalMessageInfo
// MsgRenewRecord // MsgRenewRecord is SDK message for Renew a record
type MsgRenewRecord struct { type MsgRenewRecord struct {
RecordId string `protobuf:"bytes,1,opt,name=record_id,json=recordId,proto3" json:"record_id,omitempty" json:"recordId" yaml:"recordId"` RecordId string `protobuf:"bytes,1,opt,name=record_id,json=recordId,proto3" json:"record_id,omitempty" json:"recordId" yaml:"recordId"`
Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"`
@ -761,7 +761,7 @@ func (m *MsgAssociateBondResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_MsgAssociateBondResponse proto.InternalMessageInfo var xxx_messageInfo_MsgAssociateBondResponse proto.InternalMessageInfo
// MsgDissociateBond // MsgDissociateBond is SDK message for Msg/DissociateBond
type MsgDissociateBond struct { type MsgDissociateBond struct {
RecordId string `protobuf:"bytes,1,opt,name=record_id,json=recordId,proto3" json:"record_id,omitempty" json:"recordId" yaml:"recordId"` RecordId string `protobuf:"bytes,1,opt,name=record_id,json=recordId,proto3" json:"record_id,omitempty" json:"recordId" yaml:"recordId"`
Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"`
@ -814,7 +814,7 @@ func (m *MsgDissociateBond) GetSigner() string {
return "" return ""
} }
// MsgDissociateBondResponse // MsgDissociateBondResponse is response type for MsgDissociateBond
type MsgDissociateBondResponse struct { type MsgDissociateBondResponse struct {
} }
@ -851,7 +851,7 @@ func (m *MsgDissociateBondResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_MsgDissociateBondResponse proto.InternalMessageInfo var xxx_messageInfo_MsgDissociateBondResponse proto.InternalMessageInfo
// MsgDissociateRecords // MsgDissociateRecords is SDK message for Msg/DissociateRecords
type MsgDissociateRecords struct { type MsgDissociateRecords struct {
BondId string `protobuf:"bytes,1,opt,name=bond_id,json=bondId,proto3" json:"bond_id,omitempty" json:"bondId" yaml:"bondId"` BondId string `protobuf:"bytes,1,opt,name=bond_id,json=bondId,proto3" json:"bond_id,omitempty" json:"bondId" yaml:"bondId"`
Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"`
@ -904,7 +904,7 @@ func (m *MsgDissociateRecords) GetSigner() string {
return "" return ""
} }
// MsgDissociateRecordsResponse // MsgDissociateRecordsResponse is response type for MsgDissociateRecords
type MsgDissociateRecordsResponse struct { type MsgDissociateRecordsResponse struct {
} }
@ -941,7 +941,7 @@ func (m *MsgDissociateRecordsResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_MsgDissociateRecordsResponse proto.InternalMessageInfo var xxx_messageInfo_MsgDissociateRecordsResponse proto.InternalMessageInfo
// MsgReAssociateRecords // MsgReAssociateRecords is SDK message for Msg/ReAssociateRecords
type MsgReAssociateRecords struct { type MsgReAssociateRecords struct {
NewBondId string `protobuf:"bytes,1,opt,name=new_bond_id,json=newBondId,proto3" json:"new_bond_id,omitempty" json:"newBondId" yaml:"newBondId"` NewBondId string `protobuf:"bytes,1,opt,name=new_bond_id,json=newBondId,proto3" json:"new_bond_id,omitempty" json:"newBondId" yaml:"newBondId"`
OldBondId string `protobuf:"bytes,2,opt,name=old_bond_id,json=oldBondId,proto3" json:"old_bond_id,omitempty" json:"oldBondId" yaml:"oldBondId"` OldBondId string `protobuf:"bytes,2,opt,name=old_bond_id,json=oldBondId,proto3" json:"old_bond_id,omitempty" json:"oldBondId" yaml:"oldBondId"`
@ -1002,7 +1002,7 @@ func (m *MsgReAssociateRecords) GetSigner() string {
return "" return ""
} }
// MsgReAssociateRecordsResponse // MsgReAssociateRecordsResponse is response type for MsgReAssociateRecords
type MsgReAssociateRecordsResponse struct { type MsgReAssociateRecordsResponse struct {
} }
@ -1147,9 +1147,9 @@ const _ = grpc.SupportPackageIsVersion4
// //
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type MsgClient interface { type MsgClient interface {
// SetRecord records a new record with given payload and bond id // SetRecord will records a new record with given payload and bond id
SetRecord(ctx context.Context, in *MsgSetRecord, opts ...grpc.CallOption) (*MsgSetRecordResponse, error) SetRecord(ctx context.Context, in *MsgSetRecord, opts ...grpc.CallOption) (*MsgSetRecordResponse, error)
// Renew Record renews an expired record // Renew Record will renew the expire record
RenewRecord(ctx context.Context, in *MsgRenewRecord, opts ...grpc.CallOption) (*MsgRenewRecordResponse, error) RenewRecord(ctx context.Context, in *MsgRenewRecord, opts ...grpc.CallOption) (*MsgRenewRecordResponse, error)
// AssociateBond // AssociateBond
AssociateBond(ctx context.Context, in *MsgAssociateBond, opts ...grpc.CallOption) (*MsgAssociateBondResponse, error) AssociateBond(ctx context.Context, in *MsgAssociateBond, opts ...grpc.CallOption) (*MsgAssociateBondResponse, error)
@ -1269,9 +1269,9 @@ func (c *msgClient) SetAuthorityBond(ctx context.Context, in *MsgSetAuthorityBon
// MsgServer is the server API for Msg service. // MsgServer is the server API for Msg service.
type MsgServer interface { type MsgServer interface {
// SetRecord records a new record with given payload and bond id // SetRecord will records a new record with given payload and bond id
SetRecord(context.Context, *MsgSetRecord) (*MsgSetRecordResponse, error) SetRecord(context.Context, *MsgSetRecord) (*MsgSetRecordResponse, error)
// Renew Record renews an expired record // Renew Record will renew the expire record
RenewRecord(context.Context, *MsgRenewRecord) (*MsgRenewRecordResponse, error) RenewRecord(context.Context, *MsgRenewRecord) (*MsgRenewRecordResponse, error)
// AssociateBond // AssociateBond
AssociateBond(context.Context, *MsgAssociateBond) (*MsgAssociateBondResponse, error) AssociateBond(context.Context, *MsgAssociateBond) (*MsgAssociateBondResponse, error)

Some files were not shown because too many files have changed in this diff Show More