forked from cerc-io/laconicd-deprecated
Compare commits
36
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
596c309e1f | ||
|
|
d64e80f963 | ||
|
|
21aa925758 | ||
|
|
7d43cd3ee4 | ||
|
|
16d9291bc2 | ||
|
|
4adce81981 | ||
|
|
98b7e41988 | ||
|
|
98cc47a1a4 | ||
|
|
e02bb54109 | ||
|
|
0b17e317d3 | ||
|
|
a5681191a5 | ||
|
|
1cdf15595e | ||
|
|
2cc5df02e0 | ||
|
|
703f146c5b | ||
|
|
763dab712f | ||
|
|
e2178894ef | ||
|
|
dca3ccb47c | ||
|
|
2c883282bc | ||
|
|
b8d6300e4d | ||
|
|
42fdc97c1c | ||
|
|
5f6a9f56bb | ||
|
|
71c15cd2eb | ||
|
|
c227a38e9a | ||
|
|
15c9ade06d | ||
|
|
4b318822d9 | ||
|
|
c61f268329 | ||
|
|
facd64a14b | ||
|
|
6945792aea | ||
|
|
5af22471a8 | ||
|
|
5e7a890adb | ||
|
|
9ec237e41f | ||
|
|
b57ad7d5fa | ||
|
|
c3138a2615 | ||
|
|
02e9080094 | ||
|
|
747088deb0 | ||
|
|
ab2ea51aac |
@@ -1,4 +1,4 @@
|
||||
name: Publish onn release
|
||||
name: Publish on release
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
@@ -36,7 +36,7 @@ jobs:
|
||||
- uses: codecov/codecov-action@v3
|
||||
with:
|
||||
file: ./coverage.txt
|
||||
fail_ci_if_error: true
|
||||
fail_ci_if_error: false
|
||||
if: env.GIT_DIFF
|
||||
|
||||
test-importer:
|
||||
@@ -81,6 +81,53 @@ jobs:
|
||||
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:
|
||||
|
||||
@@ -50,6 +50,7 @@ coverage.txt
|
||||
sim_log_file
|
||||
tests/**/tmp/*
|
||||
yarn.lock
|
||||
x/auction/client/testutil/bidder-bafyre*
|
||||
|
||||
# Vagrant
|
||||
.vagrant/
|
||||
|
||||
@@ -19,6 +19,9 @@ test/
|
||||
tests/
|
||||
*_test.go
|
||||
|
||||
# false positive; TODO: https://github.com/cerc-io/laconicd/issues/104
|
||||
testutil/network/network.go
|
||||
|
||||
# Semgrep rules folder
|
||||
.semgrep
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ RUN make build
|
||||
FROM alpine:3.17.0
|
||||
|
||||
# Install ca-certificates
|
||||
RUN apk add --update ca-certificates jq
|
||||
RUN apk add --update ca-certificates jq curl
|
||||
WORKDIR /
|
||||
|
||||
# Copy over binaries from the build-env
|
||||
|
||||
@@ -15,6 +15,14 @@ The Source of Proof. Laconic is a next generation data availability & verifiabil
|
||||
make install
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
To quickly get started with a single node fixture, run:
|
||||
|
||||
```bash
|
||||
./init.sh
|
||||
```
|
||||
|
||||
## Community
|
||||
|
||||
The following chat channels and forums are a great spot to ask questions about Ethermint:
|
||||
|
||||
-62
@@ -1,62 +0,0 @@
|
||||
# Security
|
||||
|
||||
As part of our vulnerability disclosure policy, we operate a security vulnerability program through [Immunefi](https://immunefi.com/). This document serves as a complementary guideline for reporting vulnerabilities and how the disclosure process is managed. Please refer to the official Evmos [bug bounty program](https://immunefi.com/bounty/evmos/) for up-to-date information.
|
||||
|
||||
## Guidelines
|
||||
|
||||
We require that all researchers:
|
||||
|
||||
- Use the Evmos [bug bounty program](https://immunefi.com/bounty/evmos/) on Immunefi to disclose all vulnerabilities, and avoid posting vulnerability information in public places, including GitHub, Discord, Telegram, Twitter or other non-private channels.
|
||||
- Make every effort to avoid privacy violations, degradation of user experience, disruption to production systems, and destruction of data.
|
||||
- Keep any information about vulnerabilities that you’ve discovered confidential between yourself and the engineering team until the issue has been resolved and disclosed
|
||||
- Avoid posting personally identifiable information, privately or publicly
|
||||
|
||||
If you follow these guidelines when reporting an issue to us, we commit to:
|
||||
|
||||
- Not pursue or support any legal action related to your research on this vulnerability
|
||||
- Work with you to understand, resolve and ultimately disclose the issue in a timely fashion
|
||||
|
||||
## Disclosure Process
|
||||
|
||||
Evmos uses the following disclosure process:
|
||||
|
||||
1. Once a security report is received via the Immunefi Bug Bounty program, the team works to verify the issue and confirm its severity level using [CVSS](https://nvd.nist.gov/vuln-metrics/cvss) or [Immunefi’s Vulnerability Severity Classification System v2.2](https://immunefi.com/immunefi-vulnerability-severity-classification-system-v2-2/).
|
||||
1. Two people from the affected project will review, replicate and acknowledge the report within 48-96 hours of the alert according to the table below:
|
||||
| Security Level | Hours to First Response (ACK) from Escalation |
|
||||
| -------------------- | --------------------------------------------- |
|
||||
| Critical | 48 |
|
||||
| High | 96 |
|
||||
| Medium | 96 |
|
||||
| Low or Informational | 96 |
|
||||
| None | 96 |
|
||||
|
||||
2. If the report is not applicable or reproducible, the Security Lead (or Security Secondary) will revert to the reporter to request more info or close the report.
|
||||
3. The report is confirmed by the Security Lead to the reporter.
|
||||
2. The team determines the vulnerability’s potential impact on Evmos.
|
||||
1. Vulnerabilities with `Informational` and `Low` categorization will result in creating a public issue.
|
||||
2. Vulnerabilities with `Medium` categorization will result in the creation of an internal ticket and patch of the code.
|
||||
3. Vulnerabilities with `High` or `Critical` will result in the [creation of a new Security Advisory](https://docs.github.com/en/code-security/repository-security-advisories/creating-a-repository-security-advisory)
|
||||
|
||||
Once the vulnerability severity is defined, the following steps apply:
|
||||
|
||||
- For `High` and `Critical`:
|
||||
1. Patches are prepared for supported releases of Evmos in a [temporary private fork](https://docs.github.com/en/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability) of the repository.
|
||||
2. Only relevant parties will be notified about an upcoming upgrade. These being validators, the core developer team, and users directly affected by the vulnerability.
|
||||
3. 24 hours following this notification, relevant releases with the patch will be made public.
|
||||
4. The nodes and validators update their Evmos and Ethermint dependencies to use these releases.
|
||||
5. A week (or less) after the security vulnerability has been patched on Evmos, we will disclose that the mentioned release contained a security fix.
|
||||
6. After an additional 2 weeks, we will publish a public announcement of the vulnerability. We also publish a security Advisory on GitHub and publish a [CVE](https://en.wikipedia.org/wiki/Common_Vulnerabilities_and_Exposures)
|
||||
|
||||
- For `Informational` , `Low` and `Medium` severities:
|
||||
1. `Medium` and `Low` severity bug reports are included in a public issue and will be incorporated in the current sprint and patched in the next release. `Informational` reports are additionally categorized as with low or medium priority and might not be included in the next release.
|
||||
2. One week after the releases go out, we will publish a post with further details on the vulnerability as well as our response to it.
|
||||
|
||||
This process can take some time. Every effort will be made to handle the bug in as timely a manner as possible, however, it's important that we follow the process described above to ensure that disclosures are handled consistently and to keep Ethermint and its downstream dependent projects, including but not limited to Evmos, as secure as possible.
|
||||
|
||||
### Payment Process
|
||||
|
||||
The payment process will be executed according to Evmos’s Immunefi Bug Bounty program Rules.
|
||||
|
||||
### Contact
|
||||
|
||||
The Evmos Security Team is constantly being monitored. If you need to reach out to the team directly, please reach out via email: [security@evmos.org](mailto:security@evmos.org)
|
||||
+1
-1
@@ -77,7 +77,7 @@ func SetupWithDB(isCheckTx bool, patchGenesis func(*EthermintApp, simapp.Genesis
|
||||
// Initialize the chain
|
||||
app.InitChain(
|
||||
abci.RequestInitChain{
|
||||
ChainId: "ethermint_9000-1",
|
||||
ChainId: "laconic_9000-1",
|
||||
Validators: []abci.ValidatorUpdate{},
|
||||
ConsensusParams: DefaultConsensusParams,
|
||||
AppStateBytes: stateBytes,
|
||||
|
||||
+98
-48
@@ -2,6 +2,7 @@ package eip712
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"math/big"
|
||||
@@ -9,17 +10,15 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
sdkmath "cosmossdk.io/math"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
"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/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/math"
|
||||
"github.com/ethereum/go-ethereum/signer/core/apitypes"
|
||||
@@ -34,24 +33,6 @@ func WrapTxToTypedData(
|
||||
data []byte,
|
||||
feeDelegation *FeeDelegationOptions,
|
||||
) (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{
|
||||
Name: "Cosmos Web3",
|
||||
@@ -66,22 +47,13 @@ func WrapTxToTypedData(
|
||||
return apitypes.TypedData{}, err
|
||||
}
|
||||
|
||||
if msgTypes["TypePayloadRecord"] != nil {
|
||||
msgTypes["TypePayloadRecord"] = []apitypes.Type{
|
||||
{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"},
|
||||
}
|
||||
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 msgTypes["TypePayloadRecordAttributes"] != nil {
|
||||
msgTypes["TypePayloadRecordAttributes"] = []apitypes.Type{
|
||||
{Name: "type_url", Type: "string"},
|
||||
{Name: "value", Type: "uint8[]"},
|
||||
}
|
||||
delete(msgTypes, "TypePayloadRecordAttributesValue")
|
||||
|
||||
if err := patchTxData(txData, msgTypes, "Tx"); err != nil {
|
||||
return apitypes.TypedData{}, errorsmod.Wrap(errortypes.ErrJSONUnmarshal, "failed to patch JSON data")
|
||||
}
|
||||
|
||||
if feeDelegation != nil {
|
||||
@@ -320,10 +292,15 @@ func traverseFields(
|
||||
ethTyp := typToEth(fieldType)
|
||||
if len(ethTyp) > 0 {
|
||||
// Support array of uint64
|
||||
if isCollection && fieldType.Kind() != reflect.Slice && fieldType.Kind() != reflect.Array {
|
||||
ethTyp += "[]"
|
||||
if isCollection {
|
||||
if fieldType.Kind() != reflect.Slice && fieldType.Kind() != reflect.Array {
|
||||
ethTyp += "[]"
|
||||
}
|
||||
// convert uint8[] to bytes
|
||||
if fieldType.Kind() == reflect.Uint8 {
|
||||
ethTyp = "bytes"
|
||||
}
|
||||
}
|
||||
|
||||
if prefix == typeDefPrefix {
|
||||
typeMap[rootType] = append(typeMap[rootType], apitypes.Type{
|
||||
Name: fieldName,
|
||||
@@ -466,14 +443,13 @@ func typToEth(typ reflect.Type) string {
|
||||
return "uint32"
|
||||
case reflect.Uint64:
|
||||
return "uint64"
|
||||
case reflect.Slice:
|
||||
ethName := typToEth(typ.Elem())
|
||||
if len(ethName) > 0 {
|
||||
return ethName + "[]"
|
||||
}
|
||||
case reflect.Array:
|
||||
case reflect.Slice | reflect.Array:
|
||||
// Note: this case may never be reached due to previous handling in traverseFields
|
||||
ethName := typToEth(typ.Elem())
|
||||
if len(ethName) > 0 {
|
||||
if ethName == "uint8" {
|
||||
return "bytes"
|
||||
}
|
||||
return ethName + "[]"
|
||||
}
|
||||
case reflect.Ptr:
|
||||
@@ -510,3 +486,77 @@ func doRecover(err *error) {
|
||||
*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]
|
||||
if 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
|
||||
}
|
||||
}
|
||||
|
||||
} else if 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
|
||||
}
|
||||
} else {
|
||||
converted, err := handleConversion(encType, encValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
data[field.Name] = converted
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func handleConversion(encType string, encValue any) (any, error) {
|
||||
switch encType {
|
||||
case "bytes":
|
||||
// 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)
|
||||
}
|
||||
|
||||
@@ -4,28 +4,25 @@ import (
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/math"
|
||||
|
||||
"github.com/cerc-io/laconicd/ethereum/eip712"
|
||||
registrytypes "github.com/cerc-io/laconicd/x/registry/types"
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"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"
|
||||
"github.com/cosmos/cosmos-sdk/simapp/params"
|
||||
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"
|
||||
"github.com/cosmos/cosmos-sdk/types/tx/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"
|
||||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
|
||||
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"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
|
||||
@@ -332,6 +329,54 @@ func (suite *EIP712TestSuite) TestEIP712SignatureVerification() {
|
||||
sequence: 78,
|
||||
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: ®istrytypes.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 {
|
||||
|
||||
@@ -18,6 +18,7 @@ require (
|
||||
github.com/deckarep/golang-set v1.8.0
|
||||
github.com/ethereum/go-ethereum v1.10.26
|
||||
github.com/gibson042/canonicaljson-go v1.0.3
|
||||
github.com/go-chi/chi/v5 v5.0.7
|
||||
github.com/gogo/protobuf v1.3.3
|
||||
github.com/golang/protobuf v1.5.2
|
||||
github.com/gorilla/mux v1.8.0
|
||||
@@ -26,10 +27,8 @@ require (
|
||||
github.com/holiman/uint256 v1.2.1
|
||||
github.com/improbable-eng/grpc-web v0.15.0
|
||||
github.com/ipfs/go-cid v0.3.2
|
||||
github.com/ipfs/go-ipld-cbor v0.0.6
|
||||
github.com/ipld/go-ipld-prime v0.18.0
|
||||
github.com/ipld/go-ipld-prime v0.19.0
|
||||
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/gomega v1.24.1
|
||||
github.com/pkg/errors v0.9.1
|
||||
@@ -44,8 +43,8 @@ require (
|
||||
github.com/tendermint/tm-db v0.6.7
|
||||
github.com/tyler-smith/go-bip39 v1.1.0
|
||||
github.com/vektah/gqlparser/v2 v2.5.1
|
||||
golang.org/x/net v0.4.0
|
||||
golang.org/x/text v0.5.0
|
||||
golang.org/x/net v0.7.0
|
||||
golang.org/x/text v0.7.0
|
||||
google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c
|
||||
google.golang.org/grpc v1.51.0
|
||||
google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8
|
||||
@@ -66,7 +65,7 @@ require (
|
||||
github.com/VictoriaMetrics/fastcache v1.6.0 // indirect
|
||||
github.com/Workiva/go-datastructures v1.0.53 // indirect
|
||||
github.com/agnivade/levenshtein v1.1.1 // indirect
|
||||
github.com/aws/aws-sdk-go v1.40.45 // indirect
|
||||
github.com/aws/aws-sdk-go v1.44.122 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
|
||||
github.com/bgentry/speakeasy v0.1.0 // indirect
|
||||
@@ -122,7 +121,7 @@ require (
|
||||
github.com/gtank/merlin v0.1.1 // indirect
|
||||
github.com/gtank/ristretto255 v0.1.2 // indirect
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
||||
github.com/hashicorp/go-getter v1.6.1 // indirect
|
||||
github.com/hashicorp/go-getter v1.7.0 // indirect
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
|
||||
github.com/hashicorp/go-safetemp v1.0.0 // indirect
|
||||
github.com/hashicorp/go-version v1.6.0 // indirect
|
||||
@@ -132,9 +131,6 @@ require (
|
||||
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
|
||||
github.com/huin/goupnp v1.0.3 // 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/jmespath/go-jmespath v0.4.0 // indirect
|
||||
github.com/jmhodges/levigo v1.0.0 // indirect
|
||||
@@ -153,13 +149,14 @@ require (
|
||||
github.com/minio/highwayhash v1.0.2 // indirect
|
||||
github.com/minio/sha256-simd v1.0.0 // indirect
|
||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||
github.com/mitchellh/go-testing-interface v1.0.0 // indirect
|
||||
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/mr-tron/base58 v1.2.0 // indirect
|
||||
github.com/mtibben/percent v0.2.1 // indirect
|
||||
github.com/multiformats/go-base32 v0.0.3 // indirect
|
||||
github.com/multiformats/go-base36 v0.1.0 // 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/olekukonko/tablewriter v0.0.5 // indirect
|
||||
github.com/pelletier/go-toml v1.9.5 // indirect
|
||||
@@ -190,18 +187,17 @@ require (
|
||||
github.com/tendermint/go-amino v0.16.0 // indirect
|
||||
github.com/tklauser/go-sysconf v0.3.10 // indirect
|
||||
github.com/tklauser/numcpus v0.4.0 // indirect
|
||||
github.com/ulikunitz/xz v0.5.8 // indirect
|
||||
github.com/whyrusleeping/cbor-gen v0.0.0-20200123233031-1cdf64d27158 // indirect
|
||||
github.com/ulikunitz/xz v0.5.10 // indirect
|
||||
github.com/zondax/hid v0.9.1 // indirect
|
||||
github.com/zondax/ledger-go v0.14.0 // indirect
|
||||
go.etcd.io/bbolt v1.3.6 // indirect
|
||||
go.opencensus.io v0.24.0 // indirect
|
||||
golang.org/x/crypto v0.4.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
|
||||
golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect
|
||||
golang.org/x/oauth2 v0.1.0 // indirect
|
||||
golang.org/x/sync v0.1.0 // indirect
|
||||
golang.org/x/sys v0.3.0 // indirect
|
||||
golang.org/x/term v0.3.0 // indirect
|
||||
golang.org/x/sys v0.5.0 // indirect
|
||||
golang.org/x/term v0.5.0 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
|
||||
google.golang.org/api v0.103.0 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
|
||||
@@ -19,36 +19,177 @@ 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.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.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/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.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.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.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/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/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/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.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/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/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.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.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.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.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.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/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=
|
||||
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=
|
||||
@@ -133,10 +274,9 @@ 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/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-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.40.45 h1:QN1nsY27ssD/JmW4s83qmSb+uL6DG4GmCDzjmJB4xUI=
|
||||
github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q=
|
||||
github.com/aws/aws-sdk-go v1.44.122 h1:p6mw01WBaNpbdP2xrisz5tIkcNwzj/HysobNoaAHjgo=
|
||||
github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo=
|
||||
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/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y=
|
||||
@@ -213,6 +353,12 @@ 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-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-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/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw=
|
||||
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
|
||||
@@ -330,6 +476,10 @@ 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.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.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/ethereum/go-ethereum v1.10.4/go.mod h1:nEE0TP5MtxGzOMd7egIrbPJMQBnhVU3ELNxhBglIzhg=
|
||||
github.com/ethereum/go-ethereum v1.10.17/go.mod h1:Lt5WzjM07XlXc95YzrhosmR4J9Ahd6X2wyEV2SvGhk0=
|
||||
@@ -367,6 +517,8 @@ github.com/gin-gonic/gin v1.7.0/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjX
|
||||
github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE=
|
||||
github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24=
|
||||
github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs=
|
||||
github.com/go-chi/chi/v5 v5.0.7 h1:rDTPXLDHGATaeHvVlLcR4Qe0zftYethFucbjVQ1PxU8=
|
||||
github.com/go-chi/chi/v5 v5.0.7/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
@@ -438,7 +590,9 @@ 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.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.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
|
||||
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.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
@@ -455,6 +609,7 @@ 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.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
||||
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/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
@@ -479,6 +634,9 @@ 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.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.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/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI=
|
||||
@@ -490,6 +648,7 @@ 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.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/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=
|
||||
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/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
@@ -502,6 +661,11 @@ 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-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-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/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=
|
||||
@@ -510,12 +674,22 @@ 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.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
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/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.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/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/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
||||
@@ -549,8 +723,6 @@ 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/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc=
|
||||
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/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
@@ -560,8 +732,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.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
|
||||
github.com/hashicorp/go-getter v1.6.1 h1:NASsgP4q6tL94WH6nJxKWj8As2H/2kop/bB1d8JMyRY=
|
||||
github.com/hashicorp/go-getter v1.6.1/go.mod h1:IZCrswsZPeWv9IkVnLElzRU/gz/QPi6pZHn4tv6vbwA=
|
||||
github.com/hashicorp/go-getter v1.7.0 h1:bzrYP+qu/gMrL1au7/aDvkoOVGUJpeKBgbqRHACAFDY=
|
||||
github.com/hashicorp/go-getter v1.7.0/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744=
|
||||
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/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
@@ -576,7 +748,6 @@ 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.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE=
|
||||
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.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek=
|
||||
github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
||||
@@ -625,20 +796,10 @@ 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/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/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/go.mod h1:gQ8pKqT/sUxGY+tIwy1RPpAojYu7jAyCp5Tz1svoupw=
|
||||
github.com/ipfs/go-ipfs-util v0.0.1 h1:Wz9bL2wB2YBJqggkA4dD7oSmqB4cAnpNbGrlHJulv50=
|
||||
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/ipld/go-ipld-prime v0.19.0 h1:5axC7rJmPc17Emw6TelxGwnzALk0PdupZ2oj2roDj04=
|
||||
github.com/ipld/go-ipld-prime v0.19.0/go.mod h1:Q9j3BaVXwaA3o5JUDNvptDDr/x8+F7FG6XJ8WI3ILg4=
|
||||
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/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc=
|
||||
@@ -646,7 +807,6 @@ 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 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/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.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
|
||||
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
|
||||
@@ -668,7 +828,6 @@ 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.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/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/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||
@@ -685,7 +844,6 @@ 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/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.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.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
|
||||
github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c=
|
||||
@@ -768,19 +926,17 @@ 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-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94=
|
||||
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/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/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM=
|
||||
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.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
||||
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.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/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
|
||||
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
@@ -800,7 +956,6 @@ 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/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.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/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc=
|
||||
github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg=
|
||||
@@ -810,14 +965,11 @@ 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-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4=
|
||||
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/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc=
|
||||
github.com/multiformats/go-multicodec v0.5.0 h1:EgU6cBe/D7WRwQb1KmnBvU7lrcFGMggZVTPtOW9dDHs=
|
||||
github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U=
|
||||
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-multicodec v0.6.0 h1:KhH2kSuCARyuJraYMFxrNO3DqIaYhOdS039kbhgVwpE=
|
||||
github.com/multiformats/go-multihash v0.2.1 h1:aem8ZT0VA2nCHHk7bPJ1BjUbHNciqZC/d16Vve9l108=
|
||||
github.com/multiformats/go-multihash v0.2.1/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/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
@@ -899,7 +1051,6 @@ 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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
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/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o=
|
||||
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
|
||||
@@ -992,7 +1143,6 @@ github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic
|
||||
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/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/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
||||
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
|
||||
@@ -1083,8 +1233,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 v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
|
||||
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
|
||||
github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ=
|
||||
github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
|
||||
github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8=
|
||||
github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
|
||||
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/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
|
||||
@@ -1098,10 +1248,7 @@ 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/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/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/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/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
|
||||
github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg=
|
||||
@@ -1132,8 +1279,10 @@ 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.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
|
||||
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/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.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
|
||||
@@ -1147,12 +1296,10 @@ 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-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-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-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-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-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
@@ -1200,6 +1347,7 @@ 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-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-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-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
|
||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
||||
@@ -1262,17 +1410,27 @@ 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-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-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-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-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-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-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.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU=
|
||||
golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
|
||||
golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
|
||||
golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
|
||||
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-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
@@ -1282,10 +1440,23 @@ 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-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-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-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-20221014153046-6fdb5e3db783 h1:nt+Q6cXKz4MosCSpnbMtqiQ8Oz0pxTef2B4Vca2lvfk=
|
||||
golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
|
||||
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.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-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@@ -1297,7 +1468,9 @@ 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-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-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-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
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/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
@@ -1311,7 +1484,6 @@ 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-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-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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@@ -1364,37 +1536,60 @@ 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-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-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-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-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-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-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-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-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-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-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-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-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-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-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-20220517195934-5e4e11fc645e/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-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-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-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-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
|
||||
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
|
||||
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-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.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI=
|
||||
golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
|
||||
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY=
|
||||
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.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
@@ -1405,8 +1600,9 @@ 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.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
|
||||
golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM=
|
||||
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
|
||||
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-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
@@ -1472,6 +1668,10 @@ 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-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
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.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
@@ -1480,6 +1680,9 @@ 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-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-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/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
|
||||
gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
|
||||
@@ -1508,6 +1711,35 @@ 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.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE=
|
||||
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/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
@@ -1562,7 +1794,73 @@ 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-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-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-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/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg=
|
||||
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
|
||||
@@ -1589,8 +1887,27 @@ 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.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.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/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-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
||||
@@ -1603,7 +1920,9 @@ 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.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.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.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/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
# Reference to another record.
|
||||
type Reference {
|
||||
id: String! # ID of linked record.
|
||||
}
|
||||
|
||||
# Reference to another record.
|
||||
input ReferenceInput {
|
||||
id: String!
|
||||
}
|
||||
scalar Link
|
||||
|
||||
# Bonds contain funds that are used to pay rent on record registration and renewal.
|
||||
type Bond {
|
||||
@@ -37,44 +30,71 @@ type Account {
|
||||
balance: [Coin!] # Current balance for each coin type.
|
||||
}
|
||||
|
||||
# Value of a given type.
|
||||
type Value {
|
||||
null: Boolean
|
||||
# Value describes a DAG-JSON compatible value.
|
||||
union Value =
|
||||
BooleanValue
|
||||
| IntValue
|
||||
| FloatValue
|
||||
| StringValue
|
||||
| BytesValue
|
||||
| LinkValue
|
||||
| ArrayValue
|
||||
| MapValue
|
||||
|
||||
int: Int
|
||||
float: Float
|
||||
string: String
|
||||
boolean: Boolean
|
||||
json: String
|
||||
|
||||
reference: Reference
|
||||
|
||||
values: [Value]
|
||||
type BooleanValue {
|
||||
value: Boolean!
|
||||
}
|
||||
# Value of a given type used as input to queries.
|
||||
input ValueInput {
|
||||
null: Boolean
|
||||
|
||||
int: Int
|
||||
float: Float
|
||||
string: String
|
||||
boolean: Boolean
|
||||
type IntValue {
|
||||
value: Int!
|
||||
}
|
||||
|
||||
reference: ReferenceInput
|
||||
type FloatValue {
|
||||
value: Float!
|
||||
}
|
||||
|
||||
values: [ValueInput]
|
||||
type StringValue {
|
||||
value: String!
|
||||
}
|
||||
|
||||
type BytesValue {
|
||||
value: String!
|
||||
}
|
||||
|
||||
type ArrayValue {
|
||||
value: [Value]!
|
||||
}
|
||||
|
||||
type LinkValue {
|
||||
value: Link!
|
||||
}
|
||||
|
||||
type MapValue {
|
||||
value: [Attribute!]!
|
||||
}
|
||||
|
||||
# Key/value pair.
|
||||
type KeyValue {
|
||||
type Attribute {
|
||||
key: String!
|
||||
value: Value!
|
||||
value: Value
|
||||
}
|
||||
|
||||
# Value of a given type used as input to queries.
|
||||
# Note: GQL doesn't allow union input types.
|
||||
input ValueInput {
|
||||
int: Int
|
||||
float: Float
|
||||
string: String
|
||||
boolean: Boolean
|
||||
link: Link
|
||||
array: [ValueInput]
|
||||
map: [KeyValueInput!]
|
||||
}
|
||||
|
||||
# Key/value pair for inputs.
|
||||
input KeyValueInput {
|
||||
key: String!
|
||||
value: ValueInput!
|
||||
value: ValueInput
|
||||
}
|
||||
|
||||
# Status information about a node (https://docs.tendermint.com/master/rpc/#/Info/status).
|
||||
@@ -155,7 +175,7 @@ type Record {
|
||||
createTime: String! # Record create time.
|
||||
expiryTime: String! # Record expiry time.
|
||||
owners: [String!] # Addresses of record owners.
|
||||
attributes: [KeyValue] # Record attributes.
|
||||
attributes: [Attribute!] # Record attributes.
|
||||
references: [Record] # Record references.
|
||||
}
|
||||
|
||||
@@ -195,7 +215,7 @@ type Query {
|
||||
getBondsByIds(ids: [String!]): [Bond]
|
||||
|
||||
# Query bonds.
|
||||
queryBonds(attributes: [KeyValueInput]): [Bond]
|
||||
queryBonds(attributes: [KeyValueInput!]): [Bond]
|
||||
|
||||
# Query bonds by owner.
|
||||
queryBondsByOwner(ownerAddresses: [String!]): [OwnerBonds]
|
||||
@@ -210,7 +230,7 @@ type Query {
|
||||
# Query records.
|
||||
queryRecords(
|
||||
# Multiple attribute conditions are in a logical AND.
|
||||
attributes: [KeyValueInput]
|
||||
attributes: [KeyValueInput!]
|
||||
|
||||
# Whether to query all records, not just named ones (false by default).
|
||||
all: Boolean
|
||||
+6074
-3788
File diff suppressed because it is too large
Load Diff
+5
-2
@@ -1,5 +1,3 @@
|
||||
# .gqlgen.yml example
|
||||
#
|
||||
# Refer to https://gqlgen.com/config/
|
||||
# for detailed .gqlgen.yml documentation.
|
||||
|
||||
@@ -12,3 +10,8 @@ model:
|
||||
resolver:
|
||||
filename: resolver.go
|
||||
type: Resolver
|
||||
|
||||
models:
|
||||
Link:
|
||||
model:
|
||||
- github.com/cerc-io/laconicd/gql.Link
|
||||
|
||||
+165
@@ -0,0 +1,165 @@
|
||||
package gql
|
||||
|
||||
import (
|
||||
"html/template"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// GraphiQL is an in-browser IDE for exploring GraphiQL APIs.
|
||||
// This handler returns GraphiQL when requested.
|
||||
//
|
||||
// For more information, see https://github.com/graphql/graphiql.
|
||||
|
||||
func PlaygroundHandler(apiURL string) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method != "GET" {
|
||||
http.Error(w, "only GET requests are supported", http.StatusMethodNotAllowed)
|
||||
return
|
||||
}
|
||||
w.Header().Set("Content-Type", "text/html")
|
||||
err := page.Execute(w, map[string]interface{}{
|
||||
"apiURL": apiURL,
|
||||
})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// https://github.com/graphql/graphiql/blob/main/examples/graphiql-cdn/index.html
|
||||
var page = template.Must(template.New("graphiql").Parse(`
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>GraphiQL</title>
|
||||
<style>
|
||||
body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#graphiql {
|
||||
height: 100vh;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!--
|
||||
This GraphiQL example depends on Promise and fetch, which are available in
|
||||
modern browsers, but can be "polyfilled" for older browsers.
|
||||
GraphiQL itself depends on React DOM.
|
||||
If you do not want to rely on a CDN, you can host these files locally or
|
||||
include them directly in your favored resource bundler.
|
||||
-->
|
||||
<script
|
||||
src="https://unpkg.com/react@17/umd/react.development.js"
|
||||
integrity="sha512-Vf2xGDzpqUOEIKO+X2rgTLWPY+65++WPwCHkX2nFMu9IcstumPsf/uKKRd5prX3wOu8Q0GBylRpsDB26R6ExOg=="
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
<script
|
||||
src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"
|
||||
integrity="sha512-Wr9OKCTtq1anK0hq5bY3X/AvDI5EflDSAh0mE9gma+4hl+kXdTJPKZ3TwLMBcrgUeoY0s3dq9JjhCQc7vddtFg=="
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
|
||||
<!--
|
||||
These two files can be found in the npm module, however you may wish to
|
||||
copy them directly into your environment, or perhaps include them in your
|
||||
favored resource bundler.
|
||||
-->
|
||||
<link rel="stylesheet" href="https://unpkg.com/graphiql/graphiql.min.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="graphiql">Loading...</div>
|
||||
<script
|
||||
src="https://unpkg.com/graphiql/graphiql.min.js"
|
||||
type="application/javascript"
|
||||
></script>
|
||||
<script>
|
||||
// https://github.com/graphql/graphiql/blob/main/packages/graphiql/resources/renderExample.js
|
||||
|
||||
// Parse the search string to get url parameters.
|
||||
var search = window.location.search;
|
||||
var parameters = {};
|
||||
search
|
||||
.substr(1)
|
||||
.split('&')
|
||||
.forEach(function (entry) {
|
||||
var eq = entry.indexOf('=');
|
||||
if (eq >= 0) {
|
||||
parameters[decodeURIComponent(entry.slice(0, eq))] = decodeURIComponent(
|
||||
entry.slice(eq + 1),
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
// When the query and variables string is edited, update the URL bar so
|
||||
// that it can be easily shared.
|
||||
function onEditQuery(newQuery) {
|
||||
parameters.query = newQuery;
|
||||
updateURL();
|
||||
}
|
||||
|
||||
function onEditVariables(newVariables) {
|
||||
parameters.variables = newVariables;
|
||||
updateURL();
|
||||
}
|
||||
|
||||
function onEditHeaders(newHeaders) {
|
||||
parameters.headers = newHeaders;
|
||||
updateURL();
|
||||
}
|
||||
|
||||
function onTabChange(tabsState) {
|
||||
const activeTab = tabsState.tabs[tabsState.activeTabIndex];
|
||||
parameters.query = activeTab.query;
|
||||
parameters.variables = activeTab.variables;
|
||||
parameters.headers = activeTab.headers;
|
||||
updateURL();
|
||||
}
|
||||
|
||||
function updateURL() {
|
||||
var newSearch =
|
||||
'?' +
|
||||
Object.keys(parameters)
|
||||
.filter(function (key) {
|
||||
return Boolean(parameters[key]);
|
||||
})
|
||||
.map(function (key) {
|
||||
return (
|
||||
encodeURIComponent(key) + '=' + encodeURIComponent(parameters[key])
|
||||
);
|
||||
})
|
||||
.join('&');
|
||||
history.replaceState(null, null, newSearch);
|
||||
}
|
||||
|
||||
// Render <GraphiQL /> into the body.
|
||||
// See the README in the top level of this module to learn more about
|
||||
// how you can customize GraphiQL by providing different values or
|
||||
// additional child elements.
|
||||
ReactDOM.render(
|
||||
React.createElement(GraphiQL, {
|
||||
fetcher: GraphiQL.createFetcher({
|
||||
url: {{.apiURL}}
|
||||
}),
|
||||
query: parameters.query,
|
||||
variables: parameters.variables,
|
||||
headers: parameters.headers,
|
||||
defaultHeaders: parameters.defaultHeaders,
|
||||
onEditQuery: onEditQuery,
|
||||
onEditVariables: onEditVariables,
|
||||
onEditHeaders: onEditHeaders,
|
||||
defaultEditorToolsVisibility: true,
|
||||
isHeadersEditorEnabled: true,
|
||||
shouldPersistHeaders: true,
|
||||
onTabChange,
|
||||
}),
|
||||
document.getElementById('graphiql'),
|
||||
);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
`))
|
||||
+70
-37
@@ -2,6 +2,10 @@
|
||||
|
||||
package gql
|
||||
|
||||
type Value interface {
|
||||
IsValue()
|
||||
}
|
||||
|
||||
type Account struct {
|
||||
Address string `json:"address"`
|
||||
PubKey *string `json:"pubKey"`
|
||||
@@ -10,6 +14,17 @@ type Account struct {
|
||||
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 {
|
||||
ID string `json:"id"`
|
||||
Status string `json:"status"`
|
||||
@@ -53,21 +68,52 @@ type Bond struct {
|
||||
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 string `json:"type"`
|
||||
Quantity string `json:"quantity"`
|
||||
}
|
||||
|
||||
type KeyValue struct {
|
||||
Key string `json:"key"`
|
||||
Value *Value `json:"value"`
|
||||
type FloatValue struct {
|
||||
Value float64 `json:"value"`
|
||||
}
|
||||
|
||||
func (FloatValue) IsValue() {}
|
||||
|
||||
type IntValue struct {
|
||||
Value int `json:"value"`
|
||||
}
|
||||
|
||||
func (IntValue) IsValue() {}
|
||||
|
||||
type KeyValueInput struct {
|
||||
Key string `json:"key"`
|
||||
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 {
|
||||
Latest *NameRecordEntry `json:"latest"`
|
||||
History []*NameRecordEntry `json:"history"`
|
||||
@@ -96,22 +142,14 @@ type PeerInfo struct {
|
||||
}
|
||||
|
||||
type Record struct {
|
||||
ID string `json:"id"`
|
||||
Names []string `json:"names"`
|
||||
BondID string `json:"bondId"`
|
||||
CreateTime string `json:"createTime"`
|
||||
ExpiryTime string `json:"expiryTime"`
|
||||
Owners []string `json:"owners"`
|
||||
Attributes []*KeyValue `json:"attributes"`
|
||||
References []*Record `json:"references"`
|
||||
}
|
||||
|
||||
type Reference struct {
|
||||
ID string `json:"id"`
|
||||
}
|
||||
|
||||
type ReferenceInput struct {
|
||||
ID string `json:"id"`
|
||||
ID string `json:"id"`
|
||||
Names []string `json:"names"`
|
||||
BondID string `json:"bondId"`
|
||||
CreateTime string `json:"createTime"`
|
||||
ExpiryTime string `json:"expiryTime"`
|
||||
Owners []string `json:"owners"`
|
||||
Attributes []*Attribute `json:"attributes"`
|
||||
References []*Record `json:"references"`
|
||||
}
|
||||
|
||||
type Status struct {
|
||||
@@ -125,6 +163,12 @@ type Status struct {
|
||||
DiskUsage string `json:"disk_usage"`
|
||||
}
|
||||
|
||||
type StringValue struct {
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
func (StringValue) IsValue() {}
|
||||
|
||||
type SyncInfo struct {
|
||||
LatestBlockHash string `json:"latest_block_hash"`
|
||||
LatestBlockHeight string `json:"latest_block_height"`
|
||||
@@ -138,23 +182,12 @@ type ValidatorInfo struct {
|
||||
ProposerPriority *string `json:"proposer_priority"`
|
||||
}
|
||||
|
||||
type Value struct {
|
||||
Null *bool `json:"null"`
|
||||
Int *int `json:"int"`
|
||||
Float *float64 `json:"float"`
|
||||
String *string `json:"string"`
|
||||
Boolean *bool `json:"boolean"`
|
||||
JSON *string `json:"json"`
|
||||
Reference *Reference `json:"reference"`
|
||||
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"`
|
||||
Int *int `json:"int"`
|
||||
Float *float64 `json:"float"`
|
||||
String *string `json:"string"`
|
||||
Boolean *bool `json:"boolean"`
|
||||
Link *Link `json:"link"`
|
||||
Array []*ValueInput `json:"array"`
|
||||
Map []*KeyValueInput `json:"map"`
|
||||
}
|
||||
|
||||
+1
-1
@@ -121,7 +121,7 @@ func (q queryResolver) QueryRecords(ctx context.Context, attributes []*KeyValueI
|
||||
res, err := nsQueryClient.ListRecords(
|
||||
context.Background(),
|
||||
®istrytypes.QueryListRecordsRequest{
|
||||
Attributes: parseRequestAttributes(attributes),
|
||||
Attributes: toRpcAttributes(attributes),
|
||||
All: (all != nil && *all),
|
||||
},
|
||||
)
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
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)
|
||||
}
|
||||
+18
-7
@@ -5,9 +5,10 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/99designs/gqlgen/graphql/handler"
|
||||
"github.com/99designs/gqlgen/graphql/playground"
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/rs/cors"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
@@ -16,6 +17,16 @@ func Server(ctx client.Context) {
|
||||
if !viper.GetBool("gql-server") {
|
||||
return
|
||||
}
|
||||
|
||||
router := chi.NewRouter()
|
||||
|
||||
// Add CORS middleware around every request
|
||||
// See https://github.com/rs/cors for full option listing
|
||||
router.Use(cors.New(cors.Options{
|
||||
AllowedOrigins: []string{"*"},
|
||||
Debug: false,
|
||||
}).Handler)
|
||||
|
||||
logFile := viper.GetString("log-file")
|
||||
|
||||
port := viper.GetString("gql-port")
|
||||
@@ -25,20 +36,20 @@ func Server(ctx client.Context) {
|
||||
logFile: logFile,
|
||||
}}))
|
||||
|
||||
http.Handle("/", playground.Handler("GraphQL playground", "/api"))
|
||||
router.Handle("/", PlaygroundHandler("/api"))
|
||||
|
||||
if viper.GetBool("gql-playground") {
|
||||
apiBase := viper.GetString("gql-playground-api-base")
|
||||
|
||||
http.Handle("/webui", playground.Handler("GraphQL playground", apiBase+"/api"))
|
||||
http.Handle("/console", playground.Handler("GraphQL playground", apiBase+"/graphql"))
|
||||
router.Handle("/webui", PlaygroundHandler(apiBase+"/api"))
|
||||
router.Handle("/console", PlaygroundHandler(apiBase+"/graphql"))
|
||||
}
|
||||
|
||||
http.Handle("/api", srv)
|
||||
http.Handle("/graphql", srv)
|
||||
router.Handle("/api", srv)
|
||||
router.Handle("/graphql", srv)
|
||||
|
||||
log.Info("Connect to GraphQL playground", "url", fmt.Sprintf("http://localhost:%s", port))
|
||||
err := http.ListenAndServe(":"+port, nil) //nolint: all
|
||||
err := http.ListenAndServe(":"+port, router) //nolint: all
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
+130
-126
@@ -2,15 +2,15 @@ package gql
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"reflect" // #nosec G702
|
||||
"fmt" // #nosec G702
|
||||
"strconv"
|
||||
|
||||
auctiontypes "github.com/cerc-io/laconicd/x/auction/types"
|
||||
bondtypes "github.com/cerc-io/laconicd/x/bond/types"
|
||||
registrytypes "github.com/cerc-io/laconicd/x/registry/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.
|
||||
@@ -61,13 +61,21 @@ func getGQLRecord(ctx context.Context, resolver QueryResolver, record registryty
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
recordType := record.ToRecordType()
|
||||
attributes, err := getAttributes(&recordType)
|
||||
node, err := ipld.Decode(record.Attributes, dagjson.Decode)
|
||||
if err != nil {
|
||||
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 {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
references, err := getReferences(ctx, resolver, &recordType)
|
||||
references, err := resolver.GetRecordsByIds(ctx, links)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -79,11 +87,96 @@ func getGQLRecord(ctx context.Context, resolver QueryResolver, record registryty
|
||||
ExpiryTime: record.GetExpiryTime(),
|
||||
Owners: record.GetOwners(),
|
||||
Names: record.GetNames(),
|
||||
Attributes: attributes,
|
||||
Attributes: attributes.(MapValue).Value,
|
||||
References: references,
|
||||
}, 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) {
|
||||
if record == nil {
|
||||
return nil, fmt.Errorf("got nil record")
|
||||
@@ -163,136 +256,47 @@ func GetGQLAuction(auction *auctiontypes.Auction, bids []*auctiontypes.Bid) (*Au
|
||||
return &gqlAuction, nil
|
||||
}
|
||||
|
||||
func getReferences(ctx context.Context, resolver QueryResolver, r *registrytypes.RecordType) ([]*Record, error) {
|
||||
var ids []string
|
||||
func toRpcValue(value *ValueInput) *registrytypes.QueryListRecordsRequest_ValueInput {
|
||||
var rpcval registrytypes.QueryListRecordsRequest_ValueInput
|
||||
|
||||
// #nosec G705
|
||||
for key := range r.Attributes {
|
||||
//nolint: all
|
||||
switch r.Attributes[key].(type) {
|
||||
case interface{}:
|
||||
if obj, ok := r.Attributes[key].(map[string]interface{}); ok {
|
||||
if _, ok := obj["/"]; ok && len(obj) == 1 {
|
||||
if _, ok := obj["/"].(string); ok {
|
||||
ids = append(ids, obj["/"].(string))
|
||||
}
|
||||
}
|
||||
}
|
||||
switch {
|
||||
case value == nil:
|
||||
return nil
|
||||
case value.Int != nil:
|
||||
rpcval.Value = ®istrytypes.QueryListRecordsRequest_ValueInput_Int{int64(*value.Int)}
|
||||
case value.Float != nil:
|
||||
rpcval.Value = ®istrytypes.QueryListRecordsRequest_ValueInput_Float{*value.Float}
|
||||
case value.String != nil:
|
||||
rpcval.Value = ®istrytypes.QueryListRecordsRequest_ValueInput_String_{*value.String}
|
||||
case value.Boolean != nil:
|
||||
rpcval.Value = ®istrytypes.QueryListRecordsRequest_ValueInput_Boolean{*value.Boolean}
|
||||
case value.Link != nil:
|
||||
rpcval.Value = ®istrytypes.QueryListRecordsRequest_ValueInput_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 = ®istrytypes.QueryListRecordsRequest_ValueInput_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 = ®istrytypes.QueryListRecordsRequest_ValueInput_Map{&contents}
|
||||
}
|
||||
|
||||
return resolver.GetRecordsByIds(ctx, ids)
|
||||
return &rpcval
|
||||
}
|
||||
|
||||
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 {
|
||||
func toRpcAttributes(attrs []*KeyValueInput) []*registrytypes.QueryListRecordsRequest_KeyValueInput {
|
||||
kvPairs := []*registrytypes.QueryListRecordsRequest_KeyValueInput{}
|
||||
|
||||
for _, value := range attrs {
|
||||
parsedValue := toRpcValue(value.Value)
|
||||
kvPair := ®istrytypes.QueryListRecordsRequest_KeyValueInput{
|
||||
Key: value.Key,
|
||||
Value: ®istrytypes.QueryListRecordsRequest_ValueInput{},
|
||||
Value: parsedValue,
|
||||
}
|
||||
|
||||
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 := ®istrytypes.QueryListRecordsRequest_ReferenceInput{
|
||||
Id: value.Value.Reference.ID,
|
||||
}
|
||||
|
||||
kvPair.Value.Reference = reference
|
||||
kvPair.Value.Type = "reference"
|
||||
}
|
||||
|
||||
// TODO: Handle arrays.
|
||||
|
||||
kvPairs = append(kvPairs, kvPair)
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ rem 3. add path C:\msys64\mingw64\bin
|
||||
rem C:\msys64\usr\bin
|
||||
|
||||
set KEY="mykey"
|
||||
set CHAINID="ethermint_9000-1"
|
||||
set CHAINID="laconic_9000-1"
|
||||
set MONIKER="localtestnet"
|
||||
set KEYRING="test"
|
||||
set KEYALGO="eth_secp256k1"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
KEY="mykey"
|
||||
CHAINID="laconic_2345678-1"
|
||||
CHAINID="laconic_9000-1"
|
||||
MONIKER="localtestnet"
|
||||
KEYRING="test"
|
||||
KEYALGO="eth_secp256k1"
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
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\""];
|
||||
}
|
||||
@@ -67,17 +67,25 @@ message QueryParamsResponse {
|
||||
|
||||
// QueryListRecordsRequest is request type for registry records list
|
||||
message QueryListRecordsRequest {
|
||||
message ReferenceInput {
|
||||
message LinkInput {
|
||||
string id = 1;
|
||||
}
|
||||
message ArrayInput {
|
||||
repeated ValueInput values = 1;
|
||||
}
|
||||
message MapInput {
|
||||
map<string, ValueInput> values = 1;
|
||||
}
|
||||
message ValueInput {
|
||||
string type = 1;
|
||||
string string = 2;
|
||||
int64 int = 3;
|
||||
double float = 4;
|
||||
bool boolean = 5;
|
||||
ReferenceInput reference = 6;
|
||||
repeated ValueInput values = 7;
|
||||
oneof value {
|
||||
string string = 1;
|
||||
int64 int = 2;
|
||||
double float = 3;
|
||||
bool boolean = 4;
|
||||
string link = 5;
|
||||
ArrayInput array = 6;
|
||||
MapInput map = 7;
|
||||
}
|
||||
}
|
||||
message KeyValueInput {
|
||||
string key = 1;
|
||||
|
||||
@@ -64,7 +64,7 @@ message Record {
|
||||
string expiry_time = 4 [(gogoproto.moretags) = "json:\"expiryTime\" yaml:\"expiryTime\""];
|
||||
bool deleted = 5;
|
||||
repeated string owners = 6 [(gogoproto.moretags) = "json:\"owners\" yaml:\"owners\""];
|
||||
google.protobuf.Any attributes = 7 [(gogoproto.moretags) = "json:\"attributes\" yaml:\"attributes\""];
|
||||
bytes attributes = 7 [(gogoproto.moretags) = "json:\"attributes\" yaml:\"attributes\""];
|
||||
repeated string names = 8 [(gogoproto.moretags) = "json:\"names\" yaml:\"names\""];
|
||||
string type = 9 [(gogoproto.moretags) = "json:\"types\" yaml:\"types\""];
|
||||
}
|
||||
|
||||
@@ -7,13 +7,13 @@ import "vulcanize/registry/v1beta1/registry.proto";
|
||||
|
||||
option go_package = "github.com/cerc-io/laconicd/x/registry/types";
|
||||
|
||||
// Msg
|
||||
// Msg is a service which exposes the registry functionality
|
||||
service Msg {
|
||||
// SetRecord will records a new record with given payload and bond id
|
||||
// SetRecord records a new record with given payload and bond id
|
||||
rpc SetRecord(MsgSetRecord) returns (MsgSetRecordResponse) {
|
||||
option (google.api.http).post = "/vulcanize/registry/v1beta1/set_record";
|
||||
}
|
||||
// Renew Record will renew the expire record
|
||||
// Renew Record renews an expired record
|
||||
rpc RenewRecord(MsgRenewRecord) returns (MsgRenewRecordResponse) {
|
||||
option (google.api.http).post = "/vulcanize/registry/v1beta1/renew_record";
|
||||
}
|
||||
@@ -66,8 +66,10 @@ message MsgSetRecordResponse {
|
||||
// Payload
|
||||
message Payload {
|
||||
Record record = 1;
|
||||
repeated Signature signatures = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "json:\"signatures\" yaml:\"signatures\""];
|
||||
repeated Signature signatures = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "json:\"signatures\" yaml:\"signatures\""
|
||||
];
|
||||
}
|
||||
|
||||
// MsgSetName
|
||||
@@ -91,7 +93,7 @@ message MsgReserveAuthority {
|
||||
// MsgReserveNameResponse
|
||||
message MsgReserveAuthorityResponse {}
|
||||
|
||||
// MsgSetAuthorityBond is SDK message for SetAuthorityBond
|
||||
// MsgSetAuthorityBond
|
||||
message MsgSetAuthorityBond {
|
||||
string name = 1;
|
||||
string bond_id = 2 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""];
|
||||
@@ -101,7 +103,7 @@ message MsgSetAuthorityBond {
|
||||
// MsgSetAuthorityBondResponse
|
||||
message MsgSetAuthorityBondResponse {}
|
||||
|
||||
// MsgDeleteNameAuthority is SDK message for DeleteNameAuthority
|
||||
// MsgDeleteNameAuthority
|
||||
message MsgDeleteNameAuthority {
|
||||
string crn = 1;
|
||||
string signer = 2;
|
||||
@@ -110,7 +112,7 @@ message MsgDeleteNameAuthority {
|
||||
// MsgDeleteNameAuthorityResponse
|
||||
message MsgDeleteNameAuthorityResponse {}
|
||||
|
||||
// MsgRenewRecord is SDK message for Renew a record
|
||||
// MsgRenewRecord
|
||||
message MsgRenewRecord {
|
||||
string record_id = 1 [(gogoproto.moretags) = "json:\"recordId\" yaml:\"recordId\""];
|
||||
string signer = 2;
|
||||
@@ -129,30 +131,30 @@ message MsgAssociateBond {
|
||||
// MsgAssociateBondResponse
|
||||
message MsgAssociateBondResponse {}
|
||||
|
||||
// MsgDissociateBond is SDK message for Msg/DissociateBond
|
||||
// MsgDissociateBond
|
||||
message MsgDissociateBond {
|
||||
string record_id = 1 [(gogoproto.moretags) = "json:\"recordId\" yaml:\"recordId\""];
|
||||
string signer = 2;
|
||||
}
|
||||
|
||||
// MsgDissociateBondResponse is response type for MsgDissociateBond
|
||||
// MsgDissociateBondResponse
|
||||
message MsgDissociateBondResponse {}
|
||||
|
||||
// MsgDissociateRecords is SDK message for Msg/DissociateRecords
|
||||
// MsgDissociateRecords
|
||||
message MsgDissociateRecords {
|
||||
string bond_id = 1 [(gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\""];
|
||||
string signer = 2;
|
||||
}
|
||||
|
||||
// MsgDissociateRecordsResponse is response type for MsgDissociateRecords
|
||||
// MsgDissociateRecordsResponse
|
||||
message MsgDissociateRecordsResponse {}
|
||||
|
||||
// MsgReAssociateRecords is SDK message for Msg/ReAssociateRecords
|
||||
// MsgReAssociateRecords
|
||||
message MsgReAssociateRecords {
|
||||
string new_bond_id = 1 [(gogoproto.moretags) = "json:\"newBondId\" yaml:\"newBondId\""];
|
||||
string old_bond_id = 2 [(gogoproto.moretags) = "json:\"oldBondId\" yaml:\"oldBondId\""];
|
||||
string signer = 3;
|
||||
}
|
||||
|
||||
// MsgReAssociateRecordsResponse is response type for MsgReAssociateRecords
|
||||
// MsgReAssociateRecordsResponse
|
||||
message MsgReAssociateRecordsResponse {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dotenv: .env
|
||||
ethermint_9000-1:
|
||||
laconic_9000-1:
|
||||
cmd: laconicd
|
||||
start-flags: "--trace"
|
||||
app-config:
|
||||
|
||||
+3
-3
@@ -15,7 +15,7 @@ IP_ADDR="0.0.0.0"
|
||||
MODE="rpc"
|
||||
|
||||
KEY="mykey"
|
||||
CHAINID="ethermint_9000-1"
|
||||
CHAINID="laconic_9000-1"
|
||||
MONIKER="mymoniker"
|
||||
|
||||
## default port prefixes for laconicd
|
||||
@@ -47,14 +47,14 @@ done
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
DATA_DIR=$(mktemp -d -t ethermint_9000-datadir.XXXXX)
|
||||
DATA_DIR=$(mktemp -d -t laconic_9000-datadir.XXXXX)
|
||||
|
||||
if [[ ! "$DATA_DIR" ]]; then
|
||||
echo "Could not create $DATA_DIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DATA_CLI_DIR=$(mktemp -d -t ethermint_9000-cli-datadir.XXXXX)
|
||||
DATA_CLI_DIR=$(mktemp -d -t laconic_9000-cli-datadir.XXXXX)
|
||||
|
||||
if [[ ! "$DATA_CLI_DIR" ]]; then
|
||||
echo "Could not create $DATA_CLI_DIR"
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ init:
|
||||
address: "0.0.0.0:8545" # change the JSON-RPC address and port
|
||||
ws-address: "0.0.0.0:8546" # change the JSON-RPC websocket address and port
|
||||
genesis:
|
||||
chain_id: "ethermint_9000-1"
|
||||
chain_id: "laconic_9000-1"
|
||||
app_state:
|
||||
staking:
|
||||
params:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Validator Guide for laconic_81337-5 Testnet
|
||||
# Validator Guide for laconic_81337-6 Testnet
|
||||
|
||||
## Hardware Prerequisites
|
||||
|
||||
@@ -48,8 +48,8 @@ sudo apt install git curl build-essential make jq -y
|
||||
# Remove any existing installation of `go`
|
||||
sudo rm -rf /usr/local/go
|
||||
|
||||
# Install Go version 1.18.8
|
||||
curl https://dl.google.com/go/go1.18.8.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf -
|
||||
# Install Go version 1.19.7
|
||||
curl https://dl.google.com/go/go1.19.7.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf -
|
||||
|
||||
# Update env variables to include go
|
||||
cat <<'EOF' >>$HOME/.profile
|
||||
@@ -67,7 +67,7 @@ Check the version of go installed
|
||||
```sh
|
||||
go version
|
||||
|
||||
# Should return something like: go version go1.17.2 linux/amd64
|
||||
# Should return something like: go version go1.19.7 linux/amd64
|
||||
```
|
||||
|
||||
---
|
||||
@@ -80,16 +80,17 @@ cd laconicd
|
||||
|
||||
# Checkout main branch
|
||||
git fetch --all
|
||||
git checkout v0.6.0
|
||||
git checkout v0.8.0
|
||||
|
||||
# Build and install laconic
|
||||
make install
|
||||
make VERSION=v0.8.0 install
|
||||
```
|
||||
|
||||
Verify your installation
|
||||
|
||||
```sh
|
||||
laconicd version --long
|
||||
|
||||
```
|
||||
|
||||
On running the above command, you should see a similar response like this. Make sure that the _version_ and _commit
|
||||
@@ -122,13 +123,13 @@ Make sure the directory `~/.laconicd` does not exist or is empty
|
||||
>In order to run the below commands in a docker container:
|
||||
>```sh
|
||||
>docker run -ti -v ~/.laconicd:/root/.laconicd \
|
||||
>git.vdb.to/cerc-io/laconicd/laconicd:v0.6.0 /bin/sh
|
||||
>git.vdb.to/cerc-io/laconicd/laconicd:v0.8.0 /bin/sh
|
||||
>```
|
||||
---
|
||||
|
||||
```sh
|
||||
# Initialize the validator node
|
||||
laconicd init <your-node-moniker> --chain-id laconic_81337-5
|
||||
laconicd init <your-node-moniker> --chain-id laconic_81337-6
|
||||
```
|
||||
|
||||
Running the above commands will initialize the validator node with default configuration. The config files will be saved in the default location (`~/.laconicd/config`).
|
||||
@@ -168,7 +169,7 @@ Create Your `gentx` transaction file
|
||||
```sh
|
||||
laconicd gentx <key-name> 12900000000000000000000achk \
|
||||
--pubkey=$(laconicd tendermint show-validator) \
|
||||
--chain-id="laconic_81337-5" \
|
||||
--chain-id="laconic_81337-6" \
|
||||
--moniker="<your-moniker-name>" \
|
||||
--website="<your-validator-website>" \
|
||||
--details="<your-validator-description>" \
|
||||
@@ -198,10 +199,10 @@ Submit your `gentx` file to the [https://github.com/cerc-io/laconic-testnet](htt
|
||||
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
|
||||
- Upload your gentx file in the `laconic_81337-5/config/gentxs` folder
|
||||
- Upload your gentx file in the `laconic_81337-6/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`
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
# CONTINUE WITH BELOW STEPS ONLY AFTER GENESIS FILE HAS BEEN PUBLISHED
|
||||
|
||||
@@ -271,25 +272,33 @@ 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.
|
||||
|
||||
```sh
|
||||
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
|
||||
docker create \
|
||||
--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
|
||||
|
||||
```sh
|
||||
docker start laconic-testnet-5
|
||||
docker start laconic-testnet-6
|
||||
```
|
||||
|
||||
### Check validator node logs
|
||||
|
||||
```sh
|
||||
docker logs laconic-testnet-5
|
||||
docker logs laconic-testnet-6
|
||||
```
|
||||
|
||||
### Run shell inside docker container
|
||||
|
||||
```sh
|
||||
docker exec -ti laconic-testnet-5 /bin/sh
|
||||
docker exec -ti laconic-testnet-6 /bin/sh
|
||||
```
|
||||
---
|
||||
## Helpful commands
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
# Validator Upgrade Guide for laconic_81337-5 Testnet v0.6.0 -> v0.7.0
|
||||
|
||||
This guide assumes you have followed the instructions to crete a systemd service or docker container validator node v0.6.0 and you perform the upgrade on a machine running v0.6.0
|
||||
|
||||
It is highly recommended to make the backup of your datadir after you stop v0.6.0 and before you start v0.7.0. Unless you changed your datadir, it should be located in `~/.laconicd`
|
||||
|
||||
## Systemd service
|
||||
Skip this section if you use docker
|
||||
|
||||
This is very similar to building v0.6.0. We keep v 0.6.0 running until v0.7.0 is built and only after the successful build we should replace 0.6.0 binary with v0.7.0. This is to avoid jailing your validator for long downtime.
|
||||
The general upgrade plan is the following:
|
||||
1. Install Go v1.19.5 (we used 1.18 for v0.6.0)
|
||||
2. Remove old copy of the github repository and build directory
|
||||
3. Download the latest laconicd repository and checkout v0.7.0
|
||||
4. Build laconicd binary (but not install in this moment)
|
||||
5. Stop laconicd systemd service
|
||||
6. Install recently built new version of laconicd
|
||||
7. Start laconicd service
|
||||
|
||||
>***You have ~10 minutes after step 5 to complete steps 6 and 7 before your validator is jailed for downtime. Getting jailed for downtime is not a disaster, however would require manual unjailing.***
|
||||
|
||||
|
||||
|
||||
### Install Go 1.19
|
||||
|
||||
```sh
|
||||
# Update Ubuntu
|
||||
sudo apt update
|
||||
sudo apt upgrade -y
|
||||
|
||||
# Install required software packages
|
||||
sudo apt install git curl build-essential make jq -y
|
||||
|
||||
# Remove any existing installation of `go`
|
||||
sudo rm -rf /usr/local/go
|
||||
|
||||
# Install Go version 1.19.5
|
||||
curl https://dl.google.com/go/go1.19.5.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf -
|
||||
|
||||
```
|
||||
|
||||
Check the version of go installed
|
||||
|
||||
```sh
|
||||
go version
|
||||
|
||||
# Should return something like: go version go1.19.5 linux/amd64
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Remove old copy of `laconicd` build
|
||||
|
||||
>Attention should be paid that the directory mentioned below is `~/laconicd` and NOT `~/.laconicd`. The latter is the data directory containing all your node data and configuration and it must be kept during the upgrade.
|
||||
|
||||
```sh
|
||||
# Remove the previous build directory
|
||||
cd ~
|
||||
rm -rf laconicd
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Download `laconicd` repository
|
||||
```sh
|
||||
git clone https://github.com/cerc-io/laconicd.git
|
||||
cd laconicd
|
||||
|
||||
# Checkout 0.7.0 branch
|
||||
git fetch --all
|
||||
git checkout v0.7.0
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Build the new version of `laconicd`
|
||||
|
||||
```sh
|
||||
# Build laconic (but not install at this moment)
|
||||
make VERSION=v0.7.0 build
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Stop `laconicd` systemd service
|
||||
|
||||
```sh
|
||||
sudo systemctl stop laconicd
|
||||
```
|
||||
|
||||
>***Make sure the service is stopped***
|
||||
|
||||
```sh
|
||||
sudo systemctl status laconicd
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Install new `laconicd` version
|
||||
|
||||
```sh
|
||||
make VERSION=v0.7.0 install
|
||||
```
|
||||
|
||||
Verify your installation
|
||||
|
||||
```sh
|
||||
laconicd version
|
||||
```
|
||||
This should return `0.7.0`
|
||||
|
||||
---
|
||||
|
||||
### Start `laconicd` systemd service
|
||||
|
||||
```sh
|
||||
sudo systemctl start laconicd
|
||||
```
|
||||
|
||||
Verify that the node joined the network and produces new blocks
|
||||
|
||||
```sh
|
||||
journalctl -f -u laconicd
|
||||
```
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Docker container
|
||||
|
||||
Upgrade plan:
|
||||
1. Stop running v0.6.0 container
|
||||
2. Delete v0.6.0 container
|
||||
3. Create v0.7.0 container
|
||||
4. Start v0.7.0 container
|
||||
|
||||
>***You have ~10 minutes to complete the upgrade procedure before your validator is jailed for downtime. Getting jailed for downtime is not a disaster, however would require manual unjailing.***
|
||||
|
||||
### Stop running v0.6.0 container
|
||||
```sh
|
||||
docker stop laconic-testnet-5
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Delete v0.6.0 container
|
||||
```sh
|
||||
docker rm laconic-testnet-5
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Create v0.7.0 container
|
||||
```sh
|
||||
docker create --name laconic-testnet-5 \
|
||||
--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.7.0 \
|
||||
laconicd start --gql-playground --gql-server --log_level=warn
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Start v0.7.0 container
|
||||
```sh
|
||||
docker start laconic-testnet-5
|
||||
```
|
||||
|
||||
Verify that the node joined the network and produces new blocks
|
||||
|
||||
```sh
|
||||
docker logs -f laconic-testnet-5
|
||||
```
|
||||
|
||||
---
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -6,7 +6,7 @@ services:
|
||||
volumes:
|
||||
- ../../init.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-nv", "-t1", "--spider", "http://localhost:6060"]
|
||||
test: ["CMD", "curl", "-v", "http://127.0.0.1:6060"]
|
||||
interval: 1s
|
||||
timeout: 5s
|
||||
retries: 30
|
||||
|
||||
Executable
+16
@@ -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"
|
||||
+16
@@ -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"
|
||||
@@ -3,10 +3,16 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||
set -x
|
||||
fi
|
||||
# Get the key from laconicd
|
||||
laconicd_key=$( docker compose exec laconicd echo y | laconicd keys export mykey --unarmored-hex --unsafe )
|
||||
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 laconicd
|
||||
docker compose exec laconicd sh -c "curl http://127.0.0.1:9473/api"
|
||||
docker compose exec laconicd sh -c "curl http://localhost:9473/api"
|
||||
|
||||
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"
|
||||
|
||||
+21
-28
@@ -8,18 +8,15 @@ import (
|
||||
"bytes"
|
||||
"errors"
|
||||
|
||||
canonicalJson "github.com/gibson042/canonicaljson-go"
|
||||
"github.com/ipfs/go-cid"
|
||||
"github.com/ipld/go-ipld-prime/codec/dagcbor"
|
||||
"github.com/ipld/go-ipld-prime/fluent"
|
||||
"github.com/ipld/go-ipld-prime/codec/dagjson"
|
||||
"github.com/ipld/go-ipld-prime/linking"
|
||||
cidlink "github.com/ipld/go-ipld-prime/linking/cid"
|
||||
"github.com/ipld/go-ipld-prime/multicodec"
|
||||
"github.com/ipld/go-ipld-prime/storage/memstore"
|
||||
|
||||
canonicalJson "github.com/gibson042/canonicaljson-go"
|
||||
"github.com/ipfs/go-cid"
|
||||
cbor "github.com/ipfs/go-ipld-cbor"
|
||||
basicnode "github.com/ipld/go-ipld-prime/node/basic"
|
||||
mh "github.com/multiformats/go-multihash"
|
||||
"github.com/ipld/go-ipld-prime/storage/memstore"
|
||||
)
|
||||
|
||||
var store = memstore.Store{}
|
||||
@@ -36,7 +33,7 @@ func GenerateHash(json map[string]interface{}) (string, []byte, error) {
|
||||
return "", nil, err
|
||||
}
|
||||
|
||||
cidString, err := CIDFromJSONBytesUsingIpldPrime(content)
|
||||
cidString, err := CIDFromJSONBytes(content)
|
||||
if err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
@@ -44,16 +41,6 @@ func GenerateHash(json map[string]interface{}) (string, []byte, error) {
|
||||
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.
|
||||
func GetAttributeAsString(obj map[string]interface{}, attr string) (string, error) {
|
||||
if value, ok := obj[attr]; ok {
|
||||
@@ -67,8 +54,22 @@ func GetAttributeAsString(obj map[string]interface{}, attr string) (string, erro
|
||||
return "", errors.New("attribute not found")
|
||||
}
|
||||
|
||||
// CIDFromJSONBytesUsingIpldPrime returns CID (dagcbor) for json (as bytes).
|
||||
func CIDFromJSONBytesUsingIpldPrime(content []byte) (string, error) {
|
||||
// CIDFromJSONBytes returns CID (dagcbor) for json (as bytes).
|
||||
// This is combination of samples for unmarshalling and linking
|
||||
// see: https://pkg.go.dev/github.com/ipld/go-ipld-prime
|
||||
func CIDFromJSONBytes(content []byte) (string, error) {
|
||||
if len(content) == 0 {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
np := basicnode.Prototype.Any // Pick a stle for the in-memory data.
|
||||
nb := np.NewBuilder() // Create a builder.
|
||||
err := dagjson.Decode(nb, bytes.NewReader(content)) // Hand the builder to decoding -- decoding will fill it in!
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
n := nb.Build() // Call 'Build' to get the resulting Node. (It's immutable!)
|
||||
|
||||
lsys := cidlink.DefaultLinkSystem()
|
||||
|
||||
// We want to store the serialized data somewhere.
|
||||
@@ -87,14 +88,6 @@ func CIDFromJSONBytesUsingIpldPrime(content []byte) (string, error) {
|
||||
MhLength: 32, // sha2-256 hash has a 32-byte sum.
|
||||
}}
|
||||
|
||||
// And we need some data to link to! Here's a quick piece of example data:
|
||||
n, err := fluent.Build(basicnode.Prototype.Any, func(na fluent.NodeAssembler) {
|
||||
na.AssignBytes(content)
|
||||
})
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
// Now: time to apply the LinkSystem, and do the actual store operation!
|
||||
lnk, err := lsys.Store(
|
||||
linking.LinkContext{}, // The zero value is fine. Configure it it you want cancellability or other features.
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestAndValidateCIDGeneration(t *testing.T) {
|
||||
testCases := []struct {
|
||||
name string
|
||||
content string
|
||||
expected string
|
||||
}{
|
||||
{
|
||||
"empty string", "", "",
|
||||
},
|
||||
{
|
||||
"empty json", "{}", "bafyreigbtj4x7ip5legnfznufuopl4sg4knzc2cof6duas4b3q2fy6swua",
|
||||
},
|
||||
|
||||
{
|
||||
"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\"}",
|
||||
"bafyreiek4hnoqmits66bjyxswapplweuoqe4en2ux6u772o4y3askpd3ny",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
newImpl, err := CIDFromJSONBytes([]byte(tc.content))
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, tc.expected, newImpl)
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -20,7 +20,7 @@ The following steps need to be followed only before running the chain for the fi
|
||||
Keep a note of the keyring passphrase if you set it.
|
||||
2. Init the chain:
|
||||
```
|
||||
./build/laconicd init test-moniker --chain-id ethermint_9000-1
|
||||
./build/laconicd init test-moniker --chain-id laconic_9000-1
|
||||
```
|
||||
3. Add genesis account:
|
||||
```
|
||||
@@ -28,7 +28,7 @@ The following steps need to be followed only before running the chain for the fi
|
||||
```
|
||||
4. Make a genesis tx:
|
||||
```
|
||||
./build/laconicd gentx root 1000000000000000000stake --chain-id ethermint_9000-1
|
||||
./build/laconicd gentx root 1000000000000000000stake --chain-id laconic_9000-1
|
||||
```
|
||||
5. Collect gentxs:
|
||||
```
|
||||
|
||||
@@ -3,6 +3,7 @@ package keeper
|
||||
import (
|
||||
"context"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
|
||||
@@ -26,7 +27,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) {
|
||||
ctx := sdk.UnwrapSDKContext(c)
|
||||
if req.Id == "" {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "auction ID is required")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "auction ID is required")
|
||||
}
|
||||
|
||||
resp := q.Keeper.GetAuction(ctx, req.Id)
|
||||
@@ -37,10 +38,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) {
|
||||
ctx := sdk.UnwrapSDKContext(c)
|
||||
if req.AuctionId == "" {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "auction ID is required")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "auction ID is required")
|
||||
}
|
||||
if req.Bidder == "" {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "bidder address is required")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "bidder address is required")
|
||||
}
|
||||
resp := q.Keeper.GetBid(ctx, req.AuctionId, req.Bidder)
|
||||
return &types.BidResponse{Bid: &resp}, nil
|
||||
@@ -50,7 +51,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) {
|
||||
ctx := sdk.UnwrapSDKContext(c)
|
||||
if req.AuctionId == "" {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "auction ID is required")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "auction ID is required")
|
||||
}
|
||||
resp := q.Keeper.GetBids(ctx, req.AuctionId)
|
||||
return &types.BidsResponse{Bids: resp}, nil
|
||||
@@ -60,7 +61,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) {
|
||||
ctx := sdk.UnwrapSDKContext(c)
|
||||
if req.BidderAddress == "" {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "bidder address is required")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "bidder address is required")
|
||||
}
|
||||
resp := q.Keeper.QueryAuctionsByBidder(ctx, req.BidderAddress)
|
||||
return &types.AuctionsByBidderResponse{Auctions: &types.Auctions{Auctions: resp}}, nil
|
||||
@@ -70,7 +71,7 @@ func (q Querier) AuctionsByBidder(c context.Context, req *types.AuctionsByBidder
|
||||
func (q Querier) AuctionsByOwner(c context.Context, req *types.AuctionsByOwnerRequest) (*types.AuctionsByOwnerResponse, error) {
|
||||
ctx := sdk.UnwrapSDKContext(c)
|
||||
if req.OwnerAddress == "" {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "owner address is required")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "owner address is required")
|
||||
}
|
||||
resp := q.Keeper.QueryAuctionsByOwner(ctx, req.OwnerAddress)
|
||||
return &types.AuctionsByOwnerResponse{Auctions: &types.Auctions{Auctions: resp}}, nil
|
||||
|
||||
+19
-18
@@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"github.com/cerc-io/laconicd/x/auction/types"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
storetypes "github.com/cosmos/cosmos-sdk/store/types"
|
||||
@@ -306,7 +307,7 @@ func (k Keeper) CreateAuction(ctx sdk.Context, msg types.MsgCreateAuction) (*typ
|
||||
// Generate auction Id.
|
||||
account := k.accountKeeper.GetAccount(ctx, signerAddress)
|
||||
if account == nil {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "Account not found.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "Account not found.")
|
||||
}
|
||||
|
||||
auctionID := types.AuctionID{
|
||||
@@ -340,12 +341,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) {
|
||||
if !k.HasAuction(ctx, msg.AuctionId) {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Auction not found.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Auction not found.")
|
||||
}
|
||||
|
||||
auction := k.GetAuction(ctx, msg.AuctionId)
|
||||
if auction.Status != types.AuctionStatusCommitPhase {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Auction is not in commit phase.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Auction is not in commit phase.")
|
||||
}
|
||||
|
||||
signerAddress, err := sdk.AccAddressFromBech32(msg.Signer)
|
||||
@@ -390,12 +391,12 @@ func (k Keeper) CommitBid(ctx sdk.Context, msg types.MsgCommitBid) (*types.Bid,
|
||||
// RevealBid reeals a bid committed earlier.
|
||||
func (k Keeper) RevealBid(ctx sdk.Context, msg types.MsgRevealBid) (*types.Auction, error) {
|
||||
if !k.HasAuction(ctx, msg.AuctionId) {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Auction not found.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Auction not found.")
|
||||
}
|
||||
|
||||
auction := k.GetAuction(ctx, msg.AuctionId)
|
||||
if auction.Status != types.AuctionStatusRevealPhase {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Auction is not in reveal phase.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Auction is not in reveal phase.")
|
||||
}
|
||||
|
||||
signerAddress, err := sdk.AccAddressFromBech32(msg.Signer)
|
||||
@@ -404,65 +405,65 @@ func (k Keeper) RevealBid(ctx sdk.Context, msg types.MsgRevealBid) (*types.Aucti
|
||||
}
|
||||
|
||||
if !k.HasBid(ctx, msg.AuctionId, signerAddress.String()) {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Bid not found.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bid not found.")
|
||||
}
|
||||
|
||||
bid := k.GetBid(ctx, auction.Id, signerAddress.String())
|
||||
if bid.Status != types.BidStatusCommitted {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Bid not in committed state.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bid not in committed state.")
|
||||
}
|
||||
|
||||
revealBytes, err := hex.DecodeString(msg.Reveal)
|
||||
if err != nil {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal string.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal string.")
|
||||
}
|
||||
|
||||
cid, err := wnsUtils.CIDFromJSONBytes(revealBytes)
|
||||
if err != nil {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal JSON.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal JSON.")
|
||||
}
|
||||
|
||||
if bid.CommitHash != cid {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Commit hash mismatch.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Commit hash mismatch.")
|
||||
}
|
||||
|
||||
var reveal map[string]interface{}
|
||||
err = json.Unmarshal(revealBytes, &reveal)
|
||||
if err != nil {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Reveal JSON unmarshal error.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Reveal JSON unmarshal error.")
|
||||
}
|
||||
|
||||
chainID, err := wnsUtils.GetAttributeAsString(reveal, "chainId")
|
||||
if err != nil || chainID != ctx.ChainID() {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal chainID.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal chainID.")
|
||||
}
|
||||
|
||||
auctionID, err := wnsUtils.GetAttributeAsString(reveal, "auctionId")
|
||||
if err != nil || auctionID != msg.AuctionId {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal auction Id.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal auction Id.")
|
||||
}
|
||||
|
||||
bidderAddress, err := wnsUtils.GetAttributeAsString(reveal, "bidderAddress")
|
||||
if err != nil {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal bid address.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal bid address.")
|
||||
}
|
||||
|
||||
if bidderAddress != signerAddress.String() {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Reveal bid address mismatch.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Reveal bid address mismatch.")
|
||||
}
|
||||
|
||||
bidAmountStr, err := wnsUtils.GetAttributeAsString(reveal, "bidAmount")
|
||||
if err != nil {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal bid amount.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal bid amount.")
|
||||
}
|
||||
|
||||
bidAmount, err := sdk.ParseCoinNormalized(bidAmountStr)
|
||||
if err != nil {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal bid amount.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal bid amount.")
|
||||
}
|
||||
|
||||
if bidAmount.IsLT(auction.MinimumBid) {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Bid is lower than minimum bid.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bid is lower than minimum bid.")
|
||||
}
|
||||
|
||||
// Lock bid amount.
|
||||
|
||||
+11
-10
@@ -1,6 +1,7 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
)
|
||||
@@ -32,19 +33,19 @@ func (msg MsgCreateAuction) Type() string { return "create" }
|
||||
// ValidateBasic Implements Msg.
|
||||
func (msg MsgCreateAuction) ValidateBasic() error {
|
||||
if msg.Signer == "" {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer)
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer)
|
||||
}
|
||||
|
||||
if msg.CommitsDuration <= 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "commit phase duration invalid.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "commit phase duration invalid.")
|
||||
}
|
||||
|
||||
if msg.RevealsDuration <= 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "reveal phase duration invalid.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "reveal phase duration invalid.")
|
||||
}
|
||||
|
||||
if !msg.MinimumBid.IsPositive() {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "minimum bid should be greater than zero.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "minimum bid should be greater than zero.")
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -79,15 +80,15 @@ func (msg MsgCommitBid) Type() string { return "commit" }
|
||||
// ValidateBasic Implements Msg.
|
||||
func (msg MsgCommitBid) ValidateBasic() error {
|
||||
if msg.Signer == "" {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer address.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer address.")
|
||||
}
|
||||
|
||||
if msg.AuctionId == "" {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "invalid auction ID.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid auction ID.")
|
||||
}
|
||||
|
||||
if msg.CommitHash == "" {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "invalid commit hash.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid commit hash.")
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -122,15 +123,15 @@ func (msg MsgRevealBid) Type() string { return "reveal" }
|
||||
// ValidateBasic Implements Msg.
|
||||
func (msg MsgRevealBid) ValidateBasic() error {
|
||||
if msg.Signer == "" {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer address.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer address.")
|
||||
}
|
||||
|
||||
if msg.AuctionId == "" {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "invalid auction ID.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid auction ID.")
|
||||
}
|
||||
|
||||
if msg.Reveal == "" {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "invalid reveal data.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid reveal data.")
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
+2
-2
@@ -9,9 +9,9 @@ $ make build
|
||||
|
||||
```bash
|
||||
./build/laconicd keys add root
|
||||
./build/laconicd init test-moniker --chain-id ethermint_9000-1
|
||||
./build/laconicd init test-moniker --chain-id laconic_9000-1
|
||||
./build/laconicd add-genesis-account $(./build/laconicd keys show root -a) 1000000000000000000aphoton,1000000000000000000stake
|
||||
./build/laconicd gentx root 1000000000000000000stake --chain-id ethermint_9000-1
|
||||
./build/laconicd gentx root 1000000000000000000stake --chain-id laconic_9000-1
|
||||
./build/laconicd collect-gentxs
|
||||
./build/laconicd start
|
||||
```
|
||||
|
||||
@@ -3,6 +3,7 @@ package keeper
|
||||
import (
|
||||
"context"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"github.com/cerc-io/laconicd/x/bond/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
@@ -30,7 +31,7 @@ func (q Querier) GetBondByID(c context.Context, req *types.QueryGetBondByIDReque
|
||||
ctx := sdk.UnwrapSDKContext(c)
|
||||
bondID := req.GetId()
|
||||
if len(bondID) == 0 {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "bond id required")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "bond id required")
|
||||
}
|
||||
bond := q.Keeper.GetBond(ctx, req.GetId())
|
||||
return &types.QueryGetBondByIDResponse{Bond: &bond}, nil
|
||||
@@ -40,7 +41,7 @@ func (q Querier) GetBondsByOwner(c context.Context, req *types.QueryGetBondsByOw
|
||||
ctx := sdk.UnwrapSDKContext(c)
|
||||
owner := req.GetOwner()
|
||||
if len(owner) == 0 {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "owner id required")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "owner id required")
|
||||
}
|
||||
bonds := q.Keeper.QueryBondsByOwner(ctx, owner)
|
||||
return &types.QueryGetBondsByOwnerResponse{Bonds: bonds}, nil
|
||||
|
||||
+16
-15
@@ -5,6 +5,7 @@ import (
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"github.com/cerc-io/laconicd/x/bond/types"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
storetypes "github.com/cosmos/cosmos-sdk/store/types"
|
||||
@@ -113,7 +114,7 @@ func (k Keeper) CreateBond(ctx sdk.Context, ownerAddress sdk.AccAddress, coins s
|
||||
for _, coin := range coins {
|
||||
balance := k.bankKeeper.HasBalance(ctx, ownerAddress, coin)
|
||||
if !balance {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInsufficientFunds, "failed to create bond; Insufficient funds")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInsufficientFunds, "failed to create bond; Insufficient funds")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +130,7 @@ func (k Keeper) CreateBond(ctx sdk.Context, ownerAddress sdk.AccAddress, coins s
|
||||
|
||||
bond := types.Bond{Id: bondID, Owner: ownerAddress.String(), Balance: coins}
|
||||
if bond.Balance.IsAnyGT(maxBondAmount) {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Max bond amount exceeded.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Max bond amount exceeded.")
|
||||
}
|
||||
|
||||
// Move funds into the bond account module.
|
||||
@@ -221,18 +222,18 @@ func (k Keeper) QueryBondsByOwner(ctx sdk.Context, ownerAddress string) []types.
|
||||
// RefillBond refills an existing bond.
|
||||
func (k Keeper) RefillBond(ctx sdk.Context, id string, ownerAddress sdk.AccAddress, coins sdk.Coins) (*types.Bond, error) {
|
||||
if !k.HasBond(ctx, id) {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.")
|
||||
}
|
||||
|
||||
bond := k.GetBond(ctx, id)
|
||||
if bond.Owner != ownerAddress.String() {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.")
|
||||
}
|
||||
|
||||
// Check if account has funds.
|
||||
for _, coin := range coins {
|
||||
if !k.bankKeeper.HasBalance(ctx, ownerAddress, coin) {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInsufficientFunds, "Insufficient funds.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInsufficientFunds, "Insufficient funds.")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,7 +241,7 @@ func (k Keeper) RefillBond(ctx sdk.Context, id string, ownerAddress sdk.AccAddre
|
||||
|
||||
updatedBalance := bond.Balance.Add(coins...)
|
||||
if updatedBalance.IsAnyGT(maxBondAmount) {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Max bond amount exceeded.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Max bond amount exceeded.")
|
||||
}
|
||||
|
||||
// Move funds into the bond account module.
|
||||
@@ -259,17 +260,17 @@ func (k Keeper) RefillBond(ctx sdk.Context, id string, ownerAddress sdk.AccAddre
|
||||
// WithdrawBond withdraws funds from a bond.
|
||||
func (k Keeper) WithdrawBond(ctx sdk.Context, id string, ownerAddress sdk.AccAddress, coins sdk.Coins) (*types.Bond, error) {
|
||||
if !k.HasBond(ctx, id) {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.")
|
||||
}
|
||||
|
||||
bond := k.GetBond(ctx, id)
|
||||
if bond.Owner != ownerAddress.String() {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.")
|
||||
}
|
||||
|
||||
updatedBalance, isNeg := bond.Balance.SafeSub(coins...)
|
||||
if isNeg {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInsufficientFunds, "Insufficient bond balance.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInsufficientFunds, "Insufficient bond balance.")
|
||||
}
|
||||
|
||||
// Move funds from the bond into the account.
|
||||
@@ -288,18 +289,18 @@ func (k Keeper) WithdrawBond(ctx sdk.Context, id string, ownerAddress sdk.AccAdd
|
||||
// CancelBond cancels a bond, returning funds to the owner.
|
||||
func (k Keeper) CancelBond(ctx sdk.Context, id string, ownerAddress sdk.AccAddress) (*types.Bond, error) {
|
||||
if !k.HasBond(ctx, id) {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.")
|
||||
}
|
||||
|
||||
bond := k.GetBond(ctx, id)
|
||||
if bond.Owner != ownerAddress.String() {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.")
|
||||
}
|
||||
|
||||
// Check if bond is used in other modules.
|
||||
for _, usageKeeper := range k.usageKeepers {
|
||||
if usageKeeper.UsesBond(ctx, id) {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, fmt.Sprintf("Bond in use by the '%s' module.", usageKeeper.ModuleName()))
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, fmt.Sprintf("Bond in use by the '%s' module.", usageKeeper.ModuleName()))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -330,7 +331,7 @@ func (k Keeper) GetBondModuleBalances(ctx sdk.Context) sdk.Coins {
|
||||
// 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 {
|
||||
if !k.HasBond(ctx, id) {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Bond not found.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond not found.")
|
||||
}
|
||||
|
||||
bondObj := k.GetBond(ctx, id)
|
||||
@@ -340,13 +341,13 @@ func (k Keeper) TransferCoinsToModuleAccount(ctx sdk.Context, id, moduleAccount
|
||||
|
||||
if isNeg {
|
||||
// Check if bond has sufficient funds.
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInsufficientFunds, "Insufficient funds.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInsufficientFunds, "Insufficient funds.")
|
||||
}
|
||||
|
||||
// Move funds from bond module to record rent module.
|
||||
err := k.bankKeeper.SendCoinsFromModuleToModule(ctx, types.ModuleName, moduleAccount, coins)
|
||||
if err != nil {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Error transferring funds.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Error transferring funds.")
|
||||
}
|
||||
|
||||
// Update bond balance.
|
||||
|
||||
+11
-10
@@ -1,6 +1,7 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
)
|
||||
@@ -28,10 +29,10 @@ func (msg MsgCreateBond) Type() string { return "create" }
|
||||
|
||||
func (msg MsgCreateBond) ValidateBasic() error {
|
||||
if len(msg.Signer) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer)
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer)
|
||||
}
|
||||
if len(msg.Coins) == 0 || !msg.Coins.IsValid() {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, "Invalid amount.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidCoins, "Invalid amount.")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -64,13 +65,13 @@ func (msg MsgRefillBond) Type() string { return "refill" }
|
||||
|
||||
func (msg MsgRefillBond) ValidateBasic() error {
|
||||
if len(msg.Id) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, msg.Id)
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, msg.Id)
|
||||
}
|
||||
if len(msg.Signer) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer)
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer)
|
||||
}
|
||||
if len(msg.Coins) == 0 || !msg.Coins.IsValid() {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, "Invalid amount.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidCoins, "Invalid amount.")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -103,13 +104,13 @@ func (msg MsgWithdrawBond) Type() string { return "withdraw" }
|
||||
|
||||
func (msg MsgWithdrawBond) ValidateBasic() error {
|
||||
if len(msg.Id) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, msg.Id)
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, msg.Id)
|
||||
}
|
||||
if len(msg.Signer) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer)
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer)
|
||||
}
|
||||
if len(msg.Coins) == 0 || !msg.Coins.IsValid() {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, "Invalid amount.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidCoins, "Invalid amount.")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -141,10 +142,10 @@ func (msg MsgCancelBond) Type() string { return "cancel" }
|
||||
|
||||
func (msg MsgCancelBond) ValidateBasic() error {
|
||||
if len(msg.Id) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, msg.Id)
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, msg.Id)
|
||||
}
|
||||
if len(msg.Signer) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer)
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
|
||||
sdkmath "cosmossdk.io/math"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
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/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.
|
||||
func (cc ChainConfig) Validate() error {
|
||||
if err := validateBlock(cc.HomesteadBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "homesteadBlock")
|
||||
return errorsmod.Wrap(err, "homesteadBlock")
|
||||
}
|
||||
if err := validateBlock(cc.DAOForkBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "daoForkBlock")
|
||||
return errorsmod.Wrap(err, "daoForkBlock")
|
||||
}
|
||||
if err := validateBlock(cc.EIP150Block); err != nil {
|
||||
return sdkerrors.Wrap(err, "eip150Block")
|
||||
return errorsmod.Wrap(err, "eip150Block")
|
||||
}
|
||||
if err := validateHash(cc.EIP150Hash); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := validateBlock(cc.EIP155Block); err != nil {
|
||||
return sdkerrors.Wrap(err, "eip155Block")
|
||||
return errorsmod.Wrap(err, "eip155Block")
|
||||
}
|
||||
if err := validateBlock(cc.EIP158Block); err != nil {
|
||||
return sdkerrors.Wrap(err, "eip158Block")
|
||||
return errorsmod.Wrap(err, "eip158Block")
|
||||
}
|
||||
if err := validateBlock(cc.ByzantiumBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "byzantiumBlock")
|
||||
return errorsmod.Wrap(err, "byzantiumBlock")
|
||||
}
|
||||
if err := validateBlock(cc.ConstantinopleBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "constantinopleBlock")
|
||||
return errorsmod.Wrap(err, "constantinopleBlock")
|
||||
}
|
||||
if err := validateBlock(cc.PetersburgBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "petersburgBlock")
|
||||
return errorsmod.Wrap(err, "petersburgBlock")
|
||||
}
|
||||
if err := validateBlock(cc.IstanbulBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "istanbulBlock")
|
||||
return errorsmod.Wrap(err, "istanbulBlock")
|
||||
}
|
||||
if err := validateBlock(cc.MuirGlacierBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "muirGlacierBlock")
|
||||
return errorsmod.Wrap(err, "muirGlacierBlock")
|
||||
}
|
||||
if err := validateBlock(cc.BerlinBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "berlinBlock")
|
||||
return errorsmod.Wrap(err, "berlinBlock")
|
||||
}
|
||||
if err := validateBlock(cc.LondonBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "londonBlock")
|
||||
return errorsmod.Wrap(err, "londonBlock")
|
||||
}
|
||||
if err := validateBlock(cc.ArrowGlacierBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "arrowGlacierBlock")
|
||||
return errorsmod.Wrap(err, "arrowGlacierBlock")
|
||||
}
|
||||
if err := validateBlock(cc.MergeForkBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "mergeForkBlock")
|
||||
return errorsmod.Wrap(err, "mergeForkBlock")
|
||||
}
|
||||
|
||||
// NOTE: chain ID is not needed to check config order
|
||||
if err := cc.EthereumConfig(nil).CheckConfigForkOrder(); err != nil {
|
||||
return sdkerrors.Wrap(err, "invalid config fork order")
|
||||
return errorsmod.Wrap(err, "invalid config fork order")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func validateHash(hex string) error {
|
||||
if hex != "" && strings.TrimSpace(hex) == "" {
|
||||
return sdkerrors.Wrap(types.ErrInvalidChainConfig, "hash cannot be blank")
|
||||
return errorsmod.Wrap(types.ErrInvalidChainConfig, "hash cannot be blank")
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -158,7 +158,7 @@ func validateBlock(block *sdkmath.Int) error {
|
||||
}
|
||||
|
||||
if block.IsNegative() {
|
||||
return sdkerrors.Wrapf(
|
||||
return errorsmod.Wrapf(
|
||||
types.ErrInvalidChainConfig, "block value cannot be negative: %s", block,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
|
||||
"github.com/cerc-io/laconicd/x/evm/types"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
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/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.
|
||||
func (cc ChainConfig) Validate() error {
|
||||
if err := validateBlock(cc.HomesteadBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "homesteadBlock")
|
||||
return errorsmod.Wrap(err, "homesteadBlock")
|
||||
}
|
||||
if err := validateBlock(cc.DAOForkBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "daoForkBlock")
|
||||
return errorsmod.Wrap(err, "daoForkBlock")
|
||||
}
|
||||
if err := validateBlock(cc.EIP150Block); err != nil {
|
||||
return sdkerrors.Wrap(err, "eip150Block")
|
||||
return errorsmod.Wrap(err, "eip150Block")
|
||||
}
|
||||
if err := validateHash(cc.EIP150Hash); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := validateBlock(cc.EIP155Block); err != nil {
|
||||
return sdkerrors.Wrap(err, "eip155Block")
|
||||
return errorsmod.Wrap(err, "eip155Block")
|
||||
}
|
||||
if err := validateBlock(cc.EIP158Block); err != nil {
|
||||
return sdkerrors.Wrap(err, "eip158Block")
|
||||
return errorsmod.Wrap(err, "eip158Block")
|
||||
}
|
||||
if err := validateBlock(cc.ByzantiumBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "byzantiumBlock")
|
||||
return errorsmod.Wrap(err, "byzantiumBlock")
|
||||
}
|
||||
if err := validateBlock(cc.ConstantinopleBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "constantinopleBlock")
|
||||
return errorsmod.Wrap(err, "constantinopleBlock")
|
||||
}
|
||||
if err := validateBlock(cc.PetersburgBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "petersburgBlock")
|
||||
return errorsmod.Wrap(err, "petersburgBlock")
|
||||
}
|
||||
if err := validateBlock(cc.IstanbulBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "istanbulBlock")
|
||||
return errorsmod.Wrap(err, "istanbulBlock")
|
||||
}
|
||||
if err := validateBlock(cc.MuirGlacierBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "muirGlacierBlock")
|
||||
return errorsmod.Wrap(err, "muirGlacierBlock")
|
||||
}
|
||||
if err := validateBlock(cc.BerlinBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "berlinBlock")
|
||||
return errorsmod.Wrap(err, "berlinBlock")
|
||||
}
|
||||
if err := validateBlock(cc.LondonBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "londonBlock")
|
||||
return errorsmod.Wrap(err, "londonBlock")
|
||||
}
|
||||
if err := validateBlock(cc.ArrowGlacierBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "arrowGlacierBlock")
|
||||
return errorsmod.Wrap(err, "arrowGlacierBlock")
|
||||
}
|
||||
if err := validateBlock(cc.MergeForkBlock); err != nil {
|
||||
return sdkerrors.Wrap(err, "mergeForkBlock")
|
||||
return errorsmod.Wrap(err, "mergeForkBlock")
|
||||
}
|
||||
|
||||
// NOTE: chain ID is not needed to check config order
|
||||
if err := cc.EthereumConfig(nil).CheckConfigForkOrder(); err != nil {
|
||||
return sdkerrors.Wrap(err, "invalid config fork order")
|
||||
return errorsmod.Wrap(err, "invalid config fork order")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func validateHash(hex string) error {
|
||||
if hex != "" && strings.TrimSpace(hex) == "" {
|
||||
return sdkerrors.Wrap(types.ErrInvalidChainConfig, "hash cannot be blank")
|
||||
return errorsmod.Wrap(types.ErrInvalidChainConfig, "hash cannot be blank")
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -157,7 +157,7 @@ func validateBlock(block *sdkmath.Int) error {
|
||||
}
|
||||
|
||||
if block.IsNegative() {
|
||||
return sdkerrors.Wrapf(
|
||||
return errorsmod.Wrapf(
|
||||
types.ErrInvalidChainConfig, "block value cannot be negative: %s", block,
|
||||
)
|
||||
}
|
||||
|
||||
+12
-12
@@ -9,9 +9,9 @@ $ make build
|
||||
|
||||
```bash
|
||||
./build/laconicd keys add root
|
||||
./build/laconicd init test-moniker --chain-id ethermint_9000-1
|
||||
./build/laconicd init test-moniker --chain-id laconic_9000-1
|
||||
./build/laconicd add-genesis-account $(./build/laconicd keys show root -a) 1000000000000000000aphoton,1000000000000000000stake
|
||||
./build/laconicd gentx root 1000000000000000000stake --chain-id ethermint_9000-1
|
||||
./build/laconicd gentx root 1000000000000000000stake --chain-id laconic_9000-1
|
||||
./build/laconicd collect-gentxs
|
||||
./build/laconicd start
|
||||
```
|
||||
@@ -58,7 +58,7 @@ $ ./build/laconicd q registry params -o json | jq .
|
||||
> First you have to Create bond
|
||||
|
||||
```bash
|
||||
$ ./build/laconicd tx registry set ~/Desktop/examples/records/service_provider_example.yml 95f68b1b862bfd1609b0c9aaf7300287b92fec90ac64027092c3e723af36e83d --from root --chain-id ethermint_9000-1 --yes -o json
|
||||
$ ./build/laconicd tx registry set ~/Desktop/examples/records/service_provider_example.yml 95f68b1b862bfd1609b0c9aaf7300287b92fec90ac64027092c3e723af36e83d --from root --chain-id laconic_9000-1 --yes -o json
|
||||
{
|
||||
"height": "0",
|
||||
"txhash": "BA44ABE1194724694E7CB290F9F3121DB4E63E1A030D95CB84813EEA132CF95F",
|
||||
@@ -121,7 +121,7 @@ $ ./build/laconicd q registry get bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my
|
||||
## Reserve name
|
||||
|
||||
```bash
|
||||
./build/laconicd tx registry reserve-name hello --from root --chain-id ethermint_9000-1 --owner $(./build/laconicd key
|
||||
./build/laconicd tx registry reserve-name hello --from root --chain-id laconic_9000-1 --owner $(./build/laconicd key
|
||||
s show root -a) -y -o json | jq .
|
||||
{
|
||||
"height": "0",
|
||||
@@ -181,8 +181,8 @@ $ ./build/laconicd q registry balance -o json | jq .
|
||||
## add bond to the authority
|
||||
|
||||
```bash
|
||||
$ ./build/laconicd tx registry authority-bond [Authority Name] [Bond ID ] --from root --chain-id ethermint_9000-1 -y -o json | jq .
|
||||
$ ./build/laconicd tx registry authority-bond hello 95f68b1b862bfd1609b0c9aaf7300287b92fec90ac64027092c3e723af36e83d --from root --chain-id ethermint_9000-1 -y -o json | jq .
|
||||
$ ./build/laconicd tx registry authority-bond [Authority Name] [Bond ID ] --from root --chain-id laconic_9000-1 -y -o json | jq .
|
||||
$ ./build/laconicd tx registry authority-bond hello 95f68b1b862bfd1609b0c9aaf7300287b92fec90ac64027092c3e723af36e83d --from root --chain-id laconic_9000-1 -y -o json | jq .
|
||||
```
|
||||
|
||||
## Query the records by associate bond id
|
||||
@@ -209,7 +209,7 @@ $ ./build/laconicd q registry query-by-bond 95f68b1b862bfd1609b0c9aaf7300287b92f
|
||||
## dissociate bond from record
|
||||
|
||||
```bash
|
||||
$ ./build/laconicd tx registry dissociate-bond bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae --from root --chain-id ethermint_9000-1
|
||||
$ ./build/laconicd tx registry dissociate-bond bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae --from root --chain-id laconic_9000-1
|
||||
{"body":{"messages":[{"@type":"/vulcanize.registry.v1beta1.MsgDissociateBond","record_id":"bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae","signer":"ethm1mfdjngh5jvjs9lqtt9a7y2hlgw8v3syh3hsqzk"}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":[]}
|
||||
|
||||
confirm transaction before signing and broadcasting [y/N]: y
|
||||
@@ -231,7 +231,7 @@ txhash: 7AFEF524CB0D92D6576FC08601A787786E802449888FD8DDAA7635698CC85060
|
||||
## Associate bond with record
|
||||
|
||||
```bash
|
||||
./build/laconicd tx registry associate-bond bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440 --from root --chain-id ethermint_9000-1 -y -o json | jq .
|
||||
./build/laconicd tx registry associate-bond bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440 --from root --chain-id laconic_9000-1 -y -o json | jq .
|
||||
{
|
||||
"height": "0",
|
||||
"txhash": "F75C2BF2FE73668AE1332E1237F924AC549E31E822A56394DE5AC17200B199F9",
|
||||
@@ -252,7 +252,7 @@ txhash: 7AFEF524CB0D92D6576FC08601A787786E802449888FD8DDAA7635698CC85060
|
||||
## dissociate-records => remove all record from bond
|
||||
|
||||
```bash
|
||||
$./build/laconicd tx registry dissociate-records c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440 --from root --chain-id ethermint_9000-1 -y -o json | jq .
|
||||
$./build/laconicd tx registry dissociate-records c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440 --from root --chain-id laconic_9000-1 -y -o json | jq .
|
||||
{
|
||||
"height": "0",
|
||||
"txhash": "0316F503E5DEA47CB108AE6C7C7FFAF3F71CC56BC22F63CB97322E1BE48B33B9",
|
||||
@@ -274,14 +274,14 @@ $./build/laconicd tx registry dissociate-records c3f7a78c5042d2003880962ba31ff3b
|
||||
> When a record is expires , needs to renew record
|
||||
|
||||
```bash
|
||||
$ ./build/laconicd tx registry renew-record bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae --from root --chain-id ethermint_9000-1
|
||||
$ ./build/laconicd tx registry renew-record bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae --from root --chain-id laconic_9000-1
|
||||
|
||||
```
|
||||
|
||||
## Set the authority name
|
||||
|
||||
```bash
|
||||
$ ./build/laconicd tx registry set-name crn://hello/test test_hello_cid --from root --chain-id ethermint_9000-1 -y -o json | jq .
|
||||
$ ./build/laconicd tx registry set-name crn://hello/test test_hello_cid --from root --chain-id laconic_9000-1 -y -o json | jq .
|
||||
{
|
||||
"height": "0",
|
||||
"txhash": "66A63C73B076EEE9A2F7605354448EDEB161F0115D4D03AF68C01BA28DB97486",
|
||||
@@ -301,7 +301,7 @@ $ ./build/laconicd tx registry set-name crn://hello/test test_hello_cid --from
|
||||
## Delete the name
|
||||
|
||||
```bash
|
||||
$./build/laconicd tx registry delete-name crn://hello/test --from root --chain-id ethermint_9000-1 -y
|
||||
$./build/laconicd tx registry delete-name crn://hello/test --from root --chain-id laconic_9000-1 -y
|
||||
code: 0
|
||||
codespace: ""
|
||||
data: ""
|
||||
|
||||
@@ -161,9 +161,9 @@ $ %s query %s list
|
||||
}
|
||||
|
||||
recordsList := res.GetRecords()
|
||||
records := make([]types.RecordType, len(recordsList))
|
||||
records := make([]types.ReadableRecord, len(recordsList))
|
||||
for i, record := range res.GetRecords() {
|
||||
records[i] = record.ToRecordType()
|
||||
records[i] = record.ToReadableRecord()
|
||||
}
|
||||
bytesResult, err := json.Marshal(records)
|
||||
if err != nil {
|
||||
|
||||
@@ -66,17 +66,10 @@ $ %s tx %s set [payload file path] [bond-id]
|
||||
return err
|
||||
}
|
||||
|
||||
payload, err := payloadType.ToPayload()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
payload := payloadType.ToPayload()
|
||||
|
||||
msg := types.NewMsgSetRecord(payload, args[1], clientCtx.GetFromAddress())
|
||||
err = msg.ValidateBasic()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg)
|
||||
return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -269,7 +262,7 @@ $ %s tx %s set-name [crn] [cid]
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg)
|
||||
return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -377,8 +370,8 @@ $ %s tx %s delete-name [crn]
|
||||
}
|
||||
|
||||
// GetPayloadFromFile Load payload object from YAML file.
|
||||
func GetPayloadFromFile(filePath string) (*types.PayloadType, error) {
|
||||
var payload types.PayloadType
|
||||
func GetPayloadFromFile(filePath string) (*types.ReadablePayload, error) {
|
||||
var payload types.ReadablePayload
|
||||
|
||||
data, err := os.ReadFile(filePath) // #nosec G304
|
||||
if err != nil {
|
||||
|
||||
@@ -433,7 +433,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryGetRecordByID() {
|
||||
}
|
||||
out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, args)
|
||||
sr.NoError(err)
|
||||
var records []nstypes.RecordType
|
||||
var records []nstypes.ReadableRecord
|
||||
err = json.Unmarshal(out.Bytes(), &records)
|
||||
sr.NoError(err)
|
||||
return records[0].ID
|
||||
|
||||
@@ -114,7 +114,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryForRecords() {
|
||||
sr.Error(err)
|
||||
} else {
|
||||
sr.NoError(err)
|
||||
var records []types.RecordType
|
||||
var records []types.ReadableRecord
|
||||
err := json.Unmarshal(out.Bytes(), &records)
|
||||
sr.NoError(err)
|
||||
sr.Equal(tc.noOfRecords, len(records))
|
||||
|
||||
@@ -606,7 +606,7 @@ func (s *IntegrationTestSuite) TestGetCmdDissociateBond() {
|
||||
cmd = cli.GetCmdList()
|
||||
out, err = clitestutil.ExecTestCLICmd(clientCtx, cmd, args)
|
||||
sr.NoError(err)
|
||||
var records []nstypes.RecordType
|
||||
var records []nstypes.ReadableRecord
|
||||
err = json.Unmarshal(out.Bytes(), &records)
|
||||
sr.NoError(err)
|
||||
return records[0].ID
|
||||
@@ -848,7 +848,7 @@ func (s *IntegrationTestSuite) TestGetCmdAssociateBond() {
|
||||
cmd = cli.GetCmdList()
|
||||
out, err = clitestutil.ExecTestCLICmd(clientCtx, cmd, args)
|
||||
sr.NoError(err)
|
||||
var records []nstypes.RecordType
|
||||
var records []nstypes.ReadableRecord
|
||||
err = json.Unmarshal(out.Bytes(), &records)
|
||||
sr.NoError(err)
|
||||
|
||||
|
||||
@@ -47,30 +47,26 @@ func Int64ToBytes(num int64) []byte {
|
||||
return buf.Bytes()
|
||||
}
|
||||
|
||||
// MarshalMapToJSONBytes converts map[string]interface{} to bytes.
|
||||
func MarshalMapToJSONBytes(val map[string]interface{}) (bytes []byte) {
|
||||
func MustMarshalJSON[T any](val T) (bytes []byte) {
|
||||
bytes, err := json.Marshal(val)
|
||||
if err != nil {
|
||||
panic("Marshal error.")
|
||||
panic("JSON marshal error:" + err.Error())
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// UnMarshalMapFromJSONBytes converts bytes to map[string]interface{}.
|
||||
func UnMarshalMapFromJSONBytes(bytes []byte) map[string]interface{} {
|
||||
var val map[string]interface{}
|
||||
func MustUnmarshalJSON[T any](bytes []byte) T {
|
||||
var val T
|
||||
err := json.Unmarshal(bytes, &val)
|
||||
if err != nil {
|
||||
panic("Unmarshal error.")
|
||||
panic("JSON unmarshal error:" + err.Error())
|
||||
}
|
||||
|
||||
return val
|
||||
}
|
||||
|
||||
// GetCid gets the content ID.
|
||||
func GetCid(content []byte) (string, error) {
|
||||
return wnsUtils.CIDFromJSONBytesUsingIpldPrime(content)
|
||||
return wnsUtils.CIDFromJSONBytes(content)
|
||||
}
|
||||
|
||||
// BytesToBase64 encodes a byte array as a base64 string.
|
||||
|
||||
@@ -3,6 +3,7 @@ package keeper
|
||||
import (
|
||||
"context"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"github.com/cerc-io/laconicd/x/registry/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
@@ -48,7 +49,7 @@ func (q Querier) GetRecord(c context.Context, req *types.QueryRecordByIDRequest)
|
||||
ctx := sdk.UnwrapSDKContext(c)
|
||||
id := req.GetId()
|
||||
if !q.Keeper.HasRecord(ctx, id) {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "Record not found.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrUnknownRequest, "Record not found.")
|
||||
}
|
||||
record := q.Keeper.GetRecord(ctx, id)
|
||||
return &types.QueryRecordByIDResponse{Record: record}, nil
|
||||
@@ -86,11 +87,11 @@ func (q Querier) LookupCrn(c context.Context, req *types.QueryLookupCrn) (*types
|
||||
ctx := sdk.UnwrapSDKContext(c)
|
||||
crn := req.GetCrn()
|
||||
if !q.Keeper.HasNameRecord(ctx, crn) {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "CRN not found.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrUnknownRequest, "CRN not found.")
|
||||
}
|
||||
nameRecord := q.Keeper.GetNameRecord(ctx, crn)
|
||||
if nameRecord == nil {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "name record not found.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrUnknownRequest, "name record not found.")
|
||||
}
|
||||
return &types.QueryLookupCrnResponse{Name: nameRecord}, nil
|
||||
}
|
||||
@@ -100,7 +101,7 @@ func (q Querier) ResolveCrn(c context.Context, req *types.QueryResolveCrn) (*typ
|
||||
crn := req.GetCrn()
|
||||
record := q.Keeper.ResolveCRN(ctx, crn)
|
||||
if record == nil {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "record not found.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrUnknownRequest, "record not found.")
|
||||
}
|
||||
return &types.QueryResolveCrnResponse{Record: record}, nil
|
||||
}
|
||||
|
||||
@@ -68,8 +68,7 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() {
|
||||
{
|
||||
Key: "type",
|
||||
Value: ®istrytypes.QueryListRecordsRequest_ValueInput{
|
||||
Type: "string",
|
||||
String_: "WebsiteRegistrationRecord",
|
||||
Value: ®istrytypes.QueryListRecordsRequest_ValueInput_String_{"WebsiteRegistrationRecord"},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -86,8 +85,7 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() {
|
||||
{
|
||||
Key: "x500state_name",
|
||||
Value: ®istrytypes.QueryListRecordsRequest_ValueInput{
|
||||
Type: "string",
|
||||
String_: "california",
|
||||
Value: ®istrytypes.QueryListRecordsRequest_ValueInput_String_{"california"},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -106,8 +104,7 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() {
|
||||
sr.NoError(err)
|
||||
payloadType, err := cli.GetPayloadFromFile(fmt.Sprint(dir, example))
|
||||
sr.NoError(err)
|
||||
payload, err := payloadType.ToPayload()
|
||||
sr.NoError(err)
|
||||
payload := payloadType.ToPayload()
|
||||
record, err := suite.app.RegistryKeeper.ProcessSetRecord(ctx, registrytypes.MsgSetRecord{
|
||||
BondId: suite.bond.GetId(),
|
||||
Signer: suite.accounts[0].String(),
|
||||
@@ -129,14 +126,16 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() {
|
||||
sr.Equal(resp.GetRecords()[0].GetBondId(), suite.bond.GetId())
|
||||
|
||||
for _, record := range resp.GetRecords() {
|
||||
bz, err := registrytypes.GetJSONBytesFromAny(*record.Attributes)
|
||||
sr.NoError(err)
|
||||
recAttr := helpers.UnMarshalMapFromJSONBytes(bz)
|
||||
recAttr := helpers.MustUnmarshalJSON[registrytypes.AttributeMap](record.Attributes)
|
||||
|
||||
for _, attr := range test.req.GetAttributes() {
|
||||
enc, err := keeper.QueryValueToJSON(attr.Value)
|
||||
sr.NoError(err)
|
||||
expected := helpers.MustUnmarshalJSON[any](enc)
|
||||
if attr.Key[:4] == "x500" {
|
||||
sr.Equal(keeper.GetAttributeValue(attr.Value), recAttr["x500"].(map[string]interface{})[attr.Key[4:]])
|
||||
sr.Equal(expected, recAttr["x500"].(map[string]interface{})[attr.Key[4:]])
|
||||
} else {
|
||||
sr.Equal(keeper.GetAttributeValue(attr.Value), recAttr[attr.Key])
|
||||
sr.Equal(expected, recAttr[attr.Key])
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -258,8 +257,7 @@ func (suite *KeeperTestSuite) TestGrpcQueryRegistryModuleBalance() {
|
||||
for _, example := range examples {
|
||||
payloadType, err := cli.GetPayloadFromFile(fmt.Sprint(dir, example))
|
||||
sr.NoError(err)
|
||||
payload, err := payloadType.ToPayload()
|
||||
sr.NoError(err)
|
||||
payload := payloadType.ToPayload()
|
||||
record, err := suite.app.RegistryKeeper.ProcessSetRecord(ctx, registrytypes.MsgSetRecord{
|
||||
BondId: suite.bond.GetId(),
|
||||
Signer: suite.accounts[0].String(),
|
||||
|
||||
+128
-83
@@ -7,10 +7,7 @@ import (
|
||||
"sort"
|
||||
"time"
|
||||
|
||||
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"
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
"github.com/cosmos/cosmos-sdk/codec/legacy"
|
||||
storetypes "github.com/cosmos/cosmos-sdk/store/types"
|
||||
@@ -19,6 +16,18 @@ import (
|
||||
auth "github.com/cosmos/cosmos-sdk/x/auth/keeper"
|
||||
bank "github.com/cosmos/cosmos-sdk/x/bank/keeper"
|
||||
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 (
|
||||
@@ -95,6 +104,11 @@ func NewKeeper(cdc codec.BinaryCodec, accountKeeper auth.AccountKeeper, bankKeep
|
||||
}
|
||||
}
|
||||
|
||||
// logger returns a module-specific logger.
|
||||
func logger(ctx sdk.Context) log.Logger {
|
||||
return ctx.Logger().With("module", types.ModuleName)
|
||||
}
|
||||
|
||||
// GetRecordIndexKey Generates Bond ID -> Bond index key.
|
||||
func GetRecordIndexKey(id string) []byte {
|
||||
return append(PrefixCIDToRecordIndex, []byte(id)...)
|
||||
@@ -111,6 +125,7 @@ func (k Keeper) GetRecord(ctx sdk.Context, id string) (record types.Record) {
|
||||
store := ctx.KVStore(k.storeKey)
|
||||
result := store.Get(GetRecordIndexKey(id))
|
||||
k.cdc.MustUnmarshal(result, &record)
|
||||
decodeRecordNames(store, &record)
|
||||
return record
|
||||
}
|
||||
|
||||
@@ -124,20 +139,25 @@ func (k Keeper) ListRecords(ctx sdk.Context) []types.Record {
|
||||
for ; itr.Valid(); itr.Next() {
|
||||
bz := store.Get(itr.Key())
|
||||
if bz != nil {
|
||||
var obj types.Record
|
||||
k.cdc.MustUnmarshal(bz, &obj)
|
||||
records = append(records, recordObjToRecord(store, obj))
|
||||
var record types.Record
|
||||
k.cdc.MustUnmarshal(bz, &record)
|
||||
decodeRecordNames(store, &record)
|
||||
records = append(records, record)
|
||||
}
|
||||
}
|
||||
|
||||
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) {
|
||||
resultRecordIds := []string{}
|
||||
for i, attr := range attributes {
|
||||
val := GetAttributeValue(attr.Value)
|
||||
attributeIndex := GetAttributesIndexKey(attr.Key, val)
|
||||
suffix, err := QueryValueToJSON(attr.Value)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
attributeIndex := GetAttributesIndexKey(attr.Key, suffix)
|
||||
recordIds, err := k.GetAttributeMapping(ctx, attributeIndex)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -156,32 +176,47 @@ func (k Keeper) RecordsFromAttributes(ctx sdk.Context, attributes []*types.Query
|
||||
continue
|
||||
}
|
||||
store := ctx.KVStore(k.storeKey)
|
||||
recordWithNames := recordObjToRecord(store, record)
|
||||
if !all && len(recordWithNames.Names) == 0 {
|
||||
decodeRecordNames(store, &record)
|
||||
if !all && len(record.Names) == 0 {
|
||||
continue
|
||||
}
|
||||
records = append(records, recordWithNames)
|
||||
records = append(records, record)
|
||||
}
|
||||
return records, nil
|
||||
}
|
||||
|
||||
func GetAttributeValue(input *types.QueryListRecordsRequest_ValueInput) interface{} {
|
||||
if input.Type == "int" {
|
||||
return input.GetInt()
|
||||
// TODO not recursive, and only should be if we want to support querying with whole sub-objects,
|
||||
// which seems unnecessary.
|
||||
func QueryValueToJSON(input *types.QueryListRecordsRequest_ValueInput) ([]byte, error) {
|
||||
np := basicnode.Prototype.Any
|
||||
nb := np.NewBuilder()
|
||||
|
||||
switch value := input.GetValue().(type) {
|
||||
case *types.QueryListRecordsRequest_ValueInput_String_:
|
||||
nb.AssignString(value.String_)
|
||||
case *types.QueryListRecordsRequest_ValueInput_Int:
|
||||
nb.AssignInt(value.Int)
|
||||
case *types.QueryListRecordsRequest_ValueInput_Float:
|
||||
nb.AssignFloat(value.Float)
|
||||
case *types.QueryListRecordsRequest_ValueInput_Boolean:
|
||||
nb.AssignBool(value.Boolean)
|
||||
case *types.QueryListRecordsRequest_ValueInput_Link:
|
||||
link := cidlink.Link{Cid: cid.MustParse(value.Link)}
|
||||
nb.AssignLink(link)
|
||||
case *types.QueryListRecordsRequest_ValueInput_Array:
|
||||
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)
|
||||
}
|
||||
if input.Type == "float" {
|
||||
return input.GetFloat()
|
||||
|
||||
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)
|
||||
}
|
||||
if input.Type == "string" {
|
||||
return input.GetString_()
|
||||
}
|
||||
if input.Type == "boolean" {
|
||||
return input.GetBoolean()
|
||||
}
|
||||
if input.Type == "reference" {
|
||||
return input.GetReference().GetId()
|
||||
}
|
||||
return nil
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
func getIntersection(a []string, b []string) []string {
|
||||
@@ -232,15 +267,15 @@ func (k Keeper) GetRecordExpiryQueue(ctx sdk.Context) []*types.ExpiryQueueRecord
|
||||
}
|
||||
|
||||
// ProcessSetRecord creates a record.
|
||||
func (k Keeper) ProcessSetRecord(ctx sdk.Context, msg types.MsgSetRecord) (*types.RecordType, error) {
|
||||
func (k Keeper) ProcessSetRecord(ctx sdk.Context, msg types.MsgSetRecord) (*types.ReadableRecord, error) {
|
||||
payload := msg.Payload.ToReadablePayload()
|
||||
record := types.RecordType{Attributes: payload.Record, BondID: msg.BondId}
|
||||
record := types.ReadableRecord{Attributes: payload.RecordAttributes, BondID: msg.BondId}
|
||||
|
||||
// Check signatures.
|
||||
resourceSignBytes, _ := record.GetSignBytes()
|
||||
cid, err := record.GetCID()
|
||||
if err != nil {
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid record JSON")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid record JSON")
|
||||
}
|
||||
|
||||
record.ID = cid
|
||||
@@ -254,14 +289,12 @@ func (k Keeper) ProcessSetRecord(ctx sdk.Context, msg types.MsgSetRecord) (*type
|
||||
for _, sig := range payload.Signatures {
|
||||
pubKey, err := legacy.PubKeyFromBytes(helpers.BytesFromBase64(sig.PubKey))
|
||||
if err != nil {
|
||||
fmt.Println("Error decoding pubKey from bytes: ", err)
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Invalid public key.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, fmt.Sprint("Error decoding pubKey from bytes: ", err))
|
||||
}
|
||||
|
||||
sigOK := pubKey.VerifySignature(resourceSignBytes, helpers.BytesFromBase64(sig.Sig))
|
||||
if !sigOK {
|
||||
fmt.Println("Signature mismatch: ", sig.PubKey)
|
||||
return nil, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Invalid signature.")
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, fmt.Sprint("Signature mismatch: ", sig.PubKey))
|
||||
}
|
||||
record.Owners = append(record.Owners, pubKey.Address().String())
|
||||
}
|
||||
@@ -275,11 +308,13 @@ func (k Keeper) ProcessSetRecord(ctx sdk.Context, msg types.MsgSetRecord) (*type
|
||||
return &record, nil
|
||||
}
|
||||
|
||||
func (k Keeper) processRecord(ctx sdk.Context, record *types.RecordType, isRenewal bool) error {
|
||||
func (k Keeper) processRecord(ctx sdk.Context, record *types.ReadableRecord, isRenewal bool) error {
|
||||
params := k.GetParams(ctx)
|
||||
rent := params.RecordRent
|
||||
|
||||
err := k.bondKeeper.TransferCoinsToModuleAccount(ctx, record.BondID, types.RecordRentModuleAccountName, sdk.NewCoins(rent))
|
||||
err := k.bondKeeper.TransferCoinsToModuleAccount(
|
||||
ctx, record.BondID, types.RecordRentModuleAccountName, sdk.NewCoins(rent),
|
||||
)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -294,7 +329,15 @@ func (k Keeper) processRecord(ctx sdk.Context, record *types.RecordType, isRenew
|
||||
}
|
||||
k.PutRecord(ctx, recordObj)
|
||||
|
||||
if err := k.ProcessAttributes(ctx, *record); err != nil {
|
||||
// TODO process type here
|
||||
// recordType, ok := record.Attributes["type"].(string)
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
@@ -315,52 +358,58 @@ func (k Keeper) PutRecord(ctx sdk.Context, record types.Record) {
|
||||
k.updateBlockChangeSetForRecord(ctx, record.Id)
|
||||
}
|
||||
|
||||
func (k Keeper) ProcessAttributes(ctx sdk.Context, record types.RecordType) error {
|
||||
switch record.Attributes["type"] {
|
||||
case "ServiceProviderRegistration":
|
||||
{
|
||||
// #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
|
||||
}
|
||||
}
|
||||
} else {
|
||||
indexKey := GetAttributesIndexKey(key, record.Attributes[key])
|
||||
if err := k.SetAttributeMapping(ctx, indexKey, record.ID); err != nil {
|
||||
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 {
|
||||
func (k Keeper) processAttributes(ctx sdk.Context, attrs types.AttributeMap, id string, prefix string) error {
|
||||
np := basicnode.Prototype.Map
|
||||
nb := np.NewBuilder()
|
||||
encAttrs, err := canonicaljson.Marshal(attrs)
|
||||
if err != nil {
|
||||
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(); {
|
||||
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 {
|
||||
k.processAttributeMap(ctx, valuenode, id, key)
|
||||
} else {
|
||||
var buf bytes.Buffer
|
||||
if err := dagjson.Encode(valuenode, &buf); err != nil {
|
||||
return err
|
||||
}
|
||||
value := buf.Bytes()
|
||||
indexKey := GetAttributesIndexKey(prefix+key, value)
|
||||
if err := k.SetAttributeMapping(ctx, indexKey, id); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetAttributesIndexKey(key string, value interface{}) []byte {
|
||||
keyString := fmt.Sprintf("%s%s", key, value)
|
||||
func GetAttributesIndexKey(key string, suffix []byte) []byte {
|
||||
keyString := fmt.Sprintf("%s%s", key, suffix)
|
||||
return append(PrefixAttributesIndex, []byte(keyString)...)
|
||||
}
|
||||
|
||||
@@ -372,8 +421,6 @@ func (k Keeper) SetAttributeMapping(ctx sdk.Context, key []byte, recordID string
|
||||
if err != nil {
|
||||
return fmt.Errorf("cannot unmarshal byte array, error, %w", err)
|
||||
}
|
||||
} else {
|
||||
recordIds = []string{}
|
||||
}
|
||||
recordIds = append(recordIds, recordID)
|
||||
bz, err := json.Marshal(recordIds)
|
||||
@@ -393,7 +440,7 @@ func (k Keeper) GetAttributeMapping(ctx sdk.Context, key []byte) ([]string, erro
|
||||
|
||||
var recordIds []string
|
||||
if err := json.Unmarshal(store.Get(key), &recordIds); err != nil {
|
||||
return nil, fmt.Errorf("cannont unmarshal byte array, error, %w", err)
|
||||
return nil, fmt.Errorf("cannot unmarshal byte array, error, %w", err)
|
||||
}
|
||||
|
||||
return recordIds, nil
|
||||
@@ -571,7 +618,7 @@ func (k Keeper) GetModuleBalances(ctx sdk.Context) []*types.AccountBalance {
|
||||
return balances
|
||||
}
|
||||
|
||||
func recordObjToRecord(store sdk.KVStore, record types.Record) types.Record {
|
||||
func decodeRecordNames(store sdk.KVStore, record *types.Record) {
|
||||
reverseNameIndexKey := GetCIDToNamesIndexKey(record.Id)
|
||||
|
||||
if store.Has(reverseNameIndexKey) {
|
||||
@@ -582,6 +629,4 @@ func recordObjToRecord(store sdk.KVStore, record types.Record) types.Record {
|
||||
|
||||
record.Names = names
|
||||
}
|
||||
|
||||
return record
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
auctiontypes "github.com/cerc-io/laconicd/x/auction/types"
|
||||
"github.com/cerc-io/laconicd/x/registry/helpers"
|
||||
"github.com/cerc-io/laconicd/x/registry/types"
|
||||
@@ -112,12 +113,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) {
|
||||
parsedCRN, err := url.Parse(crn)
|
||||
if err != nil {
|
||||
return "", nil, nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid CRN.")
|
||||
return "", nil, nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid CRN.")
|
||||
}
|
||||
|
||||
name := parsedCRN.Host
|
||||
if !k.HasNameAuthority(ctx, name) {
|
||||
return name, nil, nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Name authority not found.")
|
||||
return name, nil, nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Name authority not found.")
|
||||
}
|
||||
authority := k.GetNameAuthority(ctx, name)
|
||||
return name, parsedCRN, &authority, nil
|
||||
@@ -131,19 +132,19 @@ func (k Keeper) checkCRNAccess(ctx sdk.Context, signer sdk.AccAddress, crn strin
|
||||
|
||||
formattedCRN := fmt.Sprintf("crn://%s%s", name, parsedCRN.RequestURI())
|
||||
if formattedCRN != crn {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid CRN.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid CRN.")
|
||||
}
|
||||
|
||||
if authority.OwnerAddress != signer.String() {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Access denied.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Access denied.")
|
||||
}
|
||||
|
||||
if authority.Status != types.AuthorityActive {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Authority is not active.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Authority is not active.")
|
||||
}
|
||||
|
||||
if authority.BondId == "" || len(authority.BondId) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Authority bond not found.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Authority bond not found.")
|
||||
}
|
||||
|
||||
if authority.OwnerPublicKey == "" {
|
||||
@@ -323,13 +324,13 @@ func (k Keeper) ProcessReserveSubAuthority(ctx sdk.Context, name string, msg typ
|
||||
|
||||
// Check if parent authority exists.
|
||||
if !k.HasNameAuthority(ctx, parent) {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Parent authority not found.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Parent authority not found.")
|
||||
}
|
||||
parentAuthority := k.GetNameAuthority(ctx, parent)
|
||||
|
||||
// Sub-authority creator needs to be the owner of the parent authority.
|
||||
if parentAuthority.OwnerAddress != msg.Signer {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Access denied.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Access denied.")
|
||||
}
|
||||
|
||||
// Sub-authority owner defaults to parent authority owner.
|
||||
@@ -362,17 +363,17 @@ func (k Keeper) createAuthority(ctx sdk.Context, name string, owner string, isRo
|
||||
if k.HasNameAuthority(ctx, name) {
|
||||
authority := k.GetNameAuthority(ctx, name)
|
||||
if authority.Status != types.AuthorityExpired {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Name already reserved.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Name already reserved.")
|
||||
}
|
||||
}
|
||||
|
||||
ownerAddress, err := sdk.AccAddressFromBech32(owner)
|
||||
if err != nil {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid owner address.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid owner address.")
|
||||
}
|
||||
ownerAccount := k.accountKeeper.GetAccount(ctx, ownerAddress)
|
||||
if ownerAccount == nil {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrUnknownAddress, "Account not found.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrUnknownAddress, "Account not found.")
|
||||
}
|
||||
|
||||
authority := types.NameAuthority{
|
||||
@@ -430,11 +431,11 @@ func (k Keeper) ProcessReserveAuthority(ctx sdk.Context, msg types.MsgReserveAut
|
||||
crn := fmt.Sprintf("crn://%s", msg.GetName())
|
||||
parsedCrn, err := url.Parse(crn)
|
||||
if err != nil {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid name")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid name")
|
||||
}
|
||||
name := parsedCrn.Host
|
||||
if fmt.Sprintf("crn://%s", name) != crn {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid name")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid name")
|
||||
}
|
||||
if strings.Contains(name, ".") {
|
||||
return k.ProcessReserveSubAuthority(ctx, name, msg)
|
||||
@@ -450,20 +451,20 @@ func (k Keeper) ProcessSetAuthorityBond(ctx sdk.Context, msg types.MsgSetAuthori
|
||||
name := msg.GetName()
|
||||
signer := msg.GetSigner()
|
||||
if !k.HasNameAuthority(ctx, name) {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Name authority not found.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Name authority not found.")
|
||||
}
|
||||
authority := k.GetNameAuthority(ctx, name)
|
||||
if authority.OwnerAddress != signer {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Access denied")
|
||||
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Access denied")
|
||||
}
|
||||
|
||||
if !k.bondKeeper.HasBond(ctx, msg.BondId) {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.")
|
||||
}
|
||||
//
|
||||
bond := k.bondKeeper.GetBond(ctx, msg.BondId)
|
||||
if bond.Owner != signer {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.")
|
||||
}
|
||||
|
||||
// No-op if bond hasn't changed.
|
||||
@@ -496,7 +497,7 @@ func (k Keeper) ProcessDeleteName(ctx sdk.Context, msg types.MsgDeleteNameAuthor
|
||||
}
|
||||
|
||||
if !k.HasNameRecord(ctx, msg.Crn) {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Name not found.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Name not found.")
|
||||
}
|
||||
|
||||
// Set CID to empty string.
|
||||
@@ -610,7 +611,7 @@ func (k Keeper) ProcessAuthorityExpiryQueue(ctx sdk.Context) {
|
||||
k.SetNameAuthority(ctx, name, &authority)
|
||||
k.DeleteAuthorityExpiryQueue(ctx, name, authority)
|
||||
|
||||
ctx.Logger().Info(fmt.Sprintf("Marking authority expired as no bond present: %s", name))
|
||||
logger(ctx).Info(fmt.Sprintf("Marking authority expired as no bond present: %s", name))
|
||||
|
||||
return
|
||||
}
|
||||
@@ -671,7 +672,7 @@ func (k Keeper) AuthorityExpiryQueueIterator(ctx sdk.Context, endTime time.Time)
|
||||
|
||||
// TryTakeAuthorityRent tries to take rent from the authority bond.
|
||||
func (k Keeper) TryTakeAuthorityRent(ctx sdk.Context, name string, authority types.NameAuthority) {
|
||||
ctx.Logger().Info(fmt.Sprintf("Trying to take rent for authority: %s", name))
|
||||
logger(ctx).Info(fmt.Sprintf("Trying to take rent for authority: %s", name))
|
||||
|
||||
params := k.GetParams(ctx)
|
||||
rent := params.AuthorityRent
|
||||
@@ -683,7 +684,7 @@ func (k Keeper) TryTakeAuthorityRent(ctx sdk.Context, name string, authority typ
|
||||
k.SetNameAuthority(ctx, name, &authority)
|
||||
k.DeleteAuthorityExpiryQueue(ctx, name, authority)
|
||||
|
||||
ctx.Logger().Info(fmt.Sprintf("Insufficient funds in owner account to pay authority rent, marking as expired: %s", name))
|
||||
logger(ctx).Info(fmt.Sprintf("Insufficient funds in owner account to pay authority rent, marking as expired: %s", name))
|
||||
|
||||
return
|
||||
}
|
||||
@@ -698,7 +699,7 @@ func (k Keeper) TryTakeAuthorityRent(ctx sdk.Context, name string, authority typ
|
||||
k.SetNameAuthority(ctx, name, &authority)
|
||||
k.AddBondToAuthorityIndexEntry(ctx, authority.BondId, name)
|
||||
|
||||
ctx.Logger().Info(fmt.Sprintf("Authority rent paid successfully: %s", name))
|
||||
logger(ctx).Info(fmt.Sprintf("Authority rent paid successfully: %s", name))
|
||||
}
|
||||
|
||||
// ListNameAuthorityRecords - get all name authority records.
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
auctionkeeper "github.com/cerc-io/laconicd/x/auction/keeper"
|
||||
auctiontypes "github.com/cerc-io/laconicd/x/auction/types"
|
||||
bondtypes "github.com/cerc-io/laconicd/x/bond/types"
|
||||
@@ -38,14 +39,14 @@ func (k RecordKeeper) OnAuctionWinnerSelected(ctx sdk.Context, auctionID string)
|
||||
name := k.GetAuctionToAuthorityMapping(ctx, auctionID)
|
||||
if name == "" {
|
||||
// We don't know about this auction, ignore.
|
||||
ctx.Logger().Info(fmt.Sprintf("Ignoring auction notification, name mapping not found: %s", auctionID))
|
||||
logger(ctx).Info(fmt.Sprintf("Ignoring auction notification, name mapping not found: %s", auctionID))
|
||||
return
|
||||
}
|
||||
|
||||
store := ctx.KVStore(k.storeKey)
|
||||
if !HasNameAuthority(store, name) {
|
||||
// We don't know about this authority, ignore.
|
||||
ctx.Logger().Info(fmt.Sprintf("Ignoring auction notification, authority not found: %s", auctionID))
|
||||
logger(ctx).Info(fmt.Sprintf("Ignoring auction notification, authority not found: %s", auctionID))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -70,12 +71,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).
|
||||
authority.Height = uint64(ctx.BlockHeight())
|
||||
|
||||
ctx.Logger().Info(fmt.Sprintf("Winner selected, marking authority as active: %s", name))
|
||||
logger(ctx).Info(fmt.Sprintf("Winner selected, marking authority as active: %s", name))
|
||||
} else {
|
||||
// Mark as expired.
|
||||
authority.Status = types.AuthorityExpired
|
||||
|
||||
ctx.Logger().Info(fmt.Sprintf("No winner, marking authority as expired: %s", name))
|
||||
logger(ctx).Info(fmt.Sprintf("No winner, marking authority as expired: %s", name))
|
||||
}
|
||||
|
||||
authority.AuctionId = ""
|
||||
@@ -84,7 +85,7 @@ func (k RecordKeeper) OnAuctionWinnerSelected(ctx sdk.Context, auctionID string)
|
||||
// Forget about this auction now, we no longer need it.
|
||||
removeAuctionToAuthorityMapping(store, auctionID)
|
||||
} else {
|
||||
ctx.Logger().Info(fmt.Sprintf("Ignoring auction notification, status: %s", auctionObj.Status))
|
||||
logger(ctx).Info(fmt.Sprintf("Ignoring auction notification, status: %s", auctionObj.Status))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,9 +147,10 @@ func (k RecordKeeper) QueryRecordsByBond(ctx sdk.Context, bondID string) []types
|
||||
cid := itr.Key()[len(bondIDPrefix):]
|
||||
bz := store.Get(append(PrefixCIDToRecordIndex, cid...))
|
||||
if bz != nil {
|
||||
var obj types.Record
|
||||
k.cdc.MustUnmarshal(bz, &obj)
|
||||
records = append(records, recordObjToRecord(store, obj))
|
||||
var record types.Record
|
||||
k.cdc.MustUnmarshal(bz, &record)
|
||||
decodeRecordNames(store, &record)
|
||||
records = append(records, record)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,7 +160,7 @@ func (k RecordKeeper) QueryRecordsByBond(ctx sdk.Context, bondID string) []types
|
||||
// ProcessRenewRecord renews a record.
|
||||
func (k Keeper) ProcessRenewRecord(ctx sdk.Context, msg types.MsgRenewRecord) error {
|
||||
if !k.HasRecord(ctx, msg.RecordId) {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Record not found.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Record not found.")
|
||||
}
|
||||
|
||||
// Check if renewal is required (i.e. expired record marked as deleted).
|
||||
@@ -169,10 +171,10 @@ func (k Keeper) ProcessRenewRecord(ctx sdk.Context, msg types.MsgRenewRecord) er
|
||||
}
|
||||
|
||||
if !record.Deleted || expiryTime.After(ctx.BlockTime()) {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Renewal not required.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Renewal not required.")
|
||||
}
|
||||
|
||||
recordType := record.ToRecordType()
|
||||
recordType := record.ToReadableRecord()
|
||||
err = k.processRecord(ctx, &recordType, true)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -184,23 +186,23 @@ func (k Keeper) ProcessRenewRecord(ctx sdk.Context, msg types.MsgRenewRecord) er
|
||||
// ProcessAssociateBond associates a record with a bond.
|
||||
func (k Keeper) ProcessAssociateBond(ctx sdk.Context, msg types.MsgAssociateBond) error {
|
||||
if !k.HasRecord(ctx, msg.RecordId) {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Record not found.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Record not found.")
|
||||
}
|
||||
|
||||
if !k.bondKeeper.HasBond(ctx, msg.BondId) {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.")
|
||||
}
|
||||
|
||||
// Check if already associated with a bond.
|
||||
record := k.GetRecord(ctx, msg.RecordId)
|
||||
if record.BondId != "" || len(record.BondId) != 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Bond already exists.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond already exists.")
|
||||
}
|
||||
|
||||
// Only the bond owner can associate a record with the bond.
|
||||
bond := k.bondKeeper.GetBond(ctx, msg.BondId)
|
||||
if msg.Signer != bond.Owner {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.")
|
||||
}
|
||||
|
||||
record.BondId = msg.BondId
|
||||
@@ -218,20 +220,20 @@ func (k Keeper) ProcessAssociateBond(ctx sdk.Context, msg types.MsgAssociateBond
|
||||
// ProcessDissociateBond dissociates a record from its bond.
|
||||
func (k Keeper) ProcessDissociateBond(ctx sdk.Context, msg types.MsgDissociateBond) error {
|
||||
if !k.HasRecord(ctx, msg.RecordId) {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Record not found.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Record not found.")
|
||||
}
|
||||
|
||||
// Check if associated with a bond.
|
||||
record := k.GetRecord(ctx, msg.RecordId)
|
||||
bondID := record.BondId
|
||||
if bondID == "" || len(bondID) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Bond not found.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond not found.")
|
||||
}
|
||||
|
||||
// Only the bond owner can dissociate a record from the bond.
|
||||
bond := k.bondKeeper.GetBond(ctx, bondID)
|
||||
if msg.Signer != bond.Owner {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.")
|
||||
}
|
||||
|
||||
// Clear bond ID.
|
||||
@@ -245,13 +247,13 @@ func (k Keeper) ProcessDissociateBond(ctx sdk.Context, msg types.MsgDissociateBo
|
||||
// ProcessDissociateRecords dissociates all records associated with a given bond.
|
||||
func (k Keeper) ProcessDissociateRecords(ctx sdk.Context, msg types.MsgDissociateRecords) error {
|
||||
if !k.bondKeeper.HasBond(ctx, msg.BondId) {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bond not found.")
|
||||
}
|
||||
|
||||
// Only the bond owner can dissociate all records from the bond.
|
||||
bond := k.bondKeeper.GetBond(ctx, msg.BondId)
|
||||
if msg.Signer != bond.Owner {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond owner mismatch.")
|
||||
}
|
||||
|
||||
// Dissociate all records from the bond.
|
||||
@@ -269,22 +271,22 @@ func (k Keeper) ProcessDissociateRecords(ctx sdk.Context, msg types.MsgDissociat
|
||||
// ProcessReAssociateRecords switches records from and old to new bond.
|
||||
func (k Keeper) ProcessReAssociateRecords(ctx sdk.Context, msg types.MsgReAssociateRecords) error {
|
||||
if !k.bondKeeper.HasBond(ctx, msg.OldBondId) {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Old bond not found.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Old bond not found.")
|
||||
}
|
||||
|
||||
if !k.bondKeeper.HasBond(ctx, msg.NewBondId) {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "New bond not found.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "New bond not found.")
|
||||
}
|
||||
|
||||
// Only the bond owner can re-associate all records.
|
||||
oldBond := k.bondKeeper.GetBond(ctx, msg.OldBondId)
|
||||
if msg.Signer != oldBond.Owner {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Old bond owner mismatch.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Old bond owner mismatch.")
|
||||
}
|
||||
|
||||
newBond := k.bondKeeper.GetBond(ctx, msg.NewBondId)
|
||||
if msg.Signer != newBond.Owner {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "New bond owner mismatch.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "New bond owner mismatch.")
|
||||
}
|
||||
|
||||
// Re-associate all records.
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
package types
|
||||
|
||||
type Attributes interface {
|
||||
GetType() string
|
||||
}
|
||||
Generated
-1412
File diff suppressed because it is too large
Load Diff
@@ -39,17 +39,6 @@ func RegisterInterfaces(registry types.InterfaceRegistry) {
|
||||
&MsgReAssociateRecords{},
|
||||
)
|
||||
|
||||
registry.RegisterInterface(
|
||||
"vulcanize.registry.v1beta1.ServiceProvideRegistration",
|
||||
(*Attributes)(nil),
|
||||
&ServiceProviderRegistration{},
|
||||
)
|
||||
|
||||
registry.RegisterInterface(
|
||||
"vulcanize.registry.v1beta1.WebsiteRegistrationRecord",
|
||||
(*Attributes)(nil),
|
||||
&WebsiteRegistrationRecord{},
|
||||
)
|
||||
msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc)
|
||||
}
|
||||
|
||||
|
||||
+14
-13
@@ -3,6 +3,7 @@ package types
|
||||
import (
|
||||
"net/url"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
)
|
||||
@@ -15,8 +16,8 @@ var (
|
||||
)
|
||||
|
||||
// NewMsgSetName is the constructor function for MsgSetName.
|
||||
func NewMsgSetName(crn string, cid string, signer sdk.AccAddress) MsgSetName {
|
||||
return MsgSetName{
|
||||
func NewMsgSetName(crn string, cid string, signer sdk.AccAddress) *MsgSetName {
|
||||
return &MsgSetName{
|
||||
Crn: crn,
|
||||
Cid: cid,
|
||||
Signer: signer.String(),
|
||||
@@ -32,15 +33,15 @@ func (msg MsgSetName) Type() string { return "set-name" }
|
||||
// ValidateBasic Implements Msg.
|
||||
func (msg MsgSetName) ValidateBasic() error {
|
||||
if msg.Crn == "" {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "CRN is required.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "CRN is required.")
|
||||
}
|
||||
|
||||
if msg.Cid == "" {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "CID is required.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "CID is required.")
|
||||
}
|
||||
|
||||
if len(msg.Signer) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer")
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -76,11 +77,11 @@ func (msg MsgReserveAuthority) Type() string { return "reserve-authority" }
|
||||
// ValidateBasic Implements Msg.
|
||||
func (msg MsgReserveAuthority) ValidateBasic() error {
|
||||
if len(msg.Name) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "name is required.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "name is required.")
|
||||
}
|
||||
|
||||
if len(msg.Signer) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer")
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -116,15 +117,15 @@ func (msg MsgSetAuthorityBond) Type() string { return "authority-bond" }
|
||||
// ValidateBasic Implements Msg.
|
||||
func (msg MsgSetAuthorityBond) ValidateBasic() error {
|
||||
if len(msg.Name) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "name is required.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "name is required.")
|
||||
}
|
||||
|
||||
if len(msg.Signer) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.")
|
||||
}
|
||||
|
||||
if len(msg.BondId) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "bond id is required.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "bond id is required.")
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -159,16 +160,16 @@ func (msg MsgDeleteNameAuthority) Type() string { return "delete-name" }
|
||||
// ValidateBasic Implements Msg.
|
||||
func (msg MsgDeleteNameAuthority) ValidateBasic() error {
|
||||
if len(msg.Crn) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "crn is required.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "crn is required.")
|
||||
}
|
||||
|
||||
if len(msg.Signer) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.")
|
||||
}
|
||||
|
||||
_, err := url.Parse(msg.Crn)
|
||||
if err != nil {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "invalid crn.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid crn.")
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Generated
+1017
-362
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
cdctypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
)
|
||||
@@ -13,13 +13,11 @@ var (
|
||||
_ sdk.Msg = &MsgDissociateBond{}
|
||||
_ sdk.Msg = &MsgDissociateRecords{}
|
||||
_ sdk.Msg = &MsgReAssociateRecords{}
|
||||
|
||||
_ cdctypes.UnpackInterfacesMessage = &MsgSetRecord{}
|
||||
)
|
||||
|
||||
// NewMsgSetRecord is the constructor function for MsgSetRecord.
|
||||
func NewMsgSetRecord(payload Payload, bondID string, signer sdk.AccAddress) MsgSetRecord {
|
||||
return MsgSetRecord{
|
||||
func NewMsgSetRecord(payload Payload, bondID string, signer sdk.AccAddress) *MsgSetRecord {
|
||||
return &MsgSetRecord{
|
||||
Payload: payload,
|
||||
BondId: bondID,
|
||||
Signer: signer.String(),
|
||||
@@ -34,17 +32,17 @@ func (msg MsgSetRecord) Type() string { return "set-record" }
|
||||
|
||||
func (msg MsgSetRecord) ValidateBasic() error {
|
||||
if len(msg.Signer) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer)
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer)
|
||||
}
|
||||
owners := msg.Payload.Record.Owners
|
||||
for _, owner := range owners {
|
||||
if owner == "" {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Record owner not set.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Record owner not set.")
|
||||
}
|
||||
}
|
||||
|
||||
if len(msg.BondId) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Bond ID is required.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Bond ID is required.")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -60,12 +58,6 @@ func (msg MsgSetRecord) GetSignBytes() []byte {
|
||||
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.
|
||||
func NewMsgRenewRecord(recordID string, signer sdk.AccAddress) MsgRenewRecord {
|
||||
return MsgRenewRecord{
|
||||
@@ -83,11 +75,11 @@ func (msg MsgRenewRecord) Type() string { return "renew-record" }
|
||||
// ValidateBasic Implements Msg.
|
||||
func (msg MsgRenewRecord) ValidateBasic() error {
|
||||
if len(msg.RecordId) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "record id is required.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "record id is required.")
|
||||
}
|
||||
|
||||
if len(msg.Signer) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.")
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -123,13 +115,13 @@ func (msg MsgAssociateBond) Type() string { return "associate-bond" }
|
||||
// ValidateBasic Implements Msg.
|
||||
func (msg MsgAssociateBond) ValidateBasic() error {
|
||||
if len(msg.RecordId) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "record id is required.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "record id is required.")
|
||||
}
|
||||
if len(msg.BondId) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "bond id is required.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "bond id is required.")
|
||||
}
|
||||
if len(msg.Signer) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.")
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -164,10 +156,10 @@ func (msg MsgDissociateBond) Type() string { return "dissociate-bond" }
|
||||
// ValidateBasic Implements Msg.
|
||||
func (msg MsgDissociateBond) ValidateBasic() error {
|
||||
if len(msg.RecordId) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "record id is required.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "record id is required.")
|
||||
}
|
||||
if len(msg.Signer) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.")
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -202,10 +194,10 @@ func (msg MsgDissociateRecords) Type() string { return "dissociate-records" }
|
||||
// ValidateBasic Implements Msg.
|
||||
func (msg MsgDissociateRecords) ValidateBasic() error {
|
||||
if len(msg.BondId) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "bond id is required.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "bond id is required.")
|
||||
}
|
||||
if len(msg.Signer) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.")
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -241,13 +233,13 @@ func (msg MsgReAssociateRecords) Type() string { return "reassociate-records" }
|
||||
// ValidateBasic Implements Msg.
|
||||
func (msg MsgReAssociateRecords) ValidateBasic() error {
|
||||
if len(msg.OldBondId) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "old-bond-id is required.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "old-bond-id is required.")
|
||||
}
|
||||
if len(msg.NewBondId) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "new-bond-id is required.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "new-bond-id is required.")
|
||||
}
|
||||
if len(msg.Signer) == 0 {
|
||||
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.")
|
||||
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.")
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Generated
+116
-124
@@ -5,7 +5,7 @@ package types
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
types1 "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
_ "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
types "github.com/cosmos/cosmos-sdk/types"
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
@@ -155,17 +155,17 @@ func (m *Params) GetAuthorityAuctionMinimumBid() types.Coin {
|
||||
return types.Coin{}
|
||||
}
|
||||
|
||||
// Params defines the registry module records
|
||||
// Record defines a registry record
|
||||
type Record struct {
|
||||
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"`
|
||||
CreateTime string `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty" json:"createTime" yaml:"createTime"`
|
||||
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"`
|
||||
Owners []string `protobuf:"bytes,6,rep,name=owners,proto3" json:"owners,omitempty" json:"owners" yaml:"owners"`
|
||||
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"`
|
||||
Type string `protobuf:"bytes,9,opt,name=type,proto3" json:"type,omitempty" json:"types" yaml:"types"`
|
||||
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"`
|
||||
CreateTime string `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty" json:"createTime" yaml:"createTime"`
|
||||
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"`
|
||||
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"`
|
||||
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"`
|
||||
}
|
||||
|
||||
func (m *Record) Reset() { *m = Record{} }
|
||||
@@ -243,7 +243,7 @@ func (m *Record) GetOwners() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Record) GetAttributes() *types1.Any {
|
||||
func (m *Record) GetAttributes() []byte {
|
||||
if m != nil {
|
||||
return m.Attributes
|
||||
}
|
||||
@@ -264,7 +264,7 @@ func (m *Record) GetType() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// AuthorityEntry defines the registry module AuthorityEntries
|
||||
// AuthorityEntry defines a registry authority
|
||||
type AuthorityEntry struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Entry *NameAuthority `protobuf:"bytes,2,opt,name=entry,proto3" json:"entry,omitempty"`
|
||||
@@ -466,7 +466,7 @@ func (m *NameEntry) GetEntry() *NameRecord {
|
||||
return nil
|
||||
}
|
||||
|
||||
// NameRecord
|
||||
// NameRecord defines a versioned name record
|
||||
type NameRecord struct {
|
||||
Latest *NameRecordEntry `protobuf:"bytes,1,opt,name=latest,proto3" json:"latest,omitempty"`
|
||||
History []*NameRecordEntry `protobuf:"bytes,2,rep,name=history,proto3" json:"history,omitempty"`
|
||||
@@ -781,92 +781,91 @@ func init() {
|
||||
}
|
||||
|
||||
var fileDescriptor_5ca0f65a0e7121be = []byte{
|
||||
// 1347 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xdd, 0x6e, 0x1b, 0x45,
|
||||
0x14, 0xce, 0xc6, 0x89, 0x13, 0x9f, 0x34, 0x01, 0x0d, 0x69, 0xeb, 0x04, 0xea, 0x0d, 0x46, 0xa5,
|
||||
0x0d, 0xa1, 0xb6, 0x4a, 0x2f, 0xca, 0xaf, 0x50, 0x36, 0x49, 0x4b, 0x84, 0x80, 0x30, 0xed, 0x0d,
|
||||
0x48, 0x95, 0x35, 0xbb, 0x3b, 0xb5, 0x87, 0x7a, 0x77, 0xad, 0xdd, 0xd9, 0x52, 0x73, 0xc7, 0x1b,
|
||||
0xe4, 0xb2, 0x48, 0xbc, 0x01, 0x48, 0x3c, 0x06, 0xbd, 0xec, 0x25, 0x42, 0xc2, 0xa0, 0xe6, 0x0d,
|
||||
0xfc, 0x04, 0x68, 0xe7, 0x67, 0xff, 0x6c, 0xd7, 0x85, 0xde, 0xcd, 0xf9, 0xfb, 0xe6, 0x9b, 0x33,
|
||||
0xe7, 0x9c, 0xd9, 0x85, 0xdd, 0x87, 0x71, 0xdf, 0x21, 0x3e, 0xfb, 0x81, 0xb6, 0x43, 0xda, 0x65,
|
||||
0x11, 0x0f, 0x87, 0xed, 0x87, 0xd7, 0x6d, 0xca, 0xc9, 0xf5, 0x54, 0xd1, 0x1a, 0x84, 0x01, 0x0f,
|
||||
0xd0, 0x76, 0xea, 0xda, 0x4a, 0x2d, 0xca, 0x75, 0xbb, 0xd1, 0x0d, 0x82, 0x6e, 0x9f, 0xb6, 0x85,
|
||||
0xa7, 0x1d, 0xdf, 0x6f, 0xbb, 0x71, 0x48, 0x38, 0x0b, 0x7c, 0x19, 0xbb, 0x6d, 0x96, 0xed, 0x9c,
|
||||
0x79, 0x34, 0xe2, 0xc4, 0x1b, 0x28, 0x87, 0xcd, 0x6e, 0xd0, 0x0d, 0xc4, 0xb2, 0x9d, 0xac, 0x94,
|
||||
0xb6, 0xe1, 0x04, 0x91, 0x17, 0x44, 0x6d, 0x9b, 0x44, 0x34, 0xa5, 0xe5, 0x04, 0x4c, 0xc3, 0x6e,
|
||||
0x95, 0x61, 0x89, 0xaf, 0xd8, 0x36, 0xff, 0x5a, 0x87, 0xea, 0x09, 0x09, 0x89, 0x17, 0x21, 0x06,
|
||||
0x6b, 0x21, 0x75, 0x82, 0xd0, 0xed, 0x84, 0xd4, 0xe7, 0x75, 0x63, 0xc7, 0xb8, 0xba, 0xf6, 0xde,
|
||||
0x56, 0x4b, 0x62, 0xb7, 0x12, 0x6c, 0x7d, 0x8e, 0xd6, 0x41, 0xc0, 0x7c, 0xeb, 0xda, 0x93, 0x91,
|
||||
0xb9, 0x30, 0x1e, 0x99, 0x97, 0xbf, 0x8b, 0x02, 0xff, 0xc3, 0x66, 0x2e, 0xb6, 0xb9, 0x33, 0x24,
|
||||
0x5e, 0xbf, 0xa8, 0xc2, 0x20, 0x25, 0x4c, 0x7d, 0x8e, 0x4e, 0x0d, 0xd8, 0xcc, 0x19, 0x3b, 0x3a,
|
||||
0x0d, 0xf5, 0x45, 0xb5, 0xa9, 0x24, 0xdc, 0xd2, 0x84, 0x5b, 0x87, 0xca, 0xc1, 0x3a, 0x50, 0x9b,
|
||||
0xde, 0x9c, 0xd8, 0x34, 0x05, 0x99, 0xb2, 0x7b, 0x66, 0x7b, 0xfc, 0xb7, 0x69, 0x60, 0x94, 0x51,
|
||||
0xd1, 0xc0, 0x28, 0x86, 0x0d, 0x12, 0xf3, 0x5e, 0x10, 0x32, 0x3e, 0x94, 0x09, 0xa8, 0xcc, 0x4b,
|
||||
0xc0, 0x0d, 0xc5, 0x65, 0x4f, 0x72, 0x29, 0x86, 0x6b, 0x16, 0x25, 0x2d, 0x5e, 0x4f, 0x15, 0x22,
|
||||
0x13, 0x3f, 0x1b, 0x70, 0xb1, 0xe8, 0x92, 0x25, 0x63, 0x69, 0x5e, 0x32, 0x8e, 0x15, 0x81, 0x4f,
|
||||
0xa6, 0x11, 0x98, 0xc8, 0xc7, 0x2c, 0xb3, 0x48, 0xc9, 0xf9, 0x02, 0xad, 0x34, 0x2b, 0x8f, 0x0d,
|
||||
0xb8, 0x90, 0xc5, 0x75, 0x43, 0xe2, 0xd0, 0xce, 0x80, 0x86, 0x2c, 0x70, 0xeb, 0xcb, 0xf3, 0xd8,
|
||||
0xdd, 0x56, 0xec, 0x3e, 0x2a, 0xb3, 0xcb, 0xc3, 0x4c, 0x92, 0x2b, 0x58, 0x05, 0xb7, 0xcd, 0xd4,
|
||||
0x78, 0x3b, 0xb1, 0x9d, 0x08, 0x13, 0xfa, 0xd1, 0x80, 0xad, 0x2c, 0x8a, 0xc4, 0x4e, 0xb2, 0x69,
|
||||
0x87, 0xfa, 0xc4, 0xee, 0x53, 0xb7, 0x5e, 0xdd, 0x31, 0xae, 0xae, 0x5a, 0x47, 0xe3, 0x91, 0xb9,
|
||||
0x5f, 0xde, 0xbe, 0xe4, 0x3a, 0xc9, 0xa0, 0xec, 0x80, 0xb3, 0x1b, 0xda, 0x97, 0xa6, 0x23, 0x69,
|
||||
0x41, 0xbf, 0x1b, 0x30, 0x25, 0xce, 0x09, 0x3c, 0x8f, 0xf1, 0x28, 0xbb, 0xc8, 0x95, 0x79, 0xa9,
|
||||
0xea, 0xa8, 0x54, 0xdd, 0x99, 0xc5, 0xb5, 0x0c, 0x39, 0x9b, 0xf4, 0x84, 0xa7, 0x48, 0xa1, 0x59,
|
||||
0x3e, 0xc1, 0x81, 0x74, 0x4b, 0x2f, 0x7a, 0xfa, 0x49, 0x42, 0xfa, 0x90, 0x92, 0x7e, 0xee, 0x24,
|
||||
0xab, 0x2f, 0x7d, 0x92, 0x32, 0xe4, 0xec, 0x93, 0x4c, 0x78, 0x4e, 0x3f, 0x09, 0x96, 0x6e, 0xe9,
|
||||
0x49, 0x7e, 0x31, 0xe0, 0x8d, 0x59, 0x69, 0xe9, 0xdc, 0xa7, 0xb4, 0x5e, 0x9b, 0xd7, 0xd7, 0x5f,
|
||||
0xa9, 0x33, 0xdc, 0x7e, 0xfe, 0x6d, 0x24, 0x60, 0xf3, 0xee, 0x41, 0xf8, 0xe0, 0xad, 0xe9, 0xd9,
|
||||
0xbf, 0x45, 0xe9, 0x0c, 0xb6, 0xf2, 0xe8, 0x82, 0x2d, 0xbc, 0x34, 0xdb, 0x0c, 0x6c, 0x5e, 0xae,
|
||||
0x67, 0xb0, 0x95, 0x19, 0x4e, 0xd8, 0xfe, 0x66, 0xc0, 0xa5, 0xc9, 0x60, 0x8f, 0xf9, 0xcc, 0x8b,
|
||||
0xbd, 0x8e, 0xcd, 0xdc, 0xfa, 0xda, 0x3c, 0xba, 0x5f, 0x2b, 0xba, 0xc7, 0xb3, 0xe8, 0xe6, 0xd0,
|
||||
0x66, 0xf3, 0xcd, 0x3b, 0xe1, 0xed, 0x32, 0xe1, 0x2f, 0xa4, 0xd5, 0x62, 0x6e, 0xf3, 0xa7, 0x25,
|
||||
0xa8, 0x62, 0x31, 0xed, 0xd1, 0x15, 0x58, 0x64, 0xae, 0x78, 0xd6, 0x6a, 0xd6, 0xc5, 0xf1, 0xc8,
|
||||
0x7c, 0x4d, 0x32, 0xc8, 0xb6, 0x49, 0xb0, 0x16, 0x99, 0x8b, 0xde, 0x87, 0x15, 0x3b, 0xf0, 0xdd,
|
||||
0x0e, 0x73, 0xc5, 0x7b, 0x54, 0xb3, 0xcc, 0xf1, 0xc8, 0x7c, 0x5d, 0x7a, 0x27, 0x86, 0xe3, 0x34,
|
||||
0x42, 0x49, 0xb8, 0x2a, 0x17, 0xe8, 0x33, 0x58, 0x73, 0x42, 0x4a, 0x38, 0xed, 0x24, 0x0f, 0xb7,
|
||||
0x78, 0x41, 0x6a, 0xd6, 0x95, 0xf1, 0xc8, 0x7c, 0x4b, 0x46, 0x4b, 0xe3, 0x5d, 0xe6, 0xa5, 0x57,
|
||||
0x91, 0xd3, 0x60, 0xc8, 0x84, 0x04, 0x89, 0x3e, 0x1a, 0xb0, 0x70, 0x28, 0x91, 0x96, 0xca, 0x48,
|
||||
0xd2, 0x98, 0x47, 0xca, 0x69, 0x30, 0x64, 0x02, 0xaa, 0xc3, 0x8a, 0x4b, 0xfb, 0x94, 0x53, 0x39,
|
||||
0xb2, 0x57, 0xb1, 0x16, 0xd1, 0x4d, 0xa8, 0x06, 0xdf, 0xfb, 0x34, 0x8c, 0xea, 0xd5, 0x9d, 0x4a,
|
||||
0xf1, 0x98, 0x52, 0xaf, 0xa1, 0x95, 0x84, 0x95, 0x3b, 0xba, 0x07, 0x40, 0x38, 0x0f, 0x99, 0x1d,
|
||||
0x73, 0x1a, 0xa9, 0xe9, 0xb6, 0x39, 0x31, 0x13, 0xf6, 0xfd, 0x61, 0x9e, 0x71, 0x16, 0x91, 0x5e,
|
||||
0x6b, 0xa6, 0xc1, 0x39, 0x40, 0x74, 0x03, 0x96, 0x7d, 0xe2, 0xd1, 0xa8, 0xbe, 0x2a, 0x68, 0x5d,
|
||||
0x1a, 0x8f, 0xcc, 0x2d, 0x89, 0x21, 0xd4, 0x3a, 0x5c, 0x0a, 0x58, 0xfa, 0xa2, 0xeb, 0xb0, 0xc4,
|
||||
0x87, 0x03, 0xd9, 0xdd, 0x85, 0x98, 0x44, 0x9b, 0xc6, 0x48, 0x01, 0x0b, 0xd7, 0x26, 0x85, 0x8d,
|
||||
0x7d, 0x5d, 0x39, 0x47, 0x3e, 0x0f, 0x87, 0x08, 0xc1, 0x52, 0x82, 0x26, 0x8b, 0x04, 0x8b, 0x35,
|
||||
0xfa, 0x14, 0x96, 0x69, 0x62, 0x54, 0xdf, 0x26, 0xbb, 0xad, 0xd9, 0xdf, 0x77, 0xad, 0x2f, 0x89,
|
||||
0x47, 0x53, 0x48, 0x2c, 0xe3, 0x9a, 0x7f, 0x56, 0x60, 0xbd, 0x60, 0x40, 0xdf, 0xc0, 0xab, 0x22,
|
||||
0x93, 0x9d, 0x41, 0x6c, 0xf7, 0x99, 0xd3, 0x79, 0x40, 0x87, 0xaa, 0x2e, 0xdb, 0xd9, 0xe7, 0x84,
|
||||
0xf0, 0x38, 0x11, 0x0e, 0x9f, 0xd3, 0x61, 0xe1, 0x2a, 0x32, 0x2d, 0xde, 0x28, 0x2a, 0xd0, 0x09,
|
||||
0xac, 0x4b, 0x68, 0xe2, 0xba, 0x21, 0x8d, 0x22, 0x55, 0xc1, 0x7b, 0xe3, 0x91, 0x79, 0x25, 0x87,
|
||||
0xbb, 0x2f, 0xad, 0x05, 0x54, 0xad, 0xc3, 0xe7, 0xf2, 0x22, 0xba, 0x00, 0xd5, 0x1e, 0x65, 0xdd,
|
||||
0x9e, 0xfc, 0x20, 0x5a, 0xc2, 0x4a, 0x4a, 0xf4, 0x11, 0x27, 0x3c, 0x8e, 0x64, 0x71, 0x62, 0x25,
|
||||
0xa1, 0x43, 0x00, 0xdd, 0xa5, 0x4c, 0x96, 0x5c, 0xcd, 0xba, 0x3c, 0x1e, 0x99, 0x6f, 0xea, 0x86,
|
||||
0x17, 0xb6, 0xe3, 0xc3, 0xac, 0xb9, 0xb5, 0x02, 0xd7, 0xf4, 0xba, 0xd0, 0x83, 0xd5, 0xa9, 0x3d,
|
||||
0x78, 0x58, 0xe8, 0xc1, 0xc3, 0xac, 0x07, 0xfb, 0xc5, 0xce, 0x91, 0xd5, 0xb9, 0x3d, 0x51, 0x9d,
|
||||
0x77, 0xf5, 0x97, 0xb5, 0xd5, 0x56, 0x13, 0xe9, 0x45, 0x3a, 0xeb, 0x34, 0x79, 0x82, 0x72, 0xdd,
|
||||
0xd5, 0xbc, 0x07, 0xb5, 0xe4, 0x6e, 0x67, 0x97, 0xcf, 0xc7, 0xc5, 0xf2, 0x79, 0x7b, 0x5e, 0xf9,
|
||||
0xc8, 0x61, 0xa5, 0x6b, 0xe7, 0xb1, 0x01, 0x90, 0x69, 0xd1, 0x01, 0x54, 0xfb, 0x84, 0xd3, 0x48,
|
||||
0x7f, 0x9d, 0xef, 0xbd, 0x18, 0x9a, 0x60, 0x87, 0x55, 0x28, 0x3a, 0x82, 0x95, 0x1e, 0x8b, 0x78,
|
||||
0x20, 0x38, 0x55, 0xfe, 0x2b, 0x8a, 0x8e, 0x6d, 0x7e, 0x00, 0xaf, 0x94, 0x6c, 0x68, 0x23, 0x9b,
|
||||
0xb0, 0x62, 0x90, 0x66, 0xa5, 0xb3, 0x98, 0x2f, 0x9d, 0x66, 0x08, 0xb5, 0x3b, 0xac, 0xeb, 0x13,
|
||||
0x1e, 0x87, 0x14, 0xed, 0x41, 0x25, 0x62, 0x5d, 0x55, 0xff, 0x5b, 0xe3, 0x91, 0x79, 0x5e, 0xde,
|
||||
0x43, 0xc4, 0xba, 0xfa, 0x02, 0x92, 0x25, 0x4e, 0xbc, 0x92, 0xb2, 0x18, 0xc4, 0xb6, 0x68, 0x98,
|
||||
0x89, 0xd1, 0x3c, 0x88, 0xed, 0x5c, 0xa3, 0x28, 0x09, 0x57, 0xd5, 0xe2, 0x74, 0x11, 0x36, 0xac,
|
||||
0x7e, 0xe0, 0x3c, 0x38, 0xe8, 0x11, 0xbf, 0x4b, 0xef, 0x50, 0x9e, 0xa3, 0x97, 0x6c, 0x5e, 0x49,
|
||||
0x2b, 0xbb, 0x0e, 0x2b, 0xf2, 0x07, 0x21, 0x12, 0x09, 0xaa, 0x61, 0x2d, 0xa2, 0x6d, 0x58, 0x55,
|
||||
0x25, 0x1a, 0xd5, 0x2b, 0xc2, 0x94, 0xca, 0xe8, 0x11, 0x9c, 0xd3, 0x75, 0x6f, 0x33, 0x37, 0xe9,
|
||||
0x8a, 0x24, 0xb7, 0xef, 0x3c, 0x2f, 0xb7, 0xea, 0xb9, 0xb2, 0x98, 0x7b, 0xec, 0xdf, 0x0f, 0xac,
|
||||
0xdd, 0xec, 0x67, 0x8a, 0xa4, 0x96, 0xa8, 0xd4, 0x27, 0x42, 0x85, 0xd7, 0x72, 0x12, 0xda, 0x81,
|
||||
0x35, 0xfd, 0x02, 0x32, 0x1a, 0xd5, 0x97, 0x05, 0xb1, 0xbc, 0x0a, 0x6d, 0xea, 0x89, 0x2a, 0x06,
|
||||
0xbd, 0x1a, 0x99, 0xcd, 0x5f, 0x8d, 0x64, 0x00, 0xe6, 0x29, 0x94, 0x9a, 0xd7, 0xf8, 0x9f, 0xcd,
|
||||
0x7b, 0x17, 0x36, 0x6c, 0xe6, 0xba, 0x13, 0x53, 0xe8, 0xda, 0x78, 0x64, 0xee, 0xaa, 0x1e, 0x16,
|
||||
0xf6, 0xd2, 0x18, 0x2a, 0x2a, 0xf1, 0x7a, 0x41, 0xb6, 0x6e, 0x3d, 0x79, 0xd6, 0x30, 0x9e, 0x3e,
|
||||
0x6b, 0x18, 0xff, 0x3c, 0x6b, 0x18, 0xa7, 0x67, 0x8d, 0x85, 0xa7, 0x67, 0x8d, 0x85, 0x3f, 0xce,
|
||||
0x1a, 0x0b, 0xdf, 0xbe, 0xdb, 0x65, 0xbc, 0x17, 0xdb, 0x2d, 0x27, 0xf0, 0xda, 0x0e, 0x0d, 0x9d,
|
||||
0x6b, 0x2c, 0x68, 0xf7, 0x89, 0x13, 0xf8, 0xcc, 0x71, 0xdb, 0x8f, 0xb2, 0x3f, 0x76, 0x31, 0xfd,
|
||||
0xed, 0xaa, 0x98, 0x01, 0x37, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x03, 0x2e, 0xc4, 0xd4,
|
||||
0x0f, 0x00, 0x00,
|
||||
// 1344 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xdd, 0x6e, 0x1b, 0xc5,
|
||||
0x17, 0xcf, 0xc6, 0x89, 0x13, 0x9f, 0x34, 0xf9, 0xff, 0x35, 0xa4, 0xad, 0x13, 0xa8, 0x37, 0x18,
|
||||
0x95, 0x36, 0x84, 0xda, 0x2a, 0xbd, 0x28, 0x9f, 0x42, 0xd9, 0x24, 0x0d, 0x11, 0x02, 0xc2, 0xb4,
|
||||
0x37, 0x20, 0x21, 0x6b, 0x76, 0x77, 0x6a, 0x0f, 0xf5, 0xee, 0x5a, 0xbb, 0xb3, 0xa5, 0xe6, 0x0e,
|
||||
0xf1, 0x02, 0xb9, 0xec, 0x05, 0x6f, 0x00, 0x12, 0x8f, 0x41, 0x2f, 0x7b, 0x89, 0x90, 0x30, 0xa8,
|
||||
0x79, 0x03, 0x3f, 0x01, 0xda, 0xf9, 0xd8, 0x2f, 0xdb, 0x75, 0xa1, 0x77, 0x73, 0xbe, 0x7e, 0xf3,
|
||||
0x9b, 0x33, 0xe7, 0x9c, 0xd9, 0x85, 0xdd, 0x87, 0x71, 0xdf, 0x21, 0x3e, 0xfb, 0x9e, 0xb6, 0x43,
|
||||
0xda, 0x65, 0x11, 0x0f, 0x87, 0xed, 0x87, 0x37, 0x6d, 0xca, 0xc9, 0xcd, 0x54, 0xd1, 0x1a, 0x84,
|
||||
0x01, 0x0f, 0xd0, 0x76, 0xea, 0xda, 0x4a, 0x2d, 0xca, 0x75, 0xbb, 0xd1, 0x0d, 0x82, 0x6e, 0x9f,
|
||||
0xb6, 0x85, 0xa7, 0x1d, 0xdf, 0x6f, 0xbb, 0x71, 0x48, 0x38, 0x0b, 0x7c, 0x19, 0xbb, 0x6d, 0x96,
|
||||
0xed, 0x9c, 0x79, 0x34, 0xe2, 0xc4, 0x1b, 0x28, 0x87, 0xcd, 0x6e, 0xd0, 0x0d, 0xc4, 0xb2, 0x9d,
|
||||
0xac, 0x94, 0xb6, 0xe1, 0x04, 0x91, 0x17, 0x44, 0x6d, 0x9b, 0x44, 0x34, 0xa5, 0xe5, 0x04, 0x4c,
|
||||
0xc3, 0x6e, 0x95, 0x61, 0x89, 0xaf, 0xd8, 0x36, 0xff, 0x5c, 0x87, 0xea, 0x29, 0x09, 0x89, 0x17,
|
||||
0x21, 0x06, 0x6b, 0x21, 0x75, 0x82, 0xd0, 0xed, 0x84, 0xd4, 0xe7, 0x75, 0x63, 0xc7, 0xb8, 0xbe,
|
||||
0xf6, 0xce, 0x56, 0x4b, 0x62, 0xb7, 0x12, 0x6c, 0x7d, 0x8e, 0xd6, 0x41, 0xc0, 0x7c, 0xeb, 0xc6,
|
||||
0x93, 0x91, 0xb9, 0x30, 0x1e, 0x99, 0x57, 0xbf, 0x8d, 0x02, 0xff, 0xfd, 0x66, 0x2e, 0xb6, 0xb9,
|
||||
0x33, 0x24, 0x5e, 0xbf, 0xa8, 0xc2, 0x20, 0x25, 0x4c, 0x7d, 0x8e, 0xce, 0x0c, 0xd8, 0xcc, 0x19,
|
||||
0x3b, 0x3a, 0x0d, 0xf5, 0x45, 0xb5, 0xa9, 0x24, 0xdc, 0xd2, 0x84, 0x5b, 0x87, 0xca, 0xc1, 0x3a,
|
||||
0x50, 0x9b, 0xde, 0x9e, 0xd8, 0x34, 0x05, 0x99, 0xb2, 0x7b, 0x66, 0x7b, 0xfc, 0x97, 0x69, 0x60,
|
||||
0x94, 0x51, 0xd1, 0xc0, 0x28, 0x86, 0x0d, 0x12, 0xf3, 0x5e, 0x10, 0x32, 0x3e, 0x94, 0x09, 0xa8,
|
||||
0xcc, 0x4b, 0xc0, 0x2d, 0xc5, 0x65, 0x4f, 0x72, 0x29, 0x86, 0x6b, 0x16, 0x25, 0x2d, 0x5e, 0x4f,
|
||||
0x15, 0x22, 0x13, 0x3f, 0x19, 0x70, 0xb9, 0xe8, 0x92, 0x25, 0x63, 0x69, 0x5e, 0x32, 0x4e, 0x14,
|
||||
0x81, 0x8f, 0xa6, 0x11, 0x98, 0xc8, 0xc7, 0x2c, 0xb3, 0x48, 0xc9, 0xc5, 0x02, 0xad, 0x34, 0x2b,
|
||||
0x8f, 0x0d, 0xb8, 0x94, 0xc5, 0x75, 0x43, 0xe2, 0xd0, 0xce, 0x80, 0x86, 0x2c, 0x70, 0xeb, 0xcb,
|
||||
0xf3, 0xd8, 0x1d, 0x2b, 0x76, 0x1f, 0x94, 0xd9, 0xe5, 0x61, 0x26, 0xc9, 0x15, 0xac, 0x82, 0xdb,
|
||||
0x66, 0x6a, 0x3c, 0x4e, 0x6c, 0xa7, 0xc2, 0x84, 0x7e, 0x30, 0x60, 0x2b, 0x8b, 0x22, 0xb1, 0x93,
|
||||
0x6c, 0xda, 0xa1, 0x3e, 0xb1, 0xfb, 0xd4, 0xad, 0x57, 0x77, 0x8c, 0xeb, 0xab, 0xd6, 0xd1, 0x78,
|
||||
0x64, 0xee, 0x97, 0xb7, 0x2f, 0xb9, 0x4e, 0x32, 0x28, 0x3b, 0xe0, 0xec, 0x86, 0xf6, 0xa5, 0xe9,
|
||||
0x48, 0x5a, 0xd0, 0x6f, 0x06, 0x4c, 0x89, 0x73, 0x02, 0xcf, 0x63, 0x3c, 0xca, 0x2e, 0x72, 0x65,
|
||||
0x5e, 0xaa, 0x3a, 0x2a, 0x55, 0x77, 0x67, 0x71, 0x2d, 0x43, 0xce, 0x26, 0x3d, 0xe1, 0x29, 0x52,
|
||||
0x68, 0x96, 0x4f, 0x70, 0x20, 0xdd, 0xd2, 0x8b, 0x9e, 0x7e, 0x92, 0x90, 0x3e, 0xa4, 0xa4, 0x9f,
|
||||
0x3b, 0xc9, 0xea, 0x4b, 0x9f, 0xa4, 0x0c, 0x39, 0xfb, 0x24, 0x13, 0x9e, 0xd3, 0x4f, 0x82, 0xa5,
|
||||
0x5b, 0x7a, 0x92, 0x9f, 0x0d, 0x78, 0x6d, 0x56, 0x5a, 0x3a, 0xf7, 0x29, 0xad, 0xd7, 0xe6, 0xf5,
|
||||
0xf5, 0x17, 0xea, 0x0c, 0xc7, 0xcf, 0xbf, 0x8d, 0x04, 0x6c, 0xde, 0x3d, 0x08, 0x1f, 0xbc, 0x35,
|
||||
0x3d, 0xfb, 0x77, 0x28, 0x9d, 0xc1, 0x56, 0x1e, 0x5d, 0xb0, 0x85, 0x97, 0x66, 0x9b, 0x81, 0xcd,
|
||||
0xcb, 0xf5, 0x0c, 0xb6, 0x32, 0xc3, 0x09, 0xdb, 0x5f, 0x0d, 0xb8, 0x32, 0x19, 0xec, 0x31, 0x9f,
|
||||
0x79, 0xb1, 0xd7, 0xb1, 0x99, 0x5b, 0x5f, 0x9b, 0x47, 0xf7, 0x4b, 0x45, 0xf7, 0x64, 0x16, 0xdd,
|
||||
0x1c, 0xda, 0x6c, 0xbe, 0x79, 0x27, 0xbc, 0x5d, 0x26, 0xfc, 0x99, 0xb4, 0x5a, 0xcc, 0x6d, 0xfe,
|
||||
0xb8, 0x04, 0x55, 0x2c, 0xa6, 0x3d, 0xba, 0x06, 0x8b, 0xcc, 0x15, 0xcf, 0x5a, 0xcd, 0xba, 0x3c,
|
||||
0x1e, 0x99, 0xaf, 0x48, 0x06, 0xd9, 0x36, 0x09, 0xd6, 0x22, 0x73, 0xd1, 0xbb, 0xb0, 0x62, 0x07,
|
||||
0xbe, 0xdb, 0x61, 0xae, 0x78, 0x8f, 0x6a, 0x96, 0x39, 0x1e, 0x99, 0xaf, 0x4a, 0xef, 0xc4, 0x70,
|
||||
0x92, 0x46, 0x28, 0x09, 0x57, 0xe5, 0x02, 0x7d, 0x02, 0x6b, 0x4e, 0x48, 0x09, 0xa7, 0x9d, 0xe4,
|
||||
0xe1, 0x16, 0x2f, 0x48, 0xcd, 0xba, 0x36, 0x1e, 0x99, 0x6f, 0xc8, 0x68, 0x69, 0xbc, 0xc7, 0xbc,
|
||||
0xf4, 0x2a, 0x72, 0x1a, 0x0c, 0x99, 0x90, 0x20, 0xd1, 0x47, 0x03, 0x16, 0x0e, 0x25, 0xd2, 0x52,
|
||||
0x19, 0x49, 0x1a, 0xf3, 0x48, 0x39, 0x0d, 0x86, 0x4c, 0x40, 0x75, 0x58, 0x71, 0x69, 0x9f, 0x72,
|
||||
0x2a, 0x47, 0xf6, 0x2a, 0xd6, 0x22, 0xba, 0x0d, 0xd5, 0xe0, 0x3b, 0x9f, 0x86, 0x51, 0xbd, 0xba,
|
||||
0x53, 0x29, 0x1e, 0x53, 0xea, 0x35, 0xb4, 0x92, 0xb0, 0x72, 0x47, 0xc7, 0x00, 0x84, 0xf3, 0x90,
|
||||
0xd9, 0x31, 0xa7, 0x91, 0x98, 0x6e, 0x17, 0xf2, 0xdc, 0x32, 0x5b, 0x7a, 0x81, 0x99, 0x06, 0xe7,
|
||||
0x42, 0xd1, 0x2d, 0x58, 0xf6, 0x89, 0x47, 0xa3, 0xfa, 0xaa, 0x20, 0x70, 0x65, 0x3c, 0x32, 0xb7,
|
||||
0x24, 0x86, 0x50, 0xeb, 0x70, 0x29, 0x60, 0xe9, 0x8b, 0x6e, 0xc2, 0x12, 0x1f, 0x0e, 0x64, 0x1f,
|
||||
0x17, 0x62, 0x12, 0x6d, 0x1a, 0x23, 0x05, 0x2c, 0x5c, 0x9b, 0x14, 0x36, 0xf6, 0x75, 0x8d, 0x1c,
|
||||
0xf9, 0x3c, 0x1c, 0x22, 0x04, 0x4b, 0x09, 0x9a, 0x2c, 0x07, 0x2c, 0xd6, 0xe8, 0x63, 0x58, 0xa6,
|
||||
0x89, 0x51, 0x7d, 0x85, 0xec, 0xb6, 0x66, 0x7f, 0xc9, 0xb5, 0x3e, 0x27, 0x1e, 0x4d, 0x21, 0xb1,
|
||||
0x8c, 0x6b, 0xfe, 0x51, 0x81, 0xf5, 0x82, 0x01, 0x7d, 0x05, 0xff, 0x17, 0x39, 0xeb, 0x0c, 0x62,
|
||||
0xbb, 0xcf, 0x9c, 0xce, 0x03, 0x3a, 0x54, 0x15, 0xd8, 0xce, 0x3e, 0x1c, 0x84, 0xc7, 0xa9, 0x70,
|
||||
0xf8, 0x94, 0x0e, 0x0b, 0x49, 0xcf, 0xb4, 0x78, 0xa3, 0xa8, 0x40, 0xa7, 0xb0, 0x2e, 0xa1, 0x89,
|
||||
0xeb, 0x86, 0x34, 0x8a, 0x54, 0xad, 0xee, 0x8d, 0x47, 0xe6, 0xb5, 0x1c, 0xee, 0xbe, 0xb4, 0x16,
|
||||
0x50, 0xb5, 0x0e, 0x5f, 0xc8, 0x8b, 0xe8, 0x12, 0x54, 0x7b, 0x94, 0x75, 0x7b, 0xf2, 0xd3, 0x67,
|
||||
0x09, 0x2b, 0x29, 0xd1, 0x47, 0x9c, 0xf0, 0x38, 0x92, 0x65, 0x88, 0x95, 0x84, 0x0e, 0x01, 0x74,
|
||||
0x3f, 0x32, 0x59, 0x5c, 0x35, 0xeb, 0xea, 0x78, 0x64, 0xbe, 0xae, 0x5b, 0x5b, 0xd8, 0x4e, 0x0e,
|
||||
0xb3, 0x36, 0xd6, 0x0a, 0x5c, 0xd3, 0xeb, 0x42, 0xb7, 0x55, 0xa7, 0x76, 0xdb, 0x61, 0xa1, 0xdb,
|
||||
0x0e, 0xb3, 0x6e, 0xeb, 0x17, 0x7b, 0x44, 0xbe, 0xb2, 0xdb, 0x13, 0x6f, 0xd3, 0x3d, 0xfd, 0x0d,
|
||||
0x6d, 0xb5, 0xd5, 0xec, 0x79, 0x91, 0x1e, 0x3a, 0x4b, 0x1e, 0x9b, 0x5c, 0x1f, 0x35, 0xbf, 0x81,
|
||||
0x5a, 0x72, 0xb7, 0xb3, 0xcb, 0xe7, 0xc3, 0x62, 0xf9, 0xbc, 0x39, 0xaf, 0x7c, 0xe4, 0x58, 0xd2,
|
||||
0xb5, 0xf3, 0xd8, 0x00, 0xc8, 0xb4, 0xe8, 0x00, 0xaa, 0x7d, 0xc2, 0x69, 0xa4, 0xbf, 0xc3, 0xf7,
|
||||
0x5e, 0x0c, 0x4d, 0xb0, 0xc3, 0x2a, 0x14, 0x1d, 0xc1, 0x4a, 0x8f, 0x45, 0x3c, 0x10, 0x9c, 0x2a,
|
||||
0xff, 0x16, 0x45, 0xc7, 0x36, 0xdf, 0x83, 0xff, 0x95, 0x6c, 0x68, 0x23, 0x9b, 0xa5, 0x62, 0x64,
|
||||
0x66, 0xa5, 0xb3, 0x98, 0x2f, 0x9d, 0x66, 0x08, 0xb5, 0xbb, 0xac, 0xeb, 0x13, 0x1e, 0x87, 0x14,
|
||||
0xed, 0x41, 0x25, 0x62, 0x5d, 0x55, 0xff, 0x5b, 0xe3, 0x91, 0x79, 0x51, 0xde, 0x43, 0xc4, 0xba,
|
||||
0xfa, 0x02, 0x92, 0x25, 0x4e, 0xbc, 0x92, 0xb2, 0x18, 0xc4, 0xb6, 0x68, 0x98, 0x89, 0x21, 0x3c,
|
||||
0x88, 0xed, 0x5c, 0xa3, 0x28, 0x09, 0x57, 0xd5, 0xe2, 0x6c, 0x11, 0x36, 0xac, 0x7e, 0xe0, 0x3c,
|
||||
0x38, 0xe8, 0x11, 0xbf, 0x4b, 0xef, 0x52, 0x9e, 0xa3, 0x97, 0x6c, 0x5e, 0x49, 0x2b, 0xbb, 0x0e,
|
||||
0x2b, 0xf2, 0x57, 0x20, 0x12, 0x09, 0xaa, 0x61, 0x2d, 0xa2, 0x6d, 0x58, 0x55, 0x25, 0x1a, 0xd5,
|
||||
0x2b, 0xc2, 0x94, 0xca, 0xe8, 0x11, 0x5c, 0xd0, 0x75, 0x6f, 0x33, 0x37, 0xe9, 0x8a, 0x24, 0xb7,
|
||||
0x6f, 0x3d, 0x2f, 0xb7, 0xea, 0x61, 0xb2, 0x98, 0x7b, 0xe2, 0xdf, 0x0f, 0xac, 0xdd, 0xec, 0xb7,
|
||||
0x89, 0xa4, 0x96, 0xa8, 0xd4, 0x27, 0x42, 0x85, 0xd7, 0x72, 0x12, 0xda, 0x81, 0x35, 0xfd, 0xd6,
|
||||
0x31, 0x1a, 0xd5, 0x97, 0x05, 0xb1, 0xbc, 0x0a, 0x6d, 0xea, 0x89, 0x2a, 0x46, 0xba, 0x1a, 0x99,
|
||||
0xcd, 0x5f, 0x8c, 0x64, 0x00, 0xe6, 0x29, 0x94, 0x9a, 0xd7, 0xf8, 0x8f, 0xcd, 0x7b, 0x0f, 0x36,
|
||||
0x6c, 0xe6, 0xba, 0x13, 0x53, 0xe8, 0xc6, 0x78, 0x64, 0xee, 0xaa, 0x1e, 0x16, 0xf6, 0xd2, 0x18,
|
||||
0x2a, 0x2a, 0xf1, 0x7a, 0x41, 0xb6, 0xee, 0x3c, 0x79, 0xd6, 0x30, 0x9e, 0x3e, 0x6b, 0x18, 0x7f,
|
||||
0x3f, 0x6b, 0x18, 0x67, 0xe7, 0x8d, 0x85, 0xa7, 0xe7, 0x8d, 0x85, 0xdf, 0xcf, 0x1b, 0x0b, 0x5f,
|
||||
0xbf, 0xdd, 0x65, 0xbc, 0x17, 0xdb, 0x2d, 0x27, 0xf0, 0xda, 0x0e, 0x0d, 0x9d, 0x1b, 0x2c, 0x68,
|
||||
0xf7, 0x89, 0x13, 0xf8, 0xcc, 0x71, 0xdb, 0x8f, 0xb2, 0x7f, 0x73, 0x31, 0xfd, 0xed, 0xaa, 0x98,
|
||||
0x01, 0xb7, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x03, 0x19, 0xcc, 0xfc, 0xbe, 0x0f, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *Params) Marshal() (dAtA []byte, err error) {
|
||||
@@ -1028,15 +1027,10 @@ func (m *Record) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
dAtA[i] = 0x42
|
||||
}
|
||||
}
|
||||
if m.Attributes != nil {
|
||||
{
|
||||
size, err := m.Attributes.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintRegistry(dAtA, i, uint64(size))
|
||||
}
|
||||
if len(m.Attributes) > 0 {
|
||||
i -= len(m.Attributes)
|
||||
copy(dAtA[i:], m.Attributes)
|
||||
i = encodeVarintRegistry(dAtA, i, uint64(len(m.Attributes)))
|
||||
i--
|
||||
dAtA[i] = 0x3a
|
||||
}
|
||||
@@ -1152,12 +1146,12 @@ func (m *NameAuthority) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
n13, err13 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExpiryTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpiryTime):])
|
||||
if err13 != nil {
|
||||
return 0, err13
|
||||
n12, err12 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExpiryTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpiryTime):])
|
||||
if err12 != nil {
|
||||
return 0, err12
|
||||
}
|
||||
i -= n13
|
||||
i = encodeVarintRegistry(dAtA, i, uint64(n13))
|
||||
i -= n12
|
||||
i = encodeVarintRegistry(dAtA, i, uint64(n12))
|
||||
i--
|
||||
dAtA[i] = 0x3a
|
||||
if len(m.BondId) > 0 {
|
||||
@@ -1555,8 +1549,8 @@ func (m *Record) Size() (n int) {
|
||||
n += 1 + l + sovRegistry(uint64(l))
|
||||
}
|
||||
}
|
||||
if m.Attributes != nil {
|
||||
l = m.Attributes.Size()
|
||||
l = len(m.Attributes)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovRegistry(uint64(l))
|
||||
}
|
||||
if len(m.Names) > 0 {
|
||||
@@ -2370,7 +2364,7 @@ func (m *Record) Unmarshal(dAtA []byte) error {
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType)
|
||||
}
|
||||
var msglen int
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowRegistry
|
||||
@@ -2380,26 +2374,24 @@ func (m *Record) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
if byteLen < 0 {
|
||||
return ErrInvalidLengthRegistry
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthRegistry
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Attributes = append(m.Attributes[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.Attributes == nil {
|
||||
m.Attributes = &types1.Any{}
|
||||
}
|
||||
if err := m.Attributes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
m.Attributes = []byte{}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 8:
|
||||
|
||||
Generated
+13
-13
@@ -385,7 +385,7 @@ func (m *MsgReserveAuthorityResponse) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_MsgReserveAuthorityResponse proto.InternalMessageInfo
|
||||
|
||||
// MsgSetAuthorityBond is SDK message for SetAuthorityBond
|
||||
// MsgSetAuthorityBond
|
||||
type MsgSetAuthorityBond struct {
|
||||
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"`
|
||||
@@ -483,7 +483,7 @@ func (m *MsgSetAuthorityBondResponse) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_MsgSetAuthorityBondResponse proto.InternalMessageInfo
|
||||
|
||||
// MsgDeleteNameAuthority is SDK message for DeleteNameAuthority
|
||||
// MsgDeleteNameAuthority
|
||||
type MsgDeleteNameAuthority struct {
|
||||
Crn string `protobuf:"bytes,1,opt,name=crn,proto3" json:"crn,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
|
||||
|
||||
// MsgRenewRecord is SDK message for Renew a record
|
||||
// MsgRenewRecord
|
||||
type MsgRenewRecord struct {
|
||||
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"`
|
||||
@@ -761,7 +761,7 @@ func (m *MsgAssociateBondResponse) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_MsgAssociateBondResponse proto.InternalMessageInfo
|
||||
|
||||
// MsgDissociateBond is SDK message for Msg/DissociateBond
|
||||
// MsgDissociateBond
|
||||
type MsgDissociateBond struct {
|
||||
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"`
|
||||
@@ -814,7 +814,7 @@ func (m *MsgDissociateBond) GetSigner() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// MsgDissociateBondResponse is response type for MsgDissociateBond
|
||||
// MsgDissociateBondResponse
|
||||
type MsgDissociateBondResponse struct {
|
||||
}
|
||||
|
||||
@@ -851,7 +851,7 @@ func (m *MsgDissociateBondResponse) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_MsgDissociateBondResponse proto.InternalMessageInfo
|
||||
|
||||
// MsgDissociateRecords is SDK message for Msg/DissociateRecords
|
||||
// MsgDissociateRecords
|
||||
type MsgDissociateRecords struct {
|
||||
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"`
|
||||
@@ -904,7 +904,7 @@ func (m *MsgDissociateRecords) GetSigner() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// MsgDissociateRecordsResponse is response type for MsgDissociateRecords
|
||||
// MsgDissociateRecordsResponse
|
||||
type MsgDissociateRecordsResponse struct {
|
||||
}
|
||||
|
||||
@@ -941,7 +941,7 @@ func (m *MsgDissociateRecordsResponse) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_MsgDissociateRecordsResponse proto.InternalMessageInfo
|
||||
|
||||
// MsgReAssociateRecords is SDK message for Msg/ReAssociateRecords
|
||||
// MsgReAssociateRecords
|
||||
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"`
|
||||
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 ""
|
||||
}
|
||||
|
||||
// MsgReAssociateRecordsResponse is response type for MsgReAssociateRecords
|
||||
// MsgReAssociateRecordsResponse
|
||||
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.
|
||||
type MsgClient interface {
|
||||
// SetRecord will records a new record with given payload and bond id
|
||||
// SetRecord records a new record with given payload and bond id
|
||||
SetRecord(ctx context.Context, in *MsgSetRecord, opts ...grpc.CallOption) (*MsgSetRecordResponse, error)
|
||||
// Renew Record will renew the expire record
|
||||
// Renew Record renews an expired record
|
||||
RenewRecord(ctx context.Context, in *MsgRenewRecord, opts ...grpc.CallOption) (*MsgRenewRecordResponse, error)
|
||||
// AssociateBond
|
||||
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.
|
||||
type MsgServer interface {
|
||||
// SetRecord will records a new record with given payload and bond id
|
||||
// SetRecord records a new record with given payload and bond id
|
||||
SetRecord(context.Context, *MsgSetRecord) (*MsgSetRecordResponse, error)
|
||||
// Renew Record will renew the expire record
|
||||
// Renew Record renews an expired record
|
||||
RenewRecord(context.Context, *MsgRenewRecord) (*MsgRenewRecordResponse, error)
|
||||
// AssociateBond
|
||||
AssociateBond(context.Context, *MsgAssociateBond) (*MsgAssociateBondResponse, error)
|
||||
|
||||
+58
-143
@@ -2,14 +2,9 @@ package types
|
||||
|
||||
import (
|
||||
"crypto/sha256"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/cerc-io/laconicd/x/registry/helpers"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
canonicalJson "github.com/gibson042/canonicaljson-go"
|
||||
"github.com/gogo/protobuf/proto"
|
||||
"github.com/gibson042/canonicaljson-go"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -18,155 +13,59 @@ const (
|
||||
AuthorityUnderAuction = "auction"
|
||||
)
|
||||
|
||||
// PayloadType represents a signed record payload that can be serialized from/to YAML.
|
||||
type PayloadType struct {
|
||||
Record map[string]interface{} `json:"record"`
|
||||
Signatures []Signature `json:"signatures"`
|
||||
// TODO if schema records are to be more permissive than allowing a map of fields, this type will
|
||||
// become specific to content records. schema records will either occupy a new message or have new
|
||||
// more general purpose helper types.
|
||||
|
||||
type AttributeMap map[string]interface{}
|
||||
|
||||
// ReadablePayload represents a signed record payload that can be serialized from/to YAML.
|
||||
type ReadablePayload struct {
|
||||
RecordAttributes AttributeMap `json:"record" yaml:"record"`
|
||||
Signatures []Signature `json:"signatures" yaml:"signatures"`
|
||||
}
|
||||
|
||||
// ToPayload converts PayloadType to Payload object.
|
||||
// ReadableRecord represents a WNS record.
|
||||
type ReadableRecord struct {
|
||||
ID string `json:"id,omitempty"`
|
||||
Names []string `json:"names,omitempty"`
|
||||
BondID string `json:"bondId,omitempty"`
|
||||
CreateTime string `json:"createTime,omitempty"`
|
||||
ExpiryTime string `json:"expiryTime,omitempty"`
|
||||
Deleted bool `json:"deleted,omitempty"`
|
||||
Owners []string `json:"owners,omitempty"`
|
||||
Attributes AttributeMap `json:"attributes,omitempty"`
|
||||
}
|
||||
|
||||
// ToPayload converts PayloadEncodable to Payload object.
|
||||
// Why? Because go-amino can't handle maps: https://github.com/tendermint/go-amino/issues/4.
|
||||
func (payloadObj *PayloadType) ToPayload() (Payload, error) {
|
||||
attributes, err := payLoadAttributes(payloadObj.Record)
|
||||
if err != nil {
|
||||
return Payload{}, err
|
||||
}
|
||||
func (payloadObj *ReadablePayload) ToPayload() Payload {
|
||||
// Note: record directly contains the attributes here
|
||||
attributes := payloadObj.RecordAttributes
|
||||
payload := Payload{
|
||||
Record: &Record{
|
||||
Deleted: false,
|
||||
Owners: nil,
|
||||
Attributes: attributes,
|
||||
Attributes: helpers.MustMarshalJSON(attributes),
|
||||
},
|
||||
Signatures: payloadObj.Signatures,
|
||||
}
|
||||
return payload, nil
|
||||
return payload
|
||||
}
|
||||
|
||||
func payLoadAttributes(recordPayLoad map[string]interface{}) (*codectypes.Any, error) {
|
||||
recordType, ok := recordPayLoad["type"]
|
||||
if !ok {
|
||||
return &codectypes.Any{}, fmt.Errorf("cannot get type from payload")
|
||||
}
|
||||
bz := helpers.MarshalMapToJSONBytes(recordPayLoad)
|
||||
// ToReadablePayload converts Payload to a serializable object
|
||||
func (payload Payload) ToReadablePayload() ReadablePayload {
|
||||
var encodable ReadablePayload
|
||||
|
||||
switch recordType.(string) {
|
||||
case "ServiceProviderRegistration":
|
||||
{
|
||||
var attributes ServiceProviderRegistration
|
||||
err := json.Unmarshal(bz, &attributes)
|
||||
if err != nil {
|
||||
return &codectypes.Any{}, err
|
||||
}
|
||||
return codectypes.NewAnyWithValue(&attributes)
|
||||
}
|
||||
case "WebsiteRegistrationRecord":
|
||||
{
|
||||
var attributes WebsiteRegistrationRecord
|
||||
err := json.Unmarshal(bz, &attributes)
|
||||
if err != nil {
|
||||
return &codectypes.Any{}, err
|
||||
}
|
||||
return codectypes.NewAnyWithValue(&attributes)
|
||||
}
|
||||
default:
|
||||
return &codectypes.Any{}, fmt.Errorf("unsupported record type %s", recordType.(string))
|
||||
}
|
||||
}
|
||||
encodable.RecordAttributes = helpers.MustUnmarshalJSON[AttributeMap](payload.Record.Attributes)
|
||||
encodable.Signatures = payload.Signatures
|
||||
|
||||
// ToReadablePayload converts Payload to PayloadType
|
||||
// It will unmarshal with record attributes
|
||||
func (payload Payload) ToReadablePayload() PayloadType {
|
||||
var payloadType PayloadType
|
||||
bz, err := GetJSONBytesFromAny(*payload.Record.Attributes)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
payloadType.Record = helpers.UnMarshalMapFromJSONBytes(bz)
|
||||
payloadType.Signatures = payload.Signatures
|
||||
|
||||
return payloadType
|
||||
}
|
||||
|
||||
// Record to Record Type for human-readable attributes
|
||||
|
||||
func (r *Record) ToRecordType() RecordType {
|
||||
var resourceObj RecordType
|
||||
|
||||
resourceObj.ID = r.Id
|
||||
resourceObj.BondID = r.BondId
|
||||
resourceObj.CreateTime = r.CreateTime
|
||||
resourceObj.ExpiryTime = r.ExpiryTime
|
||||
resourceObj.Deleted = r.Deleted
|
||||
resourceObj.Owners = r.Owners
|
||||
resourceObj.Names = r.Names
|
||||
|
||||
bz, err := GetJSONBytesFromAny(*r.Attributes)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
resourceObj.Attributes = helpers.UnMarshalMapFromJSONBytes(bz)
|
||||
|
||||
return resourceObj
|
||||
}
|
||||
|
||||
func GetJSONBytesFromAny(any codectypes.Any) ([]byte, error) {
|
||||
var bz []byte
|
||||
s := strings.Split(any.TypeUrl, ".")
|
||||
switch s[len(s)-1] {
|
||||
case "ServiceProviderRegistration":
|
||||
{
|
||||
var attributes ServiceProviderRegistration
|
||||
err := proto.Unmarshal(any.Value, &attributes)
|
||||
if err != nil {
|
||||
panic("Proto unmarshal error")
|
||||
}
|
||||
|
||||
bz, err = json.Marshal(attributes)
|
||||
if err != nil {
|
||||
panic("JSON marshal error")
|
||||
}
|
||||
}
|
||||
case "WebsiteRegistrationRecord":
|
||||
{
|
||||
var attributes WebsiteRegistrationRecord
|
||||
err := proto.Unmarshal(any.Value, &attributes)
|
||||
if err != nil {
|
||||
panic("Proto unmarshal error")
|
||||
}
|
||||
|
||||
bz, err = json.Marshal(attributes)
|
||||
if err != nil {
|
||||
panic("JSON marshal error")
|
||||
}
|
||||
}
|
||||
default:
|
||||
return nil, fmt.Errorf("unsupported type %s", s[len(s)-1])
|
||||
}
|
||||
|
||||
return bz, nil
|
||||
}
|
||||
|
||||
// RecordType represents a WNS record.
|
||||
type RecordType struct {
|
||||
ID string `json:"id,omitempty"`
|
||||
Names []string `json:"names,omitempty"`
|
||||
BondID string `json:"bondId,omitempty"`
|
||||
CreateTime string `json:"createTime,omitempty"`
|
||||
ExpiryTime string `json:"expiryTime,omitempty"`
|
||||
Deleted bool `json:"deleted,omitempty"`
|
||||
Owners []string `json:"owners,omitempty"`
|
||||
Attributes map[string]interface{} `json:"attributes,omitempty"`
|
||||
return encodable
|
||||
}
|
||||
|
||||
// ToRecordObj converts Record to RecordObj.
|
||||
// Why? Because go-amino can't handle maps: https://github.com/tendermint/go-amino/issues/4.
|
||||
func (r *RecordType) ToRecordObj() (Record, error) {
|
||||
attributes, err := payLoadAttributes(r.Attributes)
|
||||
if err != nil {
|
||||
return Record{}, err
|
||||
}
|
||||
|
||||
func (r *ReadableRecord) ToRecordObj() (Record, error) {
|
||||
var resourceObj Record
|
||||
|
||||
resourceObj.Id = r.ID
|
||||
@@ -175,23 +74,39 @@ func (r *RecordType) ToRecordObj() (Record, error) {
|
||||
resourceObj.ExpiryTime = r.ExpiryTime
|
||||
resourceObj.Deleted = r.Deleted
|
||||
resourceObj.Owners = r.Owners
|
||||
resourceObj.Attributes = attributes
|
||||
resourceObj.Attributes = helpers.MustMarshalJSON(r.Attributes)
|
||||
|
||||
return resourceObj, nil
|
||||
}
|
||||
|
||||
// ToReadableRecord converts Record to a serializable object
|
||||
func (r *Record) ToReadableRecord() ReadableRecord {
|
||||
var resourceObj ReadableRecord
|
||||
|
||||
resourceObj.ID = r.Id
|
||||
resourceObj.BondID = r.BondId
|
||||
resourceObj.CreateTime = r.CreateTime
|
||||
resourceObj.ExpiryTime = r.ExpiryTime
|
||||
resourceObj.Deleted = r.Deleted
|
||||
resourceObj.Owners = r.Owners
|
||||
resourceObj.Names = r.Names
|
||||
resourceObj.Attributes = helpers.MustUnmarshalJSON[AttributeMap](r.Attributes)
|
||||
|
||||
return resourceObj
|
||||
}
|
||||
|
||||
// CanonicalJSON returns the canonical JSON representation of the record.
|
||||
func (r *RecordType) CanonicalJSON() []byte {
|
||||
bytes, err := canonicalJson.Marshal(r.Attributes)
|
||||
func (r *ReadableRecord) CanonicalJSON() []byte {
|
||||
bytes, err := canonicaljson.Marshal(r.Attributes)
|
||||
if err != nil {
|
||||
panic("Record marshal error.")
|
||||
panic("error marshalling record: " + err.Error())
|
||||
}
|
||||
|
||||
return bytes
|
||||
}
|
||||
|
||||
// GetSignBytes generates a record hash to be signed.
|
||||
func (r *RecordType) GetSignBytes() ([]byte, []byte) {
|
||||
func (r *ReadableRecord) GetSignBytes() ([]byte, []byte) {
|
||||
// Double SHA256 hash.
|
||||
|
||||
// Input to the first round of hashing.
|
||||
@@ -211,7 +126,7 @@ func (r *RecordType) GetSignBytes() ([]byte, []byte) {
|
||||
}
|
||||
|
||||
// GetCID gets the record CID.
|
||||
func (r *RecordType) GetCID() (string, error) {
|
||||
func (r *ReadableRecord) GetCID() (string, error) {
|
||||
id, err := helpers.GetCid(r.CanonicalJSON())
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
Reference in New Issue
Block a user