diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3cf4356fd..6bc4f6473 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,13 +24,12 @@ jobs: fetch-depth: 0 - uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: "1.20" - name: Run tests run: | make ci make check-tidy make check-headers - make check-schema - name: Upload coverage report uses: codecov/codecov-action@v1 with: diff --git a/.github/workflows/flowkit-release.yml b/.github/workflows/flowkit-release.yml deleted file mode 100644 index 6e6858996..000000000 --- a/.github/workflows/flowkit-release.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Flowkit Release - -on: - release: - types: [published] - -jobs: - flowkit-release: - if: "!github.event.release.prerelease" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: tag flowkit release - env: - FLOWKIT_RELEASE_TAG: flowkit/${{ github.event.release.tag_name }} - run: | - git tag "$FLOWKIT_RELEASE_TAG" - git push origin "$FLOWKIT_RELEASE_TAG" diff --git a/Makefile b/Makefile index 73e549e27..16692d4bc 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,6 @@ install-tools: .PHONY: test test: GO111MODULE=on go test -coverprofile=$(COVER_PROFILE) $(if $(JSON_OUTPUT),-json,) ./... - cd flowkit; GO111MODULE=on go test -coverprofile=$(COVER_PROFILE) $(if $(JSON_OUTPUT),-json,) ./... .PHONY: test-e2e-emulator test-e2e-emulator: @@ -58,7 +57,7 @@ $(BINARY): GO111MODULE=on go build \ -trimpath \ -ldflags \ - "-X github.com/onflow/flow-cli/build.commit=$(COMMIT) -X github.com/onflow/flow-cli/build.semver=$(VERSION) -X github.com/onflow/flow-cli/flowkit/util.MIXPANEL_PROJECT_TOKEN=${MIXPANEL_PROJECT_TOKEN} -X github.com/onflow/flow-cli/internal/accounts.accountToken=${ACCOUNT_TOKEN}"\ + "-X github.com/onflow/flow-cli/build.commit=$(COMMIT) -X github.com/onflow/flow-cli/build.semver=$(VERSION) -X github.com/onflow/flow-cli/internal/accounts.accountToken=${ACCOUNT_TOKEN}"\ -o $(BINARY) ./cmd/flow .PHONY: versioned-binaries @@ -97,20 +96,10 @@ fix-lint: check-headers: @./check-headers.sh -.PHONY: check-schema -check-schema: - cd flowkit && go run ./cmd/flow-schema/flow-schema.go --verify=true ./schema.json - .PHONY: check-tidy check-tidy: go mod tidy - cd flowkit; go mod tidy - -.PHONY: generate-schema -generate-schema: - cd flowkit && go run ./cmd/flow-schema/flow-schema.go ./schema.json .PHONY: generate generate: install-tools - cd flowkit; \ - go generate ./... + go generate ./... diff --git a/cmd/flow/main.go b/cmd/flow/main.go index 79fd78961..9ccf802b2 100644 --- a/cmd/flow/main.go +++ b/cmd/flow/main.go @@ -63,7 +63,7 @@ func main() { if outputFlag != "json" { width := 80 - url := "https://developers.flow.com/build/cadence-migration-guide" + url := "https://cadence-lang.org/docs/cadence_migration_guide" // Function to center text within a given width centerText := func(text string, width int) string { diff --git a/flowkit/CHANGELOG.md b/flowkit/CHANGELOG.md deleted file mode 100644 index 10ba8dac1..000000000 --- a/flowkit/CHANGELOG.md +++ /dev/null @@ -1,285 +0,0 @@ -# Flowkit Changelog - -All notable changes to flowkit APIs will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## Unreleased - -## 1.0.0 - -### Changed - -Flowkit package was tagged as v1.0.0 and is now considered stable. -It was also moved and renamed from `github.com/onflow/pkg/flowkit` to `github.com/onflow/flowkit` (dropped `pkg`). -Please note that when you update to this version you will need to update your imports and -use the command: `go get github.com/onflow/flowkit@latest` and you will have to manually change all -imports from `github.com/onflow/pkg/flowkit` to `github.com/onflow/flowkit` (a simple find and replace might do). - - ---- - -Flowkit package APIs completely undergo major changes. APIs that were previously accessed via services were moved -under a single interface defined in [services.go](services.go). Accessing those methods must be done on a -flowkit instance. - -Example previously: -```go -services := services.NewServices(gateway, state, logger) -account, err := services.Accounts.Get(address) -``` -changed to: -```go -services := flowkit.NewFlowkit(state, *network, clientGateway, logger) -account, err := services.GetAccount(context.Background(), address) -``` - -Each of the APIs now require context as the first argument. -We can find a definition of the flowkit interface here: -```go -Network() config.Network -Ping() error -Gateway() gateway.Gateway -SetLogger(output.Logger) - -// GetAccount fetches account on the Flow network. -GetAccount(context.Context, flow.Address) (*flow.Account, error) - -// CreateAccount on the Flow network with the provided keys and using the signer for creation transaction. -// Returns the newly created account as well as the ID of the transaction that created the account. -// -// Keys is a slice but only one can be passed as well. If the transaction fails or there are other issues an error is returned. -CreateAccount(context.Context, *Account, []AccountPublicKey) (*flow.Account, flow.Identifier, error) - -// AddContract to the Flow account provided and return the transaction ID. -// -// If the contract already exists on the account the operation will fail and error will be returned. -// Use UpdateContract method for such usage. -AddContract(context.Context, *Account, *Script, bool) (flow.Identifier, bool, error) - -// RemoveContract from the provided account by its name. -// -// If removal is successful transaction ID is returned. -RemoveContract(context.Context, *Account, string) (flow.Identifier, error) - -// GetBlock by the query from Flow blockchain. Query can define a block by ID, block by height or require the latest block. -GetBlock(context.Context, BlockQuery) (*flow.Block, error) - -// GetCollection by the ID from Flow network. -GetCollection(context.Context, flow.Identifier) (*flow.Collection, error) - -// GetEvents from Flow network by their event name in the specified height interval defined by start and end inclusive. -// Optional worker defines parameters for how many concurrent workers do we want to fetch our events, -// and how many blocks between the provided interval each worker fetches. -// -// Providing worker value will produce faster response as the interval will be scanned concurrently. This parameter is optional, -// if not provided only a single worker will be used. -GetEvents(context.Context, []string, uint64, uint64, *EventWorker) ([]flow.BlockEvents, error) - -// GenerateKey using the signature algorithm and optional seed. If seed is not provided a random safe seed will be generated. -GenerateKey(context.Context, crypto.SignatureAlgorithm, string) (crypto.PrivateKey, error) - -// GenerateMnemonicKey will generate a new key with the signature algorithm and optional derivation path. -// -// If the derivation path is not provided a default "m/44'/539'/0'/0/0" will be used. -GenerateMnemonicKey(context.Context, crypto.SignatureAlgorithm, string) (crypto.PrivateKey, string, error) - -DerivePrivateKeyFromMnemonic(context.Context, string, crypto.SignatureAlgorithm, string) (crypto.PrivateKey, error) - -// DeployProject contracts to the Flow network or update if already exists and update is set to true. -// -// Retrieve all the contracts for specified network, sort them for deployment deploy one by one and replace -// the imports in the contract source, so it corresponds to the account name the contract was deployed to. -DeployProject(context.Context, bool) ([]*project.Contract, error) - -// ExecuteScript on the Flow network and return the Cadence value as a result. -ExecuteScript(context.Context, *Script) (cadence.Value, error) - -// GetTransactionByID from the Flow network including the transaction result. Using the waitSeal we can wait for the transaction to be sealed. -GetTransactionByID(context.Context, flow.Identifier, bool) (*flow.Transaction, *flow.TransactionResult, error) - -GetTransactionsByBlockID(context.Context, flow.Identifier) ([]*flow.Transaction, []*flow.TransactionResult, error) - -// BuildTransaction builds a new transaction type for later signing and submitting to the network. -// -// TransactionAddressesRoles type defines the address for each role (payer, proposer, authorizers) and the script defines the transaction content. -BuildTransaction(context.Context, *TransactionAddressesRoles, int, *Script, uint64) (*Transaction, error) - -// SignTransactionPayload will use the signer account provided and the payload raw byte content to sign it. -// -// The payload should be RLP encoded transaction payload and is suggested to be used in pair with BuildTransaction function. -SignTransactionPayload(context.Context, *Account, []byte) (*Transaction, error) - -// SendSignedTransaction will send a prebuilt and signed transaction to the Flow network. -// -// You can build the transaction using the BuildTransaction method and then sign it using the SignTranscation method. -SendSignedTransaction(context.Context, *Transaction) (*flow.Transaction, *flow.TransactionResult, error) - -// SendTransaction will build and send a transaction to the Flow network, using the accounts provided for each role and -// contain the script. Transaction as well as transaction result will be returned in case the transaction is successfully submitted. -SendTransaction(context.Context, *TransactionAccountRoles, *Script, uint64) (*flow.Transaction, *flow.TransactionResult, error) -``` - -Passing network parameter is no longer required as the network is initialized using the `NewFlowkit` initializer. - ---- - -The `ScriptQuery` was moved to `flowkit` package and addded `Latest` field. It is also now passed by value instead of -by pointer. You can use `LatestScriptQuery` convenience variable to pass usage of latest block for script execution. - ----- - -The `TransactionAccountRoles` and `TransactionAddressesRoles` are no longer passed to transaction functions as -pointer but as value since they are always required. - ---- - -The `flowkit.NewScript` method was removed and you should use `flowkit.Script{}` struct directly for initialization. -Also getter and setters were removed to favour direct property access. - ---- - -The `config.Contracts.ByName(name string) *Contract` changed to return an error if contract -was not found whereas before it returned a nil value. - ---- - -The `Account` type and helper methods as well as `AccountKey` interface and all the implementations -were moved to `accounts` package. - ---- - -The `AccountKey`, `HexAccountKey`, `KmsAccountKey`, `Bip44AccountKey` were renamed to `Key`, `HexKey`, `KMSKey`, `BIP44Key` to avoid stutter in the naming, -as well as all the factory methods were renamed to remove the `account` word. - ---- - -The `Transaction` was moved to `transactions` package as well as all the factory methods. -All the factory methods were renamed to drop the `transaction` word. - ---- - -The `TransactionAddressesRoles` was moved to `transactions` package and renamed to drop the -`transaction` word to `AddressRoles` the same holds true for `TransactionAccountRoles`. - ---- - -The `ParseArgumentsJSON` and `ParseArgumentsWithoutType` were moved to a `arguments` package and renamed -to `ParseJSON` and `ParseWithoutType` correspondingly. - ---- - -Renamed transaction function from `transaction.SetGasLimit` to `transaction.SetComputeLimit`. - ---- - -The `flowkit.Account` getter methods for `account.Address()`, `account.Name()` was removed and the variable -was exported so you can use `account.Address`, `account.Name` directly. - ---- - -The function `state.DeploymentContractsByNetwork(network string)` changed to accept network type like so: -`state.DeploymentContractsByNetwork(network config.Network)`, there are also predefined network types in config -you can access using `config.EmulatorNetwork`, `config.TestnetNetwork`, `config.MainnetNetwork`. - ---- - -The config functions for getting default networks was removed and replaced with variables. -For example the method `config.DefaultMainnetNetwork()` was replaced with `config.MainnetNetwork` variable. - - -### Added - ----- -An `AccountPublicKey` type was added used in flowkit `CreateAccount` API, you can find the definition in [flowkit.go](flowkit.go). - ---- - -A `BlockQuery` was added for querying blocks using the flowkit `GetBlock` API. You can find the definition in [flowkit.go](flowkit.go). -You can use `NewBlockQuery` factory method to pass in raw string, which should be either equal to `"latest"`, height or block ID. - ---- - -Added predefined common networks in config: -```go - EmptyNetwork = Network{} - EmulatorNetwork = Network{ - Name: "emulator", - Host: "127.0.0.1:3569", - } - TestnetNetwork = Network{ - Name: "testnet", - Host: "access.devnet.nodes.onflow.org:9000", - } - SandboxNetwork = Network{ - Name: "sandboxnet", - Host: "access.sandboxnet.nodes.onflow.org:9000", - } - MainnetNetwork = Network{ - Name: "mainnet", - Host: "access.mainnet.nodes.onflow.org:9000", - } - DefaultNetworks = Networks{ - EmulatorNetwork, - TestnetNetwork, - SandboxNetwork, - MainnetNetwork, - } -``` - -### Removed - ---- - -The `GetBlock` API doesn't return the `[]flow.BlockEvents, []*flow.Collection` anymore, you should use `GetCollection` and -`GetEvents` API. - ---- - -The `GetLatestBlockHeight` method was removed, you should instead use `GetBlock(LatestBlockQuery)`. - ---- - -The `flowkit.Exist(path string)` was removed, the `config.Exist(path string)` should be used. - -## v0.46.2 - -### Changed - ---- -The `Network` property was removed from `Contract` type. The network is now included in -the `Aliases` on the contract. We also removed having multiple contracts by same name just to -accommodate multiple aliases. Now there's only one contract identified by name, -and if there are multiple network aliases they are contained in the `Aliases` list. -- Package: `config` -- Type: `Contracts` - ---- -A method `Contracts.AddOrUpdate(name, contract)` was changed to not include the name, as it's -already part of the contract you are adding. -- Method: `AddOrUpdate` -- Package: `config` -- Type: `Contracts` - ---- -Don't return error if contract by name not found but rather just a `nil`. -- Method: `ByName` -- Package: `config` -- Type: `Contracts` - -### Added - ---- - -New type `Aliases` was added to `Contracts`. -Aliases contain new functions to get the aliases by network and add new aliases. -- Package: `config` -- Type: `Contracts` - - ---- - -`WithLogger` now takes zerolog instead of Logrus since that is what flow-emulator has changed to. -- Package: `gateway` -- Type: `EmulatorGateway` diff --git a/flowkit/README.md b/flowkit/README.md index dc8ed2f0a..c48a65f09 100644 --- a/flowkit/README.md +++ b/flowkit/README.md @@ -1,16 +1,3 @@ -## Flowkit Package Design -Flowkit is a core package used by the CLI commands. It features APIs for interacting with the Flow network -in the context of flow.json configuration values. Flowkit is defined by the [interface here](services.go). - -Flowkit contains multiple subpackages, the most important ones are: -- **config**: parsing and storing of flow.json values, as well as validation, -- **gateway**: implementation of Flow AN methods, uses emulator as well as Go SDK to communicate with ANs, -- **project**: stateful operations on top of flow.json, which allows resolving imports in contracts used in deployments - -It is important we define clear boundaries between flowkit and other CLI packages. If we are in doubt where certain -methods should be implemented we must ask ourselves if the method provides value for any other consumers of the -pacakge or only provides utility for CLI usage, if it's only providing utility for CLI then it should be added inside -the internal package, instead of flowkit. If in doubt better to add things to internal package and then move to flowkit -if such need is identified. - +## Flowkit +Note: This module has been migrated to github.com/onflow/flowkit. The latest supported version is v1.13.0. Please use the new module github.com/onflow/flowkit instead for any future updates. Version v1.13.0 is equivalent to version v1.13.0 on the new module. diff --git a/flowkit/accounts/account.go b/flowkit/accounts/account.go deleted file mode 100644 index bc2c9612a..000000000 --- a/flowkit/accounts/account.go +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package accounts - -import ( - "crypto/rand" - "fmt" - "strings" - - "github.com/onflow/flow-go-sdk" - "github.com/onflow/flow-go-sdk/crypto" - - "github.com/onflow/flow-cli/flowkit/config" -) - -// Account is defined by an address and name and contains an Key which can be used for signing. -type Account struct { - Name string - Address flow.Address - Key Key -} - -func FromConfig(conf *config.Config) (Accounts, error) { - var accounts Accounts - for _, accountConf := range conf.Accounts { - acc, err := fromConfig(accountConf) - if err != nil { - return nil, err - } - accounts = append(accounts, *acc) - } - - return accounts, nil -} - -func ToConfig(accounts Accounts) config.Accounts { - accountConfs := make([]config.Account, 0) - - for _, account := range accounts { - accountConfs = append(accountConfs, toConfig(account)) - } - - return accountConfs -} - -func fromConfig(account config.Account) (*Account, error) { - key, err := keyFromConfig(account.Key) - if err != nil { - return nil, err - } - - return &Account{ - Name: account.Name, - Address: account.Address, - Key: key, - }, nil -} - -func toConfig(account Account) config.Account { - var key config.AccountKey - if account.Key != nil { - key = account.Key.ToConfig() - } - - return config.Account{ - Name: account.Name, - Address: account.Address, - Key: key, - } -} - -func NewEmulatorAccount(sigAlgo crypto.SignatureAlgorithm, hashAlgo crypto.HashAlgorithm) (*Account, error) { - seed := make([]byte, crypto.MinSeedLength) - _, err := rand.Read(seed) - if err != nil { - return nil, fmt.Errorf("failed to generate random seed: %v", err) - } - - privateKey, err := crypto.GeneratePrivateKey(sigAlgo, seed) - if err != nil { - return nil, fmt.Errorf("failed to generate emulator service key: %v", err) - } - - return &Account{ - Name: config.DefaultEmulator.ServiceAccount, - Address: flow.ServiceAddress(flow.Emulator), - Key: NewHexKeyFromPrivateKey(0, hashAlgo, privateKey), - }, nil -} - -// Accounts is a collection of account. -type Accounts []Account - -// Remove an account. -func (a *Accounts) Remove(name string) error { - account, err := a.ByName(name) - if err != nil { - return err - } - - if account == nil { - return fmt.Errorf("account named %s does not exist in configuration", name) - } - - for i, acc := range *a { - if acc.Name == name { - *a = append((*a)[0:i], (*a)[i+1:]...) // remove item - } - } - - return nil -} - -func (a *Accounts) String() string { - return strings.Join(a.Names(), ",") -} - -func (a *Accounts) Names() []string { - accNames := make([]string, 0) - for _, acc := range *a { - accNames = append(accNames, acc.Name) - } - return accNames -} - -// ByAddress get an account by address. -func (a Accounts) ByAddress(address flow.Address) (*Account, error) { - for i := range a { - if a[i].Address == address { - return &a[i], nil - } - } - - return nil, fmt.Errorf("could not find account with address %s in the configuration", address) -} - -// ByName get an account by name or returns and error if no account found -func (a Accounts) ByName(name string) (*Account, error) { - for i := range a { - if a[i].Name == name { - return &a[i], nil - } - } - - return nil, fmt.Errorf("could not find account with name %s in the configuration", name) -} - -// AddOrUpdate add account if missing or updates if present. -func (a *Accounts) AddOrUpdate(account *Account) { - for i, acc := range *a { - if acc.Name == account.Name { - (*a)[i] = acc - return - } - } - - *a = append(*a, *account) -} diff --git a/flowkit/accounts/account_test.go b/flowkit/accounts/account_test.go deleted file mode 100644 index c4c684e8e..000000000 --- a/flowkit/accounts/account_test.go +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package accounts - -import ( - "testing" - - "github.com/onflow/flow-go-sdk" - "github.com/stretchr/testify/assert" -) - -func Test_Accounts(t *testing.T) { - - t.Run("List accounts", func(t *testing.T) { - accs := Accounts{ - Account{Name: "alice"}, - Account{Name: "bob"}, - Account{Name: "charlie"}, - Account{Name: "dave"}, - } - - assert.Equal(t, "alice,bob,charlie,dave", accs.String()) - assert.Equal(t, []string{"alice", "bob", "charlie", "dave"}, accs.Names()) - }) - - t.Run("Get by name", func(t *testing.T) { - accs := Accounts{ - Account{Name: "alice"}, - Account{Name: "bob"}, - } - - a, err := accs.ByName("alice") - assert.NoError(t, err) - assert.Equal(t, "alice", a.Name) - assert.Equal(t, "0000000000000000", a.Address.String()) - }) - - t.Run("Change address", func(t *testing.T) { - accs := Accounts{ - Account{Name: "alice"}, - Account{Name: "bob"}, - } - - a, err := accs.ByName("alice") - assert.NoError(t, err) - newAddr := flow.HexToAddress("0x02") - a.Address = newAddr - // change gets reflected in the collection - a2, _ := accs.ByName("alice") - assert.Equal(t, "0000000000000002", a2.Address.String()) - }) - - t.Run("Get by address", func(t *testing.T) { - accs := Accounts{ - Account{Name: "alice"}, - Account{Name: "bob"}, - } - - a, _ := accs.ByName("alice") - newAddr := flow.HexToAddress("0x02") - a.Address = newAddr - - a2, err := accs.ByAddress(newAddr) - assert.NoError(t, err) - assert.Equal(t, "alice", a2.Name) - }) - - t.Run("Update", func(t *testing.T) { - accs := Accounts{ - Account{Name: "alice"}, - Account{Name: "bob"}, - } - - accs.AddOrUpdate(&Account{Name: "mike"}) - assert.Equal(t, "alice,bob,mike", accs.String()) - - m1, err := accs.ByName("mike") - assert.NoError(t, err) - assert.Equal(t, "0000000000000000", m1.Address.String()) - - m1.Address = flow.HexToAddress("0x02") - accs.AddOrUpdate(m1) - m2, err := accs.ByName("mike") - assert.NoError(t, err) - assert.Equal(t, "0000000000000002", m2.Address.String()) - }) - - t.Run("Remove", func(t *testing.T) { - accs := Accounts{ - Account{Name: "alice"}, - Account{Name: "bob"}, - Account{Name: "mike"}, - } - - err := accs.Remove("mike") - assert.NoError(t, err) - assert.Equal(t, "alice,bob", accs.String()) - }) - - t.Run("Fail not found", func(t *testing.T) { - accs := Accounts{ - Account{Name: "alice"}, - } - - _, err := accs.ByName("bob") - assert.EqualError(t, err, "could not find account with name bob in the configuration") - - _, err = accs.ByAddress(flow.HexToAddress("0x01")) - assert.EqualError(t, err, "could not find account with address 0000000000000001 in the configuration") - }) - -} diff --git a/flowkit/accounts/keys.go b/flowkit/accounts/keys.go deleted file mode 100644 index cac4481f3..000000000 --- a/flowkit/accounts/keys.go +++ /dev/null @@ -1,443 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package accounts - -import ( - "context" - "encoding/hex" - "fmt" - "os" - "os/exec" - "regexp" - "strings" - - goeth "github.com/ethereum/go-ethereum/accounts" - "github.com/lmars/go-slip10" - "github.com/onflow/flow-go-sdk/crypto" - "github.com/onflow/flow-go-sdk/crypto/cloudkms" - "github.com/tyler-smith/go-bip39" - - "github.com/onflow/flow-cli/flowkit/config" -) - -// PublicKey contains public account key information. -type PublicKey struct { - Public crypto.PublicKey - Weight int - SigAlgo crypto.SignatureAlgorithm - HashAlgo crypto.HashAlgorithm -} - -// Key defines functions any key representation must implement. -type Key interface { - // Type returns the key type (hex, kms, file...) - Type() config.KeyType - // Index returns the key index on the account - Index() int - // SigAlgo returns signature algorithm used for signing - SigAlgo() crypto.SignatureAlgorithm - // HashAlgo returns hash algorithm used for signing - HashAlgo() crypto.HashAlgorithm - // Signer is used when we want to sign a transaction, using the Sign() function - Signer(ctx context.Context) (crypto.Signer, error) - // ToConfig converts the key to the storable key format - ToConfig() config.AccountKey - // Validate key - Validate() error - // PrivateKey returns the private key if possible, - // depends on the key type - PrivateKey() (*crypto.PrivateKey, error) -} - -var _ Key = &HexKey{} - -var _ Key = &KMSKey{} - -var _ Key = &BIP44Key{} - -func keyFromConfig(accountKeyConf config.AccountKey) (Key, error) { - switch accountKeyConf.Type { - case config.KeyTypeHex: - return hexKeyFromConfig(accountKeyConf) - case config.KeyTypeBip44: - return bip44KeyFromConfig(accountKeyConf) - case config.KeyTypeGoogleKMS: - return kmsKeyFromConfig(accountKeyConf) - case config.KeyTypeFile: - return fileKeyFromConfig(accountKeyConf) - } - - return nil, fmt.Errorf(`invalid key type: "%s"`, accountKeyConf.Type) -} - -type baseKey struct { - keyType config.KeyType - index int - sigAlgo crypto.SignatureAlgorithm - hashAlgo crypto.HashAlgorithm -} - -func baseKeyFromConfig(accountKeyConf config.AccountKey) *baseKey { - return &baseKey{ - keyType: accountKeyConf.Type, - index: accountKeyConf.Index, - sigAlgo: accountKeyConf.SigAlgo, - hashAlgo: accountKeyConf.HashAlgo, - } -} - -func (a *baseKey) Type() config.KeyType { - return a.keyType -} - -func (a *baseKey) SigAlgo() crypto.SignatureAlgorithm { - if a.sigAlgo == crypto.UnknownSignatureAlgorithm { - return crypto.ECDSA_P256 // default value - } - return a.sigAlgo -} - -func (a *baseKey) HashAlgo() crypto.HashAlgorithm { - if a.hashAlgo == crypto.UnknownHashAlgorithm { - return crypto.SHA3_256 // default value - } - return a.hashAlgo -} - -func (a *baseKey) Index() int { - return a.index // default to 0 -} - -func (a *baseKey) Validate() error { - return nil -} - -// KMSKey implements Gcloud KMS system for signing. -type KMSKey struct { - *baseKey - kmsKey cloudkms.Key -} - -// ToConfig convert account key to configuration. -func (a *KMSKey) ToConfig() config.AccountKey { - return config.AccountKey{ - Type: a.keyType, - Index: a.index, - SigAlgo: a.sigAlgo, - HashAlgo: a.hashAlgo, - ResourceID: a.kmsKey.ResourceID(), - } -} - -func (a *KMSKey) Signer(ctx context.Context) (crypto.Signer, error) { - kmsClient, err := cloudkms.NewClient(ctx) - if err != nil { - return nil, err - } - - accountKMSSigner, err := kmsClient.SignerForKey( - ctx, - a.kmsKey, - ) - if err != nil { - return nil, err - } - - return accountKMSSigner, nil -} - -func (a *KMSKey) Validate() error { - return gcloudApplicationSignin(a.kmsKey.ResourceID()) -} - -func (a *KMSKey) PrivateKey() (*crypto.PrivateKey, error) { - return nil, fmt.Errorf("private key not accessible") -} - -// gcloudApplicationSignin signs in as an application user using gcloud command line tool -// currently assumes gcloud is already installed on the machine -// will by default pop a browser window to sign in -func gcloudApplicationSignin(resourceID string) error { - googleAppCreds := os.Getenv("GOOGLE_APPLICATION_CREDENTIALS") - if len(googleAppCreds) > 0 { - return nil - } - - kms, err := cloudkms.KeyFromResourceID(resourceID) - if err != nil { - return err - } - - proj := kms.ProjectID - if len(proj) == 0 { - return fmt.Errorf( - "could not get GOOGLE_APPLICATION_CREDENTIALS, no google service account JSON provided but private key type is KMS", - ) - } - - loginCmd := exec.Command("gcloud", "auth", "application-default", "login", fmt.Sprintf("--project=%s", proj)) - - output, err := loginCmd.CombinedOutput() - if err != nil { - return fmt.Errorf("Failed to run %q: %s\n", loginCmd.String(), err) - } - - squareBracketRegex := regexp.MustCompile(`(?s)\[(.*)\]`) - regexResult := squareBracketRegex.FindAllStringSubmatch(string(output), -1) - // Should only be one value. Second index since first index contains the square brackets - googleApplicationCreds := regexResult[0][1] - - os.Setenv("GOOGLE_APPLICATION_CREDENTIALS", googleApplicationCreds) - - return nil -} - -func kmsKeyFromConfig(key config.AccountKey) (Key, error) { - accountKMSKey, err := cloudkms.KeyFromResourceID(key.ResourceID) - if err != nil { - return nil, err - } - - return &KMSKey{ - baseKey: &baseKey{ - keyType: config.KeyTypeGoogleKMS, - index: key.Index, - sigAlgo: key.SigAlgo, - hashAlgo: key.HashAlgo, - }, - kmsKey: accountKMSKey, - }, nil -} - -// HexKey implements account key in hex representation. -type HexKey struct { - *baseKey - privateKey crypto.PrivateKey -} - -func NewHexKeyFromPrivateKey( - index int, - hashAlgo crypto.HashAlgorithm, - privateKey crypto.PrivateKey, -) *HexKey { - return &HexKey{ - baseKey: &baseKey{ - keyType: config.KeyTypeHex, - index: index, - sigAlgo: privateKey.Algorithm(), - hashAlgo: hashAlgo, - }, - privateKey: privateKey, - } -} - -func hexKeyFromConfig(accountKey config.AccountKey) (*HexKey, error) { - return &HexKey{ - baseKey: baseKeyFromConfig(accountKey), - privateKey: accountKey.PrivateKey, - }, nil -} - -func (a *HexKey) Signer(ctx context.Context) (crypto.Signer, error) { - return crypto.NewInMemorySigner(a.privateKey, a.HashAlgo()) -} - -func (a *HexKey) PrivateKey() (*crypto.PrivateKey, error) { - return &a.privateKey, nil -} - -func (a *HexKey) ToConfig() config.AccountKey { - return config.AccountKey{ - Type: a.keyType, - Index: a.index, - SigAlgo: a.sigAlgo, - HashAlgo: a.hashAlgo, - PrivateKey: a.privateKey, - } -} - -func (a *HexKey) Validate() error { - _, err := crypto.DecodePrivateKeyHex(a.sigAlgo, a.privateKeyHex()) - if err != nil { - return fmt.Errorf("invalid private key: %w", err) - } - - return nil -} - -func (a *HexKey) privateKeyHex() string { - return hex.EncodeToString(a.privateKey.Encode()) -} - -// fileKeyFromConfig creates a hex account key from a file location -func fileKeyFromConfig(accountKey config.AccountKey) (*FileKey, error) { - return &FileKey{ - baseKey: baseKeyFromConfig(accountKey), - location: accountKey.Location, - }, nil -} - -// NewFileKey creates a new account key that is stored to a separate file in the provided location. -// -// This type of the key is a more secure way of storing accounts. The config only includes the location and not the key. -func NewFileKey( - location string, - index int, - sigAlgo crypto.SignatureAlgorithm, - hashAlgo crypto.HashAlgorithm, -) *FileKey { - return &FileKey{ - baseKey: &baseKey{ - keyType: config.KeyTypeFile, - index: index, - sigAlgo: sigAlgo, - hashAlgo: hashAlgo, - }, - location: location, - } -} - -// FileKey represents a key that is saved in a seperate file and will be lazy-loaded. -// -// The FileKey stores location of the file where private key is stored in hex-encoded format. -type FileKey struct { - *baseKey - privateKey crypto.PrivateKey - location string -} - -func (f *FileKey) Signer(ctx context.Context) (crypto.Signer, error) { - key, err := f.PrivateKey() - if err != nil { - return nil, err - } - - return crypto.NewInMemorySigner(*key, f.HashAlgo()) -} - -func (f *FileKey) PrivateKey() (*crypto.PrivateKey, error) { - if f.privateKey == nil { // lazy load the key - key, err := os.ReadFile(f.location) // TODO(sideninja) change to use the state ReaderWriter - if err != nil { - return nil, fmt.Errorf("could not load the key for the account from provided location %s: %w", f.location, err) - } - pkey, err := crypto.DecodePrivateKeyHex(f.sigAlgo, strings.TrimPrefix(string(key), "0x")) - if err != nil { - return nil, fmt.Errorf("could not decode the key from provided location %s: %w", f.location, err) - } - f.privateKey = pkey - } - return &f.privateKey, nil -} - -func (f *FileKey) ToConfig() config.AccountKey { - return config.AccountKey{ - Type: config.KeyTypeFile, - SigAlgo: f.sigAlgo, - HashAlgo: f.hashAlgo, - Location: f.location, - } -} - -// BIP44Key implements https://github.com/onflow/flow/blob/master/flips/20201125-bip-44-multi-account.md -type BIP44Key struct { - *baseKey - privateKey crypto.PrivateKey - mnemonic string - derivationPath string -} - -func bip44KeyFromConfig(key config.AccountKey) (Key, error) { - return &BIP44Key{ - baseKey: &baseKey{ - keyType: config.KeyTypeBip44, - index: key.Index, - sigAlgo: key.SigAlgo, - hashAlgo: key.HashAlgo, - }, - derivationPath: key.DerivationPath, - mnemonic: key.Mnemonic, - }, nil -} - -func (a *BIP44Key) Signer(ctx context.Context) (crypto.Signer, error) { - pkey, err := a.PrivateKey() - if err != nil { - return nil, err - } - - return crypto.NewInMemorySigner(*pkey, a.HashAlgo()) -} - -func (a *BIP44Key) PrivateKey() (*crypto.PrivateKey, error) { - if a.privateKey == nil { // lazy load - err := a.Validate() - if err != nil { - return nil, err - } - } - return &a.privateKey, nil -} - -func (a *BIP44Key) ToConfig() config.AccountKey { - return config.AccountKey{ - Type: a.keyType, - Index: a.index, - SigAlgo: a.sigAlgo, - HashAlgo: a.hashAlgo, - PrivateKey: a.privateKey, - Mnemonic: a.mnemonic, - DerivationPath: a.derivationPath, - } -} - -func (a *BIP44Key) Validate() error { - - if !bip39.IsMnemonicValid(a.mnemonic) { - return fmt.Errorf("invalid mnemonic defined for account in flow.json") - } - - derivationPath, err := goeth.ParseDerivationPath(a.derivationPath) - if err != nil { - return fmt.Errorf("invalid derivation path defined for account in flow.json") - } - - seed := bip39.NewSeed(a.mnemonic, "") - curve := slip10.CurveBitcoin - if a.sigAlgo == crypto.ECDSA_P256 { - curve = slip10.CurveP256 - } - accountKey, err := slip10.NewMasterKeyWithCurve(seed, curve) - if err != nil { - return err - } - - for _, n := range derivationPath { - accountKey, err = accountKey.NewChildKey(n) - - if err != nil { - return err - } - } - a.privateKey, err = crypto.DecodePrivateKey(a.SigAlgo(), accountKey.Key) - if err != nil { - return err - } - return nil -} diff --git a/flowkit/accounts/keys_test.go b/flowkit/accounts/keys_test.go deleted file mode 100644 index 550c6b8bd..000000000 --- a/flowkit/accounts/keys_test.go +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package accounts - -import ( - "context" - "testing" - - "github.com/stretchr/testify/assert" - - "github.com/onflow/flow-cli/flowkit/config" -) - -func Test_KMS_Keys(t *testing.T) { - confKey := config.AccountKey{ - Type: config.KeyTypeGoogleKMS, - Index: 0, - SigAlgo: config.DefaultSigAlgo, - HashAlgo: config.DefaultHashAlgo, - ResourceID: "projects/my-project/locations/global/keyRings/flow/cryptoKeys/my-account/cryptoKeyVersions/1", - } - - kmsKey, err := kmsKeyFromConfig(confKey) - assert.NoError(t, err) - - _, err = kmsKey.PrivateKey() - assert.EqualError(t, err, "private key not accessible") - assert.Equal(t, confKey, kmsKey.ToConfig()) -} - -func Test_File_key(t *testing.T) { - confKey := config.AccountKey{ - Type: config.KeyTypeFile, - Index: 0, - SigAlgo: config.DefaultSigAlgo, - HashAlgo: config.DefaultHashAlgo, - Location: "./test.pkey", - } - - fileKey, err := fileKeyFromConfig(confKey) - assert.NoError(t, err) - - cKey := fileKey.ToConfig() - assert.Equal(t, cKey, confKey) - - key := NewFileKey(confKey.Location, confKey.Index, confKey.SigAlgo, confKey.HashAlgo) - assert.Equal(t, confKey, key.ToConfig()) -} - -func Test_BIP44(t *testing.T) { - confKey := config.AccountKey{ - Type: config.KeyTypeBip44, - Index: 0, - SigAlgo: config.DefaultSigAlgo, - HashAlgo: config.DefaultHashAlgo, - Mnemonic: "version field tornado move level pretty inject stereo ten catalog salon swallow", - DerivationPath: "m/44'/539'/0'/0/0", - } - - key, err := bip44KeyFromConfig(confKey) - assert.NoError(t, err) - - const pubKey = "0x2d6daea8b0ba5b1d5935f7846ccdd7e6f9f981e34d3c0a02a927cc79c837eba56c0f9a979195e41143495b72314ffcab60da6b7031060c80dc12f01f7f2096be" - assert.Equal(t, confKey, key.ToConfig()) - pkey, err := key.PrivateKey() - assert.NoError(t, err) - assert.Equal(t, pubKey, (*pkey).PublicKey().String()) - - sig, err := key.Signer(context.Background()) - assert.NoError(t, err) - assert.Equal(t, pubKey, sig.PublicKey().String()) -} diff --git a/flowkit/arguments/arguments.go b/flowkit/arguments/arguments.go deleted file mode 100644 index 69f3156f9..000000000 --- a/flowkit/arguments/arguments.go +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package arguments - -import ( - "encoding/json" - "fmt" - "strings" - - "github.com/onflow/cadence" - jsoncdc "github.com/onflow/cadence/encoding/json" - "github.com/onflow/cadence/runtime" - "github.com/onflow/cadence/runtime/ast" - "github.com/onflow/cadence/runtime/cmd" - "github.com/onflow/cadence/runtime/common" - "github.com/onflow/cadence/runtime/interpreter" - "github.com/onflow/cadence/runtime/sema" -) - -type cadenceArgument struct { - Value cadence.Value -} - -func (v *cadenceArgument) MarshalJSON() ([]byte, error) { - return jsoncdc.Encode(v.Value) -} - -func (v *cadenceArgument) UnmarshalJSON(b []byte) (err error) { - v.Value, err = jsoncdc.Decode(nil, b) - if err != nil { - return err - } - return nil -} - -// ParseJSON parses string representing JSON array with Cadence arguments. -// -// Cadence arguments must be defined in the JSON-Cadence format https://developers.flow.com/cadence/json-cadence-spec -func ParseJSON(args string) ([]cadence.Value, error) { - var arg []cadenceArgument - b := []byte(args) - err := json.Unmarshal(b, &arg) - - if err != nil { - return nil, err - } - - cadenceArgs := make([]cadence.Value, len(arg)) - for i, arg := range arg { - cadenceArgs[i] = arg.Value - } - return cadenceArgs, nil -} - -// ParseWithoutType parses arguments passed as string slice based on the Cadence code. -// -// Using the Cadence code required arguments are computed and then extracted from passed slice of arguments. -// The fileName argument is optional and can be empty if not present. -func ParseWithoutType(args []string, code []byte, fileName string) (scriptArgs []cadence.Value, err error) { - - resultArgs := make([]cadence.Value, 0, len(args)) - - codes := map[common.Location][]byte{} - location := common.StringLocation(fileName) - program, must := cmd.PrepareProgram(code, location, codes) - checker, _ := cmd.PrepareChecker(program, location, codes, nil, nil, must) - - var parameterList []*ast.Parameter - - functionDeclaration := sema.FunctionEntryPointDeclaration(program) - if functionDeclaration != nil { - if functionDeclaration.ParameterList != nil { - parameterList = functionDeclaration.ParameterList.Parameters - } - } - - transactionDeclaration := program.TransactionDeclarations() - if len(transactionDeclaration) == 1 { - if transactionDeclaration[0].ParameterList != nil { - parameterList = transactionDeclaration[0].ParameterList.Parameters - } - } - - contractDeclaration := program.SoleContractDeclaration() - if contractDeclaration != nil { - contractInitializer := contractDeclaration.Members.Initializers() - if len(contractInitializer) == 1 { - if contractInitializer[0].FunctionDeclaration.ParameterList != nil { - parameterList = contractInitializer[0].FunctionDeclaration.ParameterList.Parameters - } - } - } - - if parameterList == nil { - return resultArgs, nil - } - - if len(parameterList) != len(args) { - return nil, fmt.Errorf("argument count is %d, expected %d", len(args), len(parameterList)) - } - - inter, err := interpreter.NewInterpreter(nil, nil, &interpreter.Config{}) - if err != nil { - return nil, err - } - - for index, argumentString := range args { - astType := parameterList[index].TypeAnnotation.Type - semaType := checker.ConvertType(astType) - - if semaType == sema.StringType { - if !strings.HasPrefix(argumentString, "\"") { - argumentString = ast.QuoteString(argumentString) - } - } else if _, ok := semaType.(*sema.AddressType); ok { - if !strings.HasPrefix(argumentString, "0x") { - argumentString = fmt.Sprintf("0x%s", argumentString) - } - } - - value, err := runtime.ParseLiteral(argumentString, semaType, inter) - if err != nil { - return nil, fmt.Errorf( - "argument `%s` is not expected type `%s`", - parameterList[index].Identifier, - semaType.QualifiedString(), - ) - } - - resultArgs = append(resultArgs, value) - } - return resultArgs, nil -} diff --git a/flowkit/arguments/arguments_test.go b/flowkit/arguments/arguments_test.go deleted file mode 100644 index d7988f33d..000000000 --- a/flowkit/arguments/arguments_test.go +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package arguments - -import ( - "fmt" - "testing" - - "github.com/onflow/cadence" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_ParseWithoutType(t *testing.T) { - t.Parallel() - - t.Run("types", func(t *testing.T) { - t.Parallel() - - type testCase struct { - Name string - Literal string - InvalidLiteral string - Value cadence.Value - Type cadence.Type - } - - testCases := []testCase{ - { - Name: "Address", - Value: cadence.NewAddress([8]byte{0, 0, 0, 0, 0, 0, 0, 1}), - Type: cadence.AddressType, - }, - { - Name: "Bool", - Value: cadence.NewBool(true), - Type: cadence.BoolType, - }, - { - Name: "Int", - Value: cadence.NewInt(-42), - Type: cadence.IntType, - }, - { - Name: "Int8", - Value: cadence.NewInt8(-42), - Type: cadence.Int8Type, - }, - { - Name: "Int16", - Value: cadence.NewInt16(-42), - Type: cadence.Int16Type, - }, - { - Name: "Int32", - Value: cadence.NewInt32(-42), - Type: cadence.Int32Type, - }, - { - Name: "Int64", - Value: cadence.NewInt64(-42), - Type: cadence.Int64Type, - }, - { - Name: "Int128", - Value: cadence.NewInt128(-42), - Type: cadence.Int128Type, - }, - { - Name: "UInt8", - Value: cadence.NewUInt8(42), - Type: cadence.UInt8Type, - }, - { - Name: "UInt16", - Value: cadence.NewUInt16(42), - Type: cadence.UInt16Type, - }, - { - Name: "UInt32", - Value: cadence.NewUInt32(42), - Type: cadence.UInt32Type, - }, - { - Name: "UInt64", - Value: cadence.NewUInt64(42), - Type: cadence.UInt64Type, - }, - { - Name: "UInt128", - Value: cadence.NewUInt128(42), - Type: cadence.UInt128Type, - }, - { - Name: "String", - Value: cadence.String("42"), - Type: cadence.StringType, - }, - { - Name: "String, no quoting", - Literal: `foo`, - Value: cadence.String("foo"), - Type: cadence.StringType, - }, - { - Name: "optional String, nil", - Value: cadence.NewOptional(nil), - Type: &cadence.OptionalType{ - Type: cadence.StringType, - }, - }, - { - Name: "optional String, value", - Value: cadence.NewOptional( - cadence.String("test"), - ), - Type: &cadence.OptionalType{ - Type: cadence.StringType, - }, - }, - { - Name: "doubly optional String, nil", - Value: cadence.NewOptional( - cadence.NewOptional(nil), - ), - Type: &cadence.OptionalType{ - Type: &cadence.OptionalType{ - Type: cadence.StringType, - }, - }, - }, - { - Name: "variable-sized array", - Value: cadence.NewArray([]cadence.Value{ - cadence.String("42"), - }).WithType(&cadence.VariableSizedArrayType{ - ElementType: cadence.StringType, - }), - Type: &cadence.VariableSizedArrayType{ - ElementType: cadence.StringType, - }, - }, - { - Name: "constant-sized array", - Value: cadence.NewArray([]cadence.Value{ - cadence.String("42"), - }).WithType(&cadence.ConstantSizedArrayType{ - ElementType: cadence.StringType, - Size: 1, - }), - Type: &cadence.ConstantSizedArrayType{ - ElementType: cadence.StringType, - Size: 1, - }, - }, - { - Name: "identifier (invalid)", - InvalidLiteral: "foo", - Type: cadence.IntType, - }, - { - Name: "expression (invalid)", - InvalidLiteral: "1 + 1", - Type: cadence.IntType, - }, - } - - test := func(testCase testCase) { - t.Run(testCase.Name, func(t *testing.T) { - t.Parallel() - - literal := testCase.Literal - if testCase.Value != nil { - literal = testCase.Value.String() - } else if len(testCase.InvalidLiteral) > 0 { - literal = testCase.InvalidLiteral - } - - args, err := ParseWithoutType( - []string{literal}, - []byte(fmt.Sprintf( - `access(all) fun main(test: %s) {}`, - testCase.Type.ID(), - )), - "", - ) - if len(testCase.InvalidLiteral) > 0 { - require.Error(t, err) - } else { - require.NoError(t, err) - assert.Equal(t, - []cadence.Value{testCase.Value}, - args, - ) - } - }) - } - - for _, testCase := range testCases { - test(testCase) - } - }) - - t.Run("entrypoints", func(t *testing.T) { - t.Parallel() - - template := map[string]string{ - "script": `access(all) fun main(foo: String): Void {}`, - "contract": `access(all) contract Foo { init(foo: String) {} }`, - "transaction": `transaction(foo: String) {}`, - } - - test := func(name string, code string) { - t.Run(name, func(t *testing.T) { - t.Parallel() - - args, err := ParseWithoutType([]string{"hello"}, []byte(code), "") - assert.NoError(t, err) - assert.Len(t, args, 1) - v, _ := cadence.NewString("hello") - assert.Equal(t, []cadence.Value{v}, args) - }) - } - - for name, code := range template { - test(name, code) - } - }) -} - -func Test_ParseJSON(t *testing.T) { - t.Parallel() - - jsonInput := `[{"type": "String", "value": "Hello World"}]` - - values, err := ParseJSON(jsonInput) - require.NoError(t, err) - - require.Len(t, values, 1) - assert.Equal(t, `"Hello World"`, values[0].String()) - assert.Equal(t, "String", values[0].Type().ID()) -} diff --git a/flowkit/cmd/flow-schema/flow-schema.go b/flowkit/cmd/flow-schema/flow-schema.go deleted file mode 100644 index 8ebd8c2b4..000000000 --- a/flowkit/cmd/flow-schema/flow-schema.go +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package main - -import ( - "encoding/json" - "flag" - "fmt" - "os" - "strings" - - configJson "github.com/onflow/flow-cli/flowkit/config/json" -) - -func main() { - var verify bool - flag.BoolVar(&verify, "verify", false, "Verify the schema") - - flag.Parse() - path := flag.Arg(0) - - if path == "" { - fmt.Println("Path is required") - os.Exit(1) - } - - schema := configJson.GenerateSchema() - json, err := json.MarshalIndent(schema, "", " ") - - if err != nil { - fmt.Println(err) - os.Exit(1) - } - - if verify { - fileContents, err := os.ReadFile(path) - if err != nil { - fmt.Println(err) - os.Exit(1) - } - - if normalizeNewlines(string(fileContents)) != normalizeNewlines(string(json)) { - fmt.Println("Schema is out of date - have you run `make generate-schema`?") - os.Exit(1) - } - } else { - os.WriteFile(path, json, 0644) - } -} - -func normalizeNewlines(s string) string { - return strings.ReplaceAll(s, "\r\n", "\n") -} diff --git a/flowkit/config/account.go b/flowkit/config/account.go deleted file mode 100644 index 673acbbf6..000000000 --- a/flowkit/config/account.go +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package config - -import ( - "fmt" - - "github.com/onflow/flow-go-sdk" - "github.com/onflow/flow-go-sdk/crypto" - "golang.org/x/exp/slices" -) - -const ( - DefaultHashAlgo = crypto.SHA3_256 - DefaultSigAlgo = crypto.ECDSA_P256 -) - -// Account defines the configuration for a Flow account. -type Account struct { - Name string - Address flow.Address - Key AccountKey -} - -type Accounts []Account - -// AccountKey represents account key and all their possible configuration formats. -type AccountKey struct { - Type KeyType - Index int - SigAlgo crypto.SignatureAlgorithm - HashAlgo crypto.HashAlgorithm - ResourceID string - Mnemonic string - DerivationPath string - PrivateKey crypto.PrivateKey - Location string - Env string -} - -func NewDefaultAccountKey(pkey crypto.PrivateKey) AccountKey { - return AccountKey{ - Type: KeyTypeHex, - SigAlgo: DefaultSigAlgo, - HashAlgo: DefaultHashAlgo, - PrivateKey: pkey, - } -} - -func (a *AccountKey) IsDefault() bool { - return a.Index == 0 && - a.Type == KeyTypeHex && - a.SigAlgo == DefaultSigAlgo && - a.HashAlgo == DefaultHashAlgo -} - -// ByName get account by name or error if not found. -func (a *Accounts) ByName(name string) (*Account, error) { - for _, account := range *a { - if account.Name == name { - return &account, nil - } - } - - return nil, fmt.Errorf("account with name %s is not present in configuration", name) -} - -// AddOrUpdate add new or update if already present. -func (a *Accounts) AddOrUpdate(name string, account Account) { - for i, existingAccount := range *a { - if existingAccount.Name == name { - (*a)[i] = account - return - } - } - - *a = append(*a, account) -} - -// Remove account by name. -func (a *Accounts) Remove(name string) { - for i, account := range *a { - if account.Name == name { - *a = slices.Delete(*a, i, i+1) - } - } -} diff --git a/flowkit/config/account_test.go b/flowkit/config/account_test.go deleted file mode 100644 index 9ee8756d9..000000000 --- a/flowkit/config/account_test.go +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package config - -import ( - "testing" - - "github.com/onflow/flow-go-sdk" - "github.com/stretchr/testify/assert" -) - -func TestAccounts_ByName(t *testing.T) { - acc1 := Account{ - Name: "test1", - Address: flow.HexToAddress("0x1"), - } - - acc2 := Account{ - Name: "test2", - Address: flow.HexToAddress("0x2"), - } - - accounts := Accounts{acc1, acc2} - - t.Run("Account present in slice", func(t *testing.T) { - account, err := accounts.ByName("test1") - assert.Nil(t, err) - assert.Equal(t, &acc1, account) - }) - - t.Run("Account not present in slice", func(t *testing.T) { - account, err := accounts.ByName("test3") - assert.Error(t, err) - assert.Nil(t, account) - }) -} - -func TestAccounts_AddOrUpdate(t *testing.T) { - acc1 := Account{ - Name: "test1", - Address: flow.HexToAddress("0x1"), - } - - acc2 := Account{ - Name: "test2", - Address: flow.HexToAddress("0x2"), - } - - // Test case 1: add a new account - t.Run("Add new account", func(t *testing.T) { - accounts := Accounts{acc1, acc2} - acc3 := Account{ - Name: "test3", - Address: flow.HexToAddress("0x3"), - } - - accounts.AddOrUpdate("test3", acc3) - assert.Len(t, accounts, 3) - }) - - // Test case 2: update an existing account - t.Run("Update existing account", func(t *testing.T) { - accounts := Accounts{acc1, acc2} - - acc2Updated := Account{ - Name: "test2", - Address: flow.HexToAddress("0x4"), - } - - accounts.AddOrUpdate("test2", acc2Updated) - assert.Len(t, accounts, 2) - - account, err := accounts.ByName("test2") - assert.Nil(t, err) - assert.Equal(t, acc2Updated, *account) - }) -} - -func TestAccounts_Remove(t *testing.T) { - acc1 := Account{ - Name: "account1", - Address: flow.HexToAddress("01"), - } - acc2 := Account{ - Name: "account2", - Address: flow.HexToAddress("02"), - } - acc3 := Account{ - Name: "account3", - Address: flow.HexToAddress("03"), - } - - accounts := Accounts{acc1, acc2, acc3} - - accounts.Remove("account2") - assert.Equal(t, len(accounts), 2) - - _, err := accounts.ByName("account2") - assert.Error(t, err) - - accounts.Remove("account4") - assert.Equal(t, len(accounts), 2) -} diff --git a/flowkit/config/config.go b/flowkit/config/config.go deleted file mode 100644 index 3781ba32b..000000000 --- a/flowkit/config/config.go +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package config - -import ( - "errors" - "fmt" - "os" -) - -// Config contains all the configuration for CLI and implements getters and setters for properties. -// Config is agnostic to format from which it is built and it doesn't provide persistence functionality. -// -// Emulators contains all the emulator config -// Contracts contains all contracts definitions and their sources -// Networks defines all the Flow networks addresses -// Accounts defines Flow accounts and their addresses, private key and more properties -// Deployments describes which contracts should be deployed to which accounts -type Config struct { - Emulators Emulators - Contracts Contracts - Dependencies Dependencies - Networks Networks - Accounts Accounts - Deployments Deployments -} - -type KeyType string - -const ( - KeyTypeHex KeyType = "hex" - KeyTypeGoogleKMS KeyType = "google-kms" - KeyTypeBip44 KeyType = "bip44" - KeyTypeFile KeyType = "file" -) - -// Validate the configuration values. -func (c *Config) Validate() error { - for _, con := range c.Contracts { - for _, alias := range con.Aliases { - _, err := c.Networks.ByName(alias.Network) - if alias.Network != "" && err != nil { - return fmt.Errorf("contract %s alias contains nonexisting network %s", con.Name, alias.Network) - } - } - } - - for _, em := range c.Emulators { - if _, err := c.Accounts.ByName(em.ServiceAccount); err != nil { - return fmt.Errorf("emulator %s contains nonexisting service account %s", em.Name, em.ServiceAccount) - } - } - - for _, d := range c.Deployments { - if _, err := c.Networks.ByName(d.Network); err != nil { - return fmt.Errorf("deployment contains nonexisting network %s", d.Network) - } - - for _, con := range d.Contracts { - if _, err := c.Contracts.ByName(con.Name); err != nil { - return fmt.Errorf("deployment contains nonexisting contract %s", con.Name) - } - } - - if _, err := c.Accounts.ByName(d.Account); err != nil { - return fmt.Errorf("deployment contains nonexisting account %s", d.Account) - } - } - - return nil -} - -// Default returns the default configuration. -func Default() *Config { - return &Config{ - Emulators: DefaultEmulators, - Networks: DefaultNetworks, - } -} - -var ErrOutdatedFormat = errors.New("you are using old configuration format") - -const DefaultPath = "flow.json" - -func IsDefaultPath(paths []string) bool { - return len(paths) == 2 && paths[0] == GlobalPath() && paths[1] == DefaultPath -} - -// GlobalPath gets global path based on home dir. -func GlobalPath() string { - dirname, err := os.UserHomeDir() - if err != nil { - return "" - } - - return fmt.Sprintf("%s/%s", dirname, DefaultPath) -} - -// DefaultPaths determines default paths for configuration. -func DefaultPaths() []string { - return []string{ - GlobalPath(), - DefaultPath, - } -} diff --git a/flowkit/config/config_test.go b/flowkit/config/config_test.go deleted file mode 100644 index 40882b4a2..000000000 --- a/flowkit/config/config_test.go +++ /dev/null @@ -1,342 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package config_test - -import ( - "testing" - - "github.com/onflow/cadence" - "github.com/onflow/flow-go-sdk" - "github.com/onflow/flow-go-sdk/crypto" - "github.com/stretchr/testify/assert" - - "github.com/onflow/flow-cli/flowkit/config" -) - -func generateComplexConfig() config.Config { - var keys []crypto.PrivateKey - key, _ := crypto.DecodePrivateKeyHex(crypto.ECDSA_P256, "dd72967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47") - keys = append(keys, key) - key, _ = crypto.DecodePrivateKeyHex(crypto.ECDSA_P256, "388e3fbdc654b765942610679bb3a66b74212149ab9482187067ee116d9a8118") - keys = append(keys, key) - key, _ = crypto.DecodePrivateKeyHex(crypto.ECDSA_P256, "27bbeba308e501f8485ddaab77e285c0bc0d611096a79b4f0b4ccc927c6dbf04") - keys = append(keys, key) - - return config.Config{ - Emulators: config.Emulators{{ - Name: "default", - Port: 9000, - ServiceAccount: "emulator-account", - }}, - Contracts: config.Contracts{{ - Name: "NonFungibleToken", - Location: "../hungry-kitties/cadence/contracts/NonFungibleToken.cdc", - }, { - Name: "FungibleToken", - Location: "../hungry-kitties/cadence/contracts/FungibleToken.cdc", - }, { - Name: "Kibble", - Location: "./cadence/kibble/contracts/Kibble.cdc", - }, { - Name: "KittyItems", - Location: "./cadence/kittyItems/contracts/KittyItems.cdc", - }, { - Name: "KittyItemsMarket", - Location: "./cadence/kittyItemsMarket/contracts/KittyItemsMarket.cdc", - Aliases: []config.Alias{{ - Network: "testnet", - Address: flow.HexToAddress("0x123123123"), - }}, - }, { - Name: "KittyItemsMarket", - Location: "0x123123123", - }}, - Deployments: config.Deployments{{ - Network: "emulator", - Account: "emulator-account", - Contracts: []config.ContractDeployment{ - {Name: "KittyItems", Args: []cadence.Value{}}, - {Name: "KittyItemsMarket", Args: []cadence.Value{}}, - }, - }, { - Network: "emulator", - Account: "account-4", - Contracts: []config.ContractDeployment{ - {Name: "FungibleToken", Args: []cadence.Value{}}, - {Name: "NonFungibleToken", Args: []cadence.Value{}}, - {Name: "Kibble", Args: []cadence.Value{}}, - {Name: "KittyItems", Args: []cadence.Value{}}, - {Name: "KittyItemsMarket", Args: []cadence.Value{}}, - }, - }, { - Network: "testnet", - Account: "account-2", - Contracts: []config.ContractDeployment{ - {Name: "FungibleToken", Args: []cadence.Value{}}, - {Name: "NonFungibleToken", Args: []cadence.Value{}}, - {Name: "Kibble", Args: []cadence.Value{}}, - {Name: "KittyItems", Args: []cadence.Value{}}, - }, - }}, - Accounts: config.Accounts{{ - Name: "emulator-account", - Address: flow.ServiceAddress(flow.Emulator), - Key: config.AccountKey{ - Type: config.KeyTypeHex, - Index: 0, - SigAlgo: crypto.ECDSA_P256, - HashAlgo: crypto.SHA3_256, - PrivateKey: keys[0], - }, - }, { - Name: "account-2", - Address: flow.HexToAddress("2c1162386b0a245f"), - Key: config.AccountKey{ - Type: config.KeyTypeHex, - Index: 0, - SigAlgo: crypto.ECDSA_P256, - HashAlgo: crypto.SHA3_256, - PrivateKey: keys[1], - }, - }, { - Name: "account-4", - Address: flow.HexToAddress("f8d6e0586b0a20c1"), - Key: config.AccountKey{ - Type: config.KeyTypeHex, - Index: 0, - SigAlgo: crypto.ECDSA_P256, - HashAlgo: crypto.SHA3_256, - PrivateKey: keys[2], - }, - }}, - Networks: config.Networks{{ - Name: "emulator", - Host: "127.0.0.1.3569", - }, { - Name: "testnet", - Host: "access.devnet.nodes.onflow.org:9000", - Key: "5000676131ad3e22d853a3f75a5b5d0db4236d08dd6612e2baad771014b5266a242bccecc3522ff7207ac357dbe4f225c709d9b273ac484fed5d13976a39bdcd", - }}, - } -} - -func Test_GetContractsForNetworkComplex(t *testing.T) { - conf := generateComplexConfig() - kitty, _ := conf.Contracts.ByName("KittyItems") - assert.NotNil(t, kitty) - - market, _ := conf.Contracts.ByName("KittyItemsMarket") - assert.NotNil(t, market) - - assert.Equal(t, "KittyItems", kitty.Name) - assert.Equal(t, "./cadence/kittyItemsMarket/contracts/KittyItemsMarket.cdc", market.Location) -} - -func Test_GetContractsByNameAndNetworkComplex(t *testing.T) { - conf := generateComplexConfig() - market, _ := conf.Contracts.ByName("KittyItemsMarket") - assert.NotNil(t, market) - - assert.Equal(t, "0000000123123123", market.Aliases.ByNetwork("testnet").Address.String()) -} - -func Test_GetAccountByNameComplex(t *testing.T) { - conf := generateComplexConfig() - acc, err := conf.Accounts.ByName("account-4") - assert.NoError(t, err) - - assert.Equal(t, "f8d6e0586b0a20c1", acc.Address.String()) -} - -func Test_GetDeploymentsByNetworkComplex(t *testing.T) { - conf := generateComplexConfig() - deployment := conf.Deployments.ByAccountAndNetwork("account-2", "testnet") - - assert.Equal(t, - []config.ContractDeployment{ - {Name: "FungibleToken", Args: []cadence.Value{}}, - {Name: "NonFungibleToken", Args: []cadence.Value{}}, - {Name: "Kibble", Args: []cadence.Value{}}, - {Name: "KittyItems", Args: []cadence.Value{}}, - }, - deployment.Contracts, - ) -} - -func Test_GetNetworkByNameComplex(t *testing.T) { - conf := generateComplexConfig() - network, err := conf.Networks.ByName("emulator") - assert.NoError(t, err) - assert.Equal(t, "127.0.0.1.3569", network.Host) - - network, err = conf.Networks.ByName("testnet") - assert.NoError(t, err) - assert.Equal(t, network.Host, "access.devnet.nodes.onflow.org:9000") - assert.Equal(t, network.Key, "5000676131ad3e22d853a3f75a5b5d0db4236d08dd6612e2baad771014b5266a242bccecc3522ff7207ac357dbe4f225c709d9b273ac484fed5d13976a39bdcd") -} - -func TestConfig_Validate(t *testing.T) { - // Test valid configuration - cfg := &config.Config{ - Emulators: config.DefaultEmulators, - Contracts: config.Contracts{{ - Name: "MyContract", - Location: "contracts/my-contract.cdc", - }}, - Networks: config.DefaultNetworks, - Accounts: config.Accounts{{ - Name: "MyAccount", - Address: flow.HexToAddress("0x01"), - }, { - Name: "emulator-account", - Address: flow.HexToAddress("0x02"), - }}, - Deployments: config.Deployments{{ - Network: "testnet", - Contracts: []config.ContractDeployment{{ - Name: "MyContract", - }}, - Account: "MyAccount", - }}, - } - - err := cfg.Validate() - assert.NoError(t, err, "config should be valid") - - cfg = &config.Config{ - Emulators: config.DefaultEmulators, - Contracts: config.Contracts{{ - Name: "MyContract", - Location: "contracts/my-contract.cdc", - }}, - Networks: config.DefaultNetworks, - Accounts: config.Accounts{{ - Name: "MyAccount", - Address: flow.HexToAddress("0x01"), - }}, - Deployments: config.Deployments{{ - Network: "testnet", - Contracts: []config.ContractDeployment{{ - Name: "MyContract", - }}, - Account: "MyAccount", - }}, - } - - err = cfg.Validate() - assert.EqualError(t, err, "emulator default contains nonexisting service account emulator-account") - - cfg = &config.Config{ - Emulators: config.DefaultEmulators, - Contracts: config.Contracts{{ - Name: "MyContract", - Location: "contracts/my-contract.cdc", - }}, - Networks: config.DefaultNetworks, - Accounts: config.Accounts{{ - Name: "MyAccount", - Address: flow.HexToAddress("0x01"), - }, { - Name: "emulator-account", - Address: flow.HexToAddress("0x02"), - }}, - Deployments: config.Deployments{{ - Network: "testnet", - Contracts: []config.ContractDeployment{{ - Name: "NonExistingContract", - }}, - Account: "MyAccount", - }}, - } - - err = cfg.Validate() - assert.EqualError(t, err, "deployment contains nonexisting contract NonExistingContract") - - cfg = &config.Config{ - Emulators: config.DefaultEmulators, - Contracts: config.Contracts{{ - Name: "MyContract", - Location: "contracts/my-contract.cdc", - Aliases: config.Aliases{{ - Network: "non-existing", - Address: flow.HexToAddress("0x01"), - }}, - }}, - Networks: config.DefaultNetworks, - } - - err = cfg.Validate() - assert.EqualError(t, err, "contract MyContract alias contains nonexisting network non-existing") - - cfg = &config.Config{ - Contracts: config.Contracts{{ - Name: "MyContract", - Location: "contracts/my-contract.cdc", - }}, - Deployments: config.Deployments{{ - Network: "no", - Contracts: []config.ContractDeployment{{ - Name: "NonExistingContract", - }}, - Account: "MyAccount", - }}, - Networks: config.DefaultNetworks, - } - - err = cfg.Validate() - assert.EqualError(t, err, "deployment contains nonexisting network no") - - cfg = &config.Config{ - Contracts: config.Contracts{{ - Name: "MyContract", - Location: "contracts/my-contract.cdc", - }}, - Deployments: config.Deployments{{ - Network: "testnet", - Contracts: []config.ContractDeployment{{ - Name: "MyContract", - }}, - Account: "no", - }}, - Networks: config.DefaultNetworks, - } - - err = cfg.Validate() - assert.EqualError(t, err, "deployment contains nonexisting account no") -} - -func Test_DefaultConfig(t *testing.T) { - cfg := config.Default() - assert.Len(t, cfg.Emulators, 1) - assert.Equal(t, cfg.Emulators[0].Name, "default") - assert.Equal(t, cfg.Emulators[0].ServiceAccount, "emulator-account") - assert.Len(t, cfg.Networks, 4) - assert.Equal(t, "emulator", cfg.Networks[0].Name) - assert.Equal(t, "testing", cfg.Networks[1].Name) - assert.Equal(t, "testnet", cfg.Networks[2].Name) - assert.Equal(t, "mainnet", cfg.Networks[3].Name) -} - -func Test_DefaultPath(t *testing.T) { - global := config.GlobalPath() - assert.True(t, config.IsDefaultPath([]string{global, "flow.json"})) - assert.False(t, config.IsDefaultPath([]string{"no.json"})) - - def := config.DefaultPaths() - assert.True(t, config.IsDefaultPath(def)) -} diff --git a/flowkit/config/contract.go b/flowkit/config/contract.go deleted file mode 100644 index bcfa883d7..000000000 --- a/flowkit/config/contract.go +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package config - -import ( - "fmt" - "path/filepath" - - "github.com/onflow/flow-go/fvm/systemcontracts" - flowGo "github.com/onflow/flow-go/model/flow" - - "github.com/onflow/flow-go-sdk" - "golang.org/x/exp/slices" -) - -// Contract defines the configuration for a Cadence contract. -type Contract struct { - Name string - Location string - Aliases Aliases - IsDependency bool -} - -// Alias defines an existing pre-deployed contract address for specific network. -type Alias struct { - Network string - Address flow.Address -} - -type Aliases []Alias - -func (a *Aliases) ByNetwork(network string) *Alias { - for _, alias := range *a { - if alias.Network == network { - return &alias - } - } - - return nil -} - -func (a *Aliases) Add(network string, address flow.Address) { - for _, alias := range *a { - if alias.Network == network { - return // already exists - } - } - *a = append(*a, Alias{ - Network: network, - Address: address, - }) -} - -type Contracts []Contract - -// IsAliased checks if contract has an alias. -func (c *Contract) IsAliased() bool { - return len(c.Aliases) > 0 -} - -// ByName get contract by name or return an error if it doesn't exist. -func (c *Contracts) ByName(name string) (*Contract, error) { - for i, contract := range *c { - if contract.Name == name { - return &(*c)[i], nil - } - } - - return nil, fmt.Errorf("contract %s does not exist", name) -} - -// AddOrUpdate add new or update if already present. -func (c *Contracts) AddOrUpdate(contract Contract) { - for i, existingContract := range *c { - if existingContract.Name == contract.Name { - (*c)[i] = contract - return - } - } - - *c = append(*c, contract) -} - -// Remove contract by its name. -func (c *Contracts) Remove(name string) error { - if _, err := c.ByName(name); err != nil { - return err - } - - for i, contract := range *c { - if contract.Name == name { - *c = slices.Delete(*c, i, i+1) - } - } - - return nil -} - -const dependencyManagerDirectory = "imports" - -const ( - networkEmulator = "emulator" - networkTestnet = "testnet" - networkMainnet = "mainnet" -) - -func supportedNetworks() []string { - return []string{ - networkEmulator, - networkTestnet, - networkMainnet, - } -} - -var networkToChainID = map[string]flowGo.ChainID{ - networkEmulator: flowGo.Emulator, - networkTestnet: flowGo.Testnet, - networkMainnet: flowGo.Mainnet, -} - -func isCoreContract(networkName, contractName, contractAddress string) bool { - sc := systemcontracts.SystemContractsForChain(networkToChainID[networkName]) - - for _, coreContract := range sc.All() { - if coreContract.Name == contractName && coreContract.Address.String() == contractAddress { - return true - } - } - - return false -} - -func getCoreContractByName(networkName, contractName string) *systemcontracts.SystemContract { - sc := systemcontracts.SystemContractsForChain(networkToChainID[networkName]) - - for i, coreContract := range sc.All() { - if coreContract.Name == contractName { - return &sc.All()[i] - } - } - - return nil -} - -// AddDependencyAsContract adds a dependency as a contract if it doesn't already exist. -func (c *Contracts) AddDependencyAsContract(dependency Dependency, networkName string) { - var aliases []Alias - - // If core contract found by name and address matches, then use all core contract aliases across networks - if isCoreContract(networkName, dependency.Source.ContractName, dependency.Source.Address.String()) { - for _, networkStr := range supportedNetworks() { - coreContract := getCoreContractByName(networkStr, dependency.Source.ContractName) - if coreContract != nil { - aliases = append(aliases, Alias{ - Network: networkStr, - Address: flow.HexToAddress(coreContract.Address.String()), - }) - } - } - } else { - aliases = append(aliases, dependency.Aliases...) - } - - // If no core contract match, then use the address in source as alias - if len(aliases) == 0 { - aliases = append(aliases, Alias{ - Network: dependency.Source.NetworkName, - Address: dependency.Source.Address, - }) - } - - contract := Contract{ - Name: dependency.Name, - Location: filepath.ToSlash(fmt.Sprintf("%s/%s/%s.cdc", dependencyManagerDirectory, dependency.Source.Address, dependency.Source.ContractName)), - Aliases: aliases, - IsDependency: true, - } - - if _, err := c.ByName(contract.Name); err != nil { - c.AddOrUpdate(contract) - } -} - -func (c *Contracts) DependencyContractByName(name string) *Contract { - for i, contract := range *c { - if contract.Name == name && contract.IsDependency { - return &(*c)[i] - } - } - - return nil -} diff --git a/flowkit/config/contract_test.go b/flowkit/config/contract_test.go deleted file mode 100644 index 2b9ab21f0..000000000 --- a/flowkit/config/contract_test.go +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package config - -import ( - "testing" - - "github.com/onflow/flow-go-sdk" - "github.com/stretchr/testify/assert" -) - -func TestAliases_Add(t *testing.T) { - aliases := Aliases{} - aliases.Add("testnet", flow.HexToAddress("0xabcdef")) - - alias := aliases.ByNetwork("testnet") - assert.NotNil(t, alias) -} - -func TestAliases_Add_Duplicate(t *testing.T) { - aliases := Aliases{} - aliases.Add("testnet", flow.HexToAddress("0xabcdef")) - aliases.Add("testnet", flow.HexToAddress("0x123456")) - - assert.Len(t, aliases, 1) -} - -func TestContracts_AddOrUpdate_Add(t *testing.T) { - contracts := Contracts{} - contracts.AddOrUpdate(Contract{Name: "mycontract", Location: "path/to/contract.cdc"}) - - assert.Len(t, contracts, 1) - - contract, err := contracts.ByName("mycontract") - assert.NoError(t, err) - assert.Equal(t, "path/to/contract.cdc", contract.Location) -} - -func TestContracts_AddOrUpdate_Update(t *testing.T) { - contracts := Contracts{ - Contract{Name: "mycontract", Location: "path/to/contract.cdc"}, - } - contracts.AddOrUpdate(Contract{Name: "mycontract", Location: "new/path/to/contract.cdc"}) - - assert.Len(t, contracts, 1) - - contract, err := contracts.ByName("mycontract") - assert.NoError(t, err) - assert.Equal(t, "new/path/to/contract.cdc", contract.Location) -} - -func TestContracts_Remove(t *testing.T) { - contracts := Contracts{ - Contract{Name: "mycontract", Location: "path/to/contract.cdc"}, - } - err := contracts.Remove("mycontract") - assert.NoError(t, err) - assert.Len(t, contracts, 0) -} - -func TestContracts_Remove_NotFound(t *testing.T) { - contracts := Contracts{ - Contract{Name: "mycontract1", Location: "path/to/contract.cdc"}, - Contract{Name: "mycontract2", Location: "path/to/contract.cdc"}, - Contract{Name: "mycontract3", Location: "path/to/contract.cdc"}, - } - err := contracts.Remove("mycontract2") - assert.NoError(t, err) - assert.Len(t, contracts, 2) - _, err = contracts.ByName("mycontract1") - assert.NoError(t, err) - _, err = contracts.ByName("mycontract3") - assert.NoError(t, err) - _, err = contracts.ByName("mycontract2") - assert.EqualError(t, err, "contract mycontract2 does not exist") -} - -func TestContracts_AddDependencyAsContract(t *testing.T) { - contracts := Contracts{} - contracts.AddDependencyAsContract(Dependency{ - Name: "testcontract", - Source: Source{ - NetworkName: "testnet", - Address: flow.HexToAddress("0x0000000000abcdef"), - ContractName: "TestContract", - }, - }, "testnet") - - assert.Len(t, contracts, 1) - - contract, err := contracts.ByName("testcontract") - assert.NoError(t, err) - assert.Equal(t, "imports/0000000000abcdef/TestContract.cdc", contract.Location) - assert.Len(t, contract.Aliases, 1) -} diff --git a/flowkit/config/dependency.go b/flowkit/config/dependency.go deleted file mode 100644 index 68c862a19..000000000 --- a/flowkit/config/dependency.go +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package config - -import ( - "fmt" - "strings" - - "github.com/onflow/flow-go-sdk" -) - -func ParseSourceString(s string) (network, address, contractName string, err error) { - parts := strings.Split(s, "://") - if len(parts) != 2 { - return "", "", "", fmt.Errorf("invalid dependency source format: %s", s) - } - network = parts[0] - - subParts := strings.Split(parts[1], ".") - if len(subParts) != 2 { - return "", "", "", fmt.Errorf("invalid dependency source format: %s", s) - } - address = subParts[0] - contractName = subParts[1] - - return network, address, contractName, nil -} - -type Source struct { - NetworkName string - Address flow.Address - ContractName string -} - -type Dependency struct { - Name string - Source Source - Hash string - Aliases Aliases -} - -type Dependencies []Dependency - -func (d *Dependencies) ByName(name string) *Dependency { - for i, dep := range *d { - if dep.Name == name { - return &(*d)[i] - } - } - - return nil -} - -func (d *Dependencies) AddOrUpdate(dep Dependency) { - for i, dependency := range *d { - if dependency.Name == dep.Name { - (*d)[i] = dep - return - } - } - - *d = append(*d, dep) -} diff --git a/flowkit/config/dependency_test.go b/flowkit/config/dependency_test.go deleted file mode 100644 index b3f00499f..000000000 --- a/flowkit/config/dependency_test.go +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package config - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestDependencies_ByName(t *testing.T) { - dependencies := Dependencies{ - Dependency{Name: "mydep"}, - } - - dep := dependencies.ByName("mydep") - assert.NotNil(t, dep) -} - -func TestDependencies_AddOrUpdate(t *testing.T) { - dependencies := Dependencies{} - dependencies.AddOrUpdate(Dependency{Name: "mydep"}) - - assert.Len(t, dependencies, 1) - - dep := dependencies.ByName("mydep") - assert.NotNil(t, dep) -} diff --git a/flowkit/config/deployment.go b/flowkit/config/deployment.go deleted file mode 100644 index 5fc78239d..000000000 --- a/flowkit/config/deployment.go +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package config - -import ( - "fmt" - - "github.com/onflow/cadence" - "golang.org/x/exp/slices" -) - -// ContractDeployment defines the deployment of the contract with possible args. -type ContractDeployment struct { - Name string - Args []cadence.Value -} - -// Deployment defines the configuration for a contract deployment. -type Deployment struct { - Network string // network name to deploy to - Account string // account name to which to deploy to - Contracts []ContractDeployment // contracts to deploy -} - -// AddContract to deployment list on the account name and network name. -func (d *Deployment) AddContract(contract ContractDeployment) { - for _, c := range d.Contracts { - if contract.Name == c.Name { - return // don't allow adding duplicates - } - } - - d.Contracts = append(d.Contracts, contract) -} - -// RemoveContract removes a specific contract by name from an existing deployment identified by account name and network name. -func (d *Deployment) RemoveContract(contractName string) { - for i, contract := range d.Contracts { - if contract.Name == contractName { - d.Contracts = slices.Delete(d.Contracts, i, i+1) - } - } -} - -type Deployments []Deployment - -// All returns a list of all deployments -func (d *Deployments) All() Deployments { - return *d -} - -// ByNetwork get all deployments by network. -func (d *Deployments) ByNetwork(network string) Deployments { - var deployments Deployments - - for _, deploy := range *d { - if deploy.Network == network { - deployments = append(deployments, deploy) - } - } - - return deployments -} - -// ByAccountAndNetwork get deploy by account and network. -func (d *Deployments) ByAccountAndNetwork(account string, network string) *Deployment { - for i, deploy := range *d { - if deploy.Network == network && deploy.Account == account { - return &(*d)[i] - } - } - - return nil -} - -// AddOrUpdate add new or update if already present. -func (d *Deployments) AddOrUpdate(deployment Deployment) { - for i, existingDeployment := range *d { - if existingDeployment.Account == deployment.Account && - existingDeployment.Network == deployment.Network { - (*d)[i] = deployment - return - } - } - - *d = append(*d, deployment) -} - -// Remove removes deployment by account and network. -func (d *Deployments) Remove(account string, network string) error { - deployment := d.ByAccountAndNetwork(account, network) - if deployment == nil { - return fmt.Errorf( - "deployment for account %s on network %s does not exist in configuration", - account, - network, - ) - } - - for i, deployment := range *d { - if deployment.Network == network && deployment.Account == account { - *d = slices.Delete(*d, i, i+1) - } - } - - return nil -} diff --git a/flowkit/config/deployment_test.go b/flowkit/config/deployment_test.go deleted file mode 100644 index 952f6edc8..000000000 --- a/flowkit/config/deployment_test.go +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package config - -import ( - "testing" - - "github.com/onflow/cadence" - "github.com/stretchr/testify/assert" -) - -func Test_Deployment(t *testing.T) { - contracts := []ContractDeployment{{ - Name: "contract-1", - Args: []cadence.Value{cadence.NewInt(5)}, - }, { - Name: "contract-2", - Args: []cadence.Value{cadence.NewInt(15)}, - }} - - t.Run("Adding deployments", func(t *testing.T) { - network := "test-network" - - deployments := &Deployments{} - deployments.AddOrUpdate(Deployment{ - Network: network, - Account: "test-account", - Contracts: []ContractDeployment{contracts[0]}, - }) - assert.Equal(t, []ContractDeployment{contracts[0]}, (*deployments)[0].Contracts) - - deployments.AddOrUpdate(Deployment{ - Network: network, - Account: "test-account", - Contracts: contracts, - }) - assert.Equal(t, contracts, (*deployments)[0].Contracts) - - deployments.AddOrUpdate(Deployment{ - Network: network, - Account: "test-account-2", - Contracts: []ContractDeployment{contracts[0]}, - }) - assert.Len(t, *deployments, 2) - assert.Equal(t, []ContractDeployment{contracts[0]}, (*deployments)[1].Contracts) - }) - - t.Run("Remove deployment", func(t *testing.T) { - deployments := &Deployments{ - Deployment{ - Network: "test-network", - Account: "test-account", - Contracts: []ContractDeployment{{ - Name: "contract-1", - Args: []cadence.Value{cadence.NewInt(5)}, - }, { - Name: "contract-2", - Args: []cadence.Value{cadence.NewInt(15)}, - }}, - }, - } - - err := deployments.Remove("test-account", "test-network") - assert.NoError(t, err) - assert.Len(t, *deployments, 0) - }) - - t.Run("Remove deployment contract", func(t *testing.T) { - copyContracts := make([]ContractDeployment, len(contracts)) - copy(copyContracts, contracts) - const acc = "test" - const net = "testnet" - - deployments := &Deployments{ - Deployment{ - Network: net, - Account: acc, - Contracts: copyContracts, - }, - } - - deployments.ByAccountAndNetwork(acc, net).RemoveContract(contracts[0].Name) - - assert.Len(t, *deployments, 1) - assert.Len(t, (*deployments)[0].Contracts, 1) - assert.Equal(t, (*deployments)[0].Contracts[0], contracts[1]) - }) - - t.Run("Deployment by network", func(t *testing.T) { - deployments := &Deployments{ - Deployment{ - Network: "net", - Account: "acc", - }, - Deployment{ - Network: "net", - Account: "acc2", - }, - Deployment{ - Network: "net2", - Account: "acc2", - }, - } - - network := deployments.ByNetwork("net") - assert.Len(t, network, 2) - assert.Equal(t, network[0].Account, "acc") - assert.Equal(t, network[1].Account, "acc2") - }) - - t.Run("Remove non-existing deployment", func(t *testing.T) { - deployments := &Deployments{ - Deployment{ - Network: "test", - Account: "acc", - }, - } - - err := deployments.Remove("acc", "no") - assert.EqualError(t, err, "deployment for account acc on network no does not exist in configuration") - }) - - t.Run("Add deployment contract", func(t *testing.T) { - const acc = "test" - const net = "testnet" - deployments := &Deployments{ - Deployment{Network: net, Account: acc}, - } - - deployments.ByAccountAndNetwork(acc, net).AddContract(contracts[0]) - deployments.ByAccountAndNetwork(acc, net).AddContract(contracts[1]) - - assert.Len(t, *deployments, 1) - assert.Len(t, (*deployments)[0].Contracts, 2) - assert.Equal(t, (*deployments)[0].Contracts[1], contracts[1]) - assert.Equal(t, (*deployments)[0].Contracts[0], contracts[0]) - }) - -} diff --git a/flowkit/config/emulator.go b/flowkit/config/emulator.go deleted file mode 100644 index d0d1c9b1a..000000000 --- a/flowkit/config/emulator.go +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package config - -var ( - DefaultEmulator = Emulator{ - Name: "default", - ServiceAccount: "emulator-account", - Port: 3569, - } - DefaultEmulators = Emulators{DefaultEmulator} -) - -// Emulator defines the configuration for a Flow Emulator instance. -type Emulator struct { - Name string - Port int - ServiceAccount string -} - -type Emulators []Emulator - -// Default gets default emulator. -func (e *Emulators) Default() *Emulator { - for _, em := range *e { - if em.Name == DefaultEmulator.Name { - return &em - } - } - - return nil -} - -// AddOrUpdate add new or update if already present. -func (e *Emulators) AddOrUpdate(name string, emulator Emulator) { - for i, existingEmulator := range *e { - if existingEmulator.Name == name { - (*e)[i] = emulator - return - } - } - - *e = append(*e, emulator) -} diff --git a/flowkit/config/emulator_test.go b/flowkit/config/emulator_test.go deleted file mode 100644 index ba73466dc..000000000 --- a/flowkit/config/emulator_test.go +++ /dev/null @@ -1,75 +0,0 @@ -/* -* Flow CLI -* -* Copyright 2019-2020 Dapper Labs, Inc. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. - */ - -package config - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestEmulatorsDefault(t *testing.T) { - emulators := Emulators{{ - Name: "emulator-1", - Port: 1234, - }, { - Name: "default", - Port: 3569, - ServiceAccount: "emulator-account", - }} - - expected := &Emulator{ - Name: "default", - ServiceAccount: "emulator-account", - Port: 3569, - } - - assert.Equal(t, expected, emulators.Default()) -} - -func TestEmulatorsAddOrUpdate(t *testing.T) { - emulator1 := Emulator{ - Name: "emulator-1", - Port: 1234, - } - emulator2 := Emulator{ - Name: "emulator-account", - Port: 3569, - ServiceAccount: "emulator-account", - } - - emulators := Emulators{emulator1} - - emulators.AddOrUpdate(emulator1.Name, emulator2) - - assert.Len(t, emulators, 1) - assert.Equal(t, emulator2, emulators[0]) - - emulators.AddOrUpdate("emulator-2", Emulator{ - Name: "emulator-2", - Port: 2345, - }) - - assert.Len(t, emulators, 2) - assert.Contains(t, emulators, emulator2) - assert.Contains(t, emulators, Emulator{ - Name: "emulator-2", - Port: 2345, - }) -} diff --git a/flowkit/config/json/account.go b/flowkit/config/json/account.go deleted file mode 100644 index cbf444a06..000000000 --- a/flowkit/config/json/account.go +++ /dev/null @@ -1,485 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package json - -import ( - "encoding/json" - "fmt" - "os" - "path/filepath" - "regexp" - "strings" - - "github.com/invopop/jsonschema" - "github.com/onflow/flow-go-sdk" - "github.com/onflow/flow-go-sdk/crypto" - "golang.org/x/exp/slices" - - "github.com/onflow/flow-cli/flowkit/config" -) - -type jsonAccounts map[string]account - -const ( - defaultHashAlgo = crypto.SHA3_256 - defaultSigAlgo = crypto.ECDSA_P256 -) - -// transformAddress returns address based on address and chain id. -func transformAddress(address string) (flow.Address, error) { - // only allow service for emulator - if address == "service" { - return flow.ServiceAddress(flow.Emulator), nil - } - - if flow.HexToAddress(address) == flow.EmptyAddress { - return flow.EmptyAddress, fmt.Errorf("could not parse address: %s", address) - } - - return flow.HexToAddress(address), nil -} - -// transformSimpleToConfig transforms simple internal account to config account. -func transformSimpleToConfig(accountName string, a simpleAccount) (*config.Account, error) { - key := config.AccountKey{ - Type: config.KeyTypeHex, - SigAlgo: defaultSigAlgo, - HashAlgo: defaultHashAlgo, - } - - replaced, original, err := tryReplaceEnv(a.Key) - if err != nil { - return nil, err - } - if replaced != "" { - key.Env = original - a.Key = replaced - } - - pkey, err := crypto.DecodePrivateKeyHex( - config.DefaultSigAlgo, - strings.TrimPrefix(a.Key, "0x"), - ) - if err != nil { - return nil, fmt.Errorf("invalid private key for account: %s", accountName) - } - key.PrivateKey = pkey - - replacedAddress, _, err := tryReplaceEnv(a.Address) - if err != nil { - return nil, err - } - if replacedAddress != "" { - a.Address = replacedAddress - } - - address, err := transformAddress(a.Address) - if err != nil { - return nil, err - } - - return &config.Account{ - Name: accountName, - Address: address, - Key: key, - }, nil -} - -// tryReplaceEnv checks if value matches env regex, if it does it check whether the value was set in env, -// if not set then it errors, otherwise it replaces the value with set env variable, and also returns the original key. -func tryReplaceEnv(value string) (replaced string, original string, err error) { - envRegex, err := regexp.Compile(`^\$\{(\w+)\}|\$(\w+)$`) - if err != nil { - return "", "", err - } - - if !envRegex.MatchString(value) { - return - } - - found := envRegex.FindAllStringSubmatch(value, -1) - if len(found) == 0 { - return // should not happen - } - - envVar := found[0][1] - if found[0][2] != "" { // second regex - envVar = found[0][2] - } - if os.Getenv(envVar) == "" { - return "", "", fmt.Errorf("required environment variable %s not set", envVar) - } - - original = value - replaced = os.ExpandEnv(value) - - return -} - -// transformAdvancedToConfig transforms advanced internal account to config account. -func transformAdvancedToConfig(accountName string, a advancedAccount) (*config.Account, error) { - sigAlgo := config.DefaultSigAlgo // default to ecdsa as default - if a.Key.SigAlgo != "" { - sigAlgo = crypto.StringToSignatureAlgorithm(a.Key.SigAlgo) - } - - if sigAlgo == crypto.UnknownSignatureAlgorithm { - return nil, fmt.Errorf("invalid signature algorithm for account %s", accountName) - } - - hashAlgo := config.DefaultHashAlgo // default to sha3 as default - if a.Key.HashAlgo != "" { - hashAlgo = crypto.StringToHashAlgorithm(a.Key.HashAlgo) - } - - if hashAlgo == crypto.UnknownHashAlgorithm { - return nil, fmt.Errorf("invalid hash algorithm for account %s", accountName) - } - - validTypes := []config.KeyType{config.KeyTypeHex, config.KeyTypeFile, config.KeyTypeBip44, config.KeyTypeGoogleKMS} - if !slices.Contains(validTypes, a.Key.Type) { - return nil, fmt.Errorf("invalid key type for account %s", accountName) - } - - // check that only one is provided because the values are mutually exclusive - set := false - for _, v := range []string{a.Key.ResourceID, a.Key.PrivateKey, a.Key.Location} { - if v == "" { - continue - } - if set { - return nil, fmt.Errorf("can only provide one property (resource ID, private key, location) on account %s", accountName) - } - set = true - } - - address, err := transformAddress(a.Address) - if err != nil { - return nil, err - } - - key := config.AccountKey{ - Type: a.Key.Type, - Index: a.Key.Index, - SigAlgo: sigAlgo, - HashAlgo: hashAlgo, - } - - switch a.Key.Type { - case config.KeyTypeHex: - if a.Key.PrivateKey == "" { - return nil, fmt.Errorf("missing private key value for hex key type on account %s", accountName) - } - - replaced, original, err := tryReplaceEnv(a.Key.PrivateKey) - if err != nil { - return nil, err - } - if replaced != "" { - key.Env = original - a.Key.PrivateKey = replaced - } - - pKey, err := crypto.DecodePrivateKeyHex( - sigAlgo, - strings.TrimPrefix(a.Key.PrivateKey, "0x"), - ) - if err != nil { - return nil, err - } - - key.PrivateKey = pKey - case config.KeyTypeBip44: - if a.Key.Mnemonic == "" { - return nil, fmt.Errorf("missing mnemonic value for bip44 key type on account %s", accountName) - } - key.Mnemonic = a.Key.Mnemonic - key.DerivationPath = a.Key.DerivationPath - if key.DerivationPath == "" { - key.DerivationPath = "m/44'/539'/0'/0/0" - } - - case config.KeyTypeGoogleKMS: - if a.Key.ResourceID == "" { - return nil, fmt.Errorf("missing resource ID value for key on account %s", accountName) - } - key.ResourceID = a.Key.ResourceID - - case config.KeyTypeFile: - if a.Key.Location == "" { - return nil, fmt.Errorf("missing location to a file containing the private key value for the account %s", accountName) - } - key.Location = filepath.FromSlash(a.Key.Location) - } - - return &config.Account{ - Name: accountName, - Address: address, - Key: key, - }, nil -} - -// transformToConfig transforms json structures to config structure. -func (j jsonAccounts) transformToConfig() (config.Accounts, error) { - accounts := make(config.Accounts, 0) - - for accountName, a := range j { - var account *config.Account - var err error - if a.Simple.Address != "" { - account, err = transformSimpleToConfig(accountName, a.Simple) - if err != nil { - return nil, err - } - } else { // advanced format - account, err = transformAdvancedToConfig(accountName, a.Advanced) - if err != nil { - return nil, err - } - } - - accounts = append(accounts, *account) - } - - return accounts, nil -} - -// transformToJSON transforms config structure to json structures for saving. -func transformAccountsToJSON(accounts config.Accounts) jsonAccounts { - jsonAccounts := jsonAccounts{} - - for _, a := range accounts { - if a.Key.IsDefault() { - jsonAccounts[a.Name] = transformSimpleAccountToJSON(a) - } else { - jsonAccounts[a.Name] = transformAdvancedAccountToJSON(a) - } - } - - return jsonAccounts -} - -func transformSimpleAccountToJSON(a config.Account) account { - key := strings.TrimPrefix(a.Key.PrivateKey.String(), "0x") - if a.Key.Env != "" { - key = a.Key.Env // if we used env vars then use it when saving - } - - return account{ - Simple: simpleAccount{ - Address: a.Address.String(), - Key: key, - }, - } -} - -func transformAdvancedAccountToJSON(a config.Account) account { - return account{ - Advanced: advancedAccount{ - Address: a.Address.String(), - Key: transformAdvancedKeyToJSON(a.Key), - }, - } -} - -func transformAdvancedKeyToJSON(key config.AccountKey) advanceKey { - advancedKey := advanceKey{ - Type: key.Type, - } - - if key.Index != 0 { // only set if non-default - advancedKey.Index = key.Index - } - - if key.SigAlgo != config.DefaultSigAlgo { // only set if non-default - advancedKey.SigAlgo = key.SigAlgo.String() - } - - if key.HashAlgo != config.DefaultHashAlgo { // only set if non-default - advancedKey.HashAlgo = key.HashAlgo.String() - } - - switch key.Type { - case config.KeyTypeHex: - advancedKey.PrivateKey = strings.TrimPrefix(key.PrivateKey.String(), "0x") - if key.Env != "" { - advancedKey.PrivateKey = key.Env // if we used env vars then use it when saving - } - case config.KeyTypeBip44: - advancedKey.Mnemonic = key.Mnemonic - advancedKey.DerivationPath = key.DerivationPath - case config.KeyTypeGoogleKMS: - advancedKey.ResourceID = key.ResourceID - case config.KeyTypeFile: - advancedKey.Location = filepath.ToSlash(key.Location) - } - - return advancedKey -} - -type account struct { - Simple simpleAccount - Advanced advancedAccount -} - -type simpleAccount struct { - Address string `json:"address"` - Key string `json:"key"` -} - -type advancedAccount struct { - Address string `json:"address"` - Key advanceKey `json:"key"` -} - -type advanceKey struct { - Type config.KeyType `json:"type"` - Index int `json:"index,omitempty"` - SigAlgo string `json:"signatureAlgorithm,omitempty"` - HashAlgo string `json:"hashAlgorithm,omitempty"` - // hex key type - PrivateKey string `json:"privateKey,omitempty"` - // bip44 key type - Mnemonic string `json:"mnemonic,omitempty"` - DerivationPath string `json:"derivationPath,omitempty"` - // kms key type - ResourceID string `json:"resourceID,omitempty"` - // key location - Location string `json:"location,omitempty"` - // old key format - Context map[string]string `json:"context,omitempty"` -} - -// support for pre v0.22 formats -type simpleAccountPre022 struct { - Address string `json:"address"` - Keys string `json:"keys"` -} - -// support for pre v0.22 formats -type advanceAccountPre022 struct { - Address string `json:"address"` - Keys []advanceKey `json:"keys"` -} - -type formatType int - -const ( - simpleFormat formatType = 0 - advancedFormat formatType = 1 - simpleFormatPre022 formatType = 2 // pre v.022 format - advancedFormatPre022 formatType = 3 // pre v.022 format -) - -func decideFormat(b []byte) (formatType, error) { - var raw map[string]any - err := json.Unmarshal(b, &raw) - if err != nil { - return 0, err - } - - if raw["keys"] != nil { - switch raw["keys"].(type) { - case string: - return simpleFormatPre022, nil - default: - return advancedFormatPre022, nil - } - } - - switch raw["key"].(type) { - case string: - return simpleFormat, nil - default: - return advancedFormat, nil - } -} - -func (j *account) UnmarshalJSON(b []byte) error { - - format, err := decideFormat(b) - if err != nil { - return err - } - - switch format { - case simpleFormat: - var simple simpleAccount - err = json.Unmarshal(b, &simple) - j.Simple = simple - - case simpleFormatPre022: - var simpleOld simpleAccountPre022 - err = json.Unmarshal(b, &simpleOld) - j.Simple = simpleAccount{ - Address: simpleOld.Address, - Key: simpleOld.Keys, - } - - case advancedFormatPre022: - var advancedOld advanceAccountPre022 - err = json.Unmarshal(b, &advancedOld) - - j.Advanced = advancedAccount{ - Address: advancedOld.Address, - Key: advancedOld.Keys[0], - } - j.Advanced.Key.PrivateKey = advancedOld.Keys[0].Context["privateKey"] - - case advancedFormat: - var advanced advancedAccount - err = json.Unmarshal(b, &advanced) - j.Advanced = advanced - } - - return err -} - -func (j account) MarshalJSON() ([]byte, error) { - if j.Simple != (simpleAccount{}) { - return json.Marshal(j.Simple) - } - - return json.Marshal(j.Advanced) -} - -func (a account) JSONSchema() *jsonschema.Schema { - return &jsonschema.Schema{ - OneOf: []*jsonschema.Schema{ - { - Ref: "#/$defs/simpleAccount", - }, - { - Ref: "#/$defs/advancedAccount", - }, - { - Ref: "#/$defs/simpleAccountPre022", - }, - { - Ref: "#/$defs/advanceAccountPre022", - }, - }, - Definitions: map[string]*jsonschema.Schema{ - "simpleAccount": jsonschema.Reflect(simpleAccount{}), - "advancedAccount": jsonschema.Reflect(advancedAccount{}), - "simpleAccountPre022": jsonschema.Reflect(simpleAccountPre022{}), - "advanceAccountPre022": jsonschema.Reflect(advanceAccountPre022{}), - }, - } -} diff --git a/flowkit/config/json/account_test.go b/flowkit/config/json/account_test.go deleted file mode 100644 index 0cb836828..000000000 --- a/flowkit/config/json/account_test.go +++ /dev/null @@ -1,567 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package json - -import ( - "encoding/json" - "fmt" - "os" - "path/filepath" - "testing" - - "github.com/onflow/flow-go-sdk" - "github.com/onflow/flow-go-sdk/crypto" - "github.com/stretchr/testify/assert" - - "github.com/onflow/flow-cli/flowkit/config" -) - -func Test_ConfigAccountKeysSimple(t *testing.T) { - b := []byte(`{ - "test": { - "address": "service", - "key": "0x1fae488ce86422698f1c13468b137d62de488e7e978d7090396f7883a60abdcf" - } - }`) - - var jsonAccounts jsonAccounts - err := json.Unmarshal(b, &jsonAccounts) - assert.NoError(t, err) - - accounts, err := jsonAccounts.transformToConfig() - assert.NoError(t, err) - - account, err := accounts.ByName("test") - assert.NoError(t, err) - key := account.Key - - assert.Equal(t, "f8d6e0586b0a20c7", account.Address.String()) - assert.Equal(t, "SHA3_256", key.HashAlgo.String()) - assert.Equal(t, 0, key.Index) - assert.Equal(t, "ECDSA_P256", key.SigAlgo.String()) - assert.Equal(t, "0x1fae488ce86422698f1c13468b137d62de488e7e978d7090396f7883a60abdcf", key.PrivateKey.String()) -} - -func Test_ConfigAccountKeysAdvancedHex(t *testing.T) { - b := []byte(`{ - "test": { - "address": "service", - "key": { - "type": "hex", - "index": 1, - "signatureAlgorithm": "ECDSA_P256", - "hashAlgorithm": "SHA2_256", - "privateKey": "271cec6bb5221d12713759188166bdfa00079db5789c36b54dcf1d794d8d8cdf" - } - } - }`) - - var jsonAccounts jsonAccounts - err := json.Unmarshal(b, &jsonAccounts) - assert.NoError(t, err) - - accounts, err := jsonAccounts.transformToConfig() - assert.NoError(t, err) - - account, err := accounts.ByName("test") - assert.NoError(t, err) - key := account.Key - - assert.Equal(t, "f8d6e0586b0a20c7", account.Address.String()) - assert.Equal(t, "SHA2_256", key.HashAlgo.String()) - assert.Equal(t, 1, key.Index) - assert.Equal(t, "ECDSA_P256", key.SigAlgo.String()) - assert.Equal(t, "0x271cec6bb5221d12713759188166bdfa00079db5789c36b54dcf1d794d8d8cdf", key.PrivateKey.String()) - assert.Equal(t, "", key.ResourceID) -} - -func Test_ConfigAccountKeysAdvancedFile(t *testing.T) { - b := []byte(`{ - "test": { - "address": "service", - "key": { - "type": "file", - "location": "./test.pkey" - } - } - }`) - - var jsonAccounts jsonAccounts - err := json.Unmarshal(b, &jsonAccounts) - assert.NoError(t, err) - - accounts, err := jsonAccounts.transformToConfig() - assert.NoError(t, err) - - account, err := accounts.ByName("test") - assert.NoError(t, err) - key := account.Key - - assert.Equal(t, "f8d6e0586b0a20c7", account.Address.String()) - assert.Equal(t, "SHA3_256", key.HashAlgo.String()) - assert.Equal(t, "ECDSA_P256", key.SigAlgo.String()) - assert.Equal(t, filepath.FromSlash("./test.pkey"), key.Location) - assert.Equal(t, "", key.ResourceID) - - jsonAccs := transformAccountsToJSON(accounts) - assert.Equal(t, "./test.pkey", jsonAccs["test"].Advanced.Key.Location) - assert.Equal(t, "", jsonAccs["test"].Advanced.Key.PrivateKey) -} - -func Test_ConfigAccountKeysAdvancedKMS(t *testing.T) { - b := []byte(`{ - "test": { - "address": "service", - "key": { - "type": "google-kms", - "index": 1, - "signatureAlgorithm": "ECDSA_P256", - "hashAlgorithm": "SHA3_256", - "resourceID": "projects/flow/locations/us/keyRings/foo/bar/cryptoKeyVersions/1" - } - } - }`) - - var jsonAccounts jsonAccounts - err := json.Unmarshal(b, &jsonAccounts) - assert.NoError(t, err) - - accounts, err := jsonAccounts.transformToConfig() - assert.NoError(t, err) - - account, err := accounts.ByName("test") - assert.NoError(t, err) - key := account.Key - - assert.Equal(t, "f8d6e0586b0a20c7", account.Address.String()) - assert.Equal(t, "SHA3_256", key.HashAlgo.String()) - assert.Equal(t, 1, key.Index) - assert.Equal(t, "ECDSA_P256", key.SigAlgo.String()) - assert.Equal(t, "projects/flow/locations/us/keyRings/foo/bar/cryptoKeyVersions/1", key.ResourceID) - assert.Nil(t, key.PrivateKey) -} - -func Test_ConfigAccountOldFormats(t *testing.T) { - b := []byte(`{ - "old-format-1": { - "address": "service", - "keys": [{ - "type": "hex", - "index": 1, - "signatureAlgorithm": "ECDSA_P256", - "hashAlgorithm": "SHA2_256", - "context": { - "privateKey": "f988fd7a959d96d0e36ca13a240bbfc4a78098cc56cfd1fa6c918080c8a0f55c" - } - }] - }, - "old-format-2": { - "address": "service", - "keys": "271cec6bb5221d12713759188166bdfa00079db5789c36b54dcf1d794d8d8cdf" - } - }`) - - var jsonAccounts jsonAccounts - err := json.Unmarshal(b, &jsonAccounts) - assert.NoError(t, err) - - accounts, err := jsonAccounts.transformToConfig() - assert.NoError(t, err) - - account, err := accounts.ByName("old-format-1") - assert.NoError(t, err) - key := account.Key - - assert.Equal(t, account.Address.String(), "f8d6e0586b0a20c7") - assert.Equal(t, key.HashAlgo.String(), "SHA2_256") - assert.Equal(t, key.Index, 1) - assert.Equal(t, key.SigAlgo.String(), "ECDSA_P256") - assert.Equal(t, key.PrivateKey.String(), "0xf988fd7a959d96d0e36ca13a240bbfc4a78098cc56cfd1fa6c918080c8a0f55c") - - account, err = accounts.ByName("old-format-2") - assert.NoError(t, err) - key = account.Key - - assert.Equal(t, account.Address.String(), "f8d6e0586b0a20c7") - assert.Equal(t, key.HashAlgo.String(), "SHA3_256") - assert.Equal(t, key.Index, 0) - assert.Equal(t, key.SigAlgo.String(), "ECDSA_P256") - assert.Equal(t, key.PrivateKey.String(), "0x271cec6bb5221d12713759188166bdfa00079db5789c36b54dcf1d794d8d8cdf") -} - -func Test_ConfigMultipleAccountsSimple(t *testing.T) { - b := []byte(`{ - "emulator-account": { - "address": "service", - "key": "dd72967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47" - }, - "testnet-account": { - "address": "0x2c1162386b0a245f", - "key": "1234567890123456789012345678901234567890123456789012345678901234" - } - }`) - - var jsonAccounts jsonAccounts - err := json.Unmarshal(b, &jsonAccounts) - assert.NoError(t, err) - - accounts, err := jsonAccounts.transformToConfig() - assert.NoError(t, err) - - account, err := accounts.ByName("emulator-account") - assert.NoError(t, err) - - key := account.Key - - assert.Equal(t, account.Name, "emulator-account") - assert.Equal(t, account.Address.String(), "f8d6e0586b0a20c7") - assert.Equal(t, key.HashAlgo.String(), "SHA3_256") - assert.Equal(t, key.Index, 0) - assert.Equal(t, key.SigAlgo.String(), "ECDSA_P256") - assert.Equal(t, key.PrivateKey.String(), "0xdd72967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47") - - account, err = accounts.ByName("testnet-account") - assert.NoError(t, err) - key = account.Key - - assert.Equal(t, account.Address.String(), "2c1162386b0a245f") - assert.Equal(t, key.HashAlgo.String(), "SHA3_256") - assert.Equal(t, key.Index, 0) - assert.Equal(t, key.SigAlgo.String(), "ECDSA_P256") - assert.Equal(t, key.PrivateKey.String(), "0x1234567890123456789012345678901234567890123456789012345678901234") -} - -func Test_ConfigMultipleAccountsAdvanced(t *testing.T) { - b := []byte(`{ - "emulator-account": { - "address": "service", - "key": { - "type": "hex", - "index": 0, - "signatureAlgorithm": "ECDSA_P256", - "hashAlgorithm": "SHA3_256", - "privateKey": "1272967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47" - } - }, - "testnet-account": { - "address": "1c1162386b0a245f", - "key": { - "type": "hex", - "index": 0, - "signatureAlgorithm": "ECDSA_P256", - "hashAlgorithm": "SHA3_256", - "privateKey": "2272967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47" - } - } - }`) - - var jsonAccounts jsonAccounts - err := json.Unmarshal(b, &jsonAccounts) - assert.NoError(t, err) - - accounts, err := jsonAccounts.transformToConfig() - assert.NoError(t, err) - - account, err := accounts.ByName("emulator-account") - assert.NoError(t, err) - key := account.Key - - assert.Equal(t, account.Address.String(), "f8d6e0586b0a20c7") - assert.Equal(t, key.HashAlgo.String(), "SHA3_256") - assert.Equal(t, key.Index, 0) - assert.Equal(t, key.SigAlgo.String(), "ECDSA_P256") - assert.NotNil(t, key.PrivateKey) - assert.Equal(t, key.PrivateKey.String(), "0x1272967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47") - - account, err = accounts.ByName("testnet-account") - assert.NoError(t, err) - key = account.Key - - assert.Equal(t, account.Address.String(), "1c1162386b0a245f") - assert.Equal(t, key.HashAlgo.String(), "SHA3_256") - assert.Equal(t, key.Index, 0) - assert.Equal(t, key.SigAlgo.String(), "ECDSA_P256") - assert.NotNil(t, key.PrivateKey) - assert.Equal(t, key.PrivateKey.String(), "0x2272967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47") -} - -func Test_ConfigMixedAccounts(t *testing.T) { - b := []byte(`{ - "emulator-account": { - "address": "service", - "key": { - "type": "hex", - "index": 0, - "signatureAlgorithm": "ECDSA_P256", - "hashAlgorithm": "SHA3_256", - "privateKey": "1272967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47" - } - }, - "testnet-account": { - "address": "3c1162386b0a245f", - "key": "2272967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47" - } - }`) - - var jsonAccounts jsonAccounts - err := json.Unmarshal(b, &jsonAccounts) - assert.NoError(t, err) - - accounts, err := jsonAccounts.transformToConfig() - assert.NoError(t, err) - - account, err := accounts.ByName("emulator-account") - assert.NoError(t, err) - key := account.Key - - assert.Equal(t, account.Address.String(), "f8d6e0586b0a20c7") - assert.Equal(t, key.HashAlgo.String(), "SHA3_256") - assert.Equal(t, key.Index, 0) - assert.Equal(t, key.SigAlgo.String(), "ECDSA_P256") - assert.Equal(t, key.PrivateKey.String(), "0x1272967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47") - - account, err = accounts.ByName("testnet-account") - assert.NoError(t, err) - key = account.Key - - assert.Equal(t, account.Address.String(), "3c1162386b0a245f") - assert.Equal(t, key.HashAlgo.String(), "SHA3_256") - assert.Equal(t, key.Index, 0) - assert.Equal(t, key.SigAlgo.String(), "ECDSA_P256") - assert.Equal(t, key.PrivateKey.String(), "0x2272967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47") -} - -func Test_ConfigAccountsMap(t *testing.T) { - b := []byte(`{ - "emulator-account": { - "address": "service", - "key": "dd72967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47" - }, - "testnet-account": { - "address": "3c1162386b0a245f", - "key": "1234567890123456789012345678901234567890123456789012345678901234" - } - }`) - - var jsonAccounts jsonAccounts - err := json.Unmarshal(b, &jsonAccounts) - assert.NoError(t, err) - - accounts, err := jsonAccounts.transformToConfig() - assert.NoError(t, err) - emulatorAccount, err := accounts.ByName("emulator-account") - assert.NoError(t, err) - assert.Equal(t, emulatorAccount.Address.String(), "f8d6e0586b0a20c7") - assert.Equal(t, emulatorAccount.Name, "emulator-account") -} - -func Test_ConfigAccountsMapWithEnvVars(t *testing.T) { - - os.Setenv("FLOW_EMULATOR_ADDRESS", "f8d6e0586b0a20c7") - os.Setenv("FLOW_EMULATOR_KEY", "dd72967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47") - - b := []byte(`{ - "emulator-account": { - "address": "$FLOW_EMULATOR_ADDRESS", - "key": "$FLOW_EMULATOR_KEY" - }, - "testnet-account": { - "address": "3c1162386b0a245f", - "key": "1234567890123456789012345678901234567890123456789012345678901234" - } - }`) - - var jsonAccounts jsonAccounts - err := json.Unmarshal(b, &jsonAccounts) - assert.NoError(t, err) - - accounts, err := jsonAccounts.transformToConfig() - assert.NoError(t, err) - emulatorAccount, err := accounts.ByName("emulator-account") - assert.NoError(t, err) - assert.Equal(t, emulatorAccount.Address.String(), "f8d6e0586b0a20c7") - assert.Equal(t, emulatorAccount.Key.PrivateKey.String(), "0xdd72967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47") - assert.Equal(t, emulatorAccount.Name, "emulator-account") -} - -func Test_TransformDefaultAccountToJSON(t *testing.T) { - privateKey, err := crypto.DecodePrivateKeyHex(crypto.ECDSA_P256, "1272967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47") - assert.NoError(t, err) - - account := config.Account{ - Name: "emulator-account", - Address: flow.HexToAddress("f8d6e0586b0a20c7"), - Key: config.AccountKey{ - Type: config.KeyTypeHex, - Index: 0, - SigAlgo: crypto.ECDSA_P256, - HashAlgo: crypto.SHA3_256, - PrivateKey: privateKey}, - } - accounts := []config.Account{account} - - j := transformAccountsToJSON(accounts) - result, err := json.Marshal(j) - assert.NoError(t, err) - - expected := []byte(`{"emulator-account":{"address":"f8d6e0586b0a20c7","key":"1272967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47"}}`) - assert.Equal(t, string(expected), string(result)) -} - -func Test_TransformAccountToJSON(t *testing.T) { - b := []byte(`{"emulator-account":{"address":"f8d6e0586b0a20c7","key":{"type":"hex","index":1,"privateKey":"1272967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47"}},"testnet-account":{"address":"3c1162386b0a245f","key":"2272967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47"}}`) - - var jsonAccounts jsonAccounts - err := json.Unmarshal(b, &jsonAccounts) - assert.NoError(t, err) - - accounts, err := jsonAccounts.transformToConfig() - assert.NoError(t, err) - - j := transformAccountsToJSON(accounts) - x, _ := json.Marshal(j) - - assert.Equal(t, string(b), string(x)) -} - -func Test_TransformDefaultAccountToJSONAdvanced(t *testing.T) { - b := []byte(`{"emulator-account":{"address":"f8d6e0586b0a20c7","key":"1272967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47"},"testnet-account":{"address":"3c1162386b0a245f","key":"2272967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47"}}`) - - var jsonAccounts jsonAccounts - err := json.Unmarshal(b, &jsonAccounts) - assert.NoError(t, err) - accounts, err := jsonAccounts.transformToConfig() - assert.NoError(t, err) - - j := transformAccountsToJSON(accounts) - x, _ := json.Marshal(j) - - // our output format is shorted - improve test - assert.Equal(t, string(b), string(x)) -} - -func Test_SupportForOldFormatWithMultipleKeys(t *testing.T) { - b := []byte(`{ - "emulator-account": { - "address": "service", - "chain": "flow-emulator", - "keys": "dd72967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47" - }, - "testnet-account": { - "address": "3c1162386b0a245f", - "chain": "testnet", - "keys": [ - { - "type": "hex", - "index": 0, - "signatureAlgorithm": "ECDSA_P256", - "hashAlgorithm": "SHA3_256", - "context": { - "privateKey": "1272967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47" - } - },{ - "type": "hex", - "index": 0, - "signatureAlgorithm": "ECDSA_P256", - "hashAlgorithm": "SHA3_256", - "context": { - "privateKey": "2332967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b44" - } - } - ] - } - }`) - - var jsonAccounts jsonAccounts - err := json.Unmarshal(b, &jsonAccounts) - assert.NoError(t, err) - - conf, err := jsonAccounts.transformToConfig() - assert.NoError(t, err) - - account, err := conf.ByName("testnet-account") - assert.NoError(t, err) - key := account.Key - assert.Equal(t, key.PrivateKey.String(), "0x1272967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47") - - emulatorAccount, err := conf.ByName("emulator-account") - assert.NoError(t, err) - key = emulatorAccount.Key - assert.Equal(t, key.PrivateKey.String(), "0xdd72967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47") -} - -func Test_ConfigInvalidKey(t *testing.T) { - b := []byte(`{ - "test": { - "address": "service", - "key": "z488ce86422698f1c13468b137d62de488e7e978d7090396f7883a60abdcf" - } - }`) - - var jsonAccounts jsonAccounts - err := json.Unmarshal(b, &jsonAccounts) - assert.NoError(t, err) - - _, err = jsonAccounts.transformToConfig() - assert.Equal(t, err.Error(), "invalid private key for account: test") -} - -func Test_ConfigInvalidAddress(t *testing.T) { - b := []byte(`{ - "test": { - "address": "zz", - "key": "2332967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b44" - } - }`) - - var jsonAccounts jsonAccounts - err := json.Unmarshal(b, &jsonAccounts) - assert.NoError(t, err) - - _, err = jsonAccounts.transformToConfig() - assert.Equal(t, err.Error(), "could not parse address: zz") -} - -func Test_ReplaceENV(t *testing.T) { - t.Run("Valid ENV set vars", func(t *testing.T) { - os.Setenv("TEST", "foo") - - tests := []string{"$TEST", "${TEST}"} - for _, test := range tests { - replaced, original, err := tryReplaceEnv(test) - assert.NoError(t, err) - assert.Equal(t, "foo", replaced) - assert.Equal(t, test, original) - } - }) - - t.Run("ENV not set", func(t *testing.T) { - _, _, err := tryReplaceEnv("$NOT_SET") - assert.EqualError(t, err, "required environment variable NOT_SET not set") - }) - - t.Run("Should not match", func(t *testing.T) { - tests := []string{"TEST", "${TEST", "$TEST}", "$$$$", "123"} - for i, test := range tests { - replaced, original, err := tryReplaceEnv(test) - assert.NoError(t, err, fmt.Sprintf("test #%d", i)) - assert.Equal(t, "", replaced) - assert.Equal(t, "", original) - } - }) -} diff --git a/flowkit/config/json/config.go b/flowkit/config/json/config.go deleted file mode 100644 index af2f96c8e..000000000 --- a/flowkit/config/json/config.go +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package json - -import ( - "encoding/json" - "fmt" - - "github.com/onflow/flow-cli/flowkit/config" -) - -// jsonConfig implements JSON format for persisting and parsing configuration. -type jsonConfig struct { - Emulators jsonEmulators `json:"emulators,omitempty"` - Contracts jsonContracts `json:"contracts,omitempty"` - Dependencies jsonDependencies `json:"dependencies,omitempty"` - Networks jsonNetworks `json:"networks,omitempty"` - Accounts jsonAccounts `json:"accounts,omitempty"` - Deployments jsonDeployments `json:"deployments,omitempty"` -} - -func (j *jsonConfig) transformToConfig() (*config.Config, error) { - emulators, err := j.Emulators.transformToConfig() - if err != nil { - return nil, err - } - - contracts, err := j.Contracts.transformToConfig() - if err != nil { - return nil, err - } - - dependencies, err := j.Dependencies.transformToConfig() - if err != nil { - return nil, err - } - - networks, err := j.Networks.transformToConfig() - if err != nil { - return nil, err - } - - accounts, err := j.Accounts.transformToConfig() - if err != nil { - return nil, err - } - - deployments, err := j.Deployments.transformToConfig() - if err != nil { - return nil, err - } - - conf := &config.Config{ - Emulators: emulators, - Contracts: contracts, - Dependencies: dependencies, - Networks: networks, - Accounts: accounts, - Deployments: deployments, - } - - // Add dependencies as contracts so they can be used in the project just like any other contract. - for _, dep := range dependencies { - conf.Contracts.AddDependencyAsContract(dep, dep.Source.NetworkName) - } - - return conf, nil -} - -func transformConfigToJSON(config *config.Config) jsonConfig { - return jsonConfig{ - Emulators: transformEmulatorsToJSON(config.Emulators), - Contracts: transformContractsToJSON(config.Contracts), - Dependencies: transformDependenciesToJSON(config.Dependencies, config.Contracts), - Networks: transformNetworksToJSON(config.Networks), - Accounts: transformAccountsToJSON(config.Accounts), - Deployments: transformDeploymentsToJSON(config.Deployments), - } -} - -type oldFormat struct { - Host any `json:"host"` - Accounts any `json:"accounts"` -} - -func oldConfigFormat(raw []byte) bool { - var conf oldFormat - - err := json.Unmarshal(raw, &conf) - if err != nil { // ignore errors in this case - return false - } - - if conf.Host != nil { - return true - } - - return false -} - -// Parser for JSON configuration format. -type Parser struct{} - -// NewParser returns a JSON parser. -func NewParser() *Parser { - return &Parser{} -} - -// Serialize configuration to raw. -func (p *Parser) Serialize(conf *config.Config) ([]byte, error) { - jsonConf := transformConfigToJSON(conf) - data, err := json.MarshalIndent(jsonConf, "", "\t") - if err != nil { - return nil, err - } - - return data, nil -} - -// Deserialize configuration to config structure. -func (p *Parser) Deserialize(raw []byte) (*config.Config, error) { - // check if old format of config and return an error - if oldConfigFormat(raw) { - return nil, config.ErrOutdatedFormat - } - - var jsonConf jsonConfig - err := json.Unmarshal(raw, &jsonConf) - if err != nil { - return nil, fmt.Errorf("configuration syntax error: %w", err) - } - - return jsonConf.transformToConfig() -} - -// SupportsFormat check if the file format is supported. -func (p *Parser) SupportsFormat(extension string) bool { - return extension == ".json" -} diff --git a/flowkit/config/json/config_test.go b/flowkit/config/json/config_test.go deleted file mode 100644 index 011089851..000000000 --- a/flowkit/config/json/config_test.go +++ /dev/null @@ -1,257 +0,0 @@ -/* -* Flow CLI -* -* Copyright 2019 Dapper Labs, Inc. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. - */ -package json - -import ( - "testing" - - "github.com/onflow/flow-go-sdk" - "github.com/onflow/flow-go-sdk/crypto" - "github.com/stretchr/testify/assert" - - "github.com/onflow/flow-cli/flowkit/config" -) - -func keys() []crypto.PrivateKey { - var keys []crypto.PrivateKey - key, _ := crypto.DecodePrivateKeyHex(crypto.ECDSA_P256, "dd72967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47") - keys = append(keys, key) - return keys -} - -func Test_SimpleJSONConfig(t *testing.T) { - b := []byte(`{ - "emulators": { - "default": { - "port": 3569, - "serviceAccount": "emulator-account" - } - }, - "contracts": {}, - "networks": { - "emulator": "127.0.0.1:3569" - }, - "accounts": { - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "11c5dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7" - } - }, - "deployments": {} - }`) - - parser := NewParser() - conf, err := parser.Deserialize(b) - - assert.NoError(t, err) - assert.Len(t, conf.Accounts, 1) - assert.Equal(t, "emulator-account", conf.Accounts[0].Name) - assert.Equal(t, "0x11c5dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7", conf.Accounts[0].Key.PrivateKey.String()) - network, err := conf.Networks.ByName("emulator") - assert.NoError(t, err) - assert.Equal(t, "127.0.0.1:3569", network.Host) -} - -func Test_NonExistingContractForDeployment(t *testing.T) { - b := []byte(`{ - "contracts": {}, - "accounts": { - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "11c5dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7" - } - }, - "networks": { - "emulator": "127.0.0.1:3569" - }, - "deployments": { - "emulator": { - "emulator-account": ["FungibleToken"] - } - } - }`) - - parser := NewParser() - conf, err := parser.Deserialize(b) - assert.NoError(t, err) - - err = conf.Validate() - assert.Equal(t, "deployment contains nonexisting contract FungibleToken", err.Error()) -} - -func Test_NonExistingAccountForDeployment(t *testing.T) { - b := []byte(`{ - "contracts": { - "FungibleToken": "./test.cdc" - }, - "accounts": { - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "11c5dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7" - } - }, - "networks": { - "emulator": "127.0.0.1:3569" - }, - "deployments": { - "emulator": { - "test-1": ["FungibleToken"] - } - } - }`) - - parser := NewParser() - conf, err := parser.Deserialize(b) - assert.NoError(t, err) - - err = conf.Validate() - assert.Equal(t, "deployment contains nonexisting account test-1", err.Error()) -} - -func Test_NonExistingNetworkForDeployment(t *testing.T) { - b := []byte(`{ - "contracts": { - "FungibleToken": "./test.cdc" - }, - "accounts": { - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "11c5dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7" - } - }, - "networks": {}, - "deployments": { - "foo": { - "test-1": ["FungibleToken"] - } - } - }`) - - parser := NewParser() - conf, err := parser.Deserialize(b) - assert.NoError(t, err) - - err = conf.Validate() - assert.Equal(t, "deployment contains nonexisting network foo", err.Error()) -} - -func Test_NonExistingAccountForEmulator(t *testing.T) { - b := []byte(`{ - "emulators": { - "default": { - "port": 3569, - "serviceAccount": "emulator-account" - } - } - }`) - - parser := NewParser() - conf, err := parser.Deserialize(b) - assert.NoError(t, err) - - err = conf.Validate() - assert.Equal(t, "emulator default contains nonexisting service account emulator-account", err.Error()) -} - -// If config has default emulator values, it will not show up in flow.json -func Test_SerializeConfigToJsonEmulatorDefault(t *testing.T) { - configJson := []byte(`{ - "accounts": { - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "dd72967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47" - } - }, - "networks": { - "emulator": "127.0.0.1.3569" - } - }`) - cfg := config.Config{ - Emulators: config.Emulators{{ - Name: "default", - Port: 3569, - ServiceAccount: "emulator-account", - }}, - Contracts: config.Contracts{}, - Deployments: config.Deployments{}, - Accounts: config.Accounts{{ - Name: "emulator-account", - Address: flow.ServiceAddress(flow.Emulator), - Key: config.AccountKey{ - Type: config.KeyTypeHex, - Index: 0, - SigAlgo: crypto.ECDSA_P256, - HashAlgo: crypto.SHA3_256, - PrivateKey: keys()[0], - }, - }}, - Networks: config.Networks{{ - Name: "emulator", - Host: "127.0.0.1.3569", - }}, - } - parser := NewParser() - conf, _ := parser.Serialize(&cfg) - assert.JSONEq(t, string(configJson), string(conf)) -} - -func Test_SerializeConfigToJsonEmulatorNotDefault(t *testing.T) { - configJson := []byte(`{ - "emulators": { - "default": { - "port": 6000, - "serviceAccount": "emulator-account" - } - }, - "accounts": { - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "dd72967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47" - } - }, - "networks": { - "emulator": "127.0.0.1.3569" - } - }`) - config := config.Config{ - Emulators: config.Emulators{{ - Name: "default", - Port: 6000, - ServiceAccount: "emulator-account", - }}, - Accounts: config.Accounts{{ - Name: "emulator-account", - Address: flow.ServiceAddress(flow.Emulator), - Key: config.AccountKey{ - Type: config.KeyTypeHex, - Index: 0, - SigAlgo: crypto.ECDSA_P256, - HashAlgo: crypto.SHA3_256, - PrivateKey: keys()[0], - }, - }}, - Networks: config.Networks{{ - Name: "emulator", - Host: "127.0.0.1.3569", - }}, - } - parser := NewParser() - conf, _ := parser.Serialize(&config) - assert.JSONEq(t, string(configJson), string(conf)) - -} diff --git a/flowkit/config/json/contract.go b/flowkit/config/json/contract.go deleted file mode 100644 index 0cc90a160..000000000 --- a/flowkit/config/json/contract.go +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package json - -import ( - "encoding/json" - "fmt" - "path/filepath" - - "github.com/invopop/jsonschema" - "github.com/onflow/flow-go-sdk" - - "github.com/onflow/flow-cli/flowkit/config" -) - -type jsonContracts map[string]jsonContract - -// transformToConfig transforms json structures to config structure. -func (j jsonContracts) transformToConfig() (config.Contracts, error) { - contracts := make(config.Contracts, 0) - - for contractName, c := range j { - if c.Simple != "" { - contract := config.Contract{ - Name: contractName, - Location: c.Simple, - } - - contracts = append(contracts, contract) - } else { - contract := config.Contract{ - Name: contractName, - Location: c.Advanced.Source, - } - for network, alias := range c.Advanced.Aliases { - address := flow.HexToAddress(alias) - if address == flow.EmptyAddress { - return nil, fmt.Errorf("invalid alias address for a contract") - } - - contract.Aliases.Add(network, address) - } - contracts = append(contracts, contract) - } - } - - return contracts, nil -} - -// transformToJSON transforms config structure to json structures for saving. -func transformContractsToJSON(contracts config.Contracts) jsonContracts { - jsonContracts := jsonContracts{} - - for _, c := range contracts { - // If it's a dependency, skip. These are used under the hood and should not be saved. - if c.IsDependency { - continue - } - - // if simple case - if !c.IsAliased() { - jsonContracts[c.Name] = jsonContract{ - Simple: filepath.ToSlash(c.Location), - } - } else { // if advanced config - // check if we already created for this name then add or create - aliases := make(map[string]string) - for _, alias := range c.Aliases { - aliases[alias.Network] = alias.Address.String() - } - - jsonContracts[c.Name] = jsonContract{ - Advanced: jsonContractAdvanced{ - Source: filepath.ToSlash(c.Location), - Aliases: aliases, - }, - } - } - } - - return jsonContracts -} - -// jsonContractAdvanced for json parsing advanced config. -type jsonContractAdvanced struct { - Source string `json:"source"` - Aliases map[string]string `json:"aliases"` -} - -// jsonContract structure for json parsing. -type jsonContract struct { - Simple string - Advanced jsonContractAdvanced -} - -func (j *jsonContract) UnmarshalJSON(b []byte) error { - var source string - var advancedFormat jsonContractAdvanced - - // simple - err := json.Unmarshal(b, &source) - if err == nil { - j.Simple = filepath.FromSlash(source) - return nil - } - - // advanced - err = json.Unmarshal(b, &advancedFormat) - if err == nil { - j.Advanced = advancedFormat - j.Advanced.Source = filepath.FromSlash(j.Advanced.Source) - } else { - return err - } - - return nil -} - -func (j jsonContract) MarshalJSON() ([]byte, error) { - if j.Simple != "" { - return json.Marshal(j.Simple) - } else { - return json.Marshal(j.Advanced) - } -} - -func (j jsonContract) JSONSchema() *jsonschema.Schema { - return &jsonschema.Schema{ - OneOf: []*jsonschema.Schema{ - { - Type: "string", - }, - { - Ref: "#/$defs/jsonContractAdvanced", - }, - }, - Definitions: map[string]*jsonschema.Schema{ - "jsonContractAdvanced": jsonschema.Reflect(jsonContractAdvanced{}), - }, - } -} diff --git a/flowkit/config/json/contract_test.go b/flowkit/config/json/contract_test.go deleted file mode 100644 index bd9ab0800..000000000 --- a/flowkit/config/json/contract_test.go +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package json - -import ( - "encoding/json" - "path/filepath" - "testing" - - "github.com/stretchr/testify/assert" -) - -func Test_ConfigContractsSimple(t *testing.T) { - b := []byte(`{ - "KittyItems": "./cadence/kittyItems/contracts/KittyItems.cdc", - "KittyItemsMarket": "./cadence/kittyItems/contracts/KittyItemsMarket.cdc" - }`) - - var jsonContracts jsonContracts - err := json.Unmarshal(b, &jsonContracts) - assert.NoError(t, err) - - contracts, err := jsonContracts.transformToConfig() - assert.NoError(t, err) - - contract, _ := contracts.ByName("KittyItems") - assert.NotNil(t, contract) - - marketContract, _ := contracts.ByName("KittyItemsMarket") - assert.NotNil(t, marketContract) - - assert.Equal(t, filepath.FromSlash("./cadence/kittyItems/contracts/KittyItems.cdc"), contract.Location) - assert.Equal(t, filepath.FromSlash("./cadence/kittyItems/contracts/KittyItemsMarket.cdc"), marketContract.Location) -} - -func Test_ConfigContractsComplex(t *testing.T) { - b := []byte(`{ - "KittyItems": "./cadence/kittyItems/contracts/KittyItems.cdc", - "KittyItemsMarket": { - "source": "./cadence/kittyItemsMarket/contracts/KittyItemsMarket.cdc", - "aliases": { - "testnet": "f8d6e0586b0a20c7" - } - } - }`) - - var jsonContracts jsonContracts - err := json.Unmarshal(b, &jsonContracts) - assert.NoError(t, err) - - contracts, err := jsonContracts.transformToConfig() - assert.NoError(t, err) - - assert.Len(t, contracts, 2) - - kittyItems, _ := contracts.ByName("KittyItems") - assert.NotNil(t, kittyItems) - - kittyItemsMarket, _ := contracts.ByName("KittyItemsMarket") - assert.NotNil(t, kittyItemsMarket) - - assert.Equal(t, filepath.FromSlash("./cadence/kittyItems/contracts/KittyItems.cdc"), kittyItems.Location) - assert.Equal(t, filepath.FromSlash("./cadence/kittyItemsMarket/contracts/KittyItemsMarket.cdc"), kittyItemsMarket.Location) - - assert.True(t, kittyItemsMarket.Aliases.ByNetwork("emulator") == nil) - - assert.True(t, kittyItemsMarket.IsAliased()) - assert.True(t, kittyItemsMarket.Aliases.ByNetwork("emulator") == nil) - assert.Equal(t, "f8d6e0586b0a20c7", kittyItemsMarket.Aliases.ByNetwork("testnet").Address.String()) - - assert.False(t, kittyItems.IsAliased()) - assert.True(t, kittyItems.Aliases.ByNetwork("emulator") == nil) -} - -func Test_ConfigContractsAliases(t *testing.T) { - b := []byte(`{ - "NonFungibleToken": "../hungry-kitties/cadence/contracts/NonFungibleToken.cdc", - "Kibble": { - "source": "../hungry-kitties/cadence/contracts/Kibble.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "testnet": "ead892083b3e2c6c" - } - }, - "FungibleToken": { - "source": "../hungry-kitties/cadence/contracts/FungibleToken.cdc", - "aliases": { - "emulator": "e5a8b7f23e8b548f" - } - } - }`) - - var jsonContracts jsonContracts - err := json.Unmarshal(b, &jsonContracts) - assert.NoError(t, err) - - contracts, err := jsonContracts.transformToConfig() - assert.NoError(t, err) - - fungibleToken, _ := contracts.ByName("FungibleToken") - assert.NotNil(t, fungibleToken) - assert.True(t, fungibleToken.IsAliased()) - assert.Equal(t, "e5a8b7f23e8b548f", fungibleToken.Aliases.ByNetwork("emulator").Address.String()) - assert.Equal(t, filepath.FromSlash("../hungry-kitties/cadence/contracts/FungibleToken.cdc"), fungibleToken.Location) - - kibble, _ := contracts.ByName("Kibble") - assert.NotNil(t, kibble) - assert.True(t, kibble.IsAliased()) - assert.Equal(t, filepath.FromSlash("../hungry-kitties/cadence/contracts/Kibble.cdc"), kibble.Location) - assert.Equal(t, "ead892083b3e2c6c", kibble.Aliases.ByNetwork("testnet").Address.String()) - assert.Equal(t, "f8d6e0586b0a20c7", kibble.Aliases.ByNetwork("emulator").Address.String()) - - nft, _ := contracts.ByName("NonFungibleToken") - assert.NotNil(t, nft) - assert.False(t, nft.IsAliased()) - assert.Equal(t, nft.Location, filepath.FromSlash("../hungry-kitties/cadence/contracts/NonFungibleToken.cdc")) -} - -func Test_TransformContractToJSON(t *testing.T) { - b := []byte(`{ - "KittyItems": "./cadence/kittyItems/contracts/KittyItems.cdc", - "KittyItemsMarket": { - "source": "./cadence/kittyItemsMarket/contracts/KittyItemsMarket.cdc", - "aliases": { - "testnet":"e5a8b7f23e8b548f" - } - } - }`) - - var jsonContracts jsonContracts - err := json.Unmarshal(b, &jsonContracts) - assert.NoError(t, err) - - contracts, err := jsonContracts.transformToConfig() - assert.NoError(t, err) - - j := transformContractsToJSON(contracts) - x, _ := json.Marshal(j) - - assert.JSONEq(t, string(b), string(x)) -} - -func Test_TransformComplexContractToJSON(t *testing.T) { - b := []byte(`{ - "KittyItems": "./cadence/kittyItems/contracts/KittyItems.cdc", - "KittyItemsMarket": { - "source": "./cadence/kittyItemsMarket/contracts/KittyItemsMarket.cdc", - "aliases": { - "testnet":"e5a8b7f23e8b548f" - } - }, - "Kibble": { - "source": "./cadence/kittyItems/contracts/KittyItems.cdc", - "aliases": { - "testnet": "e5a8b7f23e8b548f", - "emulator": "f8d6e0586b0a20c7" - } - } - }`) - - var jsonContracts jsonContracts - err := json.Unmarshal(b, &jsonContracts) - assert.NoError(t, err) - - contracts, err := jsonContracts.transformToConfig() - assert.NoError(t, err) - - j := transformContractsToJSON(contracts) - x, _ := json.Marshal(j) - - assert.JSONEq(t, string(b), string(x)) -} diff --git a/flowkit/config/json/dependency.go b/flowkit/config/json/dependency.go deleted file mode 100644 index d724ff6a5..000000000 --- a/flowkit/config/json/dependency.go +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package json - -import ( - "encoding/json" - "fmt" - "strings" - - "github.com/invopop/jsonschema" - - "github.com/onflow/flow-go-sdk" - - "github.com/onflow/flow-cli/flowkit/config" -) - -type jsonDependencies map[string]jsonDependency - -func (j jsonDependencies) transformToConfig() (config.Dependencies, error) { - deps := make(config.Dependencies, 0) - - for dependencyName, dependency := range j { - var dep config.Dependency - - if dependency.Simple != "" { - depNetwork, depAddress, depContractName, err := config.ParseSourceString(dependency.Simple) - if err != nil { - return nil, fmt.Errorf("error parsing source for dependency %s: %w", dependencyName, err) - } - - dep = config.Dependency{ - Name: dependencyName, - Source: config.Source{ - NetworkName: depNetwork, - Address: flow.HexToAddress(depAddress), - ContractName: depContractName, - }, - } - } else { - depNetwork, depAddress, depContractName, err := config.ParseSourceString(dependency.Extended.Source) - if err != nil { - return nil, fmt.Errorf("error parsing source for dependency %s: %w", dependencyName, err) - } - - dep = config.Dependency{ - Name: dependencyName, - Hash: dependency.Extended.Hash, - Source: config.Source{ - NetworkName: depNetwork, - Address: flow.HexToAddress(depAddress), - ContractName: depContractName, - }, - } - - for network, alias := range dependency.Extended.Aliases { - address := flow.HexToAddress(alias) - if address == flow.EmptyAddress { - return nil, fmt.Errorf("invalid alias address for a contract") - } - - dep.Aliases.Add(network, address) - } - } - - deps = append(deps, dep) - } - - return deps, nil -} - -func transformDependenciesToJSON(configDependencies config.Dependencies, configContracts config.Contracts) jsonDependencies { - jsonDeps := jsonDependencies{} - - for _, dep := range configDependencies { - aliases := make(map[string]string) - - depContract := configContracts.DependencyContractByName(dep.Name) - if depContract != nil { - for _, alias := range depContract.Aliases { - aliases[alias.Network] = alias.Address.String() - } - } - - jsonDeps[dep.Name] = jsonDependency{ - Extended: jsonDependencyExtended{ - Source: buildSourceString(dep.Source), - Hash: dep.Hash, - Aliases: aliases, - }, - } - } - - return jsonDeps -} - -func buildSourceString(source config.Source) string { - var builder strings.Builder - - builder.WriteString(source.NetworkName) - builder.WriteString("://") - builder.WriteString(source.Address.String()) - builder.WriteString(".") - builder.WriteString(source.ContractName) - - return builder.String() -} - -// jsonDependencyExtended for json parsing advanced config. -type jsonDependencyExtended struct { - Source string `json:"source"` - Hash string `json:"hash"` - Aliases map[string]string `json:"aliases"` -} - -// jsonDependency structure for json parsing. -type jsonDependency struct { - Simple string - Extended jsonDependencyExtended -} - -func (j *jsonDependency) UnmarshalJSON(b []byte) error { - var source string - var extendedFormat jsonDependencyExtended - - // simple - err := json.Unmarshal(b, &source) - if err == nil { - j.Simple = source - return nil - } - - // advanced - err = json.Unmarshal(b, &extendedFormat) - if err == nil { - j.Extended = extendedFormat - } else { - return err - } - - return nil -} - -func (j jsonDependency) MarshalJSON() ([]byte, error) { - if j.Simple != "" { - return json.Marshal(j.Simple) - } else { - return json.Marshal(j.Extended) - } -} - -func (j jsonDependency) JSONSchema() *jsonschema.Schema { - return &jsonschema.Schema{ - OneOf: []*jsonschema.Schema{ - { - Type: "string", - }, - { - Ref: "#/$defs/jsonDependencyExtended", - }, - }, - Definitions: map[string]*jsonschema.Schema{ - "jsonDependencyExtended": jsonschema.Reflect(jsonDependencyExtended{}), - }, - } -} diff --git a/flowkit/config/json/dependency_test.go b/flowkit/config/json/dependency_test.go deleted file mode 100644 index 3467b130c..000000000 --- a/flowkit/config/json/dependency_test.go +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package json - -import ( - "encoding/json" - "testing" - - "github.com/stretchr/testify/assert" -) - -func Test_ConfigDependencies(t *testing.T) { - b := []byte(`{ - "HelloWorld": "testnet://877931736ee77cff.HelloWorld" - }`) - - var jsonDependencies jsonDependencies - err := json.Unmarshal(b, &jsonDependencies) - assert.NoError(t, err) - - dependencies, err := jsonDependencies.transformToConfig() - assert.NoError(t, err) - - assert.Len(t, dependencies, 1) - - dependencyOne := dependencies.ByName("HelloWorld") - assert.NotNil(t, dependencyOne) - - assert.NotNil(t, dependencyOne) -} - -func Test_TransformDependenciesToJSON(t *testing.T) { - b := []byte(`{ - "HelloWorld": "testnet://877931736ee77cff.HelloWorld" - }`) - - bOut := []byte(`{ - "HelloWorld": { - "source": "testnet://877931736ee77cff.HelloWorld", - "hash": "", - "aliases": {} - } - }`) - - var jsonContracts jsonContracts - errContracts := json.Unmarshal(b, &jsonContracts) - assert.NoError(t, errContracts) - - var jsonDependencies jsonDependencies - err := json.Unmarshal(b, &jsonDependencies) - assert.NoError(t, err) - - contracts, err := jsonContracts.transformToConfig() - dependencies, err := jsonDependencies.transformToConfig() - assert.NoError(t, err) - - j := transformDependenciesToJSON(dependencies, contracts) - x, _ := json.Marshal(j) - - assert.Equal(t, cleanSpecialChars(bOut), cleanSpecialChars(x)) -} diff --git a/flowkit/config/json/deploy.go b/flowkit/config/json/deploy.go deleted file mode 100644 index 9e21270f3..000000000 --- a/flowkit/config/json/deploy.go +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package json - -import ( - "encoding/json" - "fmt" - - "github.com/invopop/jsonschema" - "github.com/onflow/cadence" - jsoncdc "github.com/onflow/cadence/encoding/json" - - "github.com/onflow/flow-cli/flowkit/config" -) - -type jsonDeployments map[string]jsonDeployment - -// transformToConfig transforms json structures to config structure. -func (j jsonDeployments) transformToConfig() (config.Deployments, error) { - deployments := make(config.Deployments, 0) - - for networkName, deploys := range j { - - var deploy config.Deployment - for accountName, contracts := range deploys { - deploy = config.Deployment{ - Network: networkName, - Account: accountName, - } - - var contractDeploys []config.ContractDeployment - for _, contract := range contracts { - if contract.simple != "" { - contractDeploys = append( - contractDeploys, - config.ContractDeployment{ - Name: contract.simple, - Args: nil, - }, - ) - } else { - args := make([]cadence.Value, 0) - for _, arg := range contract.advanced.Args { - b, err := json.Marshal(arg) - if err != nil { - return nil, err - } - - cadenceArg, err := jsoncdc.Decode(nil, b) - if err != nil { - return nil, err - } - - args = append(args, cadenceArg) - } - - contractDeploys = append( - contractDeploys, - config.ContractDeployment{ - Name: contract.advanced.Name, - Args: args, - }, - ) - } - } - - deploy.Contracts = contractDeploys - deployments = append(deployments, deploy) - } - } - - return deployments, nil -} - -// transformToJSON transforms config structure to json structures for saving. -func transformDeploymentsToJSON(configDeployments config.Deployments) jsonDeployments { - jsonDeploys := jsonDeployments{} - - for _, d := range configDeployments { - - deployments := make([]deployment, 0) - for _, c := range d.Contracts { - if len(c.Args) == 0 { - deployments = append(deployments, deployment{ - simple: c.Name, - }) - } else { - args := make([]map[string]any, 0) - for _, arg := range c.Args { - switch arg.Type().ID() { - case "Bool": - args = append(args, map[string]any{ - "type": arg.Type().ID(), - "value": arg.ToGoValue(), - }) - default: - args = append(args, map[string]any{ - "type": arg.Type().ID(), - "value": fmt.Sprintf("%v", arg.ToGoValue()), - }) - } - } - - deployments = append(deployments, deployment{ - advanced: contractDeployment{ - Name: c.Name, - Args: args, - }, - }) - } - } - - if _, ok := jsonDeploys[d.Network]; ok { - jsonDeploys[d.Network][d.Account] = deployments - } else { - jsonDeploys[d.Network] = jsonDeployment{ - d.Account: deployments, - } - } - - } - - return jsonDeploys -} - -type contractDeployment struct { - Name string `json:"name"` - Args []map[string]any `json:"args"` -} - -type deployment struct { - simple string - advanced contractDeployment -} - -type jsonDeployment map[string][]deployment - -func (d *deployment) UnmarshalJSON(b []byte) error { - - // simple format - var simple string - err := json.Unmarshal(b, &simple) - if err == nil { - d.simple = simple - return nil - } - - // advanced format - var advanced contractDeployment - err = json.Unmarshal(b, &advanced) - if err == nil { - d.advanced = advanced - } else { - return err - } - - return nil -} - -func (d deployment) MarshalJSON() ([]byte, error) { - if d.simple != "" { - return json.Marshal(d.simple) - } else { - return json.Marshal(d.advanced) - } -} - -func (j deployment) JSONSchema() *jsonschema.Schema { - return &jsonschema.Schema{ - OneOf: []*jsonschema.Schema{ - { - Type: "string", - }, - { - Ref: "#/$defs/contractDeployment", - }, - }, - Definitions: map[string]*jsonschema.Schema{ - "contractDeployment": jsonschema.Reflect(contractDeployment{}), - }, - } -} diff --git a/flowkit/config/json/deploy_test.go b/flowkit/config/json/deploy_test.go deleted file mode 100644 index 41b0c8805..000000000 --- a/flowkit/config/json/deploy_test.go +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package json - -import ( - "encoding/json" - "regexp" - "strings" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func cleanSpecialChars(code []byte) string { - space := regexp.MustCompile(`\s+`) - return strings.ReplaceAll(space.ReplaceAllString(string(code), " "), " ", "") -} - -func Test_ConfigDeploymentsSimple(t *testing.T) { - b := []byte(`{ - "testnet": { - "account-1": ["FungibleToken", "NonFungibleToken", "Kibble", "KittyItems"] - }, - "emulator": { - "account-2": ["KittyItems", "KittyItemsMarket"], - "account-3": ["FungibleToken", "NonFungibleToken", "Kibble", "KittyItems", "KittyItemsMarket"] - } - }`) - - var jsonDeployments jsonDeployments - err := json.Unmarshal(b, &jsonDeployments) - assert.NoError(t, err) - - deployments, err := jsonDeployments.transformToConfig() - assert.NoError(t, err) - - const account1Name = "account-1" - const account2Name = "account-2" - const account3Name = "account-3" - - assert.Len(t, deployments.ByNetwork("testnet"), 1) - assert.Len(t, deployments.ByNetwork("emulator"), 2) - - account1Deployment := deployments.ByAccountAndNetwork(account1Name, "testnet") - account2Deployment := deployments.ByAccountAndNetwork(account2Name, "emulator") - account3Deployment := deployments.ByAccountAndNetwork(account3Name, "emulator") - - require.NotNil(t, account1Deployment) - require.NotNil(t, account2Deployment) - require.NotNil(t, account3Deployment) - - assert.Equal(t, account1Name, account1Deployment.Account) - assert.Equal(t, account2Name, account2Deployment.Account) - assert.Equal(t, account3Name, account3Deployment.Account) - - assert.Len(t, account1Deployment.Contracts, 4) - - for i, name := range []string{"FungibleToken", "NonFungibleToken", "Kibble", "KittyItems"} { - assert.Equal(t, account1Deployment.Contracts[i].Name, name) - } - - for i, name := range []string{"KittyItems", "KittyItemsMarket"} { - assert.Equal(t, account2Deployment.Contracts[i].Name, name) - } - - for i, name := range []string{"FungibleToken", "NonFungibleToken", "Kibble", "KittyItems", "KittyItemsMarket"} { - assert.Equal(t, account3Deployment.Contracts[i].Name, name) - } - -} - -func Test_TransformDeployToJSON(t *testing.T) { - b := []byte(`{ - "emulator":{ - "account-3":["KittyItems", { - "name": "Kibble", - "args": [ - { "type": "String", "value": "Hello World" }, - { "type": "Int8", "value": "10" } - ] - }], - "account-4":["FungibleToken","NonFungibleToken","Kibble","KittyItems","KittyItemsMarket"] - }, - "testnet":{ - "account-2":["FungibleToken","NonFungibleToken","Kibble","KittyItems"] - } - }`) - - var jsonDeployments jsonDeployments - err := json.Unmarshal(b, &jsonDeployments) - assert.NoError(t, err) - - deployments, err := jsonDeployments.transformToConfig() - assert.NoError(t, err) - - j := transformDeploymentsToJSON(deployments) - x, _ := json.Marshal(j) - - assert.Equal(t, cleanSpecialChars(b), cleanSpecialChars(x)) -} - -func Test_DeploymentAdvanced(t *testing.T) { - b := []byte(`{ - "emulator": { - "alice": [ - { - "name": "Kibble", - "args": [ - { "type": "String", "value": "Hello World" }, - { "type": "Int8", "value": "10" }, - { "type": "Bool", "value": false } - ] - }, - "KittyItemsMarket" - ] - } - }`) - - var jsonDeployments jsonDeployments - err := json.Unmarshal(b, &jsonDeployments) - assert.NoError(t, err) - - deployments, err := jsonDeployments.transformToConfig() - assert.NoError(t, err) - - alice := deployments.ByAccountAndNetwork("alice", "emulator") - assert.NotNil(t, alice) - assert.Len(t, alice.Contracts, 2) - assert.Equal(t, "Kibble", alice.Contracts[0].Name) - assert.Len(t, alice.Contracts[0].Args, 3) - assert.Equal(t, `"Hello World"`, alice.Contracts[0].Args[0].String()) - assert.Equal(t, "10", alice.Contracts[0].Args[1].String()) - assert.Equal(t, "Bool", alice.Contracts[0].Args[2].Type().ID()) - assert.False(t, alice.Contracts[0].Args[2].ToGoValue().(bool)) - assert.Equal(t, "KittyItemsMarket", alice.Contracts[1].Name) - assert.Len(t, alice.Contracts[1].Args, 0) -} diff --git a/flowkit/config/json/emulator.go b/flowkit/config/json/emulator.go deleted file mode 100644 index c03836c4b..000000000 --- a/flowkit/config/json/emulator.go +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package json - -import ( - "fmt" - - "github.com/onflow/flow-cli/flowkit/config" -) - -type jsonEmulators map[string]jsonEmulator - -// transformToConfig transforms json structures to config structure. -func (j jsonEmulators) transformToConfig() (config.Emulators, error) { - emulators := make(config.Emulators, 0) - - for name, e := range j { - if e.Port < 0 || e.Port > 65535 { - return nil, fmt.Errorf("invalid port value") - } - - emulator := config.Emulator{ - Name: name, - Port: e.Port, - ServiceAccount: e.ServiceAccount, - } - - emulators = append(emulators, emulator) - } - - return emulators, nil -} - -// transformToJSON transforms config structure to json structures for saving. -func transformEmulatorsToJSON(emulators config.Emulators) jsonEmulators { - jsonEmulators := jsonEmulators{} - - for _, e := range emulators { - if e == config.DefaultEmulator { - continue - } - jsonEmulators[e.Name] = jsonEmulator{ - Port: e.Port, - ServiceAccount: e.ServiceAccount, - } - } - - return jsonEmulators -} - -type jsonEmulator struct { - Port int `json:"port"` - ServiceAccount string `json:"serviceAccount"` -} diff --git a/flowkit/config/json/emulator_test.go b/flowkit/config/json/emulator_test.go deleted file mode 100644 index cf4eef268..000000000 --- a/flowkit/config/json/emulator_test.go +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package json - -import ( - "encoding/json" - "sort" - "testing" - - "github.com/stretchr/testify/assert" -) - -func Test_ConfigEmulatorSimple(t *testing.T) { - b := []byte(`{ - "default": { - "port": 9000, - "serviceAccount": "emulator-account" - } - }`) - - var jsonEmulators jsonEmulators - err := json.Unmarshal(b, &jsonEmulators) - assert.NoError(t, err) - - emulators, err := jsonEmulators.transformToConfig() - assert.NoError(t, err) - - assert.Equal(t, "default", emulators[0].Name) - assert.Equal(t, 9000, emulators[0].Port) -} - -func Test_ConfigMultipleEmulators(t *testing.T) { - b := []byte(`{ - "default": { - "port": 9000, - "serviceAccount": "emulator-account" - }, - "custom-emulator": { - "port": 3000, - "serviceAccount": "custom-emulator-account" - } - }`) - - var jsonEmulators jsonEmulators - err := json.Unmarshal(b, &jsonEmulators) - assert.NoError(t, err) - - emulators, err := jsonEmulators.transformToConfig() - assert.NoError(t, err) - assert.Len(t, emulators, 2) - - sort.Slice(emulators, func(i, j int) bool { - return emulators[i].Port > emulators[j].Port - }) - assert.Equal(t, emulators[0].Name, "default") - assert.Equal(t, emulators[0].Port, 9000) - assert.Equal(t, emulators[0].ServiceAccount, "emulator-account") - assert.Equal(t, emulators[1].Name, "custom-emulator") - assert.Equal(t, emulators[1].Port, 3000) - assert.Equal(t, emulators[1].ServiceAccount, "custom-emulator-account") -} diff --git a/flowkit/config/json/network.go b/flowkit/config/json/network.go deleted file mode 100644 index 4654c1558..000000000 --- a/flowkit/config/json/network.go +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package json - -import ( - "encoding/hex" - "encoding/json" - "fmt" - "strings" - - "github.com/invopop/jsonschema" - "github.com/onflow/flow-go-sdk/crypto" - - "github.com/onflow/flow-cli/flowkit/config" -) - -type jsonNetworks map[string]jsonNetwork - -// transformToConfig transforms json structures to config structure. -func (j jsonNetworks) transformToConfig() (config.Networks, error) { - networks := make(config.Networks, 0) - - for networkName, n := range j { - if n.Advanced.Key != "" && n.Advanced.Host != "" { - err := validateECDSAP256Pub(n.Advanced.Key) - if err != nil { - return nil, fmt.Errorf("invalid key %s for network with name %s", n.Advanced.Key, networkName) - } - - networks = append(networks, config.Network{ - Name: networkName, - Host: n.Advanced.Host, - Key: n.Advanced.Key, - }) - } else if n.Simple.Host != "" { - networks = append(networks, config.Network{ - Name: networkName, - Host: n.Simple.Host, - }) - } else { - return nil, fmt.Errorf("failed to transform networks configuration") - } - } - - return networks, nil -} - -// transformNetworksToJSON transforms config structure to json structures for saving. -func transformNetworksToJSON(networks config.Networks) jsonNetworks { - jsonNetworks := jsonNetworks{} - - for _, n := range networks { - if n.Key != "" { - jsonNetworks[n.Name] = transformAdvancedNetworkToJSON(n) - } else { - jsonNetworks[n.Name] = transformSimpleNetworkToJSON(n) - } - } - - return jsonNetworks -} - -func transformSimpleNetworkToJSON(n config.Network) jsonNetwork { - return jsonNetwork{ - Simple: simpleNetwork{ - Host: n.Host, - }, - } -} - -func transformAdvancedNetworkToJSON(n config.Network) jsonNetwork { - return jsonNetwork{ - Advanced: advancedNetwork{ - Host: n.Host, - Key: n.Key, - }, - } -} - -type jsonNetwork struct { - Simple simpleNetwork - Advanced advancedNetwork -} - -type simpleNetwork struct { - Host string `json:"host"` -} - -type advancedNetwork struct { - Host string `json:"host"` - Key string `json:"key"` -} - -func (j *jsonNetwork) UnmarshalJSON(b []byte) error { - var host string - err := json.Unmarshal(b, &host) - if err == nil { - j.Simple.Host = host - return nil - } - - // ignore advanced schema from previous configuration format - var advanced advancedNetwork - err = json.Unmarshal(b, &advanced) - if err == nil { - j.Advanced.Host = advanced.Host - j.Advanced.Key = advanced.Key - } - - return err -} - -func (j jsonNetwork) MarshalJSON() ([]byte, error) { - if j.Simple != (simpleNetwork{}) { - return json.Marshal(j.Simple.Host) - } - - return json.Marshal(j.Advanced) -} - -// validateECDSAP256Pub attempt to decode the hex string representation of a ECDSA P256 public key -func validateECDSAP256Pub(key string) error { - b, err := hex.DecodeString(strings.TrimPrefix(key, "0x")) - if err != nil { - return fmt.Errorf("failed to decode public key hex string: %w", err) - } - - _, err = crypto.DecodePublicKey(crypto.ECDSA_P256, b) - if err != nil { - return fmt.Errorf("failed to decode public key: %w", err) - } - - return nil -} - -func (j jsonNetwork) JSONSchema() *jsonschema.Schema { - return &jsonschema.Schema{ - OneOf: []*jsonschema.Schema{ - { - Ref: "#/$defs/simpleNetwork", - }, - { - Ref: "#/$defs/advancedNetwork", - }, - }, - Definitions: map[string]*jsonschema.Schema{ - "simpleNetwork": { - Type: "string", - }, - "advancedNetwork": jsonschema.Reflect(advancedNetwork{}), - }, - } -} diff --git a/flowkit/config/json/network_test.go b/flowkit/config/json/network_test.go deleted file mode 100644 index 6cd24c681..000000000 --- a/flowkit/config/json/network_test.go +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package json - -import ( - "encoding/json" - "testing" - - "github.com/stretchr/testify/assert" -) - -func Test_ConfigNetworkSimple(t *testing.T) { - b := []byte(`{ - "testnet": "access.testnet.nodes.onflow.org:9000" - }`) - - var jsonNetworks jsonNetworks - err := json.Unmarshal(b, &jsonNetworks) - assert.NoError(t, err) - - networks, err := jsonNetworks.transformToConfig() - assert.NoError(t, err) - - network, err := networks.ByName("testnet") - assert.NoError(t, err) - assert.Equal(t, "access.testnet.nodes.onflow.org:9000", network.Host) - assert.Equal(t, "testnet", network.Name) -} - -func Test_ConfigNetworkMultiple(t *testing.T) { - b := []byte(`{ - "emulator": "127.0.0.1:3569", - "testnet": { - "host": "access.testnet.nodes.onflow.org:9000", - "key": "5000676131ad3e22d853a3f75a5b5d0db4236d08dd6612e2baad771014b5266a242bccecc3522ff7207ac357dbe4f225c709d9b273ac484fed5d13976a39bdcd" - } - }`) - - var jsonNetworks jsonNetworks - err := json.Unmarshal(b, &jsonNetworks) - assert.NoError(t, err) - - networks, err := jsonNetworks.transformToConfig() - assert.NoError(t, err) - - network, err := networks.ByName("testnet") - assert.NoError(t, err) - assert.Equal(t, "access.testnet.nodes.onflow.org:9000", network.Host) - assert.Equal(t, "testnet", network.Name) - assert.Equal(t, "5000676131ad3e22d853a3f75a5b5d0db4236d08dd6612e2baad771014b5266a242bccecc3522ff7207ac357dbe4f225c709d9b273ac484fed5d13976a39bdcd", network.Key) - - emulator, err := networks.ByName("emulator") - assert.NoError(t, err) - assert.Equal(t, "emulator", emulator.Name) - assert.Equal(t, "127.0.0.1:3569", emulator.Host) -} - -func Test_TransformNetworkToJSON(t *testing.T) { - b := []byte(`{"emulator":"127.0.0.1:3569","testnet":{"host":"access.testnet.nodes.onflow.org:9000","key":"5000676131ad3e22d853a3f75a5b5d0db4236d08dd6612e2baad771014b5266a242bccecc3522ff7207ac357dbe4f225c709d9b273ac484fed5d13976a39bdcd"}}`) - - var jsonNetworks jsonNetworks - err := json.Unmarshal(b, &jsonNetworks) - assert.NoError(t, err) - - networks, err := jsonNetworks.transformToConfig() - assert.NoError(t, err) - - j := transformNetworksToJSON(networks) - x, _ := json.Marshal(j) - - assert.Equal(t, string(b), string(x)) -} - -func Test_IgnoreOldFormat(t *testing.T) { - b := []byte(`{"emulator":"127.0.0.1:3569","testnet":{"host":"access.testnet.nodes.onflow.org:9000","key":"5000676131ad3e22d853a3f75a5b5d0db4236d08dd6612e2baad771014b5266a242bccecc3522ff7207ac357dbe4f225c709d9b273ac484fed5d13976a39bdcd"},"mainnet":{"host": "access.mainnet.nodes.onflow.org:9000","chain":"flow-mainnet","key":"5000676131ad3e22d853a3f75a5b5d0db4236d08dd6612e2baad771014b5266a242bccecc3522ff7207ac357dbe4f225c709d9b273ac484fed5d13976a39bdcd"}}`) - - var jsonNetworks jsonNetworks - err := json.Unmarshal(b, &jsonNetworks) - assert.NoError(t, err) - - conf, err := jsonNetworks.transformToConfig() - assert.NoError(t, err) - - assert.Len(t, jsonNetworks, 3) - - testnet, err := conf.ByName("testnet") - assert.NoError(t, err) - - mainnet, err := conf.ByName("mainnet") - assert.NoError(t, err) - - assert.Equal(t, "access.testnet.nodes.onflow.org:9000", testnet.Host) - assert.Equal(t, "5000676131ad3e22d853a3f75a5b5d0db4236d08dd6612e2baad771014b5266a242bccecc3522ff7207ac357dbe4f225c709d9b273ac484fed5d13976a39bdcd", testnet.Key) - assert.Equal(t, "access.mainnet.nodes.onflow.org:9000", mainnet.Host) - assert.Equal(t, "5000676131ad3e22d853a3f75a5b5d0db4236d08dd6612e2baad771014b5266a242bccecc3522ff7207ac357dbe4f225c709d9b273ac484fed5d13976a39bdcd", mainnet.Key) -} - -func Test_TransformConfigAdvanced(t *testing.T) { - t.Run("should returned advanced config with no errors", func(t *testing.T) { - b := []byte(`{"testnet":{"host":"access.testnet.nodes.onflow.org:9000", "key": "5000676131ad3e22d853a3f75a5b5d0db4236d08dd6612e2baad771014b5266a242bccecc3522ff7207ac357dbe4f225c709d9b273ac484fed5d13976a39bdcd"}}`) - var jsonNetworks jsonNetworks - err := json.Unmarshal(b, &jsonNetworks) - assert.NoError(t, err) - - conf, err := jsonNetworks.transformToConfig() - assert.NoError(t, err) - - testnet, err := conf.ByName("testnet") - assert.NoError(t, err) - assert.Equal(t, "access.testnet.nodes.onflow.org:9000", testnet.Host) - assert.Equal(t, "5000676131ad3e22d853a3f75a5b5d0db4236d08dd6612e2baad771014b5266a242bccecc3522ff7207ac357dbe4f225c709d9b273ac484fed5d13976a39bdcd", testnet.Key) - }) - t.Run("should return error if advanced config does not have key", func(t *testing.T) { - b := []byte(`{"testnet":{"host":"access.testnet.nodes.onflow.org:9000"}}`) - var jsonNetworks jsonNetworks - err := json.Unmarshal(b, &jsonNetworks) - assert.NoError(t, err) - - _, err = jsonNetworks.transformToConfig() - assert.Error(t, err) - }) - t.Run("should return error if advanced config does not have host", func(t *testing.T) { - b := []byte(`{"testnet":{"key": "5000676131ad3e22d853a3f75a5b5d0db4236d08dd6612e2baad771014b5266a242bccecc3522ff7207ac357dbe4f225c709d9b273ac484fed5d13976a39bdcd"}}`) - var jsonNetworks jsonNetworks - err := json.Unmarshal(b, &jsonNetworks) - assert.NoError(t, err) - - _, err = jsonNetworks.transformToConfig() - assert.Error(t, err) - }) - t.Run("should return error if advanced config provides invalid network key", func(t *testing.T) { - b := []byte(`{"testnet":{"host":"access.testnet.nodes.onflow.org:9000","key": "0xpublickey"}}`) - var jsonNetworks jsonNetworks - err := json.Unmarshal(b, &jsonNetworks) - assert.NoError(t, err) - - _, err = jsonNetworks.transformToConfig() - assert.Error(t, err) - }) -} diff --git a/flowkit/config/json/schema.go b/flowkit/config/json/schema.go deleted file mode 100644 index 6aaa6be09..000000000 --- a/flowkit/config/json/schema.go +++ /dev/null @@ -1,44 +0,0 @@ -package json - -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import ( - "github.com/invopop/jsonschema" -) - -func GenerateSchema() *jsonschema.Schema { - schema := jsonschema.Reflect(jsonConfig{}) - - // Recursively move all definitions to the root of the schema - // This is necessary because the jsonschema library does not support - // definitions in nested schemas and is a workaround - var moveDefinitions func(*jsonschema.Schema) - moveDefinitions = func(s *jsonschema.Schema) { - for k, v := range s.Definitions { - schema.Definitions[k] = v - moveDefinitions(v) - } - if s != schema { - s.Definitions = nil - } - } - moveDefinitions(schema) - - return schema -} diff --git a/flowkit/config/loader.go b/flowkit/config/loader.go deleted file mode 100644 index 6e1176bee..000000000 --- a/flowkit/config/loader.go +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package config - -import ( - "errors" - "fmt" - "os" - "path/filepath" -) - -// ErrDoesNotExist is error to be returned when config file does not exists. -var ErrDoesNotExist = errors.New("missing configuration") - -// Exists checks if file exists on the specified path. -func Exists(path string) bool { - info, err := os.Stat(path) - if os.IsNotExist(err) { - return false - } - return !info.IsDir() -} - -// Parser is interface for any configuration format parser to implement. -type Parser interface { - Serialize(*Config) ([]byte, error) - Deserialize([]byte) (*Config, error) - SupportsFormat(string) bool -} - -type ReaderWriter interface { - ReadFile(source string) ([]byte, error) - WriteFile(filename string, data []byte, perm os.FileMode) error -} - -// Parsers is a list of all configuration parsers. -type Parsers []Parser - -// FindForFormat finds a parser that can parse a specific format based on extension. -func (c *Parsers) FindForFormat(extension string) Parser { - for _, parser := range *c { - if parser.SupportsFormat(extension) { - return parser - } - } - - return nil -} - -// Loader contains actions for composing and modifying configuration. -type Loader struct { - readerWriter ReaderWriter - configParsers Parsers - LoadedLocations []string -} - -// NewLoader returns a new loader. -func NewLoader(readerWriter ReaderWriter) *Loader { - return &Loader{ - readerWriter: readerWriter, - } -} - -// AddConfigParser adds a new configuration parser. -func (l *Loader) AddConfigParser(format Parser) { - l.configParsers = append(l.configParsers, format) -} - -// Save saves a configuration to a path with correct serializer. -func (l *Loader) Save(conf *Config, path string) error { - configFormat := l.configParsers.FindForFormat( - filepath.Ext(path), - ) - - if configFormat == nil { - return fmt.Errorf("parser not found for format") - } - - data, err := configFormat.Serialize(conf) - if err != nil { - return err - } - - err = l.readerWriter.WriteFile(path, data, 0644) - if err != nil { - return err - } - - return nil -} - -func (l *Loader) loadConfig(confPath string) (*Config, error) { - l.LoadedLocations = append(l.LoadedLocations, confPath) - raw, err := l.loadFile(confPath) - - if err != nil { - return nil, err - } - - preProcessed, err := l.preprocess(raw) - if err != nil { - return nil, fmt.Errorf("failed to preprocess config: %w", err) - } - - configParser := l.configParsers.FindForFormat(filepath.Ext(confPath)) - if configParser == nil { - return nil, fmt.Errorf("parser not found for config: %s", confPath) - } - - return configParser.Deserialize(preProcessed) -} - -// Load loads configuration from one or more file paths. -// -// If more than one path is specified, their contents are merged -// together into on configuration object. -func (l *Loader) Load(paths []string) (*Config, error) { - // special case for default configs - // try to load local config and only if not found try to load global config - if IsDefaultPath(paths) { - conf, err := l.loadConfig(DefaultPath) - if err == nil { // if we could load it then process it - return l.postprocess(conf) - } - if !errors.Is(err, ErrDoesNotExist) { - return nil, err - } - - conf, err = l.loadConfig(GlobalPath()) - if err != nil { - return nil, ErrDoesNotExist - } else { - return l.postprocess(conf) - } - } - - var baseConf *Config - for _, confPath := range paths { - conf, err := l.loadConfig(confPath) - if err != nil { - return nil, err - } - // if first conf just assign as baseConf - if baseConf == nil { - baseConf = conf - continue - } - - l.composeConfig(baseConf, conf) - } - - // if no config was loaded - neither local nor global return an error. - if baseConf == nil { - return nil, ErrDoesNotExist - } - - return l.postprocess(baseConf) -} - -// preprocess does all manipulations to the raw configuration format happens here. -func (l *Loader) preprocess(raw []byte) ([]byte, error) { - return processorRun(raw) -} - -// postprocess does all stateful changes to configuration structures here after it is parsed. -func (l *Loader) postprocess(baseConf *Config) (*Config, error) { - // validate as part of post-processing - err := baseConf.Validate() - if err != nil { - return nil, err - } - - return baseConf, nil -} - -// composeConfig merges multiple configuration files from right to left. -func (l *Loader) composeConfig(baseConf *Config, conf *Config) { - // overwrite base config with the provided one - for _, account := range conf.Accounts { - baseConf.Accounts.AddOrUpdate(account.Name, account) - } - for _, network := range conf.Networks { - baseConf.Networks.AddOrUpdate(network) - } - for _, contract := range conf.Contracts { - baseConf.Contracts.AddOrUpdate(contract) - } - for _, dependency := range conf.Dependencies { - baseConf.Dependencies.AddOrUpdate(dependency) - } - for _, deployment := range conf.Deployments { - baseConf.Deployments.AddOrUpdate(deployment) - } -} - -// loadFile simple file loader. -func (l *Loader) loadFile(path string) ([]byte, error) { - raw, err := l.readerWriter.ReadFile(path) - - if err != nil { - if os.IsNotExist(err) { - return nil, ErrDoesNotExist - } - - return nil, err - } - - return raw, nil -} diff --git a/flowkit/config/loader_test.go b/flowkit/config/loader_test.go deleted file mode 100644 index d77a74e54..000000000 --- a/flowkit/config/loader_test.go +++ /dev/null @@ -1,464 +0,0 @@ -/* -* Flow CLI -* -* Copyright 2019 Dapper Labs, Inc. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. - */ -package config_test - -import ( - "fmt" - "os" - "path/filepath" - "testing" - - "github.com/onflow/flow-cli/flowkit/config" - - "github.com/spf13/afero" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/onflow/flow-cli/flowkit/config/json" -) - -var mockFS = afero.NewMemMapFs() - -var af = afero.Afero{Fs: mockFS} - -func Test_JSONSimple(t *testing.T) { - b := []byte(`{ - "emulators": { - "default": { - "port": 3569, - "serviceAccount": "emulator-account" - } - }, - "contracts": {}, - "networks": { - "emulator": "127.0.0.1:3569" - }, - "accounts": { - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "21c5dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7" - } - }, - "deployments": {} - }`) - - err := afero.WriteFile(mockFS, "test2-flow.json", b, 0644) - - assert.NoError(t, err) - - composer := config.NewLoader(af) - composer.AddConfigParser(json.NewParser()) - conf, loadErr := composer.Load([]string{"test2-flow.json"}) - - assert.NoError(t, loadErr) - assert.Len(t, conf.Accounts, 1) - assert.Equal(t, - "0x21c5dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7", - conf.Accounts[0].Key.PrivateKey.String(), - ) -} - -func Test_ErrorWhenMissingBothDefaultJsonFiles(t *testing.T) { - composer := config.NewLoader(afero.Afero{Fs: mockFS}) - composer.AddConfigParser(json.NewParser()) - - _, loadErr := composer.Load(config.DefaultPaths()) - - assert.Error(t, loadErr) - assert.Contains(t, loadErr.Error(), "missing configuration") -} - -func Test_AllowMissingLocalJson(t *testing.T) { - b := []byte(`{ - "accounts": { - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "21c5dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7" - } - } - }`) - - mockFS := afero.NewMemMapFs() - err := afero.WriteFile(mockFS, config.GlobalPath(), b, 0644) - - assert.NoError(t, err) - - composer := config.NewLoader(afero.Afero{Fs: mockFS}) - composer.AddConfigParser(json.NewParser()) - - conf, loadErr := composer.Load(config.DefaultPaths()) - assert.NoError(t, loadErr) - - acc, err := conf.Accounts.ByName("emulator-account") - assert.NoError(t, err) - - assert.Len(t, conf.Accounts, 1) - assert.Equal(t, - "0x21c5dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7", - acc.Key.PrivateKey.String(), - ) -} - -func Test_PreferLocalJson(t *testing.T) { - b := []byte(`{ - "accounts": { - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "21c5dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7" - } - } - }`) - - b2 := []byte(`{ - "accounts":{ - "emulator-account":{ - "address":"f1d6e0586b0a20c7", - "key":"3335dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7" - } - } - }`) - - mockFS := afero.NewMemMapFs() - err := afero.WriteFile(mockFS, "flow.json", b, 0644) - err2 := afero.WriteFile(mockFS, config.GlobalPath(), b2, 0644) - - assert.NoError(t, err) - assert.NoError(t, err2) - - composer := config.NewLoader(afero.Afero{Fs: mockFS}) - composer.AddConfigParser(json.NewParser()) - - conf, loadErr := composer.Load(config.DefaultPaths()) - assert.NotNil(t, conf) - assert.NoError(t, err) - - acc, err := conf.Accounts.ByName("emulator-account") - assert.NoError(t, err) - - assert.NoError(t, loadErr) - assert.Len(t, conf.Accounts, 1) - assert.Equal(t, "0x21c5dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7", - acc.Key.PrivateKey.String(), - ) -} - -func Test_MissingConfiguration(t *testing.T) { - composer := config.NewLoader(afero.Afero{Fs: mockFS}) - composer.AddConfigParser(json.NewParser()) - - conf, err := composer.Load([]string{"flow.json"}) - - assert.Nil(t, conf) - assert.EqualError(t, err, "missing configuration") -} - -func Test_ConfigurationMalformedJSON(t *testing.T) { - b := []byte(`{ - "emulators": { - "default": { - "port": 3569, - "serviceAccount": "emulator-account", - } - }, - "contracts": {}, - "networks": { - "emulator": "127.0.0.1:3569" - }, - "accounts": { - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "21c5dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7" - } - }, - "deployments": {} - }`) - - mockFS := afero.NewMemMapFs() - err := afero.WriteFile(mockFS, "flow.json", b, 0644) - - assert.NoError(t, err) - - composer := config.NewLoader(afero.Afero{Fs: mockFS}) - composer.AddConfigParser(json.NewParser()) - - conf, err := composer.Load(config.DefaultPaths()) - assert.EqualError(t, err, "failed to preprocess config: failed to parse config JSON: invalid character '}' looking for beginning of object key string") - assert.Nil(t, conf) -} - -func Test_ConfigurationWrongFormat(t *testing.T) { - b := []byte(`{ - "deployments": { - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "21c5dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7" - } - } - }`) - - mockFS := afero.NewMemMapFs() - err := afero.WriteFile(mockFS, "flow.json", b, 0644) - - assert.NoError(t, err) - - composer := config.NewLoader(afero.Afero{Fs: mockFS}) - composer.AddConfigParser(json.NewParser()) - - conf, err := composer.Load(config.DefaultPaths()) - assert.EqualError(t, err, "configuration syntax error: json: cannot unmarshal string into Go struct field jsonConfig.deployments of type []json.deployment") - assert.Nil(t, conf) -} - -func Test_ComposeJSON(t *testing.T) { - b := []byte(`{ - "accounts": { - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "21c5dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7" - } - } - }`) - - b2 := []byte(`{ - "accounts":{ - "admin-account":{ - "address":"f1d6e0586b0a20c7", - "key":"3335dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7" - } - } - }`) - - mockFS := afero.NewMemMapFs() - err := afero.WriteFile(mockFS, "flow.json", b, 0644) - err2 := afero.WriteFile(mockFS, "flow-testnet.json", b2, 0644) - - assert.NoError(t, err) - assert.NoError(t, err2) - - composer := config.NewLoader(afero.Afero{Fs: mockFS}) - composer.AddConfigParser(json.NewParser()) - - conf, loadErr := composer.Load([]string{"flow.json", "flow-testnet.json"}) - - assert.NoError(t, loadErr) - assert.Len(t, conf.Accounts, 2) - - account, err := conf.Accounts.ByName("emulator-account") - assert.NoError(t, err) - - adminAccount, err := conf.Accounts.ByName("admin-account") - assert.NoError(t, err) - - assert.Equal(t, "0x21c5dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7", account.Key.PrivateKey.String()) - assert.NotNil(t, adminAccount) - assert.Equal(t, "0x3335dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7", adminAccount.Key.PrivateKey.String()) -} - -func Test_ComposeCrossReference(t *testing.T) { - b := []byte(`{ - "accounts": { - "test": { - "address":"f1d6e0586b0a20c7", - "key":"3335dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7" - } - }, - "deployments": { - "testnet": { - "test": ["NFT"] - } - } - }`) - - b2 := []byte(`{ - "networks": { - "testnet": "access.devnet.nodes.onflow.org:9000" - }, - "contracts": { "NFT": "./NFT.cdc" } - }`) - - mockFS := afero.NewMemMapFs() - err := afero.WriteFile(mockFS, "flow.json", b, 0644) - err2 := afero.WriteFile(mockFS, "b.json", b2, 0644) - - assert.NoError(t, err) - assert.NoError(t, err2) - - composer := config.NewLoader(afero.Afero{Fs: mockFS}) - composer.AddConfigParser(json.NewParser()) - - conf, loadErr := composer.Load([]string{"flow.json", "b.json"}) - - assert.NoError(t, loadErr) - account, err := conf.Accounts.ByName("test") - assert.NoError(t, err) - assert.NotNil(t, account) - - deployments := conf.Deployments.ByAccountAndNetwork(account.Name, "testnet") - assert.NotNil(t, deployments) -} - -func Test_ComposeJSONOverwrite(t *testing.T) { - b := []byte(`{ - "accounts": { - "admin-account": { - "address": "f8d6e0586b0a20c7", - "key": "21c5dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7" - } - } - }`) - - b2 := []byte(`{ - "accounts":{ - "admin-account":{ - "address":"f1d6e0586b0a20c7", - "key":"3335dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7" - } - } - }`) - - mockFS := afero.NewMemMapFs() - err := afero.WriteFile(mockFS, "flow.json", b, 0644) - err2 := afero.WriteFile(mockFS, "flow-testnet.json", b2, 0644) - - assert.NoError(t, err) - assert.NoError(t, err2) - - composer := config.NewLoader(afero.Afero{Fs: mockFS}) - composer.AddConfigParser(json.NewParser()) - - conf, loadErr := composer.Load([]string{"flow.json", "flow-testnet.json"}) - - assert.NoError(t, loadErr) - account, err := conf.Accounts.ByName("admin-account") - assert.NoError(t, err) - - assert.Len(t, conf.Accounts, 1) - assert.NotNil(t, account) - assert.Equal(t, "0x3335dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7", account.Key.PrivateKey.String()) -} - -func Test_JSONEnv(t *testing.T) { - b := []byte(`{ - "accounts": { - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "$EMULATOR_KEY" - }, - "advanced": { - "address": "f8d6e0586b0a20c7", - "key": { - "type": "hex", - "index": 0, - "signatureAlgorithm": "ECDSA_P256", - "hashAlgorithm": "SHA3_256", - "privateKey": "$ADVANCED_KEY" - } - } - } - }`) - const key1 = "21c5dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7" - const key2 = "11c5dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7" - os.Setenv("EMULATOR_KEY", key1) - os.Setenv("ADVANCED_KEY", key2) - mockFS := afero.NewMemMapFs() - err := afero.WriteFile(mockFS, "test2-flow.json", b, 0644) - require.NoError(t, err) - - t.Run("Load and replace env variable", func(t *testing.T) { - composer := config.NewLoader(afero.Afero{Fs: mockFS}) - composer.AddConfigParser(json.NewParser()) - conf, loadErr := composer.Load([]string{"test2-flow.json"}) - - assert.NoError(t, loadErr) - assert.Equal(t, 2, len(conf.Accounts)) - - acc1, _ := conf.Accounts.ByName("advanced") - assert.Equal(t, fmt.Sprintf("0x%s", key2), acc1.Key.PrivateKey.String()) - - acc2, _ := conf.Accounts.ByName("emulator-account") - assert.Equal(t, fmt.Sprintf("0x%s", key1), acc2.Key.PrivateKey.String()) - }) - - t.Run("Save and remove replaced env variable", func(t *testing.T) { - composer := config.NewLoader(afero.Afero{Fs: mockFS}) - composer.AddConfigParser(json.NewParser()) - conf, err := composer.Load([]string{"test2-flow.json"}) - require.NoError(t, err) - - testConf := "test-flow.json" - err = composer.Save(conf, testConf) - require.NoError(t, err) - - content, err := afero.ReadFile(mockFS, testConf) - require.NoError(t, err) - assert.NotContains(t, string(content), key1) - assert.NotContains(t, string(content), key2) - assert.Contains(t, string(content), "$EMULATOR_KEY") - assert.Contains(t, string(content), "$ADVANCED_KEY") - }) - - t.Run("Fail not present env variable", func(t *testing.T) { - b := []byte(`{ - "accounts": { - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "$NOT_EXISTS" - } - } - }`) - - mockFS := afero.NewMemMapFs() - _ = afero.WriteFile(mockFS, "test.json", b, 0644) - composer := config.NewLoader(afero.Afero{Fs: mockFS}) - composer.AddConfigParser(json.NewParser()) - - _, err = composer.Load([]string{"test.json"}) - assert.EqualError(t, err, "required environment variable NOT_EXISTS not set") - }) - -} - -func Test_LoadAccountFileType(t *testing.T) { - b := []byte(`{ - "accounts": { - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": { - "type": "file", - "location": "./test.pkey" - } - } - } - }`) - mockFS := afero.NewMemMapFs() - err := afero.WriteFile(mockFS, config.GlobalPath(), b, 0644) - - assert.NoError(t, err) - - composer := config.NewLoader(afero.Afero{Fs: mockFS}) - composer.AddConfigParser(json.NewParser()) - - conf, loadErr := composer.Load(config.DefaultPaths()) - require.NoError(t, loadErr) - - acc, err := conf.Accounts.ByName("emulator-account") - assert.NoError(t, err) - - assert.Len(t, conf.Accounts, 1) - assert.Equal(t, filepath.FromSlash("./test.pkey"), acc.Key.Location) -} diff --git a/flowkit/config/network.go b/flowkit/config/network.go deleted file mode 100644 index 658a79f04..000000000 --- a/flowkit/config/network.go +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package config - -import ( - "fmt" -) - -var ( - EmptyNetwork = Network{} - EmulatorNetwork = Network{ - Name: "emulator", - Host: "127.0.0.1:3569", - } - TestingNetwork = Network{ - Name: "testing", - Host: "127.0.0.1:3569", - } - TestnetNetwork = Network{ - Name: "testnet", - Host: "access.devnet.nodes.onflow.org:9000", - } - MainnetNetwork = Network{ - Name: "mainnet", - Host: "access.mainnet.nodes.onflow.org:9000", - } - DefaultNetworks = Networks{ - EmulatorNetwork, - TestingNetwork, - TestnetNetwork, - MainnetNetwork, - } -) - -type Networks []Network - -// Network defines the configuration for a Flow network. -type Network struct { - Name string - Host string - Key string -} - -// ByName get network by name or return an error if not found. -func (n *Networks) ByName(name string) (*Network, error) { - for _, network := range *n { - if network.Name == name { - return &network, nil - } - } - - return nil, fmt.Errorf("network named %s does not exist in configuration", name) -} - -// AddOrUpdate add new network or update if already present. -func (n *Networks) AddOrUpdate(network Network) { - for i, existingNetwork := range *n { - if existingNetwork.Name == network.Name { - (*n)[i] = network - return - } - } - - *n = append(*n, network) -} - -// Remove network by the name. -func (n *Networks) Remove(name string) error { - _, err := n.ByName(name) - if err != nil { - return err - } - - for i, network := range *n { - if network.Name == name { - *n = append((*n)[0:i], (*n)[i+1:]...) // remove item - } - } - - return nil -} diff --git a/flowkit/config/network_test.go b/flowkit/config/network_test.go deleted file mode 100644 index 7cb63bc51..000000000 --- a/flowkit/config/network_test.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -* Flow CLI -* -* Copyright 2019-2020 Dapper Labs, Inc. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. - */ - -package config - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestNetworks_ByName(t *testing.T) { - // Define a sample network configuration. - networks := Networks{ - {Name: "flow-local", Host: "localhost:3569", Key: "flow-local-key"}, - {Name: "flow-testnet", Host: "localhost:3570", Key: "flow-testnet-key"}, - } - - // Test getting an existing network. - network, err := networks.ByName("flow-local") - assert.NoError(t, err) - assert.Equal(t, "flow-local", network.Name) - assert.Equal(t, "localhost:3569", network.Host) - assert.Equal(t, "flow-local-key", network.Key) - - // Test getting a non-existent network. - network, err = networks.ByName("flow-mainnet") - assert.Error(t, err) - assert.Nil(t, network) - assert.EqualError(t, err, "network named flow-mainnet does not exist in configuration") -} - -func TestNetworks_AddOrUpdate(t *testing.T) { - // Define a sample network configuration. - networks := Networks{ - {Name: "flow-local", Host: "localhost:3569", Key: "flow-local-key"}, - } - - // Test adding a new network. - networks.AddOrUpdate(Network{Name: "flow-testnet", Host: "localhost:3570", Key: "flow-testnet-key"}) - assert.Equal(t, 2, len(networks)) - - // Test updating an existing network. - networks.AddOrUpdate(Network{Name: "flow-local", Host: "localhost:3580", Key: "flow-local-key-updated"}) - assert.Equal(t, "localhost:3580", networks[0].Host) -} - -func TestNetworks_Remove(t *testing.T) { - // Define a sample network configuration. - networks := Networks{ - {Name: "flow-local", Host: "localhost:3569", Key: "flow-local-key"}, - {Name: "flow-testnet", Host: "localhost:3570", Key: "flow-testnet-key"}, - } - - // Test removing an existing network. - err := networks.Remove("flow-local") - assert.NoError(t, err) - assert.Equal(t, 1, len(networks)) - - // Test removing a non-existent network. - err = networks.Remove("flow-mainnet") - assert.Error(t, err) - assert.EqualError(t, err, "network named flow-mainnet does not exist in configuration") -} diff --git a/flowkit/config/processor.go b/flowkit/config/processor.go deleted file mode 100644 index 883bafade..000000000 --- a/flowkit/config/processor.go +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package config - -import ( - "encoding/json" - "fmt" -) - -// processorRun all pre-processors. -func processorRun(raw []byte) ([]byte, error) { - type config struct { - Accounts map[string]map[string]any `json:"accounts,omitempty"` - Contracts any `json:"contracts,omitempty"` - Dependencies any `json:"dependencies,omitempty"` - Networks any `json:"networks,omitempty"` - Deployments any `json:"deployments,omitempty"` - Emulators any `json:"emulators,omitempty"` - } - - var conf config - err := json.Unmarshal(raw, &conf) - if err != nil { - return nil, fmt.Errorf("failed to parse config JSON: %w", err) - } - - raw, err = json.Marshal(conf) - if err != nil { - return nil, fmt.Errorf("failed to marshal config: %w", err) - } - - return raw, nil -} diff --git a/flowkit/config/processor_test.go b/flowkit/config/processor_test.go deleted file mode 100644 index a524558a1..000000000 --- a/flowkit/config/processor_test.go +++ /dev/null @@ -1,71 +0,0 @@ -/* -* Flow CLI -* -* Copyright 2019-2020 Dapper Labs, Inc. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. - */ - -package config - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func Test_PrivateConfigFileAccounts(t *testing.T) { - b := []byte(`{ - "emulators": { - "default": { - "port": 3569, - "serviceAccount": "emulator-account" - } - }, - "contracts": {}, - "networks": { - "emulator": "127.0.0.1:3569" - }, - "deployments": {}, - "accounts": { - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "11c5dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7" - } - } - }`) - - processorRunRes, err := processorRun(b) - require.NoError(t, err) - - assert.JSONEq(t, `{ - "emulators": { - "default": { - "port": 3569, - "serviceAccount": "emulator-account" - } - }, - "contracts": {}, - "networks": { - "emulator": "127.0.0.1:3569" - }, - "deployments": {}, - "accounts": { - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "11c5dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7" - } - } - }`, string(processorRunRes)) -} diff --git a/flowkit/events.go b/flowkit/events.go deleted file mode 100644 index 7cf6e7679..000000000 --- a/flowkit/events.go +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package flowkit - -import ( - "github.com/onflow/cadence" - "github.com/onflow/flow-go-sdk" -) - -type Event struct { - Type string - Values map[string]cadence.Value -} - -func (e *Event) GetAddress() *flow.Address { - if a, ok := e.Values["address"].(cadence.Address); ok { - address := flow.HexToAddress(a.String()) - return &address - } - - return nil -} - -type Events []Event - -func EventsFromTransaction(tx *flow.TransactionResult) Events { - var events Events - for _, event := range tx.Events { - events = append(events, NewEvent(event)) - } - - return events -} - -func NewEvent(event flow.Event) Event { - var names []string - - for _, eventType := range event.Value.EventType.Fields { - names = append(names, eventType.Identifier) - } - values := make(map[string]cadence.Value) - for id, field := range event.Value.Fields { - values[names[id]] = field - } - - return Event{ - Type: event.Type, - Values: values, - } -} - -func (e *Events) GetCreatedAddresses() []*flow.Address { - addresses := make([]*flow.Address, 0) - for _, event := range *e { - if event.Type == flow.EventAccountCreated { - addresses = append(addresses, event.GetAddress()) - } - } - - return addresses -} diff --git a/flowkit/events_test.go b/flowkit/events_test.go deleted file mode 100644 index 2d6bb6233..000000000 --- a/flowkit/events_test.go +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package flowkit_test - -import ( - "testing" - - "github.com/onflow/cadence" - "github.com/onflow/flow-go-sdk" - "github.com/stretchr/testify/assert" - - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/tests" -) - -func Test_AccountCreatedEvent(t *testing.T) { - address := flow.HexToAddress("00c4fef62310c807") - flowEvent := tests.NewEvent(0, - flow.EventAccountCreated, - []cadence.Field{{ - Identifier: "address", - Type: cadence.AddressType, - }}, - []cadence.Value{cadence.NewAddress(address)}, - ) - tx := tests.NewTransactionResult([]flow.Event{*flowEvent}) - events := flowkit.EventsFromTransaction(tx) - - assert.Len(t, events.GetCreatedAddresses(), 1) - assert.Equal(t, address, *events.GetCreatedAddresses()[0]) - - assert.Len(t, events, 1) - assert.Equal(t, address, *events[0].GetAddress()) - assert.Equal(t, `flow.AccountCreated(address: 0x00c4fef62310c807)`, flowEvent.Value.String()) -} - -func TestAddress(t *testing.T) { - address := flow.HexToAddress("cdfef0f4f0786e9") - assert.Equal(t, "0cdfef0f4f0786e9", address.String()) -} diff --git a/flowkit/flowkit.go b/flowkit/flowkit.go deleted file mode 100644 index b2e21ddd7..000000000 --- a/flowkit/flowkit.go +++ /dev/null @@ -1,1057 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package flowkit - -import ( - "bytes" - "context" - "crypto/rand" - "fmt" - "strconv" - "strings" - "sync" - - "github.com/btcsuite/btcd/chaincfg/chainhash" - goeth "github.com/ethereum/go-ethereum/accounts" - "github.com/lmars/go-slip10" - "github.com/onflow/cadence" - "github.com/onflow/flow-go-sdk" - "github.com/onflow/flow-go-sdk/access/grpc" - "github.com/onflow/flow-go-sdk/crypto" - "github.com/pkg/errors" - "github.com/tyler-smith/go-bip39" - "golang.org/x/exp/maps" - "golang.org/x/exp/slices" - - "github.com/onflow/flow-cli/flowkit/accounts" - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/gateway" - "github.com/onflow/flow-cli/flowkit/output" - "github.com/onflow/flow-cli/flowkit/project" - "github.com/onflow/flow-cli/flowkit/transactions" -) - -// BlockQuery defines possible queries for block. -type BlockQuery struct { - ID *flow.Identifier - Height uint64 - Latest bool -} - -// LatestBlockQuery specifies the latest block. -var LatestBlockQuery = BlockQuery{Latest: true} - -// NewBlockQuery creates block query based on the passed query value. -// -// Query string options: -// - "latest" : return the latest block -// - height (e.g. 123456789) : return block at this height -// - ID : return block with this ID -// if none of the valid values are passed an error is returned. -func NewBlockQuery(query string) (BlockQuery, error) { - if query == "latest" { - return LatestBlockQuery, nil - } - if height, ce := strconv.ParseUint(query, 10, 64); ce == nil { - return BlockQuery{Height: height}, nil - } - if id := flow.HexToID(query); id != flow.EmptyID { - return BlockQuery{ID: &id}, nil - } - - return BlockQuery{}, fmt.Errorf("invalid query: %s, valid are: \"latest\", block height or block ID", query) -} - -// ScriptQuery defines block ID or height at which we should execute the script. -type ScriptQuery struct { - Latest bool - ID flow.Identifier - Height uint64 -} - -// LatestScriptQuery specifies the latest block at which query is executed. -var LatestScriptQuery = ScriptQuery{Latest: true} - -// EventWorker defines how many workers do we want to start, each in its own subroutine, and how many blocks -// each worker fetches from the network. This is used to process the event requests concurrently. -type EventWorker struct { - Count int - BlocksPerWorker uint64 -} - -var _ Services = &Flowkit{} - -func NewFlowkit( - state *State, - network config.Network, - gateway gateway.Gateway, - logger output.Logger, -) *Flowkit { - return &Flowkit{state, network, gateway, logger} -} - -type Flowkit struct { - state *State - network config.Network - gateway gateway.Gateway - logger output.Logger -} - -func (f *Flowkit) Network() config.Network { - return f.network -} - -func (f *Flowkit) Gateway() gateway.Gateway { - return f.gateway -} - -func (f *Flowkit) SetLogger(logger output.Logger) { - f.logger = logger -} - -func (f *Flowkit) State() (*State, error) { - if f.state == nil { - return nil, config.ErrDoesNotExist - } - return f.state, nil -} - -func (f *Flowkit) Ping() error { - return f.gateway.Ping() -} - -// GetAccount fetches account on the Flow network. -func (f *Flowkit) GetAccount(_ context.Context, address flow.Address) (*flow.Account, error) { - return f.gateway.GetAccount(address) -} - -// CreateAccount on the Flow network with the provided keys and using the signer for creation transaction. -// Returns the newly created account as well as the ID of the transaction that created the account. -// -// Keys is a slice but only one can be passed as well. If the transaction fails or there are other issues an error is returned. -func (f *Flowkit) CreateAccount( - _ context.Context, - signer *accounts.Account, - keys []accounts.PublicKey, -) (*flow.Account, flow.Identifier, error) { - var accKeys []*flow.AccountKey - for _, k := range keys { - if k.Weight == 0 { // if key weight is not specified - k.Weight = flow.AccountKeyWeightThreshold - } - - accKey := &flow.AccountKey{ - PublicKey: k.Public, - SigAlgo: k.SigAlgo, - HashAlgo: k.HashAlgo, - Weight: k.Weight, - } - - err := accKey.Validate() - if err != nil { - return nil, flow.EmptyID, fmt.Errorf("invalid account key: %w", err) - } - - accKeys = append(accKeys, accKey) - } - - tx, err := transactions.NewCreateAccount(signer, accKeys, nil) - if err != nil { - return nil, flow.EmptyID, err - } - - tx, err = f.prepareTransaction(tx, signer) - if err != nil { - return nil, flow.EmptyID, err - } - - f.logger.Info(fmt.Sprintf("Transaction ID: %s", tx.FlowTransaction().ID())) - f.logger.StartProgress("Creating account...") - defer f.logger.StopProgress() - - sentTx, err := f.gateway.SendSignedTransaction(tx.FlowTransaction()) - if err != nil { - return nil, flow.EmptyID, errors.Wrap(err, "account creation transaction failed") - } - - f.logger.StartProgress("Waiting for transaction to be sealed...") - defer f.logger.StopProgress() - - result, err := f.gateway.GetTransactionResult(sentTx.ID(), true) - if err != nil { - return nil, flow.EmptyID, err - } - - if result.Error != nil { - return nil, flow.EmptyID, result.Error - } - - events := EventsFromTransaction(result) - newAccountAddress := events.GetCreatedAddresses() - if len(newAccountAddress) == 0 { - return nil, flow.EmptyID, fmt.Errorf("new account address couldn't be fetched") - } - - account, err := f.gateway.GetAccount(*newAccountAddress[0]) // we know it's the only and first event - if err != nil { - return nil, flow.EmptyID, err - } - - return account, sentTx.ID(), nil -} - -// prepareTransaction prepares transaction for sending with data from network -func (f *Flowkit) prepareTransaction( - tx *transactions.Transaction, - account *accounts.Account, -) (*transactions.Transaction, error) { - block, err := f.gateway.GetLatestBlock() - if err != nil { - return nil, err - } - - proposer, err := f.gateway.GetAccount(account.Address) - if err != nil { - return nil, err - } - - tx.SetBlockReference(block) - if err = tx.SetProposer(proposer, account.Key.Index()); err != nil { - return nil, err - } - - tx, err = tx.Sign() - if err != nil { - return nil, err - } - - return tx, nil -} - -var errUpdateNoDiff = errors.New("contract already exists and is the same as the contract provided for update") - -type UpdateContract func(existing []byte, new []byte) bool - -func UpdateExistingContract(updateExisting bool) UpdateContract { - return func(existing []byte, new []byte) bool { - return updateExisting - } -} - -// AddContract to the Flow account provided and return the transaction ID. -// -// If the contract already exists on the account the operation will fail and error will be returned. -// Use UpdateExistingContract(bool) to define whether a contract should be updated or not, or you can also -// define a custom UpdateContract function which returns bool indicating whether a contract should be updated or not. -func (f *Flowkit) AddContract( - ctx context.Context, - account *accounts.Account, - contract Script, - update UpdateContract, -) (flow.Identifier, bool, error) { - state, err := f.State() - if err != nil { - return flow.EmptyID, false, err - } - - program, err := project.NewProgram(contract.Code, contract.Args, contract.Location) - if err != nil { - return flow.EmptyID, false, err - } - - if program.HasImports() { - contracts, err := state.DeploymentContractsByNetwork(f.network) - if err != nil { - return flow.EmptyID, false, err - } - - importReplacer := project.NewImportReplacer( - contracts, - state.AliasesForNetwork(f.network), - ) - - program, err = importReplacer.Replace(program) - if err != nil { - return flow.EmptyID, false, err - } - } - - name, err := program.Name() - if err != nil { - return flow.EmptyID, false, err - } - - tx, err := transactions.NewAddAccountContract( - account, - name, - program.Code(), - contract.Args, - ) - if err != nil { - return flow.EmptyID, false, err - } - - f.logger.StartProgress(fmt.Sprintf("Checking contract '%s' on account '%s'...", name, account.Address)) - defer f.logger.StopProgress() - - // check if contract exists on account - flowAccount, err := f.gateway.GetAccount(account.Address) - if err != nil { - return flow.EmptyID, false, err - } - existingContract, exists := flowAccount.Contracts[name] - noDiffInContract := bytes.Equal(program.Code(), existingContract) - - if exists && noDiffInContract { - return flow.EmptyID, false, errUpdateNoDiff - } - - updateExisting := update(existingContract, program.Code()) - if exists && !updateExisting { - return flow.EmptyID, false, fmt.Errorf(fmt.Sprintf("contract %s exists in account %s", name, account.Name)) - } - - if exists && updateExisting { - tx, err = transactions.NewUpdateAccountContract(account, name, program.Code()) - if err != nil { - return flow.EmptyID, false, err - } - } - - tx, err = f.prepareTransaction(tx, account) - if err != nil { - return flow.EmptyID, false, err - } - - // send transaction with contract - sentTx, err := f.gateway.SendSignedTransaction(tx.FlowTransaction()) - if err != nil { - return tx.FlowTransaction().ID(), false, fmt.Errorf("failed to send transaction to deploy a contract: %w", err) - } - - if exists { - f.logger.StartProgress(fmt.Sprintf("Contract '%s' updating on the account '%s'.", name, account.Address)) - } else { - f.logger.StartProgress(fmt.Sprintf("Contract '%s' deploying on the account '%s'.", name, account.Address)) - } - - // we wait for transaction to be sealed - trx, err := f.gateway.GetTransactionResult(sentTx.ID(), true) - if err != nil { - return tx.FlowTransaction().ID(), false, err - } - if trx.Error != nil { - return tx.FlowTransaction().ID(), false, trx.Error - } - - d := state.Deployments().ByAccountAndNetwork(account.Name, f.network.Name) - cd := config.ContractDeployment{ - Name: name, - Args: contract.Args, - } - if d != nil { - d.AddContract(cd) - } else { - deployment := config.Deployment{ - Network: f.network.Name, - Account: account.Name, - Contracts: []config.ContractDeployment{cd}, - } - state.Deployments().AddOrUpdate(deployment) - } - - // don't add contract if it already exists because it might overwrite existing data - if c, _ := state.Contracts().ByName(name); c == nil { - state.Contracts().AddOrUpdate(config.Contract{ - Name: name, - Location: contract.Location, - }) - } - - return sentTx.ID(), updateExisting, err -} - -// RemoveContract from the provided account by its name. -// -// If removal is successful transaction ID is returned. -func (f *Flowkit) RemoveContract( - _ context.Context, - account *accounts.Account, - contractName string, -) (flow.Identifier, error) { - // check if contracts exists on the account - flowAcc, err := f.gateway.GetAccount(account.Address) - if err != nil { - return flow.EmptyID, err - } - - existingContracts := maps.Keys(flowAcc.Contracts) - if !slices.Contains(existingContracts, contractName) { - return flow.EmptyID, fmt.Errorf( - "can not remove a non-existing contract named '%s'. Account only contains the contracts: %v", - contractName, - strings.Join(existingContracts, ", "), - ) - } - - tx, err := transactions.NewRemoveAccountContract(account, contractName) - if err != nil { - return flow.EmptyID, err - } - - tx, err = f.prepareTransaction(tx, account) - if err != nil { - return flow.EmptyID, err - } - - f.logger.StartProgress( - fmt.Sprintf("Removing Contract %s from %s...", contractName, account.Address), - ) - defer f.logger.StopProgress() - - sentTx, err := f.gateway.SendSignedTransaction(tx.FlowTransaction()) - if err != nil { - return flow.EmptyID, err - } - - txr, err := f.gateway.GetTransactionResult(sentTx.ID(), true) - if err != nil { - return flow.EmptyID, err - } - if txr != nil && txr.Error != nil { - return flow.EmptyID, txr.Error - } - - f.logger.StopProgress() - - return sentTx.ID(), nil -} - -// GetBlock by the query from Flow blockchain. Query can define a block by ID, block by height or require the latest block. -func (f *Flowkit) GetBlock(_ context.Context, query BlockQuery) (*flow.Block, error) { - var err error - var block *flow.Block - if query.Latest { - block, err = f.gateway.GetLatestBlock() - } else if query.ID != nil { - block, err = f.gateway.GetBlockByID(*query.ID) - } else { - block, err = f.gateway.GetBlockByHeight(query.Height) - } - - if err != nil { - return nil, fmt.Errorf("error fetching block: %s", err.Error()) - } - - if block == nil { - return nil, fmt.Errorf("block not found") - } - - return block, err -} - -// GetCollection by the ID from Flow network. -func (f *Flowkit) GetCollection(_ context.Context, ID flow.Identifier) (*flow.Collection, error) { - return f.gateway.GetCollection(ID) -} - -// GetEvents from Flow network by their event name in the specified height interval defined by start and end inclusive. -// Optional worker defines parameters for how many concurrent workers do we want to fetch our events, -// and how many blocks between the provided interval each worker fetches. -// -// Providing worker value will produce faster response as the interval will be scanned concurrently. This parameter is optional, -// if not provided only a single worker will be used. -func (f *Flowkit) GetEvents( - _ context.Context, - names []string, - startHeight uint64, - endHeight uint64, - worker *EventWorker, -) ([]flow.BlockEvents, error) { - if endHeight < startHeight { - return nil, fmt.Errorf("cannot have end height (%d) of block range less that start height (%d)", endHeight, startHeight) - } - - if worker == nil { // if no worker is passed, create a default one - worker = &EventWorker{ - Count: 1, - BlocksPerWorker: 250, - } - } - - queries := makeEventQueries(names, startHeight, endHeight, worker.BlocksPerWorker) - - jobChan := make(chan grpc.EventRangeQuery, worker.Count) - results := make(chan eventWorkerResult) - - var wg sync.WaitGroup - - for i := 0; i < worker.Count; i++ { - wg.Add(1) - go func() { - defer wg.Done() - f.eventWorker(jobChan, results) - }() - } - - // wait on the workers to finish and close the result channel - // to signal downstream that all work is done - go func() { - defer close(results) - wg.Wait() - }() - - go func() { - defer close(jobChan) - for _, query := range queries { - jobChan <- query - } - }() - - var resultEvents []flow.BlockEvents - for eventResult := range results { - if eventResult.err != nil { - return nil, eventResult.err - } - - resultEvents = append(resultEvents, eventResult.events...) - } - - return resultEvents, nil -} - -func (f *Flowkit) eventWorker(jobChan <-chan grpc.EventRangeQuery, results chan<- eventWorkerResult) { - for q := range jobChan { - blockEvents, err := f.gateway.GetEvents(q.Type, q.StartHeight, q.EndHeight) - if err != nil { - results <- eventWorkerResult{nil, err} - } - results <- eventWorkerResult{blockEvents, nil} - } -} - -type eventWorkerResult struct { - events []flow.BlockEvents - err error -} - -func makeEventQueries( - events []string, - startHeight uint64, - endHeight uint64, - blockCount uint64, -) []grpc.EventRangeQuery { - var queries []grpc.EventRangeQuery - for startHeight <= endHeight { - suggestedEndHeight := startHeight + blockCount - 1 // since we are inclusive - end := endHeight - if suggestedEndHeight < endHeight { - end = suggestedEndHeight - } - for _, event := range events { - queries = append(queries, grpc.EventRangeQuery{ - Type: event, - StartHeight: startHeight, - EndHeight: end, - }) - } - startHeight = suggestedEndHeight + 1 - } - return queries -} - -// GenerateKey using the signature algorithm and optional seed. If seed is not provided a random safe seed will be generated. -func (f *Flowkit) GenerateKey( - _ context.Context, - sigAlgo crypto.SignatureAlgorithm, - inputSeed string, -) (crypto.PrivateKey, error) { - seed := []byte(inputSeed) - - if inputSeed == "" { - seed = make([]byte, crypto.MinSeedLength) - _, err := rand.Read(seed) - if err != nil { - return nil, fmt.Errorf("failed to generate random seed: %v", err) - } - } - - privateKey, err := crypto.GeneratePrivateKey(sigAlgo, seed) - if err != nil { - return nil, fmt.Errorf("failed to generate private key: %w", err) - } - - return privateKey, nil -} - -// GenerateMnemonicKey will generate a new key with the signature algorithm and optional derivation path. -// -// If the derivation path is not provided a default "m/44'/539'/0'/0/0" will be used. -func (f *Flowkit) GenerateMnemonicKey( - _ context.Context, - sigAlgo crypto.SignatureAlgorithm, - derivationPath string, -) (crypto.PrivateKey, string, error) { - entropy, err := bip39.NewEntropy(128) - if err != nil { - return nil, "", err - } - mnemonic, err := bip39.NewMnemonic(entropy) - if err != nil { - return nil, "", err - } - - if !bip39.IsMnemonicValid(mnemonic) { - return nil, "", fmt.Errorf("invalid mnemonic") - } - - seed := bip39.NewSeed(mnemonic, "") - - key, err := f.derivePrivateKeyFromSeed(seed, sigAlgo, derivationPath) - if err != nil { - return nil, "", err - } - - return key, mnemonic, nil -} - -func (f *Flowkit) DerivePrivateKeyFromMnemonic( - _ context.Context, - mnemonic string, - sigAlgo crypto.SignatureAlgorithm, - derivationPath string, -) (crypto.PrivateKey, error) { - if !bip39.IsMnemonicValid(mnemonic) { - return nil, fmt.Errorf("invalid mnemonic") - } - - seed := bip39.NewSeed(mnemonic, "") - - return f.derivePrivateKeyFromSeed(seed, sigAlgo, derivationPath) -} - -func (f *Flowkit) derivePrivateKeyFromSeed( - seed []byte, - sigAlgo crypto.SignatureAlgorithm, - derivationPath string, -) (crypto.PrivateKey, error) { - // sanity check of seed length - if len(seed) < 16 { - return nil, fmt.Errorf("seed length should be at least 16 bytes, got %d", len(seed)) - } - - if derivationPath == "" { - derivationPath = "m/44'/539'/0'/0/0" - } - - path, err := goeth.ParseDerivationPath(derivationPath) - if err != nil { - return nil, fmt.Errorf("invalid derivation path") - } - - curve := slip10.CurveBitcoin // case ECDSA_secp256k1 - if sigAlgo == crypto.ECDSA_P256 { - curve = slip10.CurveP256 - } else if sigAlgo != crypto.ECDSA_secp256k1 { - return nil, fmt.Errorf("invalid signature algorithm") - } - - accountKey, err := slip10.NewMasterKeyWithCurve(seed, curve) - if err != nil { - return nil, err - } - - for _, n := range path { - accountKey, err = accountKey.NewChildKey(n) - - if err != nil { - return nil, err - } - } - privateKey, err := crypto.DecodePrivateKey(sigAlgo, accountKey.Key) - if err != nil { - return nil, err - } - return privateKey, nil -} - -// DeployProject contracts to the Flow network or update if already exists and UpdateContracts returns true. -// -// Retrieve all the contracts for specified network, sort them for deployment deploy one by one and replace -// the imports in the contract source, so it corresponds to the account name the contract was deployed to. -// If contracts already exist use UpdateExistingContract(bool) to define whether a contract should be updated or not. -func (f *Flowkit) DeployProject(ctx context.Context, update UpdateContract) ([]*project.Contract, error) { - state, err := f.State() - if err != nil { - return nil, err - } - - contracts, err := state.DeploymentContractsByNetwork(f.network) - if err != nil { - return nil, err - } - - deployment, err := project.NewDeployment(contracts, state.AliasesForNetwork(f.network)) - if err != nil { - return nil, err - } - - sorted, err := deployment.Sort() - if err != nil { - return nil, err - } - - f.logger.Info(fmt.Sprintf( - "\nDeploying %d contracts for accounts: %s\n", - len(sorted), - state.AccountsForNetwork(f.network).String(), - )) - defer f.logger.StopProgress() - - deployErr := &ProjectDeploymentError{} - for _, contract := range sorted { - targetAccount, err := state.Accounts().ByName(contract.AccountName) - if err != nil { - return nil, fmt.Errorf("target account for deploying contract not found in configuration") - } - - txID, updated, err := f.AddContract( - ctx, - targetAccount, - Script{Code: contract.Code(), Args: contract.Args, Location: contract.Location()}, - update, - ) - if err != nil && errors.Is(err, errUpdateNoDiff) { - f.logger.Info(fmt.Sprintf( - "%s -> 0x%s [skipping, no changes found]", - output.Italic(contract.Name), - contract.AccountAddress.String(), - )) - continue - } else if err != nil { - deployErr.add(contract, err, fmt.Sprintf("failed to deploy contract %s", contract.Name)) - continue - } - - f.logger.Info(fmt.Sprintf( - "%s -> 0x%s (%s) %s", - output.Green(contract.Name), - contract.AccountAddress, - txID.String(), - map[bool]string{true: "[updated]", false: ""}[updated], - )) - } - - if len(deployErr.contracts) > 0 { - return nil, deployErr - } - - f.logger.Info(fmt.Sprintf("\n%s All contracts deployed successfully", output.SuccessEmoji())) - return sorted, nil -} - -type ProjectDeploymentError struct { - contracts map[string]error -} - -func (d *ProjectDeploymentError) add(contract *project.Contract, err error, msg string) { - if d.contracts == nil { - d.contracts = make(map[string]error) - } - d.contracts[contract.Name] = fmt.Errorf("%s: %w", msg, err) -} - -func (d *ProjectDeploymentError) Contracts() map[string]error { - return d.contracts -} - -func (d *ProjectDeploymentError) Error() string { - err := "" - for c, e := range d.contracts { - err = fmt.Sprintf("%s %s: %s,", err, c, e.Error()) - } - return err -} - -// Script includes Cadence code and optional arguments and filename. -// -// Filename is only required to be passed if the code has imports you want to resolve. -type Script struct { - Code []byte - Args []cadence.Value - Location string -} - -// ExecuteScript on the Flow network and return the Cadence value as a result. The script is executed at the -// block provided as part of the ScriptQuery value. -func (f *Flowkit) ExecuteScript(_ context.Context, script Script, query ScriptQuery) (cadence.Value, error) { - state, err := f.State() - if err != nil { - return nil, err - } - - program, err := project.NewProgram(script.Code, script.Args, script.Location) - if err != nil { - return nil, err - } - - if program.HasImports() { - contracts, err := state.DeploymentContractsByNetwork(f.network) - if err != nil { - return nil, err - } - - importReplacer := project.NewImportReplacer( - contracts, - state.AliasesForNetwork(f.network), - ) - - if state == nil { - return nil, config.ErrDoesNotExist - } - if f.network == config.EmptyNetwork { - return nil, fmt.Errorf("missing network, specify which network to use to resolve imports in script code") - } - if script.Location == "" { - return nil, fmt.Errorf("resolving imports in scripts not supported") - } - - program, err = importReplacer.Replace(program) - if err != nil { - return nil, err - } - } - - if query.Latest { - return f.gateway.ExecuteScript(program.Code(), script.Args) - } else if query.ID != flow.EmptyID { - return f.gateway.ExecuteScriptAtID(program.Code(), script.Args, query.ID) - } else { - return f.gateway.ExecuteScriptAtHeight(program.Code(), script.Args, query.Height) - } -} - -// GetTransactionByID from the Flow network including the transaction result. Using the waitSeal we can wait for the transaction to be sealed. -func (f *Flowkit) GetTransactionByID( - _ context.Context, - ID flow.Identifier, - waitSeal bool, -) (*flow.Transaction, *flow.TransactionResult, error) { - f.logger.StartProgress("Fetching Transaction...") - defer f.logger.StopProgress() - - tx, err := f.gateway.GetTransaction(ID) - if err != nil { - return nil, nil, err - } - - if waitSeal { - f.logger.StartProgress("Waiting for transaction to be sealed...") - defer f.logger.StopProgress() - } - - result, err := f.gateway.GetTransactionResult(ID, waitSeal) - return tx, result, err -} - -func (f *Flowkit) GetTransactionsByBlockID( - _ context.Context, - blockID flow.Identifier, -) ([]*flow.Transaction, []*flow.TransactionResult, error) { - tx, err := f.gateway.GetTransactionsByBlockID(blockID) - if err != nil { - return nil, nil, err - } - - txRes, err := f.gateway.GetTransactionResultsByBlockID(blockID) - if err != nil { - return nil, nil, err - } - return tx, txRes, nil -} - -// BuildTransaction builds a new transaction type for later signing and submitting to the network. -// -// AddressesRoles type defines the address for each role (payer, proposer, authorizers) and the script defines the transaction content. -func (f *Flowkit) BuildTransaction( - _ context.Context, - addresses transactions.AddressesRoles, - proposerKeyIndex int, - script Script, - gasLimit uint64, -) (*transactions.Transaction, error) { - state, err := f.State() - if err != nil { - return nil, err - } - - latestBlock, err := f.gateway.GetLatestBlock() - if err != nil { - return nil, fmt.Errorf("failed to get latest sealed block: %w", err) - } - - proposerAccount, err := f.gateway.GetAccount(addresses.Proposer) - if err != nil { - return nil, err - } - - tx := transactions.New(). - SetPayer(addresses.Payer). - SetComputeLimit(gasLimit). - SetBlockReference(latestBlock) - - program, err := project.NewProgram(script.Code, script.Args, script.Location) - if err != nil { - return nil, err - } - - if program.HasImports() { - if f.network == config.EmptyNetwork { - return nil, fmt.Errorf("missing network, specify which network to use to resolve imports in transaction code") - } - if script.Location == "" { // when used as lib with code we don't support imports - return nil, fmt.Errorf("resolving imports in transactions not supported") - } - - contracts, err := state.DeploymentContractsByNetwork(f.network) - if err != nil { - return nil, err - } - - importReplacer := project.NewImportReplacer( - contracts, - state.AliasesForNetwork(f.network), - ) - - program, err = importReplacer.Replace(program) - if err != nil { - return nil, fmt.Errorf("error resolving imports: %w", err) - } - } - - if err := tx.SetProposer(proposerAccount, proposerKeyIndex); err != nil { - return nil, err - } - - if err := tx.SetScriptWithArgs(program.Code(), script.Args); err != nil { - return nil, err - } - - tx, err = tx.AddAuthorizers(addresses.Authorizers) - if err != nil { - return nil, err - } - - return tx, nil -} - -// SignTransactionPayload will use the signer account provided and the payload raw byte content to sign it. -// -// The payload should be RLP encoded transaction payload and is suggested to be used in pair with BuildTransaction function. -func (f *Flowkit) SignTransactionPayload( - _ context.Context, - signer *accounts.Account, - payload []byte, -) (*transactions.Transaction, error) { - tx, err := transactions.NewFromPayload(payload) - if err != nil { - return nil, err - } - - err = tx.SetSigner(signer) - if err != nil { - return nil, err - } - - return tx.Sign() -} - -// SendSignedTransaction will send a prebuilt and signed transaction to the Flow network. -// -// You can build the transaction using the BuildTransaction method and then sign it using the SignTranscation method. -func (f *Flowkit) SendSignedTransaction( - _ context.Context, - tx *transactions.Transaction, -) (*flow.Transaction, *flow.TransactionResult, error) { - sentTx, err := f.gateway.SendSignedTransaction(tx.FlowTransaction()) - if err != nil { - return nil, nil, err - } - - res, err := f.gateway.GetTransactionResult(sentTx.ID(), true) - if err != nil { - return nil, nil, err - } - - return sentTx, res, nil -} - -// SendTransaction will build and send a transaction to the Flow network, using the accounts provided for each role and -// contain the script. Transaction as well as transaction result will be returned in case the transaction is successfully submitted. -func (f *Flowkit) SendTransaction( - ctx context.Context, - accounts transactions.AccountRoles, - script Script, - gasLimit uint64, -) (*flow.Transaction, *flow.TransactionResult, error) { - tx, err := f.BuildTransaction( - ctx, - accounts.AddressRoles(), - accounts.Proposer.Key.Index(), - script, - gasLimit, - ) - if err != nil { - return nil, nil, err - } - - for _, signer := range accounts.Signers() { - err = tx.SetSigner(signer) - if err != nil { - return nil, nil, err - } - - tx, err = tx.Sign() - if err != nil { - return nil, nil, err - } - } - - f.logger.Info(fmt.Sprintf("Transaction ID: %s", tx.FlowTransaction().ID())) - f.logger.StartProgress("Sending transaction...") - defer f.logger.StopProgress() - - sentTx, err := f.gateway.SendSignedTransaction(tx.FlowTransaction()) - if err != nil { - return nil, nil, err - } - - f.logger.StopProgress() - f.logger.StartProgress("Waiting for transaction to be sealed...") - defer f.logger.StopProgress() - - res, err := f.gateway.GetTransactionResult(sentTx.ID(), true) - - return sentTx, res, err -} - -// this is added to resolve the issue with chainhash ambiguous import, -// the code is not used, but it's needed to force go.mod specify and retain chainhash version -// workaround for issue: https://github.com/golang/go/issues/27899 -var _ = chainhash.Hash{} diff --git a/flowkit/flowkit_test.go b/flowkit/flowkit_test.go deleted file mode 100644 index 2f5c160a0..000000000 --- a/flowkit/flowkit_test.go +++ /dev/null @@ -1,2086 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package flowkit - -import ( - "context" - "encoding/hex" - "errors" - "fmt" - "strings" - "testing" - - "github.com/onflow/flow-cli/flowkit/accounts" - "github.com/onflow/flow-cli/flowkit/transactions" - - "github.com/onflow/cadence" - jsoncdc "github.com/onflow/cadence/encoding/json" - "github.com/onflow/flow-emulator/emulator" - "github.com/onflow/flow-go-sdk" - "github.com/onflow/flow-go-sdk/access/grpc" - "github.com/onflow/flow-go-sdk/crypto" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/gateway" - "github.com/onflow/flow-cli/flowkit/gateway/mocks" - "github.com/onflow/flow-cli/flowkit/output" - "github.com/onflow/flow-cli/flowkit/project" - "github.com/onflow/flow-cli/flowkit/tests" -) - -func Alice() *accounts.Account { - return newAccount("Alice", "0x1", "seedseedseedseedseedseedseedseedseedseedseedseedAlice") -} - -func Bob() *accounts.Account { - return newAccount("Bob", "0x2", "seedseedseedseedseedseedseedseedseedseedseedseedBob") -} - -func Charlie() *accounts.Account { - return newAccount("Charlie", "0x3", "seedseedseedseedseedseedseedseedseedseedseedseedCharlie") -} - -func Donald() *accounts.Account { - return newAccount("Donald", "0x3", "seedseedseedseedseedseedseedseedseedseedseedseedDonald") -} - -func newAccount(name string, address string, seed string) *accounts.Account { - privateKey, _ := crypto.GeneratePrivateKey(crypto.ECDSA_P256, []byte(seed)) - - return &accounts.Account{ - Name: name, - Address: flow.HexToAddress(address), - Key: accounts.NewHexKeyFromPrivateKey(0, crypto.SHA3_256, privateKey), - } -} - -func setup() (*State, Flowkit, *mocks.TestGateway) { - readerWriter, _ := tests.ReaderWriter() - state, err := Init(readerWriter, crypto.ECDSA_P256, crypto.SHA3_256) - if err != nil { - panic(err) - } - - gw := mocks.DefaultMockGateway() - flowkit := Flowkit{ - state: state, - network: config.EmulatorNetwork, - gateway: gw.Mock, - logger: output.NewStdoutLogger(output.NoneLog), - } - - return state, flowkit, gw -} - -func resourceToContract(res tests.Resource) Script { - return Script{ - Code: res.Source, - Location: res.Filename, - } -} - -var ctx = context.Background() - -func TestAccounts(t *testing.T) { - state, _, _ := setup() - pubKey, _ := crypto.DecodePublicKeyHex(crypto.ECDSA_P256, "858a7d978b25d61f348841a343f79131f4b9fab341dd8a476a6f4367c25510570bf69b795fc9c3d2b7191327d869bcf848508526a3c1cafd1af34f71c7765117") - serviceAcc, _ := state.EmulatorServiceAccount() - serviceAddress := serviceAcc.Address - - t.Run("Get an Account", func(t *testing.T) { - _, flowkit, gw := setup() - account, err := flowkit.GetAccount(ctx, serviceAddress) - - gw.Mock.AssertCalled(t, "GetAccount", serviceAddress) - assert.NoError(t, err) - assert.Equal(t, serviceAddress, account.Address) - }) - - t.Run("Create an Account", func(t *testing.T) { - _, flowkit, gw := setup() - newAddress := flow.HexToAddress("192440c99cb17282") - - gw.SendSignedTransaction.Run(func(args mock.Arguments) { - tx := args.Get(0).(*flow.Transaction) - assert.Equal(t, serviceAddress, tx.Authorizers[0]) - assert.Equal(t, serviceAddress, tx.Payer) - - gw.SendSignedTransaction.Return(tests.NewTransaction(), nil) - }) - - compareAddress := serviceAddress - gw.GetAccount.Run(func(args mock.Arguments) { - address := args.Get(0).(flow.Address) - assert.Equal(t, address, compareAddress) - compareAddress = newAddress - gw.GetAccount.Return( - tests.NewAccountWithAddress(address.String()), nil, - ) - }) - - gw.GetTransactionResult.Return( - tests.NewAccountCreateResult(newAddress), nil, - ) - - account, ID, err := flowkit.CreateAccount( - ctx, - serviceAcc, - []accounts.PublicKey{{ - pubKey, - flow.AccountKeyWeightThreshold, - crypto.ECDSA_P256, - crypto.SHA3_256, - }}, - ) - - gw.Mock.AssertCalled(t, mocks.GetAccountFunc, serviceAddress) - gw.Mock.AssertCalled(t, mocks.GetAccountFunc, newAddress) - gw.Mock.AssertNumberOfCalls(t, mocks.GetAccountFunc, 2) - gw.Mock.AssertNumberOfCalls(t, mocks.GetTransactionResultFunc, 1) - gw.Mock.AssertNumberOfCalls(t, mocks.SendSignedTransactionFunc, 1) - assert.NotNil(t, account) - assert.NotNil(t, ID) - assert.Equal(t, account.Address, newAddress) - assert.NoError(t, err) - }) - - t.Run("Contract Add for Account", func(t *testing.T) { - _, flowkit, gw := setup() - gw.SendSignedTransaction.Run(func(args mock.Arguments) { - tx := args.Get(0).(*flow.Transaction) - assert.Equal(t, tx.Payer, serviceAddress) - assert.True(t, strings.Contains(string(tx.Script), "signer.contracts.add")) - - gw.SendSignedTransaction.Return(tests.NewTransaction(), nil) - }) - - ID, _, err := flowkit.AddContract( - ctx, - serviceAcc, - resourceToContract(tests.ContractHelloString), - UpdateExistingContract(false), - ) - - gw.Mock.AssertCalled(t, mocks.GetAccountFunc, serviceAddress) - gw.Mock.AssertNumberOfCalls(t, mocks.GetAccountFunc, 2) - gw.Mock.AssertNumberOfCalls(t, mocks.GetTransactionResultFunc, 1) - gw.Mock.AssertNumberOfCalls(t, mocks.SendSignedTransactionFunc, 1) - assert.NotNil(t, ID) - assert.NoError(t, err) - }) - - t.Run("Contract Remove for Account", func(t *testing.T) { - _, flowkit, gw := setup() - gw.SendSignedTransaction.Run(func(args mock.Arguments) { - tx := args.Get(0).(*flow.Transaction) - assert.Equal(t, tx.Payer, serviceAddress) - assert.True(t, strings.Contains(string(tx.Script), "signer.contracts.remove")) - - gw.SendSignedTransaction.Return(tests.NewTransaction(), nil) - }) - - gw.GetAccount.Run(func(args mock.Arguments) { - addr := args.Get(0).(flow.Address) - assert.Equal(t, addr.String(), serviceAcc.Address.String()) - racc := tests.NewAccountWithAddress(addr.String()) - racc.Contracts = map[string][]byte{ - tests.ContractHelloString.Name: tests.ContractHelloString.Source, - } - - gw.GetAccount.Return(racc, nil) - }) - - account, err := flowkit.RemoveContract( - ctx, - serviceAcc, - tests.ContractHelloString.Name, - ) - - gw.Mock.AssertCalled(t, mocks.GetAccountFunc, serviceAddress) - gw.Mock.AssertNumberOfCalls(t, mocks.GetAccountFunc, 2) - gw.Mock.AssertNumberOfCalls(t, mocks.GetTransactionResultFunc, 1) - gw.Mock.AssertNumberOfCalls(t, mocks.SendSignedTransactionFunc, 1) - assert.NotNil(t, account) - assert.NoError(t, err) - }) -} - -func setupIntegration() (*State, Flowkit) { - readerWriter, _ := tests.ReaderWriter() - state, err := Init(readerWriter, crypto.ECDSA_P256, crypto.SHA3_256) - if err != nil { - panic(err) - } - - acc, _ := state.EmulatorServiceAccount() - pk, _ := acc.Key.PrivateKey() - gw := gateway.NewEmulatorGatewayWithOpts(&gateway.EmulatorKey{ - PublicKey: (*pk).PublicKey(), - SigAlgo: acc.Key.SigAlgo(), - HashAlgo: acc.Key.HashAlgo(), - }, gateway.WithEmulatorOptions( - emulator.WithTransactionExpiry(10), - )) - - flowkit := Flowkit{ - state: state, - network: config.EmulatorNetwork, - gateway: gw, - logger: output.NewStdoutLogger(output.NoneLog), - } - - return state, flowkit -} - -func TestAccountsCreate_Integration(t *testing.T) { - type accountsIn struct { - account *accounts.Account - pubKeys []crypto.PublicKey - weights []int - sigAlgo []crypto.SignatureAlgorithm - hashAlgo []crypto.HashAlgorithm - } - - type accountsOut struct { - address string - code map[string][]byte - balance uint64 - pubKeys []crypto.PublicKey - weights []int - } - - t.Run("Create", func(t *testing.T) { - t.Parallel() - - state, flowkit := setupIntegration() - srvAcc, _ := state.EmulatorServiceAccount() - - accIn := []accountsIn{{ - account: srvAcc, - sigAlgo: []crypto.SignatureAlgorithm{ - tests.SigAlgos()[0], - }, - hashAlgo: []crypto.HashAlgorithm{ - tests.HashAlgos()[0], - }, - pubKeys: []crypto.PublicKey{ - tests.PubKeys()[0], - }, - weights: []int{flow.AccountKeyWeightThreshold}, - }, { - account: srvAcc, - sigAlgo: []crypto.SignatureAlgorithm{ - tests.SigAlgos()[0], - tests.SigAlgos()[1], - }, - hashAlgo: []crypto.HashAlgorithm{ - tests.HashAlgos()[0], - tests.HashAlgos()[1], - }, - pubKeys: []crypto.PublicKey{ - tests.PubKeys()[0], - tests.PubKeys()[1], - }, - weights: []int{500, 500}, - }, { - account: srvAcc, - sigAlgo: []crypto.SignatureAlgorithm{ - tests.SigAlgos()[0], - }, - hashAlgo: []crypto.HashAlgorithm{ - tests.HashAlgos()[0], - }, - pubKeys: []crypto.PublicKey{ - tests.PubKeys()[0], - }, - weights: []int{flow.AccountKeyWeightThreshold}, - }} - - accOut := []accountsOut{{ - address: "01cf0e2f2f715450", - balance: uint64(100000), - pubKeys: []crypto.PublicKey{ - tests.PubKeys()[0], - }, - weights: []int{flow.AccountKeyWeightThreshold}, - }, { - address: "179b6b1cb6755e31", - balance: uint64(100000), - pubKeys: []crypto.PublicKey{ - tests.PubKeys()[0], - tests.PubKeys()[1], - }, - weights: []int{500, 500}, - }, { - address: "f3fcd2c1a78f5eee", - balance: uint64(100000), - pubKeys: []crypto.PublicKey{ - tests.PubKeys()[0], - }, - weights: []int{flow.AccountKeyWeightThreshold}, - }} - - for i, a := range accIn { - keys := make([]accounts.PublicKey, 0) - for j := range a.pubKeys { - keys = append(keys, accounts.PublicKey{ - Public: a.pubKeys[j], - Weight: a.weights[j], - SigAlgo: a.sigAlgo[j], - HashAlgo: a.hashAlgo[j], - }) - } - - acc, ID, err := flowkit.CreateAccount(ctx, a.account, keys) - c := accOut[i] - - assert.NoError(t, err) - assert.NotNil(t, acc) - assert.NotNil(t, ID) - assert.Equal(t, acc.Address.String(), c.address) - assert.Equal(t, acc.Balance, c.balance) - assert.Len(t, acc.Keys, len(c.pubKeys)) - - for x, k := range acc.Keys { - assert.Equal(t, k.PublicKey, a.pubKeys[x]) - assert.Equal(t, k.Weight, c.weights[x]) - assert.Equal(t, k.SigAlgo, a.sigAlgo[x]) - assert.Equal(t, k.HashAlgo, a.hashAlgo[x]) - } - - } - }) - - t.Run("Create Invalid", func(t *testing.T) { - t.Parallel() - - state, flowkit := setupIntegration() - srvAcc, _ := state.EmulatorServiceAccount() - - errOut := []string{ - "invalid account key: signing algorithm (UNKNOWN) and hashing algorithm (SHA3_256) are not a valid pair for a Flow account key", - "invalid account key: signing algorithm (UNKNOWN) and hashing algorithm (UNKNOWN) are not a valid pair for a Flow account key", - } - - accIn := []accountsIn{ - { - account: srvAcc, - sigAlgo: []crypto.SignatureAlgorithm{crypto.UnknownSignatureAlgorithm}, - hashAlgo: []crypto.HashAlgorithm{crypto.SHA3_256}, - pubKeys: []crypto.PublicKey{tests.PubKeys()[0]}, - weights: []int{1000}, - }, { - account: srvAcc, - sigAlgo: []crypto.SignatureAlgorithm{crypto.UnknownSignatureAlgorithm}, - hashAlgo: []crypto.HashAlgorithm{crypto.UnknownHashAlgorithm}, - pubKeys: []crypto.PublicKey{tests.PubKeys()[0]}, - weights: []int{1000}, - }, - /*{ - TODO(sideninja): uncomment this test case after https://github.com/onflow/flow-go-sdk/pull/199 is released - account: srvAcc, - sigAlgo: crypto.ECDSA_P256, - hashAlgo: crypto.SHA3_256, - args: nil, - pubKeys: []crypto.PublicKey{ - tests.PubKeys()[0], - }, - weights: []int{-1}, - }*/ - } - - for i, a := range accIn { - keys := make([]accounts.PublicKey, 0) - for i := range a.pubKeys { - keys = append(keys, accounts.PublicKey{ - Public: a.pubKeys[i], - Weight: a.weights[i], - SigAlgo: a.sigAlgo[i], - HashAlgo: a.hashAlgo[i], - }) - } - acc, ID, err := flowkit.CreateAccount(ctx, a.account, keys) - errMsg := errOut[i] - - assert.Nil(t, acc) - assert.Equal(t, flow.EmptyID, ID) - assert.Error(t, err) - assert.Equal(t, errMsg, err.Error()) - } - }) -} - -func TestAccountsAddContract_Integration(t *testing.T) { - t.Run("Update Contract", func(t *testing.T) { - t.Parallel() - - state, flowkit := setupIntegration() - srvAcc, _ := state.EmulatorServiceAccount() - - ID, _, err := flowkit.AddContract( - ctx, - srvAcc, - resourceToContract(tests.ContractSimple), - UpdateExistingContract(false), - ) - require.NoError(t, err) - require.NotNil(t, ID) - - acc, err := flowkit.GetAccount(ctx, srvAcc.Address) - require.NoError(t, err) - require.NotNil(t, acc) - assert.Equal(t, acc.Contracts["Simple"], tests.ContractSimple.Source) - - ID, _, err = flowkit.AddContract( - ctx, - srvAcc, - resourceToContract(tests.ContractSimpleUpdated), - UpdateExistingContract(true), - ) - require.NoError(t, err) - - acc, err = flowkit.GetAccount(ctx, srvAcc.Address) - require.NoError(t, err) - assert.Equal(t, acc.Contracts["Simple"], tests.ContractSimpleUpdated.Source) - - contract, err := state.Contracts().ByName(tests.ContractSimpleUpdated.Name) - require.NoError(t, err) - require.NotNil(t, contract) - - deployments := state.Deployments().ByAccountAndNetwork(srvAcc.Name, "emulator") - require.NotNil(t, deployments) - }) - - t.Run("Add Contract Invalid Same Content", func(t *testing.T) { - t.Parallel() - - state, flowkit := setupIntegration() - srvAcc, _ := state.EmulatorServiceAccount() - - // prepare existing contract - _, _, err := flowkit.AddContract( - ctx, - srvAcc, - resourceToContract(tests.ContractSimple), - UpdateExistingContract(false), - ) - assert.NoError(t, err) - - _, _, err = flowkit.AddContract( - ctx, - srvAcc, - resourceToContract(tests.ContractSimple), - UpdateExistingContract(false), - ) - - require.Error(t, err) - assert.EqualError(t, err, "contract already exists and is the same as the contract provided for update") - }) - - t.Run("Add Contract Invalid Same Content", func(t *testing.T) { - t.Parallel() - - state, flowkit := setupIntegration() - srvAcc, _ := state.EmulatorServiceAccount() - - // prepare existing contract - _, _, err := flowkit.AddContract( - ctx, - srvAcc, - resourceToContract(tests.ContractSimple), - UpdateExistingContract(false), - ) - assert.NoError(t, err) - - updated := tests.ContractSimple - updated.Source = []byte(`access(all) contract Simple { init() {} }`) - _, _, err = flowkit.AddContract( - ctx, - srvAcc, - resourceToContract(updated), - UpdateExistingContract(false), - ) - - require.Error(t, err) - assert.EqualError(t, err, "contract Simple exists in account emulator-account") - }) - - t.Run("Contract is Added to State", func(t *testing.T) { - state, flowkit := setupIntegration() - srvAcc, _ := state.EmulatorServiceAccount() - - c, _ := state.Contracts().ByName(tests.ContractSimple.Name) - assert.Nil(t, c) - - _, _, err := flowkit.AddContract( - ctx, - srvAcc, - resourceToContract(tests.ContractSimple), - UpdateExistingContract(false), - ) - assert.NoError(t, err) - - c, _ = state.Contracts().ByName(tests.ContractSimple.Name) - assert.NotNil(t, c) - }) - - t.Run("Add Contract No Overwrite", func(t *testing.T) { - state, flowkit := setupIntegration() - srvAcc, _ := state.EmulatorServiceAccount() - - // Add a contract to state with an alias - contractAliased := config.Contract{ - Name: tests.ContractSimple.Name, - Aliases: []config.Alias{{ - Network: config.EmulatorNetwork.Name, - Address: Donald().Address, - }}, - } - - state.Contracts().AddOrUpdate(contractAliased) - c, _ := state.Contracts().ByName(tests.ContractSimple.Name) - assert.Equal(t, Donald().Address, c.Aliases[0].Address) - - // Deploy contract to emulator account insted of Donald alias - _, _, err := flowkit.AddContract( - ctx, - srvAcc, - resourceToContract(tests.ContractSimple), - UpdateExistingContract(false), - ) - assert.NoError(t, err) - - // Check contracts state still has Donald alias - c, _ = state.Contracts().ByName(tests.ContractSimple.Name) - assert.Equal(t, Donald().Address, c.Aliases[0].Address) - }) -} - -func TestAccountsAddContractWithArgs(t *testing.T) { - state, flowkit := setupIntegration() - srvAcc, _ := state.EmulatorServiceAccount() - - // adding contract without argument should return an error - _, _, err := flowkit.AddContract( - ctx, - srvAcc, - resourceToContract(tests.ContractSimpleWithArgs), - UpdateExistingContract(false), - ) - assert.Error(t, err) - assert.True(t, strings.Contains(err.Error(), "invalid argument count, too few arguments: expected 1, got 0")) - - c := resourceToContract(tests.ContractSimpleWithArgs) - c.Args = []cadence.Value{cadence.UInt64(4)} - - _, _, err = flowkit.AddContract(ctx, srvAcc, c, UpdateExistingContract(false)) - assert.NoError(t, err) - - acc, err := flowkit.GetAccount(ctx, srvAcc.Address) - require.NoError(t, err) - assert.NotNil(t, acc) - assert.Equal(t, acc.Contracts["Simple"], tests.ContractSimpleWithArgs.Source) -} - -func TestAccountsRemoveContract_Integration(t *testing.T) { - state, flowkit := setupIntegration() - srvAcc, _ := state.EmulatorServiceAccount() - - c := tests.ContractSimple - // prepare existing contract - _, _, err := flowkit.AddContract( - ctx, - srvAcc, - Script{ - Code: c.Source, - Location: c.Filename, - }, - UpdateExistingContract(false), - ) - assert.NoError(t, err) - - t.Run("Remove Contract", func(t *testing.T) { - _, err := flowkit.RemoveContract(ctx, srvAcc, tests.ContractSimple.Name) - require.NoError(t, err) - - acc, err := flowkit.GetAccount(ctx, srvAcc.Address) - require.NoError(t, err) - assert.Equal(t, acc.Contracts[tests.ContractSimple.Name], []byte(nil)) - }) - - t.Run("Remove Contract", func(t *testing.T) { - _, err := flowkit.RemoveContract(ctx, srvAcc, "invalid") - require.True(t, strings.Contains(err.Error(), "can not remove a non-existing contract named 'invalid'")) - }) -} - -func TestAccountsGet_Integration(t *testing.T) { - state, flowkit := setupIntegration() - srvAcc, _ := state.EmulatorServiceAccount() - - t.Run("Get Account", func(t *testing.T) { - t.Parallel() - acc, err := flowkit.GetAccount(ctx, srvAcc.Address) - - assert.NoError(t, err) - assert.NotNil(t, acc) - assert.Equal(t, acc.Address, srvAcc.Address) - }) - - t.Run("Get Account Invalid", func(t *testing.T) { - t.Parallel() - - acc, err := flowkit.GetAccount(ctx, flow.HexToAddress("0x1")) - assert.Nil(t, acc) - assert.Equal(t, err.Error(), "could not find account with address 0000000000000001") - }) -} - -func TestBlocks(t *testing.T) { - t.Run("Get Latest Block", func(t *testing.T) { - t.Parallel() - - _, flowkit, gw := setup() - - _, err := flowkit.GetBlock(ctx, BlockQuery{Latest: true}) - - gw.Mock.AssertCalled(t, mocks.GetLatestBlockFunc) - gw.Mock.AssertNotCalled(t, mocks.GetBlockByHeightFunc) - gw.Mock.AssertNotCalled(t, mocks.GetBlockByIDFunc) - assert.NoError(t, err) - }) - - t.Run("Get Block by Height", func(t *testing.T) { - t.Parallel() - - _, flowkit, gw := setup() - - block := tests.NewBlock() - block.Height = 10 - gw.GetBlockByHeight.Return(block, nil) - - _, err := flowkit.GetBlock(ctx, BlockQuery{Height: 10}) - - gw.Mock.AssertCalled(t, mocks.GetBlockByHeightFunc, uint64(10)) - gw.Mock.AssertNotCalled(t, mocks.GetLatestBlockFunc) - gw.Mock.AssertNotCalled(t, mocks.GetBlockByIDFunc) - assert.NoError(t, err) - }) - - t.Run("Get Block by ID", func(t *testing.T) { - t.Parallel() - _, flowkit, gw := setup() - - ID := flow.HexToID("a310685082f0b09f2a148b2e8905f08ea458ed873596b53b200699e8e1f6536f") - _, err := flowkit.GetBlock(ctx, BlockQuery{ID: &ID}) - - assert.NoError(t, err) - gw.Mock.AssertCalled(t, mocks.GetBlockByIDFunc, ID) - gw.Mock.AssertNotCalled(t, mocks.GetBlockByHeightFunc) - gw.Mock.AssertNotCalled(t, mocks.GetLatestBlockFunc) - }) -} - -func TestBlocksGet_Integration(t *testing.T) { - t.Run("Get Block", func(t *testing.T) { - t.Parallel() - _, flowkit := setupIntegration() - - block, err := flowkit.GetBlock(ctx, BlockQuery{Latest: true}) - - assert.NoError(t, err) - assert.Equal(t, block.Height, uint64(0)) - assert.Equal(t, block.ID.String(), "03d40910037d575d52831647b39814f445bc8cc7ba8653286c0eb1473778c34f") - }) -} - -func TestCollections(t *testing.T) { - t.Run("Get Collection", func(t *testing.T) { - _, flowkit, gw := setup() - ID := flow.HexToID("a310685082f0b09f2a148b2e8905f08ea458ed873596b53b200699e8e1f6536f") - - _, err := flowkit.GetCollection(ctx, ID) - - assert.NoError(t, err) - gw.Mock.AssertCalled(t, "GetCollection", ID) - }) -} - -func TestEvents(t *testing.T) { - t.Run("Get Events", func(t *testing.T) { - t.Parallel() - - _, flowkit, gw := setup() - _, err := flowkit.GetEvents(ctx, []string{"flow.CreateAccount"}, 0, 0, nil) - - assert.NoError(t, err) - gw.Mock.AssertCalled(t, mocks.GetEventsFunc, "flow.CreateAccount", uint64(0), uint64(0)) - }) - - t.Run("Should have larger endHeight then startHeight", func(t *testing.T) { - t.Parallel() - - _, flowkit, _ := setup() - _, err := flowkit.GetEvents(ctx, []string{"flow.CreateAccount"}, 10, 0, nil) - assert.EqualError(t, err, "cannot have end height (0) of block range less that start height (10)") - }) - - t.Run("Test create queries", func(t *testing.T) { - names := []string{"first", "second"} - queries := makeEventQueries(names, 0, 400, 250) - expected := []grpc.EventRangeQuery{ - {Type: "first", StartHeight: 0, EndHeight: 249}, - {Type: "second", StartHeight: 0, EndHeight: 249}, - {Type: "first", StartHeight: 250, EndHeight: 400}, - {Type: "second", StartHeight: 250, EndHeight: 400}, - } - assert.Equal(t, expected, queries) - }) - - t.Run("Should handle error from get events in goroutine", func(t *testing.T) { - t.Parallel() - - _, flowkit, gw := setup() - - gw.GetEvents.Return([]flow.BlockEvents{}, errors.New("failed getting event")) - - _, err := flowkit.GetEvents(ctx, []string{"flow.CreateAccount"}, 0, 1, nil) - - assert.EqualError(t, err, "failed getting event") - }) -} - -func TestEvents_Integration(t *testing.T) { - t.Run("Get Events for non existent event", func(t *testing.T) { - t.Parallel() - - _, flowkit := setupIntegration() - - events, err := flowkit.GetEvents(ctx, []string{"nonexisting"}, 0, 0, nil) - assert.NoError(t, err) - assert.Len(t, events, 1) - assert.Len(t, events[0].Events, 0) - }) - - t.Run("Get Events while adding contracts", func(t *testing.T) { - t.Parallel() - - state, flowkit := setupIntegration() - srvAcc, _ := state.EmulatorServiceAccount() - - // create events - _, _, err := flowkit.AddContract( - ctx, - srvAcc, - resourceToContract(tests.ContractEvents), - UpdateExistingContract(false), - ) - assert.NoError(t, err) - assert.NoError(t, err) - for x := 'A'; x <= 'J'; x++ { // test contract emits events named from A to J - eName := fmt.Sprintf("A.%s.ContractEvents.Event%c", srvAcc.Address.String(), x) - events, err := flowkit.GetEvents(ctx, []string{eName}, 0, 1, nil) - assert.NoError(t, err) - assert.Len(t, events, 2) - assert.Len(t, events[1].Events, 1) - - } - }) - - t.Run("Get Events while adding contracts in parallel", func(t *testing.T) { - t.Parallel() - - state, flowkit := setupIntegration() - srvAcc, _ := state.EmulatorServiceAccount() - - // create events - _, _, err := flowkit.AddContract( - ctx, - srvAcc, - resourceToContract(tests.ContractEvents), - UpdateExistingContract(false), - ) - assert.NoError(t, err) - - assert.NoError(t, err) - var eventNames []string - for x := 'A'; x <= 'J'; x++ { // test contract emits events named from A to J - eName := fmt.Sprintf("A.%s.ContractEvents.Event%c", srvAcc.Address.String(), x) - eventNames = append(eventNames, eName) - } - - events, err := flowkit.GetEvents(ctx, eventNames, 0, 1, &EventWorker{ - Count: 5, - BlocksPerWorker: 250, - }) - assert.NoError(t, err) - assert.Len(t, events, 20) - assert.Len(t, events[1].Events, 1) - }) -} - -func TestKeys(t *testing.T) { - t.Run("Generate Keys", func(t *testing.T) { - t.Parallel() - - _, flowkit, _ := setup() - key, err := flowkit.GenerateKey(ctx, crypto.ECDSA_P256, "") - assert.NoError(t, err) - assert.Equal(t, len(key.String()), 66) - }) - - t.Run("Generate Keys with seed", func(t *testing.T) { - t.Parallel() - - _, flowkit, _ := setup() - key, err := flowkit.GenerateKey(ctx, crypto.ECDSA_P256, "aaaaaaaaaaaaaaaaaaaaaaannndddddd_its_gone") - - assert.NoError(t, err) - assert.Equal(t, "0x28350fff13e68ed3887ddc564df737db0a590c02cf4d3928eb30eb79f51672c2", key.String()) - }) - - t.Run("Test Vector SLIP-0010", func(t *testing.T) { - // test against SLIP-0010 test vector. All data are taken from: - // https://github.com/satoshilabs/slips/blob/master/slip-0010.md#test-vectors - t.Parallel() - _, flowkit, _ := setup() - - type testEntry struct { - sigAlgo crypto.SignatureAlgorithm - seed string - path string - privateKey string - } - - testVector := []testEntry{{ - sigAlgo: crypto.ECDSA_secp256k1, - seed: "000102030405060708090a0b0c0d0e0f", - path: "m/0'/1/2'/2/1000000000", - privateKey: "0x471b76e389e528d6de6d816857e012c5455051cad6660850e58372a6c3e6e7c8", - }, { - sigAlgo: crypto.ECDSA_P256, - seed: "000102030405060708090a0b0c0d0e0f", - path: "m/0'/1/2'/2/1000000000", - privateKey: "0x21c4f269ef0a5fd1badf47eeacebeeaa3de22eb8e5b0adcd0f27dd99d34d0119", - }, { - sigAlgo: crypto.ECDSA_secp256k1, - seed: "fffcf9f6f3f0edeae7e4e1dedbd8d5d2cfccc9c6c3c0bdbab7b4b1aeaba8a5a29f9c999693908d8a8784817e7b7875726f6c696663605d5a5754514e4b484542", - path: "m/0/2147483647'/1/2147483646'/2", - privateKey: "0xbb7d39bdb83ecf58f2fd82b6d918341cbef428661ef01ab97c28a4842125ac23", - }, { - sigAlgo: crypto.ECDSA_P256, - seed: "fffcf9f6f3f0edeae7e4e1dedbd8d5d2cfccc9c6c3c0bdbab7b4b1aeaba8a5a29f9c999693908d8a8784817e7b7875726f6c696663605d5a5754514e4b484542", - path: "m/0/2147483647'/1/2147483646'/2", - privateKey: "0xbb0a77ba01cc31d77205d51d08bd313b979a71ef4de9b062f8958297e746bd67", - }} - - for _, test := range testVector { - seed, err := hex.DecodeString(test.seed) - assert.NoError(t, err) - // use derivePrivateKeyFromSeed to test instead of DerivePrivateKeyFromMnemonic - // because the test vector provides seeds, while it's not possible to derive mnemonics - // corresponding to seeds. - privateKey, err := flowkit.derivePrivateKeyFromSeed(seed, test.sigAlgo, test.path) - assert.NoError(t, err) - assert.Equal(t, test.privateKey, privateKey.String()) - } - }) - - t.Run("Generate Keys with mnemonic (default path)", func(t *testing.T) { - t.Parallel() - - _, flowkit, _ := setup() - key, err := flowkit.DerivePrivateKeyFromMnemonic(ctx, "normal dune pole key case cradle unfold require tornado mercy hospital buyer", crypto.ECDSA_P256, "") - - assert.NoError(t, err) - assert.Equal(t, key.String(), "0x638dc9ad0eee91d09249f0fd7c5323a11600e20d5b9105b66b782a96236e74cf") - }) - - // https://github.com/onflow/ledger-app-flow/blob/dc61213a9c3d73152b78b7391d04165d07f1ad89/tests_speculos/test-basic-show-address-expert.js#L28 - t.Run("Generate Keys with mnemonic (custom path - Ledger)", func(t *testing.T) { - t.Parallel() - - _, flowkit, _ := setup() - // ledger test mnemonic: https://github.com/onflow/ledger-app-flow#using-a-real-device-for-integration-tests-nano-s-and-nano-s-plus - key, err := flowkit.DerivePrivateKeyFromMnemonic(ctx, "equip will roof matter pink blind book anxiety banner elbow sun young", crypto.ECDSA_secp256k1, "m/44'/539'/513'/0/0") - - assert.NoError(t, err) - assert.Equal(t, key.String(), "0xd18d051afca7150781fef111f3387d132d31c4a6250268db0f61f836a205e0b8") - - assert.Equal(t, hex.EncodeToString(key.PublicKey().Encode()), "d7482bbaff7827035d5b238df318b10604673dc613808723efbd23fbc4b9fad34a415828d924ec7b83ac0eddf22ef115b7c203ee39fb080572d7e51775ee54be") - }) - - t.Run("Generate mnemonic key", func(t *testing.T) { - _, flowkit, _ := setup() - - pkey, path, err := flowkit.GenerateMnemonicKey(context.Background(), crypto.ECDSA_P256, "") - assert.NoError(t, err) - assert.NotNil(t, pkey) - assert.NotNil(t, path) - }) - - t.Run("Generate Keys Invalid", func(t *testing.T) { - t.Parallel() - - _, flowkit, _ := setup() - inputs := []map[string]crypto.SignatureAlgorithm{ - {"im_short": crypto.ECDSA_P256}, - {"": crypto.StringToSignatureAlgorithm("JUSTNO")}, - } - - errs := []string{ - "failed to generate private key: crypto: insufficient seed length 8, must be at least 32 bytes for ECDSA_P256", - "failed to generate private key: key generation failed: the signature scheme UNKNOWN is not supported", - } - - for x, in := range inputs { - for k, v := range in { - _, err := flowkit.GenerateKey(ctx, v, k) - assert.Equal(t, err.Error(), errs[x]) - x++ - } - } - }) -} - -func TestProject(t *testing.T) { - t.Run("Deploy Project", func(t *testing.T) { - t.Parallel() - - state, flowkit, gw := setup() - - c := config.Contract{ - Name: "Hello", - Location: tests.ContractHelloString.Filename, - } - state.Contracts().AddOrUpdate(c) - state.Networks().AddOrUpdate(config.EmulatorNetwork) - - acct2 := Donald() - state.Accounts().AddOrUpdate(acct2) - - d := config.Deployment{ - Network: config.EmulatorNetwork.Name, - Account: acct2.Name, - Contracts: []config.ContractDeployment{{ - Name: c.Name, - Args: nil, - }}, - } - state.Deployments().AddOrUpdate(d) - - gw.SendSignedTransaction.Run(func(args mock.Arguments) { - tx := args.Get(0).(*flow.Transaction) - assert.Equal(t, tx.Payer, acct2.Address) - assert.True(t, strings.Contains(string(tx.Script), "signer.contracts.add")) - - gw.SendSignedTransaction.Return(tests.NewTransaction(), nil) - }) - - contracts, err := flowkit.DeployProject(ctx, UpdateExistingContract(false)) - - assert.NoError(t, err) - assert.Equal(t, len(contracts), 1) - assert.Equal(t, contracts[0].AccountAddress, acct2.Address) - }) - - t.Run("Deploy Project Using LocationAliases", func(t *testing.T) { - t.Parallel() - - state, flowkit, gw := setup() - - c1 := config.Contract{ - Name: "ContractB", - Location: tests.ContractB.Filename, - } - state.Contracts().AddOrUpdate(c1) - - c2 := config.Contract{ - Name: "Aliased", - Location: tests.ContractA.Filename, - Aliases: []config.Alias{{ - Network: config.EmulatorNetwork.Name, - Address: Donald().Address, - }}, - } - state.Contracts().AddOrUpdate(c2) - - c3 := config.Contract{ - Name: "ContractC", - Location: tests.ContractC.Filename, - } - state.Contracts().AddOrUpdate(c3) - - state.Networks().AddOrUpdate(config.EmulatorNetwork) - - a := Alice() - state.Accounts().AddOrUpdate(a) - - d := config.Deployment{ - Network: config.EmulatorNetwork.Name, - Account: a.Name, - Contracts: []config.ContractDeployment{ - {Name: c1.Name}, {Name: c3.Name}, - }, - } - state.Deployments().AddOrUpdate(d) - - // for checking imports are correctly resolved - resolved := map[string]string{ - tests.ContractB.Name: fmt.Sprintf(`import ContractA from 0x%s`, Donald().Address.Hex()), - tests.ContractC.Name: fmt.Sprintf(` - import ContractB from 0x%s - import ContractA from 0x%s`, a.Address.Hex(), Donald().Address.Hex()), - } // don't change formatting of the above code since it compares the strings with included formatting - - gw.SendSignedTransaction.Run(func(args mock.Arguments) { - tx := args.Get(0).(*flow.Transaction) - assert.Equal(t, tx.Payer, a.Address) - assert.True(t, strings.Contains(string(tx.Script), "signer.contracts.add")) - - argCode := tx.Arguments[1] - decodeCode, _ := jsoncdc.Decode(nil, argCode) - code := decodeCode.ToGoValue().(string) - - argName := tx.Arguments[0] - decodeName, _ := jsoncdc.Decode(nil, argName) - - testCode, found := resolved[decodeName.ToGoValue().(string)] - require.True(t, found) - assert.True(t, strings.Contains(string(code), testCode)) - - gw.SendSignedTransaction.Return(tests.NewTransaction(), nil) - }) - - contracts, err := flowkit.DeployProject(ctx, UpdateExistingContract(false)) - - assert.NoError(t, err) - assert.Equal(t, len(contracts), 2) - gw.Mock.AssertCalled(t, mocks.GetLatestBlockFunc) - gw.Mock.AssertCalled(t, mocks.GetAccountFunc, a.Address) - gw.Mock.AssertNumberOfCalls(t, mocks.GetTransactionResultFunc, 2) - }) - - t.Run("Deploy Project New Import Schema and LocationAliases", func(t *testing.T) { - t.Parallel() - - state, flowkit, gw := setup() - - c1 := config.Contract{ - Name: "ContractBB", - Location: tests.ContractBB.Filename, - } - state.Contracts().AddOrUpdate(c1) - - c2 := config.Contract{ - Name: "ContractAA", - Location: tests.ContractAA.Filename, - Aliases: []config.Alias{{ - Network: config.EmulatorNetwork.Name, - Address: Donald().Address, - }}, - } - state.Contracts().AddOrUpdate(c2) - - c3 := config.Contract{ - Name: "ContractCC", - Location: tests.ContractCC.Filename, - } - state.Contracts().AddOrUpdate(c3) - - state.Networks().AddOrUpdate(config.EmulatorNetwork) - - a := Alice() - state.Accounts().AddOrUpdate(a) - - d := config.Deployment{ - Network: config.EmulatorNetwork.Name, - Account: a.Name, - Contracts: []config.ContractDeployment{ - {Name: c1.Name}, {Name: c3.Name}, - }, - } - state.Deployments().AddOrUpdate(d) - - // for checking imports are correctly resolved - resolved := map[string]string{ - tests.ContractB.Name: fmt.Sprintf(`import ContractAA from 0x%s`, Donald().Address.Hex()), - tests.ContractC.Name: fmt.Sprintf(` - import ContractBB from 0x%s - import ContractAA from 0x%s`, a.Address.Hex(), Donald().Address.Hex()), - } // don't change formatting of the above code since it compares the strings with included formatting - - gw.SendSignedTransaction.Run(func(args mock.Arguments) { - tx := args.Get(0).(*flow.Transaction) - assert.Equal(t, tx.Payer, a.Address) - assert.True(t, strings.Contains(string(tx.Script), "signer.contracts.add")) - - argCode := tx.Arguments[1] - decodeCode, _ := jsoncdc.Decode(nil, argCode) - code, _ := decodeCode.ToGoValue().(string) - - argName := tx.Arguments[0] - decodeName, _ := jsoncdc.Decode(nil, argName) - - testCode, found := resolved[decodeName.ToGoValue().(string)] - require.True(t, found) - assert.True(t, strings.Contains(string(code), testCode)) - - gw.SendSignedTransaction.Return(tests.NewTransaction(), nil) - }) - - contracts, err := flowkit.DeployProject(ctx, UpdateExistingContract(false)) - - assert.NoError(t, err) - assert.Equal(t, len(contracts), 2) - gw.Mock.AssertCalled(t, mocks.GetLatestBlockFunc) - gw.Mock.AssertCalled(t, mocks.GetAccountFunc, a.Address) - gw.Mock.AssertNumberOfCalls(t, mocks.GetTransactionResultFunc, 2) - }) - - t.Run("Deploy Project Duplicate Address", func(t *testing.T) { - t.Parallel() - - state, flowkit, gw := setup() - - c := config.Contract{ - Name: "Hello", - Location: tests.ContractHelloString.Filename, - } - state.Contracts().AddOrUpdate(c) - state.Networks().AddOrUpdate(config.EmulatorNetwork) - - acct1 := Charlie() - state.Accounts().AddOrUpdate(acct1) - - acct2 := Donald() - state.Accounts().AddOrUpdate(acct2) - - d := config.Deployment{ - Network: config.EmulatorNetwork.Name, - Account: acct2.Name, - Contracts: []config.ContractDeployment{{ - Name: c.Name, - Args: nil, - }}, - } - state.Deployments().AddOrUpdate(d) - - gw.SendSignedTransaction.Run(func(args mock.Arguments) { - tx := args.Get(0).(*flow.Transaction) - assert.Equal(t, tx.Payer, acct2.Address) - assert.True(t, strings.Contains(string(tx.Script), "signer.contracts.add")) - - gw.SendSignedTransaction.Return(tests.NewTransaction(), nil) - }) - - contracts, err := flowkit.DeployProject(ctx, UpdateExistingContract(false)) - - assert.NoError(t, err) - assert.Equal(t, len(contracts), 1) - assert.Equal(t, contracts[0].AccountAddress, acct2.Address) - }) -} - -// used for integration tests -func simpleDeploy(state *State, flowkit Flowkit, update bool) ([]*project.Contract, error) { - srvAcc, _ := state.EmulatorServiceAccount() - - c := config.Contract{ - Name: tests.ContractHelloString.Name, - Location: tests.ContractHelloString.Filename, - } - state.Contracts().AddOrUpdate(c) - state.Networks().AddOrUpdate(config.EmulatorNetwork) - - d := config.Deployment{ - Network: config.EmulatorNetwork.Name, - Account: srvAcc.Name, - Contracts: []config.ContractDeployment{{ - Name: c.Name, - Args: nil, - }}, - } - state.Deployments().AddOrUpdate(d) - - return flowkit.DeployProject(ctx, UpdateExistingContract(update)) -} - -func TestProject_Integration(t *testing.T) { - t.Run("Deploy Project", func(t *testing.T) { - t.Parallel() - - state, flowkit := setupIntegration() - contracts, err := simpleDeploy(state, flowkit, false) - assert.NoError(t, err) - assert.Len(t, contracts, 1) - assert.Equal(t, contracts[0].Name, tests.ContractHelloString.Name) - assert.Equal(t, string(contracts[0].Code()), string(tests.ContractHelloString.Source)) - }) - - t.Run("Deploy Complex Project", func(t *testing.T) { - t.Parallel() - - state, flowkit := setupIntegration() - srvAcc, _ := state.EmulatorServiceAccount() - state.Networks().AddOrUpdate(config.EmulatorNetwork) - - contractFixtures := []tests.Resource{ - tests.ContractB, tests.ContractC, - } - - testContracts := make([]config.Contract, len(contractFixtures)) - for i, c := range contractFixtures { - testContracts[i] = config.Contract{ - Name: c.Name, - Location: c.Filename, - } - state.Contracts().AddOrUpdate(testContracts[i]) - } - - cA := tests.ContractA - state.Contracts().AddOrUpdate(config.Contract{ - Name: cA.Name, - Location: cA.Filename, - Aliases: []config.Alias{{ - Network: config.EmulatorNetwork.Name, - Address: srvAcc.Address, - }}, - }) - - state.Deployments().AddOrUpdate(config.Deployment{ - Network: config.EmulatorNetwork.Name, - Account: srvAcc.Name, - Contracts: []config.ContractDeployment{{ - Name: testContracts[0].Name, - Args: nil, - }, { - Name: testContracts[1].Name, - Args: []cadence.Value{ - cadence.String("foo"), - }, - }}, - }) - - // deploy contract imported as alias - _, _, err := flowkit.AddContract( - ctx, - srvAcc, - Script{ - Code: tests.ContractA.Source, - Location: tests.ContractA.Filename, - }, - UpdateExistingContract(false), - ) - require.NoError(t, err) - - // replace imports manually to assert that replacing worked in deploy service - addr := fmt.Sprintf("0x%s", srvAcc.Address) - replacedContracts := make([]string, len(contractFixtures)) - for i, c := range contractFixtures { - replacedContracts[i] = strings.ReplaceAll(string(c.Source), `"./contractA.cdc"`, addr) - replacedContracts[i] = strings.ReplaceAll(replacedContracts[i], `"./contractB.cdc"`, addr) - } - - contracts, err := flowkit.DeployProject(ctx, UpdateExistingContract(false)) - assert.NoError(t, err) - assert.Len(t, contracts, 3) - - account, err := flowkit.GetAccount(ctx, srvAcc.Address) - - for i, c := range testContracts { - code, exists := account.Contracts[c.Name] - assert.True(t, exists) - assert.Equal(t, replacedContracts[i], string(code)) - } - }) - - t.Run("Deploy Project Update", func(t *testing.T) { - t.Parallel() - - // setup - state, flowkit := setupIntegration() - _, err := simpleDeploy(state, flowkit, false) - assert.NoError(t, err) - - _, err = simpleDeploy(state, flowkit, true) - assert.NoError(t, err) - }) -} - -func TestScripts(t *testing.T) { - t.Run("Execute Script", func(t *testing.T) { - _, flowkit, gw := setup() - - gw.ExecuteScript.Run(func(args mock.Arguments) { - assert.Len(t, string(args.Get(0).([]byte)), 86) - assert.Equal(t, "\"Foo\"", args.Get(1).([]cadence.Value)[0].String()) - gw.ExecuteScript.Return(cadence.MustConvertValue(""), nil) - }) - - args := []cadence.Value{cadence.String("Foo")} - _, err := flowkit.ExecuteScript( - ctx, - Script{ - Code: tests.ScriptArgString.Source, - Args: args, - }, - LatestScriptQuery, - ) - - assert.NoError(t, err) - }) -} - -func TestScripts_Integration(t *testing.T) { - t.Run("Execute", func(t *testing.T) { - t.Parallel() - _, flowkit := setupIntegration() - - args := []cadence.Value{cadence.String("Foo")} - res, err := flowkit.ExecuteScript( - ctx, - Script{ - Code: tests.ScriptArgString.Source, - Args: args, - }, - LatestScriptQuery, - ) - - assert.NoError(t, err) - assert.Equal(t, "\"Hello Foo\"", res.String()) - }) - - t.Run("Execute report error", func(t *testing.T) { - t.Parallel() - _, flowkit := setupIntegration() - args := []cadence.Value{cadence.String("Foo")} - res, err := flowkit.ExecuteScript( - ctx, - Script{ - Code: tests.ScriptWithError.Source, - Args: args, - }, - LatestScriptQuery, - ) - - assert.Error(t, err) - assert.Contains(t, err.Error(), "cannot find type in this scope") - assert.Nil(t, res) - }) - - t.Run("Execute With Imports", func(t *testing.T) { - t.Parallel() - state, flowkit := setupIntegration() - srvAcc, _ := state.EmulatorServiceAccount() - - // setup - c := config.Contract{ - Name: tests.ContractHelloString.Name, - Location: tests.ContractHelloString.Filename, - } - state.Contracts().AddOrUpdate(c) - state.Networks().AddOrUpdate(config.EmulatorNetwork) - - d := config.Deployment{ - Network: config.EmulatorNetwork.Name, - Account: srvAcc.Name, - Contracts: []config.ContractDeployment{{ - Name: c.Name, - Args: nil, - }}, - } - state.Deployments().AddOrUpdate(d) - _, _, _ = flowkit.AddContract( - ctx, - srvAcc, - resourceToContract(tests.ContractHelloString), - UpdateExistingContract(false), - ) - - res, err := flowkit.ExecuteScript( - ctx, - Script{ - Code: tests.ScriptImport.Source, - Location: tests.ScriptImport.Filename, - }, - LatestScriptQuery, - ) - assert.NoError(t, err) - assert.Equal(t, res.String(), "\"Hello Hello, World!\"") - }) - - t.Run("Execute Script Invalid", func(t *testing.T) { - t.Parallel() - _, flowkit := setupIntegration() - in := []string{"", tests.ScriptImport.Filename} - - out := []string{ - "resolving imports in scripts not supported", - "import ./contractHello.cdc could not be resolved from provided contracts", - } - - for x, i := range in { - _, err := flowkit.ExecuteScript( - ctx, - Script{ - Code: tests.ScriptImport.Source, - Location: i, - }, - LatestScriptQuery, - ) - assert.NotNil(t, err) - assert.Equal(t, err.Error(), out[x]) - } - }) -} - -const gasLimit = 1000 - -func TestTransactions(t *testing.T) { - state, _, _ := setup() - serviceAcc, _ := state.EmulatorServiceAccount() - serviceAddress := serviceAcc.Address - - t.Run("Get Transaction", func(t *testing.T) { - t.Parallel() - _, flowkit, gw := setup() - txs := tests.NewTransaction() - - _, _, err := flowkit.GetTransactionByID(ctx, txs.ID(), true) - - assert.NoError(t, err) - gw.Mock.AssertNumberOfCalls(t, mocks.GetTransactionResultFunc, 1) - gw.Mock.AssertCalled(t, mocks.GetTransactionFunc, txs.ID()) - }) - - t.Run("Send Transaction args", func(t *testing.T) { - t.Parallel() - _, flowkit, gw := setup() - - var txID flow.Identifier - gw.SendSignedTransaction.Run(func(args mock.Arguments) { - tx := args.Get(0).(*flow.Transaction) - arg, err := tx.Argument(0) - assert.NoError(t, err) - assert.Equal(t, "\"Bar\"", arg.String()) - assert.Equal(t, serviceAddress, tx.Payer) - assert.Len(t, string(tx.Script), 224) - - t := tests.NewTransaction() - txID = t.ID() - gw.SendSignedTransaction.Return(t, nil) - }) - - gw.GetTransactionResult.Run(func(args mock.Arguments) { - assert.Equal(t, txID, args.Get(0).(flow.Identifier)) - gw.GetTransactionResult.Return(tests.NewTransactionResult(nil), nil) - }) - - _, _, err := flowkit.SendTransaction( - ctx, - transactions.SingleAccountRole(*serviceAcc), - Script{ - Code: tests.TransactionArgString.Source, - Args: []cadence.Value{cadence.String("Bar")}, - }, - gasLimit, - ) - - assert.NoError(t, err) - gw.Mock.AssertNumberOfCalls(t, mocks.SendSignedTransactionFunc, 1) - gw.Mock.AssertNumberOfCalls(t, mocks.GetTransactionResultFunc, 1) - }) -} - -func setupAccounts(state *State, flowkit Flowkit) { - setupAccount(state, flowkit, Alice()) - setupAccount(state, flowkit, Bob()) - setupAccount(state, flowkit, Charlie()) -} - -func setupAccount(state *State, flowkit Flowkit, account *accounts.Account) { - srv, _ := state.EmulatorServiceAccount() - - key := account.Key - pk, _ := key.PrivateKey() - acc, _, _ := flowkit.CreateAccount( - ctx, - srv, - []accounts.PublicKey{{ - (*pk).PublicKey(), - flow.AccountKeyWeightThreshold, - key.SigAlgo(), - key.HashAlgo(), - }}, - ) - - state.Accounts().AddOrUpdate(&accounts.Account{ - Name: account.Name, - Address: acc.Address, - Key: key, - }) -} - -func Test_TransactionRoles(t *testing.T) { - t.Run("Building Signers", func(t *testing.T) { - state, flowkit := setupIntegration() - setupAccounts(state, flowkit) - a, _ := state.Accounts().ByName("Alice") - b, _ := state.Accounts().ByName("Bob") - c, _ := state.Accounts().ByName("Charlie") - - // we make copies with diffrerent names but same addresses for testing building signers, - // since if same addresses are present that's should be treated as same account - aCopy1 := *a - aCopy2 := *a - aCopy1.Name = "Boo" - aCopy2.Name = "Zoo" - - testVector := []struct { - *transactions.AccountRoles - signerAddresses []flow.Address - }{{ - AccountRoles: &transactions.AccountRoles{ - Proposer: *a, - Authorizers: []accounts.Account{*b}, - Payer: *c, - }, - signerAddresses: []flow.Address{ - a.Address, - b.Address, - c.Address, - }, - }, { - AccountRoles: &transactions.AccountRoles{ - Proposer: *a, - Authorizers: []accounts.Account{*a}, - Payer: *a, - }, - signerAddresses: []flow.Address{ - a.Address, - }, - }, { - AccountRoles: &transactions.AccountRoles{ - Proposer: *a, - Payer: *b, - Authorizers: []accounts.Account{*a}, - }, - signerAddresses: []flow.Address{ - a.Address, b.Address, - }, - }, { - AccountRoles: &transactions.AccountRoles{ - Proposer: *a, - Payer: *a, - }, - signerAddresses: []flow.Address{ - a.Address, - }, - }, { - AccountRoles: &transactions.AccountRoles{ - Proposer: aCopy1, - Payer: aCopy2, - Authorizers: []accounts.Account{*a}, - }, - signerAddresses: []flow.Address{ - a.Address, - }, - }} - - for i, test := range testVector { - signerAccs := test.Signers() - signerAddrs := make([]flow.Address, len(signerAccs)) - for i, sig := range signerAccs { - signerAddrs[i] = sig.Address - } - - assert.Equal(t, test.signerAddresses, signerAddrs, fmt.Sprintf("test %d failed", i)) - } - }) - - t.Run("Building Addresses", func(t *testing.T) { - state, flowkit := setupIntegration() - setupAccounts(state, flowkit) - a, _ := state.Accounts().ByName("Alice") - b, _ := state.Accounts().ByName("Bob") - c, _ := state.Accounts().ByName("Charlie") - - roles := &transactions.AccountRoles{ - Proposer: *a, - Authorizers: []accounts.Account{*b, *c}, - Payer: *c, - } - - addresses := roles.AddressRoles() - - assert.Equal(t, a.Address, addresses.Proposer) - assert.Equal(t, c.Address, addresses.Payer) - assert.Equal(t, []flow.Address{b.Address, c.Address}, addresses.Authorizers) - }) -} - -func TestTransactions_Integration(t *testing.T) { - t.Run("Build Transaction", func(t *testing.T) { - t.Parallel() - state, f := setupIntegration() - setupAccounts(state, f) - - type txIn struct { - prop flow.Address - auth []flow.Address - payer flow.Address - index int - code []byte - file string - gas uint64 - args []cadence.Value - network string - yes bool - } - - a, _ := state.Accounts().ByName("Alice") - b, _ := state.Accounts().ByName("Bob") - c, _ := state.Accounts().ByName("Charlie") - - txIns := []txIn{{ - a.Address, - []flow.Address{a.Address}, - a.Address, - 0, - tests.TransactionSimple.Source, - tests.TransactionSimple.Filename, - flow.DefaultTransactionGasLimit, - nil, - "", - true, - }, { - c.Address, - []flow.Address{a.Address, b.Address}, - c.Address, - 0, - tests.TransactionSimple.Source, - tests.TransactionSimple.Filename, - flow.DefaultTransactionGasLimit, - nil, - "", - true, - }} - - for i, txIn := range txIns { - tx, err := f.BuildTransaction( - ctx, - transactions.AddressesRoles{ - Proposer: txIn.prop, - Authorizers: txIn.auth, - Payer: txIn.payer, - }, - txIn.index, - Script{txIn.code, txIn.args, txIn.file}, - txIn.gas, - ) - - require.NoError(t, err, fmt.Sprintf("test vector %d", i)) - ftx := tx.FlowTransaction() - assert.Equal(t, ftx.Script, txIn.code) - assert.Equal(t, ftx.Payer, txIn.payer) - assert.Equal(t, len(ftx.Authorizers), 0) // make sure authorizers weren't added as tx input doesn't require them - assert.Equal(t, ftx.ProposalKey.Address, txIn.prop) - assert.Equal(t, ftx.ProposalKey.KeyIndex, txIn.index) - } - }) - - t.Run("Build Transaction with Imports", func(t *testing.T) { - t.Parallel() - state, flowkit := setupIntegration() - setupAccounts(state, flowkit) - - srvAcc, _ := state.EmulatorServiceAccount() - signer := srvAcc.Address - - // setup - c := config.Contract{ - Name: tests.ContractHelloString.Name, - Location: tests.ContractHelloString.Filename, - } - state.Contracts().AddOrUpdate(c) - state.Networks().AddOrUpdate(config.EmulatorNetwork) - - d := config.Deployment{ - Network: config.EmulatorNetwork.Name, - Account: srvAcc.Name, - Contracts: []config.ContractDeployment{{ - Name: c.Name, - Args: nil, - }}, - } - state.Deployments().AddOrUpdate(d) - _, _, _ = flowkit.AddContract( - ctx, - srvAcc, - resourceToContract(tests.ContractHelloString), - UpdateExistingContract(false), - ) - - tx, err := flowkit.BuildTransaction( - ctx, - transactions.AddressesRoles{ - signer, - []flow.Address{signer}, - signer, - }, - srvAcc.Key.Index(), - Script{ - Code: tests.TransactionImports.Source, - Location: tests.TransactionImports.Filename, - }, - flow.DefaultTransactionGasLimit, - ) - - assert.NoError(t, err) - ftx := tx.FlowTransaction() - assert.Equal(t, - string(ftx.Script), - strings.ReplaceAll( - string(tests.TransactionImports.Source), - "import Hello from \"./contractHello.cdc\"", - fmt.Sprintf("import Hello from 0x%s", srvAcc.Address), - ), - ) - }) - - t.Run("Sign transaction", func(t *testing.T) { - t.Parallel() - state, flowkit := setupIntegration() - setupAccounts(state, flowkit) - - a, _ := state.Accounts().ByName("Alice") - - tx, err := flowkit.BuildTransaction( - ctx, - transactions.AddressesRoles{ - a.Address, - nil, - a.Address, - }, - 0, - Script{ - Code: tests.TransactionSimple.Source, - Location: tests.TransactionSimple.Filename, - }, - flow.DefaultTransactionGasLimit, - ) - - assert.Nil(t, err) - assert.NotNil(t, tx) - - txSigned, err := flowkit.SignTransactionPayload( - ctx, - a, - []byte(fmt.Sprintf("%x", tx.FlowTransaction().Encode())), - ) - assert.Nil(t, err) - assert.NotNil(t, txSigned) - assert.Equal(t, len(txSigned.FlowTransaction().Authorizers), 0) - assert.Equal(t, txSigned.FlowTransaction().Payer, a.Address) - assert.Equal(t, txSigned.FlowTransaction().ProposalKey.Address, a.Address) - assert.Equal(t, txSigned.FlowTransaction().ProposalKey.KeyIndex, 0) - assert.Equal(t, txSigned.FlowTransaction().Script, tests.TransactionSimple.Source) - }) - - t.Run("Build, Sign and Send Transaction", func(t *testing.T) { - t.Parallel() - state, flowkit := setupIntegration() - setupAccounts(state, flowkit) - - a, _ := state.Accounts().ByName("Alice") - - tx, err := flowkit.BuildTransaction( - ctx, - transactions.AddressesRoles{ - a.Address, - []flow.Address{a.Address}, - a.Address, - }, - 0, - Script{ - Code: tests.TransactionSingleAuth.Source, - Location: tests.TransactionSingleAuth.Filename, - }, - flow.DefaultTransactionGasLimit, - ) - - assert.Nil(t, err) - assert.NotNil(t, tx) - - txSigned, err := flowkit.SignTransactionPayload( - ctx, - a, - []byte(fmt.Sprintf("%x", tx.FlowTransaction().Encode())), - ) - assert.Nil(t, err) - assert.NotNil(t, txSigned) - - txSent, txResult, err := flowkit.SendSignedTransaction(ctx, txSigned) - assert.Nil(t, err) - assert.Equal(t, txResult.Status, flow.TransactionStatusSealed) - assert.NotNil(t, txSent.ID()) - }) - - t.Run("Fails signing transaction, wrong account", func(t *testing.T) { - t.Parallel() - state, flowkit := setupIntegration() - setupAccounts(state, flowkit) - - a, _ := state.Accounts().ByName("Alice") - - tx, err := flowkit.BuildTransaction( - ctx, - transactions.AddressesRoles{ - a.Address, - []flow.Address{a.Address}, - a.Address, - }, - 0, - Script{ - Code: tests.TransactionSingleAuth.Source, - Location: tests.TransactionSingleAuth.Filename, - }, - flow.DefaultTransactionGasLimit, - ) - - assert.Nil(t, err) - assert.NotNil(t, tx) - - // sign with wrong account - a, _ = state.Accounts().ByName("Bob") - - txSigned, err := flowkit.SignTransactionPayload( - ctx, - a, - []byte(fmt.Sprintf("%x", tx.FlowTransaction().Encode())), - ) - assert.EqualError(t, err, "not a valid signer 179b6b1cb6755e31, proposer: 01cf0e2f2f715450, payer: 01cf0e2f2f715450, authorizers: [01cf0e2f2f715450]") - assert.Nil(t, txSigned) - }) - - t.Run("Fails building, authorizers mismatch", func(t *testing.T) { - t.Parallel() - state, flowkit := setupIntegration() - setupAccounts(state, flowkit) - - a, _ := state.Accounts().ByName("Alice") - - tx, err := flowkit.BuildTransaction( - ctx, - transactions.AddressesRoles{ - Proposer: a.Address, - Authorizers: []flow.Address{a.Address}, - Payer: a.Address, - }, - 0, - Script{Code: tests.TransactionTwoAuth.Source, Location: tests.TransactionTwoAuth.Filename}, - flow.DefaultTransactionGasLimit, - ) - - assert.EqualError(t, err, "provided authorizers length mismatch, required authorizers 2, but provided 1") - assert.Nil(t, tx) - }) - - // TODO(sideninja) we should convert different variations of sending transaction to table tests - - t.Run("Send Transaction No Auths", func(t *testing.T) { - t.Parallel() - state, flowkit := setupIntegration() - setupAccounts(state, flowkit) - - a, _ := state.Accounts().ByName("Alice") - - tx, txr, err := flowkit.SendTransaction( - ctx, - transactions.AccountRoles{ - Proposer: *a, - Payer: *a, - }, - Script{ - Code: tests.TransactionSimple.Source, - Location: tests.TransactionSimple.Filename, - }, - flow.DefaultTransactionGasLimit, - ) - assert.NoError(t, err) - assert.Equal(t, tx.Payer.String(), a.Address.String()) - assert.Equal(t, tx.ProposalKey.KeyIndex, a.Key.Index()) - assert.Nil(t, txr.Error) - assert.Equal(t, txr.Status, flow.TransactionStatusSealed) - }) - - t.Run("Send Transaction With Auths", func(t *testing.T) { - t.Parallel() - state, flowkit := setupIntegration() - setupAccounts(state, flowkit) - - a, _ := state.Accounts().ByName("Alice") - - tx, txr, err := flowkit.SendTransaction( - ctx, - transactions.SingleAccountRole(*a), - Script{ - Code: tests.TransactionSingleAuth.Source, - Location: tests.TransactionSingleAuth.Filename, - }, - flow.DefaultTransactionGasLimit, - ) - assert.NoError(t, err) - assert.Equal(t, tx.Payer.String(), a.Address.String()) - assert.Equal(t, tx.ProposalKey.KeyIndex, a.Key.Index()) - assert.Nil(t, txr.Error) - assert.Equal(t, txr.Status, flow.TransactionStatusSealed) - }) - - t.Run("Send Transaction multiple account roles", func(t *testing.T) { - t.Parallel() - state, flowkit := setupIntegration() - setupAccounts(state, flowkit) - - a, _ := state.Accounts().ByName("Alice") - b, _ := state.Accounts().ByName("Bob") - c, _ := state.Accounts().ByName("Charlie") - - tx, txr, err := flowkit.SendTransaction( - ctx, - transactions.AccountRoles{ - Proposer: *a, - Authorizers: []accounts.Account{*c}, - Payer: *b, - }, - Script{ - Code: tests.TransactionSingleAuth.Source, - Location: tests.TransactionSingleAuth.Filename, - }, - flow.DefaultTransactionGasLimit, - ) - assert.NoError(t, err) - assert.Equal(t, tx.Payer.String(), b.Address.String()) - assert.Equal(t, tx.Authorizers[0].String(), c.Address.String()) - assert.Equal(t, tx.ProposalKey.KeyIndex, a.Key.Index()) - assert.Nil(t, txr.Error) - assert.Equal(t, txr.Status, flow.TransactionStatusSealed) - }) - - t.Run("Send Transaction two account roles", func(t *testing.T) { - t.Parallel() - state, flowkit := setupIntegration() - setupAccounts(state, flowkit) - - a, _ := state.Accounts().ByName("Alice") - b, _ := state.Accounts().ByName("Bob") - - tx, txr, err := flowkit.SendTransaction( - ctx, - transactions.AccountRoles{ - Proposer: *a, - Authorizers: []accounts.Account{*a}, - Payer: *b, - }, - Script{ - Code: tests.TransactionSingleAuth.Source, - Location: tests.TransactionSingleAuth.Filename, - }, - flow.DefaultTransactionGasLimit, - ) - assert.NoError(t, err) - assert.Equal(t, tx.Payer.String(), b.Address.String()) - assert.Equal(t, tx.Authorizers[0].String(), a.Address.String()) - assert.Equal(t, tx.ProposalKey.KeyIndex, a.Key.Index()) - assert.Nil(t, txr.Error) - assert.Equal(t, txr.Status, flow.TransactionStatusSealed) - }) - - t.Run("Send Transaction with arguments", func(t *testing.T) { - t.Parallel() - state, flowkit := setupIntegration() - setupAccounts(state, flowkit) - - a, _ := state.Accounts().ByName("Alice") - - tx, txr, err := flowkit.SendTransaction( - ctx, - transactions.SingleAccountRole(*a), - Script{ - Code: tests.TransactionArgString.Source, - Args: []cadence.Value{ - cadence.String("Bar"), - }, - Location: tests.TransactionArgString.Filename, - }, - flow.DefaultTransactionGasLimit, - ) - assert.NoError(t, err) - assert.Equal(t, tx.Payer.String(), a.Address.String()) - assert.Equal(t, tx.ProposalKey.KeyIndex, a.Key.Index()) - assert.Equal(t, fmt.Sprintf("%x", tx.Arguments), "[7b2276616c7565223a22426172222c2274797065223a22537472696e67227d]") - assert.Nil(t, txr.Error) - assert.Equal(t, txr.Status, flow.TransactionStatusSealed) - }) - - t.Run("Send transaction with multiple func declaration", func(t *testing.T) { - t.Parallel() - state, flowkit := setupIntegration() - setupAccounts(state, flowkit) - - a, _ := state.Accounts().ByName("Alice") - - tx, txr, err := flowkit.SendTransaction( - ctx, - transactions.SingleAccountRole(*a), - Script{ - Code: tests.TransactionMultipleDeclarations.Source, - Location: tests.TransactionMultipleDeclarations.Filename, - }, - flow.DefaultTransactionGasLimit, - ) - assert.NoError(t, err) - assert.Equal(t, tx.Payer.String(), a.Address.String()) - assert.Equal(t, tx.ProposalKey.KeyIndex, a.Key.Index()) - assert.Nil(t, txr.Error) - assert.Equal(t, txr.Status, flow.TransactionStatusSealed) - }) -} - -func Test_BlockQuery(t *testing.T) { - q, err := NewBlockQuery("latest") - assert.True(t, q.Latest) - assert.NoError(t, err) - - q, err = NewBlockQuery("100") - assert.Equal(t, uint64(100), q.Height) - assert.NoError(t, err) - - id := flow.HexToID("cba22b8c0830d0c86f83a187911a8a82ebd17e8dd95e5212ede0f8e5e2d4a908") - q, err = NewBlockQuery(id.String()) - assert.Equal(t, id, *q.ID) - assert.NoError(t, err) - - _, err = NewBlockQuery("invalid") - assert.EqualError(t, err, "invalid query: invalid, valid are: \"latest\", block height or block ID") -} diff --git a/flowkit/gateway/emulator.go b/flowkit/gateway/emulator.go deleted file mode 100644 index 7e6b0bbe1..000000000 --- a/flowkit/gateway/emulator.go +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package gateway - -import ( - "context" - "fmt" - - "github.com/onflow/cadence" - jsoncdc "github.com/onflow/cadence/encoding/json" - "github.com/onflow/cadence/runtime" - "github.com/onflow/flow-emulator/adapters" - "github.com/onflow/flow-emulator/emulator" - - "github.com/onflow/flow-go-sdk" - "github.com/onflow/flow-go-sdk/crypto" - flowGo "github.com/onflow/flow-go/model/flow" - "github.com/rs/zerolog" - "google.golang.org/grpc/status" -) - -type EmulatorKey struct { - PublicKey crypto.PublicKey - SigAlgo crypto.SignatureAlgorithm - HashAlgo crypto.HashAlgorithm -} - -type EmulatorGateway struct { - emulator *emulator.Blockchain - adapter *adapters.SDKAdapter - accessAdapter *adapters.AccessAdapter - ctx context.Context - logger *zerolog.Logger - emulatorOptions []emulator.Option -} - -func UnwrapStatusError(err error) error { - return fmt.Errorf(status.Convert(err).Message()) -} - -func NewEmulatorGateway(key *EmulatorKey) *EmulatorGateway { - return NewEmulatorGatewayWithOpts(key) -} - -func NewEmulatorGatewayWithOpts(key *EmulatorKey, opts ...func(*EmulatorGateway)) *EmulatorGateway { - noopLogger := zerolog.Nop() - gateway := &EmulatorGateway{ - ctx: context.Background(), - logger: &noopLogger, - emulatorOptions: []emulator.Option{}, - } - for _, opt := range opts { - opt(gateway) - } - - gateway.emulator = newEmulator(key, gateway.emulatorOptions...) - gateway.adapter = adapters.NewSDKAdapter(gateway.logger, gateway.emulator) - gateway.accessAdapter = adapters.NewAccessAdapter(gateway.logger, gateway.emulator) - gateway.emulator.EnableAutoMine() - return gateway -} - -func WithLogger(logger *zerolog.Logger) func(g *EmulatorGateway) { - return func(g *EmulatorGateway) { - g.logger = logger - } -} - -func WithEmulatorOptions(options ...emulator.Option) func(g *EmulatorGateway) { - return func(g *EmulatorGateway) { - g.emulatorOptions = append(g.emulatorOptions, options...) - } -} - -func (g *EmulatorGateway) SetContext(ctx context.Context) { - g.ctx = ctx -} - -func newEmulator(key *EmulatorKey, emulatorOptions ...emulator.Option) *emulator.Blockchain { - var opts []emulator.Option - - if key != nil { - opts = append(opts, emulator.WithServicePublicKey(key.PublicKey, key.SigAlgo, key.HashAlgo)) - } - - opts = append(opts, emulatorOptions...) - - b, err := emulator.New(opts...) - if err != nil { - panic(err) - } - - return b -} - -func (g *EmulatorGateway) GetAccount(address flow.Address) (*flow.Account, error) { - account, err := g.adapter.GetAccount(g.ctx, address) - if err != nil { - return nil, UnwrapStatusError(err) - } - return account, nil -} - -func (g *EmulatorGateway) SendSignedTransaction(tx *flow.Transaction) (*flow.Transaction, error) { - err := g.adapter.SendTransaction(context.Background(), *tx) - if err != nil { - return nil, UnwrapStatusError(err) - } - return tx, nil -} - -func (g *EmulatorGateway) GetTransactionResult(ID flow.Identifier, _ bool) (*flow.TransactionResult, error) { - result, err := g.adapter.GetTransactionResult(g.ctx, ID) - if err != nil { - return nil, UnwrapStatusError(err) - } - return result, nil -} - -func (g *EmulatorGateway) GetTransaction(id flow.Identifier) (*flow.Transaction, error) { - transaction, err := g.adapter.GetTransaction(g.ctx, id) - if err != nil { - return nil, UnwrapStatusError(err) - } - return transaction, nil -} - -func (g *EmulatorGateway) GetTransactionResultsByBlockID(id flow.Identifier) ([]*flow.TransactionResult, error) { - txr, err := g.adapter.GetTransactionResultsByBlockID(g.ctx, id) - if err != nil { - return nil, UnwrapStatusError(err) - } - return txr, nil -} - -func (g *EmulatorGateway) GetTransactionsByBlockID(id flow.Identifier) ([]*flow.Transaction, error) { - txr, err := g.adapter.GetTransactionsByBlockID(g.ctx, id) - if err != nil { - return nil, UnwrapStatusError(err) - } - return txr, nil -} - -func (g *EmulatorGateway) Ping() error { - err := g.adapter.Ping(g.ctx) - if err != nil { - return UnwrapStatusError(err) - } - return nil -} - -type scriptQuery struct { - id flow.Identifier - height uint64 - latest bool -} - -func (g *EmulatorGateway) executeScriptQuery( - script []byte, - arguments []cadence.Value, - query scriptQuery, -) (cadence.Value, error) { - args, err := cadenceValuesToMessages(arguments) - if err != nil { - return nil, UnwrapStatusError(err) - } - - var result []byte - if query.id != flow.EmptyID { - result, err = g.adapter.ExecuteScriptAtBlockID(g.ctx, query.id, script, args) - } else if query.height > 0 { - result, err = g.adapter.ExecuteScriptAtBlockHeight(g.ctx, query.height, script, args) - } else { - result, err = g.adapter.ExecuteScriptAtLatestBlock(g.ctx, script, args) - } - - if err != nil { - return nil, UnwrapStatusError(err) - } - - value, err := messageToCadenceValue(result) - if err != nil { - return nil, UnwrapStatusError(err) - } - - return value, nil -} - -func (g *EmulatorGateway) ExecuteScript( - script []byte, - arguments []cadence.Value, -) (cadence.Value, error) { - return g.executeScriptQuery(script, arguments, scriptQuery{latest: true}) -} - -func (g *EmulatorGateway) ExecuteScriptAtHeight( - script []byte, - arguments []cadence.Value, - height uint64, -) (cadence.Value, error) { - return g.executeScriptQuery(script, arguments, scriptQuery{height: height}) -} - -func (g *EmulatorGateway) ExecuteScriptAtID( - script []byte, - arguments []cadence.Value, - id flow.Identifier, -) (cadence.Value, error) { - return g.executeScriptQuery(script, arguments, scriptQuery{id: id}) -} - -func (g *EmulatorGateway) GetLatestBlock() (*flow.Block, error) { - block, _, err := g.adapter.GetLatestBlock(g.ctx, true) - if err != nil { - return nil, UnwrapStatusError(err) - } - - return block, nil -} - -func cadenceValuesToMessages(values []cadence.Value) ([][]byte, error) { - msgs := make([][]byte, len(values)) - for i, val := range values { - msg, err := jsoncdc.Encode(val) - if err != nil { - return nil, fmt.Errorf("convert: %w", err) - } - msgs[i] = msg - } - return msgs, nil -} - -func messageToCadenceValue(m []byte) (cadence.Value, error) { - v, err := jsoncdc.Decode(nil, m) - if err != nil { - return nil, fmt.Errorf("convert: %w", err) - } - - return v, nil -} - -func convertBlock(block *flowGo.Block) *flow.Block { - return &flow.Block{ - BlockHeader: flow.BlockHeader{ - ID: flow.Identifier(block.Header.ID()), - ParentID: flow.Identifier(block.Header.ParentID), - Height: block.Header.Height, - Timestamp: block.Header.Timestamp, - }, - BlockPayload: flow.BlockPayload{ - CollectionGuarantees: nil, - Seals: nil, - }, - } -} - -func (g *EmulatorGateway) GetEvents( - eventType string, - startHeight uint64, - endHeight uint64, -) ([]flow.BlockEvents, error) { - events := make([]flow.BlockEvents, 0) - - for height := startHeight; height <= endHeight; height++ { - events = append(events, g.getBlockEvent(height, eventType)) - } - - return events, nil -} - -func (g *EmulatorGateway) getBlockEvent(height uint64, eventType string) flow.BlockEvents { - events, _ := g.adapter.GetEventsForHeightRange(g.ctx, eventType, height, height) - return *events[0] -} - -func (g *EmulatorGateway) GetCollection(id flow.Identifier) (*flow.Collection, error) { - collection, err := g.adapter.GetCollectionByID(g.ctx, id) - if err != nil { - return nil, UnwrapStatusError(err) - } - return collection, nil -} - -func (g *EmulatorGateway) GetBlockByID(id flow.Identifier) (*flow.Block, error) { - block, _, err := g.adapter.GetBlockByID(g.ctx, id) - if err != nil { - return nil, UnwrapStatusError(err) - } - return block, nil -} - -func (g *EmulatorGateway) GetBlockByHeight(height uint64) (*flow.Block, error) { - block, _, err := g.adapter.GetBlockByHeight(g.ctx, height) - if err != nil { - return nil, UnwrapStatusError(err) - } - return block, nil -} - -func (g *EmulatorGateway) GetLatestProtocolStateSnapshot() ([]byte, error) { - snapshot, err := g.adapter.GetLatestProtocolStateSnapshot(g.ctx) - if err != nil { - return nil, UnwrapStatusError(err) - } - return snapshot, nil -} - -// SecureConnection placeholder func to complete gateway interface implementation -func (g *EmulatorGateway) SecureConnection() bool { - return false -} - -func (g *EmulatorGateway) CoverageReport() *runtime.CoverageReport { - return g.emulator.CoverageReport() -} - -func (g *EmulatorGateway) RollbackToBlockHeight(height uint64) error { - return g.emulator.RollbackToBlockHeight(height) -} diff --git a/flowkit/gateway/gateway.go b/flowkit/gateway/gateway.go deleted file mode 100644 index 7703e5710..000000000 --- a/flowkit/gateway/gateway.go +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package gateway - -import ( - "github.com/onflow/cadence" - "github.com/onflow/flow-go-sdk" -) - -//go:generate mockery --name=Gateway - -// Gateway describes blockchain access interface -type Gateway interface { - GetAccount(flow.Address) (*flow.Account, error) - SendSignedTransaction(*flow.Transaction) (*flow.Transaction, error) - GetTransaction(flow.Identifier) (*flow.Transaction, error) - GetTransactionResultsByBlockID(blockID flow.Identifier) ([]*flow.TransactionResult, error) - GetTransactionResult(flow.Identifier, bool) (*flow.TransactionResult, error) - GetTransactionsByBlockID(blockID flow.Identifier) ([]*flow.Transaction, error) - ExecuteScript([]byte, []cadence.Value) (cadence.Value, error) - ExecuteScriptAtHeight([]byte, []cadence.Value, uint64) (cadence.Value, error) - ExecuteScriptAtID([]byte, []cadence.Value, flow.Identifier) (cadence.Value, error) - GetLatestBlock() (*flow.Block, error) - GetBlockByHeight(uint64) (*flow.Block, error) - GetBlockByID(flow.Identifier) (*flow.Block, error) - GetEvents(string, uint64, uint64) ([]flow.BlockEvents, error) - GetCollection(flow.Identifier) (*flow.Collection, error) - GetLatestProtocolStateSnapshot() ([]byte, error) - Ping() error - SecureConnection() bool -} diff --git a/flowkit/gateway/grpc.go b/flowkit/gateway/grpc.go deleted file mode 100644 index e76704b77..000000000 --- a/flowkit/gateway/grpc.go +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package gateway - -import ( - "context" - "fmt" - "strings" - "time" - - "github.com/onflow/cadence" - "github.com/onflow/flow-go-sdk" - grpcAccess "github.com/onflow/flow-go-sdk/access/grpc" - "github.com/onflow/flow-go/utils/grpcutils" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" - - "github.com/onflow/flow-cli/flowkit/config" -) - -// maxGRPCMessageSize 60mb -const maxGRPCMessageSize = 1024 * 1024 * 60 - -// GrpcGateway is a gateway implementation that uses the Flow Access gRPC API. -type GrpcGateway struct { - client *grpcAccess.Client - ctx context.Context - secureClient bool -} - -// NewGrpcGateway returns a new gRPC gateway. -func NewGrpcGateway(network config.Network) (*GrpcGateway, error) { - - gClient, err := grpcAccess.NewClient( - network.Host, - grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxGRPCMessageSize)), - ) - ctx := context.Background() - - if err != nil || gClient == nil { - return nil, fmt.Errorf("failed to connect to host %s", network.Host) - } - - return &GrpcGateway{ - client: gClient, - ctx: ctx, - secureClient: false, - }, nil -} - -// NewSecureGrpcGateway returns a new gRPC gateway with a secure client connection. -func NewSecureGrpcGateway(network config.Network) (*GrpcGateway, error) { - secureDialOpts, err := grpcutils.SecureGRPCDialOpt(strings.TrimPrefix(network.Key, "0x")) - if err != nil { - return nil, fmt.Errorf("failed to create secure GRPC dial options with network key \"%s\": %w", network.Key, err) - } - - gClient, err := grpcAccess.NewClient( - network.Host, - secureDialOpts, - grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxGRPCMessageSize)), - ) - ctx := context.Background() - - if err != nil || gClient == nil { - return nil, fmt.Errorf("failed to connect to host %s", network.Host) - } - - return &GrpcGateway{ - client: gClient, - ctx: ctx, - secureClient: true, - }, nil -} - -// GetAccount gets an account by address from the Flow Access API. -func (g *GrpcGateway) GetAccount(address flow.Address) (*flow.Account, error) { - account, err := g.client.GetAccountAtLatestBlock(g.ctx, address) - if err != nil { - return nil, fmt.Errorf("failed to get account with address %s: %w", address, err) - } - - return account, nil -} - -// SendSignedTransaction sends a transaction to flow that is already prepared and signed. -func (g *GrpcGateway) SendSignedTransaction(tx *flow.Transaction) (*flow.Transaction, error) { - err := g.client.SendTransaction(g.ctx, *tx) - if err != nil { - return nil, fmt.Errorf("failed to submit transaction: %w", err) - } - - return tx, nil -} - -// GetTransaction gets a transaction by ID from the Flow Access API. -func (g *GrpcGateway) GetTransaction(ID flow.Identifier) (*flow.Transaction, error) { - return g.client.GetTransaction(g.ctx, ID) -} - -func (g *GrpcGateway) GetTransactionResultsByBlockID(blockID flow.Identifier) ([]*flow.TransactionResult, error) { - return g.client.GetTransactionResultsByBlockID(g.ctx, blockID) -} - -func (g *GrpcGateway) GetTransactionsByBlockID(blockID flow.Identifier) ([]*flow.Transaction, error) { - return g.client.GetTransactionsByBlockID(g.ctx, blockID) -} - -// GetTransactionResult gets a transaction result by ID from the Flow Access API. -func (g *GrpcGateway) GetTransactionResult(ID flow.Identifier, waitSeal bool) (*flow.TransactionResult, error) { - result, err := g.client.GetTransactionResult(g.ctx, ID) - if err != nil { - return nil, err - } - - if result.Status != flow.TransactionStatusSealed && waitSeal { - time.Sleep(time.Second) - return g.GetTransactionResult(ID, waitSeal) - } - - return result, nil -} - -// ExecuteScript executes a script on Flow through the Access API. -func (g *GrpcGateway) ExecuteScript(script []byte, arguments []cadence.Value) (cadence.Value, error) { - return g.client.ExecuteScriptAtLatestBlock(g.ctx, script, arguments) -} - -// ExecuteScriptAtHeight executes a script at block height. -func (g *GrpcGateway) ExecuteScriptAtHeight(script []byte, arguments []cadence.Value, height uint64) (cadence.Value, error) { - return g.client.ExecuteScriptAtBlockHeight(g.ctx, height, script, arguments) -} - -// ExecuteScriptAtID executes a script at block ID. -func (g *GrpcGateway) ExecuteScriptAtID(script []byte, arguments []cadence.Value, ID flow.Identifier) (cadence.Value, error) { - return g.client.ExecuteScriptAtBlockID(g.ctx, ID, script, arguments) -} - -// GetLatestBlock gets the latest block on Flow through the Access API. -func (g *GrpcGateway) GetLatestBlock() (*flow.Block, error) { - return g.client.GetLatestBlock(g.ctx, true) -} - -// GetBlockByID get block by ID from the Flow Access API. -func (g *GrpcGateway) GetBlockByID(id flow.Identifier) (*flow.Block, error) { - return g.client.GetBlockByID(g.ctx, id) -} - -// GetBlockByHeight get block by height from the Flow Access API. -func (g *GrpcGateway) GetBlockByHeight(height uint64) (*flow.Block, error) { - return g.client.GetBlockByHeight(g.ctx, height) -} - -// GetEvents gets events by name and block range from the Flow Access API. -func (g *GrpcGateway) GetEvents( - eventType string, - startHeight uint64, - endHeight uint64, -) ([]flow.BlockEvents, error) { - - events, err := g.client.GetEventsForHeightRange( - g.ctx, - eventType, - startHeight, - endHeight, - ) - - return events, err -} - -// GetCollection gets a collection by ID from the Flow Access API. -func (g *GrpcGateway) GetCollection(id flow.Identifier) (*flow.Collection, error) { - return g.client.GetCollection(g.ctx, id) -} - -// GetLatestProtocolStateSnapshot gets the latest finalized protocol state snapshot -func (g *GrpcGateway) GetLatestProtocolStateSnapshot() ([]byte, error) { - return g.client.GetLatestProtocolStateSnapshot(g.ctx) -} - -// Ping is used to check if the access node is alive and healthy. -func (g *GrpcGateway) Ping() error { - return g.client.Ping(g.ctx) -} - -// SecureConnection is used to log warning if a service should be using a secure client but is not -func (g *GrpcGateway) SecureConnection() bool { - return g.secureClient -} diff --git a/flowkit/gateway/mocks/Gateway.go b/flowkit/gateway/mocks/Gateway.go deleted file mode 100644 index 73453438e..000000000 --- a/flowkit/gateway/mocks/Gateway.go +++ /dev/null @@ -1,515 +0,0 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. - -package mocks - -import ( - cadence "github.com/onflow/cadence" - flow "github.com/onflow/flow-go-sdk" - - mock "github.com/stretchr/testify/mock" -) - -// Gateway is an autogenerated mock type for the Gateway type -type Gateway struct { - mock.Mock -} - -// ExecuteScript provides a mock function with given fields: _a0, _a1 -func (_m *Gateway) ExecuteScript(_a0 []byte, _a1 []cadence.Value) (cadence.Value, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for ExecuteScript") - } - - var r0 cadence.Value - var r1 error - if rf, ok := ret.Get(0).(func([]byte, []cadence.Value) (cadence.Value, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func([]byte, []cadence.Value) cadence.Value); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(cadence.Value) - } - } - - if rf, ok := ret.Get(1).(func([]byte, []cadence.Value) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ExecuteScriptAtHeight provides a mock function with given fields: _a0, _a1, _a2 -func (_m *Gateway) ExecuteScriptAtHeight(_a0 []byte, _a1 []cadence.Value, _a2 uint64) (cadence.Value, error) { - ret := _m.Called(_a0, _a1, _a2) - - if len(ret) == 0 { - panic("no return value specified for ExecuteScriptAtHeight") - } - - var r0 cadence.Value - var r1 error - if rf, ok := ret.Get(0).(func([]byte, []cadence.Value, uint64) (cadence.Value, error)); ok { - return rf(_a0, _a1, _a2) - } - if rf, ok := ret.Get(0).(func([]byte, []cadence.Value, uint64) cadence.Value); ok { - r0 = rf(_a0, _a1, _a2) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(cadence.Value) - } - } - - if rf, ok := ret.Get(1).(func([]byte, []cadence.Value, uint64) error); ok { - r1 = rf(_a0, _a1, _a2) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ExecuteScriptAtID provides a mock function with given fields: _a0, _a1, _a2 -func (_m *Gateway) ExecuteScriptAtID(_a0 []byte, _a1 []cadence.Value, _a2 flow.Identifier) (cadence.Value, error) { - ret := _m.Called(_a0, _a1, _a2) - - if len(ret) == 0 { - panic("no return value specified for ExecuteScriptAtID") - } - - var r0 cadence.Value - var r1 error - if rf, ok := ret.Get(0).(func([]byte, []cadence.Value, flow.Identifier) (cadence.Value, error)); ok { - return rf(_a0, _a1, _a2) - } - if rf, ok := ret.Get(0).(func([]byte, []cadence.Value, flow.Identifier) cadence.Value); ok { - r0 = rf(_a0, _a1, _a2) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(cadence.Value) - } - } - - if rf, ok := ret.Get(1).(func([]byte, []cadence.Value, flow.Identifier) error); ok { - r1 = rf(_a0, _a1, _a2) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetAccount provides a mock function with given fields: _a0 -func (_m *Gateway) GetAccount(_a0 flow.Address) (*flow.Account, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for GetAccount") - } - - var r0 *flow.Account - var r1 error - if rf, ok := ret.Get(0).(func(flow.Address) (*flow.Account, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(flow.Address) *flow.Account); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*flow.Account) - } - } - - if rf, ok := ret.Get(1).(func(flow.Address) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetBlockByHeight provides a mock function with given fields: _a0 -func (_m *Gateway) GetBlockByHeight(_a0 uint64) (*flow.Block, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for GetBlockByHeight") - } - - var r0 *flow.Block - var r1 error - if rf, ok := ret.Get(0).(func(uint64) (*flow.Block, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(uint64) *flow.Block); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*flow.Block) - } - } - - if rf, ok := ret.Get(1).(func(uint64) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetBlockByID provides a mock function with given fields: _a0 -func (_m *Gateway) GetBlockByID(_a0 flow.Identifier) (*flow.Block, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for GetBlockByID") - } - - var r0 *flow.Block - var r1 error - if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.Block, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(flow.Identifier) *flow.Block); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*flow.Block) - } - } - - if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetCollection provides a mock function with given fields: _a0 -func (_m *Gateway) GetCollection(_a0 flow.Identifier) (*flow.Collection, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for GetCollection") - } - - var r0 *flow.Collection - var r1 error - if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.Collection, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(flow.Identifier) *flow.Collection); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*flow.Collection) - } - } - - if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetEvents provides a mock function with given fields: _a0, _a1, _a2 -func (_m *Gateway) GetEvents(_a0 string, _a1 uint64, _a2 uint64) ([]flow.BlockEvents, error) { - ret := _m.Called(_a0, _a1, _a2) - - if len(ret) == 0 { - panic("no return value specified for GetEvents") - } - - var r0 []flow.BlockEvents - var r1 error - if rf, ok := ret.Get(0).(func(string, uint64, uint64) ([]flow.BlockEvents, error)); ok { - return rf(_a0, _a1, _a2) - } - if rf, ok := ret.Get(0).(func(string, uint64, uint64) []flow.BlockEvents); ok { - r0 = rf(_a0, _a1, _a2) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]flow.BlockEvents) - } - } - - if rf, ok := ret.Get(1).(func(string, uint64, uint64) error); ok { - r1 = rf(_a0, _a1, _a2) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetLatestBlock provides a mock function with given fields: -func (_m *Gateway) GetLatestBlock() (*flow.Block, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetLatestBlock") - } - - var r0 *flow.Block - var r1 error - if rf, ok := ret.Get(0).(func() (*flow.Block, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() *flow.Block); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*flow.Block) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetLatestProtocolStateSnapshot provides a mock function with given fields: -func (_m *Gateway) GetLatestProtocolStateSnapshot() ([]byte, error) { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetLatestProtocolStateSnapshot") - } - - var r0 []byte - var r1 error - if rf, ok := ret.Get(0).(func() ([]byte, error)); ok { - return rf() - } - if rf, ok := ret.Get(0).(func() []byte); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]byte) - } - } - - if rf, ok := ret.Get(1).(func() error); ok { - r1 = rf() - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetTransaction provides a mock function with given fields: _a0 -func (_m *Gateway) GetTransaction(_a0 flow.Identifier) (*flow.Transaction, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for GetTransaction") - } - - var r0 *flow.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(flow.Identifier) (*flow.Transaction, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(flow.Identifier) *flow.Transaction); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*flow.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetTransactionResult provides a mock function with given fields: _a0, _a1 -func (_m *Gateway) GetTransactionResult(_a0 flow.Identifier, _a1 bool) (*flow.TransactionResult, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for GetTransactionResult") - } - - var r0 *flow.TransactionResult - var r1 error - if rf, ok := ret.Get(0).(func(flow.Identifier, bool) (*flow.TransactionResult, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(flow.Identifier, bool) *flow.TransactionResult); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*flow.TransactionResult) - } - } - - if rf, ok := ret.Get(1).(func(flow.Identifier, bool) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetTransactionResultsByBlockID provides a mock function with given fields: blockID -func (_m *Gateway) GetTransactionResultsByBlockID(blockID flow.Identifier) ([]*flow.TransactionResult, error) { - ret := _m.Called(blockID) - - if len(ret) == 0 { - panic("no return value specified for GetTransactionResultsByBlockID") - } - - var r0 []*flow.TransactionResult - var r1 error - if rf, ok := ret.Get(0).(func(flow.Identifier) ([]*flow.TransactionResult, error)); ok { - return rf(blockID) - } - if rf, ok := ret.Get(0).(func(flow.Identifier) []*flow.TransactionResult); ok { - r0 = rf(blockID) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*flow.TransactionResult) - } - } - - if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok { - r1 = rf(blockID) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetTransactionsByBlockID provides a mock function with given fields: blockID -func (_m *Gateway) GetTransactionsByBlockID(blockID flow.Identifier) ([]*flow.Transaction, error) { - ret := _m.Called(blockID) - - if len(ret) == 0 { - panic("no return value specified for GetTransactionsByBlockID") - } - - var r0 []*flow.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(flow.Identifier) ([]*flow.Transaction, error)); ok { - return rf(blockID) - } - if rf, ok := ret.Get(0).(func(flow.Identifier) []*flow.Transaction); ok { - r0 = rf(blockID) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*flow.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(flow.Identifier) error); ok { - r1 = rf(blockID) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Ping provides a mock function with given fields: -func (_m *Gateway) Ping() error { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Ping") - } - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// SecureConnection provides a mock function with given fields: -func (_m *Gateway) SecureConnection() bool { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for SecureConnection") - } - - var r0 bool - if rf, ok := ret.Get(0).(func() bool); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// SendSignedTransaction provides a mock function with given fields: _a0 -func (_m *Gateway) SendSignedTransaction(_a0 *flow.Transaction) (*flow.Transaction, error) { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for SendSignedTransaction") - } - - var r0 *flow.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(*flow.Transaction) (*flow.Transaction, error)); ok { - return rf(_a0) - } - if rf, ok := ret.Get(0).(func(*flow.Transaction) *flow.Transaction); ok { - r0 = rf(_a0) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*flow.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(*flow.Transaction) error); ok { - r1 = rf(_a0) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewGateway creates a new instance of Gateway. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewGateway(t interface { - mock.TestingT - Cleanup(func()) -}) *Gateway { - mock := &Gateway{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/flowkit/gateway/mocks/gateway_mock.go b/flowkit/gateway/mocks/gateway_mock.go deleted file mode 100644 index cf847ffbc..000000000 --- a/flowkit/gateway/mocks/gateway_mock.go +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package mocks - -import ( - "github.com/onflow/cadence" - "github.com/onflow/flow-go-sdk" - "github.com/stretchr/testify/mock" - - "github.com/onflow/flow-cli/flowkit/tests" -) - -const ( - GetAccountFunc = "GetAccount" - SendSignedTransactionFunc = "SendSignedTransaction" - GetCollectionFunc = "GetCollection" - GetTransactionResultFunc = "GetTransactionResult" - GetEventsFunc = "GetEvents" - GetLatestBlockFunc = "GetLatestBlock" - GetBlockByHeightFunc = "GetBlockByHeight" - GetBlockByIDFunc = "GetBlockByID" - ExecuteScriptFunc = "ExecuteScript" - GetTransactionFunc = "GetTransaction" -) - -type TestGateway struct { - Mock *Gateway - SendSignedTransaction *mock.Call - GetAccount *mock.Call - GetCollection *mock.Call - GetTransactionResult *mock.Call - GetEvents *mock.Call - GetLatestBlock *mock.Call - GetBlockByHeight *mock.Call - GetBlockByID *mock.Call - ExecuteScript *mock.Call - GetTransaction *mock.Call - GetTransactionResultsByBlockID *mock.Call - GetTransactionsByBlockID *mock.Call - GetLatestProtocolStateSnapshot *mock.Call - Ping *mock.Call - SecureConnection *mock.Call -} - -func DefaultMockGateway() *TestGateway { - m := &Gateway{} - t := &TestGateway{ - Mock: m, - SendSignedTransaction: m.On( - SendSignedTransactionFunc, - mock.AnythingOfType("*flow.Transaction"), - ), - GetAccount: m.On( - GetAccountFunc, - mock.AnythingOfType("flow.Address"), - ), - GetCollection: m.On( - GetCollectionFunc, - mock.AnythingOfType("flow.Identifier"), - ), - GetTransactionResult: m.On( - GetTransactionResultFunc, - mock.AnythingOfType("flow.Identifier"), - mock.AnythingOfType("bool"), - ), - GetTransaction: m.On( - GetTransactionFunc, - mock.AnythingOfType("flow.Identifier"), - ), - GetEvents: m.On( - GetEventsFunc, - mock.AnythingOfType("string"), - mock.AnythingOfType("uint64"), - mock.AnythingOfType("uint64"), - ), - ExecuteScript: m.On( - ExecuteScriptFunc, - mock.AnythingOfType("[]uint8"), - mock.AnythingOfType("[]cadence.Value"), - ), - GetBlockByHeight: m.On(GetBlockByHeightFunc, mock.Anything), - GetBlockByID: m.On(GetBlockByIDFunc, mock.Anything), - GetLatestBlock: m.On(GetLatestBlockFunc), - } - - // default return values - t.SendSignedTransaction.Run(func(args mock.Arguments) { - t.SendSignedTransaction.Return(tests.NewTransaction(), nil) - }) - - t.GetAccount.Run(func(args mock.Arguments) { - addr := args.Get(0).(flow.Address) - t.GetAccount.Return(tests.NewAccountWithAddress(addr.String()), nil) - }) - - t.ExecuteScript.Run(func(args mock.Arguments) { - t.ExecuteScript.Return(cadence.MustConvertValue(""), nil) - }) - - t.GetTransaction.Return(tests.NewTransaction(), nil) - t.GetCollection.Return(tests.NewCollection(), nil) - t.GetTransactionResult.Return(tests.NewTransactionResult(nil), nil) - t.GetEvents.Return([]flow.BlockEvents{}, nil) - t.GetLatestBlock.Return(tests.NewBlock(), nil) - t.GetBlockByHeight.Return(tests.NewBlock(), nil) - t.GetBlockByID.Return(tests.NewBlock(), nil) - - return t -} diff --git a/flowkit/go.mod b/flowkit/go.mod deleted file mode 100644 index 46d2f1329..000000000 --- a/flowkit/go.mod +++ /dev/null @@ -1,218 +0,0 @@ -module github.com/onflow/flow-cli/flowkit - -go 1.20 - -require ( - github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 - github.com/ethereum/go-ethereum v1.13.5 - github.com/gosuri/uilive v0.0.4 - github.com/invopop/jsonschema v0.7.0 - github.com/lmars/go-slip10 v0.0.0-20190606092855-400ba44fee12 - github.com/onflow/cadence v1.0.0-M4 - github.com/onflow/crypto v0.25.0 - github.com/onflow/flow-emulator v1.0.0-M1 - github.com/onflow/flow-go v0.33.2-0.20240126211806-97279f96695f - github.com/onflow/flow-go-sdk v1.0.0-M1 - github.com/pkg/errors v0.9.1 - github.com/rs/zerolog v1.29.0 - github.com/spf13/afero v1.10.0 - github.com/stretchr/testify v1.8.4 - github.com/thoas/go-funk v0.9.2 - github.com/tyler-smith/go-bip39 v1.1.0 - golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc - gonum.org/v1/gonum v0.13.0 - google.golang.org/grpc v1.59.0 -) - -require ( - cloud.google.com/go/compute v1.23.1 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.3 // indirect - cloud.google.com/go/kms v1.15.5 // indirect - github.com/DataDog/zstd v1.5.2 // indirect - github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e // indirect - github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec // indirect - github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/SaveTheRbtz/mph v0.1.1-0.20240117162131-4166ec7869bc // indirect - github.com/StackExchange/wmi v1.2.1 // indirect - github.com/VictoriaMetrics/fastcache v1.12.1 // indirect - github.com/beorn7/perks v1.0.1 // indirect - github.com/bits-and-blooms/bitset v1.7.0 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.2.1 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cmars/basen v0.0.0-20150613233007-fe3947df716e // indirect - github.com/cockroachdb/errors v1.9.1 // indirect - github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 // indirect - github.com/cockroachdb/redact v1.1.3 // indirect - github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/consensys/bavard v0.1.13 // indirect - github.com/consensys/gnark-crypto v0.12.1 // indirect - github.com/coreos/go-semver v0.3.0 // indirect - github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect - github.com/deckarep/golang-set/v2 v2.1.0 // indirect - github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect - github.com/dgraph-io/badger/v2 v2.2007.4 // indirect - github.com/dgraph-io/ristretto v0.1.0 // indirect - github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 // indirect - github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect - github.com/dustin/go-humanize v1.0.1 // indirect - github.com/ef-ds/deque v1.0.4 // indirect - github.com/ethereum/c-kzg-4844 v0.4.0 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/fxamacker/cbor/v2 v2.4.1-0.20230228173756-c0c9f774e40c // indirect - github.com/fxamacker/circlehash v0.3.0 // indirect - github.com/getsentry/sentry-go v0.18.0 // indirect - github.com/glebarez/go-sqlite v1.22.0 // indirect - github.com/go-logr/logr v1.2.4 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-redis/redis/v8 v8.11.5 // indirect - github.com/go-stack/stack v1.8.1 // indirect - github.com/gofrs/flock v0.8.1 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.2 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect - github.com/google/s2a-go v0.1.7 // indirect - github.com/google/uuid v1.5.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.0 // indirect - github.com/gorilla/websocket v1.5.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect - github.com/hashicorp/golang-lru/v2 v2.0.2 // indirect - github.com/hashicorp/hcl v1.0.0 // indirect - github.com/holiman/bloomfilter/v2 v2.0.3 // indirect - github.com/holiman/uint256 v1.2.3 // indirect - github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 // indirect - github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/ipfs/bbloom v0.0.4 // indirect - github.com/ipfs/go-block-format v0.1.2 // indirect - github.com/ipfs/go-cid v0.4.1 // indirect - github.com/ipfs/go-datastore v0.6.0 // indirect - github.com/ipfs/go-ipfs-blockstore v1.3.0 // indirect - github.com/ipfs/go-ipfs-ds-help v1.1.0 // indirect - github.com/ipfs/go-ipfs-util v0.0.2 // indirect - github.com/ipfs/go-ipld-format v0.5.0 // indirect - github.com/ipfs/go-log v1.0.5 // indirect - github.com/ipfs/go-log/v2 v2.5.1 // indirect - github.com/ipfs/go-metrics-interface v0.0.1 // indirect - github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect - github.com/jbenet/goprocess v0.1.4 // indirect - github.com/k0kubun/pp v3.0.1+incompatible // indirect - github.com/kevinburke/go-bindata v3.24.0+incompatible // indirect - github.com/klauspost/compress v1.16.5 // indirect - github.com/klauspost/cpuid/v2 v2.2.5 // indirect - github.com/kr/pretty v0.3.1 // indirect - github.com/kr/text v0.2.0 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/libp2p/go-libp2p v0.28.1 // indirect - github.com/logrusorgru/aurora v2.0.3+incompatible // indirect - github.com/logrusorgru/aurora/v4 v4.0.0 // indirect - github.com/magiconair/properties v1.8.7 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/minio/sha256-simd v1.0.1 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/mmcloughlin/addchain v0.4.0 // indirect - github.com/mr-tron/base58 v1.2.0 // indirect - github.com/multiformats/go-base32 v0.1.0 // indirect - github.com/multiformats/go-base36 v0.2.0 // indirect - github.com/multiformats/go-multiaddr v0.9.0 // indirect - github.com/multiformats/go-multibase v0.2.0 // indirect - github.com/multiformats/go-multicodec v0.9.0 // indirect - github.com/multiformats/go-multihash v0.2.3 // indirect - github.com/multiformats/go-multistream v0.4.1 // indirect - github.com/multiformats/go-varint v0.0.7 // indirect - github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f // indirect - github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.1-0.20240125214229-b7a95136dd0d // indirect - github.com/onflow/flow-core-contracts/lib/go/templates v0.15.1-0.20240125214229-b7a95136dd0d // indirect - github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20240125205519-2e80d9b4bd01 // indirect - github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240125205553-d2b571fb3fad // indirect - github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2 // indirect - github.com/onflow/sdks v0.5.1-0.20230912225508-b35402f12bba // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect - github.com/pelletier/go-toml/v2 v2.0.6 // indirect - github.com/pierrec/lz4 v2.6.1+incompatible // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.16.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect - github.com/psiemens/graceland v1.0.0 // indirect - github.com/psiemens/sconfig v0.1.0 // indirect - github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect - github.com/rivo/uniseg v0.4.4 // indirect - github.com/rogpeppe/go-internal v1.9.0 // indirect - github.com/sethvargo/go-retry v0.2.3 // indirect - github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect - github.com/slok/go-http-metrics v0.10.0 // indirect - github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/spf13/cast v1.5.0 // indirect - github.com/spf13/cobra v1.8.0 // indirect - github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.15.0 // indirect - github.com/stretchr/objx v0.5.0 // indirect - github.com/subosito/gotenv v1.4.2 // indirect - github.com/supranational/blst v0.3.11 // indirect - github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect - github.com/texttheater/golang-levenshtein/levenshtein v0.0.0-20200805054039-cae8b0eaed6c // indirect - github.com/tklauser/go-sysconf v0.3.12 // indirect - github.com/tklauser/numcpus v0.6.1 // indirect - github.com/turbolent/prettier v0.0.0-20220320183459-661cc755135d // indirect - github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect - github.com/vmihailenco/msgpack/v4 v4.3.11 // indirect - github.com/vmihailenco/tagparser v0.1.1 // indirect - github.com/x448/float16 v0.8.4 // indirect - github.com/zeebo/blake3 v0.2.3 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel v1.16.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0 // indirect - go.opentelemetry.io/otel/metric v1.16.0 // indirect - go.opentelemetry.io/otel/sdk v1.16.0 // indirect - go.opentelemetry.io/otel/trace v1.16.0 // indirect - go.opentelemetry.io/proto/otlp v0.19.0 // indirect - go.uber.org/atomic v1.11.0 // indirect - go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.24.0 // indirect - golang.org/x/crypto v0.17.0 // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.19.0 // indirect - golang.org/x/oauth2 v0.13.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.15.0 // indirect - golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.16.1 // indirect - golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect - google.golang.org/api v0.151.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect - launchpad.net/gocheck v0.0.0-20140225173054-000000000087 // indirect - lukechampine.com/blake3 v1.2.1 // indirect - modernc.org/libc v1.37.6 // indirect - modernc.org/mathutil v1.6.0 // indirect - modernc.org/memory v1.7.2 // indirect - modernc.org/sqlite v1.28.0 // indirect - rsc.io/tmplfunc v0.0.3 // indirect -) diff --git a/flowkit/go.sum b/flowkit/go.sum deleted file mode 100644 index a97c7ab52..000000000 --- a/flowkit/go.sum +++ /dev/null @@ -1,3162 +0,0 @@ -cloud.google.com/go v0.0.0-20170206221025-ce650573d812/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= -cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= -cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= -cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= -cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= -cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -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.1/go.mod h1:fs4QogzfH5n2pBXBP9vRiU+eCny7lD2vmFZy79Iuw1U= -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/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= -cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= -cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY= -cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw= -cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= -cloud.google.com/go v0.110.6/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= -cloud.google.com/go v0.110.7/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= -cloud.google.com/go v0.110.8 h1:tyNdfIxjzaWctIiLYOTalaLKZ17SI44SKFW26QbOhME= -cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk= -cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= -cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= -cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= -cloud.google.com/go/accessapproval v1.7.1/go.mod h1:JYczztsHRMK7NTXb6Xw+dwbs/WnOJxbo/2mTI+Kgg68= -cloud.google.com/go/accessapproval v1.7.2/go.mod h1:/gShiq9/kK/h8T/eEn1BTzalDvk0mZxJlhfw0p+Xuc0= -cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= -cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= -cloud.google.com/go/accesscontextmanager v1.6.0/go.mod h1:8XCvZWfYw3K/ji0iVnp+6pu7huxoQTLmxAbVjbloTtM= -cloud.google.com/go/accesscontextmanager v1.7.0/go.mod h1:CEGLewx8dwa33aDAZQujl7Dx+uYhS0eay198wB/VumQ= -cloud.google.com/go/accesscontextmanager v1.8.0/go.mod h1:uI+AI/r1oyWK99NN8cQ3UK76AMelMzgZCvJfsi2c+ps= -cloud.google.com/go/accesscontextmanager v1.8.1/go.mod h1:JFJHfvuaTC+++1iL1coPiG1eu5D24db2wXCDWDjIrxo= -cloud.google.com/go/accesscontextmanager v1.8.2/go.mod h1:E6/SCRM30elQJ2PKtFMs2YhfJpZSNcJyejhuzoId4Zk= -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/aiplatform v1.27.0/go.mod h1:Bvxqtl40l0WImSb04d0hXFU7gDOiq9jQmorivIiWcKg= -cloud.google.com/go/aiplatform v1.35.0/go.mod h1:7MFT/vCaOyZT/4IIFfxH4ErVg/4ku6lKv3w0+tFTgXQ= -cloud.google.com/go/aiplatform v1.36.1/go.mod h1:WTm12vJRPARNvJ+v6P52RDHCNe4AhvjcIZ/9/RRHy/k= -cloud.google.com/go/aiplatform v1.37.0/go.mod h1:IU2Cv29Lv9oCn/9LkFiiuKfwrRTq+QQMbW+hPCxJGZw= -cloud.google.com/go/aiplatform v1.45.0/go.mod h1:Iu2Q7sC7QGhXUeOhAj/oCK9a+ULz1O4AotZiqjQ8MYA= -cloud.google.com/go/aiplatform v1.48.0/go.mod h1:Iu2Q7sC7QGhXUeOhAj/oCK9a+ULz1O4AotZiqjQ8MYA= -cloud.google.com/go/aiplatform v1.50.0/go.mod h1:IRc2b8XAMTa9ZmfJV1BCCQbieWWvDnP1A8znyz5N7y4= -cloud.google.com/go/aiplatform v1.51.0/go.mod h1:IRc2b8XAMTa9ZmfJV1BCCQbieWWvDnP1A8znyz5N7y4= -cloud.google.com/go/aiplatform v1.51.1/go.mod h1:kY3nIMAVQOK2XDqDPHaOuD9e+FdMA6OOpfBjsvaFSOo= -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/analytics v0.17.0/go.mod h1:WXFa3WSym4IZ+JiKmavYdJwGG/CvpqiqczmL59bTD9M= -cloud.google.com/go/analytics v0.18.0/go.mod h1:ZkeHGQlcIPkw0R/GW+boWHhCOR43xz9RN/jn7WcqfIE= -cloud.google.com/go/analytics v0.19.0/go.mod h1:k8liqf5/HCnOUkbawNtrWWc+UAzyDlW89doe8TtoDsE= -cloud.google.com/go/analytics v0.21.2/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N9RlEkYFHpQo= -cloud.google.com/go/analytics v0.21.3/go.mod h1:U8dcUtmDmjrmUTnnnRnI4m6zKn/yaA5N9RlEkYFHpQo= -cloud.google.com/go/analytics v0.21.4/go.mod h1:zZgNCxLCy8b2rKKVfC1YkC2vTrpfZmeRCySM3aUbskA= -cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= -cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= -cloud.google.com/go/apigateway v1.5.0/go.mod h1:GpnZR3Q4rR7LVu5951qfXPJCHquZt02jf7xQx7kpqN8= -cloud.google.com/go/apigateway v1.6.1/go.mod h1:ufAS3wpbRjqfZrzpvLC2oh0MFlpRJm2E/ts25yyqmXA= -cloud.google.com/go/apigateway v1.6.2/go.mod h1:CwMC90nnZElorCW63P2pAYm25AtQrHfuOkbRSHj0bT8= -cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= -cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= -cloud.google.com/go/apigeeconnect v1.5.0/go.mod h1:KFaCqvBRU6idyhSNyn3vlHXc8VMDJdRmwDF6JyFRqZ8= -cloud.google.com/go/apigeeconnect v1.6.1/go.mod h1:C4awq7x0JpLtrlQCr8AzVIzAaYgngRqWf9S5Uhg+wWs= -cloud.google.com/go/apigeeconnect v1.6.2/go.mod h1:s6O0CgXT9RgAxlq3DLXvG8riw8PYYbU/v25jqP3Dy18= -cloud.google.com/go/apigeeregistry v0.4.0/go.mod h1:EUG4PGcsZvxOXAdyEghIdXwAEi/4MEaoqLMLDMIwKXY= -cloud.google.com/go/apigeeregistry v0.5.0/go.mod h1:YR5+s0BVNZfVOUkMa5pAR2xGd0A473vA5M7j247o1wM= -cloud.google.com/go/apigeeregistry v0.6.0/go.mod h1:BFNzW7yQVLZ3yj0TKcwzb8n25CFBri51GVGOEUcgQsc= -cloud.google.com/go/apigeeregistry v0.7.1/go.mod h1:1XgyjZye4Mqtw7T9TsY4NW10U7BojBvG4RMD+vRDrIw= -cloud.google.com/go/apigeeregistry v0.7.2/go.mod h1:9CA2B2+TGsPKtfi3F7/1ncCCsL62NXBRfM6iPoGSM+8= -cloud.google.com/go/apikeys v0.4.0/go.mod h1:XATS/yqZbaBK0HOssf+ALHp8jAlNHUgyfprvNcBIszU= -cloud.google.com/go/apikeys v0.5.0/go.mod h1:5aQfwY4D+ewMMWScd3hm2en3hCj+BROlyrt3ytS7KLI= -cloud.google.com/go/apikeys v0.6.0/go.mod h1:kbpXu5upyiAlGkKrJgQl8A0rKNNJ7dQ377pdroRSSi8= -cloud.google.com/go/appengine v1.4.0/go.mod h1:CS2NhuBuDXM9f+qscZ6V86m1MIIqPj3WC/UoEuR1Sno= -cloud.google.com/go/appengine v1.5.0/go.mod h1:TfasSozdkFI0zeoxW3PTBLiNqRmzraodCWatWI9Dmak= -cloud.google.com/go/appengine v1.6.0/go.mod h1:hg6i0J/BD2cKmDJbaFSYHFyZkgBEfQrDg/X0V5fJn84= -cloud.google.com/go/appengine v1.7.0/go.mod h1:eZqpbHFCqRGa2aCdope7eC0SWLV1j0neb/QnMJVWx6A= -cloud.google.com/go/appengine v1.7.1/go.mod h1:IHLToyb/3fKutRysUlFO0BPt5j7RiQ45nrzEJmKTo6E= -cloud.google.com/go/appengine v1.8.1/go.mod h1:6NJXGLVhZCN9aQ/AEDvmfzKEfoYBlfB80/BHiKVputY= -cloud.google.com/go/appengine v1.8.2/go.mod h1:WMeJV9oZ51pvclqFN2PqHoGnys7rK0rz6s3Mp6yMvDo= -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/area120 v0.7.0/go.mod h1:a3+8EUD1SX5RUcCs3MY5YasiO1z6yLiNLRiFrykbynY= -cloud.google.com/go/area120 v0.7.1/go.mod h1:j84i4E1RboTWjKtZVWXPqvK5VHQFJRF2c1Nm69pWm9k= -cloud.google.com/go/area120 v0.8.1/go.mod h1:BVfZpGpB7KFVNxPiQBuHkX6Ed0rS51xIgmGyjrAfzsg= -cloud.google.com/go/area120 v0.8.2/go.mod h1:a5qfo+x77SRLXnCynFWPUZhnZGeSgvQ+Y0v1kSItkh4= -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/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= -cloud.google.com/go/artifactregistry v1.9.0/go.mod h1:2K2RqvA2CYvAeARHRkLDhMDJ3OXy26h3XW+3/Jh2uYc= -cloud.google.com/go/artifactregistry v1.11.1/go.mod h1:lLYghw+Itq9SONbCa1YWBoWs1nOucMH0pwXN1rOBZFI= -cloud.google.com/go/artifactregistry v1.11.2/go.mod h1:nLZns771ZGAwVLzTX/7Al6R9ehma4WUEhZGWV6CeQNQ= -cloud.google.com/go/artifactregistry v1.12.0/go.mod h1:o6P3MIvtzTOnmvGagO9v/rOjjA0HmhJ+/6KAXrmYDCI= -cloud.google.com/go/artifactregistry v1.13.0/go.mod h1:uy/LNfoOIivepGhooAUpL1i30Hgee3Cu0l4VTWHUC08= -cloud.google.com/go/artifactregistry v1.14.1/go.mod h1:nxVdG19jTaSTu7yA7+VbWL346r3rIdkZ142BSQqhn5E= -cloud.google.com/go/artifactregistry v1.14.2/go.mod h1:Xk+QbsKEb0ElmyeMfdHAey41B+qBq3q5R5f5xD4XT3U= -cloud.google.com/go/artifactregistry v1.14.3/go.mod h1:A2/E9GXnsyXl7GUvQ/2CjHA+mVRoWAXC0brg2os+kNI= -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/asset v1.9.0/go.mod h1:83MOE6jEJBMqFKadM9NLRcs80Gdw76qGuHn8m3h8oHQ= -cloud.google.com/go/asset v1.10.0/go.mod h1:pLz7uokL80qKhzKr4xXGvBQXnzHn5evJAEAtZiIb0wY= -cloud.google.com/go/asset v1.11.1/go.mod h1:fSwLhbRvC9p9CXQHJ3BgFeQNM4c9x10lqlrdEUYXlJo= -cloud.google.com/go/asset v1.12.0/go.mod h1:h9/sFOa4eDIyKmH6QMpm4eUK3pDojWnUhTgJlk762Hg= -cloud.google.com/go/asset v1.13.0/go.mod h1:WQAMyYek/b7NBpYq/K4KJWcRqzoalEsxz/t/dTk4THw= -cloud.google.com/go/asset v1.14.1/go.mod h1:4bEJ3dnHCqWCDbWJ/6Vn7GVI9LerSi7Rfdi03hd+WTQ= -cloud.google.com/go/asset v1.15.0/go.mod h1:tpKafV6mEut3+vN9ScGvCHXHj7FALFVta+okxFECHcg= -cloud.google.com/go/asset v1.15.1/go.mod h1:yX/amTvFWRpp5rcFq6XbCxzKT8RJUam1UoboE179jU4= -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/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= -cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= -cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJkE5+PAVNhdQm4ZVq2E= -cloud.google.com/go/assuredworkloads v1.11.1/go.mod h1:+F04I52Pgn5nmPG36CWFtxmav6+7Q+c5QyJoL18Lry0= -cloud.google.com/go/assuredworkloads v1.11.2/go.mod h1:O1dfr+oZJMlE6mw0Bp0P1KZSlj5SghMBvTpZqIcUAW4= -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/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= -cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM= -cloud.google.com/go/automl v1.12.0/go.mod h1:tWDcHDp86aMIuHmyvjuKeeHEGq76lD7ZqfGLN6B0NuU= -cloud.google.com/go/automl v1.13.1/go.mod h1:1aowgAHWYZU27MybSCFiukPO7xnyawv7pt3zK4bheQE= -cloud.google.com/go/automl v1.13.2/go.mod h1:gNY/fUmDEN40sP8amAX3MaXkxcqPIn7F1UIIPZpy4Mg= -cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= -cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= -cloud.google.com/go/baremetalsolution v0.5.0/go.mod h1:dXGxEkmR9BMwxhzBhV0AioD0ULBmuLZI8CdwalUxuss= -cloud.google.com/go/baremetalsolution v1.1.1/go.mod h1:D1AV6xwOksJMV4OSlWHtWuFNZZYujJknMAP4Qa27QIA= -cloud.google.com/go/baremetalsolution v1.2.0/go.mod h1:68wi9AwPYkEWIUT4SvSGS9UJwKzNpshjHsH4lzk8iOw= -cloud.google.com/go/baremetalsolution v1.2.1/go.mod h1:3qKpKIw12RPXStwQXcbhfxVj1dqQGEvcmA+SX/mUR88= -cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= -cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= -cloud.google.com/go/batch v0.7.0/go.mod h1:vLZN95s6teRUqRQ4s3RLDsH8PvboqBK+rn1oevL159g= -cloud.google.com/go/batch v1.3.1/go.mod h1:VguXeQKXIYaeeIYbuozUmBR13AfL4SJP7IltNPS+A4A= -cloud.google.com/go/batch v1.4.1/go.mod h1:KdBmDD61K0ovcxoRHGrN6GmOBWeAOyCgKD0Mugx4Fkk= -cloud.google.com/go/batch v1.5.0/go.mod h1:KdBmDD61K0ovcxoRHGrN6GmOBWeAOyCgKD0Mugx4Fkk= -cloud.google.com/go/batch v1.5.1/go.mod h1:RpBuIYLkQu8+CWDk3dFD/t/jOCGuUpkpX+Y0n1Xccs8= -cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= -cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= -cloud.google.com/go/beyondcorp v0.4.0/go.mod h1:3ApA0mbhHx6YImmuubf5pyW8srKnCEPON32/5hj+RmM= -cloud.google.com/go/beyondcorp v0.5.0/go.mod h1:uFqj9X+dSfrheVp7ssLTaRHd2EHqSL4QZmH4e8WXGGU= -cloud.google.com/go/beyondcorp v0.6.1/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4= -cloud.google.com/go/beyondcorp v1.0.0/go.mod h1:YhxDWw946SCbmcWo3fAhw3V4XZMSpQ/VYfcKGAEU8/4= -cloud.google.com/go/beyondcorp v1.0.1/go.mod h1:zl/rWWAFVeV+kx+X2Javly7o1EIQThU4WlkynffL/lk= -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/bigquery v1.43.0/go.mod h1:ZMQcXHsl+xmU1z36G2jNGZmKp9zNY5BUua5wDgmNCfw= -cloud.google.com/go/bigquery v1.44.0/go.mod h1:0Y33VqXTEsbamHJvJHdFmtqHvMIY28aK1+dFsvaChGc= -cloud.google.com/go/bigquery v1.47.0/go.mod h1:sA9XOgy0A8vQK9+MWhEQTY6Tix87M/ZurWFIxmF9I/E= -cloud.google.com/go/bigquery v1.48.0/go.mod h1:QAwSz+ipNgfL5jxiaK7weyOhzdoAy1zFm0Nf1fysJac= -cloud.google.com/go/bigquery v1.49.0/go.mod h1:Sv8hMmTFFYBlt/ftw2uN6dFdQPzBlREY9yBh7Oy7/4Q= -cloud.google.com/go/bigquery v1.50.0/go.mod h1:YrleYEh2pSEbgTBZYMJ5SuSr0ML3ypjRB1zgf7pvQLU= -cloud.google.com/go/bigquery v1.52.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4= -cloud.google.com/go/bigquery v1.53.0/go.mod h1:3b/iXjRQGU4nKa87cXeg6/gogLjO8C6PmuM8i5Bi/u4= -cloud.google.com/go/bigquery v1.55.0/go.mod h1:9Y5I3PN9kQWuid6183JFhOGOW3GcirA5LpsKCUn+2ec= -cloud.google.com/go/bigquery v1.56.0/go.mod h1:KDcsploXTEY7XT3fDQzMUZlpQLHzE4itubHrnmhUrZA= -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/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= -cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOArInEiD5Y= -cloud.google.com/go/billing v1.12.0/go.mod h1:yKrZio/eu+okO/2McZEbch17O5CB5NpZhhXG6Z766ss= -cloud.google.com/go/billing v1.13.0/go.mod h1:7kB2W9Xf98hP9Sr12KfECgfGclsH3CQR0R08tnRlRbc= -cloud.google.com/go/billing v1.16.0/go.mod h1:y8vx09JSSJG02k5QxbycNRrN7FGZB6F3CAcgum7jvGA= -cloud.google.com/go/billing v1.17.0/go.mod h1:Z9+vZXEq+HwH7bhJkyI4OQcR6TSbeMrjlpEjO2vzY64= -cloud.google.com/go/billing v1.17.1/go.mod h1:Z9+vZXEq+HwH7bhJkyI4OQcR6TSbeMrjlpEjO2vzY64= -cloud.google.com/go/billing v1.17.2/go.mod h1:u/AdV/3wr3xoRBk5xvUzYMS1IawOAPwQMuHgHMdljDg= -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/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= -cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= -cloud.google.com/go/binaryauthorization v1.5.0/go.mod h1:OSe4OU1nN/VswXKRBmciKpo9LulY41gch5c68htf3/Q= -cloud.google.com/go/binaryauthorization v1.6.1/go.mod h1:TKt4pa8xhowwffiBmbrbcxijJRZED4zrqnwZ1lKH51U= -cloud.google.com/go/binaryauthorization v1.7.0/go.mod h1:Zn+S6QqTMn6odcMU1zDZCJxPjU2tZPV1oDl45lWY154= -cloud.google.com/go/binaryauthorization v1.7.1/go.mod h1:GTAyfRWYgcbsP3NJogpV3yeunbUIjx2T9xVeYovtURE= -cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= -cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= -cloud.google.com/go/certificatemanager v1.6.0/go.mod h1:3Hh64rCKjRAX8dXgRAyOcY5vQ/fE1sh8o+Mdd6KPgY8= -cloud.google.com/go/certificatemanager v1.7.1/go.mod h1:iW8J3nG6SaRYImIa+wXQ0g8IgoofDFRp5UMzaNk1UqI= -cloud.google.com/go/certificatemanager v1.7.2/go.mod h1:15SYTDQMd00kdoW0+XY5d9e+JbOPjp24AvF48D8BbcQ= -cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= -cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= -cloud.google.com/go/channel v1.11.0/go.mod h1:IdtI0uWGqhEeatSB62VOoJ8FSUhJ9/+iGkJVqp74CGE= -cloud.google.com/go/channel v1.12.0/go.mod h1:VkxCGKASi4Cq7TbXxlaBezonAYpp1GCnKMY6tnMQnLU= -cloud.google.com/go/channel v1.16.0/go.mod h1:eN/q1PFSl5gyu0dYdmxNXscY/4Fi7ABmeHCJNf/oHmc= -cloud.google.com/go/channel v1.17.0/go.mod h1:RpbhJsGi/lXWAUM1eF4IbQGbsfVlg2o8Iiy2/YLfVT0= -cloud.google.com/go/channel v1.17.1/go.mod h1:xqfzcOZAcP4b/hUDH0GkGg1Sd5to6di1HOJn/pi5uBQ= -cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= -cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= -cloud.google.com/go/cloudbuild v1.6.0/go.mod h1:UIbc/w9QCbH12xX+ezUsgblrWv+Cv4Tw83GiSMHOn9M= -cloud.google.com/go/cloudbuild v1.7.0/go.mod h1:zb5tWh2XI6lR9zQmsm1VRA+7OCuve5d8S+zJUul8KTg= -cloud.google.com/go/cloudbuild v1.9.0/go.mod h1:qK1d7s4QlO0VwfYn5YuClDGg2hfmLZEb4wQGAbIgL1s= -cloud.google.com/go/cloudbuild v1.10.1/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= -cloud.google.com/go/cloudbuild v1.13.0/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= -cloud.google.com/go/cloudbuild v1.14.0/go.mod h1:lyJg7v97SUIPq4RC2sGsz/9tNczhyv2AjML/ci4ulzU= -cloud.google.com/go/cloudbuild v1.14.1/go.mod h1:K7wGc/3zfvmYWOWwYTgF/d/UVJhS4pu+HAy7PL7mCsU= -cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= -cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= -cloud.google.com/go/clouddms v1.5.0/go.mod h1:QSxQnhikCLUw13iAbffF2CZxAER3xDGNHjsTAkQJcQA= -cloud.google.com/go/clouddms v1.6.1/go.mod h1:Ygo1vL52Ov4TBZQquhz5fiw2CQ58gvu+PlS6PVXCpZI= -cloud.google.com/go/clouddms v1.7.0/go.mod h1:MW1dC6SOtI/tPNCciTsXtsGNEM0i0OccykPvv3hiYeM= -cloud.google.com/go/clouddms v1.7.1/go.mod h1:o4SR8U95+P7gZ/TX+YbJxehOCsM+fe6/brlrFquiszk= -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/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= -cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQkydWzwVMdHxrI= -cloud.google.com/go/cloudtasks v1.9.0/go.mod h1:w+EyLsVkLWHcOaqNEyvcKAsWp9p29dL6uL9Nst1cI7Y= -cloud.google.com/go/cloudtasks v1.10.0/go.mod h1:NDSoTLkZ3+vExFEWu2UJV1arUyzVDAiZtdWcsUyNwBs= -cloud.google.com/go/cloudtasks v1.11.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8oHwpmFsKspEvM= -cloud.google.com/go/cloudtasks v1.12.1/go.mod h1:a9udmnou9KO2iulGscKR0qBYjreuX8oHwpmFsKspEvM= -cloud.google.com/go/cloudtasks v1.12.2/go.mod h1:A7nYkjNlW2gUoROg1kvJrQGhJP/38UaWwsnuBDOBVUk= -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.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= -cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= -cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= -cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= -cloud.google.com/go/compute v1.19.0/go.mod h1:rikpw2y+UMidAe9tISo04EHNOIf42RLYF/q8Bs93scU= -cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= -cloud.google.com/go/compute v1.19.3/go.mod h1:qxvISKp/gYnXkSAD1ppcSOveRAmzxicEv/JlizULFrI= -cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= -cloud.google.com/go/compute v1.21.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= -cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= -cloud.google.com/go/compute v1.23.1 h1:V97tBoDaZHb6leicZ1G6DLK2BAaZLJ/7+9BB/En3hR0= -cloud.google.com/go/compute v1.23.1/go.mod h1:CqB3xpmPKKt3OJpW2ndFIXnA9A4xAy/F3Xp1ixncW78= -cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= -cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= -cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= -cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= -cloud.google.com/go/contactcenterinsights v1.6.0/go.mod h1:IIDlT6CLcDoyv79kDv8iWxMSTZhLxSCofVV5W6YFM/w= -cloud.google.com/go/contactcenterinsights v1.9.1/go.mod h1:bsg/R7zGLYMVxFFzfh9ooLTruLRCG9fnzhH9KznHhbM= -cloud.google.com/go/contactcenterinsights v1.10.0/go.mod h1:bsg/R7zGLYMVxFFzfh9ooLTruLRCG9fnzhH9KznHhbM= -cloud.google.com/go/contactcenterinsights v1.11.0/go.mod h1:hutBdImE4XNZ1NV4vbPJKSFOnQruhC5Lj9bZqWMTKiU= -cloud.google.com/go/contactcenterinsights v1.11.1/go.mod h1:FeNP3Kg8iteKM80lMwSk3zZZKVxr+PGnAId6soKuXwE= -cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= -cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= -cloud.google.com/go/container v1.13.1/go.mod h1:6wgbMPeQRw9rSnKBCAJXnds3Pzj03C4JHamr8asWKy4= -cloud.google.com/go/container v1.14.0/go.mod h1:3AoJMPhHfLDxLvrlVWaK57IXzaPnLaZq63WX59aQBfM= -cloud.google.com/go/container v1.15.0/go.mod h1:ft+9S0WGjAyjDggg5S06DXj+fHJICWg8L7isCQe9pQA= -cloud.google.com/go/container v1.22.1/go.mod h1:lTNExE2R7f+DLbAN+rJiKTisauFCaoDq6NURZ83eVH4= -cloud.google.com/go/container v1.24.0/go.mod h1:lTNExE2R7f+DLbAN+rJiKTisauFCaoDq6NURZ83eVH4= -cloud.google.com/go/container v1.26.0/go.mod h1:YJCmRet6+6jnYYRS000T6k0D0xUXQgBSaJ7VwI8FBj4= -cloud.google.com/go/container v1.26.1/go.mod h1:5smONjPRUxeEpDG7bMKWfDL4sauswqEtnBK1/KKpR04= -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/containeranalysis v0.7.0/go.mod h1:9aUL+/vZ55P2CXfuZjS4UjQ9AgXoSw8Ts6lemfmxBxI= -cloud.google.com/go/containeranalysis v0.9.0/go.mod h1:orbOANbwk5Ejoom+s+DUCTTJ7IBdBQJDcSylAx/on9s= -cloud.google.com/go/containeranalysis v0.10.1/go.mod h1:Ya2jiILITMY68ZLPaogjmOMNkwsDrWBSTyBubGXO7j0= -cloud.google.com/go/containeranalysis v0.11.0/go.mod h1:4n2e99ZwpGxpNcz+YsFT1dfOHPQFGcAC8FN2M2/ne/U= -cloud.google.com/go/containeranalysis v0.11.1/go.mod h1:rYlUOM7nem1OJMKwE1SadufX0JP3wnXj844EtZAwWLY= -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/datacatalog v1.7.0/go.mod h1:9mEl4AuDYWw81UGc41HonIHH7/sn52H0/tc8f8ZbZIE= -cloud.google.com/go/datacatalog v1.8.0/go.mod h1:KYuoVOv9BM8EYz/4eMFxrr4DUKhGIOXxZoKYF5wdISM= -cloud.google.com/go/datacatalog v1.8.1/go.mod h1:RJ58z4rMp3gvETA465Vg+ag8BGgBdnRPEMMSTr5Uv+M= -cloud.google.com/go/datacatalog v1.12.0/go.mod h1:CWae8rFkfp6LzLumKOnmVh4+Zle4A3NXLzVJ1d1mRm0= -cloud.google.com/go/datacatalog v1.13.0/go.mod h1:E4Rj9a5ZtAxcQJlEBTLgMTphfP11/lNaAshpoBgemX8= -cloud.google.com/go/datacatalog v1.14.0/go.mod h1:h0PrGtlihoutNMp/uvwhawLQ9+c63Kz65UFqh49Yo+E= -cloud.google.com/go/datacatalog v1.14.1/go.mod h1:d2CevwTG4yedZilwe+v3E3ZBDRMobQfSG/a6cCCN5R4= -cloud.google.com/go/datacatalog v1.16.0/go.mod h1:d2CevwTG4yedZilwe+v3E3ZBDRMobQfSG/a6cCCN5R4= -cloud.google.com/go/datacatalog v1.17.1/go.mod h1:nCSYFHgtxh2MiEktWIz71s/X+7ds/UT9kp0PC7waCzE= -cloud.google.com/go/datacatalog v1.18.0/go.mod h1:nCSYFHgtxh2MiEktWIz71s/X+7ds/UT9kp0PC7waCzE= -cloud.google.com/go/datacatalog v1.18.1/go.mod h1:TzAWaz+ON1tkNr4MOcak8EBHX7wIRX/gZKM+yTVsv+A= -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/dataflow v0.8.0/go.mod h1:Rcf5YgTKPtQyYz8bLYhFoIV/vP39eL7fWNcSOyFfLJE= -cloud.google.com/go/dataflow v0.9.1/go.mod h1:Wp7s32QjYuQDWqJPFFlnBKhkAtiFpMTdg00qGbnIHVw= -cloud.google.com/go/dataflow v0.9.2/go.mod h1:vBfdBZ/ejlTaYIGB3zB4T08UshH70vbtZeMD+urnUSo= -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/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= -cloud.google.com/go/dataform v0.6.0/go.mod h1:QPflImQy33e29VuapFdf19oPbE4aYTJxr31OAPV+ulA= -cloud.google.com/go/dataform v0.7.0/go.mod h1:7NulqnVozfHvWUBpMDfKMUESr+85aJsC/2O0o3jWPDE= -cloud.google.com/go/dataform v0.8.1/go.mod h1:3BhPSiw8xmppbgzeBbmDvmSWlwouuJkXsXsb8UBih9M= -cloud.google.com/go/dataform v0.8.2/go.mod h1:X9RIqDs6NbGPLR80tnYoPNiO1w0wenKTb8PxxlhTMKM= -cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= -cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= -cloud.google.com/go/datafusion v1.6.0/go.mod h1:WBsMF8F1RhSXvVM8rCV3AeyWVxcC2xY6vith3iw3S+8= -cloud.google.com/go/datafusion v1.7.1/go.mod h1:KpoTBbFmoToDExJUso/fcCiguGDk7MEzOWXUsJo0wsI= -cloud.google.com/go/datafusion v1.7.2/go.mod h1:62K2NEC6DRlpNmI43WHMWf9Vg/YvN6QVi8EVwifElI0= -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/datalabeling v0.7.0/go.mod h1:WPQb1y08RJbmpM3ww0CSUAGweL0SxByuW2E+FU+wXcM= -cloud.google.com/go/datalabeling v0.8.1/go.mod h1:XS62LBSVPbYR54GfYQsPXZjTW8UxCK2fkDciSrpRFdY= -cloud.google.com/go/datalabeling v0.8.2/go.mod h1:cyDvGHuJWu9U/cLDA7d8sb9a0tWLEletStu2sTmg3BE= -cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= -cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= -cloud.google.com/go/dataplex v1.5.2/go.mod h1:cVMgQHsmfRoI5KFYq4JtIBEUbYwc3c7tXmIDhRmNNVQ= -cloud.google.com/go/dataplex v1.6.0/go.mod h1:bMsomC/aEJOSpHXdFKFGQ1b0TDPIeL28nJObeO1ppRs= -cloud.google.com/go/dataplex v1.8.1/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= -cloud.google.com/go/dataplex v1.9.0/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= -cloud.google.com/go/dataplex v1.9.1/go.mod h1:7TyrDT6BCdI8/38Uvp0/ZxBslOslP2X2MPDucliyvSE= -cloud.google.com/go/dataplex v1.10.1/go.mod h1:1MzmBv8FvjYfc7vDdxhnLFNskikkB+3vl475/XdCDhs= -cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= -cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= -cloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4= -cloud.google.com/go/dataproc/v2 v2.0.1/go.mod h1:7Ez3KRHdFGcfY7GcevBbvozX+zyWGcwLJvvAMwCaoZ4= -cloud.google.com/go/dataproc/v2 v2.2.0/go.mod h1:lZR7AQtwZPvmINx5J87DSOOpTfof9LVZju6/Qo4lmcY= -cloud.google.com/go/dataproc/v2 v2.2.1/go.mod h1:QdAJLaBjh+l4PVlVZcmrmhGccosY/omC1qwfQ61Zv/o= -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/dataqna v0.7.0/go.mod h1:Lx9OcIIeqCrw1a6KdO3/5KMP1wAmTc0slZWwP12Qq3c= -cloud.google.com/go/dataqna v0.8.1/go.mod h1:zxZM0Bl6liMePWsHA8RMGAfmTG34vJMapbHAxQ5+WA8= -cloud.google.com/go/dataqna v0.8.2/go.mod h1:KNEqgx8TTmUipnQsScOoDpq/VlXVptUqVMZnt30WAPs= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW2J1gcgUfmdM= -cloud.google.com/go/datastore v1.11.0/go.mod h1:TvGxBIHCS50u8jzG+AW/ppf87v1of8nwzFNgEZU1D3c= -cloud.google.com/go/datastore v1.12.0/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= -cloud.google.com/go/datastore v1.12.1/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= -cloud.google.com/go/datastore v1.13.0/go.mod h1:KjdB88W897MRITkvWWJrg2OUtrR5XVj1EoLgSp6/N70= -cloud.google.com/go/datastore v1.14.0/go.mod h1:GAeStMBIt9bPS7jMJA85kgkpsMkvseWWXiaHya9Jes8= -cloud.google.com/go/datastore v1.15.0/go.mod h1:GAeStMBIt9bPS7jMJA85kgkpsMkvseWWXiaHya9Jes8= -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/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= -cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2/XoS5yi88q4= -cloud.google.com/go/datastream v1.6.0/go.mod h1:6LQSuswqLa7S4rPAOZFVjHIG3wJIjZcZrw8JDEDJuIs= -cloud.google.com/go/datastream v1.7.0/go.mod h1:uxVRMm2elUSPuh65IbZpzJNMbuzkcvu5CjMqVIUHrww= -cloud.google.com/go/datastream v1.9.1/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZIcZIEl8h43Q= -cloud.google.com/go/datastream v1.10.0/go.mod h1:hqnmr8kdUBmrnk65k5wNRoHSCYksvpdZIcZIEl8h43Q= -cloud.google.com/go/datastream v1.10.1/go.mod h1:7ngSYwnw95YFyTd5tOGBxHlOZiL+OtpjheqU7t2/s/c= -cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= -cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= -cloud.google.com/go/deploy v1.6.0/go.mod h1:f9PTHehG/DjCom3QH0cntOVRm93uGBDt2vKzAPwpXQI= -cloud.google.com/go/deploy v1.8.0/go.mod h1:z3myEJnA/2wnB4sgjqdMfgxCA0EqC3RBTNcVPs93mtQ= -cloud.google.com/go/deploy v1.11.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCNCeyl0F2g= -cloud.google.com/go/deploy v1.13.0/go.mod h1:tKuSUV5pXbn67KiubiUNUejqLs4f5cxxiCNCeyl0F2g= -cloud.google.com/go/deploy v1.13.1/go.mod h1:8jeadyLkH9qu9xgO3hVWw8jVr29N1mnW42gRJT8GY6g= -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/dialogflow v1.18.0/go.mod h1:trO7Zu5YdyEuR+BhSNOqJezyFQ3aUzz0njv7sMx/iek= -cloud.google.com/go/dialogflow v1.19.0/go.mod h1:JVmlG1TwykZDtxtTXujec4tQ+D8SBFMoosgy+6Gn0s0= -cloud.google.com/go/dialogflow v1.29.0/go.mod h1:b+2bzMe+k1s9V+F2jbJwpHPzrnIyHihAdRFMtn2WXuM= -cloud.google.com/go/dialogflow v1.31.0/go.mod h1:cuoUccuL1Z+HADhyIA7dci3N5zUssgpBJmCzI6fNRB4= -cloud.google.com/go/dialogflow v1.32.0/go.mod h1:jG9TRJl8CKrDhMEcvfcfFkkpp8ZhgPz3sBGmAUYJ2qE= -cloud.google.com/go/dialogflow v1.38.0/go.mod h1:L7jnH+JL2mtmdChzAIcXQHXMvQkE3U4hTaNltEuxXn4= -cloud.google.com/go/dialogflow v1.40.0/go.mod h1:L7jnH+JL2mtmdChzAIcXQHXMvQkE3U4hTaNltEuxXn4= -cloud.google.com/go/dialogflow v1.43.0/go.mod h1:pDUJdi4elL0MFmt1REMvFkdsUTYSHq+rTCS8wg0S3+M= -cloud.google.com/go/dialogflow v1.44.0/go.mod h1:pDUJdi4elL0MFmt1REMvFkdsUTYSHq+rTCS8wg0S3+M= -cloud.google.com/go/dialogflow v1.44.1/go.mod h1:n/h+/N2ouKOO+rbe/ZnI186xImpqvCVj2DdsWS/0EAk= -cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= -cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= -cloud.google.com/go/dlp v1.9.0/go.mod h1:qdgmqgTyReTz5/YNSSuueR8pl7hO0o9bQ39ZhtgkWp4= -cloud.google.com/go/dlp v1.10.1/go.mod h1:IM8BWz1iJd8njcNcG0+Kyd9OPnqnRNkDV8j42VT5KOI= -cloud.google.com/go/dlp v1.10.2/go.mod h1:ZbdKIhcnyhILgccwVDzkwqybthh7+MplGC3kZVZsIOQ= -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/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= -cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc0ZvxxfQY1bg4= -cloud.google.com/go/documentai v1.16.0/go.mod h1:o0o0DLTEZ+YnJZ+J4wNfTxmDVyrkzFvttBXXtYRMHkM= -cloud.google.com/go/documentai v1.18.0/go.mod h1:F6CK6iUH8J81FehpskRmhLq/3VlwQvb7TvwOceQ2tbs= -cloud.google.com/go/documentai v1.20.0/go.mod h1:yJkInoMcK0qNAEdRnqY/D5asy73tnPe88I1YTZT+a8E= -cloud.google.com/go/documentai v1.22.0/go.mod h1:yJkInoMcK0qNAEdRnqY/D5asy73tnPe88I1YTZT+a8E= -cloud.google.com/go/documentai v1.22.1/go.mod h1:LKs22aDHbJv7ufXuPypzRO7rG3ALLJxzdCXDPutw4Qc= -cloud.google.com/go/documentai v1.23.0/go.mod h1:LKs22aDHbJv7ufXuPypzRO7rG3ALLJxzdCXDPutw4Qc= -cloud.google.com/go/documentai v1.23.2/go.mod h1:Q/wcRT+qnuXOpjAkvOV4A+IeQl04q2/ReT7SSbytLSo= -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/domains v0.8.0/go.mod h1:M9i3MMDzGFXsydri9/vW+EWz9sWb4I6WyHqdlAk0idE= -cloud.google.com/go/domains v0.9.1/go.mod h1:aOp1c0MbejQQ2Pjf1iJvnVyT+z6R6s8pX66KaCSDYfE= -cloud.google.com/go/domains v0.9.2/go.mod h1:3YvXGYzZG1Temjbk7EyGCuGGiXHJwVNmwIf+E/cUp5I= -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/edgecontainer v0.3.0/go.mod h1:FLDpP4nykgwwIfcLt6zInhprzw0lEi2P1fjO6Ie0qbc= -cloud.google.com/go/edgecontainer v1.0.0/go.mod h1:cttArqZpBB2q58W/upSG++ooo6EsblxDIolxa3jSjbY= -cloud.google.com/go/edgecontainer v1.1.1/go.mod h1:O5bYcS//7MELQZs3+7mabRqoWQhXCzenBu0R8bz2rwk= -cloud.google.com/go/edgecontainer v1.1.2/go.mod h1:wQRjIzqxEs9e9wrtle4hQPSR1Y51kqN75dgF7UllZZ4= -cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= -cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= -cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= -cloud.google.com/go/essentialcontacts v1.5.0/go.mod h1:ay29Z4zODTuwliK7SnX8E86aUF2CTzdNtvv42niCX0M= -cloud.google.com/go/essentialcontacts v1.6.2/go.mod h1:T2tB6tX+TRak7i88Fb2N9Ok3PvY3UNbUsMag9/BARh4= -cloud.google.com/go/essentialcontacts v1.6.3/go.mod h1:yiPCD7f2TkP82oJEFXFTou8Jl8L6LBRPeBEkTaO0Ggo= -cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= -cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= -cloud.google.com/go/eventarc v1.10.0/go.mod h1:u3R35tmZ9HvswGRBnF48IlYgYeBcPUCjkr4BTdem2Kw= -cloud.google.com/go/eventarc v1.11.0/go.mod h1:PyUjsUKPWoRBCHeOxZd/lbOOjahV41icXyUY5kSTvVY= -cloud.google.com/go/eventarc v1.12.1/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8aMx3sRJiAI= -cloud.google.com/go/eventarc v1.13.0/go.mod h1:mAFCW6lukH5+IZjkvrEss+jmt2kOdYlN8aMx3sRJiAI= -cloud.google.com/go/eventarc v1.13.1/go.mod h1:EqBxmGHFrruIara4FUQ3RHlgfCn7yo1HYsu2Hpt/C3Y= -cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= -cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= -cloud.google.com/go/filestore v1.5.0/go.mod h1:FqBXDWBp4YLHqRnVGveOkHDf8svj9r5+mUDLupOWEDs= -cloud.google.com/go/filestore v1.6.0/go.mod h1:di5unNuss/qfZTw2U9nhFqo8/ZDSc466dre85Kydllg= -cloud.google.com/go/filestore v1.7.1/go.mod h1:y10jsorq40JJnjR/lQ8AfFbbcGlw3g+Dp8oN7i7FjV4= -cloud.google.com/go/filestore v1.7.2/go.mod h1:TYOlyJs25f/omgj+vY7/tIG/E7BX369triSPzE4LdgE= -cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= -cloud.google.com/go/firestore v1.11.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= -cloud.google.com/go/firestore v1.12.0/go.mod h1:b38dKhgzlmNNGTNZZwe7ZRFEuRab1Hay3/DBsIGKKy4= -cloud.google.com/go/firestore v1.13.0/go.mod h1:QojqqOh8IntInDUSTAh0c8ZsPYAr68Ma8c5DWOy8xb8= -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/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= -cloud.google.com/go/functions v1.9.0/go.mod h1:Y+Dz8yGguzO3PpIjhLTbnqV1CWmgQ5UwtlpzoyquQ08= -cloud.google.com/go/functions v1.10.0/go.mod h1:0D3hEOe3DbEvCXtYOZHQZmD+SzYsi1YbI7dGvHfldXw= -cloud.google.com/go/functions v1.12.0/go.mod h1:AXWGrF3e2C/5ehvwYo/GH6O5s09tOPksiKhz+hH8WkA= -cloud.google.com/go/functions v1.13.0/go.mod h1:EU4O007sQm6Ef/PwRsI8N2umygGqPBS/IZQKBQBcJ3c= -cloud.google.com/go/functions v1.15.1/go.mod h1:P5yNWUTkyU+LvW/S9O6V+V423VZooALQlqoXdoPz5AE= -cloud.google.com/go/functions v1.15.2/go.mod h1:CHAjtcR6OU4XF2HuiVeriEdELNcnvRZSk1Q8RMqy4lE= -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/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= -cloud.google.com/go/gaming v1.8.0/go.mod h1:xAqjS8b7jAVW0KFYeRUxngo9My3f33kFmua++Pi+ggM= -cloud.google.com/go/gaming v1.9.0/go.mod h1:Fc7kEmCObylSWLO334NcO+O9QMDyz+TKC4v1D7X+Bc0= -cloud.google.com/go/gaming v1.10.1/go.mod h1:XQQvtfP8Rb9Rxnxm5wFVpAp9zCQkJi2bLIb7iHGwB3s= -cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60= -cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo= -cloud.google.com/go/gkebackup v0.4.0/go.mod h1:byAyBGUwYGEEww7xsbnUTBHIYcOPy/PgUWUtOeRm9Vg= -cloud.google.com/go/gkebackup v1.3.0/go.mod h1:vUDOu++N0U5qs4IhG1pcOnD1Mac79xWy6GoBFlWCWBU= -cloud.google.com/go/gkebackup v1.3.1/go.mod h1:vUDOu++N0U5qs4IhG1pcOnD1Mac79xWy6GoBFlWCWBU= -cloud.google.com/go/gkebackup v1.3.2/go.mod h1:OMZbXzEJloyXMC7gqdSB+EOEQ1AKcpGYvO3s1ec5ixk= -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/gkeconnect v0.7.0/go.mod h1:SNfmVqPkaEi3bF/B3CNZOAYPYdg7sU+obZ+QTky2Myw= -cloud.google.com/go/gkeconnect v0.8.1/go.mod h1:KWiK1g9sDLZqhxB2xEuPV8V9NYzrqTUmQR9shJHpOZw= -cloud.google.com/go/gkeconnect v0.8.2/go.mod h1:6nAVhwchBJYgQCXD2pHBFQNiJNyAd/wyxljpaa6ZPrY= -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/gkehub v0.11.0/go.mod h1:JOWHlmN+GHyIbuWQPl47/C2RFhnFKH38jH9Ascu3n0E= -cloud.google.com/go/gkehub v0.12.0/go.mod h1:djiIwwzTTBrF5NaXCGv3mf7klpEMcST17VBTVVDcuaw= -cloud.google.com/go/gkehub v0.14.1/go.mod h1:VEXKIJZ2avzrbd7u+zeMtW00Y8ddk/4V9511C9CQGTY= -cloud.google.com/go/gkehub v0.14.2/go.mod h1:iyjYH23XzAxSdhrbmfoQdePnlMj2EWcvnR+tHdBQsCY= -cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= -cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= -cloud.google.com/go/gkemulticloud v0.5.0/go.mod h1:W0JDkiyi3Tqh0TJr//y19wyb1yf8llHVto2Htf2Ja3Y= -cloud.google.com/go/gkemulticloud v0.6.1/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZViRnxWK2DVknXWfw= -cloud.google.com/go/gkemulticloud v1.0.0/go.mod h1:kbZ3HKyTsiwqKX7Yw56+wUGwwNZViRnxWK2DVknXWfw= -cloud.google.com/go/gkemulticloud v1.0.1/go.mod h1:AcrGoin6VLKT/fwZEYuqvVominLriQBCKmbjtnbMjG8= -cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= -cloud.google.com/go/grafeas v0.3.0/go.mod h1:P7hgN24EyONOTMyeJH6DxG4zD7fwiYa5Q6GUgyFSOU8= -cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= -cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= -cloud.google.com/go/gsuiteaddons v1.5.0/go.mod h1:TFCClYLd64Eaa12sFVmUyG62tk4mdIsI7pAnSXRkcFo= -cloud.google.com/go/gsuiteaddons v1.6.1/go.mod h1:CodrdOqRZcLp5WOwejHWYBjZvfY0kOphkAKpF/3qdZY= -cloud.google.com/go/gsuiteaddons v1.6.2/go.mod h1:K65m9XSgs8hTF3X9nNTPi8IQueljSdYo9F+Mi+s4MyU= -cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= -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.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= -cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= -cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE= -cloud.google.com/go/iam v0.11.0/go.mod h1:9PiLDanza5D+oWFZiH1uG+RnRCfEGKoyl6yo4cgWZGY= -cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY= -cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= -cloud.google.com/go/iam v1.0.1/go.mod h1:yR3tmSL8BcZB4bxByRv2jkSIahVmCtfKZwLYGBalRE8= -cloud.google.com/go/iam v1.1.0/go.mod h1:nxdHjaKfCr7fNYx/HJMM8LgiMugmveWlkatear5gVyk= -cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= -cloud.google.com/go/iam v1.1.2/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= -cloud.google.com/go/iam v1.1.3 h1:18tKG7DzydKWUnLjonWcJO6wjSCAtzh4GcRKlH/Hrzc= -cloud.google.com/go/iam v1.1.3/go.mod h1:3khUlaBXfPKKe7huYgEpDn6FtgRyMEqbkvBxrQyY5SE= -cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= -cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= -cloud.google.com/go/iap v1.6.0/go.mod h1:NSuvI9C/j7UdjGjIde7t7HBz+QTwBcapPE07+sSRcLk= -cloud.google.com/go/iap v1.7.0/go.mod h1:beqQx56T9O1G1yNPph+spKpNibDlYIiIixiqsQXxLIo= -cloud.google.com/go/iap v1.7.1/go.mod h1:WapEwPc7ZxGt2jFGB/C/bm+hP0Y6NXzOYGjpPnmMS74= -cloud.google.com/go/iap v1.8.1/go.mod h1:sJCbeqg3mvWLqjZNsI6dfAtbbV1DL2Rl7e1mTyXYREQ= -cloud.google.com/go/iap v1.9.0/go.mod h1:01OFxd1R+NFrg78S+hoPV5PxEzv22HXaNqUUlmNHFuY= -cloud.google.com/go/iap v1.9.1/go.mod h1:SIAkY7cGMLohLSdBR25BuIxO+I4fXJiL06IBL7cy/5Q= -cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= -cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= -cloud.google.com/go/ids v1.3.0/go.mod h1:JBdTYwANikFKaDP6LtW5JAi4gubs57SVNQjemdt6xV4= -cloud.google.com/go/ids v1.4.1/go.mod h1:np41ed8YMU8zOgv53MMMoCntLTn2lF+SUzlM+O3u/jw= -cloud.google.com/go/ids v1.4.2/go.mod h1:3vw8DX6YddRu9BncxuzMyWn0g8+ooUjI2gslJ7FH3vk= -cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= -cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= -cloud.google.com/go/iot v1.5.0/go.mod h1:mpz5259PDl3XJthEmh9+ap0affn/MqNSP4My77Qql9o= -cloud.google.com/go/iot v1.6.0/go.mod h1:IqdAsmE2cTYYNO1Fvjfzo9po179rAtJeVGUvkLN3rLE= -cloud.google.com/go/iot v1.7.1/go.mod h1:46Mgw7ev1k9KqK1ao0ayW9h0lI+3hxeanz+L1zmbbbk= -cloud.google.com/go/iot v1.7.2/go.mod h1:q+0P5zr1wRFpw7/MOgDXrG/HVA+l+cSwdObffkrpnSg= -cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= -cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= -cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= -cloud.google.com/go/kms v1.8.0/go.mod h1:4xFEhYFqvW+4VMELtZyxomGSYtSQKzM178ylFW4jMAg= -cloud.google.com/go/kms v1.9.0/go.mod h1:qb1tPTgfF9RQP8e1wq4cLFErVuTJv7UsSC915J8dh3w= -cloud.google.com/go/kms v1.10.0/go.mod h1:ng3KTUtQQU9bPX3+QGLsflZIHlkbn8amFAMY63m8d24= -cloud.google.com/go/kms v1.10.1/go.mod h1:rIWk/TryCkR59GMC3YtHtXeLzd634lBbKenvyySAyYI= -cloud.google.com/go/kms v1.11.0/go.mod h1:hwdiYC0xjnWsKQQCQQmIQnS9asjYVSK6jtXm+zFqXLM= -cloud.google.com/go/kms v1.12.1/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N/2CDM= -cloud.google.com/go/kms v1.15.0/go.mod h1:c9J991h5DTl+kg7gi3MYomh12YEENGrf48ee/N/2CDM= -cloud.google.com/go/kms v1.15.2/go.mod h1:3hopT4+7ooWRCjc2DxgnpESFxhIraaI2IpAVUEhbT/w= -cloud.google.com/go/kms v1.15.3/go.mod h1:AJdXqHxS2GlPyduM99s9iGqi2nwbviBbhV/hdmt4iOQ= -cloud.google.com/go/kms v1.15.5 h1:pj1sRfut2eRbD9pFRjNnPNg/CzJPuQAzUujMIM1vVeM= -cloud.google.com/go/kms v1.15.5/go.mod h1:cU2H5jnp6G2TDpUGZyqTCoy1n16fbubHZjmVXSMtwDI= -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/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= -cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= -cloud.google.com/go/language v1.9.0/go.mod h1:Ns15WooPM5Ad/5no/0n81yUetis74g3zrbeJBE+ptUY= -cloud.google.com/go/language v1.10.1/go.mod h1:CPp94nsdVNiQEt1CNjF5WkTcisLiHPyIbMhvR8H2AW0= -cloud.google.com/go/language v1.11.0/go.mod h1:uDx+pFDdAKTY8ehpWbiXyQdz8tDSYLJbQcXsCkjYyvQ= -cloud.google.com/go/language v1.11.1/go.mod h1:Xyid9MG9WOX3utvDbpX7j3tXDmmDooMyMDqgUVpH17U= -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/lifesciences v0.8.0/go.mod h1:lFxiEOMqII6XggGbOnKiyZ7IBwoIqA84ClvoezaA/bo= -cloud.google.com/go/lifesciences v0.9.1/go.mod h1:hACAOd1fFbCGLr/+weUKRAJas82Y4vrL3O5326N//Wc= -cloud.google.com/go/lifesciences v0.9.2/go.mod h1:QHEOO4tDzcSAzeJg7s2qwnLM2ji8IRpQl4p6m5Z9yTA= -cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= -cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeNqVNkzY8M= -cloud.google.com/go/logging v1.8.1/go.mod h1:TJjR+SimHwuC8MZ9cjByQulAMgni+RkXeI3wwctHJEI= -cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= -cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= -cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= -cloud.google.com/go/longrunning v0.4.2/go.mod h1:OHrnaYyLUV6oqwh0xiS7e5sLQhP1m0QU9R+WhGDMgIQ= -cloud.google.com/go/longrunning v0.5.0/go.mod h1:0JNuqRShmscVAhIACGtskSAWtqtOoPkwP0YF1oVEchc= -cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHSQl/fRUUQJYJc= -cloud.google.com/go/longrunning v0.5.2/go.mod h1:nqo6DQbNV2pXhGDbDMoN2bWz68MjZUzqv2YttZiveCs= -cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= -cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= -cloud.google.com/go/managedidentities v1.5.0/go.mod h1:+dWcZ0JlUmpuxpIDfyP5pP5y0bLdRwOS4Lp7gMni/LA= -cloud.google.com/go/managedidentities v1.6.1/go.mod h1:h/irGhTN2SkZ64F43tfGPMbHnypMbu4RB3yl8YcuEak= -cloud.google.com/go/managedidentities v1.6.2/go.mod h1:5c2VG66eCa0WIq6IylRk3TBW83l161zkFvCj28X7jn8= -cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI= -cloud.google.com/go/maps v0.6.0/go.mod h1:o6DAMMfb+aINHz/p/jbcY+mYeXBoZoxTfdSQ8VAJaCw= -cloud.google.com/go/maps v0.7.0/go.mod h1:3GnvVl3cqeSvgMcpRlQidXsPYuDGQ8naBis7MVzpXsY= -cloud.google.com/go/maps v1.3.0/go.mod h1:6mWTUv+WhnOwAgjVsSW2QPPECmW+s3PcRyOa9vgG/5s= -cloud.google.com/go/maps v1.4.0/go.mod h1:6mWTUv+WhnOwAgjVsSW2QPPECmW+s3PcRyOa9vgG/5s= -cloud.google.com/go/maps v1.4.1/go.mod h1:BxSa0BnW1g2U2gNdbq5zikLlHUuHW0GFWh7sgML2kIY= -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/mediatranslation v0.7.0/go.mod h1:LCnB/gZr90ONOIQLgSXagp8XUW1ODs2UmUMvcgMfI2I= -cloud.google.com/go/mediatranslation v0.8.1/go.mod h1:L/7hBdEYbYHQJhX2sldtTO5SZZ1C1vkapubj0T2aGig= -cloud.google.com/go/mediatranslation v0.8.2/go.mod h1:c9pUaDRLkgHRx3irYE5ZC8tfXGrMYwNZdmDqKMSfFp8= -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/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= -cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY= -cloud.google.com/go/memcache v1.9.0/go.mod h1:8oEyzXCu+zo9RzlEaEjHl4KkgjlNDaXbCQeQWlzNFJM= -cloud.google.com/go/memcache v1.10.1/go.mod h1:47YRQIarv4I3QS5+hoETgKO40InqzLP6kpNLvyXuyaA= -cloud.google.com/go/memcache v1.10.2/go.mod h1:f9ZzJHLBrmd4BkguIAa/l/Vle6uTHzHokdnzSWOdQ6A= -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/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= -cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI= -cloud.google.com/go/metastore v1.10.0/go.mod h1:fPEnH3g4JJAk+gMRnrAnoqyv2lpUCqJPWOodSaf45Eo= -cloud.google.com/go/metastore v1.11.1/go.mod h1:uZuSo80U3Wd4zi6C22ZZliOUJ3XeM/MlYi/z5OAOWRA= -cloud.google.com/go/metastore v1.12.0/go.mod h1:uZuSo80U3Wd4zi6C22ZZliOUJ3XeM/MlYi/z5OAOWRA= -cloud.google.com/go/metastore v1.13.0/go.mod h1:URDhpG6XLeh5K+Glq0NOt74OfrPKTwS62gEPZzb5SOk= -cloud.google.com/go/metastore v1.13.1/go.mod h1:IbF62JLxuZmhItCppcIfzBBfUFq0DIB9HPDoLgWrVOU= -cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= -cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= -cloud.google.com/go/monitoring v1.12.0/go.mod h1:yx8Jj2fZNEkL/GYZyTLS4ZtZEZN8WtDEiEqG4kLK50w= -cloud.google.com/go/monitoring v1.13.0/go.mod h1:k2yMBAB1H9JT/QETjNkgdCGD9bPF712XiLTVr+cBrpw= -cloud.google.com/go/monitoring v1.15.1/go.mod h1:lADlSAlFdbqQuwwpaImhsJXu1QSdd3ojypXrFSMr2rM= -cloud.google.com/go/monitoring v1.16.0/go.mod h1:Ptp15HgAyM1fNICAojDMoNc/wUmn67mLHQfyqbw+poY= -cloud.google.com/go/monitoring v1.16.1/go.mod h1:6HsxddR+3y9j+o/cMJH6q/KJ/CBTvM/38L/1m7bTRJ4= -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/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= -cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5MpTBnNm39iAVpC3TmsExt8= -cloud.google.com/go/networkconnectivity v1.10.0/go.mod h1:UP4O4sWXJG13AqrTdQCD9TnLGEbtNRqjuaaA7bNjF5E= -cloud.google.com/go/networkconnectivity v1.11.0/go.mod h1:iWmDD4QF16VCDLXUqvyspJjIEtBR/4zq5hwnY2X3scM= -cloud.google.com/go/networkconnectivity v1.12.1/go.mod h1:PelxSWYM7Sh9/guf8CFhi6vIqf19Ir/sbfZRUwXh92E= -cloud.google.com/go/networkconnectivity v1.13.0/go.mod h1:SAnGPes88pl7QRLUen2HmcBSE9AowVAcdug8c0RSBFk= -cloud.google.com/go/networkconnectivity v1.14.0/go.mod h1:SAnGPes88pl7QRLUen2HmcBSE9AowVAcdug8c0RSBFk= -cloud.google.com/go/networkconnectivity v1.14.1/go.mod h1:LyGPXR742uQcDxZ/wv4EI0Vu5N6NKJ77ZYVnDe69Zug= -cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= -cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= -cloud.google.com/go/networkmanagement v1.6.0/go.mod h1:5pKPqyXjB/sgtvB5xqOemumoQNB7y95Q7S+4rjSOPYY= -cloud.google.com/go/networkmanagement v1.8.0/go.mod h1:Ho/BUGmtyEqrttTgWEe7m+8vDdK74ibQc+Be0q7Fof0= -cloud.google.com/go/networkmanagement v1.9.0/go.mod h1:UTUaEU9YwbCAhhz3jEOHr+2/K/MrBk2XxOLS89LQzFw= -cloud.google.com/go/networkmanagement v1.9.1/go.mod h1:CCSYgrQQvW73EJawO2QamemYcOb57LvrDdDU51F0mcI= -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/networksecurity v0.7.0/go.mod h1:mAnzoxx/8TBSyXEeESMy9OOYwo1v+gZ5eMRnsT5bC8k= -cloud.google.com/go/networksecurity v0.8.0/go.mod h1:B78DkqsxFG5zRSVuwYFRZ9Xz8IcQ5iECsNrPn74hKHU= -cloud.google.com/go/networksecurity v0.9.1/go.mod h1:MCMdxOKQ30wsBI1eI659f9kEp4wuuAueoC9AJKSPWZQ= -cloud.google.com/go/networksecurity v0.9.2/go.mod h1:jG0SeAttWzPMUILEHDUvFYdQTl8L/E/KC8iZDj85lEI= -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/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= -cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vuYs+kBJ/gu0= -cloud.google.com/go/notebooks v1.7.0/go.mod h1:PVlaDGfJgj1fl1S3dUwhFMXFgfYGhYQt2164xOMONmE= -cloud.google.com/go/notebooks v1.8.0/go.mod h1:Lq6dYKOYOWUCTvw5t2q1gp1lAp0zxAxRycayS0iJcqQ= -cloud.google.com/go/notebooks v1.9.1/go.mod h1:zqG9/gk05JrzgBt4ghLzEepPHNwE5jgPcHZRKhlC1A8= -cloud.google.com/go/notebooks v1.10.0/go.mod h1:SOPYMZnttHxqot0SGSFSkRrwE29eqnKPBJFqgWmiK2k= -cloud.google.com/go/notebooks v1.10.1/go.mod h1:5PdJc2SgAybE76kFQCWrTfJolCOUQXF97e+gteUUA6A= -cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= -cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= -cloud.google.com/go/optimization v1.3.1/go.mod h1:IvUSefKiwd1a5p0RgHDbWCIbDFgKuEdB+fPPuP0IDLI= -cloud.google.com/go/optimization v1.4.1/go.mod h1:j64vZQP7h9bO49m2rVaTVoNM0vEBEN5eKPUPbZyXOrk= -cloud.google.com/go/optimization v1.5.0/go.mod h1:evo1OvTxeBRBu6ydPlrIRizKY/LJKo/drDMMRKqGEUU= -cloud.google.com/go/optimization v1.5.1/go.mod h1:NC0gnUD5MWVAF7XLdoYVPmYYVth93Q6BUzqAq3ZwtV8= -cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= -cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= -cloud.google.com/go/orchestration v1.6.0/go.mod h1:M62Bevp7pkxStDfFfTuCOaXgaaqRAga1yKyoMtEoWPQ= -cloud.google.com/go/orchestration v1.8.1/go.mod h1:4sluRF3wgbYVRqz7zJ1/EUNc90TTprliq9477fGobD8= -cloud.google.com/go/orchestration v1.8.2/go.mod h1:T1cP+6WyTmh6LSZzeUhvGf0uZVmJyTx7t8z7Vg87+A0= -cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= -cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= -cloud.google.com/go/orgpolicy v1.10.0/go.mod h1:w1fo8b7rRqlXlIJbVhOMPrwVljyuW5mqssvBtU18ONc= -cloud.google.com/go/orgpolicy v1.11.0/go.mod h1:2RK748+FtVvnfuynxBzdnyu7sygtoZa1za/0ZfpOs1M= -cloud.google.com/go/orgpolicy v1.11.1/go.mod h1:8+E3jQcpZJQliP+zaFfayC2Pg5bmhuLK755wKhIIUCE= -cloud.google.com/go/orgpolicy v1.11.2/go.mod h1:biRDpNwfyytYnmCRWZWxrKF22Nkz9eNVj9zyaBdpm1o= -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/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= -cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh+l4WK6GnWw= -cloud.google.com/go/osconfig v1.11.0/go.mod h1:aDICxrur2ogRd9zY5ytBLV89KEgT2MKB2L/n6x1ooPw= -cloud.google.com/go/osconfig v1.12.0/go.mod h1:8f/PaYzoS3JMVfdfTubkowZYGmAhUCjjwnjqWI7NVBc= -cloud.google.com/go/osconfig v1.12.1/go.mod h1:4CjBxND0gswz2gfYRCUoUzCm9zCABp91EeTtWXyz0tE= -cloud.google.com/go/osconfig v1.12.2/go.mod h1:eh9GPaMZpI6mEJEuhEjUJmaxvQ3gav+fFEJon1Y8Iw0= -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/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= -cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo= -cloud.google.com/go/oslogin v1.9.0/go.mod h1:HNavntnH8nzrn8JCTT5fj18FuJLFJc4NaZJtBnQtKFs= -cloud.google.com/go/oslogin v1.10.1/go.mod h1:x692z7yAue5nE7CsSnoG0aaMbNoRJRXO4sn73R+ZqAs= -cloud.google.com/go/oslogin v1.11.0/go.mod h1:8GMTJs4X2nOAUVJiPGqIWVcDaF0eniEto3xlOxaboXE= -cloud.google.com/go/oslogin v1.11.1/go.mod h1:OhD2icArCVNUxKqtK0mcSmKL7lgr0LVlQz+v9s1ujTg= -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/phishingprotection v0.7.0/go.mod h1:8qJI4QKHoda/sb/7/YmMQ2omRLSLYSu9bU0EKCNI+Lk= -cloud.google.com/go/phishingprotection v0.8.1/go.mod h1:AxonW7GovcA8qdEk13NfHq9hNx5KPtfxXNeUxTDxB6I= -cloud.google.com/go/phishingprotection v0.8.2/go.mod h1:LhJ91uyVHEYKSKcMGhOa14zMMWfbEdxG032oT6ECbC8= -cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= -cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= -cloud.google.com/go/policytroubleshooter v1.5.0/go.mod h1:Rz1WfV+1oIpPdN2VvvuboLVRsB1Hclg3CKQ53j9l8vw= -cloud.google.com/go/policytroubleshooter v1.6.0/go.mod h1:zYqaPTsmfvpjm5ULxAyD/lINQxJ0DDsnWOP/GZ7xzBc= -cloud.google.com/go/policytroubleshooter v1.7.1/go.mod h1:0NaT5v3Ag1M7U5r0GfDCpUFkWd9YqpubBWsQlhanRv0= -cloud.google.com/go/policytroubleshooter v1.8.0/go.mod h1:tmn5Ir5EToWe384EuboTcVQT7nTag2+DuH3uHmKd1HU= -cloud.google.com/go/policytroubleshooter v1.9.0/go.mod h1:+E2Lga7TycpeSTj2FsH4oXxTnrbHJGRlKhVZBLGgU64= -cloud.google.com/go/policytroubleshooter v1.9.1/go.mod h1:MYI8i0bCrL8cW+VHN1PoiBTyNZTstCg2WUw2eVC4c4U= -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/privatecatalog v0.7.0/go.mod h1:2s5ssIFO69F5csTXcwBP7NPFTZvps26xGzvQ2PQaBYg= -cloud.google.com/go/privatecatalog v0.8.0/go.mod h1:nQ6pfaegeDAq/Q5lrfCQzQLhubPiZhSaNhIgfJlnIXs= -cloud.google.com/go/privatecatalog v0.9.1/go.mod h1:0XlDXW2unJXdf9zFz968Hp35gl/bhF4twwpXZAW50JA= -cloud.google.com/go/privatecatalog v0.9.2/go.mod h1:RMA4ATa8IXfzvjrhhK8J6H4wwcztab+oZph3c6WmtFc= -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/pubsub v1.26.0/go.mod h1:QgBH3U/jdJy/ftjPhTkyXNj543Tin1pRYcdcPRnFIRI= -cloud.google.com/go/pubsub v1.27.1/go.mod h1:hQN39ymbV9geqBnfQq6Xf63yNhUAhv9CZhzp5O6qsW0= -cloud.google.com/go/pubsub v1.28.0/go.mod h1:vuXFpwaVoIPQMGXqRyUQigu/AX1S3IWugR9xznmcXX8= -cloud.google.com/go/pubsub v1.30.0/go.mod h1:qWi1OPS0B+b5L+Sg6Gmc9zD1Y+HaM0MdUr7LsupY1P4= -cloud.google.com/go/pubsub v1.32.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= -cloud.google.com/go/pubsub v1.33.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= -cloud.google.com/go/pubsublite v1.5.0/go.mod h1:xapqNQ1CuLfGi23Yda/9l4bBCKz/wC3KIJ5gKcxveZg= -cloud.google.com/go/pubsublite v1.6.0/go.mod h1:1eFCS0U11xlOuMFV/0iBqw3zP12kddMeCbj/F3FSj9k= -cloud.google.com/go/pubsublite v1.7.0/go.mod h1:8hVMwRXfDfvGm3fahVbtDbiLePT3gpoiJYJY+vxWxVM= -cloud.google.com/go/pubsublite v1.8.1/go.mod h1:fOLdU4f5xldK4RGJrBMm+J7zMWNj/k4PxwEZXy39QS0= -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/recaptchaenterprise/v2 v2.4.0/go.mod h1:Am3LHfOuBstrLrNCBrlI5sbwx9LBg3te2N6hGvHn2mE= -cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91jrwI3R+1ZSZEWrfL7XHgNo9U= -cloud.google.com/go/recaptchaenterprise/v2 v2.6.0/go.mod h1:RPauz9jeLtB3JVzg6nCbe12qNoaa8pXc4d/YukAmcnA= -cloud.google.com/go/recaptchaenterprise/v2 v2.7.0/go.mod h1:19wVj/fs5RtYtynAPJdDTb69oW0vNHYDBTbB4NvMD9c= -cloud.google.com/go/recaptchaenterprise/v2 v2.7.2/go.mod h1:kR0KjsJS7Jt1YSyWFkseQ756D45kaYNTlDPPaRAvDBU= -cloud.google.com/go/recaptchaenterprise/v2 v2.8.0/go.mod h1:QuE8EdU9dEnesG8/kG3XuJyNsjEqMlMzg3v3scCJ46c= -cloud.google.com/go/recaptchaenterprise/v2 v2.8.1/go.mod h1:JZYZJOeZjgSSTGP4uz7NlQ4/d1w5hGmksVgM0lbEij0= -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/recommendationengine v0.7.0/go.mod h1:1reUcE3GIu6MeBz/h5xZJqNLuuVjNg1lmWMPyjatzac= -cloud.google.com/go/recommendationengine v0.8.1/go.mod h1:MrZihWwtFYWDzE6Hz5nKcNz3gLizXVIDI/o3G1DLcrE= -cloud.google.com/go/recommendationengine v0.8.2/go.mod h1:QIybYHPK58qir9CV2ix/re/M//Ty10OxjnnhWdaKS1Y= -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/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= -cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= -cloud.google.com/go/recommender v1.9.0/go.mod h1:PnSsnZY7q+VL1uax2JWkt/UegHssxjUVVCrX52CuEmQ= -cloud.google.com/go/recommender v1.10.1/go.mod h1:XFvrE4Suqn5Cq0Lf+mCP6oBHD/yRMA8XxP5sb7Q7gpA= -cloud.google.com/go/recommender v1.11.0/go.mod h1:kPiRQhPyTJ9kyXPCG6u/dlPLbYfFlkwHNRwdzPVAoII= -cloud.google.com/go/recommender v1.11.1/go.mod h1:sGwFFAyI57v2Hc5LbIj+lTwXipGu9NW015rkaEM5B18= -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/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= -cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM= -cloud.google.com/go/redis v1.11.0/go.mod h1:/X6eicana+BWcUda5PpwZC48o37SiFVTFSs0fWAJ7uQ= -cloud.google.com/go/redis v1.13.1/go.mod h1:VP7DGLpE91M6bcsDdMuyCm2hIpB6Vp2hI090Mfd1tcg= -cloud.google.com/go/redis v1.13.2/go.mod h1:0Hg7pCMXS9uz02q+LoEVl5dNHUkIQv+C/3L76fandSA= -cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= -cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= -cloud.google.com/go/resourcemanager v1.5.0/go.mod h1:eQoXNAiAvCf5PXxWxXjhKQoTMaUSNrEfg+6qdf/wots= -cloud.google.com/go/resourcemanager v1.6.0/go.mod h1:YcpXGRs8fDzcUl1Xw8uOVmI8JEadvhRIkoXXUNVYcVo= -cloud.google.com/go/resourcemanager v1.7.0/go.mod h1:HlD3m6+bwhzj9XCouqmeiGuni95NTrExfhoSrkC/3EI= -cloud.google.com/go/resourcemanager v1.9.1/go.mod h1:dVCuosgrh1tINZ/RwBufr8lULmWGOkPS8gL5gqyjdT8= -cloud.google.com/go/resourcemanager v1.9.2/go.mod h1:OujkBg1UZg5lX2yIyMo5Vz9O5hf7XQOSV7WxqxxMtQE= -cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= -cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= -cloud.google.com/go/resourcesettings v1.5.0/go.mod h1:+xJF7QSG6undsQDfsCJyqWXyBwUoJLhetkRMDRnIoXA= -cloud.google.com/go/resourcesettings v1.6.1/go.mod h1:M7mk9PIZrC5Fgsu1kZJci6mpgN8o0IUzVx3eJU3y4Jw= -cloud.google.com/go/resourcesettings v1.6.2/go.mod h1:mJIEDd9MobzunWMeniaMp6tzg4I2GvD3TTmPkc8vBXk= -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/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= -cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y= -cloud.google.com/go/retail v1.12.0/go.mod h1:UMkelN/0Z8XvKymXFbD4EhFJlYKRx1FGhQkVPU5kF14= -cloud.google.com/go/retail v1.14.1/go.mod h1:y3Wv3Vr2k54dLNIrCzenyKG8g8dhvhncT2NcNjb/6gE= -cloud.google.com/go/retail v1.14.2/go.mod h1:W7rrNRChAEChX336QF7bnMxbsjugcOCPU44i5kbLiL8= -cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= -cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= -cloud.google.com/go/run v0.8.0/go.mod h1:VniEnuBwqjigv0A7ONfQUaEItaiCRVujlMqerPPiktM= -cloud.google.com/go/run v0.9.0/go.mod h1:Wwu+/vvg8Y+JUApMwEDfVfhetv30hCG4ZwDR/IXl2Qg= -cloud.google.com/go/run v1.2.0/go.mod h1:36V1IlDzQ0XxbQjUx6IYbw8H3TJnWvhii963WW3B/bo= -cloud.google.com/go/run v1.3.0/go.mod h1:S/osX/4jIPZGg+ssuqh6GNgg7syixKe3YnprwehzHKU= -cloud.google.com/go/run v1.3.1/go.mod h1:cymddtZOzdwLIAsmS6s+Asl4JoXIDm/K1cpZTxV4Q5s= -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/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= -cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJegEWKxRsn44= -cloud.google.com/go/scheduler v1.8.0/go.mod h1:TCET+Y5Gp1YgHT8py4nlg2Sew8nUHMqcpousDgXJVQc= -cloud.google.com/go/scheduler v1.9.0/go.mod h1:yexg5t+KSmqu+njTIh3b7oYPheFtBWGcbVUYF1GGMIc= -cloud.google.com/go/scheduler v1.10.1/go.mod h1:R63Ldltd47Bs4gnhQkmNDse5w8gBRrhObZ54PxgR2Oo= -cloud.google.com/go/scheduler v1.10.2/go.mod h1:O3jX6HRH5eKCA3FutMw375XHZJudNIKVonSCHv7ropY= -cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= -cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= -cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= -cloud.google.com/go/secretmanager v1.10.0/go.mod h1:MfnrdvKMPNra9aZtQFvBcvRU54hbPD8/HayQdlUgJpU= -cloud.google.com/go/secretmanager v1.11.1/go.mod h1:znq9JlXgTNdBeQk9TBW/FnR/W4uChEKGeqQWAJ8SXFw= -cloud.google.com/go/secretmanager v1.11.2/go.mod h1:MQm4t3deoSub7+WNwiC4/tRYgDBHJgJPvswqQVB1Vss= -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/security v1.9.0/go.mod h1:6Ta1bO8LXI89nZnmnsZGp9lVoVWXqsVbIq/t9dzI+2Q= -cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH8T5GUSb9IA= -cloud.google.com/go/security v1.12.0/go.mod h1:rV6EhrpbNHrrxqlvW0BWAIawFWq3X90SduMJdFwtLB8= -cloud.google.com/go/security v1.13.0/go.mod h1:Q1Nvxl1PAgmeW0y3HTt54JYIvUdtcpYKVfIB8AOMZ+0= -cloud.google.com/go/security v1.15.1/go.mod h1:MvTnnbsWnehoizHi09zoiZob0iCHVcL4AUBj76h9fXA= -cloud.google.com/go/security v1.15.2/go.mod h1:2GVE/v1oixIRHDaClVbHuPcZwAqFM28mXuAKCfMgYIg= -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/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= -cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZIZF7SAR0wWECrjdk= -cloud.google.com/go/securitycenter v1.18.1/go.mod h1:0/25gAzCM/9OL9vVx4ChPeM/+DlfGQJDwBy/UC8AKK0= -cloud.google.com/go/securitycenter v1.19.0/go.mod h1:LVLmSg8ZkkyaNy4u7HCIshAngSQ8EcIRREP3xBnyfag= -cloud.google.com/go/securitycenter v1.23.0/go.mod h1:8pwQ4n+Y9WCWM278R8W3nF65QtY172h4S8aXyI9/hsQ= -cloud.google.com/go/securitycenter v1.23.1/go.mod h1:w2HV3Mv/yKhbXKwOCu2i8bCuLtNP1IMHuiYQn4HJq5s= -cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= -cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= -cloud.google.com/go/servicecontrol v1.10.0/go.mod h1:pQvyvSRh7YzUF2efw7H87V92mxU8FnFDawMClGCNuAA= -cloud.google.com/go/servicecontrol v1.11.0/go.mod h1:kFmTzYzTUIuZs0ycVqRHNaNhgR+UMUpw9n02l/pY+mc= -cloud.google.com/go/servicecontrol v1.11.1/go.mod h1:aSnNNlwEFBY+PWGQ2DoM0JJ/QUXqV5/ZD9DOLB7SnUk= -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/servicedirectory v1.6.0/go.mod h1:pUlbnWsLH9c13yGkxCmfumWEPjsRs1RlmJ4pqiNjVL4= -cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UVXjkuw7q5XcG10wx1U= -cloud.google.com/go/servicedirectory v1.8.0/go.mod h1:srXodfhY1GFIPvltunswqXpVxFPpZjf8nkKQT7XcXaY= -cloud.google.com/go/servicedirectory v1.9.0/go.mod h1:29je5JjiygNYlmsGz8k6o+OZ8vd4f//bQLtvzkPPT/s= -cloud.google.com/go/servicedirectory v1.10.1/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6bzIOSLDt8f8eLaGOxQ= -cloud.google.com/go/servicedirectory v1.11.0/go.mod h1:Xv0YVH8s4pVOwfM/1eMTl0XJ6bzIOSLDt8f8eLaGOxQ= -cloud.google.com/go/servicedirectory v1.11.1/go.mod h1:tJywXimEWzNzw9FvtNjsQxxJ3/41jseeILgwU/QLrGI= -cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= -cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= -cloud.google.com/go/servicemanagement v1.6.0/go.mod h1:aWns7EeeCOtGEX4OvZUWCCJONRZeFKiptqKf1D0l/Jc= -cloud.google.com/go/servicemanagement v1.8.0/go.mod h1:MSS2TDlIEQD/fzsSGfCdJItQveu9NXnUniTrq/L8LK4= -cloud.google.com/go/serviceusage v1.3.0/go.mod h1:Hya1cozXM4SeSKTAgGXgj97GlqUvF5JaoXacR1JTP/E= -cloud.google.com/go/serviceusage v1.4.0/go.mod h1:SB4yxXSaYVuUBYUml6qklyONXNLt83U0Rb+CXyhjEeU= -cloud.google.com/go/serviceusage v1.5.0/go.mod h1:w8U1JvqUqwJNPEOTQjrMHkw3IaIFLoLsPLvsE3xueec= -cloud.google.com/go/serviceusage v1.6.0/go.mod h1:R5wwQcbOWsyuOfbP9tGdAnCAc6B9DRwPG1xtWMDeuPA= -cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IWHEN5X4= -cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw= -cloud.google.com/go/shell v1.6.0/go.mod h1:oHO8QACS90luWgxP3N9iZVuEiSF84zNyLytb+qE2f9A= -cloud.google.com/go/shell v1.7.1/go.mod h1:u1RaM+huXFaTojTbW4g9P5emOrrmLE69KrxqQahKn4g= -cloud.google.com/go/shell v1.7.2/go.mod h1:KqRPKwBV0UyLickMn0+BY1qIyE98kKyI216sH/TuHmc= -cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= -cloud.google.com/go/spanner v1.44.0/go.mod h1:G8XIgYdOK+Fbcpbs7p2fiprDw4CaZX63whnSMLVBxjk= -cloud.google.com/go/spanner v1.45.0/go.mod h1:FIws5LowYz8YAE1J8fOS7DJup8ff7xJeetWEo5REA2M= -cloud.google.com/go/spanner v1.47.0/go.mod h1:IXsJwVW2j4UKs0eYDqodab6HgGuA1bViSqW4uH9lfUI= -cloud.google.com/go/spanner v1.49.0/go.mod h1:eGj9mQGK8+hkgSVbHNQ06pQ4oS+cyc4tXXd6Dif1KoM= -cloud.google.com/go/spanner v1.50.0/go.mod h1:eGj9mQGK8+hkgSVbHNQ06pQ4oS+cyc4tXXd6Dif1KoM= -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/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= -cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSyoooSpco= -cloud.google.com/go/speech v1.14.1/go.mod h1:gEosVRPJ9waG7zqqnsHpYTOoAS4KouMRLDFMekpJ0J0= -cloud.google.com/go/speech v1.15.0/go.mod h1:y6oH7GhqCaZANH7+Oe0BhgIogsNInLlz542tg3VqeYI= -cloud.google.com/go/speech v1.17.1/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo= -cloud.google.com/go/speech v1.19.0/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo= -cloud.google.com/go/speech v1.19.1/go.mod h1:WcuaWz/3hOlzPFOVo9DUsblMIHwxP589y6ZMtaG+iAA= -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/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storage v1.28.1/go.mod h1:Qnisd4CqDdo6BGs2AD5LLnEsmSQ80wQ5ogcBBKhU86Y= -cloud.google.com/go/storage v1.29.0/go.mod h1:4puEjyTKnku6gfKoTfNOU/W+a9JyuVNxjpS5GBrB8h4= -cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= -cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= -cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= -cloud.google.com/go/storagetransfer v1.7.0/go.mod h1:8Giuj1QNb1kfLAiWM1bN6dHzfdlDAVC9rv9abHot2W4= -cloud.google.com/go/storagetransfer v1.8.0/go.mod h1:JpegsHHU1eXg7lMHkvf+KE5XDJ7EQu0GwNJbbVGanEw= -cloud.google.com/go/storagetransfer v1.10.0/go.mod h1:DM4sTlSmGiNczmV6iZyceIh2dbs+7z2Ayg6YAiQlYfA= -cloud.google.com/go/storagetransfer v1.10.1/go.mod h1:rS7Sy0BtPviWYTTJVWCSV4QrbBitgPeuK4/FKa4IdLs= -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/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= -cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA= -cloud.google.com/go/talent v1.5.0/go.mod h1:G+ODMj9bsasAEJkQSzO2uHQWXHHXUomArjWQQYkqK6c= -cloud.google.com/go/talent v1.6.2/go.mod h1:CbGvmKCG61mkdjcqTcLOkb2ZN1SrQI8MDyma2l7VD24= -cloud.google.com/go/talent v1.6.3/go.mod h1:xoDO97Qd4AK43rGjJvyBHMskiEf3KulgYzcH6YWOVoo= -cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= -cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= -cloud.google.com/go/texttospeech v1.6.0/go.mod h1:YmwmFT8pj1aBblQOI3TfKmwibnsfvhIBzPXcW4EBovc= -cloud.google.com/go/texttospeech v1.7.1/go.mod h1:m7QfG5IXxeneGqTapXNxv2ItxP/FS0hCZBwXYqucgSk= -cloud.google.com/go/texttospeech v1.7.2/go.mod h1:VYPT6aTOEl3herQjFHYErTlSZJ4vB00Q2ZTmuVgluD4= -cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= -cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= -cloud.google.com/go/tpu v1.5.0/go.mod h1:8zVo1rYDFuW2l4yZVY0R0fb/v44xLh3llq7RuV61fPM= -cloud.google.com/go/tpu v1.6.1/go.mod h1:sOdcHVIgDEEOKuqUoi6Fq53MKHJAtOwtz0GuKsWSH3E= -cloud.google.com/go/tpu v1.6.2/go.mod h1:NXh3NDwt71TsPZdtGWgAG5ThDfGd32X1mJ2cMaRlVgU= -cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= -cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= -cloud.google.com/go/trace v1.8.0/go.mod h1:zH7vcsbAhklH8hWFig58HvxcxyQbaIqMarMg9hn5ECA= -cloud.google.com/go/trace v1.9.0/go.mod h1:lOQqpE5IaWY0Ixg7/r2SjixMuc6lfTFeO4QGM4dQWOk= -cloud.google.com/go/trace v1.10.1/go.mod h1:gbtL94KE5AJLH3y+WVpfWILmqgc6dXcqgNXdOPAQTYk= -cloud.google.com/go/trace v1.10.2/go.mod h1:NPXemMi6MToRFcSxRl2uDnu/qAlAQ3oULUphcHGh1vA= -cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= -cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= -cloud.google.com/go/translate v1.5.0/go.mod h1:29YDSYveqqpA1CQFD7NQuP49xymq17RXNaUDdc0mNu0= -cloud.google.com/go/translate v1.6.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= -cloud.google.com/go/translate v1.7.0/go.mod h1:lMGRudH1pu7I3n3PETiOB2507gf3HnfLV8qlkHZEyos= -cloud.google.com/go/translate v1.8.1/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= -cloud.google.com/go/translate v1.8.2/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= -cloud.google.com/go/translate v1.9.0/go.mod h1:d1ZH5aaOA0CNhWeXeC8ujd4tdCFw8XoNWRljklu5RHs= -cloud.google.com/go/translate v1.9.1/go.mod h1:TWIgDZknq2+JD4iRcojgeDtqGEp154HN/uL6hMvylS8= -cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= -cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= -cloud.google.com/go/video v1.12.0/go.mod h1:MLQew95eTuaNDEGriQdcYn0dTwf9oWiA4uYebxM5kdg= -cloud.google.com/go/video v1.13.0/go.mod h1:ulzkYlYgCp15N2AokzKjy7MQ9ejuynOJdf1tR5lGthk= -cloud.google.com/go/video v1.14.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= -cloud.google.com/go/video v1.15.0/go.mod h1:SkgaXwT+lIIAKqWAJfktHT/RbgjSuY6DobxEp0C5yTQ= -cloud.google.com/go/video v1.17.1/go.mod h1:9qmqPqw/Ib2tLqaeHgtakU+l5TcJxCJbhFXM7UJjVzU= -cloud.google.com/go/video v1.19.0/go.mod h1:9qmqPqw/Ib2tLqaeHgtakU+l5TcJxCJbhFXM7UJjVzU= -cloud.google.com/go/video v1.20.0/go.mod h1:U3G3FTnsvAGqglq9LxgqzOiBc/Nt8zis8S+850N2DUM= -cloud.google.com/go/video v1.20.1/go.mod h1:3gJS+iDprnj8SY6pe0SwLeC5BUW80NjhwX7INWEuWGU= -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/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= -cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU= -cloud.google.com/go/videointelligence v1.10.0/go.mod h1:LHZngX1liVtUhZvi2uNS0VQuOzNi2TkY1OakiuoUOjU= -cloud.google.com/go/videointelligence v1.11.1/go.mod h1:76xn/8InyQHarjTWsBR058SmlPCwQjgcvoW0aZykOvo= -cloud.google.com/go/videointelligence v1.11.2/go.mod h1:ocfIGYtIVmIcWk1DsSGOoDiXca4vaZQII1C85qtoplc= -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/vision/v2 v2.4.0/go.mod h1:VtI579ll9RpVTrdKdkMzckdnwMyX2JILb+MhPqRbPsY= -cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E= -cloud.google.com/go/vision/v2 v2.6.0/go.mod h1:158Hes0MvOS9Z/bDMSFpjwsUrZ5fPrdwuyyvKSGAGMY= -cloud.google.com/go/vision/v2 v2.7.0/go.mod h1:H89VysHy21avemp6xcf9b9JvZHVehWbET0uT/bcuY/0= -cloud.google.com/go/vision/v2 v2.7.2/go.mod h1:jKa8oSYBWhYiXarHPvP4USxYANYUEdEsQrloLjrSwJU= -cloud.google.com/go/vision/v2 v2.7.3/go.mod h1:V0IcLCY7W+hpMKXK1JYE0LV5llEqVmj+UJChjvA1WsM= -cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= -cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= -cloud.google.com/go/vmmigration v1.5.0/go.mod h1:E4YQ8q7/4W9gobHjQg4JJSgXXSgY21nA5r8swQV+Xxc= -cloud.google.com/go/vmmigration v1.6.0/go.mod h1:bopQ/g4z+8qXzichC7GW1w2MjbErL54rk3/C843CjfY= -cloud.google.com/go/vmmigration v1.7.1/go.mod h1:WD+5z7a/IpZ5bKK//YmT9E047AD+rjycCAvyMxGJbro= -cloud.google.com/go/vmmigration v1.7.2/go.mod h1:iA2hVj22sm2LLYXGPT1pB63mXHhrH1m/ruux9TwWLd8= -cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208= -cloud.google.com/go/vmwareengine v0.2.2/go.mod h1:sKdctNJxb3KLZkE/6Oui94iw/xs9PRNC2wnNLXsHvH8= -cloud.google.com/go/vmwareengine v0.3.0/go.mod h1:wvoyMvNWdIzxMYSpH/R7y2h5h3WFkx6d+1TIsP39WGY= -cloud.google.com/go/vmwareengine v0.4.1/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkGHXoa7uyfTgSI0= -cloud.google.com/go/vmwareengine v1.0.0/go.mod h1:Px64x+BvjPZwWuc4HdmVhoygcXqEkGHXoa7uyfTgSI0= -cloud.google.com/go/vmwareengine v1.0.1/go.mod h1:aT3Xsm5sNx0QShk1Jc1B8OddrxAScYLwzVoaiXfdzzk= -cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= -cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= -cloud.google.com/go/vpcaccess v1.6.0/go.mod h1:wX2ILaNhe7TlVa4vC5xce1bCnqE3AeH27RV31lnmZes= -cloud.google.com/go/vpcaccess v1.7.1/go.mod h1:FogoD46/ZU+JUBX9D606X21EnxiszYi2tArQwLY4SXs= -cloud.google.com/go/vpcaccess v1.7.2/go.mod h1:mmg/MnRHv+3e8FJUjeSibVFvQF1cCy2MsFaFqxeY1HU= -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/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= -cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A= -cloud.google.com/go/webrisk v1.8.0/go.mod h1:oJPDuamzHXgUc+b8SiHRcVInZQuybnvEW72PqTc7sSg= -cloud.google.com/go/webrisk v1.9.1/go.mod h1:4GCmXKcOa2BZcZPn6DCEvE7HypmEJcJkr4mtM+sqYPc= -cloud.google.com/go/webrisk v1.9.2/go.mod h1:pY9kfDgAqxUpDBOrG4w8deLfhvJmejKB0qd/5uQIPBc= -cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= -cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= -cloud.google.com/go/websecurityscanner v1.5.0/go.mod h1:Y6xdCPy81yi0SQnDY1xdNTNpfY1oAgXUlcfN3B3eSng= -cloud.google.com/go/websecurityscanner v1.6.1/go.mod h1:Njgaw3rttgRHXzwCB8kgCYqv5/rGpFCsBOvPbYgszpg= -cloud.google.com/go/websecurityscanner v1.6.2/go.mod h1:7YgjuU5tun7Eg2kpKgGnDuEOXWIrh8x8lWrJT4zfmas= -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= -cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= -cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= -cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcPALq2CxzdePw= -cloud.google.com/go/workflows v1.11.1/go.mod h1:Z+t10G1wF7h8LgdY/EmRcQY8ptBD/nvofaL6FqlET6g= -cloud.google.com/go/workflows v1.12.0/go.mod h1:PYhSk2b6DhZ508tj8HXKaBh+OFe+xdl0dHF/tJdzPQM= -cloud.google.com/go/workflows v1.12.1/go.mod h1:5A95OhD/edtOhQd/O741NSfIMezNTbCwLM1P1tBRGHM= -collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= -git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.1/go.mod h1:fBF9PQNqB8scdgpZ3ufzaLntG0AG7C1WjPMsiFOmfHM= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.6.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0/go.mod h1:+6sju8gk8FRmSajX3Oz4G5Gm7P+mbqE9FVaXXFYTkCM= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0/go.mod h1:OQeznEEkTZ9OrhHJoDD8ZDq51FHgXjqtP9z6bEwBq9U= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/internal v1.0.0/go.mod h1:ceIuwmxDWptoW3eCqSXlnPsZFKh4X+R38dWPv7GS9Vs= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0/go.mod h1:s1tW/At+xHqjNFvWU4G0c0Qv33KOhvbGNj0RCTQDV8s= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.2.0/go.mod h1:c+Lifp3EDEamAkPVzMooRNOK6CZjNSdEnf1A7jsI9u4= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ+S5sOiDlINkp7+Ef339+Nz5L5XO+cnOHo= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0/go.mod h1:+6KLcKIVgxoBDMqMO/Nvy7bZ9a0nbU3I1DtFQK3YvB4= -github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4= -github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0/go.mod h1:kgDmCTgBzIEPFElEF+FK0SdjAor06dRq2Go927dnQ6o= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= -github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= -github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= -github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= -github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e h1:ahyvB3q25YnZWly5Gq1ekg6jcmWaGj/vG/MhF4aisoc= -github.com/FactomProject/basen v0.0.0-20150613233007-fe3947df716e/go.mod h1:kGUqhHd//musdITWjFvNTHn90WG9bMLBEPQZ17Cmlpw= -github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec h1:1Qb69mGp/UtRPn422BH4/Y4Q3SLUrD9KHuDkm8iodFc= -github.com/FactomProject/btcutilecc v0.0.0-20130527213604-d3a63a5752ec/go.mod h1:CD8UlnlLDiqb36L110uqiP2iSflVjx9g/3U9hCI4q2U= -github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20190129172621-c8b1d7a94ddf/go.mod h1:aJ4qN3TfrelA6NZ6AXsXRfmEVaYin3EDbSPJrKS8OXo= -github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM= -github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= -github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8= -github.com/SaveTheRbtz/mph v0.1.1-0.20240117162131-4166ec7869bc h1:DCHzPQOcU/7gwDTWbFQZc5qHMPS1g0xTO56k8NXsv9M= -github.com/SaveTheRbtz/mph v0.1.1-0.20240117162131-4166ec7869bc/go.mod h1:LJM5a3zcIJ/8TmZwlUczvROEJT8ntOdhdG9jjcR1B0I= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= -github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= -github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= -github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= -github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= -github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= -github.com/aclements/go-gg v0.0.0-20170118225347-6dbb4e4fefb0/go.mod h1:55qNq4vcpkIuHowELi5C8e+1yUHtoLoOUR9QU5j7Tes= -github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794/go.mod h1:7e+I0LQFUI9AXWxOfsQROs9xPhoJtbsyWcjJqDd4KPY= -github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY= -github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk= -github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/ajstarks/svgo v0.0.0-20210923152817-c3b6e2f0c527/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= -github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b/go.mod h1:1KcenG0jGWcpt8ov532z81sp/kMMUG485J2InIOyADM= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= -github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= -github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= -github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI= -github.com/apache/arrow/go/v12 v12.0.0/go.mod h1:d+tV/eHZZ7Dz7RPrFKtPK02tpr+c9/PEd/zm8mDS9Vg= -github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= -github.com/aws/aws-sdk-go-v2 v1.21.2/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= -github.com/aws/aws-sdk-go-v2 v1.23.1/go.mod h1:i1XDttT4rnf6vxc9AuskLc6s7XBee8rlLilKlc03uAA= -github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= -github.com/aws/aws-sdk-go-v2/config v1.18.45/go.mod h1:ZwDUgFnQgsazQTnWfeLWk5GjeqTQTL8lMkoE1UXzxdE= -github.com/aws/aws-sdk-go-v2/config v1.25.5/go.mod h1:Bf4gDvy4ZcFIK0rqDu1wp9wrubNba2DojiPB2rt6nvI= -github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo= -github.com/aws/aws-sdk-go-v2/credentials v1.13.43/go.mod h1:zWJBz1Yf1ZtX5NGax9ZdNjhhI4rgjfgsyk6vTY1yfVg= -github.com/aws/aws-sdk-go-v2/credentials v1.16.4/go.mod h1:Kdh/okh+//vQ/AjEt81CjvkTo64+/zIE4OewP7RpfXk= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13/go.mod h1:f/Ib/qYjhV2/qdsf79H3QP/eRE4AkVyEf6sk7XfZ1tg= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5/go.mod h1:VhnExhw6uXy9QzetvpXDolo1/hjhx4u9qukBGkuUwjs= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43/go.mod h1:auo+PiyLl0n1l8A0e8RIeR8tOzYPfZZH/JNlrJ8igTQ= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4/go.mod h1:xEhvbJcyUf/31yfGSQBe01fukXwXJ0gxDp7rLfymWE0= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37/go.mod h1:Qe+2KtKml+FEsQF/DHmDV+xjtche/hwoF75EG4UlHW8= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4/go.mod h1:dYvTNAggxDZy6y1AF7YDwXsPuHFy/VNEpEI/2dWK9IU= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.45/go.mod h1:lD5M20o09/LCuQ2mE62Mb/iSdSlCNuj6H5ci7tW7OsE= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1/go.mod h1:l9ymW25HOqymeU2m1gbUQ3rUIsTwKs8gYHXkqDQUhiI= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37/go.mod h1:vBmDnwWXWxNPFRMmG2m/3MKOe+xEcMDo1tanpaWCcck= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4/go.mod h1:aYCGNjyUCUelhofxlZyj63srdxWUSsBSGg5l6MCuXuE= -github.com/aws/aws-sdk-go-v2/service/kms v1.26.3/go.mod h1:N3++/sLV97B8Zliz7KRqNcojOX7iMBZWKiuit5FKtH0= -github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4= -github.com/aws/aws-sdk-go-v2/service/route53 v1.30.2/go.mod h1:TQZBt/WaQy+zTHoW++rnl8JBrmZ0VO6EUbVua1+foCA= -github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= -github.com/aws/aws-sdk-go-v2/service/sso v1.15.2/go.mod h1:gsL4keucRCgW+xA85ALBpRFfdSLH4kHOVSnLMSuBECo= -github.com/aws/aws-sdk-go-v2/service/sso v1.17.3/go.mod h1:oA6VjNsLll2eVuUoF2D+CMyORgNzPEW/3PyUdq6WQjI= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3/go.mod h1:a7bHA82fyUXOm+ZSWKU6PIoBxrjSprdLoM8xPYvzYVg= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1/go.mod h1:hHL974p5auvXlZPIjJTblXJpbkfK4klBczlsEaMCGVY= -github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= -github.com/aws/aws-sdk-go-v2/service/sts v1.23.2/go.mod h1:Eows6e1uQEsc4ZaHANmsPRzAKcVDrcmjjWiih2+HUUQ= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.4/go.mod h1:feTnm2Tk/pJxdX+eooEsxvlvTWBvDm6CasRZ+JOs2IY= -github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= -github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= -github.com/aws/smithy-go v1.17.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= -github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bits-and-blooms/bitset v1.5.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/bits-and-blooms/bitset v1.7.0 h1:YjAGVd3XmtK9ktAbX8Zg2g2PwLIMjGREZJHlV4j7NEo= -github.com/bits-and-blooms/bitset v1.7.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= -github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/btcsuite/btcd/btcec/v2 v2.2.0/go.mod h1:U7MHm051Al6XmscBQ0BoNydpOTsFAn707034b5nY8zU= -github.com/btcsuite/btcd/btcec/v2 v2.2.1 h1:xP60mv8fvp+0khmrN0zTdPC3cNm24rfeE6lh2R/Yv3E= -github.com/btcsuite/btcd/btcec/v2 v2.2.1/go.mod h1:9/CSmJxmuvqzX9Wh2fXMWToLOHhPd11lSPuIupwTkI8= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 h1:KdUfX2zKommPRa+PD0sWZUyXe9w277ABlgELO7H04IM= -github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/bytecodealliance/wasmtime-go/v7 v7.0.0/go.mod h1:bu6fic7trDt20w+LMooX7j3fsOwv4/ln6j8gAdP6vmA= -github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= -github.com/c-bata/go-prompt v0.2.6/go.mod h1:/LMAke8wD2FsNu9EXNdHxNLbd9MedkPnCdfpU9wwHfY= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= -github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= -github.com/cloudflare/cloudflare-go v0.79.0/go.mod h1:gkHQf9xEubaQPEuerBuoinR9P8bf8a05Lq0X6WKy1Oc= -github.com/cmars/basen v0.0.0-20150613233007-fe3947df716e h1:0XBUw73chJ1VYSsfvcPvVT7auykAJce9FpRr10L6Qhw= -github.com/cmars/basen v0.0.0-20150613233007-fe3947df716e/go.mod h1:P13beTBKr5Q18lJe1rIoLUqjM+CB1zYrRg44ZqGuQSA= -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/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/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/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230428030218-4003588d1b74/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/datadriven v1.0.0/go.mod h1:5Ib8Meh+jk1RlHIXej6Pzevx/NLlNvQB9pmSBZErGA4= -github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= -github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= -github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= -github.com/cockroachdb/errors v1.6.1/go.mod h1:tm6FTP5G81vwJ5lC0SizQo374JNCOPrHyXGitRJoDqM= -github.com/cockroachdb/errors v1.8.1/go.mod h1:qGwQn6JmZ+oMjuLwjWzUNqblqk0xl4CVV3SQbGwK7Ac= -github.com/cockroachdb/errors v1.9.1 h1:yFVvsI0VxmRShfawbt/laCIDy/mtTqqnvoNgiy5bEV8= -github.com/cockroachdb/errors v1.9.1/go.mod h1:2sxOtL2WIc096WSZqZ5h8fa17rdDq9HZOZLBCor4mBk= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= -github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= -github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 h1:aPEJyR4rPBvDmeyi+l/FS/VtA00IWvjeFvjen1m1l1A= -github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593/go.mod h1:6hk1eMY/u5t+Cf18q5lFMUA1Rc+Sm5I6Ra1QuPyxXCo= -github.com/cockroachdb/redact v1.0.8/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/redact v1.1.3 h1:AKZds10rFSIj7qADf0g46UixK8NNLwWTNdCIGS5wfSQ= -github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= -github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= -github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= -github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= -github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= -github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= -github.com/consensys/gnark-crypto v0.10.0/go.mod h1:Iq/P3HHl0ElSjsg2E1gsMwhAyxnxoKK5nVyZKd+/KhU= -github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= -github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/crate-crypto/go-ipa v0.0.0-20230601170251-1830d0757c80/go.mod h1:gzbVz57IDJgQ9rLQwfSk696JGWof8ftznEL9GoAv3NI= -github.com/crate-crypto/go-kzg-4844 v0.7.0 h1:C0vgZRk4q4EZ/JgPfzuSoxdCq3C3mOZMBShovmncxvA= -github.com/crate-crypto/go-kzg-4844 v0.7.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= -github.com/dave/astrid v0.0.0-20170323122508-8c2895878b14/go.mod h1:Sth2QfxfATb/nW4EsrSi2KyJmbcniZ8TgTaji17D6ms= -github.com/dave/brenda v1.1.0/go.mod h1:4wCUr6gSlu5/1Tk7akE5X7UorwiQ8Rij0SKH3/BGMOM= -github.com/dave/courtney v0.3.0/go.mod h1:BAv3hA06AYfNUjfjQr+5gc6vxeBVOupLqrColj+QSD8= -github.com/dave/dst v0.27.2/go.mod h1:jHh6EOibnHgcUW3WjKHisiooEkYwqpHLBSX1iOBhEyc= -github.com/dave/gopackages v0.0.0-20170318123100-46e7023ec56e/go.mod h1:i00+b/gKdIDIxuLDFob7ustLAVqhsZRk2qVZrArELGQ= -github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= -github.com/dave/jennifer v1.5.0/go.mod h1:4MnyiFIlZS3l5tSDn8VnzE6ffAhYBMB2SZntBsZGUok= -github.com/dave/kerr v0.0.0-20170318121727-bc25dd6abe8e/go.mod h1:qZqlPyPvfsDJt+3wHJ1EvSXDuVjFTK0j2p/ca+gtsb8= -github.com/dave/patsy v0.0.0-20210517141501-957256f50cba/go.mod h1:qfR88CgEGLoiqDaE+xxDCi5QA5v4vUoW0UCX2Nd5Tlc= -github.com/dave/rebecca v0.9.1/go.mod h1:N6XYdMD/OKw3lkF3ywh8Z6wPGuwNFDNtWYEMFWEmXBA= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c h1:pFUpOrbxDR6AkioZ1ySsx5yxlDQZ8stG2b88gTPxgJU= -github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= -github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= -github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= -github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= -github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= -github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= -github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= -github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= -github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= -github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= -github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= -github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= -github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= -github.com/dgraph-io/ristretto v0.1.0 h1:Jv3CGQHp9OjuMBSne1485aDpUkTKEcUqF+jm/LuerPI= -github.com/dgraph-io/ristretto v0.1.0/go.mod h1:fux0lOrBhrVCJd3lcTHsIJhq1T2rokOu6v9Vcb3Q9ug= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= -github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= -github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= -github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= -github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/docker v1.6.2/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= -github.com/dop251/goja v0.0.0-20220405120441-9037c2b61cbf/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= -github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= -github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= -github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= -github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/ef-ds/deque v1.0.4 h1:iFAZNmveMT9WERAkqLJ+oaABF9AcVQ5AjXem/hroniI= -github.com/ef-ds/deque v1.0.4/go.mod h1:gXDnTC3yqvBcHbq2lcExjtAcVrOnJCbMcZXmuj8Z4tg= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -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/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= -github.com/envoyproxy/go-control-plane v0.11.0/go.mod h1:VnHyVMpzcLvCFt9yUz1UnCwHLhwx1WguiVDV7pTG/tI= -github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f/go.mod h1:sfYdkwUW4BA3PbKjySwjJy+O4Pu0h62rlqCMHNk+K+Q= -github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= -github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= -github.com/envoyproxy/protoc-gen-validate v0.10.0/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= -github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= -github.com/envoyproxy/protoc-gen-validate v1.0.1/go.mod h1:0vj8bNkYbSTNS2PIyH87KZaeN4x9zpL9Qt8fQC7d+vs= -github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= -github.com/ethereum/c-kzg-4844 v0.4.0 h1:3MS1s4JtA868KpJxroZoepdV0ZKBp3u/O5HcZ7R3nlY= -github.com/ethereum/c-kzg-4844 v0.4.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= -github.com/ethereum/go-ethereum v1.10.26/go.mod h1:EYFyF19u3ezGLD4RqOkLq+ZCXzYbLoNDdZlMt7kyKFg= -github.com/ethereum/go-ethereum v1.13.5 h1:U6TCRciCqZRe4FPXmy1sMGxTfuk8P7u2UoinF3VbaFk= -github.com/ethereum/go-ethereum v1.13.5/go.mod h1:yMTu38GSuyxaYzQMViqNmQ1s3cE84abZexQmTgenWk0= -github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/fjl/gencodec v0.0.0-20220412091415-8bb9e558978c/go.mod h1:AzA8Lj6YtixmJWL+wkKoBGsLWy9gFrAzi4g+5bCKwpY= -github.com/fjl/gencodec v0.0.0-20230517082657-f9840df7b83e/go.mod h1:AzA8Lj6YtixmJWL+wkKoBGsLWy9gFrAzi4g+5bCKwpY= -github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= -github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA= -github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/fxamacker/cbor/v2 v2.4.1-0.20220515183430-ad2eae63303f/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= -github.com/fxamacker/cbor/v2 v2.4.1-0.20230228173756-c0c9f774e40c h1:5tm/Wbs9d9r+qZaUFXk59CWDD0+77PBqDREffYkyi5c= -github.com/fxamacker/cbor/v2 v2.4.1-0.20230228173756-c0c9f774e40c/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= -github.com/fxamacker/circlehash v0.3.0 h1:XKdvTtIJV9t7DDUtsf0RIpC1OcxZtPbmgIH7ekx28WA= -github.com/fxamacker/circlehash v0.3.0/go.mod h1:3aq3OfVvsWtkWMb6A1owjOQFA+TLsD5FgJflnaQwtMM= -github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61/go.mod h1:Q0X6pkwTILDlzrGEckF6HKjXe48EgsY/l7K7vhY4MW8= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= -github.com/gballet/go-verkle v0.0.0-20230607174250-df487255f46b/go.mod h1:CDncRYVRSDqwakm282WEkjfaAj1hxU/v5RXxk5nXOiI= -github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= -github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.18.0 h1:MtBW5H9QgdcJabtZcuJG80BMOwaBpkRDZkxRkNC1sN0= -github.com/getsentry/sentry-go v0.18.0/go.mod h1:Kgon4Mby+FJ7ZWHFUAZgVaIa8sxHtnRJRLTXZr51aKQ= -github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= -github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= -github.com/glebarez/go-sqlite v1.22.0 h1:uAcMJhaA6r3LHMTFgP0SifzgXg46yJkgxqyuyec+ruQ= -github.com/glebarez/go-sqlite v1.22.0/go.mod h1:PlBIdHe0+aUEFn+r2/uthrWq4FxbzugL0L8Li6yQJbc= -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-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= -github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= -github.com/go-fonts/dejavu v0.1.0/go.mod h1:4Wt4I4OU2Nq9asgDCteaAaWZOV24E+0/Pwo0gppep4g= -github.com/go-fonts/latin-modern v0.2.0/go.mod h1:rQVLdDMK+mK1xscDwsqM5J8U2jrRa3T0ecnM9pNujks= -github.com/go-fonts/latin-modern v0.3.0/go.mod h1:ysEQXnuT/sCDOAONxC7ImeEDVINbltClhasMAqEtRK0= -github.com/go-fonts/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= -github.com/go-fonts/liberation v0.2.0/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= -github.com/go-fonts/liberation v0.3.0/go.mod h1:jdJ+cqF+F4SUL2V+qxBth8fvBpBDS7yloUL5Fi8GTGY= -github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmnUIzUY= -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= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-latex/latex v0.0.0-20210118124228-b3d85cf34e07/go.mod h1:CO1AlKB2CSIqUrmQPqA0gdRIlnLEY0gK5JGjh37zN5U= -github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81/go.mod h1:SX0U8uGpxhq9o2S/CELCSUxEWWAuoCUcVCQWv7G2OCk= -github.com/go-latex/latex v0.0.0-20230307184459-12ec69307ad9/go.mod h1:gWuR/CrFDDeVRFQwHPvsv9soJVB/iqymhuZQuJ3a9OM= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= -github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= -github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= -github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= -github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= -github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= -github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= -github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= -github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= -github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= -github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= -github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.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.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -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/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= -github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= -github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= -github.com/gonum/blas v0.0.0-20181208220705-f22b278b28ac/go.mod h1:P32wAyui1PQ58Oce/KYkOqQv8cVw1zAapXOl+dRFGbc= -github.com/gonum/floats v0.0.0-20181209220543-c233463c7e82/go.mod h1:PxC8OnwL11+aosOB5+iEPoV3picfs8tUpkVd0pDo+Kg= -github.com/gonum/internal v0.0.0-20181124074243-f884aa714029/go.mod h1:Pu4dmpkhSyOzRwuXkOgAvijx4o+4YMUJJo9OvPYMkks= -github.com/gonum/lapack v0.0.0-20181123203213-e4cdc5a0bff9/go.mod h1:XA3DeT6rxh2EAE789SSiSJNqxPaC0aE9J8NTOI0Jo/A= -github.com/gonum/matrix v0.0.0-20181209220409-c518dec07be9/go.mod h1:0EXg4mc1CNP0HCqCz+K4ts155PXIlUywf0wqN+GfPZw= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= -github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.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/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-pkcs11 v0.2.0/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= -github.com/google/go-pkcs11 v0.2.1-0.20230907215043-c6f79328ddf9/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -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/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -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/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= -github.com/google/pprof v0.0.0-20230602150820-91b7bce49751 h1:hR7/MlvK23p6+lIw9SN1TigNLn9ZnF3W4SYRKq2gAHs= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/s2a-go v0.1.0/go.mod h1:OJpEgntRZo8ugHpF9hkoLJbS5dSI20XZeXJ9JVywLlM= -github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= -github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= -github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= -github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= -github.com/google/safehtml v0.0.2/go.mod h1:L4KWwDsUJdECRAEpZoBn3O64bQaywRscowZjJAzjHnU= -github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= -github.com/google/uuid v1.5.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/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/enterprise-certificate-proxy v0.2.1/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= -github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= -github.com/googleapis/enterprise-certificate-proxy v0.2.4/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= -github.com/googleapis/enterprise-certificate-proxy v0.2.5/go.mod h1:RxW0N9901Cko1VOCW3SXCpWP+mlIEkk2tP7jnHy9a3w= -github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= -github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= -github.com/googleapis/gax-go v0.0.0-20161107002406-da06d194a00e/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= -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/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= -github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= -github.com/googleapis/gax-go/v2 v2.8.0/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= -github.com/googleapis/gax-go/v2 v2.10.0/go.mod h1:4UOEnMCrxsSqQ940WnTiD6qJ63le2ev3xfyagutxiPw= -github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= -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/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gosuri/uilive v0.0.4 h1:hUEBpQDj8D8jXgtCdBu7sWsy5sbW/5GhuO8KBwJ2jyY= -github.com/gosuri/uilive v0.0.4/go.mod h1:V/epo5LjjlDE5RJUcqx8dbw+zc93y5Ya3yg8tfZ74VI= -github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 h1:lLT7ZLSzGLI08vc9cpd+tYmNWjdKDqyr/2L+f6U12Fk= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= -github.com/guptarohit/asciigraph v0.5.5/go.mod h1:dYl5wwK4gNsnFf9Zp+l06rFiDZ5YtXM6x7SRWZ3KGag= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= -github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-retryablehttp v0.7.4/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/golang-lru/v2 v2.0.2 h1:Dwmkdr5Nc/oBiXgJS3CDHNhJtIHkuZ3DZF5twqnfBdU= -github.com/hashicorp/golang-lru/v2 v2.0.2/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/holiman/billy v0.0.0-20230718173358-1c7e68d277a7/go.mod h1:5GuXa7vkL8u9FkFuWdVvfR5ix8hRB7DbOAaYULamFpc= -github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= -github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= -github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= -github.com/holiman/uint256 v1.2.3 h1:K8UWO1HUJpRMXBxbmaY1Y8IAMZC/RsKB+ArEnnK4l5o= -github.com/holiman/uint256 v1.2.3/go.mod h1:SC8Ryt4n+UBbPbIBKaG9zbbDlp4jOru9xFZmPzLUTxw= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= -github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= -github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= -github.com/hydrogen18/memlistener v0.0.0-20141126152155-54553eb933fb/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 h1:i462o439ZjprVSFSZLZxcsoAe592sZB1rci2Z8j4wdk= -github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0/go.mod h1:N0Wam8K1arqPXNWjMo21EXnBPOPp36vB07FNRdD2geA= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= -github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= -github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= -github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= -github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= -github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= -github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= -github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= -github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= -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/invopop/jsonschema v0.7.0 h1:2vgQcBz1n256N+FpX3Jq7Y17AjYt46Ig3zIWyy770So= -github.com/invopop/jsonschema v0.7.0/go.mod h1:O9uiLokuu0+MGFlyiaqtWxwqJm41/+8Nj0lD7A36YH0= -github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= -github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= -github.com/ipfs/boxo v0.10.0 h1:tdDAxq8jrsbRkYoF+5Rcqyeb91hgWe2hp7iLu7ORZLY= -github.com/ipfs/go-block-format v0.1.2 h1:GAjkfhVx1f4YTODS6Esrj1wt2HhrtwTnhEr+DyPUaJo= -github.com/ipfs/go-block-format v0.1.2/go.mod h1:mACVcrxarQKstUU3Yf/RdwbC4DzPV6++rO2a3d+a/KE= -github.com/ipfs/go-cid v0.0.5/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= -github.com/ipfs/go-cid v0.4.1 h1:A/T3qGvxi4kpKWWcPC/PgbvDA2bjVLO7n4UeVwnbs/s= -github.com/ipfs/go-cid v0.4.1/go.mod h1:uQHwDeX4c6CtyrFwdqyhpNcxVewur1M7l7fNU7LKwZk= -github.com/ipfs/go-datastore v0.5.0/go.mod h1:9zhEApYMTl17C8YDp7JmU7sQZi2/wqiYh73hakZ90Bk= -github.com/ipfs/go-datastore v0.6.0 h1:JKyz+Gvz1QEZw0LsX1IBn+JFCJQH4SJVFtM4uWU0Myk= -github.com/ipfs/go-datastore v0.6.0/go.mod h1:rt5M3nNbSO/8q1t4LNkLyUwRs8HupMeN/8O4Vn9YAT8= -github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk= -github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps= -github.com/ipfs/go-ipfs-blockstore v1.3.0 h1:m2EXaWgwTzAfsmt5UdJ7Is6l4gJcaM/A12XwJyvYvMM= -github.com/ipfs/go-ipfs-blockstore v1.3.0/go.mod h1:KgtZyc9fq+P2xJUiCAzbRdhhqJHvsw8u2Dlqy2MyRTE= -github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= -github.com/ipfs/go-ipfs-ds-help v1.1.0 h1:yLE2w9RAsl31LtfMt91tRZcrx+e61O5mDxFRR994w4Q= -github.com/ipfs/go-ipfs-ds-help v1.1.0/go.mod h1:YR5+6EaebOhfcqVCyqemItCLthrpVNot+rsOU/5IatU= -github.com/ipfs/go-ipfs-util v0.0.2 h1:59Sswnk1MFaiq+VcaknX7aYEyGyGDAA73ilhEK2POp8= -github.com/ipfs/go-ipfs-util v0.0.2/go.mod h1:CbPtkWJzjLdEcezDns2XYaehFVNXG9zrdrtMecczcsQ= -github.com/ipfs/go-ipld-format v0.5.0 h1:WyEle9K96MSrvr47zZHKKcDxJ/vlpET6PSiQsAFO+Ds= -github.com/ipfs/go-ipld-format v0.5.0/go.mod h1:ImdZqJQaEouMjCvqCe0ORUS+uoBmf7Hf+EO/jh+nk3M= -github.com/ipfs/go-log v1.0.5 h1:2dOuUCB1Z7uoczMWgAyDck5JLb72zHzrMnGnCNNbvY8= -github.com/ipfs/go-log v1.0.5/go.mod h1:j0b8ZoR+7+R99LD9jZ6+AJsrzkPbSXbZfGakb5JPtIo= -github.com/ipfs/go-log/v2 v2.1.3/go.mod h1:/8d0SH3Su5Ooc31QlL1WysJhvyOTDCjcCZ9Axpmri6g= -github.com/ipfs/go-log/v2 v2.5.1 h1:1XdUzF7048prq4aBjDQQ4SL5RxftpRGdXhNRwKSAlcY= -github.com/ipfs/go-log/v2 v2.5.1/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI= -github.com/ipfs/go-metrics-interface v0.0.1 h1:j+cpbjYvu4R8zbleSs36gvB7jR+wsL2fGD6n0jO4kdg= -github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= -github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA= -github.com/jbenet/go-temp-err-catcher v0.1.0 h1:zpb3ZH6wIE8Shj2sKS+khgRvf7T7RABoLk/+KKHggpk= -github.com/jbenet/go-temp-err-catcher v0.1.0/go.mod h1:0kJRvmDZXNMIiJirNPEYfhpPwbGVtZVWC34vc5WLsDk= -github.com/jbenet/goprocess v0.1.4 h1:DRGOFReOMqqDNXwW70QkacFW0YN9QnwLV0Vqk+3oU0o= -github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= -github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= -github.com/jedisct1/go-minisign v0.0.0-20230811132847-661be99b8267/go.mod h1:h1nSAbGFqGVzn6Jyl1R/iCcBUHN4g+gW1u9CoBTrb9E= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -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.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5/go.mod h1:W54LbzXuIE0boCoNJfwqpmkKJ1O4TCTZMetAt6jGk7Q= -github.com/juju/loggo v0.0.0-20180524022052-584905176618/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= -github.com/juju/testing v0.0.0-20180920084828-472a3e8b2073/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 h1:uC1QfSlInpQF+M0ao65imhwqKnz3Q2z/d8PWZRMQvDM= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw= -github.com/k0kubun/pp v3.0.1+incompatible h1:3tqvf7QgUnZ5tXO6pNAZlrvHgl6DvifjDrd9g2S9Z40= -github.com/k0kubun/pp v3.0.1+incompatible/go.mod h1:GWse8YhT0p8pT4ir3ZgBbfZild3tgzSScAn6HmfYukg= -github.com/k0kubun/pp/v3 v3.2.0/go.mod h1:ODtJQbQcIRfAD3N+theGCV1m/CBxweERz2dapdz1EwA= -github.com/karalabe/usb v0.0.2/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= -github.com/kataras/golog v0.0.9/go.mod h1:12HJgwBIZFNGL0EJnMRhmvGA0PQGx8VFwrZtM4CqbAk= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.0.1/go.mod h1:udK4vLQKkdDqMGJJVd/msuMtN6hpYJhg/lSzuxjhO+U= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.10/go.mod h1:ZYmJC07hQPW67eKuzlfY7SO3bC0mw83A3j6im82hfqw= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d/go.mod h1:NV88laa9UiiDuX9AhMbDPkGYSPugBOV6yTZB1l2K9Z0= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= -github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= -github.com/kevinburke/go-bindata v3.23.0+incompatible/go.mod h1:/pEEZ72flUW2p0yi30bslSp9YqD9pysLxunQDdb2CPM= -github.com/kevinburke/go-bindata v3.24.0+incompatible h1:qajFA3D0pH94OTLU4zcCCKCDgR+Zr2cZK/RPJHDdFoY= -github.com/kevinburke/go-bindata v3.24.0+incompatible/go.mod h1:/pEEZ72flUW2p0yi30bslSp9YqD9pysLxunQDdb2CPM= -github.com/kilic/bls12-381 v0.1.0/go.mod h1:vDTTHJONJ6G+P2R74EhnyotQDTliQDnFEwhdmfzw1ig= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= -github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= -github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= -github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= -github.com/klauspost/cpuid/v2 v2.2.0/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= -github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= -github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= -github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= -github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v0.0.0-20170224010052-a616ab194758/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g= -github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= -github.com/labstack/echo/v4 v4.5.0/go.mod h1:czIriw4a0C1dFun+ObrXp7ok03xON0N1awStJ6ArI7Y= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= -github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= -github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= -github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= -github.com/libp2p/go-cidranger v1.1.0 h1:ewPN8EZ0dd1LSnrtuwd4709PXVcITVeuwbag38yPW7c= -github.com/libp2p/go-libp2p v0.28.1 h1:YurK+ZAI6cKfASLJBVFkpVBdl3wGhFi6fusOt725ii8= -github.com/libp2p/go-libp2p v0.28.1/go.mod h1:s3Xabc9LSwOcnv9UD4nORnXKTsWkPMkIMB/JIGXVnzk= -github.com/libp2p/go-libp2p-asn-util v0.3.0 h1:gMDcMyYiZKkocGXDQ5nsUQyquC9+H+iLEQHwOCZ7s8s= -github.com/libp2p/go-libp2p-kbucket v0.6.3 h1:p507271wWzpy2f1XxPzCQG9NiN6R6lHL9GiSErbQQo0= -github.com/libp2p/go-libp2p-pubsub v0.9.3 h1:ihcz9oIBMaCK9kcx+yHWm3mLAFBMAUsM4ux42aikDxo= -github.com/libp2p/go-msgio v0.3.0 h1:mf3Z8B1xcFN314sWX+2vOTShIE0Mmn2TXn3YCUQGNj0= -github.com/libp2p/go-yamux/v4 v4.0.0 h1:+Y80dV2Yx/kv7Y7JKu0LECyVdMXm1VUoko+VQ9rBfZQ= -github.com/lmars/go-slip10 v0.0.0-20190606092855-400ba44fee12 h1:qFV7dBLhw5z4hka5gjtIzg1Kq9ie8t8P7Cy0uIxRyAQ= -github.com/lmars/go-slip10 v0.0.0-20190606092855-400ba44fee12/go.mod h1:QIsK6U93yCP6TnGsShCv5wl4gcz/mpCHl+aToBsl5Sc= -github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8= -github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= -github.com/logrusorgru/aurora/v4 v4.0.0 h1:sRjfPpun/63iADiSvGGjgA1cAYegEWMPCJdUpJYn9JA= -github.com/logrusorgru/aurora/v4 v4.0.0/go.mod h1:lP0iIa2nrnT/qoFXcOZSrZQpJ1o6n2CUf/hyHi2Q4ZQ= -github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= -github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= -github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o= -github.com/lyft/protoc-gen-star/v2 v2.0.3/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLOSpEk//mLlc+axEk= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= -github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= -github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= -github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-sqlite3 v1.14.5/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI= -github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= -github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= -github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= -github.com/mattn/go-tty v0.0.3/go.mod h1:ihxohKRERHTVzN+aSVRwACLCeqIoZAWpoICkkvrWyR0= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mediocregopher/mediocre-go-lib v0.0.0-20181029021733-cb65787f37ed/go.mod h1:dSsfyI2zABAdhcbvkXqgxOxrCsbYeHCPgrZkku60dSg= -github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= -github.com/miekg/dns v1.1.54 h1:5jon9mWcb0sFJGpnI99tOMhCPyJ+RPVz5b63MQG0VWI= -github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= -github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= -github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= -github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= -github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM= -github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8= -github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= -github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= -github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= -github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= -github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -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/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= -github.com/montanaflynn/stats v0.7.0/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= -github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= -github.com/mr-tron/base58 v1.1.3/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= -github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA= -github.com/multiformats/go-base32 v0.1.0 h1:pVx9xoSPqEIQG8o+UbAe7DNi51oej1NtK+aGkbLYxPE= -github.com/multiformats/go-base32 v0.1.0/go.mod h1:Kj3tFY6zNr+ABYMqeUNeGvkIC/UYgtWibDcT0rExnbI= -github.com/multiformats/go-base36 v0.2.0 h1:lFsAbNOGeKtuKozrtBsAkSVhv1p9D0/qedU9rQyccr0= -github.com/multiformats/go-base36 v0.2.0/go.mod h1:qvnKE++v+2MWCfePClUEjE78Z7P2a1UV0xHgWc0hkp4= -github.com/multiformats/go-multiaddr v0.9.0 h1:3h4V1LHIk5w4hJHekMKWALPXErDfz/sggzwC/NcqbDQ= -github.com/multiformats/go-multiaddr v0.9.0/go.mod h1:mI67Lb1EeTOYb8GQfL/7wpIZwc46ElrvzhYnoJOmTT0= -github.com/multiformats/go-multiaddr-dns v0.3.1 h1:QgQgR+LQVt3NPTjbrLLpsaT2ufAA2y0Mkk+QRVJbW3A= -github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= -github.com/multiformats/go-multibase v0.2.0 h1:isdYCVLvksgWlMW9OZRYJEa9pZETFivncJHmHnnd87g= -github.com/multiformats/go-multibase v0.2.0/go.mod h1:bFBZX4lKCA/2lyOFSAoKH5SS6oPyjtnzK/XTFDPkNuk= -github.com/multiformats/go-multicodec v0.9.0 h1:pb/dlPnzee/Sxv/j4PmkDRxCOi3hXTz3IbPKOXWJkmg= -github.com/multiformats/go-multicodec v0.9.0/go.mod h1:L3QTQvMIaVBkXOXXtVmYE+LI16i14xuaojr/H7Ai54k= -github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= -github.com/multiformats/go-multihash v0.2.3 h1:7Lyc8XfX/IY2jWb/gI7JP+o7JEq9hOa7BFvVU9RSh+U= -github.com/multiformats/go-multihash v0.2.3/go.mod h1:dXgKXCXjBzdscBLk9JkjINiEsCKRVch90MdaGiKsvSM= -github.com/multiformats/go-multistream v0.4.1 h1:rFy0Iiyn3YT0asivDUIR05leAdwZq3de4741sbiSdfo= -github.com/multiformats/go-multistream v0.4.1/go.mod h1:Mz5eykRVAjJWckE2U78c6xqdtyNUEhKSM0Lwar2p77Q= -github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= -github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/nEGOHFS8= -github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= -github.com/naoina/toml v0.1.2-0.20170918210437-9fafd6967416/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/nats.go v1.8.1/go.mod h1:BrFz9vVn0fU3AcH9Vn4Kd7W0NpJ651tD5omQ3M8LwxM= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.0.2/go.mod h1:dab7URMsZm6Z/jp9Z5UGa87Uutgc2mVpXLC4B7TDb/4= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f h1:Z8/PgTqOgOg02MTRpTBYO2k16FE6z4wEOtaC2WBR9Xo= -github.com/onflow/atree v0.6.1-0.20230711151834-86040b30171f/go.mod h1:xvP61FoOs95K7IYdIYRnNcYQGf4nbF/uuJ0tHf4DRuM= -github.com/onflow/cadence v1.0.0-M3/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8= -github.com/onflow/cadence v1.0.0-M4 h1:/nt3j7vpYDxuI0ghIgAJrb2R01ijvJYZLAkKt+zbpTY= -github.com/onflow/cadence v1.0.0-M4/go.mod h1:odXGZZ/wGNA5mwT8bC9v8u8EXACHllB2ABSZK65TGL8= -github.com/onflow/crypto v0.25.0 h1:BeWbLsh3ZD13Ej+Uky6kg1PL1ZIVBDVX+2MVBNwqddg= -github.com/onflow/crypto v0.25.0/go.mod h1:C8FbaX0x8y+FxWjbkHy0Q4EASCDR9bSPWZqlpCLYyVI= -github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.1-0.20240125214229-b7a95136dd0d h1:Afcfk/9jAQZ1v5PLGdP68FG/0yPPM60fn9Eq8ChBGS0= -github.com/onflow/flow-core-contracts/lib/go/contracts v0.15.1-0.20240125214229-b7a95136dd0d/go.mod h1:Ts/HN+N0RaYJ6oPCqR1JPaMVFiVaMdKTSUH4OdSjjs0= -github.com/onflow/flow-core-contracts/lib/go/templates v0.15.1-0.20240125214229-b7a95136dd0d h1:IQJpP3VLLjT4R8ItBpr+Mmp0IOnC/8iBcM0/67JNB9c= -github.com/onflow/flow-core-contracts/lib/go/templates v0.15.1-0.20240125214229-b7a95136dd0d/go.mod h1:MZ2j5YVTQiSE0B99zuaYhxvGG5GcvimWpQK1Fw/1QBg= -github.com/onflow/flow-emulator v1.0.0-M1 h1:0hBEmvm73F+5HhN5ugkOP3UyN+Ea9yGWflEmoeGzgdw= -github.com/onflow/flow-emulator v1.0.0-M1/go.mod h1:JFJCeQVyhCQVD2Tq4QhctIXK6j5U6aU15yoEwMJt5AQ= -github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20240125205519-2e80d9b4bd01 h1:8iKk5RuFvhe7NQyAO3c+xiVvv38RB/yopHdWxp4AbL8= -github.com/onflow/flow-ft/lib/go/contracts v0.7.1-0.20240125205519-2e80d9b4bd01/go.mod h1:PwsL8fC81cjnUnTfmyL/HOIyHnyaw/JA474Wfj2tl6A= -github.com/onflow/flow-go v0.33.2-0.20240126211806-97279f96695f h1:F1y95CpteZn0i4v0FDGjKiqI13Xlir3hX4x0C1xMRoc= -github.com/onflow/flow-go v0.33.2-0.20240126211806-97279f96695f/go.mod h1:9q+c+fuTpc/emueM/2bI/Ih2jw3V+9WS3Eu+pWBuLW0= -github.com/onflow/flow-go-sdk v1.0.0-M1 h1:mke/ebYwNRRWPZqcwCV56Alx0A8psew43ZbSEUQ4TL8= -github.com/onflow/flow-go-sdk v1.0.0-M1/go.mod h1:TDW0MNuCs4SvqYRUzkbRnRmHQL1h4X8wURsCw9P9beo= -github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240125205553-d2b571fb3fad h1:I6LD9BOsilGbiqhGjP86FIIXJe0YdUz75d/oWdHFzDI= -github.com/onflow/flow-nft/lib/go/contracts v1.1.1-0.20240125205553-d2b571fb3fad/go.mod h1:2gpbza+uzs1k7x31hkpBPlggIRkI53Suo0n2AyA2HcE= -github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231121210617-52ee94b830c2/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk= -github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2 h1:+rT+UsfTR39JZO8ht2+4fkaWfHw74SCj1fyz1lWuX8A= -github.com/onflow/flow/protobuf/go/flow v0.3.2-0.20231213135419-ae911cc351a2/go.mod h1:NA2pX2nw8zuaxfKphhKsk00kWLwfd+tv8mS23YXO4Sk= -github.com/onflow/sdks v0.5.1-0.20230912225508-b35402f12bba h1:rIehuhO6bj4FkwE4VzwEjX7MoAlOhUJENBJLqDqVxAo= -github.com/onflow/sdks v0.5.1-0.20230912225508-b35402f12bba/go.mod h1:F0dj0EyHC55kknLkeD10js4mo14yTdMotnWMslPirrU= -github.com/onflow/wal v0.0.0-20230529184820-bc9f8244608d h1:gAEqYPn3DS83rHIKEpsajnppVD1+zwuYPFyeDVFaQvg= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= -github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= -github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= -github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= -github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= -github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= -github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= -github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= -github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= -github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= -github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= -github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= -github.com/pkg/term v1.2.0-beta.2/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw= -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/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.0/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/protolambda/bls12-381-util v0.0.0-20220416220906-d8552aa452c7/go.mod h1:IToEjHuttnUzwZI5KBSM/LOOW3qLbbrHOEfp3SbECGY= -github.com/psiemens/graceland v1.0.0 h1:L580AVV4Q2XLcPpmvxJRH9UpEAYr/eu2jBKmMglhvM8= -github.com/psiemens/graceland v1.0.0/go.mod h1:1Tof+vt1LbmcZFE0lzgdwMN0QBymAChG3FRgDx8XisU= -github.com/psiemens/sconfig v0.1.0 h1:xfWqW+TRpih7mXZIqKYTmpRhlZLQ1kbxV8EjllPv76s= -github.com/psiemens/sconfig v0.1.0/go.mod h1:+MLKqdledP/8G3rOBpknbLh0IclCf4WneJUtS26JB2U= -github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= -github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= -github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.29.0 h1:Zes4hju04hjbvkVkOhdl2HpZa+0PmVwigmo8XoORE5w= -github.com/rs/zerolog v1.29.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= -github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= -github.com/schollz/progressbar/v3 v3.13.1 h1:o8rySDYiQ59Mwzy2FELeHY5ZARXZTVJC7iHD6PEFUiE= -github.com/schollz/progressbar/v3 v3.13.1/go.mod h1:xvrbki8kfT1fzWzBT/UZd9L6GA+jdL7HAgq2RFnO6fQ= -github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= -github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= -github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/sethvargo/go-retry v0.2.3 h1:oYlgvIvsju3jNbottWABtbnoLC+GDtLdBHxKWxQm/iU= -github.com/sethvargo/go-retry v0.2.3/go.mod h1:1afjQuvh7s4gflMObvjLPaWgluLLyhA1wmVZ6KLpICw= -github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= -github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/slok/go-http-metrics v0.10.0 h1:rh0LaYEKza5eaYRGDXujKrOln57nHBi4TtVhmNEpbgM= -github.com/slok/go-http-metrics v0.10.0/go.mod h1:lFqdaS4kWMfUKCSukjC47PdCeTk+hXDUVm8kLHRqJ38= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= -github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= -github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= -github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= -github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= -github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= -github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v0.0.0-20170601210322-f6abca593680/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.3.1-0.20190311161405-34c6fa2dc709/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= -github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= -github.com/supranational/blst v0.3.8-0.20220526154634-513d2456b344/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= -github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= -github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= -github.com/texttheater/golang-levenshtein/levenshtein v0.0.0-20200805054039-cae8b0eaed6c h1:HelZ2kAFadG0La9d+4htN4HzQ68Bm2iM9qKMSMES6xg= -github.com/texttheater/golang-levenshtein/levenshtein v0.0.0-20200805054039-cae8b0eaed6c/go.mod h1:JlzghshsemAMDGZLytTFY8C1JQxQPhnatWqNwUXjggo= -github.com/thoas/go-funk v0.9.2 h1:oKlNYv0AY5nyf9g+/GhMgS/UO2ces0QRdPKwkhY3VCk= -github.com/thoas/go-funk v0.9.2/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q= -github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= -github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= -github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= -github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= -github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= -github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= -github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/turbolent/prettier v0.0.0-20220320183459-661cc755135d h1:5JInRQbk5UBX8JfUvKh2oYTLMVwj3p6n+wapDDm7hko= -github.com/turbolent/prettier v0.0.0-20220320183459-661cc755135d/go.mod h1:Nlx5Y115XQvNcIdIy7dZXaNSUpzwBSge4/Ivk93/Yog= -github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= -github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= -github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= -github.com/urfave/cli/v2 v2.10.2/go.mod h1:f8iq5LtQ/bLxafbdBSLPPNsgaW0l/2fYYEHhAyPlwvo= -github.com/urfave/cli/v2 v2.24.1/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc= -github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= -github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= -github.com/vmihailenco/msgpack/v4 v4.3.11 h1:Q47CePddpNGNhk4GCnAx9DDtASi2rasatE0cd26cZoE= -github.com/vmihailenco/msgpack/v4 v4.3.11/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= -github.com/vmihailenco/tagparser v0.1.1 h1:quXMXlA39OCbd2wAdTsGDlK9RkOk6Wuw+x37wVyIuWY= -github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= -github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= -github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= -github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= -github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zeebo/assert v1.1.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= -github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= -github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= -github.com/zeebo/blake3 v0.2.3 h1:TFoLXsjeXqRNFxSbk35Dk4YtszE/MQQGK10BH4ptoTg= -github.com/zeebo/blake3 v0.2.3/go.mod h1:mjJjZpnsyIVtVgTOSpJ9vmRE4wgDeyt2HU3qXvvKCaQ= -github.com/zeebo/pcg v1.0.1 h1:lyqfGeWiv4ahac6ttHs+I5hwtH/+1mrhlCtVNQM2kHo= -github.com/zeebo/pcg v1.0.1/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4= -github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -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/otel v1.8.0/go.mod h1:2pkj+iMj0o03Y+cW6/m8Y4WkRdYN3AvCXCnzRMp9yvM= -go.opentelemetry.io/otel v1.16.0 h1:Z7GVAX/UkAXPKsy94IU+i6thsQS4nb7LviLpnaNeW8s= -go.opentelemetry.io/otel v1.16.0/go.mod h1:vl0h9NUa1D5s1nv3A5vZOYWn8av4K8Ml6JDeHrT/bx4= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0 h1:t4ZwRPU+emrcvM2e9DHd0Fsf0JTPVcbfa/BhTDF03d0= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.16.0/go.mod h1:vLarbg68dH2Wa77g71zmKQqlQ8+8Rq3GRG31uc0WcWI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0 h1:cbsD4cUcviQGXdw8+bo5x2wazq10SKz8hEbtCRPcU78= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.16.0/go.mod h1:JgXSGah17croqhJfhByOLVY719k1emAXC8MVhCIJlRs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0 h1:ap+y8RXX3Mu9apKVtOkM6WSFESLM8K3wNQyOU8sWHcc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0/go.mod h1:5w41DY6S9gZrbjuq6Y+753e96WfPha5IcsOSZTtullM= -go.opentelemetry.io/otel/metric v1.16.0 h1:RbrpwVG1Hfv85LgnZ7+txXioPDoh6EdbZHo26Q3hqOo= -go.opentelemetry.io/otel/metric v1.16.0/go.mod h1:QE47cpOmkwipPiefDwo2wDzwJrlfxxNYodqc4xnGCo4= -go.opentelemetry.io/otel/sdk v1.16.0 h1:Z1Ok1YsijYL0CSJpHt4cS3wDDh7p572grzNrBMiMWgE= -go.opentelemetry.io/otel/sdk v1.16.0/go.mod h1:tMsIuKXuuIWPBAOrH+eHtvhTL+SntFtXF9QD68aP6p4= -go.opentelemetry.io/otel/trace v1.8.0/go.mod h1:0Bt3PXY8w+3pheS3hQUt+wow8b1ojPaTBoTCh2zIFI4= -go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZEu5MQs= -go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= -go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -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.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= -go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/automaxprocs v1.5.2/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= -go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= -go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= -go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= -go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= -golang.org/x/crypto v0.0.0-20170613210332-850760c427c5/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/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-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-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190909091759-094676da4a83/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= -golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45I= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191002040644-a1355ae1e2c3/go.mod h1:NOZ3BPKG0ec/BKJQgnvsSFpcKLM5xXVWnvZS97DWHgE= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= -golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= -golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/exp v0.0.0-20230321023759-10a507213a29/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= -golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= -golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc h1:ao2WRsKSzW6KuUY9IWPwWahcHCgR0s52IfwutMfEbdM= -golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= -golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20200119044424-58c23975cae1/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20200430140353-33d19683fad8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20200618115811-c13761719519/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20201208152932-35266b937fa6/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20210216034530-4410531fe030/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/image v0.0.0-20210607152325-775e3b0c77b9/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.0.0-20220302094943-723b81ca9867/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= -golang.org/x/image v0.5.0/go.mod h1:FVC7BI/5Ym8R25iw5OLsgshdUBbT1h5jZTpA+mvAdZ4= -golang.org/x/image v0.6.0/go.mod h1:MXLdDR43H7cDJq5GEGXEVeeNhPgi+YYEQ2pC1byI1x0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= -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= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.6.0-dev.0.20211013180041-c96bc1413d57/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= -golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201010224723-4f7140c49acb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-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-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211008194852-3b03d305991f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/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.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/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.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= -golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= -golang.org/x/oauth2 v0.0.0-20170207211851-4464e7848382/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-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-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-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= -golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= -golang.org/x/oauth2 v0.6.0/go.mod h1:ycmewcwgD4Rpr3eZJLSB4Kyyljb3qDh40vJ8STE5HKw= -golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= -golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= -golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= -golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= -golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= -golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= -golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5/go.mod h1:UBKtEnL8aqnd+0JHqZ+2qoMDwtuy6cYhhKNoHLBiTQc= -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= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-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-20220819030929-7fc1605a5dde/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/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/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= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200918174421-af09f7315aff/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-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-20210304124612-50617c2ba197/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-20210403161142-5e06dd20ab57/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-20210616045830-e2b7044e8c71/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-20210816183151-1e6c022a8912/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-20211007075335-d3039528d8ac/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-20211020174200-9d6173849985/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-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-20220310020820-b874c991c1a5/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-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/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-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -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.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= -golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= -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= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -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.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190927191325-030b2cf1153e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191126055441-b0650ceb63d9/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.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.8-0.20211029000441-d6a9af8af023/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= -golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= -golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= -golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= -golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= -golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= -golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= -golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-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/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= -gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= -gonum.org/v1/gonum v0.6.1/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= -gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= -gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= -gonum.org/v1/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA= -gonum.org/v1/gonum v0.13.0 h1:a0T3bh+7fhRyqeNbiC3qVHYmkiQgit3wnNan/2c0HMM= -gonum.org/v1/gonum v0.13.0/go.mod h1:/WPYRckkfWrhWefxyYTfrTtQR0KH4iyHNuzxqXAKyAU= -gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= -gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= -gonum.org/v1/plot v0.9.0/go.mod h1:3Pcqqmp6RHvJI72kgb8fThyUnav364FOsdDo2aGW5lY= -gonum.org/v1/plot v0.10.0/go.mod h1:JWIHJ7U20drSQb/aDpTetJzfC1KlAPldJLpkSy88dvQ= -gonum.org/v1/plot v0.10.1/go.mod h1:VZW5OlhkL1mysU9vaqNHnsy86inf6Ot+jB3r+BczCEo= -google.golang.org/api v0.0.0-20170206182103-3d017632ea10/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= -google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= -google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= -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.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91A08= -google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= -google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= -google.golang.org/api v0.106.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= -google.golang.org/api v0.107.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= -google.golang.org/api v0.108.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= -google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60ca7iI= -google.golang.org/api v0.111.0/go.mod h1:qtFHvU9mhgTJegR31csQ+rwxyUTHOKFqCKWp1J0fdw0= -google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= -google.golang.org/api v0.118.0/go.mod h1:76TtD3vkgmZ66zZzp72bUUklpmQmKlhh6sYtIjYK+5E= -google.golang.org/api v0.122.0/go.mod h1:gcitW0lvnyWjSp9nKxAbdHKIZ6vF4aajGueeslZOyms= -google.golang.org/api v0.124.0/go.mod h1:xu2HQurE5gi/3t1aFCvhPD781p0a3p11sdunTJ2BlP4= -google.golang.org/api v0.125.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= -google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= -google.golang.org/api v0.128.0/go.mod h1:Y611qgqaE92On/7g65MQgxYul3c0rEB894kniWLY750= -google.golang.org/api v0.139.0/go.mod h1:CVagp6Eekz9CjGZ718Z+sloknzkDJE7Vc1Ckj9+viBk= -google.golang.org/api v0.149.0/go.mod h1:Mwn1B7JTXrzXtnvmzQE2BD6bYZQ8DShKZDZbeN9I7qI= -google.golang.org/api v0.151.0 h1:FhfXLO/NFdJIzQtCqjpysWwqKk8AzGWBUhMIx67cVDU= -google.golang.org/api v0.151.0/go.mod h1:ccy+MJ6nrYFgE3WgRx/AMXOxOmU8Q4hSa+jjibzhxcg= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20180518175338-11a468237815/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= -google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-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-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -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-20221024153911-1573dae28c9c/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= -google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221117204609-8f9c96812029/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221201204527-e3fa12d562f3/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614GARnxrLsqKREzmNYJACSWWpAWdNMwnD7c2BE= -google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230112194545-e10362b5ecf9/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230113154510-dbe35b8444a5/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230123190316-2c411cf9d197/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230124163310-31e0e69b6fc2/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230125152338-dcaf20b6aeaa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230127162408-596548ed4efa/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44/go.mod h1:8B0gmkoRebU8ukX6HP+4wrVQUY1+6PkQ44BSyIlflHA= -google.golang.org/genproto v0.0.0-20230222225845-10f96fb3dbec/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= -google.golang.org/genproto v0.0.0-20230223222841-637eb2293923/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= -google.golang.org/genproto v0.0.0-20230303212802-e74f57abe488/go.mod h1:TvhZT5f700eVlTNwND1xoEZQeWTB2RY/65kplwl/bFA= -google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= -google.golang.org/genproto v0.0.0-20230320184635-7606e756e683/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s= -google.golang.org/genproto v0.0.0-20230323212658-478b75c54725/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230330154414-c0448cd141ea/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230403163135-c38d8f061ccd/go.mod h1:UUQDJDOlWu4KYeJZffbWgBkS1YFobzKbLVfK69pe0Ak= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= -google.golang.org/genproto v0.0.0-20230525234025-438c736192d0/go.mod h1:9ExIQyXL5hZrHzQceCwuSYwZZ5QZBazOcprJ5rgs3lY= -google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= -google.golang.org/genproto v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= -google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= -google.golang.org/genproto v0.0.0-20230629202037-9506855d4529/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64= -google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51iE/nOGvQaDUuadVYqovW56s5emA88lQnj6Y= -google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0= -google.golang.org/genproto v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:0ggbjUrZYpy1q+ANUS30SEoGZ53cdfwtbuG7Ptgy108= -google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= -google.golang.org/genproto v0.0.0-20230821184602-ccc8af3d0e93/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= -google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= -google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= -google.golang.org/genproto v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:CCviP9RmpZ1mxVr8MUjCnSiY09IbAXZxhLE6EhHIdPU= -google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97/go.mod h1:t1VqOqqvce95G3hIDCT5FeO3YUc6Q4Oe24L/+rNMxRk= -google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:EMfReVxb80Dq1hhioy0sOsY9jCE46YDgHlJ7fWVUWRE= -google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA= -google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= -google.golang.org/genproto/googleapis/api v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:mPBs5jNgx2GuQGvFwUvVKqtn6HsUw9nP64BedgvqEsQ= -google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= -google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= -google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5/go.mod h1:5DZzOUPCLYL3mNkQ0ms0F3EuUNZ7py1Bqeq6sxzI7/Q= -google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= -google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= -google.golang.org/genproto/googleapis/api v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:RdyHbowztCGQySiCvQPgWQWgWhGnouTdCflKoDBt32U= -google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0= -google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:SUBoKXbI1Efip18FClrQVGjWcyd0QZd8KkvdP34t7ww= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b h1:CIC2YMXmIhYw6evmhPxBKJ4fmLbOFtXQN/GV3XOZR8k= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20230807174057-1744710a1577/go.mod h1:NjCQG/D8JandXxM57PZbAJL1DCNL6EypA0vPPwfsc7c= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20231030173426-d783a09b4405/go.mod h1:GRUCuLdzVqZte8+Dl/D4N25yLzcGqqWaYkeVOwulFqw= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234015-3fc162c6f38a/go.mod h1:xURIpW9ES5+/GZhnV6beoEtxQrnkRGIfP5VQG2tCBLc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230629202037-9506855d4529/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:8mL13HKkDa+IuJ8yruA3ci0q+0vsUz4m//+ottjwS5o= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5/go.mod h1:zBEcrKX2ZOcEkHWxBPAIvYUWOKKMIhYcmNiUIu2ji3I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230920183334-c177e329c48b/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:KSqppvjFjtoCI+KGd4PELB0qLNxdJHRGqRI09mB6pQA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97/go.mod h1:v7nGkzlmW8P3n/bKmWBn2WpBjpOEx8Q6gMueudAmKfY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= -google.golang.org/grpc v0.0.0-20170208002647-2a6bf6142e96/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -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.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -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/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= -google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= -google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= -google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= -google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= -google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8= -google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= -google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= -google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= -google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -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= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -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.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= -gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= -launchpad.net/gocheck v0.0.0-20140225173054-000000000087 h1:Izowp2XBH6Ya6rv+hqbceQyw/gSGoXfH/UPoTGduL54= -launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= -lukechampine.com/blake3 v1.1.7/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= -lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI= -lukechampine.com/blake3 v1.2.1/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k= -lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= -lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= -modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= -modernc.org/cc/v3 v3.36.2/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= -modernc.org/cc/v3 v3.36.3/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= -modernc.org/cc/v3 v3.37.0/go.mod h1:vtL+3mdHx/wcj3iEGz84rQa8vEqR6XM84v5Lcvfph20= -modernc.org/cc/v3 v3.40.0/go.mod h1:/bTg4dnWkSXowUO6ssQKnOV0yMVxDYNIsIrzqTFDGH0= -modernc.org/ccgo/v3 v3.0.0-20220428102840-41399a37e894/go.mod h1:eI31LL8EwEBKPpNpA4bU1/i+sKOwOrQy8D87zWUcRZc= -modernc.org/ccgo/v3 v3.0.0-20220430103911-bc99d88307be/go.mod h1:bwdAnOoaIt8Ax9YdWGjxWsdkPcZyRPHqrOvJxaKAKGw= -modernc.org/ccgo/v3 v3.0.0-20220904174949-82d86e1b6d56/go.mod h1:YSXjPL62P2AMSxBphRHPn7IkzhVHqkvOnRKAKh+W6ZI= -modernc.org/ccgo/v3 v3.16.4/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= -modernc.org/ccgo/v3 v3.16.6/go.mod h1:tGtX0gE9Jn7hdZFeU88slbTh1UtCYKusWOoCJuvkWsQ= -modernc.org/ccgo/v3 v3.16.8/go.mod h1:zNjwkizS+fIFDrDjIAgBSCLkWbJuHF+ar3QRn+Z9aws= -modernc.org/ccgo/v3 v3.16.9/go.mod h1:zNMzC9A9xeNUepy6KuZBbugn3c0Mc9TeiJO4lgvkJDo= -modernc.org/ccgo/v3 v3.16.13-0.20221017192402-261537637ce8/go.mod h1:fUB3Vn0nVPReA+7IG7yZDfjv1TMWjhQP8gCxrFAtL5g= -modernc.org/ccgo/v3 v3.16.13/go.mod h1:2Quk+5YgpImhPjv2Qsob1DnZ/4som1lJTodubIcoUkY= -modernc.org/ccorpus v1.11.6/go.mod h1:2gEUTrWqdpH2pXsmTM1ZkjeSrUWDpjMu2T6m29L/ErQ= -modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= -modernc.org/libc v0.0.0-20220428101251-2d5f3daf273b/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= -modernc.org/libc v1.16.0/go.mod h1:N4LD6DBE9cf+Dzf9buBlzVJndKr/iJHG97vGLHYnb5A= -modernc.org/libc v1.16.1/go.mod h1:JjJE0eu4yeK7tab2n4S1w8tlWd9MxXLRzheaRnAKymU= -modernc.org/libc v1.16.17/go.mod h1:hYIV5VZczAmGZAnG15Vdngn5HSF5cSkbvfz2B7GRuVU= -modernc.org/libc v1.16.19/go.mod h1:p7Mg4+koNjc8jkqwcoFBJx7tXkpj00G77X7A72jXPXA= -modernc.org/libc v1.17.0/go.mod h1:XsgLldpP4aWlPlsjqKRdHPqCxCjISdHfM/yeWC5GyW0= -modernc.org/libc v1.17.1/go.mod h1:FZ23b+8LjxZs7XtFMbSzL/EhPxNbfZbErxEHc7cbD9s= -modernc.org/libc v1.17.4/go.mod h1:WNg2ZH56rDEwdropAJeZPQkXmDwh+JCA1s/htl6r2fA= -modernc.org/libc v1.18.0/go.mod h1:vj6zehR5bfc98ipowQOM2nIDUZnVew/wNC/2tOGS+q0= -modernc.org/libc v1.20.3/go.mod h1:ZRfIaEkgrYgZDl6pa4W39HgN5G/yDW+NRmNKZBDFrk0= -modernc.org/libc v1.21.4/go.mod h1:przBsL5RDOZajTVslkugzLBj1evTue36jEomFQOoYuI= -modernc.org/libc v1.22.2/go.mod h1:uvQavJ1pZ0hIoC/jfqNoMLURIMhKzINIWypNM17puug= -modernc.org/libc v1.37.6 h1:orZH3c5wmhIQFTXF+Nt+eeauyd+ZIt2BX6ARe+kD+aw= -modernc.org/libc v1.37.6/go.mod h1:YAXkAZ8ktnkCKaN9sw/UDeUVkGYJ/YquGO4FTi5nmHE= -modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/mathutil v1.4.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= -modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= -modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo= -modernc.org/memory v1.1.1/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= -modernc.org/memory v1.2.0/go.mod h1:/0wo5ibyrQiaoUoH7f9D8dnglAmILJ5/cxZlRECf+Nw= -modernc.org/memory v1.2.1/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= -modernc.org/memory v1.3.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= -modernc.org/memory v1.4.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= -modernc.org/memory v1.5.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= -modernc.org/memory v1.7.2 h1:Klh90S215mmH8c9gO98QxQFsY+W451E8AnzjoE2ee1E= -modernc.org/memory v1.7.2/go.mod h1:NO4NVCQy0N7ln+T9ngWqOQfi7ley4vpwvARR+Hjw95E= -modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/sqlite v1.18.1/go.mod h1:6ho+Gow7oX5V+OiOQ6Tr4xeqbx13UZ6t+Fw9IRUG4d4= -modernc.org/sqlite v1.18.2/go.mod h1:kvrTLEWgxUcHa2GfHBQtanR1H9ht3hTJNtKpzH9k1u0= -modernc.org/sqlite v1.28.0 h1:Zx+LyDDmXczNnEQdvPuEfcFVA2ZPyaD7UCZDjef3BHQ= -modernc.org/sqlite v1.28.0/go.mod h1:Qxpazz0zH8Z1xCFyi5GSL3FzbtZ3fvbjmywNogldEW0= -modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw= -modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= -modernc.org/tcl v1.13.1/go.mod h1:XOLfOwzhkljL4itZkK6T72ckMgvj0BDsnKNdZVUOecw= -modernc.org/tcl v1.13.2/go.mod h1:7CLiGIPo1M8Rv1Mitpv5akc2+8fxUd2y2UzC/MfMzy0= -modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= -modernc.org/token v1.0.1/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= -modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= -modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8= -pgregory.net/rapid v0.4.7 h1:MTNRktPuv5FNqOO151TM9mDTa+XHcX6ypYeISDVD14g= -pgregory.net/rapid v0.4.7/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= -rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= diff --git a/flowkit/mocks/Services.go b/flowkit/mocks/Services.go deleted file mode 100644 index 21a790002..000000000 --- a/flowkit/mocks/Services.go +++ /dev/null @@ -1,707 +0,0 @@ -// Code generated by mockery v2.38.0. DO NOT EDIT. - -package mocks - -import ( - cadence "github.com/onflow/cadence" - accounts "github.com/onflow/flow-cli/flowkit/accounts" - - config "github.com/onflow/flow-cli/flowkit/config" - - context "context" - - crypto "github.com/onflow/crypto" - - flow "github.com/onflow/flow-go-sdk" - - flowkit "github.com/onflow/flow-cli/flowkit" - - gateway "github.com/onflow/flow-cli/flowkit/gateway" - - mock "github.com/stretchr/testify/mock" - - output "github.com/onflow/flow-cli/flowkit/output" - - project "github.com/onflow/flow-cli/flowkit/project" - - transactions "github.com/onflow/flow-cli/flowkit/transactions" -) - -// Services is an autogenerated mock type for the Services type -type Services struct { - mock.Mock -} - -// AddContract provides a mock function with given fields: _a0, _a1, _a2, _a3 -func (_m *Services) AddContract(_a0 context.Context, _a1 *accounts.Account, _a2 flowkit.Script, _a3 flowkit.UpdateContract) (flow.Identifier, bool, error) { - ret := _m.Called(_a0, _a1, _a2, _a3) - - if len(ret) == 0 { - panic("no return value specified for AddContract") - } - - var r0 flow.Identifier - var r1 bool - var r2 error - if rf, ok := ret.Get(0).(func(context.Context, *accounts.Account, flowkit.Script, flowkit.UpdateContract) (flow.Identifier, bool, error)); ok { - return rf(_a0, _a1, _a2, _a3) - } - if rf, ok := ret.Get(0).(func(context.Context, *accounts.Account, flowkit.Script, flowkit.UpdateContract) flow.Identifier); ok { - r0 = rf(_a0, _a1, _a2, _a3) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(flow.Identifier) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *accounts.Account, flowkit.Script, flowkit.UpdateContract) bool); ok { - r1 = rf(_a0, _a1, _a2, _a3) - } else { - r1 = ret.Get(1).(bool) - } - - if rf, ok := ret.Get(2).(func(context.Context, *accounts.Account, flowkit.Script, flowkit.UpdateContract) error); ok { - r2 = rf(_a0, _a1, _a2, _a3) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// BuildTransaction provides a mock function with given fields: _a0, _a1, _a2, _a3, _a4 -func (_m *Services) BuildTransaction(_a0 context.Context, _a1 transactions.AddressesRoles, _a2 int, _a3 flowkit.Script, _a4 uint64) (*transactions.Transaction, error) { - ret := _m.Called(_a0, _a1, _a2, _a3, _a4) - - if len(ret) == 0 { - panic("no return value specified for BuildTransaction") - } - - var r0 *transactions.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, transactions.AddressesRoles, int, flowkit.Script, uint64) (*transactions.Transaction, error)); ok { - return rf(_a0, _a1, _a2, _a3, _a4) - } - if rf, ok := ret.Get(0).(func(context.Context, transactions.AddressesRoles, int, flowkit.Script, uint64) *transactions.Transaction); ok { - r0 = rf(_a0, _a1, _a2, _a3, _a4) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*transactions.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, transactions.AddressesRoles, int, flowkit.Script, uint64) error); ok { - r1 = rf(_a0, _a1, _a2, _a3, _a4) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// CreateAccount provides a mock function with given fields: _a0, _a1, _a2 -func (_m *Services) CreateAccount(_a0 context.Context, _a1 *accounts.Account, _a2 []accounts.PublicKey) (*flow.Account, flow.Identifier, error) { - ret := _m.Called(_a0, _a1, _a2) - - if len(ret) == 0 { - panic("no return value specified for CreateAccount") - } - - var r0 *flow.Account - var r1 flow.Identifier - var r2 error - if rf, ok := ret.Get(0).(func(context.Context, *accounts.Account, []accounts.PublicKey) (*flow.Account, flow.Identifier, error)); ok { - return rf(_a0, _a1, _a2) - } - if rf, ok := ret.Get(0).(func(context.Context, *accounts.Account, []accounts.PublicKey) *flow.Account); ok { - r0 = rf(_a0, _a1, _a2) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*flow.Account) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *accounts.Account, []accounts.PublicKey) flow.Identifier); ok { - r1 = rf(_a0, _a1, _a2) - } else { - if ret.Get(1) != nil { - r1 = ret.Get(1).(flow.Identifier) - } - } - - if rf, ok := ret.Get(2).(func(context.Context, *accounts.Account, []accounts.PublicKey) error); ok { - r2 = rf(_a0, _a1, _a2) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// DeployProject provides a mock function with given fields: _a0, _a1 -func (_m *Services) DeployProject(_a0 context.Context, _a1 flowkit.UpdateContract) ([]*project.Contract, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for DeployProject") - } - - var r0 []*project.Contract - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, flowkit.UpdateContract) ([]*project.Contract, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, flowkit.UpdateContract) []*project.Contract); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*project.Contract) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, flowkit.UpdateContract) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// DerivePrivateKeyFromMnemonic provides a mock function with given fields: _a0, _a1, _a2, _a3 -func (_m *Services) DerivePrivateKeyFromMnemonic(_a0 context.Context, _a1 string, _a2 crypto.SigningAlgorithm, _a3 string) (crypto.PrivateKey, error) { - ret := _m.Called(_a0, _a1, _a2, _a3) - - if len(ret) == 0 { - panic("no return value specified for DerivePrivateKeyFromMnemonic") - } - - var r0 crypto.PrivateKey - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, string, crypto.SigningAlgorithm, string) (crypto.PrivateKey, error)); ok { - return rf(_a0, _a1, _a2, _a3) - } - if rf, ok := ret.Get(0).(func(context.Context, string, crypto.SigningAlgorithm, string) crypto.PrivateKey); ok { - r0 = rf(_a0, _a1, _a2, _a3) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(crypto.PrivateKey) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, string, crypto.SigningAlgorithm, string) error); ok { - r1 = rf(_a0, _a1, _a2, _a3) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ExecuteScript provides a mock function with given fields: _a0, _a1, _a2 -func (_m *Services) ExecuteScript(_a0 context.Context, _a1 flowkit.Script, _a2 flowkit.ScriptQuery) (cadence.Value, error) { - ret := _m.Called(_a0, _a1, _a2) - - if len(ret) == 0 { - panic("no return value specified for ExecuteScript") - } - - var r0 cadence.Value - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, flowkit.Script, flowkit.ScriptQuery) (cadence.Value, error)); ok { - return rf(_a0, _a1, _a2) - } - if rf, ok := ret.Get(0).(func(context.Context, flowkit.Script, flowkit.ScriptQuery) cadence.Value); ok { - r0 = rf(_a0, _a1, _a2) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(cadence.Value) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, flowkit.Script, flowkit.ScriptQuery) error); ok { - r1 = rf(_a0, _a1, _a2) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Gateway provides a mock function with given fields: -func (_m *Services) Gateway() gateway.Gateway { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Gateway") - } - - var r0 gateway.Gateway - if rf, ok := ret.Get(0).(func() gateway.Gateway); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(gateway.Gateway) - } - } - - return r0 -} - -// GenerateKey provides a mock function with given fields: _a0, _a1, _a2 -func (_m *Services) GenerateKey(_a0 context.Context, _a1 crypto.SigningAlgorithm, _a2 string) (crypto.PrivateKey, error) { - ret := _m.Called(_a0, _a1, _a2) - - if len(ret) == 0 { - panic("no return value specified for GenerateKey") - } - - var r0 crypto.PrivateKey - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, crypto.SigningAlgorithm, string) (crypto.PrivateKey, error)); ok { - return rf(_a0, _a1, _a2) - } - if rf, ok := ret.Get(0).(func(context.Context, crypto.SigningAlgorithm, string) crypto.PrivateKey); ok { - r0 = rf(_a0, _a1, _a2) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(crypto.PrivateKey) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, crypto.SigningAlgorithm, string) error); ok { - r1 = rf(_a0, _a1, _a2) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GenerateMnemonicKey provides a mock function with given fields: _a0, _a1, _a2 -func (_m *Services) GenerateMnemonicKey(_a0 context.Context, _a1 crypto.SigningAlgorithm, _a2 string) (crypto.PrivateKey, string, error) { - ret := _m.Called(_a0, _a1, _a2) - - if len(ret) == 0 { - panic("no return value specified for GenerateMnemonicKey") - } - - var r0 crypto.PrivateKey - var r1 string - var r2 error - if rf, ok := ret.Get(0).(func(context.Context, crypto.SigningAlgorithm, string) (crypto.PrivateKey, string, error)); ok { - return rf(_a0, _a1, _a2) - } - if rf, ok := ret.Get(0).(func(context.Context, crypto.SigningAlgorithm, string) crypto.PrivateKey); ok { - r0 = rf(_a0, _a1, _a2) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(crypto.PrivateKey) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, crypto.SigningAlgorithm, string) string); ok { - r1 = rf(_a0, _a1, _a2) - } else { - r1 = ret.Get(1).(string) - } - - if rf, ok := ret.Get(2).(func(context.Context, crypto.SigningAlgorithm, string) error); ok { - r2 = rf(_a0, _a1, _a2) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// GetAccount provides a mock function with given fields: _a0, _a1 -func (_m *Services) GetAccount(_a0 context.Context, _a1 flow.Address) (*flow.Account, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for GetAccount") - } - - var r0 *flow.Account - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, flow.Address) (*flow.Account, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, flow.Address) *flow.Account); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*flow.Account) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, flow.Address) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetBlock provides a mock function with given fields: _a0, _a1 -func (_m *Services) GetBlock(_a0 context.Context, _a1 flowkit.BlockQuery) (*flow.Block, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for GetBlock") - } - - var r0 *flow.Block - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, flowkit.BlockQuery) (*flow.Block, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, flowkit.BlockQuery) *flow.Block); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*flow.Block) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, flowkit.BlockQuery) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetCollection provides a mock function with given fields: _a0, _a1 -func (_m *Services) GetCollection(_a0 context.Context, _a1 flow.Identifier) (*flow.Collection, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for GetCollection") - } - - var r0 *flow.Collection - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) (*flow.Collection, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) *flow.Collection); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*flow.Collection) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier) error); ok { - r1 = rf(_a0, _a1) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetEvents provides a mock function with given fields: _a0, _a1, _a2, _a3, _a4 -func (_m *Services) GetEvents(_a0 context.Context, _a1 []string, _a2 uint64, _a3 uint64, _a4 *flowkit.EventWorker) ([]flow.BlockEvents, error) { - ret := _m.Called(_a0, _a1, _a2, _a3, _a4) - - if len(ret) == 0 { - panic("no return value specified for GetEvents") - } - - var r0 []flow.BlockEvents - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, []string, uint64, uint64, *flowkit.EventWorker) ([]flow.BlockEvents, error)); ok { - return rf(_a0, _a1, _a2, _a3, _a4) - } - if rf, ok := ret.Get(0).(func(context.Context, []string, uint64, uint64, *flowkit.EventWorker) []flow.BlockEvents); ok { - r0 = rf(_a0, _a1, _a2, _a3, _a4) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]flow.BlockEvents) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, []string, uint64, uint64, *flowkit.EventWorker) error); ok { - r1 = rf(_a0, _a1, _a2, _a3, _a4) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// GetTransactionByID provides a mock function with given fields: _a0, _a1, _a2 -func (_m *Services) GetTransactionByID(_a0 context.Context, _a1 flow.Identifier, _a2 bool) (*flow.Transaction, *flow.TransactionResult, error) { - ret := _m.Called(_a0, _a1, _a2) - - if len(ret) == 0 { - panic("no return value specified for GetTransactionByID") - } - - var r0 *flow.Transaction - var r1 *flow.TransactionResult - var r2 error - if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, bool) (*flow.Transaction, *flow.TransactionResult, error)); ok { - return rf(_a0, _a1, _a2) - } - if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier, bool) *flow.Transaction); ok { - r0 = rf(_a0, _a1, _a2) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*flow.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier, bool) *flow.TransactionResult); ok { - r1 = rf(_a0, _a1, _a2) - } else { - if ret.Get(1) != nil { - r1 = ret.Get(1).(*flow.TransactionResult) - } - } - - if rf, ok := ret.Get(2).(func(context.Context, flow.Identifier, bool) error); ok { - r2 = rf(_a0, _a1, _a2) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// GetTransactionsByBlockID provides a mock function with given fields: _a0, _a1 -func (_m *Services) GetTransactionsByBlockID(_a0 context.Context, _a1 flow.Identifier) ([]*flow.Transaction, []*flow.TransactionResult, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for GetTransactionsByBlockID") - } - - var r0 []*flow.Transaction - var r1 []*flow.TransactionResult - var r2 error - if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) ([]*flow.Transaction, []*flow.TransactionResult, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, flow.Identifier) []*flow.Transaction); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*flow.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, flow.Identifier) []*flow.TransactionResult); ok { - r1 = rf(_a0, _a1) - } else { - if ret.Get(1) != nil { - r1 = ret.Get(1).([]*flow.TransactionResult) - } - } - - if rf, ok := ret.Get(2).(func(context.Context, flow.Identifier) error); ok { - r2 = rf(_a0, _a1) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// Network provides a mock function with given fields: -func (_m *Services) Network() config.Network { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Network") - } - - var r0 config.Network - if rf, ok := ret.Get(0).(func() config.Network); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(config.Network) - } - - return r0 -} - -// Ping provides a mock function with given fields: -func (_m *Services) Ping() error { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Ping") - } - - var r0 error - if rf, ok := ret.Get(0).(func() error); ok { - r0 = rf() - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// RemoveContract provides a mock function with given fields: _a0, _a1, _a2 -func (_m *Services) RemoveContract(_a0 context.Context, _a1 *accounts.Account, _a2 string) (flow.Identifier, error) { - ret := _m.Called(_a0, _a1, _a2) - - if len(ret) == 0 { - panic("no return value specified for RemoveContract") - } - - var r0 flow.Identifier - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *accounts.Account, string) (flow.Identifier, error)); ok { - return rf(_a0, _a1, _a2) - } - if rf, ok := ret.Get(0).(func(context.Context, *accounts.Account, string) flow.Identifier); ok { - r0 = rf(_a0, _a1, _a2) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(flow.Identifier) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *accounts.Account, string) error); ok { - r1 = rf(_a0, _a1, _a2) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// SendSignedTransaction provides a mock function with given fields: _a0, _a1 -func (_m *Services) SendSignedTransaction(_a0 context.Context, _a1 *transactions.Transaction) (*flow.Transaction, *flow.TransactionResult, error) { - ret := _m.Called(_a0, _a1) - - if len(ret) == 0 { - panic("no return value specified for SendSignedTransaction") - } - - var r0 *flow.Transaction - var r1 *flow.TransactionResult - var r2 error - if rf, ok := ret.Get(0).(func(context.Context, *transactions.Transaction) (*flow.Transaction, *flow.TransactionResult, error)); ok { - return rf(_a0, _a1) - } - if rf, ok := ret.Get(0).(func(context.Context, *transactions.Transaction) *flow.Transaction); ok { - r0 = rf(_a0, _a1) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*flow.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *transactions.Transaction) *flow.TransactionResult); ok { - r1 = rf(_a0, _a1) - } else { - if ret.Get(1) != nil { - r1 = ret.Get(1).(*flow.TransactionResult) - } - } - - if rf, ok := ret.Get(2).(func(context.Context, *transactions.Transaction) error); ok { - r2 = rf(_a0, _a1) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// SendTransaction provides a mock function with given fields: _a0, _a1, _a2, _a3 -func (_m *Services) SendTransaction(_a0 context.Context, _a1 transactions.AccountRoles, _a2 flowkit.Script, _a3 uint64) (*flow.Transaction, *flow.TransactionResult, error) { - ret := _m.Called(_a0, _a1, _a2, _a3) - - if len(ret) == 0 { - panic("no return value specified for SendTransaction") - } - - var r0 *flow.Transaction - var r1 *flow.TransactionResult - var r2 error - if rf, ok := ret.Get(0).(func(context.Context, transactions.AccountRoles, flowkit.Script, uint64) (*flow.Transaction, *flow.TransactionResult, error)); ok { - return rf(_a0, _a1, _a2, _a3) - } - if rf, ok := ret.Get(0).(func(context.Context, transactions.AccountRoles, flowkit.Script, uint64) *flow.Transaction); ok { - r0 = rf(_a0, _a1, _a2, _a3) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*flow.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, transactions.AccountRoles, flowkit.Script, uint64) *flow.TransactionResult); ok { - r1 = rf(_a0, _a1, _a2, _a3) - } else { - if ret.Get(1) != nil { - r1 = ret.Get(1).(*flow.TransactionResult) - } - } - - if rf, ok := ret.Get(2).(func(context.Context, transactions.AccountRoles, flowkit.Script, uint64) error); ok { - r2 = rf(_a0, _a1, _a2, _a3) - } else { - r2 = ret.Error(2) - } - - return r0, r1, r2 -} - -// SetLogger provides a mock function with given fields: _a0 -func (_m *Services) SetLogger(_a0 output.Logger) { - _m.Called(_a0) -} - -// SignTransactionPayload provides a mock function with given fields: _a0, _a1, _a2 -func (_m *Services) SignTransactionPayload(_a0 context.Context, _a1 *accounts.Account, _a2 []byte) (*transactions.Transaction, error) { - ret := _m.Called(_a0, _a1, _a2) - - if len(ret) == 0 { - panic("no return value specified for SignTransactionPayload") - } - - var r0 *transactions.Transaction - var r1 error - if rf, ok := ret.Get(0).(func(context.Context, *accounts.Account, []byte) (*transactions.Transaction, error)); ok { - return rf(_a0, _a1, _a2) - } - if rf, ok := ret.Get(0).(func(context.Context, *accounts.Account, []byte) *transactions.Transaction); ok { - r0 = rf(_a0, _a1, _a2) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(*transactions.Transaction) - } - } - - if rf, ok := ret.Get(1).(func(context.Context, *accounts.Account, []byte) error); ok { - r1 = rf(_a0, _a1, _a2) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// NewServices creates a new instance of Services. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewServices(t interface { - mock.TestingT - Cleanup(func()) -}) *Services { - mock := &Services{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/flowkit/mocks/services_mock.go b/flowkit/mocks/services_mock.go deleted file mode 100644 index ec4241e94..000000000 --- a/flowkit/mocks/services_mock.go +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package mocks - -import ( - "github.com/onflow/cadence" - "github.com/onflow/flow-go-sdk" - "github.com/stretchr/testify/mock" - - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/gateway/mocks" - "github.com/onflow/flow-cli/flowkit/tests" -) - -const ( - addContractFunc = "AddContract" - buildTransactionFunc = "BuildTransaction" - createAccountFunc = "CreateAccount" - deployProjectFunc = "DeployProject" - derivePrivateKeyFromMnemonicFunc = "DerivePrivateKeyFromMnemonic" - gatewayFunc = "Gateway" - generateKeyFunc = "GenerateKey" - generateMnemonicKeyFunc = "GenerateMnemonicKey" - getBlockFunc = "GetBlock" - getTransactionByIDFunc = "GetTransactionByID" - getTransactionsByBlockIDFunc = "GetTransactionsByBlockID" - networkFunc = "Network" - pingFunc = "Ping" - removeContractFunc = "RemoveContract" - sendTransactionFunc = "SendTransaction" - setLoggerFunc = "SetLogger" - signTransactionPayloadFunc = "SignTransactionPayload" - testFunc = "Test" -) - -type MockServices struct { - Mock *Services - AddContract *mock.Call - BuildTransaction *mock.Call - CreateAccount *mock.Call - DeployProject *mock.Call - DerivePrivateKeyFromMnemonic *mock.Call - Gateway *mock.Call - GenerateKey *mock.Call - GenerateMnemonicKey *mock.Call - GetBlock *mock.Call - GetTransactionByID *mock.Call - GetTransactionsByBlockID *mock.Call - Network *mock.Call - Ping *mock.Call - RemoveContract *mock.Call - SendTransaction *mock.Call - SetLogger *mock.Call - SignTransactionPayload *mock.Call - Test *mock.Call - GetAccount *mock.Call - ExecuteScript *mock.Call - SendSignedTransaction *mock.Call - GetEvents *mock.Call - GetCollection *mock.Call -} - -func DefaultMockServices() *MockServices { - m := &Services{} - t := &MockServices{ - Mock: m, - GetAccount: m.On( - mocks.GetAccountFunc, - mock.Anything, - mock.AnythingOfType("flow.Address"), - ), - ExecuteScript: m.On( - mocks.ExecuteScriptFunc, - mock.Anything, - mock.AnythingOfType("flowkit.Script"), - mock.AnythingOfType("flowkit.ScriptQuery"), - ), - SendSignedTransaction: m.On( - mocks.SendSignedTransactionFunc, - mock.Anything, - mock.AnythingOfType("*transactions.Transaction"), - ), - AddContract: m.On( - addContractFunc, - mock.Anything, - mock.AnythingOfType("*accounts.Account"), - mock.AnythingOfType("flowkit.Script"), - mock.AnythingOfType("flowkit.UpdateContract"), - ), - GetCollection: m.On( - mocks.GetCollectionFunc, - mock.Anything, - mock.AnythingOfType("flow.Identifier"), - ), - GetEvents: m.On( - mocks.GetEventsFunc, - mock.Anything, - mock.AnythingOfType("[]string"), - mock.AnythingOfType("uint64"), - mock.AnythingOfType("uint64"), - mock.AnythingOfType("*flowkit.EventWorker"), - ), - BuildTransaction: m.On( - buildTransactionFunc, - mock.Anything, - mock.AnythingOfType("transactions.AddressesRoles"), - mock.AnythingOfType("int"), - mock.AnythingOfType("flowkit.Script"), - mock.AnythingOfType("uint64"), - ), - CreateAccount: m.On( - createAccountFunc, - mock.Anything, - mock.AnythingOfType("*accounts.Account"), - mock.AnythingOfType("[]accounts.PublicKey"), - ), - DeployProject: m.On( - deployProjectFunc, - mock.Anything, - mock.AnythingOfType("flowkit.UpdateContract"), - ), - DerivePrivateKeyFromMnemonic: m.On( - derivePrivateKeyFromMnemonicFunc, - mock.Anything, - mock.AnythingOfType("string"), - mock.AnythingOfType("crypto.SignatureAlgorithm"), - mock.AnythingOfType("string"), - ), - Gateway: m.On(gatewayFunc), - GenerateKey: m.On( - generateKeyFunc, - mock.Anything, - mock.AnythingOfType("crypto.SignatureAlgorithm"), - mock.AnythingOfType("string"), - ), - GenerateMnemonicKey: m.On( - generateMnemonicKeyFunc, - mock.Anything, - mock.AnythingOfType("crypto.SignatureAlgorithm"), - mock.AnythingOfType("string"), - ), - GetBlock: m.On( - getBlockFunc, - mock.Anything, - mock.AnythingOfType("flowkit.BlockQuery"), - ), - GetTransactionByID: m.On( - getTransactionByIDFunc, - mock.Anything, - mock.AnythingOfType("flow.Identifier"), - mock.AnythingOfType("bool"), - ), - GetTransactionsByBlockID: m.On( - getTransactionsByBlockIDFunc, - mock.Anything, - mock.AnythingOfType("flow.Identifier"), - ), - RemoveContract: m.On( - removeContractFunc, - mock.Anything, - mock.AnythingOfType("*accounts.Account"), - mock.AnythingOfType("string"), - ), - SendTransaction: m.On( - sendTransactionFunc, - mock.Anything, - mock.AnythingOfType("transactions.AccountRoles"), - mock.AnythingOfType("flowkit.Script"), - mock.AnythingOfType("uint64"), - ), - SignTransactionPayload: m.On( - signTransactionPayloadFunc, - mock.Anything, - mock.AnythingOfType("*accounts.Account"), - mock.AnythingOfType("[]uint8"), - ), - Test: m.On( - testFunc, - mock.Anything, - mock.AnythingOfType("[]byte"), - mock.AnythingOfType("string"), - ), - Network: m.On(networkFunc), - Ping: m.On(pingFunc), - SetLogger: m.On(setLoggerFunc, mock.AnythingOfType("output.Logger")), - } - - t.GetAccount.Run(func(args mock.Arguments) { - addr := args.Get(1).(flow.Address) - t.GetAccount.Return(tests.NewAccountWithAddress(addr.String()), nil) - }) - - t.ExecuteScript.Run(func(args mock.Arguments) { - t.ExecuteScript.Return(cadence.MustConvertValue(""), nil) - }) - - t.GetTransactionByID.Return(tests.NewTransaction(), nil) - t.GetCollection.Return(tests.NewCollection(), nil) - t.GetEvents.Return([]flow.BlockEvents{}, nil) - t.GetBlock.Return(tests.NewBlock(), nil) - t.AddContract.Return(flow.EmptyID, false, nil) - t.RemoveContract.Return(flow.EmptyID, nil) - t.CreateAccount.Return(tests.NewAccountWithAddress("0x01"), flow.EmptyID, nil) - t.Network.Return(config.EmulatorNetwork) - - return t -} diff --git a/flowkit/output/colors.go b/flowkit/output/colors.go deleted file mode 100644 index f7a5b3a09..000000000 --- a/flowkit/output/colors.go +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package output - -import ( - "fmt" - "runtime" -) - -const ( - red = "\033[31m" - green = "\033[32m" - magenta = "\033[35m" - bold = "\033[1m" - reset = "\033[0m" - italic = "\033[3m" -) - -func printColor(msg string, color string) string { - if runtime.GOOS == "windows" { - return msg - } - - return fmt.Sprintf("%s%s%s", color, msg, reset) -} - -func Red(msg string) string { - return printColor(msg, red) -} - -func Green(msg string) string { - return printColor(msg, green) -} - -func Magenta(msg string) string { - return printColor(msg, magenta) -} - -func Bold(msg string) string { - return printColor(msg, bold) -} - -func Italic(msg string) string { - return printColor(msg, italic) -} diff --git a/flowkit/output/emoji.go b/flowkit/output/emoji.go deleted file mode 100644 index 0dc5035eb..000000000 --- a/flowkit/output/emoji.go +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package output - -import "runtime" - -func printEmoji(emoji string) string { - if runtime.GOOS == "windows" { - return "" - } - - return emoji -} - -func ErrorEmoji() string { - return printEmoji("❌") -} - -func TryEmoji() string { - return printEmoji("🙏") -} - -func WarningEmoji() string { - return printEmoji("❗ ") -} - -func SaveEmoji() string { - return printEmoji("💾") -} - -func StopEmoji() string { - return printEmoji("🔴️") -} - -func GoEmoji() string { - return printEmoji("🟢") -} - -func OkEmoji() string { - return printEmoji("✅") -} - -func SuccessEmoji() string { - return printEmoji("🎉") -} diff --git a/flowkit/output/logger.go b/flowkit/output/logger.go deleted file mode 100644 index 1d4e8a652..000000000 --- a/flowkit/output/logger.go +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package output - -import ( - "fmt" -) - -const ( - NoneLog = 0 - ErrorLog = 1 - DebugLog = 2 - InfoLog = 3 -) - -type Logger interface { - Debug(string) - Info(string) - Error(string) - StartProgress(string) - StopProgress() -} - -// NewStdoutLogger returns a new stdout logger. -func NewStdoutLogger(level int) *StdoutLogger { - return &StdoutLogger{ - level: level, - } -} - -var _ Logger = &StdoutLogger{} - -// StdoutLogger is a stdout logging implementation. -type StdoutLogger struct { - level int - spinner *Spinner -} - -func (s *StdoutLogger) log(msg string, level int) { - if s.level < level { - return - } - - fmt.Printf("%s\n", msg) -} - -func (s *StdoutLogger) Info(msg string) { - s.StopProgress() - s.log(msg, InfoLog) -} - -func (s *StdoutLogger) Debug(msg string) { - s.log(msg, DebugLog) -} - -func (s *StdoutLogger) Error(msg string) { - s.log(fmt.Sprintf("%s %s", ErrorEmoji(), Red(msg)), ErrorLog) -} - -func (s *StdoutLogger) StartProgress(msg string) { - if s.level == NoneLog { - return - } - - if s.spinner != nil { - s.spinner.Stop() - } - - s.spinner = NewSpinner(msg, "") - s.spinner.Start() -} - -func (s *StdoutLogger) StopProgress() { - if s.level == NoneLog { - return - } - - if s.spinner != nil { - s.spinner.Stop() - s.spinner = nil - } -} diff --git a/flowkit/output/spinner.go b/flowkit/output/spinner.go deleted file mode 100644 index 4ff870728..000000000 --- a/flowkit/output/spinner.go +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package output - -import ( - "fmt" - "time" - - "github.com/gosuri/uilive" -) - -var spinnerCharset = []rune{'⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'} - -type Spinner struct { - prefix string - suffix string - done chan string -} - -func NewSpinner(prefix, suffix string) *Spinner { - return &Spinner{ - prefix: prefix, - suffix: suffix, - done: make(chan string), - } -} - -func (s *Spinner) Start() { - go s.run() -} - -func (s *Spinner) run() { - writer := uilive.New() - - ticker := time.NewTicker(100 * time.Millisecond) - - i := 0 - - for { - select { - case <-s.done: - _, _ = fmt.Fprintf(writer, "\r") - _ = writer.Flush() - close(s.done) - return - case <-ticker.C: - _, _ = fmt.Fprintf( - writer, - "%s%c%s\n", - s.prefix, - spinnerCharset[i%len(spinnerCharset)], - s.suffix, - ) - _ = writer.Flush() - i++ - } - } -} - -func (s *Spinner) Stop() { - s.done <- "" - time.Sleep(50 * time.Millisecond) -} diff --git a/flowkit/project/contract.go b/flowkit/project/contract.go deleted file mode 100644 index 41b18ca6d..000000000 --- a/flowkit/project/contract.go +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package project - -import ( - "github.com/onflow/cadence" - "github.com/onflow/flow-go-sdk" -) - -// Contract is a Cadence contract definition for a project. -type Contract struct { - Name string - location string - code []byte - AccountAddress flow.Address - AccountName string - Args []cadence.Value -} - -func NewContract( - name string, - location string, - code []byte, - accountAddress flow.Address, - accountName string, - args []cadence.Value, -) *Contract { - return &Contract{ - Name: name, - location: location, - code: code, - AccountAddress: accountAddress, - AccountName: accountName, - Args: args, - } -} - -func (c *Contract) Code() []byte { - return c.code -} - -func (c *Contract) SetCode(code []byte) { - c.code = code -} - -func (c *Contract) Location() string { - return c.location -} - -// LocationAliases map contract locations to fixed addresses on Flow network -type LocationAliases map[string]string diff --git a/flowkit/project/contract_test.go b/flowkit/project/contract_test.go deleted file mode 100644 index 0122a01d1..000000000 --- a/flowkit/project/contract_test.go +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package project - -import ( - "testing" - - "github.com/onflow/cadence" - "github.com/onflow/flow-go-sdk" - "github.com/stretchr/testify/assert" -) - -func TestContractFunctions(t *testing.T) { - name := "contract1" - location := "/path/to/contract1" - code := []byte("code1") - accountAddress := flow.HexToAddress("0x123456789") - accountName := "account1" - str, _ := cadence.NewString("arg1") - args := []cadence.Value{str} - - contract := NewContract(name, location, code, accountAddress, accountName, args) - - assert.Equal(t, name, contract.Name, "contract.Name should be equal to expected value") - assert.Equal(t, location, contract.location, "contract.location should be equal to expected value") - assert.Equal(t, code, contract.code, "contract.code should be equal to expected value") - assert.Equal(t, accountAddress, contract.AccountAddress, "contract.AccountAddress should be equal to expected value") - assert.Equal(t, accountName, contract.AccountName, "contract.AccountName should be equal to expected value") - assert.Equal(t, args, contract.Args, "contract.Args should be equal to expected value") - - assert.Equal(t, code, contract.Code(), "contract.Code() should return expected value") - - newCode := []byte("newcode") - contract.SetCode(newCode) - assert.Equal(t, newCode, contract.code, "contract.code should be equal to expected value") - - assert.Equal(t, location, contract.Location(), "contract.Location() should return expected value") -} diff --git a/flowkit/project/deployment.go b/flowkit/project/deployment.go deleted file mode 100644 index f8b4f1431..000000000 --- a/flowkit/project/deployment.go +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package project - -import ( - "fmt" - "path/filepath" - - "gonum.org/v1/gonum/graph" - "gonum.org/v1/gonum/graph/simple" - "gonum.org/v1/gonum/graph/topo" -) - -type deployContract struct { - index int64 - *Contract - program *Program - dependencies map[string]*deployContract -} - -func (d *deployContract) ID() int64 { - return d.index -} - -func (d *deployContract) addDependency(location string, dep *deployContract) { - d.dependencies[location] = dep -} - -// Deployment contains logic to sort deployment order of contracts. -// -// Deployment makes sure the contract containing imports is deployed after all importing contracts are deployed. -// This way we can deploy all contracts without missing imports. -// Contracts are iterated and dependency graph is built which is then later sorted -type Deployment struct { - contracts []*deployContract - // map of contracts by their location specified in state - contractsByLocation map[string]*deployContract - contractsByName map[string]*deployContract - aliases LocationAliases -} - -// NewDeployment from the flowkit Contracts and loaded from the contract location using a loader. -func NewDeployment(contracts []*Contract, aliases LocationAliases) (*Deployment, error) { - deployment := &Deployment{ - contractsByLocation: make(map[string]*deployContract), - contractsByName: make(map[string]*deployContract), - aliases: aliases, - } - - for _, contract := range contracts { - err := deployment.add(contract) - if err != nil { - return nil, err - } - } - - return deployment, nil -} - -func (d *Deployment) add(contract *Contract) error { - program, err := NewProgram(contract.code, contract.Args, contract.location) - if err != nil { - return err - } - - c := &deployContract{ - index: int64(len(d.contracts)), - Contract: contract, - program: program, - dependencies: make(map[string]*deployContract), - } - - d.contracts = append(d.contracts, c) - d.contractsByLocation[filepath.Clean(c.Location())] = c - d.contractsByName[c.Name] = c - - return nil -} - -// Sort contracts by deployment order. -// -// Order of sorting is dependent on the possible imports contract contains, since -// any imported contract must be deployed before deploying the contract with that import. -// Only applicable to contracts. -func (d *Deployment) Sort() ([]*Contract, error) { - if d.conflictExists() { - return nil, fmt.Errorf("the same contract cannot be deployed to multiple accounts on the same network") - } - - err := d.buildDependencies() - if err != nil { - return nil, err - } - - sorted, err := sortByDeploymentOrder(d.contracts) - if err != nil { - return nil, err - } - - contracts := make([]*Contract, len(d.contracts)) - for i, s := range sorted { - contracts[i] = s.Contract - } - - return contracts, nil -} - -// conflictExists returns true if the same contract is configured to deploy to more than one account for the same network. -func (d *Deployment) conflictExists() bool { - uniq := make(map[string]bool) - for _, c := range d.contracts { - if _, exists := uniq[c.Name]; exists { - return true - } - uniq[c.Name] = true - } - - return false -} - -// buildDependencies iterates over all contracts and checks the imports which are added as its dependencies. -func (d *Deployment) buildDependencies() error { - for _, contract := range d.contracts { - for _, location := range contract.program.imports() { - // find contract by the path import - importPath := absolutePath(contract.location, location) - importContract, isPath := d.contractsByLocation[importPath] - if isPath { - contract.addDependency(location, importContract) - continue - } - // find contract by identifier import - new schema - importContract, isIdentifier := d.contractsByName[location] - if isIdentifier { - contract.addDependency(location, importContract) - continue - } - - // if aliased then skip, not a dependency - if _, exists := d.aliases[importPath]; exists { - continue - } - if _, exists := d.aliases[location]; exists { - continue - } - - return fmt.Errorf( - "import from %s could not be found: %s, make sure import path is correct, and the contract is added to deployments or has an alias", - contract.Name, - location, - ) - } - } - - return nil -} - -// sortByDeploymentOrder sorts the given set of contracts in order of deployment. -// -// The resulting ordering ensures that each contract is deployed after all of its -// dependencies are deployed. This function returns an error if an import cycle exists. -// -// This function constructs a directed graph in which contracts are nodes and imports are edges. -// The ordering is computed by performing a topological sort on the constructed graph. -func sortByDeploymentOrder(contracts []*deployContract) ([]*deployContract, error) { - g := simple.NewDirectedGraph() - - for _, c := range contracts { - g.AddNode(c) - } - - for _, c := range contracts { - for _, dep := range c.dependencies { - g.SetEdge(g.NewEdge(dep, c)) - } - } - - sorted, err := topo.SortStabilized(g, nil) - if err != nil { - switch topoErr := err.(type) { - case topo.Unorderable: - return nil, &CyclicImportError{Cycles: nodeSetsToContractSets(topoErr)} - default: - return nil, err - } - } - - return nodesToContracts(sorted), nil -} - -func nodeSetsToContractSets(nodes [][]graph.Node) [][]*deployContract { - contracts := make([][]*deployContract, len(nodes)) - - for i, s := range nodes { - contracts[i] = nodesToContracts(s) - } - - return contracts -} - -func nodesToContracts(nodes []graph.Node) []*deployContract { - contracts := make([]*deployContract, len(nodes)) - - for i, s := range nodes { - contracts[i] = s.(*deployContract) - } - - return contracts -} - -// CyclicImportError is returned when contract contain cyclic imports one to the -// other which is not possible to be resolved and deployed. -type CyclicImportError struct { - Cycles [][]*deployContract -} - -func (e *CyclicImportError) contractNames() [][]string { - cycles := make([][]string, 0, len(e.Cycles)) - - for _, cycle := range e.Cycles { - contracts := make([]string, 0, len(cycle)) - for _, contract := range cycle { - contracts = append(contracts, contract.Name) - } - - cycles = append(cycles, contracts) - } - - return cycles -} - -func (e *CyclicImportError) Error() string { - return fmt.Sprintf( - "contracts: import cycle(s) detected: %v", - e.contractNames(), - ) -} diff --git a/flowkit/project/deployment_test.go b/flowkit/project/deployment_test.go deleted file mode 100644 index fd01b2f3a..000000000 --- a/flowkit/project/deployment_test.go +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package project - -import ( - "strings" - "testing" - - "github.com/onflow/flow-go-sdk" - "github.com/onflow/flow-go-sdk/test" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -type testContract struct { - location string - code []byte - accountAddress flow.Address - accountName string -} - -var addresses = test.AddressGenerator() - -var testContractA = testContract{ - location: "foobar/ContractA.cdc", - code: []byte(`access(all) contract ContractA {}`), - accountAddress: addresses.New(), -} - -var testContractB = testContract{ - location: "ContractB.cdc", - code: []byte(`access(all) contract ContractB {}`), - accountAddress: addresses.New(), -} - -var testContractC = testContract{ - location: "foobar/ContractC.cdc", - code: []byte(` - import ContractA from "ContractA.cdc" - - access(all) contract ContractC {} - `), - accountAddress: addresses.New(), -} - -var testContractD = testContract{ - location: "ContractD.cdc", - code: []byte(` - import ContractC from "foobar/ContractC.cdc" - - access(all) contract ContractD {} - `), - accountAddress: addresses.New(), -} - -var testContractE = testContract{ - location: "ContractE.cdc", - code: []byte(` - import ContractF from "ContractF.cdc" - - access(all) contract ContractE {} - `), -} - -var testContractF = testContract{ - location: "ContractF.cdc", - code: []byte(` - import ContractE from "ContractE.cdc" - - access(all) contract ContractF {} - `), - accountAddress: addresses.New(), -} - -var testContractG = testContract{ - location: "ContractG.cdc", - code: []byte(` - import ContractA from "foobar/ContractA.cdc" - import ContractB from "ContractB.cdc" - - access(all) contract ContractG {} - `), - accountAddress: addresses.New(), -} - -var testContractH = testContract{ - location: "ContractH.cdc", - code: []byte(` - import ContractFoo from "Foo.cdc" - - access(all) contract ContractH {} - `), - accountAddress: addresses.New(), -} - -type contractTestCase struct { - name string - contracts []testContract - expectedDeploymentOrder []testContract - expectedDeploymentError error -} - -func getTestCases() []contractTestCase { - return []contractTestCase{ - { - name: "No contracts", - contracts: []testContract{}, - expectedDeploymentOrder: []testContract{}, - }, - { - name: "Single contract no imports", - contracts: []testContract{testContractA}, - expectedDeploymentOrder: []testContract{testContractA}, - }, - { - name: "Two contracts no imports", - contracts: []testContract{testContractA, testContractB}, - expectedDeploymentOrder: []testContract{testContractA, testContractB}, - }, - { - name: "Two contracts with imports", - contracts: []testContract{testContractA, testContractC}, - expectedDeploymentOrder: []testContract{testContractA, testContractC}, - }, - { - name: "Three contracts with imports", - contracts: []testContract{testContractA, testContractC, testContractD}, - expectedDeploymentOrder: []testContract{testContractA, testContractC, testContractD}, - }, - { - name: "Two contracts with import cycle", - contracts: []testContract{testContractE, testContractF}, - expectedDeploymentError: &CyclicImportError{}, - }, - { - name: "Single contract with two imports", - contracts: []testContract{testContractA, testContractB, testContractG}, - expectedDeploymentOrder: []testContract{testContractA, testContractB, testContractG}, - }, - { - name: "Single contract with unresolved import", - contracts: []testContract{testContractH}, - expectedDeploymentOrder: []testContract{testContractH}, - }, - } -} - -func TestContractDeploymentOrder(t *testing.T) { - testCases := getTestCases() - - for _, testCase := range testCases { - t.Run(testCase.name, func(t *testing.T) { - contracts := make([]*Contract, len(testCase.contracts)) - for i, contract := range testCase.contracts { - contracts[i] = NewContract( - strings.Split(contract.location, ".")[0], - contract.location, - contract.code, - contract.accountAddress, - contract.accountName, - nil, - ) - } - - deployment, err := NewDeployment(contracts, nil) - assert.NoError(t, err) - - contracts, err = deployment.Sort() - if !strings.Contains(testCase.name, "unresolved") && !strings.Contains(testCase.name, "cycle") { - assert.NoError(t, err) - } - - if strings.Contains(testCase.name, "unresolved") { - assert.EqualError(t, err, "import from ContractH could not be found: Foo.cdc, make sure import path is correct, and the contract is added to deployments or has an alias") - return - } - - if testCase.expectedDeploymentError != nil { - assert.IsType(t, testCase.expectedDeploymentError, err) - return - } else { - assert.NoError(t, err, testCase.name) - } - - require.Equal( - t, - len(testCase.expectedDeploymentOrder), - len(contracts), - "deployed contract count does not match expected count", - ) - - for i, deployedContract := range contracts { - assert.Equal(t, testCase.expectedDeploymentOrder[i].location, deployedContract.Location()) - } - }) - } -} diff --git a/flowkit/project/imports.go b/flowkit/project/imports.go deleted file mode 100644 index 268b0e86e..000000000 --- a/flowkit/project/imports.go +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package project - -import ( - "fmt" - "path/filepath" - - "github.com/onflow/flow-go-sdk" -) - -type Account interface { - Name() string - Address() flow.Address -} - -// ImportReplacer implements file import replacements functionality for the project contracts with optionally included aliases. -type ImportReplacer struct { - contracts []*Contract - aliases LocationAliases -} - -func NewImportReplacer(contracts []*Contract, aliases LocationAliases) *ImportReplacer { - return &ImportReplacer{ - contracts: contracts, - aliases: aliases, - } -} - -func (i *ImportReplacer) Replace(program *Program) (*Program, error) { - imports := program.imports() - contractsLocations := i.getContractsLocations() - - for _, imp := range imports { - // check if import by path exists (e.g. import X from ["./X.cdc"]) - importLocation := filepath.Clean(absolutePath(program.Location(), imp)) - address, isPath := contractsLocations[importLocation] - if isPath { - program.replaceImport(imp, address) - continue - } - // check if import by identifier exists (e.g. import ["X"]) - address, isIdentifier := contractsLocations[imp] - if isIdentifier { - program.replaceImport(imp, address) - continue - } - - return nil, fmt.Errorf("import %s could not be resolved from provided contracts", imp) - } - - return program, nil -} - -// getContractsLocations return a map with contract locations as keys and addresses where they are deployed as values. -func (i *ImportReplacer) getContractsLocations() map[string]string { - locationAddress := make(map[string]string) - for _, contract := range i.contracts { - locationAddress[filepath.Clean(contract.Location())] = contract.AccountAddress.String() - // add also by name since we might use the new import schema - locationAddress[contract.Name] = contract.AccountAddress.String() - } - - for source, target := range i.aliases { - locationAddress[filepath.Clean(source)] = flow.HexToAddress(target).String() - } - - return locationAddress -} - -func absolutePath(basePath, relativePath string) string { - return filepath.Join(filepath.Dir(basePath), relativePath) -} diff --git a/flowkit/project/imports_test.go b/flowkit/project/imports_test.go deleted file mode 100644 index 546c2cf1a..000000000 --- a/flowkit/project/imports_test.go +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package project - -import ( - "regexp" - "testing" - - "github.com/onflow/flow-go-sdk" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func cleanCode(code []byte) string { - space := regexp.MustCompile(`\s+`) - return space.ReplaceAllString(string(code), " ") -} - -func TestResolver(t *testing.T) { - - t.Run("Resolve imports", func(t *testing.T) { - contracts := []*Contract{ - NewContract("Kibble", "./tests/Kibble.cdc", nil, flow.HexToAddress("0x1"), "", nil), - NewContract("FT", "./tests/FT.cdc", nil, flow.HexToAddress("0x2"), "", nil), - } - - aliases := map[string]string{ - "./tests/NFT.cdc": flow.HexToAddress("0x4").String(), - } - - paths := []string{ - "./tests/foo.cdc", - "./scripts/bar/foo.cdc", - "./scripts/bar/foo.cdc", - "./tests/foo.cdc", - } - - scripts := [][]byte{ - []byte(` - import Kibble from "./Kibble.cdc" - import FT from "./FT.cdc" - access(all) fun main() {} - `), []byte(` - import Kibble from "../../tests/Kibble.cdc" - import FT from "../../tests/FT.cdc" - access(all) fun main() {} - `), []byte(` - import Kibble from "../../tests/Kibble.cdc" - import NFT from "../../tests/NFT.cdc" - access(all) fun main() {} - `), []byte(` - import Kibble from "./Kibble.cdc" - import Crypto - import Foo from 0x0000000000000001 - access(all) fun main() {} - `), - } - - resolved := [][]byte{ - []byte(` - import Kibble from 0x0000000000000001 - import FT from 0x0000000000000002 - access(all) fun main() {} - `), []byte(` - import Kibble from 0x0000000000000001 - import FT from 0x0000000000000002 - access(all) fun main() {} - `), []byte(` - import Kibble from 0x0000000000000001 - import NFT from 0x0000000000000004 - access(all) fun main() {} - `), []byte(` - import Kibble from 0x0000000000000001 - import Crypto - import Foo from 0x0000000000000001 - access(all) fun main() {} - `), - } - - replacer := NewImportReplacer(contracts, aliases) - for i, script := range scripts { - program, err := NewProgram(script, nil, paths[i]) - require.NoError(t, err) - - program, err = replacer.Replace(program) - assert.NoError(t, err) - assert.Equal(t, cleanCode(program.Code()), cleanCode(resolved[i])) - } - }) - - t.Run("Resolve new schema", func(t *testing.T) { - contracts := []*Contract{ - NewContract("Bar", "./Bar.cdc", nil, flow.HexToAddress("0x2"), "", nil), - NewContract("Foo", "./Foo.cdc", nil, flow.HexToAddress("0x1"), "", nil), - NewContract("Zoo", "./Zoo.cdc", nil, flow.HexToAddress("0x2"), "", nil), - } - - replacer := NewImportReplacer(contracts, nil) - - code := []byte(` - import Foo from "./Foo.cdc" - import "Bar" - - access(all) contract Zoo {} - `) - program, err := NewProgram(code, nil, "./Zoo.cdc") - require.NoError(t, err) - - replaced, err := replacer.Replace(program) - require.NoError(t, err) - - expected := []byte(` - import Foo from 0x0000000000000001 - import Bar from 0x0000000000000002 - - access(all) contract Zoo {} - `) - - assert.Equal(t, cleanCode(expected), cleanCode(replaced.Code())) - }) - -} diff --git a/flowkit/project/program.go b/flowkit/project/program.go deleted file mode 100644 index 66d0f793c..000000000 --- a/flowkit/project/program.go +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package project - -import ( - "fmt" - "regexp" - - "github.com/onflow/cadence" - "github.com/onflow/cadence/runtime/ast" - "github.com/onflow/cadence/runtime/common" - "github.com/onflow/cadence/runtime/parser" -) - -type Program struct { - code []byte - args []cadence.Value - location string - astProgram *ast.Program - codeWithUnprocessedImports []byte -} - -func NewProgram(code []byte, args []cadence.Value, location string) (*Program, error) { - astProgram, err := parser.ParseProgram(nil, code, parser.Config{}) - if err != nil { - return nil, err - } - - return &Program{ - code: code, - args: args, - location: location, - astProgram: astProgram, - codeWithUnprocessedImports: code, // has converted import syntax e.g. 'import "Foo"' - }, nil -} - -func (p *Program) AddressImportDeclarations() []*ast.ImportDeclaration { - addressImports := make([]*ast.ImportDeclaration, 0) - - for _, importDeclaration := range p.astProgram.ImportDeclarations() { - if len(importDeclaration.Identifiers) > 0 && len(importDeclaration.Location.String()) > 0 { - addressImports = append(addressImports, importDeclaration) - } - } - - return addressImports -} - -func (p *Program) HasAddressImports() bool { - return len(p.AddressImportDeclarations()) > 0 -} - -// Imports builds an array of all the import locations -// It currently supports getting import locations as identifiers or as strings. Strings locations -// can represent a file or an account name, whereas identifiers represent contract names. -func (p *Program) imports() []string { - imports := make([]string, 0) - - for _, importDeclaration := range p.astProgram.ImportDeclarations() { - // we parse all string locations, that are all imports that look like "import X from "Y"" or "import "X"" - _, isStringImport := importDeclaration.Location.(common.StringLocation) - if isStringImport { - imports = append(imports, importDeclaration.Location.String()) - } - } - - return imports -} - -func (p *Program) HasImports() bool { - return len(p.imports()) > 0 -} - -func (p *Program) replaceImport(from string, to string) *Program { - code := string(p.Code()) - - pathRegex := regexp.MustCompile(fmt.Sprintf(`import\s+(\w+)\s+from\s+"%s"`, from)) - identifierRegex := regexp.MustCompile(fmt.Sprintf(`import\s+"(%s)"`, from)) - - replacement := fmt.Sprintf(`import $1 from 0x%s`, to) - code = pathRegex.ReplaceAllString(code, replacement) - code = identifierRegex.ReplaceAllString(code, replacement) - - p.code = []byte(code) - p.reload() - return p -} - -func (p *Program) Location() string { - return p.location -} - -func (p *Program) Code() []byte { - return p.code -} - -func (p *Program) CodeWithUnprocessedImports() []byte { - return p.codeWithUnprocessedImports -} - -func (p *Program) Name() (string, error) { - if len(p.astProgram.CompositeDeclarations()) > 1 || len(p.astProgram.InterfaceDeclarations()) > 1 || - len(p.astProgram.CompositeDeclarations())+len(p.astProgram.InterfaceDeclarations()) > 1 { - return "", fmt.Errorf("the code must declare exactly one contract or contract interface") - } - - for _, compositeDeclaration := range p.astProgram.CompositeDeclarations() { - if compositeDeclaration.CompositeKind == common.CompositeKindContract { - return compositeDeclaration.Identifier.Identifier, nil - } - } - - for _, interfaceDeclaration := range p.astProgram.InterfaceDeclarations() { - if interfaceDeclaration.CompositeKind == common.CompositeKindContract { - return interfaceDeclaration.Identifier.Identifier, nil - } - } - - return "", fmt.Errorf("unable to determine contract name") -} - -func (p *Program) ConvertAddressImports() { - code := string(p.code) - addressImportRegex := regexp.MustCompile(`import\s+(\w+)\s+from\s+0x[0-9a-fA-F]+`) - modifiedCode := addressImportRegex.ReplaceAllString(code, `import "$1"`) - - p.codeWithUnprocessedImports = []byte(modifiedCode) -} - -func (p *Program) reload() { - astProgram, err := parser.ParseProgram(nil, p.code, parser.Config{}) - if err != nil { - return - } - - p.astProgram = astProgram - p.ConvertAddressImports() -} diff --git a/flowkit/project/program_test.go b/flowkit/project/program_test.go deleted file mode 100644 index f8edfe7ee..000000000 --- a/flowkit/project/program_test.go +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package project - -import ( - "fmt" - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestProgram(t *testing.T) { - - t.Run("AddressImports", func(t *testing.T) { - tests := []struct { - code []byte - expectedCount int - }{ - { - code: []byte(` - import Foo from 0x123 - import "Bar" - import FooSpace from 0x124 - import "BarSpace" - - access(all) contract Foo {} - `), - expectedCount: 2, - }, - } - - for i, test := range tests { - program, err := NewProgram(test.code, nil, "") - require.NoError(t, err, fmt.Sprintf("AddressImports test %d failed", i)) - addressImports := program.AddressImportDeclarations() - assert.Len(t, addressImports, test.expectedCount, fmt.Sprintf("AddressImports test %d failed", i)) - } - }) - - t.Run("Imports", func(t *testing.T) { - tests := []struct { - code []byte - imports []string - }{{ - code: []byte(`access(all) contract Foo {}`), - imports: []string{}, - }, { - code: []byte(`access(all) fun main() {}`), - imports: []string{}, - }, { - code: []byte(` - import Bar from "./Bar.cdc" - access(all) contract Foo {} - `), - imports: []string{"./Bar.cdc"}, - }, { - code: []byte(` - import Bar from "./Bar.cdc" - import Zoo from "./zoo/Zoo.cdc" - access(all) contract Foo {} - `), - imports: []string{"./Bar.cdc", "./zoo/Zoo.cdc"}, - }, { // new schema import - code: []byte(` - import "Bar" - access(all) contract Foo {} - `), - imports: []string{"Bar"}, - }, { - code: []byte(` - import "Bar" - import Zoo from "./Zoo.cdc" - import Crypto - import Foo from 0x01 - - access(all) contract Foo {} - `), - imports: []string{"Bar", "./Zoo.cdc"}, - }} - - for i, test := range tests { - program, err := NewProgram(test.code, nil, "") - require.NoError(t, err, fmt.Sprintf("import test %d failed", i)) - assert.Equal(t, len(test.imports) > 0, program.HasImports(), fmt.Sprintf("import test %d failed", i)) - assert.Equal(t, test.imports, program.imports(), fmt.Sprintf("import test %d failed", i)) - } - }) - - t.Run("Name", func(t *testing.T) { - tests := []struct { - code []byte - name string - }{{ - code: []byte(`access(all) contract Foo {}`), - name: "Foo", - }, { - code: []byte(` - import Bar from "./Bar.cdc" - access(all) contract Foo {} - `), - name: "Foo", - }} - - for i, test := range tests { - program, err := NewProgram(test.code, nil, "") - require.NoError(t, err, fmt.Sprintf("import test %d failed", i)) - name, err := program.Name() - require.NoError(t, err) - assert.Equal(t, test.name, name) - } - - failed := [][]byte{ - []byte(` - access(all) contract Foo {} - access(all) contract Bar {} - `), - []byte(` - access(all) contract Foo {} - access(all) resource interface Test {} - `), - []byte(` - access(all) contract Foo {} - struct Bar {} - `), - } - - for _, code := range failed { - program, err := NewProgram(code, nil, "") - require.NoError(t, err) - - _, err = program.Name() - assert.EqualError(t, err, "the code must declare exactly one contract or contract interface") - } - - program, err := NewProgram([]byte(`access(all) fun main() {}`), nil, "") - require.NoError(t, err) - _, err = program.Name() - assert.EqualError(t, err, "unable to determine contract name") - }) - - t.Run("Replace", func(t *testing.T) { - code := []byte(` - import Foo from "./Foo.cdc" - import "Bar" - import FooSpace from "./FooSpace.cdc" - import "BarSpace" - - access(all) contract Foo {} - `) - - replaced := []byte(` - import Foo from 0x1 - import Bar from 0x2 - import FooSpace from 0x3 - import BarSpace from 0x4 - - access(all) contract Foo {} - `) - - program, err := NewProgram(code, nil, "") - require.NoError(t, err) - - program. - replaceImport("./Foo.cdc", "1"). - replaceImport("Bar", "2"). - replaceImport("./FooSpace.cdc", "3"). - replaceImport("BarSpace", "4") - - assert.Equal(t, string(replaced), string(program.Code())) - }) - - t.Run("Convert to Import Syntax", func(t *testing.T) { - code := []byte(` - import Foo from 0x123 - import "Bar" - import FooSpace from 0x124 - import "BarSpace" - - access(all) contract Foo {} - `) - - expected := []byte(` - import "Foo" - import "Bar" - import "FooSpace" - import "BarSpace" - - access(all) contract Foo {} - `) - - program, err := NewProgram(code, nil, "") - require.NoError(t, err) - - program.ConvertAddressImports() - - assert.Equal(t, string(expected), string(program.CodeWithUnprocessedImports())) - }) - -} diff --git a/flowkit/services.go b/flowkit/services.go deleted file mode 100644 index 31e6b05d9..000000000 --- a/flowkit/services.go +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package flowkit - -import ( - "context" - - "github.com/onflow/cadence" - "github.com/onflow/flow-go-sdk" - "github.com/onflow/flow-go-sdk/crypto" - - "github.com/onflow/flow-cli/flowkit/accounts" - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/gateway" - "github.com/onflow/flow-cli/flowkit/output" - "github.com/onflow/flow-cli/flowkit/project" - "github.com/onflow/flow-cli/flowkit/transactions" -) - -//go:generate mockery --name=Services - -type Services interface { - Network() config.Network - Ping() error - Gateway() gateway.Gateway - SetLogger(output.Logger) - - // GetAccount fetches account on the Flow network. - GetAccount(context.Context, flow.Address) (*flow.Account, error) - - // CreateAccount on the Flow network with the provided keys and using the signer for creation transaction. - // Returns the newly created account as well as the ID of the transaction that created the account. - // - // Keys is a slice but only one can be passed as well. If the transaction fails or there are other issues an error is returned. - CreateAccount(context.Context, *accounts.Account, []accounts.PublicKey) (*flow.Account, flow.Identifier, error) - - // AddContract to the Flow account provided and return the transaction ID. - // - // If the contract already exists on the account the operation will fail and error will be returned. - // Use UpdateExistingContract(bool) to define whether a contract should be updated or not, or you can also - // define a custom UpdateContract function which returns bool indicating whether a contract should be updated or not. - AddContract(context.Context, *accounts.Account, Script, UpdateContract) (flow.Identifier, bool, error) - - // RemoveContract from the provided account by its name. - // - // If removal is successful transaction ID is returned. - RemoveContract(context.Context, *accounts.Account, string) (flow.Identifier, error) - - // GetBlock by the query from Flow blockchain. Query can define a block by ID, block by height or require the latest block. - GetBlock(context.Context, BlockQuery) (*flow.Block, error) - - // GetCollection by the ID from Flow network. - GetCollection(context.Context, flow.Identifier) (*flow.Collection, error) - - // GetEvents from Flow network by their event name in the specified height interval defined by start and end inclusive. - // Optional worker defines parameters for how many concurrent workers do we want to fetch our events, - // and how many blocks between the provided interval each worker fetches. - // - // Providing worker value will produce faster response as the interval will be scanned concurrently. This parameter is optional, - // if not provided only a single worker will be used. - GetEvents(context.Context, []string, uint64, uint64, *EventWorker) ([]flow.BlockEvents, error) - - // GenerateKey using the signature algorithm and optional seed. If seed is not provided a random safe seed will be generated. - GenerateKey(context.Context, crypto.SignatureAlgorithm, string) (crypto.PrivateKey, error) - - // GenerateMnemonicKey will generate a new key with the signature algorithm and optional derivation path. - // - // If the derivation path is not provided a default "m/44'/539'/0'/0/0" will be used. - GenerateMnemonicKey(context.Context, crypto.SignatureAlgorithm, string) (crypto.PrivateKey, string, error) - - DerivePrivateKeyFromMnemonic(context.Context, string, crypto.SignatureAlgorithm, string) (crypto.PrivateKey, error) - - // DeployProject contracts to the Flow network or update if already exists and UpdateContracts returns true. - // - // Retrieve all the contracts for specified network, sort them for deployment deploy one by one and replace - // the imports in the contract source, so it corresponds to the account name the contract was deployed to. - // If contracts already exist use UpdateExistingContract(bool) to define whether a contract should be updated or not. - DeployProject(context.Context, UpdateContract) ([]*project.Contract, error) - - // ExecuteScript on the Flow network and return the Cadence value as a result. The script is executed at the - // block provided as part of the ScriptQuery value. - ExecuteScript(context.Context, Script, ScriptQuery) (cadence.Value, error) - - // GetTransactionByID from the Flow network including the transaction result. Using the waitSeal we can wait for the transaction to be sealed. - GetTransactionByID(context.Context, flow.Identifier, bool) (*flow.Transaction, *flow.TransactionResult, error) - - GetTransactionsByBlockID(context.Context, flow.Identifier) ([]*flow.Transaction, []*flow.TransactionResult, error) - - // BuildTransaction builds a new transaction type for later signing and submitting to the network. - // - // AddressesRoles type defines the address for each role (payer, proposer, authorizers) and the script defines the transaction content. - BuildTransaction(context.Context, transactions.AddressesRoles, int, Script, uint64) (*transactions.Transaction, error) - - // SignTransactionPayload will use the signer account provided and the payload raw byte content to sign it. - // - // The payload should be RLP encoded transaction payload and is suggested to be used in pair with BuildTransaction function. - SignTransactionPayload(context.Context, *accounts.Account, []byte) (*transactions.Transaction, error) - - // SendSignedTransaction will send a prebuilt and signed transaction to the Flow network. - // - // You can build the transaction using the BuildTransaction method and then sign it using the SignTranscation method. - SendSignedTransaction(context.Context, *transactions.Transaction) (*flow.Transaction, *flow.TransactionResult, error) - - // SendTransaction will build and send a transaction to the Flow network, using the accounts provided for each role and - // contain the script. Transaction as well as transaction result will be returned in case the transaction is successfully submitted. - SendTransaction(context.Context, transactions.AccountRoles, Script, uint64) (*flow.Transaction, *flow.TransactionResult, error) -} diff --git a/flowkit/state.go b/flowkit/state.go deleted file mode 100644 index 94993cc3f..000000000 --- a/flowkit/state.go +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package flowkit - -import ( - "fmt" - "os" - "path/filepath" - - "github.com/onflow/cadence/runtime" - "github.com/onflow/flow-go-sdk/crypto" - "github.com/pkg/errors" - "golang.org/x/exp/slices" - - "github.com/onflow/flow-cli/flowkit/accounts" - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/config/json" - "github.com/onflow/flow-cli/flowkit/project" -) - -// ReaderWriter defines read file and write file methods. -type ReaderWriter interface { - ReadFile(source string) ([]byte, error) - WriteFile(filename string, data []byte, perm os.FileMode) error - MkdirAll(path string, perm os.FileMode) error - Stat(path string) (os.FileInfo, error) -} - -// State manages the state for a Flow project. -type State struct { - conf *config.Config - confLoader *config.Loader - readerWriter ReaderWriter - accounts *accounts.Accounts -} - -func (p *State) CreateCoverageReport(network string) *runtime.CoverageReport { - coverageReport := runtime.NewCoverageReport() - contractsConfig := *p.Contracts() - locationMappings := make(map[string]string, len(contractsConfig)) - for _, contract := range contractsConfig { - alias := contract.Aliases.ByNetwork(network) - if alias != nil { - locationMappings[contract.Name] = contract.Location - } - } - - coverageReport.WithLocationMappings(locationMappings) - - return coverageReport -} - -// ReaderWriter retrieve current file reader writer. -func (p *State) ReaderWriter() ReaderWriter { - return p.readerWriter -} - -// ReadFile exposes an injected file loader. -func (p *State) ReadFile(source string) ([]byte, error) { - return p.readerWriter.ReadFile(source) -} - -// SaveDefault saves to default path. -func (p *State) SaveDefault() error { - return p.Save(config.DefaultPath) -} - -// SaveEdited saves configuration to valid path. -func (p *State) SaveEdited(paths []string) error { - // if paths are not default only allow specifying one config - if !config.IsDefaultPath(paths) && len(paths) > 1 { - return fmt.Errorf("specifying multiple paths is not supported when updating configuration") - } - // if default paths and local config doesn't exist don't allow updating global config - if config.IsDefaultPath(paths) { - _, err := p.confLoader.Load([]string{config.DefaultPath}) // check if default is present - if err != nil { - return fmt.Errorf("default configuration not found, please initialize it first or specify another configuration file") - } else { - return p.SaveDefault() - } - } - - return p.Save(paths[0]) -} - -// Save saves the project configuration to the given path. -func (p *State) Save(path string) error { - p.conf.Accounts = accounts.ToConfig(*p.accounts) - err := p.confLoader.Save(p.conf, path) - if err != nil { - return fmt.Errorf("failed to save project configuration to: %s", path) - } - - return nil -} - -// Networks get network configuration. -func (p *State) Networks() *config.Networks { - return &p.conf.Networks -} - -// Deployments get deployments configuration. -func (p *State) Deployments() *config.Deployments { - return &p.conf.Deployments -} - -// Contracts get contracts configuration. -func (p *State) Contracts() *config.Contracts { - return &p.conf.Contracts -} - -func (p *State) Dependencies() *config.Dependencies { - return &p.conf.Dependencies -} - -// Accounts get accounts. -func (p *State) Accounts() *accounts.Accounts { - return p.accounts -} - -// Config get underlying configuration for advanced usage. -func (p *State) Config() *config.Config { - return p.conf -} - -// EmulatorServiceAccount returns the service account for the default emulator profile. -func (p *State) EmulatorServiceAccount() (*accounts.Account, error) { - emulator := p.conf.Emulators.Default() - if emulator == nil { - return nil, fmt.Errorf("no default emulator account") - } - - return p.accounts.ByName(emulator.ServiceAccount) -} - -// SetEmulatorKey sets the default emulator service account private key. -func (p *State) SetEmulatorKey(privateKey crypto.PrivateKey) { - acc, _ := p.EmulatorServiceAccount() - acc.Key = accounts.NewHexKeyFromPrivateKey(acc.Key.Index(), acc.Key.HashAlgo(), privateKey) -} - -// DeploymentContractsByNetwork returns all contracts for a network. -// -// Build contract slice based on the network provided, check the deployment section for that network -// and retrieve the account by name, then add the accounts address on the contract as a destination. -func (p *State) DeploymentContractsByNetwork(network config.Network) ([]*project.Contract, error) { - contracts := make([]*project.Contract, 0) - - // get deployments for the specified network - for _, deploy := range p.conf.Deployments.ByNetwork(network.Name) { - account, err := p.accounts.ByName(deploy.Account) - if err != nil { - return nil, err - } - - // go through each contract in this deployment - for _, deploymentContract := range deploy.Contracts { - c, err := p.conf.Contracts.ByName(deploymentContract.Name) - if err != nil { - return nil, err - } - - location := c.Location - // if we loaded config from a single location, we should make the path of contracts defined in config relative to - // config path we have provided, this will make cases where we execute loading in different path than config work - if len(p.confLoader.LoadedLocations) == 1 { - location = filepath.Join( - filepath.Dir(p.confLoader.LoadedLocations[0]), - location, - ) - } - - code, err := p.readerWriter.ReadFile(location) - if err != nil { - return nil, errors.Wrap(err, "deployment by network failed to read contract code") - } - - contract := project.NewContract( - c.Name, - filepath.Clean(location), - code, - account.Address, - account.Name, - deploymentContract.Args, - ) - - contracts = append(contracts, contract) - } - } - - return contracts, nil -} - -// AccountsForNetwork returns all accounts used on a network defined by deployments. -func (p *State) AccountsForNetwork(network config.Network) *accounts.Accounts { - exists := make(map[string]bool, 0) - accs := make(accounts.Accounts, 0) - - for _, account := range *p.accounts { - if p.conf.Deployments.ByAccountAndNetwork(account.Name, network.Name) != nil { - slices.ContainsFunc(accs, func(a accounts.Account) bool { - return a.Name == account.Name - }) - if !exists[account.Name] { - accs = append(accs, account) - } - } - } - return &accs -} - -// AliasesForNetwork returns all deployment aliases for a network. -func (p *State) AliasesForNetwork(network config.Network) project.LocationAliases { - aliases := make(project.LocationAliases) - - // get all contracts for selected network and if any has an address as target make it an alias - for _, contract := range p.conf.Contracts { - if contract.IsAliased() && contract.Aliases.ByNetwork(network.Name) != nil { - alias := contract.Aliases.ByNetwork(network.Name).Address.String() - aliases[filepath.Clean(contract.Location)] = alias // alias for import by file location - aliases[contract.Name] = alias // alias for import by name - } - } - - return aliases -} - -// Load loads a project configuration and returns the resulting project. -func Load(configFilePaths []string, readerWriter ReaderWriter) (*State, error) { - confLoader := config.NewLoader(readerWriter) - - // here we add all available parsers (more to add yaml etc...) - confLoader.AddConfigParser(json.NewParser()) - conf, err := confLoader.Load(configFilePaths) - if err != nil { - return nil, err - } - // only add a default emulator in the config if the emulator account is present in accounts - _, err = conf.Accounts.ByName(config.DefaultEmulator.ServiceAccount) - if err == nil && len(conf.Emulators) == 0 { - conf.Emulators.AddOrUpdate("", config.DefaultEmulator) - } - proj, err := newProject(conf, confLoader, readerWriter) - if err != nil { - return nil, fmt.Errorf("invalid project configuration: %s", err) - } - - return proj, nil -} - -// Init initializes a new Flow project. -func Init( - readerWriter ReaderWriter, - sigAlgo crypto.SignatureAlgorithm, - hashAlgo crypto.HashAlgorithm, -) (*State, error) { - emulatorServiceAccount, err := accounts.NewEmulatorAccount(sigAlgo, hashAlgo) - if err != nil { - return nil, err - } - - loader := config.NewLoader(readerWriter) - loader.AddConfigParser(json.NewParser()) - - return &State{ - confLoader: loader, - readerWriter: readerWriter, - conf: config.Default(), - accounts: &accounts.Accounts{*emulatorServiceAccount}, - }, nil -} - -// newProject creates a new project from a configuration object. -func newProject( - conf *config.Config, - loader *config.Loader, - readerWriter ReaderWriter, -) (*State, error) { - accs, err := accounts.FromConfig(conf) - if err != nil { - return nil, err - } - - return &State{ - conf: conf, - readerWriter: readerWriter, - confLoader: loader, - accounts: &accs, - }, nil -} diff --git a/flowkit/state_test.go b/flowkit/state_test.go deleted file mode 100644 index 094363bce..000000000 --- a/flowkit/state_test.go +++ /dev/null @@ -1,893 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package flowkit - -import ( - "fmt" - "os" - "path/filepath" - "sort" - "testing" - - "github.com/onflow/flow-go-sdk" - "github.com/onflow/flow-go-sdk/crypto" - "github.com/spf13/afero" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/thoas/go-funk" - - "github.com/onflow/flow-cli/flowkit/accounts" - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/config/json" - "github.com/onflow/flow-cli/flowkit/project" -) - -var af = afero.Afero{Fs: afero.NewMemMapFs()} - -var composer = config.NewLoader(af) - -func keys() []crypto.PrivateKey { - var keys []crypto.PrivateKey - key, _ := crypto.DecodePrivateKeyHex(crypto.ECDSA_P256, "dd72967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47") - keys = append(keys, key) - key, _ = crypto.DecodePrivateKeyHex(crypto.ECDSA_P256, "388e3fbdc654b765942610679bb3a66b74212149ab9482187067ee116d9a8118") - keys = append(keys, key) - key, _ = crypto.DecodePrivateKeyHex(crypto.ECDSA_P256, "27bbeba308e501f8485ddaab77e285c0bc0d611096a79b4f0b4ccc927c6dbf04") - keys = append(keys, key) - - return keys -} - -func generateComplexProject() State { - cfg := config.Config{ - Emulators: config.Emulators{{ - Name: "default", - Port: 9000, - ServiceAccount: "emulator-account", - }}, - Contracts: config.Contracts{{ - Name: "NonFungibleToken", - Location: "../hungry-kitties/cadence/contracts/NonFungibleToken.cdc", - }, { - Name: "FungibleToken", - Location: "../hungry-kitties/cadence/contracts/FungibleToken.cdc", - }, { - Name: "Kibble", - Location: "./cadence/kibble/contracts/Kibble.cdc", - }, { - Name: "KittyItems", - Location: "./cadence/kittyItems/contracts/KittyItems.cdc", - }, { - Name: "KittyItemsMarket", - Location: "./cadence/kittyItemsMarket/contracts/KittyItemsMarket.cdc", - Aliases: config.Aliases{{ - Network: "testnet", - Address: flow.HexToAddress("0x123123123"), - }}, - }}, - Deployments: config.Deployments{{ - Network: "emulator", - Account: "emulator-account", - Contracts: []config.ContractDeployment{ - {Name: "KittyItems", Args: nil}, - {Name: "KittyItemsMarket", Args: nil}, - }, - }, { - Network: "emulator", - Account: "account-4", - Contracts: []config.ContractDeployment{ - {Name: "FungibleToken", Args: nil}, - {Name: "NonFungibleToken", Args: nil}, - {Name: "Kibble", Args: nil}, - {Name: "KittyItems", Args: nil}, - {Name: "KittyItemsMarket", Args: nil}, - }, - }, { - Network: "testnet", - Account: "account-2", - Contracts: []config.ContractDeployment{ - {Name: "FungibleToken", Args: nil}, - {Name: "NonFungibleToken", Args: nil}, - {Name: "Kibble", Args: nil}, - {Name: "KittyItems", Args: nil}, - }, - }}, - Accounts: config.Accounts{{ - Name: "emulator-account", - Address: flow.ServiceAddress(flow.Emulator), - Key: config.AccountKey{ - Type: config.KeyTypeHex, - Index: 0, - SigAlgo: crypto.ECDSA_P256, - HashAlgo: crypto.SHA3_256, - PrivateKey: keys()[0], - }, - }, { - Name: "account-2", - Address: flow.HexToAddress("2c1162386b0a245f"), - Key: config.AccountKey{ - Type: config.KeyTypeHex, - Index: 0, - SigAlgo: crypto.ECDSA_P256, - HashAlgo: crypto.SHA3_256, - PrivateKey: keys()[1], - }, - }, { - Name: "account-4", - Address: flow.HexToAddress("f8d6e0586b0a20c1"), - Key: config.AccountKey{ - Type: config.KeyTypeHex, - Index: 0, - SigAlgo: crypto.ECDSA_P256, - HashAlgo: crypto.SHA3_256, - PrivateKey: keys()[2], - }, - }, { - Name: "emulator-account-2", - Address: flow.HexToAddress("2c1162386b0a245f"), - Key: config.AccountKey{ - Type: config.KeyTypeHex, - Index: 0, - SigAlgo: crypto.ECDSA_P256, - HashAlgo: crypto.SHA3_256, - PrivateKey: keys()[1], - }, - }}, - Networks: config.Networks{{ - Name: "emulator", - Host: "127.0.0.1.3569", - }}, - } - - p, err := newProject(&cfg, composer, af) - if err != nil { - fmt.Println(err) - } - - return *p -} - -func generateSimpleProject() State { - cfg := config.Config{ - Emulators: config.Emulators{{ - Name: "default", - Port: 9000, - ServiceAccount: "emulator-account", - }}, - Contracts: config.Contracts{{ - Name: "NonFungibleToken", - Location: "../hungry-kitties/cadence/contracts/NonFungibleToken.cdc", - }}, - Deployments: config.Deployments{{ - Network: "emulator", - Account: "emulator-account", - Contracts: []config.ContractDeployment{ - {Name: "NonFungibleToken", Args: nil}, - }, - }}, - Accounts: config.Accounts{{ - Name: "emulator-account", - Address: flow.ServiceAddress(flow.Emulator), - Key: config.AccountKey{ - Type: config.KeyTypeHex, - Index: 0, - SigAlgo: crypto.ECDSA_P256, - HashAlgo: crypto.SHA3_256, - PrivateKey: keys()[0], - }, - }}, - Networks: config.Networks{{ - Name: "emulator", - Host: "127.0.0.1.3569", - }}, - } - - composer.AddConfigParser(json.NewParser()) - p, err := newProject(&cfg, composer, af) - if err != nil { - fmt.Println(err) - } - - return *p -} - -func generateAliasesProject() State { - cfg := config.Config{ - Emulators: config.Emulators{{ - Name: "default", - Port: 9000, - ServiceAccount: "emulator-account", - }}, - Contracts: config.Contracts{{ - Name: "NonFungibleToken", - Location: "../hungry-kitties/cadence/contracts/NonFungibleToken.cdc", - }, { - Name: "FungibleToken", - Location: "../hungry-kitties/cadence/contracts/FungibleToken.cdc", - Aliases: config.Aliases{{ - Network: "emulator", - Address: flow.HexToAddress("ee82856bf20e2aa6"), - }}, - }}, - Deployments: config.Deployments{{ - Network: "emulator", - Account: "emulator-account", - Contracts: []config.ContractDeployment{ - {Name: "NonFungibleToken", Args: nil}, - }, - }}, - Accounts: config.Accounts{{ - Name: "emulator-account", - Address: flow.ServiceAddress(flow.Emulator), - Key: config.AccountKey{ - Type: config.KeyTypeHex, - Index: 0, - SigAlgo: crypto.ECDSA_P256, - HashAlgo: crypto.SHA3_256, - PrivateKey: keys()[0], - }, - }}, - Networks: config.Networks{{ - Name: "emulator", - Host: "127.0.0.1.3569", - }}, - } - - p, err := newProject(&cfg, composer, af) - if err != nil { - fmt.Println(err) - } - - return *p -} - -func generateAliasesComplexProject() State { - cfg := config.Config{ - Emulators: config.Emulators{{ - Name: "default", - Port: 9000, - ServiceAccount: "emulator-account", - }}, - Contracts: config.Contracts{{ - Name: "NonFungibleToken", - Location: "../hungry-kitties/cadence/contracts/NonFungibleToken.cdc", - }, { - Name: "FungibleToken", - Location: "../hungry-kitties/cadence/contracts/FungibleToken.cdc", - Aliases: config.Aliases{{ - Network: "emulator", - Address: flow.HexToAddress("ee82856bf20e2aa6"), - }}, - }, { - Name: "Kibble", - Location: "../hungry-kitties/cadence/contracts/Kibble.cdc", - Aliases: config.Aliases{{ - Network: "testnet", - Address: flow.HexToAddress("ee82856bf20e2aa6"), - }}, - }, { - Name: "Kibble", - Location: "../hungry-kitties/cadence/contracts/Kibble.cdc", - Aliases: config.Aliases{{ - Network: "emulator", - Address: flow.HexToAddress("ee82856bf20e2aa6"), - }}, - }}, - Deployments: config.Deployments{{ - Network: "emulator", - Account: "emulator-account", - Contracts: []config.ContractDeployment{ - {Name: "NonFungibleToken", Args: nil}, - }, - }, { - Network: "testnet", - Account: "testnet-account", - Contracts: []config.ContractDeployment{ - {Name: "NonFungibleToken", Args: nil}, - {Name: "FungibleToken", Args: nil}, - }, - }}, - Accounts: config.Accounts{{ - Name: "emulator-account", - Address: flow.ServiceAddress(flow.Emulator), - Key: config.AccountKey{ - Type: config.KeyTypeHex, - Index: 0, - SigAlgo: crypto.ECDSA_P256, - HashAlgo: crypto.SHA3_256, - PrivateKey: keys()[0], - }, - }, { - Name: "testnet-account", - Address: flow.HexToAddress("1e82856bf20e2aa6"), - Key: config.AccountKey{ - Type: config.KeyTypeHex, - Index: 0, - SigAlgo: crypto.ECDSA_P256, - HashAlgo: crypto.SHA3_256, - PrivateKey: keys()[1], - }, - }}, - Networks: config.Networks{{ - Name: "emulator", - Host: "127.0.0.1.3569", - }, { - Name: "testnet", - Host: "127.0.0.1.3569", - }}, - } - - p, err := newProject(&cfg, composer, af) - if err != nil { - fmt.Println(err) - } - - return *p -} - -func Test_GetContractsByNameSimple(t *testing.T) { - p := generateSimpleProject() - path := filepath.FromSlash("../hungry-kitties/cadence/contracts/NonFungibleToken.cdc") - af.WriteFile(path, []byte("access(all) contract{}"), os.ModePerm) - - contracts, err := p.DeploymentContractsByNetwork(config.EmulatorNetwork) - require.NoError(t, err) - account, err := p.conf.Accounts.ByName("emulator-account") - require.NoError(t, err) - require.Len(t, contracts, 1) - assert.Equal(t, "NonFungibleToken", contracts[0].Name) - assert.Equal(t, path, contracts[0].Location()) - assert.Equal(t, account.Address, contracts[0].AccountAddress) -} - -func Test_EmulatorConfigSimple(t *testing.T) { - p := generateSimpleProject() - emulatorServiceAccount, _ := p.EmulatorServiceAccount() - - assert.Equal(t, "emulator-account", emulatorServiceAccount.Name) - assert.Equal(t, emulatorServiceAccount.Key.ToConfig().PrivateKey, keys()[0]) - assert.Equal(t, flow.ServiceAddress("flow-emulator"), emulatorServiceAccount.Address) -} - -func Test_AccountByAddressSimple(t *testing.T) { - p := generateSimpleProject() - acc, _ := p.Accounts().ByAddress(flow.ServiceAddress("flow-emulator")) - - assert.Equal(t, "emulator-account", acc.Name) -} - -func Test_AccountByNameSimple(t *testing.T) { - p := generateSimpleProject() - acc, _ := p.Accounts().ByName("emulator-account") - - assert.Equal(t, flow.ServiceAddress("flow-emulator"), acc.Address) - assert.Equal(t, acc.Key.ToConfig().PrivateKey, keys()[0]) -} - -func Test_HostSimple(t *testing.T) { - p := generateSimpleProject() - network, err := p.Networks().ByName("emulator") - - assert.NoError(t, err) - assert.Equal(t, "127.0.0.1.3569", network.Host) -} - -func Test_GetContractsByNameComplex(t *testing.T) { - p := generateComplexProject() - - for _, c := range p.conf.Contracts { - _ = af.WriteFile(c.Location, []byte("access(all) contract{}"), os.ModePerm) - } - - contracts, err := p.DeploymentContractsByNetwork(config.EmulatorNetwork) - require.NoError(t, err) - require.Equal(t, 7, len(contracts)) - - // sort contracts by name so tests are deterministic - sort.Slice(contracts, func(i, j int) bool { - return contracts[i].Name < contracts[j].Name - }) - - contractNames := funk.Map(contracts, func(c *project.Contract) string { - return c.Name - }).([]string) - - sources := funk.Map(contracts, func(c *project.Contract) string { - return c.Location() - }).([]string) - - targets := funk.Map(contracts, func(c *project.Contract) string { - return c.AccountAddress.String() - }).([]string) - - assert.Equal(t, contractNames[0], "FungibleToken") - assert.Equal(t, contractNames[1], "Kibble") - assert.Equal(t, contractNames[2], "KittyItems") - assert.Equal(t, contractNames[3], "KittyItems") - assert.Equal(t, contractNames[4], "KittyItemsMarket") - assert.Equal(t, contractNames[5], "KittyItemsMarket") - assert.Equal(t, contractNames[6], "NonFungibleToken") - - assert.Equal(t, sources[0], filepath.FromSlash("../hungry-kitties/cadence/contracts/FungibleToken.cdc")) - assert.Equal(t, sources[1], filepath.FromSlash("cadence/kibble/contracts/Kibble.cdc")) - assert.Equal(t, sources[2], filepath.FromSlash("cadence/kittyItems/contracts/KittyItems.cdc")) - assert.Equal(t, sources[3], filepath.FromSlash("cadence/kittyItems/contracts/KittyItems.cdc")) - assert.Equal(t, sources[4], filepath.FromSlash("cadence/kittyItemsMarket/contracts/KittyItemsMarket.cdc")) - assert.Equal(t, sources[5], filepath.FromSlash("cadence/kittyItemsMarket/contracts/KittyItemsMarket.cdc")) - assert.Equal(t, sources[6], filepath.FromSlash("../hungry-kitties/cadence/contracts/NonFungibleToken.cdc")) - - assert.Equal(t, targets[0], "f8d6e0586b0a20c1") - assert.Equal(t, targets[1], "f8d6e0586b0a20c1") - assert.Equal(t, targets[2], "f8d6e0586b0a20c7") - assert.Equal(t, targets[3], "f8d6e0586b0a20c1") - assert.Equal(t, targets[4], "f8d6e0586b0a20c7") - assert.Equal(t, targets[5], "f8d6e0586b0a20c1") - assert.Equal(t, targets[6], "f8d6e0586b0a20c1") -} - -func Test_EmulatorConfigComplex(t *testing.T) { - p := generateComplexProject() - emulatorServiceAccount, _ := p.EmulatorServiceAccount() - - assert.Equal(t, emulatorServiceAccount.Name, "emulator-account") - assert.Equal(t, emulatorServiceAccount.Key.ToConfig().PrivateKey, keys()[0]) - assert.Equal(t, emulatorServiceAccount.Address, flow.ServiceAddress("flow-emulator")) -} - -func Test_AccountByNameWithDuplicateAddress(t *testing.T) { - p := generateComplexProject() - acc1, err := p.Accounts().ByName("emulator-account") - - assert.NoError(t, err) - acc2, err := p.Accounts().ByName("emulator-account-2") - assert.NoError(t, err) - - assert.Equal(t, acc1.Name, "emulator-account") - assert.Equal(t, acc2.Name, "emulator-account-2") -} - -func Test_AccountByNameComplex(t *testing.T) { - p := generateComplexProject() - acc, _ := p.Accounts().ByName("account-2") - - assert.Equal(t, acc.Address.String(), "2c1162386b0a245f") - assert.Equal(t, acc.Key.ToConfig().PrivateKey, keys()[1]) -} - -func Test_HostComplex(t *testing.T) { - p := generateComplexProject() - network, err := p.Networks().ByName("emulator") - - assert.NoError(t, err) - - assert.Equal(t, network.Host, "127.0.0.1.3569") -} - -func Test_GetAliases(t *testing.T) { - p := generateAliasesProject() - - aliases := p.AliasesForNetwork(config.EmulatorNetwork) - contracts, _ := p.DeploymentContractsByNetwork(config.EmulatorNetwork) - - assert.Len(t, aliases, 2) - assert.Equal(t, aliases[filepath.FromSlash("../hungry-kitties/cadence/contracts/FungibleToken.cdc")], "ee82856bf20e2aa6") - assert.Len(t, contracts, 1) - assert.Equal(t, contracts[0].Name, "NonFungibleToken") -} - -func Test_GetAliasesComplex(t *testing.T) { - p := generateAliasesComplexProject() - - aEmulator := p.AliasesForNetwork(config.EmulatorNetwork) - cEmulator, _ := p.DeploymentContractsByNetwork(config.EmulatorNetwork) - - aTestnet := p.AliasesForNetwork(config.TestnetNetwork) - cTestnet, _ := p.DeploymentContractsByNetwork(config.TestnetNetwork) - - assert.Len(t, cEmulator, 1) - assert.Equal(t, cEmulator[0].Name, "NonFungibleToken") - - assert.Len(t, aEmulator, 4) - assert.Equal(t, aEmulator[filepath.FromSlash("../hungry-kitties/cadence/contracts/FungibleToken.cdc")], "ee82856bf20e2aa6") - assert.Equal(t, aEmulator[filepath.FromSlash("../hungry-kitties/cadence/contracts/Kibble.cdc")], "ee82856bf20e2aa6") - - assert.Len(t, aTestnet, 2) - assert.Equal(t, aTestnet[filepath.FromSlash("../hungry-kitties/cadence/contracts/Kibble.cdc")], "ee82856bf20e2aa6") - - assert.Len(t, cTestnet, 2) - assert.Equal(t, cTestnet[0].Name, "NonFungibleToken") - assert.Equal(t, cTestnet[1].Name, "FungibleToken") -} - -func Test_ChangingState(t *testing.T) { - p := generateSimpleProject() - - em, err := p.EmulatorServiceAccount() - assert.NoError(t, err) - - em.Name = "foo" - em.Address = flow.HexToAddress("0x1") - - pk, _ := crypto.GeneratePrivateKey( - crypto.ECDSA_P256, - []byte("seedseedseedseedseedseedseedseedseedseedseedseed"), - ) - key := accounts.NewHexKeyFromPrivateKey(em.Key.Index(), em.Key.HashAlgo(), pk) - em.Key = key - - foo, err := p.Accounts().ByName("foo") - assert.NoError(t, err) - assert.NotNil(t, foo) - assert.Equal(t, foo.Name, "foo") - assert.Equal(t, foo.Address, flow.HexToAddress("0x1")) - - pkey, err := foo.Key.PrivateKey() - assert.NoError(t, err) - assert.Equal(t, (*pkey).String(), pk.String()) - - bar, err := p.Accounts().ByName("foo") - assert.NoError(t, err) - bar.Name = "zoo" - zoo, err := p.Accounts().ByName("zoo") - assert.NotNil(t, zoo) - assert.NoError(t, err) - - a := accounts.Account{} - a.Name = "bobo" - p.Accounts().AddOrUpdate(&a) - bobo, err := p.Accounts().ByName("bobo") - assert.NotNil(t, bobo) - assert.NoError(t, err) - - zoo2, _ := p.Accounts().ByName("zoo") - zoo2.Name = "emulator-account" - assert.Equal(t, "emulator-account", zoo2.Name) - - pk, _ = crypto.GeneratePrivateKey( - crypto.ECDSA_P256, - []byte("seedseedseedseedseedseedseedseedseed123seedseedseed123"), - ) - - p.SetEmulatorKey(pk) - em, _ = p.EmulatorServiceAccount() - pkey, err = em.Key.PrivateKey() - assert.NoError(t, err) - assert.Equal(t, (*pkey).String(), pk.String()) -} - -func Test_LoadState(t *testing.T) { - b := []byte(`{ - "accounts": { - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "21c5dfdeb0ff03a7a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7" - } - } - }`) - - af := afero.Afero{Fs: afero.NewMemMapFs()} - err := afero.WriteFile(af.Fs, "flow.json", b, 0644) - assert.NoError(t, err) - - paths := []string{"flow.json"} - state, err := Load(paths, af) - assert.NoError(t, err) - - acc, err := state.Accounts().ByName("emulator-account") - assert.NoError(t, err) - assert.Equal(t, acc.Name, "emulator-account") -} - -func Test_LoadStateMultiple(t *testing.T) { - b := []byte(`{ - "accounts": { - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "21c5dfdeb0ff0347a73ef39788563b62c89adea67bbb21ab95e5f710bd1d40b7" - }, - "charlie": { - "address": "0xf3fcd2c1a78f5eee", - "key": "9463ceedf08627108ea0b394c96b18446d1370e7332c91ce332aba1594096ba0" - }, - "bob": { - "address": "179b6b1cb6755e31", - "key": "748d21a762aa192976f4d264afe26379b8a63f5d1343773f813a37d4262b9f52" - } - } - }`) - - a := []byte(`{ - "accounts": { - "alice": { - "address": "179b6b1cb6755e31", - "key": "728d21a7622a29d976f4d264afe26379b8a63f5d1343773f813a37d4262b9f52" - }, - "charlie": { - "address": "0xe03daebed8ca0615", - "key": "9463ceedf04427208ea0b394c96b18446d1370e7332c91ce332aba1594096ba0" - } - } - }`) - - af := afero.Afero{Fs: afero.NewMemMapFs()} - err := afero.WriteFile(af.Fs, "flow.json", b, 0644) - assert.NoError(t, err) - err = afero.WriteFile(af.Fs, "a.json", a, 0644) - assert.NoError(t, err) - - paths := []string{"flow.json", "a.json"} - state, err := Load(paths, af) - assert.NoError(t, err) - - acc, err := state.Accounts().ByName("emulator-account") - assert.NoError(t, err) - assert.Equal(t, acc.Address.String(), "f8d6e0586b0a20c7") - - acc, err = state.Accounts().ByName("charlie") - assert.NoError(t, err) - assert.Equal(t, acc.Address.String(), "e03daebed8ca0615") - - acc, err = state.Accounts().ByName("bob") - assert.NoError(t, err) - assert.Equal(t, acc.Address.String(), "179b6b1cb6755e31") - - acc, err = state.Accounts().ByName("alice") - assert.NoError(t, err) - assert.Equal(t, acc.Address.String(), "179b6b1cb6755e31") -} - -func Test_Saving(t *testing.T) { - s := generateSimpleProject() - - err := s.SaveEdited([]string{"a.json", "b.json"}) - assert.EqualError(t, err, "specifying multiple paths is not supported when updating configuration") - - err = s.SaveEdited([]string{config.GlobalPath(), config.DefaultPath}) - assert.EqualError(t, err, "default configuration not found, please initialize it first or specify another configuration file") - - err = s.SaveEdited([]string{"a.json"}) - assert.NoError(t, err) - - _ = afero.WriteFile(af.Fs, config.DefaultPath, []byte(`{ - "networks": { - "foo": "localhost:3000" - } - }`), 0644) - - err = s.SaveEdited([]string{config.GlobalPath(), config.DefaultPath}) - assert.NoError(t, err) -} - -// ensures that default emulator values are in config when no emulator is defined in flow.json -func Test_DefaultEmulatorNotPresentInConfig(t *testing.T) { - configJson := []byte(`{ - "contracts": {}, - "accounts": { - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "dd72967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47" - } - }, - "networks": { - "emulator": "127.0.0.1.3569" - }, - "deployments": { - } - }`) - cfg := config.Config{ - Emulators: config.Emulators{{ - Name: "default", - Port: 3569, - ServiceAccount: "emulator-account", - }}, - Contracts: config.Contracts{}, - Dependencies: config.Dependencies{}, - Deployments: config.Deployments{}, - Accounts: config.Accounts{{ - Name: "emulator-account", - Address: flow.ServiceAddress(flow.Emulator), - Key: config.AccountKey{ - Type: config.KeyTypeHex, - Index: 0, - SigAlgo: crypto.ECDSA_P256, - HashAlgo: crypto.SHA3_256, - PrivateKey: keys()[0], - }, - }}, - Networks: config.Networks{{ - Name: "emulator", - Host: "127.0.0.1.3569", - }}, - } - af := afero.Afero{Fs: afero.NewMemMapFs()} - err := afero.WriteFile(af.Fs, "flow.json", configJson, 0644) - assert.NoError(t, err) - paths := []string{"flow.json"} - state, err := Load(paths, af) - assert.Equal(t, state.conf, &cfg) - assert.NoError(t, err) -} - -// ensures that default emulator values are not in config when no emulator is defined in flow.json -func Test_DefaultEmulatorWithoutEmulatorAccountInConfig(t *testing.T) { - configJson := []byte(`{ - "contracts": {}, - "accounts": { - "testnet-account": { - "address": "1e82856bf20e2aa6", - "key": "388e3fbdc654b765942610679bb3a66b74212149ab9482187067ee116d9a8118" - } - }, - "networks": { - "emulator": "127.0.0.1.3569" - }, - "deployments": { - } - }`) - af := afero.Afero{Fs: afero.NewMemMapFs()} - err := afero.WriteFile(af.Fs, "flow.json", configJson, 0644) - assert.NoError(t, err) - paths := []string{"flow.json"} - state, _ := Load(paths, af) - assert.Equal(t, config.Emulators{}, state.conf.Emulators) -} - -// ensures that default emulator values are in config when emulator is defined in flow.json -func Test_DefaultEmulatorWithEmulatorAccountInConfig(t *testing.T) { - configJson := []byte(`{ - "contracts": {}, - "accounts": { - "testnet-account": { - "address": "1e82856bf20e2aa6", - "key": "388e3fbdc654b765942610679bb3a66b74212149ab9482187067ee116d9a8118" - }, - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "dd72967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47" - } - }, - "networks": { - "emulator": "127.0.0.1.3569" - }, - "deployments": { - } - }`) - af := afero.Afero{Fs: afero.NewMemMapFs()} - err := afero.WriteFile(af.Fs, "flow.json", configJson, 0644) - assert.NoError(t, err) - paths := []string{"flow.json"} - state, _ := Load(paths, af) - assert.Len(t, state.conf.Emulators, 1) - assert.Equal(t, state.conf.Emulators, config.DefaultEmulators) -} - -// backward compatibility test to ensure that default emulator values are still observed in flow.json -func Test_DefaultEmulatorPresentInConfig(t *testing.T) { - configJson := []byte(`{ - "contracts": {}, - "emulators": { - "default": { - "port": 3569, - "serviceAccount": "emulator-account" - } - }, - "accounts": { - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "dd72967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47" - } - }, - "networks": { - "emulator": "127.0.0.1.3569" - }, - "deployments": { - } - }`) - cfg := config.Config{ - Emulators: config.Emulators{{ - Name: "default", - Port: 3569, - ServiceAccount: "emulator-account", - }}, - Contracts: config.Contracts{}, - Dependencies: config.Dependencies{}, - Deployments: config.Deployments{}, - Accounts: config.Accounts{{ - Name: "emulator-account", - Address: flow.ServiceAddress(flow.Emulator), - Key: config.AccountKey{ - Type: config.KeyTypeHex, - Index: 0, - SigAlgo: crypto.ECDSA_P256, - HashAlgo: crypto.SHA3_256, - PrivateKey: keys()[0], - }, - }}, - Networks: config.Networks{{ - Name: "emulator", - Host: "127.0.0.1.3569", - }}, - } - af := afero.Afero{Fs: afero.NewMemMapFs()} - err := afero.WriteFile(af.Fs, "flow.json", configJson, 0644) - assert.NoError(t, err) - paths := []string{"flow.json"} - state, err := Load(paths, af) - assert.Equal(t, 1, len(state.conf.Emulators)) - assert.Equal(t, state.conf, &cfg) - assert.NoError(t, err) -} - -// ensures that custom emulator values are still observed in flow.json -func Test_CustomEmulatorValuesInConfig(t *testing.T) { - configJson := []byte(`{ - "contracts": {}, - "emulators": { - "custom-emulator": { - "port": 2000, - "serviceAccount": "emulator-account" - } - }, - "accounts": { - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "dd72967fd2bd75234ae9037dd4694c1f00baad63a10c35172bf65fbb8ad74b47" - } - }, - "networks": { - "emulator": "127.0.0.1.3569" - }, - "deployments": { - } - }`) - cfg := config.Config{ - Emulators: config.Emulators{{ - Name: "custom-emulator", - Port: 2000, - ServiceAccount: "emulator-account", - }}, - Contracts: config.Contracts{}, - Dependencies: config.Dependencies{}, - Deployments: config.Deployments{}, - Accounts: config.Accounts{{ - Name: "emulator-account", - Address: flow.ServiceAddress(flow.Emulator), - Key: config.AccountKey{ - Type: config.KeyTypeHex, - Index: 0, - SigAlgo: crypto.ECDSA_P256, - HashAlgo: crypto.SHA3_256, - PrivateKey: keys()[0], - }, - }}, - Networks: config.Networks{{ - Name: "emulator", - Host: "127.0.0.1.3569", - }}, - } - af := afero.Afero{Fs: afero.NewMemMapFs()} - err := afero.WriteFile(af.Fs, "flow.json", configJson, 0644) - assert.NoError(t, err) - paths := []string{"flow.json"} - state, err := Load(paths, af) - assert.Equal(t, "custom-emulator", state.conf.Emulators[0].Name) - assert.Equal(t, 1, len(state.conf.Emulators)) - assert.Equal(t, state.conf, &cfg) - assert.NoError(t, err) -} diff --git a/flowkit/tests/resources.go b/flowkit/tests/resources.go deleted file mode 100644 index e7aae37f2..000000000 --- a/flowkit/tests/resources.go +++ /dev/null @@ -1,661 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package tests - -import ( - "fmt" - - "github.com/onflow/cadence" - "github.com/onflow/cadence/runtime/common" - "github.com/onflow/flow-go-sdk" - "github.com/onflow/flow-go-sdk/crypto" - "github.com/onflow/flow-go-sdk/test" - "github.com/spf13/afero" -) - -type Resource struct { - Name string - Filename string - Source []byte -} - -var ContractHelloString = Resource{ - Name: "Hello", - Filename: "contractHello.cdc", - Source: []byte(` - access(all) contract Hello { - access(all) let greeting: String - init() { - self.greeting = "Hello, World!" - } - access(all) fun hello(): String { - return self.greeting - } - } - `), -} - -var ContractSimple = Resource{ - Name: "Simple", - Filename: "contractSimple.cdc", - Source: []byte(` - access(all) contract Simple {} - `), -} - -var ContractSimpleUpdated = Resource{ - Name: "Simple", - Filename: "contractSimpleUpdated.cdc", - Source: []byte(` - access(all) contract Simple { - access(all) fun newFunc() {} - } - `), -} - -var ContractSimpleWithArgs = Resource{ - Name: "Simple", - Filename: "contractArgs.cdc", - Source: []byte(` - access(all) contract Simple { - access(all) let id: UInt64 - init(initId: UInt64) { - self.id = initId - } - } - `), -} - -var ContractEvents = Resource{ - Name: "ContractEvents", - Filename: "contractEvents.cdc", - Source: []byte(` - access(all) contract ContractEvents { - access(all) struct S { - access(all) var x: Int - access(all) var y: String - - init(x: Int, y: String) { - self.x = x - self.y = y - } - } - - access(all) event EventA(x: Int) - access(all) event EventB(x: Int, y: Int) - access(all) event EventC(x: UInt8) - access(all) event EventD(x: String) - access(all) event EventE(x: UFix64) - access(all) event EventF(x: Address) - access(all) event EventG(x: [UInt8]) - access(all) event EventH(x: [[UInt8]]) - access(all) event EventI(x: {String: Int}) - access(all) event EventJ(x: S) - - init() { - emit EventA(x: 1) - emit EventB(x: 4, y: 2) - emit EventC(x: 1) - emit EventD(x: "hello") - emit EventE(x: 10.2) - emit EventF(x: 0x436164656E636521) - emit EventG(x: "hello".utf8) - emit EventH(x: ["hello".utf8, "world".utf8]) - emit EventI(x: { "hello": 1337 }) - emit EventJ(x: S(x: 1, y: "hello world")) - } - } - `), -} - -var ContractA = Resource{ - Name: "ContractA", - Filename: "contractA.cdc", - Source: []byte(`access(all) contract ContractA {}`), -} - -var ContractB = Resource{ - Name: "ContractB", - Filename: "contractB.cdc", - Source: []byte(` - import ContractA from "./contractA.cdc" - access(all) contract ContractB {} - `), -} - -var ContractC = Resource{ - Name: "ContractC", - Filename: "contractC.cdc", - Source: []byte(` - import ContractB from "./contractB.cdc" - import ContractA from "./contractA.cdc" - - access(all) contract ContractC { - access(all) let x: String - init(x: String) { - self.x = x - } - } - `), -} - -var ContractFooCoverage = Resource{ - Name: "FooContract", - Filename: "FooContract.cdc", - Source: []byte(` - access(all) contract FooContract { - access(all) let specialNumbers: {Int: String} - - init() { - self.specialNumbers = { - 1729: "Harshad", - 8128: "Harmonic", - 41041: "Carmichael" - } - } - - access(all) fun addSpecialNumber(_ n: Int, _ trait: String) { - self.specialNumbers[n] = trait - } - - access(all) fun getIntegerTrait(_ n: Int): String { - if n < 0 { - return "Negative" - } else if n == 0 { - return "Zero" - } else if n < 10 { - return "Small" - } else if n < 100 { - return "Big" - } else if n < 1000 { - return "Huge" - } - - if self.specialNumbers.containsKey(n) { - return self.specialNumbers[n]! - } - - return "Enormous" - } - } - `), -} - -var ContractAA = Resource{ - Name: "ContractAA", - Filename: "contractAA.cdc", - Source: []byte(`access(all) contract ContractAA {}`), -} - -var ContractBB = Resource{ - Name: "ContractBB", - Filename: "contractBB.cdc", - Source: []byte(` - import "ContractAA" - access(all) contract ContractB {} - `), -} - -var ContractCC = Resource{ - Name: "ContractCC", - Filename: "contractCC.cdc", - Source: []byte(` - import "ContractBB" - import "ContractAA" - - access(all) contract ContractC { - access(all) let x: String - init(x: String) { - self.x = x - } - } - `), -} - -var TransactionArgString = Resource{ - Filename: "transactionArg.cdc", - Source: []byte(` - transaction(greeting: String) { - let guest: Address - - prepare(authorizer: &Account) { - self.guest = authorizer.address - } - - execute { - log(greeting.concat(",").concat(self.guest.toString())) - } - } - `), -} - -var TransactionImports = Resource{ - Filename: "transactionImport.cdc", - Source: []byte(` - import Hello from "./contractHello.cdc" - - transaction() { - prepare(authorizer: &Account) {} - execute { - Hello.hello() - } - } - `), -} - -var TransactionSimple = Resource{ - Filename: "transactionSimple.cdc", - Source: []byte(` - transaction() { } - `), -} - -var TransactionSingleAuth = Resource{ - Filename: "transactionAuth1.cdc", - Source: []byte(` - transaction() { - prepare(authorizer: &Account) {} - } - `), -} - -var TransactionTwoAuth = Resource{ - Filename: "transactionAuth2.cdc", - Source: []byte(` - transaction() { - prepare(auth1: &Account, auth2: &Account) {} - } - `), -} - -var TransactionMultipleDeclarations = Resource{ - Filename: "transactionMultipleDec.cdc", - Source: []byte(` - access(all) fun dummy(_ address: Address): Void {} - - transaction() { - prepare(authorizer: &Account) {} - } - `), -} - -var ScriptWithError = Resource{ - Filename: "scriptError.cdc", - Source: []byte(` - access(all) fun main(name: String): Strin { - return "Hello ".concat(name) - } - `), -} - -var ScriptArgString = Resource{ - Filename: "scriptArg.cdc", - Source: []byte(` - access(all) fun main(name: String): String { - return "Hello ".concat(name) - } - `), -} - -var ScriptImport = Resource{ - Filename: "scriptImport.cdc", - Source: []byte(` - import Hello from "./contractHello.cdc" - - access(all) fun main(): String { - return "Hello ".concat(Hello.greeting) - } - `), -} - -var HelperImport = Resource{ - Filename: "test_helpers.cdc", - Source: []byte(` - access(all) fun double(_ x: Int): Int { - return x * 2 - } - `), -} - -var TestScriptSimple = Resource{ - Filename: "./testScriptSimple.cdc", - Source: []byte(` - import Test - - access(all) fun testSimple() { - Test.assert(true) - } - `), -} - -var TestScriptSimpleFailing = Resource{ - Filename: "./testScriptSimpleFailing.cdc", - Source: []byte(` - import Test - - access(all) fun testSimple() { - Test.assert(false) - } - `), -} - -var TestScriptWithImport = Resource{ - Filename: "testScriptWithImport.cdc", - Source: []byte(` - import Test - import "Hello" - - access(all) fun setup() { - let err = Test.deployContract( - name: "Hello", - path: "contractHello.cdc", - arguments: [] - ) - Test.expect(err, Test.beNil()) - } - - access(all) fun testSimple() { - Test.assertEqual("Hello, World!", Hello.greeting) - } - `), -} - -var TestScriptWithMissingContract = Resource{ - Filename: "testScriptWithImport.cdc", - Source: []byte(` - import Test - import "ApprovalVoting" - - access(all) fun setup() { - let err = Test.deployContract( - name: "ApprovalVoting", - path: "ApprovalVoting.cdc", - arguments: [] - ) - Test.expect(err, Test.beNil()) - } - `), -} - -var TestScriptWithHelperImport = Resource{ - Filename: "testScriptWithHelperImport.cdc", - Source: []byte(` - import Test - import "test_helpers.cdc" - - access(all) fun testDouble() { - Test.expect(double(2), Test.equal(4)) - } - `), -} - -var TestScriptWithRelativeImports = Resource{ - Filename: "testScriptWithRelativeImport.cdc", - Source: []byte(` - import Test - import FooContract from "../contracts/FooContract.cdc" - import Hello from "../contracts/contractHello.cdc" - - access(all) fun setup() { - var err = Test.deployContract( - name: "FooContract", - path: "../contracts/FooContract.cdc", - arguments: [] - ) - Test.expect(err, Test.beNil()) - - err = Test.deployContract( - name: "Hello", - path: "../contracts/contractHello.cdc", - arguments: [] - ) - Test.expect(err, Test.beNil()) - } - - access(all) fun testSimple() { - Test.assertEqual("Enormous", FooContract.getIntegerTrait(100001)) - Test.assertEqual("Hello, World!", Hello.greeting) - } - `), -} - -var TestScriptWithFileRead = Resource{ - Filename: "testScriptWithFileRead.cdc", - Source: []byte(` - import Test - - access(all) fun testSimple() { - let content = Test.readFile("./someFile.cdc") - Test.assertEqual("This was read from a file!", content) - } - `), -} - -var TestScriptWithCoverage = Resource{ - Filename: "testScriptWithCoverage.cdc", - Source: []byte(` - import Test - import "FooContract" - - - access(all) fun setup() { - let err = Test.deployContract( - name: "FooContract", - path: "FooContract.cdc", - arguments: [] - ) - - Test.expect(err, Test.beNil()) - } - - access(all) fun testGetIntegerTrait() { - // Arrange - let testInputs: {Int: String} = { - -1: "Negative", - 0: "Zero", - 9: "Small", - 99: "Big", - 999: "Huge", - 1001: "Enormous", - 1729: "Harshad", - 8128: "Harmonic", - 41041: "Carmichael" - } - - for input in testInputs.keys { - // Act - let result = FooContract.getIntegerTrait(input) - - // Assert - Test.assertEqual(testInputs[input]!, result) - } - } - - access(all) fun testAddSpecialNumber() { - // Act - FooContract.addSpecialNumber(78557, "Sierpinski") - - // Assert - Test.assertEqual(FooContract.getIntegerTrait(78557), "Sierpinski") - } - `), -} - -var SomeFile = Resource{ - Filename: "someFile.cdc", - Source: []byte(`This was read from a file!`), -} - -var resources = []Resource{ - ContractHelloString, - TransactionArgString, - ScriptArgString, - TestScriptSimple, - ContractSimple, - ContractSimpleWithArgs, - ContractSimpleUpdated, - TransactionSimple, - ScriptImport, - HelperImport, - ContractA, - ContractB, - ContractC, - ContractAA, - ContractBB, - ContractCC, - ContractFooCoverage, -} - -func ReaderWriter() (afero.Afero, afero.Fs) { - var mockFS = afero.NewMemMapFs() - - for _, c := range resources { - _ = afero.WriteFile(mockFS, c.Filename, c.Source, 0644) - } - - return afero.Afero{Fs: mockFS}, mockFS -} - -func PubKeys() []crypto.PublicKey { - var pubKeys []crypto.PublicKey - privKeys := PrivKeys() - for _, priv := range privKeys { - pubKeys = append(pubKeys, priv.PublicKey()) - } - return pubKeys -} - -func PrivKeys() []crypto.PrivateKey { - var privKeys []crypto.PrivateKey - for x := 0; x < 5; x++ { - pk, _ := crypto.GeneratePrivateKey( - crypto.ECDSA_P256, - []byte(fmt.Sprintf("seedseedseedseedseedseedseedseedseedseedseedseed%d", x)), - ) - privKeys = append(privKeys, pk) - } - return privKeys -} - -func SigAlgos() []crypto.SignatureAlgorithm { - var sigAlgos []crypto.SignatureAlgorithm - privKeys := PrivKeys() - for _, priv := range privKeys { - sigAlgos = append(sigAlgos, priv.Algorithm()) - } - return sigAlgos -} - -func HashAlgos() []crypto.HashAlgorithm { - var hashAlgos []crypto.HashAlgorithm - for x := 0; x < 5; x++ { - hashAlgos = append(hashAlgos, crypto.SHA3_256) - } - return hashAlgos -} - -var accounts = test.AccountGenerator() - -var transactions = test.TransactionGenerator() - -var transactionResults = test.TransactionResultGenerator() - -func NewAccountWithAddress(address string) *flow.Account { - account := accounts.New() - account.Address = flow.HexToAddress(address) - return account -} - -func NewAccountWithContracts(address string, contracts ...Resource) *flow.Account { - account := accounts.New() - account.Address = flow.HexToAddress(address) - - if account.Contracts == nil { - account.Contracts = make(map[string][]byte) - } - - for _, contract := range contracts { - account.Contracts[contract.Name] = contract.Source - } - - return account -} - -func NewTransaction() *flow.Transaction { - return transactions.New() -} - -func NewBlock() *flow.Block { - return test.BlockGenerator().New() -} - -func NewCollection() *flow.Collection { - return test.CollectionGenerator().New() -} - -func NewEvent(index int, eventId string, fields []cadence.Field, values []cadence.Value) *flow.Event { - testEventType := &cadence.EventType{ - Location: nil, - QualifiedIdentifier: eventId, - Fields: fields, - } - - testEvent := cadence. - NewEvent(values). - WithType(testEventType) - - event := flow.Event{ - Type: eventId, - TransactionID: flow.Identifier{}, - TransactionIndex: index, - EventIndex: index, - Value: testEvent, - } - - return &event -} - -func NewTransactionResult(events []flow.Event) *flow.TransactionResult { - res := transactionResults.New() - res.Events = events - res.Error = nil - - return &res -} - -func NewAccountCreateResult(address flow.Address) *flow.TransactionResult { - events := []flow.Event{{ - Type: flow.EventAccountCreated, - TransactionID: flow.Identifier{}, - TransactionIndex: 0, - EventIndex: 0, - Value: cadence.Event{ - EventType: cadence.NewEventType(common.NewStringLocation(nil, flow.EventAccountCreated), "", []cadence.Field{{ - Identifier: "address", - Type: cadence.AddressType, - }}, nil), - Fields: []cadence.Value{ - cadence.NewAddress(address), - }, - }, - Payload: nil, - }} - - return NewTransactionResult(events) -} diff --git a/flowkit/tests/testnet_test.go b/flowkit/tests/testnet_test.go deleted file mode 100644 index ba88796bf..000000000 --- a/flowkit/tests/testnet_test.go +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package tests - -import ( - "context" - "testing" - - accounts2 "github.com/onflow/flow-cli/flowkit/accounts" - transactions2 "github.com/onflow/flow-cli/flowkit/transactions" - - "github.com/onflow/cadence" - flowsdk "github.com/onflow/flow-go-sdk" - "github.com/onflow/flow-go-sdk/crypto" - "github.com/spf13/afero" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/onflow/flow-cli/flowkit" - "github.com/onflow/flow-cli/flowkit/config" - "github.com/onflow/flow-cli/flowkit/gateway" - "github.com/onflow/flow-cli/flowkit/output" -) - -const testAccountName = "test-account" - -func initTestnet(t *testing.T) (gateway.Gateway, *flowkit.State, flowkit.Services, flowkit.ReaderWriter, afero.Fs) { - readerWriter, mockFs := ReaderWriter() - - state, err := flowkit.Init(readerWriter, crypto.ECDSA_P256, crypto.SHA3_256) - require.NoError(t, err) - - gw, err := gateway.NewGrpcGateway(config.TestnetNetwork) - require.NoError(t, err) - - logger := output.NewStdoutLogger(output.NoneLog) - flow := flowkit.NewFlowkit(state, config.TestnetNetwork, gw, logger) - - key, err := crypto.DecodePrivateKeyHex(crypto.ECDSA_P256, "4b2b6442fcbef2209bc1182af15d203a6195346cc8d95ebb433d3df1acb3910c") - require.NoError(t, err) - - funderKey := accounts2.NewHexKeyFromPrivateKey(0, crypto.SHA3_256, key) - funder := &accounts2.Account{ - Name: "funder", - Address: flowsdk.HexToAddress("0x72ddb3d2cec14114"), - Key: funderKey, - } - - testKey, err := flow.GenerateKey(context.Background(), crypto.ECDSA_P256, "") - require.NoError(t, err) - - flowAccount, _, err := flow.CreateAccount( - context.Background(), - funder, - []accounts2.PublicKey{{ - Public: testKey.PublicKey(), - Weight: 1000, - SigAlgo: crypto.ECDSA_P256, - HashAlgo: crypto.SHA3_256, - }}, - ) - require.NoError(t, err) - - testAccount := &accounts2.Account{ - Name: testAccountName, - Address: flowAccount.Address, - Key: accounts2.NewHexKeyFromPrivateKey(0, crypto.SHA3_256, testKey), - } - state.Accounts().AddOrUpdate(testAccount) - - // fund the account - // TODO(sideninja) refactor core contracts lib to offer the template - transferTx := []byte(` - import FungibleToken from 0x9a0766d93b6608b7 - import FlowToken from 0x7e60df042a9c0868 - - transaction(amount: UFix64, to: Address) { - - // The Vault resource that holds the tokens that are being transferred - let sentVault: @FungibleToken.Vault - - prepare(signer: auth(BorrowValue) &Account) { - - // Get a reference to the signer's stored vault - let vaultRef = signer.storage.borrow(from: /storage/flowTokenVault) - ?? panic("Could not borrow reference to the owner's Vault!") - - // Withdraw tokens from the signer's stored vault - self.sentVault <- vaultRef.withdraw(amount: amount) - } - - execute { - - // Get a reference to the recipient's Receiver - let receiverRef = getAccount(to) - .capabilities..borrow<&{FungibleToken.Receiver}>(/public/flowTokenReceiver) - ?? panic("Could not borrow receiver reference to the recipient's Vault") - - // Deposit the withdrawn tokens in the recipient's receiver - receiverRef.deposit(from: <-self.sentVault) - } - }`) - - amount, _ := cadence.NewUFix64("0.01") - _, _, err = flow.SendTransaction( - context.Background(), - transactions2.SingleAccountRole(*funder), - flowkit.Script{ - Code: transferTx, - Args: []cadence.Value{amount, cadence.NewAddress(testAccount.Address)}, - }, - flowsdk.DefaultTransactionGasLimit, - ) - require.NoError(t, err) - - return gw, state, flow, readerWriter, mockFs -} - -var testnet = config.TestnetNetwork.Name - -func Test_Foo(t *testing.T) { - - // This test relies on a contract deployed on testnet, - // written in old cadence version, which no longer valid. - // TODO: enable once the testnet contract is updated. - t.SkipNow() - - _, st, _, rw, _ := initTestnet(t) - - rw.WriteFile("test", []byte("foo"), 0644) - - out, _ := rw.ReadFile("test") - assert.Equal(t, out, []byte("foo")) - - rw.WriteFile("test", []byte("bar"), 0644) - out, _ = st.ReadFile("test") - assert.Equal(t, out, []byte("bar")) -} - -func Test_Testnet_ProjectDeploy(t *testing.T) { - - // This test relies on a contract deployed on testnet, - // written in old cadence version, which no longer valid. - // TODO: enable once the testnet contract is updated. - t.SkipNow() - - _, state, flow, rw, _ := initTestnet(t) - - state.Contracts().AddOrUpdate(config.Contract{ - Name: ContractA.Name, - Location: ContractA.Filename, - }) - - state.Contracts().AddOrUpdate(config.Contract{ - Name: ContractB.Name, - Location: ContractB.Filename, - }) - - state.Contracts().AddOrUpdate(config.Contract{ - Name: ContractC.Name, - Location: ContractC.Filename, - }) - - initArg, _ := cadence.NewString("foo") - state.Deployments().AddOrUpdate(config.Deployment{ - Network: testnet, - Account: testAccountName, - Contracts: []config.ContractDeployment{ - {Name: ContractA.Name}, - {Name: ContractB.Name}, - {Name: ContractC.Name, Args: []cadence.Value{initArg}}, - }, - }) - - contracts, err := flow.DeployProject(context.Background(), flowkit.UpdateExistingContract(false)) - assert.NoError(t, err) - assert.Len(t, contracts, 3) - assert.Equal(t, ContractA.Name, contracts[0].Name) - assert.Equal(t, ContractB.Name, contracts[1].Name) - assert.Equal(t, ContractC.Name, contracts[2].Name) - - // make a change - updated := []byte(` - import "ContractA" - access(all) contract ContractB { - access(all) init() {} - } - `) - ContractB.Source = updated - err = rw.WriteFile(ContractB.Filename, ContractB.Source, 0644) - require.NoError(t, err) - - contracts, err = flow.DeployProject(context.Background(), flowkit.UpdateExistingContract(true)) - assert.NoError(t, err) - assert.Len(t, contracts, 3) - assert.Equal(t, ContractA.Name, contracts[0].Name) - assert.Equal(t, ContractB.Name, contracts[1].Name) - assert.Equal(t, ContractB.Source, updated) - assert.Equal(t, ContractC.Name, contracts[2].Name) -} diff --git a/flowkit/transactions/transaction.go b/flowkit/transactions/transaction.go deleted file mode 100644 index 300d08c55..000000000 --- a/flowkit/transactions/transaction.go +++ /dev/null @@ -1,426 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package transactions - -import ( - "context" - "encoding/hex" - "fmt" - - "github.com/onflow/cadence" - jsoncdc "github.com/onflow/cadence/encoding/json" - "github.com/onflow/cadence/runtime/ast" - "github.com/onflow/cadence/runtime/parser" - "github.com/onflow/flow-go-sdk" - "github.com/onflow/flow-go-sdk/templates" - - "github.com/onflow/flow-cli/flowkit/accounts" -) - -// New create new instance of transaction. -func New() *Transaction { - return &Transaction{ - tx: flow.NewTransaction(), - } -} - -// NewFromPayload build transaction from payload. -func NewFromPayload(payload []byte) (*Transaction, error) { - partialTxBytes, err := hex.DecodeString(string(payload)) - if err != nil { - return nil, fmt.Errorf("failed to decode partial transaction from %s: %v", payload, err) - } - - decodedTx, err := flow.DecodeTransaction(partialTxBytes) - if err != nil { - return nil, fmt.Errorf("failed to decode transaction from %s: %v", payload, err) - } - - tx := &Transaction{ - tx: decodedTx, - } - - return tx, nil -} - -// NewUpdateAccountContract update account contract. -func NewUpdateAccountContract(signer *accounts.Account, name string, source []byte) (*Transaction, error) { - contract := templates.Contract{ - Name: name, - Source: string(source), - } - - return newFromTemplate( - templates.UpdateAccountContract(signer.Address, contract), - signer, - ) -} - -// NewAddAccountContract add new contract to the account. -func NewAddAccountContract( - signer *accounts.Account, - name string, - source []byte, - args []cadence.Value, -) (*Transaction, error) { - return addAccountContractWithArgs(signer, templates.Contract{ - Name: name, - Source: string(source), - }, args) -} - -// NewRemoveAccountContract creates new transaction to remove contract. -func NewRemoveAccountContract(signer *accounts.Account, name string) (*Transaction, error) { - return newFromTemplate( - templates.RemoveAccountContract(signer.Address, name), - signer, - ) -} - -// addAccountContractWithArgs contains logic to build a transaction and include the contract code -// as well as possible init arguments. -func addAccountContractWithArgs( - signer *accounts.Account, - contract templates.Contract, - args []cadence.Value, -) (*Transaction, error) { - // define the add contract transaction template, note that the transaction has possibility - // of multiple arguments with the last %s which is extended in the next step - const addAccountContractTemplate = ` - transaction(name: String, code: String %s) { - prepare(signer: auth(AddContract) &Account) { - signer.contracts.add(name: name, code: code.utf8 %s) - } - }` - - cadenceName := cadence.String(contract.Name) - cadenceCode := cadence.String(contract.Source) - - tx := flow.NewTransaction(). - AddRawArgument(jsoncdc.MustEncode(cadenceName)). - AddRawArgument(jsoncdc.MustEncode(cadenceCode)). - AddAuthorizer(signer.Address) - - for _, arg := range args { - arg.Type().ID() - tx.AddRawArgument(jsoncdc.MustEncode(arg)) - } - - // here we itterate over all arguments and possibly extend the transaction input argument - // in the above template to include them - txArgs, addArgs := "", "" - for i, arg := range args { - txArgs += fmt.Sprintf(",arg%d:%s", i, arg.Type().ID()) - addArgs += fmt.Sprintf(",arg%d", i) - } - - script := fmt.Sprintf(addAccountContractTemplate, txArgs, addArgs) - tx.SetScript([]byte(script)) - tx.SetGasLimit(flow.DefaultTransactionGasLimit) - - t := &Transaction{tx: tx} - err := t.SetSigner(signer) - if err != nil { - return nil, err - } - t.SetPayer(signer.Address) - - return t, nil -} - -// NewCreateAccount creates new transaction for account. -func NewCreateAccount( - signer *accounts.Account, - keys []*flow.AccountKey, - contracts []templates.Contract, -) (*Transaction, error) { - template, err := templates.CreateAccount(keys, contracts, signer.Address) - if err != nil { - return nil, err - } - return newFromTemplate(template, signer) -} - -func newFromTemplate(templateTx *flow.Transaction, signer *accounts.Account) (*Transaction, error) { - tx := &Transaction{tx: templateTx} - - err := tx.SetSigner(signer) - if err != nil { - return nil, err - } - tx.SetPayer(signer.Address) - tx.SetComputeLimit(flow.DefaultTransactionGasLimit) // TODO(sideninja) change this to calculated limit - - return tx, nil -} - -// Transaction builder of flow transactions. -type Transaction struct { - signer *accounts.Account - proposer *flow.Account - tx *flow.Transaction -} - -// Signer get signer. -func (t *Transaction) Signer() *accounts.Account { - return t.signer -} - -// Proposer get proposer. -func (t *Transaction) Proposer() *flow.Account { - return t.proposer -} - -// FlowTransaction get flow transaction. -func (t *Transaction) FlowTransaction() *flow.Transaction { - return t.tx -} - -func (t *Transaction) SetScriptWithArgs(script []byte, args []cadence.Value) error { - t.tx.SetScript(script) - return t.AddArguments(args) -} - -// SetSigner sets the signer for transaction. -func (t *Transaction) SetSigner(account *accounts.Account) error { - if account.Key == nil { - return fmt.Errorf("signer account missing the key") - } - - err := account.Key.Validate() - if err != nil { - return err - } - - if !t.validSigner(account.Address) { - return fmt.Errorf( - "not a valid signer %s, proposer: %s, payer: %s, authorizers: %s", - account.Address, - t.tx.ProposalKey.Address, - t.tx.Payer, - t.tx.Authorizers, - ) - } - - t.signer = account - return nil -} - -// validSigner checks whether the signer is valid for transaction -func (t *Transaction) validSigner(s flow.Address) bool { - return t.tx.ProposalKey.Address == s || - t.tx.Payer == s || - t.authorizersContains(s) -} - -// authorizersContains checks whether address is in the authorizer list -func (t *Transaction) authorizersContains(address flow.Address) bool { - for _, a := range t.tx.Authorizers { - if address == a { - return true - } - } - - return false -} - -// SetProposer sets the proposer for transaction. -func (t *Transaction) SetProposer(proposer *flow.Account, keyIndex int) error { - if len(proposer.Keys) <= keyIndex { - return fmt.Errorf("failed to retrieve proposer key at index %d", keyIndex) - } - - t.proposer = proposer - proposerKey := proposer.Keys[keyIndex] - - t.tx.SetProposalKey( - proposer.Address, - proposerKey.Index, - proposerKey.SequenceNumber, - ) - - return nil -} - -// SetPayer sets the payer for transaction. -func (t *Transaction) SetPayer(address flow.Address) *Transaction { - t.tx.SetPayer(address) - return t -} - -// SetBlockReference sets block reference for transaction. -func (t *Transaction) SetBlockReference(block *flow.Block) *Transaction { - t.tx.SetReferenceBlockID(block.ID) - return t -} - -// SetComputeLimit sets the gas limit for transaction. -func (t *Transaction) SetComputeLimit(limit uint64) *Transaction { - t.tx.SetGasLimit(limit) - return t -} - -// AddArguments add array of cadence arguments. -func (t *Transaction) AddArguments(args []cadence.Value) error { - for _, arg := range args { - err := t.AddArgument(arg) - if err != nil { - return err - } - } - - return nil -} - -// AddArgument add cadence typed argument. -func (t *Transaction) AddArgument(arg cadence.Value) error { - return t.tx.AddArgument(arg) -} - -// AddAuthorizers add group of authorizers. -func (t *Transaction) AddAuthorizers(authorizers []flow.Address) (*Transaction, error) { - program, err := parser.ParseProgram(nil, t.tx.Script, parser.Config{}) - if err != nil { - return nil, err - } - - // get authorizers param list if exists - declarations := program.TransactionDeclarations() - if len(declarations) != 1 { - return nil, fmt.Errorf("can only support one transaction declaration per file, found %d", len(declarations)) - } - - requiredAuths := make([]*ast.Parameter, 0) - // if prepare block is missing set default authorizers to empty - if declarations[0].Prepare == nil { - authorizers = nil - } else { // if prepare block is present get authorizers - requiredAuths = declarations[0]. - Prepare. - FunctionDeclaration. - ParameterList. - Parameters - } - - if len(requiredAuths) != len(authorizers) { - return nil, fmt.Errorf( - "provided authorizers length mismatch, required authorizers %d, but provided %d", - len(requiredAuths), - len(authorizers), - ) - } - - for _, authorizer := range authorizers { - t.tx.AddAuthorizer(authorizer) - } - - return t, nil -} - -// Sign signs transaction using signer account. -func (t *Transaction) Sign() (*Transaction, error) { - keyIndex := t.signer.Key.Index() - signer, err := t.signer.Key.Signer(context.Background()) - if err != nil { - return nil, err - } - - if t.shouldSignEnvelope() { - err = t.tx.SignEnvelope(t.signer.Address, keyIndex, signer) - if err != nil { - return nil, fmt.Errorf("failed to sign transaction: %s", err) - } - } else { - err = t.tx.SignPayload(t.signer.Address, keyIndex, signer) - if err != nil { - return nil, fmt.Errorf("failed to sign transaction: %s", err) - } - } - - return t, nil -} - -// shouldSignEnvelope checks if signer should sign envelope or payload -func (t *Transaction) shouldSignEnvelope() bool { - return t.signer.Address == t.tx.Payer -} - -// SingleAccountRole creates transaction accounts from a single provided -// account fulfilling all the roles (proposer, payer, authorizer). -func SingleAccountRole(account accounts.Account) AccountRoles { - return AccountRoles{ - Proposer: account, - Authorizers: []accounts.Account{account}, - Payer: account, - } -} - -// AccountRoles define all the accounts for different transaction roles. -// -// You can read more about roles here: https://developers.flow.com/learn/concepts/accounts-and-keys -type AccountRoles struct { - Proposer accounts.Account - Authorizers []accounts.Account - Payer accounts.Account -} - -// AddressRoles returns address roles using the provided accounts. -func (t AccountRoles) AddressRoles() AddressesRoles { - auths := make([]flow.Address, len(t.Authorizers)) - for i, a := range t.Authorizers { - auths[i] = a.Address - } - - return AddressesRoles{ - Proposer: t.Proposer.Address, - Authorizers: auths, - Payer: t.Payer.Address, - } -} - -// Signers for signing the transaction, detect if all accounts are same so only return the one account. -func (t AccountRoles) Signers() []*accounts.Account { - // build only unique accounts to sign, it's important payer account is last - sigs := make([]*accounts.Account, 0) - addLastIfUnique := func(signer accounts.Account) { - for _, sig := range sigs { - if sig.Address == signer.Address { - return - } - } - sigs = append(sigs, &signer) - } - - addLastIfUnique(t.Proposer) - for _, auth := range t.Authorizers { - addLastIfUnique(auth) - } - addLastIfUnique(t.Payer) - - return sigs -} - -// AddressesRoles defines transaction roles by account addresses. -// -// You can read more about roles here: https://developers.flow.com/learn/concepts/accounts-and-keys -type AddressesRoles struct { - Proposer flow.Address - Authorizers []flow.Address - Payer flow.Address -} diff --git a/flowkit/transactions/transaction_test.go b/flowkit/transactions/transaction_test.go deleted file mode 100644 index c65d10dda..000000000 --- a/flowkit/transactions/transaction_test.go +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Flow CLI - * - * Copyright 2019 Dapper Labs, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package transactions_test - -import ( - "testing" - - "github.com/onflow/cadence" - jsoncdc "github.com/onflow/cadence/encoding/json" - "github.com/onflow/flow-go-sdk" - "github.com/onflow/flow-go-sdk/crypto" - "github.com/stretchr/testify/assert" - - "github.com/onflow/flow-cli/flowkit/accounts" - "github.com/onflow/flow-cli/flowkit/tests" - "github.com/onflow/flow-cli/flowkit/transactions" -) - -func TestNew(t *testing.T) { - tx := transactions.New() - - assert.NotNil(t, tx) - assert.NotNil(t, tx.FlowTransaction()) - - computeLimit := uint64(1000) - tx.SetComputeLimit(computeLimit) - assert.Equal(t, computeLimit, tx.FlowTransaction().GasLimit) - - arg := cadence.NewInt(1) - _ = tx.AddArgument(arg) - enc, _ := jsoncdc.Encode(arg) - assert.Equal(t, string(enc), string(tx.FlowTransaction().Arguments[0])) - - payer := flow.HexToAddress("0x01") - tx.SetPayer(payer) - assert.Equal(t, payer, tx.FlowTransaction().Payer) - - script := []byte(` - transaction (arg: Int) { - prepare(signer: &Account) {} - execute {} - } - `) - err := tx.SetScriptWithArgs(script, []cadence.Value{arg}) - assert.NoError(t, err) - assert.Equal(t, script, tx.FlowTransaction().Script) - assert.Equal(t, string(enc), string(tx.FlowTransaction().Arguments[0])) - - auths := []flow.Address{flow.HexToAddress("0x02")} - tx, err = tx.AddAuthorizers(auths) - assert.NoError(t, err) - assert.Equal(t, auths, tx.FlowTransaction().Authorizers) - - addr := flow.HexToAddress("0x03") - index := 1 - proposer := tests.NewAccountWithAddress(addr.String()) - err = tx.SetProposer(proposer, index) - assert.NoError(t, err) - assert.Equal(t, addr.String(), tx.FlowTransaction().ProposalKey.Address.String()) - assert.Equal(t, proposer.Keys[index].Index, tx.FlowTransaction().ProposalKey.KeyIndex) - - sig, _ := accounts.NewEmulatorAccount(crypto.ECDSA_P256, crypto.SHA3_256) - sig.Address = flow.HexToAddress("0x01") - err = tx.SetSigner(sig) - assert.NoError(t, err) - assert.Equal(t, sig, tx.Signer()) - - signed, err := tx.Sign() - assert.NoError(t, err) - assert.Len(t, signed.FlowTransaction().EnvelopeSignatures, 1) -} diff --git a/go.mod b/go.mod index 7694a05cc..29863ca1e 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/dukex/mixpanel v1.0.1 - github.com/getsentry/sentry-go v0.26.0 + github.com/getsentry/sentry-go v0.27.0 github.com/go-git/go-git/v5 v5.11.0 github.com/gosuri/uilive v0.0.4 github.com/manifoldco/promptui v0.9.0 @@ -28,13 +28,13 @@ require ( github.com/spf13/viper v1.16.0 github.com/stretchr/testify v1.8.4 golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc - google.golang.org/grpc v1.60.1 + google.golang.org/grpc v1.61.0 ) require ( - cloud.google.com/go/compute v1.23.1 // indirect + cloud.google.com/go/compute v1.23.3 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.3 // indirect + cloud.google.com/go/iam v1.1.5 // indirect cloud.google.com/go/kms v1.15.5 // indirect dario.cat/mergo v1.0.0 // indirect github.com/DataDog/zstd v1.5.2 // indirect @@ -241,7 +241,7 @@ require ( golang.org/x/crypto v0.17.0 // indirect golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.19.0 // indirect - golang.org/x/oauth2 v0.13.0 // indirect + golang.org/x/oauth2 v0.14.0 // indirect golang.org/x/sync v0.5.0 // indirect golang.org/x/sys v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect @@ -251,9 +251,9 @@ require ( gonum.org/v1/gonum v0.13.0 // indirect google.golang.org/api v0.151.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect + google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect @@ -267,7 +267,5 @@ require ( rsc.io/tmplfunc v0.0.3 // indirect ) -replace github.com/onflow/flow-cli/flowkit => ./flowkit - // this is a woraround for the flow-go/crypto cross compliation issue replace github.com/onflow/crypto => github.com/onflow/crypto v0.24.9 diff --git a/go.sum b/go.sum index d11b0fd57..61e829eac 100644 --- a/go.sum +++ b/go.sum @@ -43,8 +43,8 @@ cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVqux cloud.google.com/go v0.110.4/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= cloud.google.com/go v0.110.6/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= cloud.google.com/go v0.110.7/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= -cloud.google.com/go v0.110.8 h1:tyNdfIxjzaWctIiLYOTalaLKZ17SI44SKFW26QbOhME= cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk= +cloud.google.com/go v0.110.10 h1:LXy9GEO+timppncPIAZoOj3l58LIU9k+kn48AN7IO3Y= cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E= @@ -255,8 +255,9 @@ cloud.google.com/go/compute v1.19.3/go.mod h1:qxvISKp/gYnXkSAD1ppcSOveRAmzxicEv/ cloud.google.com/go/compute v1.20.1/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute v1.21.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= -cloud.google.com/go/compute v1.23.1 h1:V97tBoDaZHb6leicZ1G6DLK2BAaZLJ/7+9BB/En3hR0= cloud.google.com/go/compute v1.23.1/go.mod h1:CqB3xpmPKKt3OJpW2ndFIXnA9A4xAy/F3Xp1ixncW78= +cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= +cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= @@ -486,8 +487,9 @@ cloud.google.com/go/iam v1.0.1/go.mod h1:yR3tmSL8BcZB4bxByRv2jkSIahVmCtfKZwLYGBa cloud.google.com/go/iam v1.1.0/go.mod h1:nxdHjaKfCr7fNYx/HJMM8LgiMugmveWlkatear5gVyk= cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= cloud.google.com/go/iam v1.1.2/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= -cloud.google.com/go/iam v1.1.3 h1:18tKG7DzydKWUnLjonWcJO6wjSCAtzh4GcRKlH/Hrzc= cloud.google.com/go/iam v1.1.3/go.mod h1:3khUlaBXfPKKe7huYgEpDn6FtgRyMEqbkvBxrQyY5SE= +cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI= +cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= cloud.google.com/go/iap v1.6.0/go.mod h1:NSuvI9C/j7UdjGjIde7t7HBz+QTwBcapPE07+sSRcLk= @@ -1331,8 +1333,8 @@ github.com/gballet/go-verkle v0.0.0-20230607174250-df487255f46b/go.mod h1:CDncRY github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.26.0 h1:IX3++sF6/4B5JcevhdZfdKIHfyvMmAq/UnqcyT2H6mA= -github.com/getsentry/sentry-go v0.26.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s= @@ -2709,8 +2711,9 @@ golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4 golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= -golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= +golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= +golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5/go.mod h1:UBKtEnL8aqnd+0JHqZ+2qoMDwtuy6cYhhKNoHLBiTQc= 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= @@ -3262,8 +3265,9 @@ google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb/go.mod h1:yZTlhN0t google.golang.org/genproto v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:CCviP9RmpZ1mxVr8MUjCnSiY09IbAXZxhLE6EhHIdPU= google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97/go.mod h1:t1VqOqqvce95G3hIDCT5FeO3YUc6Q4Oe24L/+rNMxRk= google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:EMfReVxb80Dq1hhioy0sOsY9jCE46YDgHlJ7fWVUWRE= -google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA= google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= +google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 h1:wpZ8pe2x1Q3f2KyT5f8oP/fa9rHAKgFPr/HZdNuS+PQ= +google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:J7XzRzVy1+IPwWHZUzoD0IccYZIrXILAQpc+Qy9CMhY= google.golang.org/genproto/googleapis/api v0.0.0-20230525234020-1aefcd67740a/go.mod h1:ts19tUU+Z0ZShN1y3aPyq2+O3d5FUNNgT6FtOzmrNn8= google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= @@ -3278,8 +3282,9 @@ google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb/go. google.golang.org/genproto/googleapis/api v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:RdyHbowztCGQySiCvQPgWQWgWhGnouTdCflKoDBt32U= google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0= google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:SUBoKXbI1Efip18FClrQVGjWcyd0QZd8KkvdP34t7ww= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b h1:CIC2YMXmIhYw6evmhPxBKJ4fmLbOFtXQN/GV3XOZR8k= google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= +google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 h1:JpwMPBpFN3uKhdaekDpiNlImDdkUAyiJ6ez/uxGaUSo= +google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230807174057-1744710a1577/go.mod h1:NjCQG/D8JandXxM57PZbAJL1DCNL6EypA0vPPwfsc7c= google.golang.org/genproto/googleapis/bytestream v0.0.0-20231030173426-d783a09b4405 h1:o4S3HvTUEXgRsNSUQsALDVog0O9F/U1JJlHmmUN8Uas= @@ -3299,8 +3304,9 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97/go.mod h1:v7nGkzlmW8P3n/bKmWBn2WpBjpOEx8Q6gMueudAmKfY= google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:4cYg8o5yUbm77w8ZX00LhMVNl/YVBFJRYWDc0uYWMs0= google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= google.golang.org/grpc v0.0.0-20170208002647-2a6bf6142e96/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= @@ -3357,8 +3363,8 @@ google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU= -google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= +google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= +google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= 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= diff --git a/internal/accounts/create-interactive.go b/internal/accounts/create-interactive.go index 534954331..b596ec451 100644 --- a/internal/accounts/create-interactive.go +++ b/internal/accounts/create-interactive.go @@ -52,7 +52,7 @@ func createInteractive(state *flowkit.State) (*accountResult, error) { log := output.NewStdoutLogger(output.InfoLog) name := util.AccountNamePrompt(state.Accounts().Names()) networkName, selectedNetwork := util.CreateAccountNetworkPrompt() - privateFile := fmt.Sprintf("%s.pkey", name) + privateFile := accounts.PrivateKeyFile(name) // create new gateway based on chosen network gw, err := gateway.NewGrpcGateway(selectedNetwork) diff --git a/internal/dependencymanager/add.go b/internal/dependencymanager/add.go index b7ee54943..e67ebc350 100644 --- a/internal/dependencymanager/add.go +++ b/internal/dependencymanager/add.go @@ -69,7 +69,7 @@ func add( } logger.Info("✅ Dependency installation complete. Check your flow.json") - logger.Info("Ensure you add any required dependencies to your 'deployments' section. This can be done using the 'flow add config deployment' command.") + logger.Info("Ensure you add any required dependencies to your 'deployments' section. This can be done using the 'flow config add deployment' command.") logger.Info("Note: Core contracts do not need to be added to deployments. For reference, see this URL: https://github.com/onflow/flow-core-contracts") return nil, nil diff --git a/internal/super/flix.go b/internal/super/flix.go index c1445044b..18d7b01c3 100644 --- a/internal/super/flix.go +++ b/internal/super/flix.go @@ -261,14 +261,31 @@ func (fr *flixResult) Oneliner() string { func getDeployedContracts(state *flowkit.State) flixkit.ContractInfos { allContracts := make(flixkit.ContractInfos) depNetworks := make([]string, 0) + accountAddresses := make(map[string]string) // get all configured networks in flow.json for _, n := range *state.Networks() { depNetworks = append(depNetworks, n.Name) } + // get account addresses + for _, a := range *state.Accounts() { + accountAddresses[a.Name] = a.Address.Hex() + } + + for _, d := range *state.Deployments() { + addr := accountAddresses[d.Account] + for _, c := range d.Contracts { + if _, ok := allContracts[c.Name]; !ok { + allContracts[c.Name] = make(flixkit.NetworkAddressMap) + } + allContracts[c.Name][d.Network] = addr + } + } + // get all deployed and alias contracts for configured networks for _, network := range depNetworks { - contracts, err := state.DeploymentContractsByNetwork(config.Network{Name: network}) + cfg := config.Network{Name: network} + contracts, err := state.DeploymentContractsByNetwork(cfg) if err != nil { continue } @@ -278,7 +295,7 @@ func getDeployedContracts(state *flowkit.State) flixkit.ContractInfos { } allContracts[c.Name][network] = c.AccountAddress.Hex() } - locAliases := state.AliasesForNetwork(config.Network{Name: network}) + locAliases := state.AliasesForNetwork(cfg) for name, addr := range locAliases { address := flow.BytesToAddress([]byte(addr)) if isPath(name) { @@ -290,6 +307,7 @@ func getDeployedContracts(state *flowkit.State) flixkit.ContractInfos { allContracts[name][network] = address.Hex() } } + return allContracts } diff --git a/internal/super/generate.go b/internal/super/generate.go index 721dc9372..e045ac8d9 100644 --- a/internal/super/generate.go +++ b/internal/super/generate.go @@ -157,11 +157,13 @@ func generateNew( switch templateType { case "contract": fileToWrite = fmt.Sprintf(` -access(all) contract %s { +access(all) +contract %s { init() {} }`, name) case "script": - fileToWrite = `access(all) fun main() { + fileToWrite = `access(all) +fun main() { // Script details here }` case "transaction": diff --git a/internal/super/generate_test.go b/internal/super/generate_test.go index 69449846a..bf1f98082 100644 --- a/internal/super/generate_test.go +++ b/internal/super/generate_test.go @@ -19,7 +19,6 @@ package super import ( - "os" "testing" "github.com/onflow/flow-cli/internal/util" @@ -30,19 +29,11 @@ import ( ) func TestGenerateNewContract(t *testing.T) { - dir, err := os.MkdirTemp("", "test") - assert.NoError(t, err, "Failed to create temp dir") - defer os.RemoveAll(dir) - - if err := os.Chdir(dir); err != nil { - t.Fatalf("Failed to change directory: %v", err) - } - logger := output.NewStdoutLogger(output.NoneLog) _, state, _ := util.TestMocks(t) // Test contract generation - _, err = generateNew([]string{"TestContract"}, "contract", logger, state) + _, err := generateNew([]string{"TestContract"}, "contract", logger, state) assert.NoError(t, err, "Failed to generate contract") fileContent, err := state.ReaderWriter().ReadFile("cadence/contracts/TestContract.cdc") @@ -51,7 +42,8 @@ func TestGenerateNewContract(t *testing.T) { // Check content is correct expectedContent := ` -access(all) contract TestContract { +access(all) +contract TestContract { init() {} }` assert.Equal(t, expectedContent, string(fileContent)) @@ -63,19 +55,11 @@ access(all) contract TestContract { } func TestGenerateNewContractFileAlreadyExists(t *testing.T) { - dir, err := os.MkdirTemp("", "test") - assert.NoError(t, err, "Failed to create temp dir") - defer os.RemoveAll(dir) - - if err := os.Chdir(dir); err != nil { - t.Fatalf("Failed to change directory: %v", err) - } - logger := output.NewStdoutLogger(output.NoneLog) _, state, _ := util.TestMocks(t) // Test contract generation - _, err = generateNew([]string{"TestContract"}, "contract", logger, state) + _, err := generateNew([]string{"TestContract"}, "contract", logger, state) assert.NoError(t, err, "Failed to generate contract") //// Check if the file exists in the correct directory @@ -90,18 +74,10 @@ func TestGenerateNewContractFileAlreadyExists(t *testing.T) { } func TestGenerateNewContractWithFileExtension(t *testing.T) { - dir, err := os.MkdirTemp("", "test") - assert.NoError(t, err, "Failed to create temp dir") - defer os.RemoveAll(dir) - - if err := os.Chdir(dir); err != nil { - t.Fatalf("Failed to change directory: %v", err) - } - logger := output.NewStdoutLogger(output.NoneLog) _, state, _ := util.TestMocks(t) - _, err = generateNew([]string{"TestContract.cdc"}, "contract", logger, state) + _, err := generateNew([]string{"TestContract.cdc"}, "contract", logger, state) assert.NoError(t, err, "Failed to generate contract") // Check file exists @@ -111,43 +87,28 @@ func TestGenerateNewContractWithFileExtension(t *testing.T) { } func TestGenerateNewScript(t *testing.T) { - dir, err := os.MkdirTemp("", "test") - assert.NoError(t, err, "Failed to create temp dir") - defer os.RemoveAll(dir) - - if err := os.Chdir(dir); err != nil { - t.Fatalf("Failed to change directory: %v", err) - } - logger := output.NewStdoutLogger(output.NoneLog) _, state, _ := util.TestMocks(t) - _, err = generateNew([]string{"TestScript"}, "script", logger, state) + _, err := generateNew([]string{"TestScript"}, "script", logger, state) assert.NoError(t, err, "Failed to generate contract") content, err := state.ReaderWriter().ReadFile("cadence/scripts/TestScript.cdc") assert.NoError(t, err, "Failed to read generated file") assert.NotNil(t, content) - expectedContent := `access(all) fun main() { + expectedContent := `access(all) +fun main() { // Script details here }` assert.Equal(t, expectedContent, string(content)) } func TestGenerateNewTransaction(t *testing.T) { - dir, err := os.MkdirTemp("", "test") - assert.NoError(t, err, "Failed to create temp dir") - defer os.RemoveAll(dir) - - if err := os.Chdir(dir); err != nil { - t.Fatalf("Failed to change directory: %v", err) - } - logger := output.NewStdoutLogger(output.NoneLog) _, state, _ := util.TestMocks(t) - _, err = generateNew([]string{"TestTransaction"}, "transaction", logger, state) + _, err := generateNew([]string{"TestTransaction"}, "transaction", logger, state) assert.NoError(t, err, "Failed to generate contract") content, err := state.ReaderWriter().ReadFile("cadence/transactions/TestTransaction.cdc") @@ -163,21 +124,13 @@ func TestGenerateNewTransaction(t *testing.T) { } func TestGenerateNewWithDirFlag(t *testing.T) { - dir, err := os.MkdirTemp("", "test") - assert.NoError(t, err, "Failed to create temp dir") - defer os.RemoveAll(dir) - - if err := os.Chdir(dir); err != nil { - t.Fatalf("Failed to change directory: %v", err) - } - logger := output.NewStdoutLogger(output.NoneLog) _, state, _ := util.TestMocks(t) // Set a custom directory generateFlags.Directory = "customDir" - _, err = generateNew([]string{"TestContract"}, "contract", logger, state) + _, err := generateNew([]string{"TestContract"}, "contract", logger, state) assert.NoError(t, err, "Failed to generate contract") content, err := state.ReaderWriter().ReadFile("customDir/TestContract.cdc") @@ -185,7 +138,8 @@ func TestGenerateNewWithDirFlag(t *testing.T) { assert.NotNil(t, content) expectedContent := ` -access(all) contract TestContract { +access(all) +contract TestContract { init() {} }` assert.Equal(t, expectedContent, string(content)) diff --git a/version.txt b/version.txt index cd74ac3b5..fb844899c 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -v1.11.0 +v1.13.2