From 055f2560e968a0fef3c0fe50b4283ef361ab9dfc Mon Sep 17 00:00:00 2001 From: Richard Melkonian Date: Wed, 20 Jul 2022 13:42:02 +0100 Subject: [PATCH 01/21] updated makeFile and flow.json --- backend/Makefile | 11 ++++++++++- backend/flow.json | 2 +- backend/main/cadence/contracts/ExampleNFT.cdc | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/backend/Makefile b/backend/Makefile index e14b8899d..a83727e55 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -14,7 +14,16 @@ test: build_and_run: build run -macrun: build_macos run +macrun: build_macos run && NFTdeploy + +nfts: + flow accounts add-contract MetadataViews ./main/cadence/contracts/MetadataViews.cdc && \ + flow accounts add-contract NonFungibleToken ./main/cadence/contracts/NonFungibleToken.cdc && \ + flow accounts add-contract ExampleNFT ./main/cadence/contracts/ExampleNFT.cdc && \ + flow transactions send ./main/cadence/transactions/create_collection.cdc && \ + flow transactions send ./main/cadence/transactions/mint_nft.cdc 0xf8d6e0586b0a20c7 "dev_nft" "don't try at home" "thumnbail goes here" + + macdev: APP_ENV=DEV make macrun diff --git a/backend/flow.json b/backend/flow.json index a1376e4e8..755f5656a 100644 --- a/backend/flow.json +++ b/backend/flow.json @@ -76,7 +76,7 @@ }, "deployments": { "emulator": { - "emulator-account": ["NonFungibleToken", "ExampleNFT", "MetadataViews"], + "emulator-account": ["MetadataViews", "NonFungibleToken", "ExampleNFT"], "emulator-user1": [], "emulator-user2": [], "emulator-user3": [], diff --git a/backend/main/cadence/contracts/ExampleNFT.cdc b/backend/main/cadence/contracts/ExampleNFT.cdc index 65bac270f..52f49dda0 100644 --- a/backend/main/cadence/contracts/ExampleNFT.cdc +++ b/backend/main/cadence/contracts/ExampleNFT.cdc @@ -1,8 +1,8 @@ // This is an example implementation of a Flow Non-Fungible Token // It is not part of the official standard but it assumed to be // very similar to how many NFTs would implement the core functionality. -import NonFungibleToken from "./NonFungibleToken.cdc" -import MetadataViews from "./MetadataViews.cdc" +import NonFungibleToken from 0xf8d6e0586b0a20c7 +import MetadataViews from 0xf8d6e0586b0a20c7 pub contract ExampleNFT: NonFungibleToken { From a5e3da2809409ecb79907b59d3869a41de8f5a43 Mon Sep 17 00:00:00 2001 From: Richard Melkonian Date: Wed, 20 Jul 2022 16:11:46 +0100 Subject: [PATCH 02/21] updated float import paths --- backend/Makefile | 5 + backend/main/cadence/float/FLOAT.cdc | 1013 +++++++++++++++++ .../main/cadence/float/FLOATIncinerator.cdc | 92 ++ backend/main/cadence/float/FLOATVerifiers.cdc | 178 +++ .../cadence/float/GrantedAccountAccess.cdc | 60 + .../float/transactions/create_event.cdc | 93 ++ .../float/transactions/setup_account.cdc | 34 + .../float/transactions/transfer_float.cdc | 30 + 8 files changed, 1505 insertions(+) create mode 100644 backend/main/cadence/float/FLOAT.cdc create mode 100644 backend/main/cadence/float/FLOATIncinerator.cdc create mode 100644 backend/main/cadence/float/FLOATVerifiers.cdc create mode 100644 backend/main/cadence/float/GrantedAccountAccess.cdc create mode 100644 backend/main/cadence/float/transactions/create_event.cdc create mode 100644 backend/main/cadence/float/transactions/setup_account.cdc create mode 100644 backend/main/cadence/float/transactions/transfer_float.cdc diff --git a/backend/Makefile b/backend/Makefile index e14b8899d..e3284807a 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -22,6 +22,11 @@ macdev: dev: APP_ENV=DEV make build_and_run +floats: + flow accounts add-contract GrantedAccountAccess ./main/cadence/float/GrantedAccountAccess.cdc && \ + flow accounts add-contract FLOAT ./main/cadence/float/FLOAT.cdc && \ + flow accounts add-contract FLOAT ./main/cadence/float/FLOATVerifiers.cdc + migrateup: migrate -path ./migrations -database "postgres://postgres:admin@localhost:5432/flow_snapshot?sslmode=disable" -verbose up diff --git a/backend/main/cadence/float/FLOAT.cdc b/backend/main/cadence/float/FLOAT.cdc new file mode 100644 index 000000000..d674095a8 --- /dev/null +++ b/backend/main/cadence/float/FLOAT.cdc @@ -0,0 +1,1013 @@ +// MADE BY: Emerald City, Jacob Tucker + +// This contract is for FLOAT, a proof of participation platform +// on Flow. It is similar to POAP, but a lot, lot cooler. ;) + +// The main idea is that FLOATs are simply NFTs. They are minted from +// a FLOATEvent, which is basically an event that a host starts. For example, +// if I have a Twitter space and want to create an event for it, I can create +// a new FLOATEvent in my FLOATEvents collection and mint FLOATs to people +// from this Twitter space event representing that they were there. + +// The complicated part is the FLOATVerifiers contract. That contract +// defines a list of "verifiers" that can be tagged onto a FLOATEvent to make +// the claiming more secure. For example, a host can decide to put a time +// constraint on when users can claim a FLOAT. They would do that by passing in +// a Timelock struct (defined in FLOATVerifiers.cdc) with a time period for which +// users can claim. + +// For a whole list of verifiers, see FLOATVerifiers.cdc + +// Lastly, we implemented GrantedAccountAccess.cdc, which allows you to specify +// someone else can control your account (in the context of FLOAT). This +// is specifically designed for teams to be able to handle one "host" on the +// FLOAT platform so all the company's events are under one account. +// This is mainly used to give other people access to your FLOATEvents resource, +// and allow them to mint for you and control Admin operations on your events. + +// For more info on GrantedAccountAccess, see GrantedAccountAccess.cdc + +// import NonFungibleToken from 0x1d7e57aa55817448 +// import MetadataViews from 0x1d7e57aa55817448 +// import GrantedAccountAccess from 0x2d4c3caffbeab845 +// import FungibleToken from 0xf233dcee88fe0abe +// import FlowToken from 0x1654653399040a61 +import NonFungibleToken from 0xf8d6e0586b0a20c7 +import MetadataViews from 0xf8d6e0586b0a20c7 +import GrantedAccountAccess from 0xf8d6e0586b0a20c7 +import FungibleToken from 0xf8d6e0586b0a20c7 +import FlowToken from 0xf8d6e0586b0a20c7 + +pub contract FLOAT: NonFungibleToken { + + /***********************************************/ + /******************** PATHS ********************/ + /***********************************************/ + + pub let FLOATCollectionStoragePath: StoragePath + pub let FLOATCollectionPublicPath: PublicPath + pub let FLOATEventsStoragePath: StoragePath + pub let FLOATEventsPublicPath: PublicPath + pub let FLOATEventsPrivatePath: PrivatePath + + /************************************************/ + /******************** EVENTS ********************/ + /************************************************/ + + pub event ContractInitialized() + pub event FLOATMinted(id: UInt64, eventHost: Address, eventId: UInt64, eventImage: String, recipient: Address, serial: UInt64) + pub event FLOATClaimed(id: UInt64, eventHost: Address, eventId: UInt64, eventImage: String, eventName: String, recipient: Address, serial: UInt64) + pub event FLOATDestroyed(id: UInt64, eventHost: Address, eventId: UInt64, eventImage: String, serial: UInt64) + pub event FLOATTransferred(id: UInt64, eventHost: Address, eventId: UInt64, newOwner: Address?, serial: UInt64) + pub event FLOATPurchased(id: UInt64, eventHost: Address, eventId: UInt64, recipient: Address, serial: UInt64) + pub event FLOATEventCreated(eventId: UInt64, description: String, host: Address, image: String, name: String, url: String) + pub event FLOATEventDestroyed(eventId: UInt64, host: Address, name: String) + + pub event Deposit(id: UInt64, to: Address?) + pub event Withdraw(id: UInt64, from: Address?) + + /***********************************************/ + /******************** STATE ********************/ + /***********************************************/ + + // The total amount of FLOATs that have ever been + // created (does not go down when a FLOAT is destroyed) + pub var totalSupply: UInt64 + // The total amount of FLOATEvents that have ever been + // created (does not go down when a FLOATEvent is destroyed) + pub var totalFLOATEvents: UInt64 + + /***********************************************/ + /**************** FUNCTIONALITY ****************/ + /***********************************************/ + + // A helpful wrapper to contain an address, + // the id of a FLOAT, and its serial + pub struct TokenIdentifier { + pub let id: UInt64 + pub let address: Address + pub let serial: UInt64 + + init(_id: UInt64, _address: Address, _serial: UInt64) { + self.id = _id + self.address = _address + self.serial = _serial + } + } + + pub struct TokenInfo { + pub let path: PublicPath + pub let price: UFix64 + + init(_path: PublicPath, _price: UFix64) { + self.path = _path + self.price = _price + } + } + + // Represents a FLOAT + pub resource NFT: NonFungibleToken.INFT, MetadataViews.Resolver { + // The `uuid` of this resource + pub let id: UInt64 + + // Some of these are also duplicated on the event, + // but it's necessary to put them here as well + // in case the FLOATEvent host deletes the event + pub let dateReceived: UFix64 + pub let eventDescription: String + pub let eventHost: Address + pub let eventId: UInt64 + pub let eventImage: String + pub let eventName: String + pub let originalRecipient: Address + pub let serial: UInt64 + + // A capability that points to the FLOATEvents this FLOAT is from. + // There is a chance the event host unlinks their event from + // the public, in which case it's impossible to know details + // about the event. Which is fine, since we store the + // crucial data to know about the FLOAT in the FLOAT itself. + pub let eventsCap: Capability<&FLOATEvents{FLOATEventsPublic, MetadataViews.ResolverCollection}> + + // Helper function to get the metadata of the event + // this FLOAT is from. + pub fun getEventMetadata(): &FLOATEvent{FLOATEventPublic}? { + if let events = self.eventsCap.borrow() { + return events.borrowPublicEventRef(eventId: self.eventId) + } + return nil + } + + // This is for the MetdataStandard + pub fun getViews(): [Type] { + return [ + Type(), + Type() + ] + } + + // This is for the MetdataStandard + pub fun resolveView(_ view: Type): AnyStruct? { + switch view { + case Type(): + return MetadataViews.Display( + name: self.eventName, + description: self.eventDescription, + thumbnail: MetadataViews.IPFSFile(cid: self.eventImage, path: nil) + ) + case Type(): + return TokenIdentifier( + _id: self.id, + _address: self.owner!.address, + _serial: self.serial + ) + } + + return nil + } + + init(_eventDescription: String, _eventHost: Address, _eventId: UInt64, _eventImage: String, _eventName: String, _originalRecipient: Address, _serial: UInt64) { + self.id = self.uuid + self.dateReceived = getCurrentBlock().timestamp + self.eventDescription = _eventDescription + self.eventHost = _eventHost + self.eventId = _eventId + self.eventImage = _eventImage + self.eventName = _eventName + self.originalRecipient = _originalRecipient + self.serial = _serial + + // Stores a capability to the FLOATEvents of its creator + self.eventsCap = getAccount(_eventHost) + .getCapability<&FLOATEvents{FLOATEventsPublic, MetadataViews.ResolverCollection}>(FLOAT.FLOATEventsPublicPath) + + emit FLOATMinted( + id: self.id, + eventHost: _eventHost, + eventId: _eventId, + eventImage: _eventImage, + recipient: _originalRecipient, + serial: _serial + ) + + FLOAT.totalSupply = FLOAT.totalSupply + 1 + } + + destroy() { + // If the FLOATEvent owner decided to unlink their public reference + // for some reason (heavily recommend against it), their records + // of who owns the FLOAT is going to be messed up. But that is their + // fault. We shouldn't let that prevent the user from deleting the FLOAT. + if let floatEvent: &FLOATEvent{FLOATEventPublic} = self.getEventMetadata() { + floatEvent.updateFLOATHome(id: self.id, serial: self.serial, owner: nil) + } + emit FLOATDestroyed( + id: self.id, + eventHost: self.eventHost, + eventId: self.eventId, + eventImage: self.eventImage, + serial: self.serial + ) + } + } + + // A public interface for people to call into our Collection + pub resource interface CollectionPublic { + pub fun borrowNFT(id: UInt64): &NonFungibleToken.NFT + pub fun borrowFLOAT(id: UInt64): &NFT? + pub fun borrowViewResolver(id: UInt64): &{MetadataViews.Resolver} + pub fun deposit(token: @NonFungibleToken.NFT) + pub fun getIDs(): [UInt64] + pub fun getAllIDs(): [UInt64] + pub fun ownedIdsFromEvent(eventId: UInt64): [UInt64] + } + + // A Collection that holds all of the users FLOATs. + // Withdrawing is not allowed. You can only transfer. + pub resource Collection: NonFungibleToken.Provider, NonFungibleToken.Receiver, NonFungibleToken.CollectionPublic, MetadataViews.ResolverCollection, CollectionPublic { + // Maps a FLOAT id to the FLOAT itself + pub var ownedNFTs: @{UInt64: NonFungibleToken.NFT} + // Maps an eventId to the ids of FLOATs that + // this user owns from that event. It's possible + // for it to be out of sync until June 2022 spork, + // but it is used merely as a helper, so that's okay. + access(account) var events: {UInt64: {UInt64: Bool}} + + // Deposits a FLOAT to the collection + pub fun deposit(token: @NonFungibleToken.NFT) { + let nft <- token as! @NFT + let id = nft.id + let eventId = nft.eventId + + // Update self.events[eventId] to have + // this FLOAT's id in it + if self.events[eventId] == nil { + self.events[eventId] = {id: true} + } else { + self.events[eventId]!.insert(key: id, true) + } + + // Try to update the FLOATEvent's current holders. This will + // not work if they unlinked their FLOATEvent to the public, + // and the data will go out of sync. But that is their fault. + if let floatEvent: &FLOATEvent{FLOATEventPublic} = nft.getEventMetadata() { + floatEvent.updateFLOATHome(id: id, serial: nft.serial, owner: self.owner!.address) + } + + emit Deposit(id: id, to: self.owner!.address) + self.ownedNFTs[id] <-! nft + } + + pub fun withdraw(withdrawID: UInt64): @NonFungibleToken.NFT { + let token <- self.ownedNFTs.remove(key: withdrawID) ?? panic("You do not own this FLOAT in your collection") + let nft <- token as! @NFT + + // Update self.events[eventId] to not + // have this FLOAT's id in it + self.events[nft.eventId]!.remove(key: withdrawID) + + // Try to update the FLOATEvent's current holders. This will + // not work if they unlinked their FLOATEvent to the public, + // and the data will go out of sync. But that is their fault. + // + // Additionally, this checks if the FLOATEvent host wanted this + // FLOAT to be transferrable. Secondary marketplaces will use this + // withdraw function, so if the FLOAT is not transferrable, + // you can't sell it there. + if let floatEvent: &FLOATEvent{FLOATEventPublic} = nft.getEventMetadata() { + assert( + floatEvent.transferrable, + message: "This FLOAT is not transferrable." + ) + floatEvent.updateFLOATHome(id: withdrawID, serial: nft.serial, owner: nil) + } + + emit Withdraw(id: withdrawID, from: self.owner!.address) + return <- nft + } + + pub fun delete(id: UInt64) { + let token <- self.ownedNFTs.remove(key: id) ?? panic("You do not own this FLOAT in your collection") + let nft <- token as! @NFT + + // Update self.events[eventId] to not + // have this FLOAT's id in it + self.events[nft.eventId]!.remove(key: id) + + destroy nft + } + + // Only returns the FLOATs for which we can still + // access data about their event. + pub fun getIDs(): [UInt64] { + let ids: [UInt64] = [] + for key in self.ownedNFTs.keys { + let nftRef = self.borrowFLOAT(id: key)! + if nftRef.eventsCap.check() { + ids.append(key) + } + } + return ids + } + + // Returns all the FLOATs ids + pub fun getAllIDs(): [UInt64] { + return self.ownedNFTs.keys + } + + // Returns an array of ids that belong to + // the passed in eventId + // + // It's possible for FLOAT ids to be present that + // shouldn't be if people tried to withdraw directly + // from `ownedNFTs` (not possible after June 2022 spork), + // but this makes sure the returned + // ids are all actually owned by this account. + pub fun ownedIdsFromEvent(eventId: UInt64): [UInt64] { + let answer: [UInt64] = [] + if let idsInEvent = self.events[eventId]?.keys { + for id in idsInEvent { + if self.ownedNFTs[id] != nil { + answer.append(id) + } + } + } + return answer + } + + pub fun borrowNFT(id: UInt64): &NonFungibleToken.NFT { + return (&self.ownedNFTs[id] as &NonFungibleToken.NFT?)! + } + + pub fun borrowFLOAT(id: UInt64): &NFT? { + if self.ownedNFTs[id] != nil { + let ref = (&self.ownedNFTs[id] as auth &NonFungibleToken.NFT?)! + return ref as! &NFT + } + return nil + } + + pub fun borrowViewResolver(id: UInt64): &{MetadataViews.Resolver} { + let tokenRef = (&self.ownedNFTs[id] as auth &NonFungibleToken.NFT?)! + let nftRef = tokenRef as! &NFT + return nftRef as &{MetadataViews.Resolver} + } + + init() { + self.ownedNFTs <- {} + self.events = {} + } + + destroy() { + destroy self.ownedNFTs + } + } + + // An interface that every "verifier" must implement. + // A verifier is one of the options on the FLOAT Event page, + // for example, a "time limit," or a "limited" number of + // FLOATs that can be claimed. + // All the current verifiers can be seen inside FLOATVerifiers.cdc + pub struct interface IVerifier { + // A function every verifier must implement. + // Will have `assert`s in it to make sure + // the user fits some criteria. + access(account) fun verify(_ params: {String: AnyStruct}) + } + + // A public interface to read the FLOATEvent + pub resource interface FLOATEventPublic { + pub var claimable: Bool + pub let dateCreated: UFix64 + pub let description: String + pub let eventId: UInt64 + pub let host: Address + pub let image: String + pub let name: String + pub var totalSupply: UInt64 + pub var transferrable: Bool + pub let url: String + pub fun claim(recipient: &Collection, params: {String: AnyStruct}) + pub fun purchase(recipient: &Collection, params: {String: AnyStruct}, payment: @FungibleToken.Vault) + pub fun getClaimed(): {Address: TokenIdentifier} + pub fun getCurrentHolders(): {UInt64: TokenIdentifier} + pub fun getCurrentHolder(serial: UInt64): TokenIdentifier? + pub fun getExtraMetadata(): {String: AnyStruct} + pub fun getVerifiers(): {String: [{IVerifier}]} + pub fun getGroups(): [String] + pub fun getPrices(): {String: TokenInfo}? + pub fun hasClaimed(account: Address): TokenIdentifier? + + access(account) fun updateFLOATHome(id: UInt64, serial: UInt64, owner: Address?) + } + + // + // FLOATEvent + // + pub resource FLOATEvent: FLOATEventPublic, MetadataViews.Resolver { + // Whether or not users can claim from our event (can be toggled + // at any time) + pub var claimable: Bool + // Maps an address to the FLOAT they claimed + access(account) var claimed: {Address: TokenIdentifier} + // Maps a serial to the person who theoretically owns + // that FLOAT. Must be serial --> TokenIdentifier because + // it's possible someone has multiple FLOATs from this event. + access(account) var currentHolders: {UInt64: TokenIdentifier} + pub let dateCreated: UFix64 + pub let description: String + // This is equal to this resource's uuid + pub let eventId: UInt64 + access(account) var extraMetadata: {String: AnyStruct} + // The groups that this FLOAT Event belongs to (groups + // are within the FLOATEvents resource) + access(account) var groups: {String: Bool} + // Who created this FLOAT Event + pub let host: Address + // The image of the FLOAT Event + pub let image: String + // The name of the FLOAT Event + pub let name: String + // The total number of FLOATs that have been + // minted from this event + pub var totalSupply: UInt64 + // Whether or not the FLOATs that users own + // from this event can be transferred on the + // FLOAT platform itself (transferring allowed + // elsewhere) + pub var transferrable: Bool + // A url of where the event took place + pub let url: String + // A list of verifiers this FLOAT Event contains. + // Will be used every time someone "claims" a FLOAT + // to see if they pass the requirements + access(account) let verifiers: {String: [{IVerifier}]} + + /***************** Setters for the Event Owner *****************/ + + // Toggles claiming on/off + pub fun toggleClaimable(): Bool { + self.claimable = !self.claimable + return self.claimable + } + + // Toggles transferring on/off + pub fun toggleTransferrable(): Bool { + self.transferrable = !self.transferrable + return self.transferrable + } + + // Updates the metadata in case you want + // to add something. + pub fun updateMetadata(newExtraMetadata: {String: AnyStruct}) { + for key in newExtraMetadata.keys { + if !self.extraMetadata.containsKey(key) { + self.extraMetadata[key] = newExtraMetadata[key] + } + } + } + + /***************** Setters for the Contract Only *****************/ + + // Called if a user moves their FLOAT to another location. + // Needed so we can keep track of who currently has it. + access(account) fun updateFLOATHome(id: UInt64, serial: UInt64, owner: Address?) { + if owner == nil { + self.currentHolders.remove(key: serial) + } else { + self.currentHolders[serial] = TokenIdentifier( + _id: id, + _address: owner!, + _serial: serial + ) + } + emit FLOATTransferred(id: id, eventHost: self.host, eventId: self.eventId, newOwner: owner, serial: serial) + } + + // Adds this FLOAT Event to a group + access(account) fun addToGroup(groupName: String) { + self.groups[groupName] = true + } + + // Removes this FLOAT Event to a group + access(account) fun removeFromGroup(groupName: String) { + self.groups.remove(key: groupName) + } + + /***************** Getters (all exposed to the public) *****************/ + + // Returns info about the FLOAT that this account claimed + // (if any) + pub fun hasClaimed(account: Address): TokenIdentifier? { + return self.claimed[account] + } + + // This is a guarantee that the person owns the FLOAT + // with the passed in serial + pub fun getCurrentHolder(serial: UInt64): TokenIdentifier? { + pre { + self.currentHolders[serial] != nil: + "This serial has not been created yet." + } + let data = self.currentHolders[serial]! + let collection = getAccount(data.address).getCapability(FLOAT.FLOATCollectionPublicPath).borrow<&Collection{CollectionPublic}>() + if collection?.borrowFLOAT(id: data.id) != nil { + return data + } + + return nil + } + + // Returns an accurate dictionary of all the + // claimers + pub fun getClaimed(): {Address: TokenIdentifier} { + return self.claimed + } + + // This dictionary may be slightly off if for some + // reason the FLOATEvents owner ever unlinked their + // resource from the public. + // Use `getCurrentHolder(serial: UInt64)` to truly + // verify if someone holds that serial. + pub fun getCurrentHolders(): {UInt64: TokenIdentifier} { + return self.currentHolders + } + + pub fun getExtraMetadata(): {String: AnyStruct} { + return self.extraMetadata + } + + // Gets all the verifiers that will be used + // for claiming + pub fun getVerifiers(): {String: [{IVerifier}]} { + return self.verifiers + } + + pub fun getGroups(): [String] { + return self.groups.keys + } + + pub fun getViews(): [Type] { + return [ + Type() + ] + } + + pub fun getPrices(): {String: TokenInfo}? { + if let prices = self.extraMetadata["prices"] { + return prices as! {String: TokenInfo} + } + return nil + } + + pub fun resolveView(_ view: Type): AnyStruct? { + switch view { + case Type(): + return MetadataViews.Display( + name: self.name, + description: self.description, + thumbnail: MetadataViews.IPFSFile(cid: self.image, path: nil) + ) + } + + return nil + } + + /****************** Getting a FLOAT ******************/ + + // Will not panic if one of the recipients has already claimed. + // It will just skip them. + pub fun batchMint(recipients: [&Collection{NonFungibleToken.CollectionPublic}]) { + for recipient in recipients { + if self.claimed[recipient.owner!.address] == nil { + self.mint(recipient: recipient) + } + } + } + + // Used to give a person a FLOAT from this event. + // Used as a helper function for `claim`, but can also be + // used by the event owner and shared accounts to + // mint directly to a user. + // + // If the event owner directly mints to a user, it does not + // run the verifiers on the user. It bypasses all of them. + // + // Return the id of the FLOAT it minted + pub fun mint(recipient: &Collection{NonFungibleToken.CollectionPublic}): UInt64 { + pre { + self.claimed[recipient.owner!.address] == nil: + "This person already claimed their FLOAT!" + } + let recipientAddr: Address = recipient.owner!.address + let serial = self.totalSupply + + let token <- create NFT( + _eventDescription: self.description, + _eventHost: self.host, + _eventId: self.eventId, + _eventImage: self.image, + _eventName: self.name, + _originalRecipient: recipientAddr, + _serial: serial + ) + let id = token.id + // Saves the claimer + self.claimed[recipientAddr] = TokenIdentifier( + _id: id, + _address: recipientAddr, + _serial: serial + ) + // Saves the claimer as the current holder + // of the newly minted FLOAT + self.currentHolders[serial] = TokenIdentifier( + _id: id, + _address: recipientAddr, + _serial: serial + ) + + self.totalSupply = self.totalSupply + 1 + recipient.deposit(token: <- token) + return id + } + + access(account) fun verifyAndMint(recipient: &Collection, params: {String: AnyStruct}): UInt64 { + params["event"] = &self as &FLOATEvent{FLOATEventPublic} + params["claimee"] = recipient.owner!.address + + // Runs a loop over all the verifiers that this FLOAT Events + // implements. For example, "Limited", "Timelock", "Secret", etc. + // All the verifiers are in the FLOATVerifiers.cdc contract + for identifier in self.verifiers.keys { + let typedModules = (&self.verifiers[identifier] as &[{IVerifier}]?)! + var i = 0 + while i < typedModules.length { + let verifier = &typedModules[i] as &{IVerifier} + verifier.verify(params) + i = i + 1 + } + } + + // You're good to go. + let id = self.mint(recipient: recipient) + + emit FLOATClaimed( + id: id, + eventHost: self.host, + eventId: self.eventId, + eventImage: self.image, + eventName: self.name, + recipient: recipient.owner!.address, + serial: self.totalSupply - 1 + ) + return id + } + + // For the public to claim FLOATs. Must be claimable to do so. + // You can pass in `params` that will be forwarded to the + // customized `verify` function of the verifier. + // + // For example, the FLOAT platform allows event hosts + // to specify a secret phrase. That secret phrase will + // be passed in the `params`. + pub fun claim(recipient: &Collection, params: {String: AnyStruct}) { + pre { + self.getPrices() == nil: + "You need to purchase this FLOAT." + self.claimed[recipient.owner!.address] == nil: + "This person already claimed their FLOAT!" + self.claimable: + "This FLOATEvent is not claimable, and thus not currently active." + } + + self.verifyAndMint(recipient: recipient, params: params) + } + + pub fun purchase(recipient: &Collection, params: {String: AnyStruct}, payment: @FungibleToken.Vault) { + pre { + self.getPrices() != nil: + "Don't call this function. The FLOAT is free." + self.getPrices()![payment.getType().identifier] != nil: + "This FLOAT does not support purchasing in the passed in token." + payment.balance == self.getPrices()![payment.getType().identifier]!.price: + "You did not pass in the correct amount of tokens." + self.claimed[recipient.owner!.address] == nil: + "This person already claimed their FLOAT!" + self.claimable: + "This FLOATEvent is not claimable, and thus not currently active." + } + let royalty: UFix64 = 0.05 + let emeraldCityTreasury: Address = 0x5643fd47a29770e7 + let paymentType: String = payment.getType().identifier + let tokenInfo: TokenInfo = self.getPrices()![paymentType]! + + let EventHostVault = getAccount(self.host).getCapability(tokenInfo.path) + .borrow<&{FungibleToken.Receiver}>() + ?? panic("Could not borrow the &{FungibleToken.Receiver} from the event host.") + + assert( + EventHostVault.getType().identifier == paymentType, + message: "The event host's path is not associated with the intended token." + ) + + let EmeraldCityVault = getAccount(emeraldCityTreasury).getCapability(tokenInfo.path) + .borrow<&{FungibleToken.Receiver}>() + ?? panic("Could not borrow the &{FungibleToken.Receiver} from Emerald City's Vault.") + + assert( + EmeraldCityVault.getType().identifier == paymentType, + message: "Emerald City's path is not associated with the intended token." + ) + + let emeraldCityCut <- payment.withdraw(amount: payment.balance * royalty) + + EmeraldCityVault.deposit(from: <- emeraldCityCut) + EventHostVault.deposit(from: <- payment) + + let id = self.verifyAndMint(recipient: recipient, params: params) + + emit FLOATPurchased(id: id, eventHost: self.host, eventId: self.eventId, recipient: recipient.owner!.address, serial: self.totalSupply - 1) + } + + init ( + _claimable: Bool, + _description: String, + _extraMetadata: {String: AnyStruct}, + _host: Address, + _image: String, + _name: String, + _transferrable: Bool, + _url: String, + _verifiers: {String: [{IVerifier}]}, + ) { + self.claimable = _claimable + self.claimed = {} + self.currentHolders = {} + self.dateCreated = getCurrentBlock().timestamp + self.description = _description + self.eventId = self.uuid + self.extraMetadata = _extraMetadata + self.groups = {} + self.host = _host + self.image = _image + self.name = _name + self.transferrable = _transferrable + self.totalSupply = 0 + self.url = _url + self.verifiers = _verifiers + + FLOAT.totalFLOATEvents = FLOAT.totalFLOATEvents + 1 + emit FLOATEventCreated(eventId: self.eventId, description: self.description, host: self.host, image: self.image, name: self.name, url: self.url) + } + + destroy() { + emit FLOATEventDestroyed(eventId: self.eventId, host: self.host, name: self.name) + } + } + + // A container of FLOAT Events (maybe because they're similar to + // one another, or an event host wants to list all their AMAs together, etc). + pub resource Group { + pub let id: UInt64 + pub let name: String + pub let image: String + pub let description: String + // All the FLOAT Events that belong + // to this group. + access(account) var events: {UInt64: Bool} + + access(account) fun addEvent(eventId: UInt64) { + self.events[eventId] = true + } + + access(account) fun removeEvent(eventId: UInt64) { + self.events.remove(key: eventId) + } + + pub fun getEvents(): [UInt64] { + return self.events.keys + } + + init(_name: String, _image: String, _description: String) { + self.id = self.uuid + self.name = _name + self.image = _image + self.description = _description + self.events = {} + } + } + + // + // FLOATEvents + // + pub resource interface FLOATEventsPublic { + // Public Getters + pub fun borrowPublicEventRef(eventId: UInt64): &FLOATEvent{FLOATEventPublic}? + pub fun getAllEvents(): {UInt64: String} + pub fun getIDs(): [UInt64] + pub fun getGroup(groupName: String): &Group? + pub fun getGroups(): [String] + // Account Getters + access(account) fun borrowEventsRef(): &FLOATEvents + } + + // A "Collection" of FLOAT Events + pub resource FLOATEvents: FLOATEventsPublic, MetadataViews.ResolverCollection { + // All the FLOAT Events this collection stores + access(account) var events: @{UInt64: FLOATEvent} + // All the Groups this collection stores + access(account) var groups: @{String: Group} + + // Creates a new FLOAT Event by passing in some basic parameters + // and a list of all the verifiers this event must abide by + pub fun createEvent( + claimable: Bool, + description: String, + image: String, + name: String, + transferrable: Bool, + url: String, + verifiers: [{IVerifier}], + _ extraMetadata: {String: AnyStruct}, + initialGroups: [String] + ): UInt64 { + let typedVerifiers: {String: [{IVerifier}]} = {} + for verifier in verifiers { + let identifier = verifier.getType().identifier + if typedVerifiers[identifier] == nil { + typedVerifiers[identifier] = [verifier] + } else { + typedVerifiers[identifier]!.append(verifier) + } + } + + let FLOATEvent <- create FLOATEvent( + _claimable: claimable, + _description: description, + _extraMetadata: extraMetadata, + _host: self.owner!.address, + _image: image, + _name: name, + _transferrable: transferrable, + _url: url, + _verifiers: typedVerifiers + ) + let eventId = FLOATEvent.eventId + self.events[eventId] <-! FLOATEvent + + for groupName in initialGroups { + self.addEventToGroup(groupName: groupName, eventId: eventId) + } + return eventId + } + + // Deletes an event. Also makes sure to remove + // the event from all the groups its in. + pub fun deleteEvent(eventId: UInt64) { + let eventRef = self.borrowEventRef(eventId: eventId) ?? panic("This FLOAT does not exist.") + for groupName in eventRef.getGroups() { + let groupRef = (&self.groups[groupName] as &Group?)! + groupRef.removeEvent(eventId: eventId) + } + destroy self.events.remove(key: eventId) + } + + pub fun createGroup(groupName: String, image: String, description: String) { + pre { + self.groups[groupName] == nil: "A group with this name already exists." + } + self.groups[groupName] <-! create Group(_name: groupName, _image: image, _description: description) + } + + // Deletes a group. Also makes sure to remove + // the group from all the events that use it. + pub fun deleteGroup(groupName: String) { + let eventsInGroup = self.groups[groupName]?.getEvents() + ?? panic("This Group does not exist.") + for eventId in eventsInGroup { + let ref = (&self.events[eventId] as &FLOATEvent?)! + ref.removeFromGroup(groupName: groupName) + } + destroy self.groups.remove(key: groupName) + } + + // Adds an event to a group. Also adds the group + // to the event. + pub fun addEventToGroup(groupName: String, eventId: UInt64) { + pre { + self.groups[groupName] != nil: "This group does not exist." + self.events[eventId] != nil: "This event does not exist." + } + let groupRef = (&self.groups[groupName] as &Group?)! + groupRef.addEvent(eventId: eventId) + + let eventRef = self.borrowEventRef(eventId: eventId)! + eventRef.addToGroup(groupName: groupName) + } + + // Simply takes the event away from the group + pub fun removeEventFromGroup(groupName: String, eventId: UInt64) { + pre { + self.groups[groupName] != nil: "This group does not exist." + self.events[eventId] != nil: "This event does not exist." + } + let groupRef = (&self.groups[groupName] as &Group?)! + groupRef.removeEvent(eventId: eventId) + + let eventRef = self.borrowEventRef(eventId: eventId)! + eventRef.removeFromGroup(groupName: groupName) + } + + pub fun getGroup(groupName: String): &Group? { + return &self.groups[groupName] as &Group? + } + + pub fun getGroups(): [String] { + return self.groups.keys + } + + // Only accessible to people who share your account. + // If `fromHost` has allowed you to share your account + // in the GrantedAccountAccess.cdc contract, you can get a reference + // to their FLOATEvents here and do pretty much whatever you want. + pub fun borrowSharedRef(fromHost: Address): &FLOATEvents { + let sharedInfo = getAccount(fromHost).getCapability(GrantedAccountAccess.InfoPublicPath) + .borrow<&GrantedAccountAccess.Info{GrantedAccountAccess.InfoPublic}>() + ?? panic("Cannot borrow the InfoPublic from the host") + assert( + sharedInfo.isAllowed(account: self.owner!.address), + message: "This account owner does not share their account with you." + ) + let otherFLOATEvents = getAccount(fromHost).getCapability(FLOAT.FLOATEventsPublicPath) + .borrow<&FLOATEvents{FLOATEventsPublic}>() + ?? panic("Could not borrow the public FLOATEvents.") + return otherFLOATEvents.borrowEventsRef() + } + + // Only used for the above function. + access(account) fun borrowEventsRef(): &FLOATEvents { + return &self as &FLOATEvents + } + + pub fun borrowEventRef(eventId: UInt64): &FLOATEvent? { + return &self.events[eventId] as &FLOATEvent? + } + + /************* Getters (for anyone) *************/ + + // Get a public reference to the FLOATEvent + // so you can call some helpful getters + pub fun borrowPublicEventRef(eventId: UInt64): &FLOATEvent{FLOATEventPublic}? { + return &self.events[eventId] as &FLOATEvent{FLOATEventPublic}? + } + + pub fun getIDs(): [UInt64] { + return self.events.keys + } + + // Maps the eventId to the name of that + // event. Just a kind helper. + pub fun getAllEvents(): {UInt64: String} { + let answer: {UInt64: String} = {} + for id in self.events.keys { + let ref = (&self.events[id] as &FLOATEvent?)! + answer[id] = ref.name + } + return answer + } + + pub fun borrowViewResolver(id: UInt64): &{MetadataViews.Resolver} { + return (&self.events[id] as &{MetadataViews.Resolver}?)! + } + + init() { + self.events <- {} + self.groups <- {} + } + + destroy() { + destroy self.events + destroy self.groups + } + } + + pub fun createEmptyCollection(): @Collection { + return <- create Collection() + } + + pub fun createEmptyFLOATEventCollection(): @FLOATEvents { + return <- create FLOATEvents() + } + + init() { + self.totalSupply = 0 + self.totalFLOATEvents = 0 + emit ContractInitialized() + + self.FLOATCollectionStoragePath = /storage/FLOATCollectionStoragePath + self.FLOATCollectionPublicPath = /public/FLOATCollectionPublicPath + self.FLOATEventsStoragePath = /storage/FLOATEventsStoragePath + self.FLOATEventsPrivatePath = /private/FLOATEventsPrivatePath + self.FLOATEventsPublicPath = /public/FLOATEventsPublicPath + } +} diff --git a/backend/main/cadence/float/FLOATIncinerator.cdc b/backend/main/cadence/float/FLOATIncinerator.cdc new file mode 100644 index 000000000..4f87325b6 --- /dev/null +++ b/backend/main/cadence/float/FLOATIncinerator.cdc @@ -0,0 +1,92 @@ +import FLOAT from 0xf8d6e0586b0a20c7 + +pub contract FLOATIncinerator { + + pub let IncineratorStoragePath: StoragePath + pub let IncineratorPublicPath: PublicPath + + pub var flameStrength: UInt64 + pub var totalIncinerated: UInt64 + + pub resource interface IncineratorPublic { + pub var individualIncinerated: UInt64 + pub var contributedStrength: UInt64 + pub fun getExtraMetadata(): {String: String} + } + + pub resource Incinerator: IncineratorPublic { + pub var individualIncinerated: UInt64 + pub var contributedStrength: UInt64 + access(self) var extraMetadata: {String: String} + + pub fun burn(collection: &FLOAT.Collection, ids: [UInt64]) { + let length = ids.length + + for id in ids { + let float: &FLOAT.NFT = collection.borrowFLOAT(id: id) ?? panic("This FLOAT does not exist.") + let score = FLOATIncinerator.calculateScore(dateReceived: float.dateReceived, serial: float.serial) + self.contributedStrength = self.contributedStrength + score + FLOATIncinerator.flameStrength = FLOATIncinerator.flameStrength + score + collection.delete(id: id) + } + + self.individualIncinerated = self.individualIncinerated + UInt64(length) + FLOATIncinerator.totalIncinerated = FLOATIncinerator.totalIncinerated + UInt64(length) + } + + pub fun getExtraMetadata(): {String: String} { + return self.extraMetadata + } + + init() { + self.individualIncinerated = 0 + self.contributedStrength = 0 + self.extraMetadata = {} + } + } + + pub fun createIncinerator(): @Incinerator { + return <- create Incinerator() + } + + pub fun calculateScore(dateReceived: UFix64, serial: UInt64): UInt64 { + // Serial + var serialScore: UInt64 = 0 + if (serial < 10) { + serialScore = 5 + } else if (serial < 100) { + serialScore = 4 + } else if (serial < 1000) { + serialScore = 3 + } else if (serial < 10000) { + serialScore = 2 + } else if (serial < 100000) { + serialScore = 1 + } + + // Time + var timeScore: UInt64 = 0 + var difference = getCurrentBlock().timestamp - dateReceived + if (difference > 31556926.0) { // a year + timeScore = 5 + } else if (difference > 2629743.0) { // a month + timeScore = 4 + } else if (difference > 604800.0) { // a week + timeScore = 3 + } else if (difference > 86400.0) { // a day + timeScore = 2 + } else if (difference > 3600.0) { // an hour + timeScore = 1 + } + + return serialScore + timeScore + } + + init() { + self.IncineratorStoragePath = /storage/FLOATIncineratorStoragePath + self.IncineratorPublicPath = /public/FLOATIncineratorPublicPath + self.totalIncinerated = 0 + self.flameStrength = 0 + } + +} diff --git a/backend/main/cadence/float/FLOATVerifiers.cdc b/backend/main/cadence/float/FLOATVerifiers.cdc new file mode 100644 index 000000000..3fcd8ca21 --- /dev/null +++ b/backend/main/cadence/float/FLOATVerifiers.cdc @@ -0,0 +1,178 @@ +// MADE BY: Emerald City, Jacob Tucker + +// This contract is probably the most confusing element of the FLOAT +// platform. Listed here is a bunch of Structs which all implement +// FLOAT.IVerifier. + +// This pattern allows us to define arbitrary "restrictions" or "verifiers" +// on our FLOAT Events. For example, Timelock is a verifier that makes sure +// the current time is within the start and end date that the FLOAT Event host +// specified when they created an event. + +// The cool part is all of these verifiers are totally optional, and are only +// passed in with the newly created event if the host wanted to enable them. +// You can mix and match them however you want. For example, one event I could +// use both Timelock and Limited, and for another event I could just use Secret. + +// Each verifier must have a `verify` function that takes in a generalized `params` +// argument so we can pass user data through as well as info about the event itself. +// This is important for Secret for example because we want to pass the users guess +// of the secret code through. For Limited, we need to know the totalSupply of the event, +// so we pass it through as well. + +import FLOAT from 0xf8d6e0586b0a20c7 +import FungibleToken from 0xf8d6e0586b0a20c7 +import FlowToken from 0xf8d6e0586b0a20c7 + +pub contract FLOATVerifiers { + + // The "verifiers" to be used + + // + // Timelock + // + // Specifies a time range in which the + // FLOAT from an event can be claimed + pub struct Timelock: FLOAT.IVerifier { + // An automatic switch handled by the contract + // to stop people from claiming after a certain time. + pub let dateStart: UFix64 + pub let dateEnding: UFix64 + + pub fun verify(_ params: {String: AnyStruct}) { + assert( + getCurrentBlock().timestamp >= self.dateStart, + message: "This FLOAT Event has not started yet." + ) + assert( + getCurrentBlock().timestamp <= self.dateEnding, + message: "Sorry! The time has run out to mint this FLOAT." + ) + } + + init(_dateStart: UFix64, _timePeriod: UFix64) { + self.dateStart = _dateStart + self.dateEnding = self.dateStart + _timePeriod + } + } + + // + // Secret + // + // Specifies a secret code in order + // to claim a FLOAT (not very secure, but cool feature) + pub struct Secret: FLOAT.IVerifier { + // The secret code, set by the owner of this event. + access(self) let secretPhrase: String + + pub fun verify(_ params: {String: AnyStruct}) { + let secretPhrase = params["secretPhrase"]! as! String + assert( + self.secretPhrase == secretPhrase, + message: "You did not input the correct secret phrase." + ) + } + + init(_secretPhrase: String) { + self.secretPhrase = _secretPhrase + } + } + + // + // Limited + // + // Specifies a limit for the amount of people + // who can CLAIM. Not to be confused with how many currently + // hold a FLOAT from this event, since users can + // delete their FLOATs. + pub struct Limited: FLOAT.IVerifier { + pub var capacity: UInt64 + + pub fun verify(_ params: {String: AnyStruct}) { + let event = params["event"]! as! &FLOAT.FLOATEvent{FLOAT.FLOATEventPublic} + let currentCapacity = event.totalSupply + assert( + currentCapacity < self.capacity, + message: "This FLOAT Event is at capacity." + ) + } + + init(_capacity: UInt64) { + self.capacity = _capacity + } + } + + // + // MultipleSecret + // + // Allows for Multiple Secret codes + // Everytime a secret gets used, it gets removed + // from the list. + pub struct MultipleSecret: FLOAT.IVerifier { + access(self) let secrets: {String: Bool} + + pub fun verify(_ params: {String: AnyStruct}) { + let secretPhrase = params["secretPhrase"]! as! String + assert( + self.secrets[secretPhrase] != nil, + message: "You did not input a correct secret phrase." + ) + self.secrets.remove(key: secretPhrase) + } + + init(_secrets: [String]) { + self.secrets = {} + for secret in _secrets { + self.secrets[secret] = true + } + } + } + + // + // SecretV2 + // + // Much more secure than Secret + pub struct SecretV2: FLOAT.IVerifier { + pub let publicKey: String + + pub fun verify(_ params: {String: AnyStruct}) { + let data: [UInt8] = (params["claimee"]! as! Address).toString().utf8 + let sig: [UInt8] = (params["secretSig"]! as! String).decodeHex() + let publicKey = PublicKey(publicKey: self.publicKey.decodeHex(), signatureAlgorithm: SignatureAlgorithm.ECDSA_P256) + let valid = publicKey.verify(signature: sig, signedData: data, domainSeparationTag: "FLOW-V0.0-user", hashAlgorithm: HashAlgorithm.SHA3_256) + + assert( + valid, + message: "You did not input the correct secret phrase." + ) + } + + init(_publicKey: String) { + self.publicKey = _publicKey + } + } + + // + // MinimumBalance + // + // Requires a minimum Flow Balance to succeed + pub struct MinimumBalance: FLOAT.IVerifier { + pub let amount: UFix64 + + pub fun verify(_ params: {String: AnyStruct}) { + let claimee: Address = params["claimee"]! as! Address + let flowVault = getAccount(claimee).getCapability(/public/flowTokenBalance) + .borrow<&FlowToken.Vault{FungibleToken.Balance}>() + ?? panic("Could not borrow the Flow Token Vault") + + assert( + flowVault.balance >= self.amount, + message: "You do not meet the minimum required Flow Token balance." + ) + } + + init(_amount: UFix64) { + self.amount = _amount + } + } +} diff --git a/backend/main/cadence/float/GrantedAccountAccess.cdc b/backend/main/cadence/float/GrantedAccountAccess.cdc new file mode 100644 index 000000000..68e02addf --- /dev/null +++ b/backend/main/cadence/float/GrantedAccountAccess.cdc @@ -0,0 +1,60 @@ +// MADE BY: Emerald City, Jacob Tucker + +// This is a very simple contract that lets users add addresses +// to an "Info" resource signifying they want them to share their account. + +// This is specifically used by the +// `pub fun borrowSharedRef(fromHost: Address): &FLOATEvents` +// function inside FLOAT.cdc to give users access to someone elses +// FLOATEvents if they are on this shared list. + +// This contract is my way of saying I hate private capabilities, so I +// implemented an alternative solution to private access. + +pub contract GrantedAccountAccess { + + pub let InfoStoragePath: StoragePath + pub let InfoPublicPath: PublicPath + + pub resource interface InfoPublic { + pub fun getAllowed(): [Address] + pub fun isAllowed(account: Address): Bool + } + + // A list of people you allow to share your + // account. + pub resource Info: InfoPublic { + access(account) var allowed: {Address: Bool} + + // Allow someone to share your account + pub fun addAccount(account: Address) { + self.allowed[account] = true + } + + pub fun removeAccount(account: Address) { + self.allowed.remove(key: account) + } + + pub fun getAllowed(): [Address] { + return self.allowed.keys + } + + pub fun isAllowed(account: Address): Bool { + return self.allowed.containsKey(account) + } + + init() { + self.allowed = {} + } + } + + pub fun createInfo(): @Info { + return <- create Info() + } + + init() { + self.InfoStoragePath = /storage/GrantedAccountAccessInfo + self.InfoPublicPath = /public/GrantedAccountAccessInfo + } + +} diff --git a/backend/main/cadence/float/transactions/create_event.cdc b/backend/main/cadence/float/transactions/create_event.cdc new file mode 100644 index 000000000..80ffccf2c --- /dev/null +++ b/backend/main/cadence/float/transactions/create_event.cdc @@ -0,0 +1,93 @@ +import FLOAT from "../FLOAT.cdc" +import FLOATVerifiers from "../FLOATVerifiers.cdc" +import NonFungibleToken from "../../core-contracts/NonFungibleToken.cdc" +import MetadataViews from "../../core-contracts/MetadataViews.cdc" +import GrantedAccountAccess from "../../sharedaccount/GrantedAccountAccess.cdc" + +transaction( + forHost: Address, + claimable: Bool, + name: String, + description: String, + image: String, + url: String, + transferrable: Bool, + timelock: Bool, + dateStart: UFix64, + timePeriod: UFix64, + secret: Bool, + secretPK: String, + limited: Bool, + capacity: UInt64, + initialGroups: [String], + flowTokenPurchase: Bool, + flowTokenCost: UFix64, + minimumBalanceToggle: Bool, + minimumBalance: UFix64 +) { + + let FLOATEvents: &FLOAT.FLOATEvents + + prepare(acct: AuthAccount) { + // SETUP COLLECTION + if acct.borrow<&FLOAT.Collection>(from: FLOAT.FLOATCollectionStoragePath) == nil { + acct.save(<- FLOAT.createEmptyCollection(), to: FLOAT.FLOATCollectionStoragePath) + acct.link<&FLOAT.Collection{NonFungibleToken.Receiver, NonFungibleToken.CollectionPublic, MetadataViews.ResolverCollection, FLOAT.CollectionPublic}> + (FLOAT.FLOATCollectionPublicPath, target: FLOAT.FLOATCollectionStoragePath) + } + + // SETUP FLOATEVENTS + if acct.borrow<&FLOAT.FLOATEvents>(from: FLOAT.FLOATEventsStoragePath) == nil { + acct.save(<- FLOAT.createEmptyFLOATEventCollection(), to: FLOAT.FLOATEventsStoragePath) + acct.link<&FLOAT.FLOATEvents{FLOAT.FLOATEventsPublic, MetadataViews.ResolverCollection}> + (FLOAT.FLOATEventsPublicPath, target: FLOAT.FLOATEventsStoragePath) + } + + // SETUP SHARED MINTING + if acct.borrow<&GrantedAccountAccess.Info>(from: GrantedAccountAccess.InfoStoragePath) == nil { + acct.save(<- GrantedAccountAccess.createInfo(), to: GrantedAccountAccess.InfoStoragePath) + acct.link<&GrantedAccountAccess.Info{GrantedAccountAccess.InfoPublic}> + (GrantedAccountAccess.InfoPublicPath, target: GrantedAccountAccess.InfoStoragePath) + } + + if forHost != acct.address { + let FLOATEvents = acct.borrow<&FLOAT.FLOATEvents>(from: FLOAT.FLOATEventsStoragePath) + ?? panic("Could not borrow the FLOATEvents from the signer.") + self.FLOATEvents = FLOATEvents.borrowSharedRef(fromHost: forHost) + } else { + self.FLOATEvents = acct.borrow<&FLOAT.FLOATEvents>(from: FLOAT.FLOATEventsStoragePath) + ?? panic("Could not borrow the FLOATEvents from the signer.") + } + } + + execute { + var Timelock: FLOATVerifiers.Timelock? = nil + var SecretV2: FLOATVerifiers.SecretV2? = nil + var Limited: FLOATVerifiers.Limited? = nil + var MinimumBalance: FLOATVerifiers.MinimumBalance? = nil + var verifiers: [{FLOAT.IVerifier}] = [] + if timelock { + Timelock = FLOATVerifiers.Timelock(_dateStart: dateStart, _timePeriod: timePeriod) + verifiers.append(Timelock!) + } + if secret { + SecretV2 = FLOATVerifiers.SecretV2(_publicKey: secretPK) + verifiers.append(SecretV2!) + } + if limited { + Limited = FLOATVerifiers.Limited(_capacity: capacity) + verifiers.append(Limited!) + } + if minimumBalanceToggle { + MinimumBalance = FLOATVerifiers.MinimumBalance(_amount: minimumBalance) + verifiers.append(MinimumBalance!) + } + let extraMetadata: {String: AnyStruct} = {} + if flowTokenPurchase { + let tokenInfo = FLOAT.TokenInfo(_path: /public/flowTokenReceiver, _price: flowTokenCost) + extraMetadata["prices"] = {"A.1654653399040a61.FlowToken.Vault": tokenInfo} + } + self.FLOATEvents.createEvent(claimable: claimable, description: description, image: image, name: name, transferrable: transferrable, url: url, verifiers: verifiers, extraMetadata, initialGroups: initialGroups) + log("Started a new event for host.") + } +} diff --git a/backend/main/cadence/float/transactions/setup_account.cdc b/backend/main/cadence/float/transactions/setup_account.cdc new file mode 100644 index 000000000..f8715b89e --- /dev/null +++ b/backend/main/cadence/float/transactions/setup_account.cdc @@ -0,0 +1,34 @@ +import FLOAT from "../FLOAT.cdc" +import NonFungibleToken from "../../core-contracts/NonFungibleToken.cdc" +import MetadataViews from "../../core-contracts/MetadataViews.cdc" +import GrantedAccountAccess from "../../sharedaccount/GrantedAccountAccess.cdc" + +transaction { + + prepare(acct: AuthAccount) { + // SETUP COLLECTION + if acct.borrow<&FLOAT.Collection>(from: FLOAT.FLOATCollectionStoragePath) == nil { + acct.save(<- FLOAT.createEmptyCollection(), to: FLOAT.FLOATCollectionStoragePath) + acct.link<&FLOAT.Collection{NonFungibleToken.Receiver, NonFungibleToken.CollectionPublic, MetadataViews.ResolverCollection, FLOAT.CollectionPublic}> + (FLOAT.FLOATCollectionPublicPath, target: FLOAT.FLOATCollectionStoragePath) + } + + // SETUP FLOATEVENTS + if acct.borrow<&FLOAT.FLOATEvents>(from: FLOAT.FLOATEventsStoragePath) == nil { + acct.save(<- FLOAT.createEmptyFLOATEventCollection(), to: FLOAT.FLOATEventsStoragePath) + acct.link<&FLOAT.FLOATEvents{FLOAT.FLOATEventsPublic, MetadataViews.ResolverCollection}> + (FLOAT.FLOATEventsPublicPath, target: FLOAT.FLOATEventsStoragePath) + } + + // SETUP SHARED MINTING + if acct.borrow<&GrantedAccountAccess.Info>(from: GrantedAccountAccess.InfoStoragePath) == nil { + acct.save(<- GrantedAccountAccess.createInfo(), to: GrantedAccountAccess.InfoStoragePath) + acct.link<&GrantedAccountAccess.Info{GrantedAccountAccess.InfoPublic}> + (GrantedAccountAccess.InfoPublicPath, target: GrantedAccountAccess.InfoStoragePath) + } + } + + execute { + log("Finished setting up the account for FLOATs.") + } +} diff --git a/backend/main/cadence/float/transactions/transfer_float.cdc b/backend/main/cadence/float/transactions/transfer_float.cdc new file mode 100644 index 000000000..ac3a11f58 --- /dev/null +++ b/backend/main/cadence/float/transactions/transfer_float.cdc @@ -0,0 +1,30 @@ +import FLOAT from "../FLOAT.cdc" +import NonFungibleToken from "../../core-contracts/NonFungibleToken.cdc" + +transaction(id: UInt64, recipient: Address) { + + let Collection: &FLOAT.Collection + let RecipientCollection: &FLOAT.Collection{NonFungibleToken.CollectionPublic} + + prepare(acct: AuthAccount) { + self.Collection = acct.borrow<&FLOAT.Collection>(from: FLOAT.FLOATCollectionStoragePath) + ?? panic("Could not get the Collection from the signer.") + self.RecipientCollection = getAccount(recipient).getCapability(FLOAT.FLOATCollectionPublicPath) + .borrow<&FLOAT.Collection{NonFungibleToken.CollectionPublic}>() + ?? panic("Could not borrow the recipient's public FLOAT Collection.") + } + + pre { + self.Collection.borrowFLOAT(id: id) != nil: + "You do not own this FLOAT." + self.Collection.borrowFLOAT(id: id)!.getEventMetadata() != nil: + "Could not borrow the public FLOAT Event data." + self.Collection.borrowFLOAT(id: id)!.getEventMetadata()!.transferrable: + "This FLOAT is not giftable on the FLOAT platform." + } + + execute { + self.RecipientCollection.deposit(token: <- self.Collection.withdraw(withdrawID: id)) + log("Transferred the FLOAT.") + } +} From f58cd131cd2d22f45ec795de5e023fb8451274da Mon Sep 17 00:00:00 2001 From: Richard Melkonian Date: Wed, 20 Jul 2022 16:45:00 +0100 Subject: [PATCH 03/21] updated flow nft contracts --- backend/Makefile | 4 +- backend/flow.json | 2 +- backend/main/cadence/contracts/ExampleNFT.cdc | 100 ++- .../main/cadence/contracts/MetadataViews.cdc | 642 ++++++++++++++++-- backend/main/cadence/float/FLOAT.cdc | 4 +- 5 files changed, 686 insertions(+), 66 deletions(-) diff --git a/backend/Makefile b/backend/Makefile index 2c8bc146d..438384cfb 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -17,14 +17,12 @@ build_and_run: build run macrun: build_macos run && NFTdeploy nfts: - flow accounts add-contract MetadataViews ./main/cadence/contracts/MetadataViews.cdc && \ flow accounts add-contract NonFungibleToken ./main/cadence/contracts/NonFungibleToken.cdc && \ + flow accounts add-contract MetadataViews ./main/cadence/contracts/MetadataViews.cdc && \ flow accounts add-contract ExampleNFT ./main/cadence/contracts/ExampleNFT.cdc && \ flow transactions send ./main/cadence/transactions/create_collection.cdc && \ flow transactions send ./main/cadence/transactions/mint_nft.cdc 0xf8d6e0586b0a20c7 "dev_nft" "don't try at home" "thumnbail goes here" - - macdev: APP_ENV=DEV make macrun diff --git a/backend/flow.json b/backend/flow.json index 755f5656a..12fde467b 100644 --- a/backend/flow.json +++ b/backend/flow.json @@ -76,7 +76,7 @@ }, "deployments": { "emulator": { - "emulator-account": ["MetadataViews", "NonFungibleToken", "ExampleNFT"], + "emulator-account": ["NonFungibleToken", "MetadataViews", "ExampleNFT"], "emulator-user1": [], "emulator-user2": [], "emulator-user3": [], diff --git a/backend/main/cadence/contracts/ExampleNFT.cdc b/backend/main/cadence/contracts/ExampleNFT.cdc index 52f49dda0..61ad3b610 100644 --- a/backend/main/cadence/contracts/ExampleNFT.cdc +++ b/backend/main/cadence/contracts/ExampleNFT.cdc @@ -22,22 +22,35 @@ pub contract ExampleNFT: NonFungibleToken { pub let name: String pub let description: String pub let thumbnail: String - + access(self) let royalties: [MetadataViews.Royalty] + access(self) let metadata: {String: AnyStruct} + init( id: UInt64, name: String, description: String, thumbnail: String, + royalties: [MetadataViews.Royalty], + metadata: {String: AnyStruct}, ) { self.id = id self.name = name self.description = description self.thumbnail = thumbnail + self.royalties = royalties + self.metadata = metadata } pub fun getViews(): [Type] { return [ - Type() + Type(), + Type(), + Type(), + Type(), + Type(), + Type(), + Type(), + Type() ] } @@ -51,8 +64,70 @@ pub contract ExampleNFT: NonFungibleToken { url: self.thumbnail ) ) - } + case Type(): + // There is no max number of NFTs that can be minted from this contract + // so the max edition field value is set to nil + let editionInfo = MetadataViews.Edition(name: "Example NFT Edition", number: self.id, max: nil) + let editionList: [MetadataViews.Edition] = [editionInfo] + return MetadataViews.Editions( + editionList + ) + case Type(): + return MetadataViews.Serial( + self.id + ) + case Type(): + return MetadataViews.Royalties( + self.royalties + ) + case Type(): + return MetadataViews.ExternalURL("https://example-nft.onflow.org/".concat(self.id.toString())) + case Type(): + return MetadataViews.NFTCollectionData( + storagePath: ExampleNFT.CollectionStoragePath, + publicPath: ExampleNFT.CollectionPublicPath, + providerPath: /private/exampleNFTCollection, + publicCollection: Type<&ExampleNFT.Collection{ExampleNFT.ExampleNFTCollectionPublic}>(), + publicLinkedType: Type<&ExampleNFT.Collection{ExampleNFT.ExampleNFTCollectionPublic,NonFungibleToken.CollectionPublic,NonFungibleToken.Receiver,MetadataViews.ResolverCollection}>(), + providerLinkedType: Type<&ExampleNFT.Collection{ExampleNFT.ExampleNFTCollectionPublic,NonFungibleToken.CollectionPublic,NonFungibleToken.Provider,MetadataViews.ResolverCollection}>(), + createEmptyCollectionFunction: (fun (): @NonFungibleToken.Collection { + return <-ExampleNFT.createEmptyCollection() + }) + ) + case Type(): + let media = MetadataViews.Media( + file: MetadataViews.HTTPFile( + url: "https://assets.website-files.com/5f6294c0c7a8cdd643b1c820/5f6294c0c7a8cda55cb1c936_Flow_Wordmark.svg" + ), + mediaType: "image/svg+xml" + ) + return MetadataViews.NFTCollectionDisplay( + name: "The Example Collection", + description: "This collection is used as an example to help you develop your next Flow NFT.", + externalURL: MetadataViews.ExternalURL("https://example-nft.onflow.org"), + squareImage: media, + bannerImage: media, + socials: { + "twitter": MetadataViews.ExternalURL("https://twitter.com/flow_blockchain") + } + ) + case Type(): + // exclude mintedTime and foo to show other uses of Traits + let excludedTraits = ["mintedTime", "foo"] + let traitsView = MetadataViews.dictToTraits(dict: self.metadata, excludedNames: excludedTraits) + + // mintedTime is a unix timestamp, we should mark it with a displayType so platforms know how to show it. + let mintedTimeTrait = MetadataViews.Trait(name: "mintedTime", value: self.metadata["mintedTime"]!, displayType: "Date", rarity: nil) + traitsView.addTrait(mintedTimeTrait) + + // foo is a trait with its own rarity + let fooTraitRarity = MetadataViews.Rarity(score: 10.0, max: 100.0, description: "Common") + let fooTrait = MetadataViews.Trait(name: "foo", value: self.metadata["foo"], displayType: nil, rarity: fooTraitRarity) + traitsView.addTrait(fooTrait) + + return traitsView + } return nil } } @@ -110,13 +185,13 @@ pub contract ExampleNFT: NonFungibleToken { // borrowNFT gets a reference to an NFT in the collection // so that the caller can read its metadata and call its methods pub fun borrowNFT(id: UInt64): &NonFungibleToken.NFT { - return &self.ownedNFTs[id] as &NonFungibleToken.NFT + return (&self.ownedNFTs[id] as &NonFungibleToken.NFT?)! } pub fun borrowExampleNFT(id: UInt64): &ExampleNFT.NFT? { if self.ownedNFTs[id] != nil { // Create an authorized reference to allow downcasting - let ref = &self.ownedNFTs[id] as auth &NonFungibleToken.NFT + let ref = (&self.ownedNFTs[id] as auth &NonFungibleToken.NFT?)! return ref as! &ExampleNFT.NFT } @@ -124,7 +199,7 @@ pub contract ExampleNFT: NonFungibleToken { } pub fun borrowViewResolver(id: UInt64): &AnyResource{MetadataViews.Resolver} { - let nft = &self.ownedNFTs[id] as auth &NonFungibleToken.NFT + let nft = (&self.ownedNFTs[id] as auth &NonFungibleToken.NFT?)! let exampleNFT = nft as! &ExampleNFT.NFT return exampleNFT as &AnyResource{MetadataViews.Resolver} } @@ -151,7 +226,16 @@ pub contract ExampleNFT: NonFungibleToken { name: String, description: String, thumbnail: String, + royalties: [MetadataViews.Royalty] ) { + let metadata: {String: AnyStruct} = {} + let currentBlock = getCurrentBlock() + metadata["mintedBlock"] = currentBlock.height + metadata["mintedTime"] = currentBlock.timestamp + metadata["minter"] = recipient.owner!.address + + // this piece of metadata will be used to show embedding rarity into a trait + metadata["foo"] = "bar" // create a new NFT var newNFT <- create NFT( @@ -159,6 +243,8 @@ pub contract ExampleNFT: NonFungibleToken { name: name, description: description, thumbnail: thumbnail, + royalties: royalties, + metadata: metadata, ) // deposit it in the recipient's account using their reference @@ -182,7 +268,7 @@ pub contract ExampleNFT: NonFungibleToken { self.account.save(<-collection, to: self.CollectionStoragePath) // create a public capability for the collection - self.account.link<&ExampleNFT.Collection{NonFungibleToken.CollectionPublic, ExampleNFT.ExampleNFTCollectionPublic}>( + self.account.link<&ExampleNFT.Collection{NonFungibleToken.CollectionPublic, ExampleNFT.ExampleNFTCollectionPublic, MetadataViews.ResolverCollection}>( self.CollectionPublicPath, target: self.CollectionStoragePath ) diff --git a/backend/main/cadence/contracts/MetadataViews.cdc b/backend/main/cadence/contracts/MetadataViews.cdc index 866d84f36..1819f4f2e 100644 --- a/backend/main/cadence/contracts/MetadataViews.cdc +++ b/backend/main/cadence/contracts/MetadataViews.cdc @@ -11,49 +11,85 @@ a different kind of metadata, such as a creator biography or a JPEG image file. */ +import FungibleToken from 0xee82856bf20e2aa6 +import NonFungibleToken from 0xf8d6e0586b0a20c7 + pub contract MetadataViews { - // A Resolver provides access to a set of metadata views. - // - // A struct or resource (e.g. an NFT) can implement this interface - // to provide access to the views that it supports. - // + /// A Resolver provides access to a set of metadata views. + /// + /// A struct or resource (e.g. an NFT) can implement this interface + /// to provide access to the views that it supports. + /// pub resource interface Resolver { pub fun getViews(): [Type] pub fun resolveView(_ view: Type): AnyStruct? } - // A ResolverCollection is a group of view resolvers index by ID. - // + /// A ResolverCollection is a group of view resolvers index by ID. + /// pub resource interface ResolverCollection { pub fun borrowViewResolver(id: UInt64): &{Resolver} pub fun getIDs(): [UInt64] } - // Display is a basic view that includes the name, description and - // thumbnail for an object. Most objects should implement this view. - // + /// NFTView is a group of views used to give a complete picture of an NFT + /// + pub struct NFTView { + pub let id: UInt64 + pub let uuid: UInt64 + pub let display: Display? + pub let externalURL: ExternalURL? + pub let collectionData: NFTCollectionData? + pub let collectionDisplay: NFTCollectionDisplay? + pub let royalties: Royalties? + pub let traits: Traits? + + init( + id : UInt64, + uuid : UInt64, + display : Display?, + externalURL : ExternalURL?, + collectionData : NFTCollectionData?, + collectionDisplay : NFTCollectionDisplay?, + royalties : Royalties?, + traits: Traits? + ) { + self.id = id + self.uuid = uuid + self.display = display + self.externalURL = externalURL + self.collectionData = collectionData + self.collectionDisplay = collectionDisplay + self.royalties = royalties + self.traits = traits + } + } + + /// Display is a basic view that includes the name, description and + /// thumbnail for an object. Most objects should implement this view. + /// pub struct Display { - // The name of the object. - // - // This field will be displayed in lists and therefore should - // be short an concise. - // + /// The name of the object. + /// + /// This field will be displayed in lists and therefore should + /// be short an concise. + /// pub let name: String - // A written description of the object. - // - // This field will be displayed in a detailed view of the object, - // so can be more verbose (e.g. a paragraph instead of a single line). - // + /// A written description of the object. + /// + /// This field will be displayed in a detailed view of the object, + /// so can be more verbose (e.g. a paragraph instead of a single line). + /// pub let description: String - // A small thumbnail representation of the object. - // - // This field should be a web-friendly file (i.e JPEG, PNG) - // that can be displayed in lists, link previews, etc. - // + /// A small thumbnail representation of the object. + /// + /// This field should be a web-friendly file (i.e JPEG, PNG) + /// that can be displayed in lists, link previews, etc. + /// pub let thumbnail: AnyStruct{File} init( @@ -67,16 +103,26 @@ pub contract MetadataViews { } } - // File is a generic interface that represents a file stored on or off chain. - // - // Files can be used to references images, videos and other media. - // + /// A helper to get Display in a typesafe way + pub fun getDisplay(_ viewResolver: &{Resolver}) : Display? { + if let view = viewResolver.resolveView(Type()) { + if let v = view as? Display { + return v + } + } + return nil + } + + /// File is a generic interface that represents a file stored on or off chain. + /// + /// Files can be used to references images, videos and other media. + /// pub struct interface File { pub fun uri(): String } - // HTTPFile is a file that is accessible at an HTTP (or HTTPS) URL. - // + /// HTTPFile is a file that is accessible at an HTTP (or HTTPS) URL. + /// pub struct HTTPFile: File { pub let url: String @@ -89,27 +135,27 @@ pub contract MetadataViews { } } - // IPFSThumbnail returns a thumbnail image for an object - // stored as an image file in IPFS. - // - // IPFS images are referenced by their content identifier (CID) - // rather than a direct URI. A client application can use this CID - // to find and load the image via an IPFS gateway. - // + /// IPFSFile returns a thumbnail image for an object + /// stored as an image file in IPFS. + /// + /// IPFS images are referenced by their content identifier (CID) + /// rather than a direct URI. A client application can use this CID + /// to find and load the image via an IPFS gateway. + /// pub struct IPFSFile: File { - // CID is the content identifier for this IPFS file. - // - // Ref: https://docs.ipfs.io/concepts/content-addressing/ - // + /// CID is the content identifier for this IPFS file. + /// + /// Ref: https://docs.ipfs.io/concepts/content-addressing/ + /// pub let cid: String - // Path is an optional path to the file resource in an IPFS directory. - // - // This field is only needed if the file is inside a directory. - // - // Ref: https://docs.ipfs.io/concepts/file-systems/ - // + /// Path is an optional path to the file resource in an IPFS directory. + /// + /// This field is only needed if the file is inside a directory. + /// + /// Ref: https://docs.ipfs.io/concepts/file-systems/ + /// pub let path: String? init(cid: String, path: String?) { @@ -117,16 +163,506 @@ pub contract MetadataViews { self.path = path } - // This function returns the IPFS native URL for this file. - // - // Ref: https://docs.ipfs.io/how-to/address-ipfs-on-web/#native-urls - // + /// This function returns the IPFS native URL for this file. + /// + /// Ref: https://docs.ipfs.io/how-to/address-ipfs-on-web/#native-urls + /// pub fun uri(): String { if let path = self.path { return "ipfs://".concat(self.cid).concat("/").concat(path) } - + return "ipfs://".concat(self.cid) } } + + /// Editions is an optional view for collections that issues multiple objects + /// with the same or similar metadata, for example an X of 100 set. This information is + /// useful for wallets and marketplaes. + /// + /// An NFT might be part of multiple editions, which is why the edition information + /// is returned as an arbitrary sized array + /// + pub struct Editions { + + /// An arbitrary-sized list for any number of editions + /// that the NFT might be a part of + pub let infoList: [Edition] + + init(_ infoList: [Edition]) { + self.infoList = infoList + } + } + + /// A helper to get Editions in a typesafe way + pub fun getEditions(_ viewResolver: &{Resolver}) : Editions? { + if let view = viewResolver.resolveView(Type()) { + if let v = view as? Editions { + return v + } + } + return nil + } + + /// Edition information for a single edition + pub struct Edition { + + /// The name of the edition + /// For example, this could be Set, Play, Series, + /// or any other way a project could classify its editions + pub let name: String? + + /// The edition number of the object. + /// + /// For an "24 of 100 (#24/100)" item, the number is 24. + /// + pub let number: UInt64 + + /// The max edition number of this type of objects. + /// + /// This field should only be provided for limited-editioned objects. + /// For an "24 of 100 (#24/100)" item, max is 100. + /// For an item with unlimited edition, max should be set to nil. + /// + pub let max: UInt64? + + init(name: String?, number: UInt64, max: UInt64?) { + if max != nil { + assert(number <= max!, message: "The number cannot be greater than the max number!") + } + self.name = name + self.number = number + self.max = max + } + } + + + /// A view representing a project-defined serial number for a specific NFT + /// Projects have different definitions for what a serial number should be + /// Some may use the NFTs regular ID and some may use a different classification system + /// The serial number is expected to be unique among other NFTs within that project + /// + pub struct Serial { + pub let number: UInt64 + + init(_ number: UInt64) { + self.number = number + } + } + + /// A helper to get Serial in a typesafe way + pub fun getSerial(_ viewResolver: &{Resolver}) : Serial? { + if let view = viewResolver.resolveView(Type()) { + if let v = view as? Serial { + return v + } + } + return nil + } + + /* + * Royalty Views + * Defines the composable royalty standard that gives marketplaces a unified interface + * to support NFT royalties. + * + * Marketplaces can query this `Royalties` struct from NFTs + * and are expected to pay royalties based on these specifications. + * + */ + pub struct Royalties { + + /// Array that tracks the individual royalties + access(self) let cutInfos: [Royalty] + + pub init(_ cutInfos: [Royalty]) { + // Validate that sum of all cut multipliers should not be greater than 1.0 + var totalCut = 0.0 + for royalty in cutInfos { + totalCut = totalCut + royalty.cut + } + assert(totalCut <= 1.0, message: "Sum of cutInfos multipliers should not be greater than 1.0") + // Assign the cutInfos + self.cutInfos = cutInfos + } + + /// Return the cutInfos list + pub fun getRoyalties(): [Royalty] { + return self.cutInfos + } + } + + /// A helper to get Royalties in a typesafe way + pub fun getRoyalties(_ viewResolver: &{Resolver}) : Royalties? { + if let view = viewResolver.resolveView(Type()) { + if let v = view as? Royalties { + return v + } + } + return nil + } + + /// Struct to store details of a single royalty cut for a given NFT + pub struct Royalty { + + /// Generic FungibleToken Receiver for the beneficiary of the royalty + /// Can get the concrete type of the receiver with receiver.getType() + /// Recommendation - Users should create a new link for a FlowToken receiver for this using `getRoyaltyReceiverPublicPath()`, + /// and not use the default FlowToken receiver. + /// This will allow users to update the capability in the future to use a more generic capability + pub let receiver: Capability<&AnyResource{FungibleToken.Receiver}> + + /// Multiplier used to calculate the amount of sale value transferred to royalty receiver. + /// Note - It should be between 0.0 and 1.0 + /// Ex - If the sale value is x and multiplier is 0.56 then the royalty value would be 0.56 * x. + /// + /// Generally percentage get represented in terms of basis points + /// in solidity based smart contracts while cadence offers `UFix64` that already supports + /// the basis points use case because its operations + /// are entirely deterministic integer operations and support up to 8 points of precision. + pub let cut: UFix64 + + /// Optional description: This can be the cause of paying the royalty, + /// the relationship between the `wallet` and the NFT, or anything else that the owner might want to specify + pub let description: String + + init(recepient: Capability<&AnyResource{FungibleToken.Receiver}>, cut: UFix64, description: String) { + pre { + cut >= 0.0 && cut <= 1.0 : "Cut value should be in valid range i.e [0,1]" + } + self.receiver = recepient + self.cut = cut + self.description = description + } + } + + /// Get the path that should be used for receiving royalties + /// This is a path that will eventually be used for a generic switchboard receiver, + /// hence the name but will only be used for royalties for now. + pub fun getRoyaltyReceiverPublicPath(): PublicPath { + return /public/GenericFTReceiver + } + + /// Medias is an optional view for collections that issue objects with multiple Media sources in it + /// + pub struct Medias { + + /// An arbitrary-sized list for any number of Media items + pub let items: [Media] + + init(_ items: [Media]) { + self.items = items + } + } + + /// A helper to get Medias in a typesafe way + pub fun getMedias(_ viewResolver: &{Resolver}) : Medias? { + if let view = viewResolver.resolveView(Type()) { + if let v = view as? Medias { + return v + } + } + return nil + } + + /// A view to represent Media, a file with an correspoiding mediaType. + pub struct Media { + + /// File for the media + pub let file: AnyStruct{File} + + /// media-type comes on the form of type/subtype as described here https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types + pub let mediaType: String + + init(file: AnyStruct{File}, mediaType: String) { + self.file=file + self.mediaType=mediaType + } + } + + /// A license according to https://spdx.org/licenses/ + /// + /// This view can be used if the content of an NFT is licensed. + pub struct License { + pub let spdxIdentifier: String + + init(_ identifier: String) { + self.spdxIdentifier = identifier + } + } + + /// A helper to get License in a typesafe way + pub fun getLicense(_ viewResolver: &{Resolver}) : License? { + if let view = viewResolver.resolveView(Type()) { + if let v = view as? License { + return v + } + } + return nil + } + + + /// A view to expose a URL to this item on an external site. + /// + /// This can be used by applications like .find and Blocto to direct users to the original link for an NFT. + pub struct ExternalURL { + pub let url: String + + init(_ url: String) { + self.url=url + } + } + + /// A helper to get ExternalURL in a typesafe way + pub fun getExternalURL(_ viewResolver: &{Resolver}) : ExternalURL? { + if let view = viewResolver.resolveView(Type()) { + if let v = view as? ExternalURL { + return v + } + } + return nil + } + + // A view to expose the information needed store and retrieve an NFT + // + // This can be used by applications to setup a NFT collection with proper storage and public capabilities. + pub struct NFTCollectionData { + /// Path in storage where this NFT is recommended to be stored. + pub let storagePath: StoragePath + + /// Public path which must be linked to expose public capabilities of this NFT + /// including standard NFT interfaces and metadataviews interfaces + pub let publicPath: PublicPath + + /// Private path which should be linked to expose the provider + /// capability to withdraw NFTs from the collection holding NFTs + pub let providerPath: PrivatePath + + /// Public collection type that is expected to provide sufficient read-only access to standard + /// functions (deposit + getIDs + borrowNFT) + /// This field is for backwards compatibility with collections that have not used the standard + /// NonFungibleToken.CollectionPublic interface when setting up collections. For new + /// collections, this may be set to be equal to the type specified in `publicLinkedType`. + pub let publicCollection: Type + + /// Type that should be linked at the aforementioned public path. This is normally a + /// restricted type with many interfaces. Notably the `NFT.CollectionPublic`, + /// `NFT.Receiver`, and `MetadataViews.ResolverCollection` interfaces are required. + pub let publicLinkedType: Type + + /// Type that should be linked at the aforementioned private path. This is normally + /// a restricted type with at a minimum the `NFT.Provider` interface + pub let providerLinkedType: Type + + /// Function that allows creation of an empty NFT collection that is intended to store + /// this NFT. + pub let createEmptyCollection: ((): @NonFungibleToken.Collection) + + init( + storagePath: StoragePath, + publicPath: PublicPath, + providerPath: PrivatePath, + publicCollection: Type, + publicLinkedType: Type, + providerLinkedType: Type, + createEmptyCollectionFunction: ((): @NonFungibleToken.Collection) + ) { + pre { + publicLinkedType.isSubtype(of: Type<&{NonFungibleToken.CollectionPublic, NonFungibleToken.Receiver, MetadataViews.ResolverCollection}>()): "Public type must include NonFungibleToken.CollectionPublic, NonFungibleToken.Receiver, and MetadataViews.ResolverCollection interfaces." + providerLinkedType.isSubtype(of: Type<&{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic, MetadataViews.ResolverCollection}>()): "Provider type must include NonFungibleToken.Provider, NonFungibleToken.CollectionPublic, and MetadataViews.ResolverCollection interface." + } + self.storagePath=storagePath + self.publicPath=publicPath + self.providerPath = providerPath + self.publicCollection=publicCollection + self.publicLinkedType=publicLinkedType + self.providerLinkedType = providerLinkedType + self.createEmptyCollection=createEmptyCollectionFunction + } + } + + /// A helper to get NFTCollectionData in a way that will return an typed Optional + pub fun getNFTCollectionData(_ viewResolver: &{Resolver}) : NFTCollectionData? { + if let view = viewResolver.resolveView(Type()) { + if let v = view as? NFTCollectionData { + return v + } + } + return nil + } + + // A view to expose the information needed to showcase this NFT's collection + // + // This can be used by applications to give an overview and graphics of the NFT collection + // this NFT belongs to. + pub struct NFTCollectionDisplay { + // Name that should be used when displaying this NFT collection. + pub let name: String + + // Description that should be used to give an overview of this collection. + pub let description: String + + // External link to a URL to view more information about this collection. + pub let externalURL: ExternalURL + + // Square-sized image to represent this collection. + pub let squareImage: Media + + // Banner-sized image for this collection, recommended to have a size near 1200x630. + pub let bannerImage: Media + + // Social links to reach this collection's social homepages. + // Possible keys may be "instagram", "twitter", "discord", etc. + pub let socials: {String: ExternalURL} + + init( + name: String, + description: String, + externalURL: ExternalURL, + squareImage: Media, + bannerImage: Media, + socials: {String: ExternalURL} + ) { + self.name = name + self.description = description + self.externalURL = externalURL + self.squareImage = squareImage + self.bannerImage = bannerImage + self.socials = socials + } + } + + /// A helper to get NFTCollectionDisplay in a way that will return an typed Optional + pub fun getNFTCollectionDisplay(_ viewResolver: &{Resolver}) : NFTCollectionDisplay? { + if let view = viewResolver.resolveView(Type()) { + if let v = view as? NFTCollectionDisplay { + return v + } + } + return nil + } + + // A view to represent a single field of metadata on an NFT. + // + // This is used to get traits of individual key/value pairs along with some contextualized data about the trait + pub struct Trait { + // The name of the trait. Like Background, Eyes, Hair, etc. + pub let name: String + + // The underlying value of the trait, the rest of the fields of a trait provide context to the value. + pub let value: AnyStruct + + // displayType is used to show some context about what this name and value represent + // for instance, you could set value to a unix timestamp, and specify displayType as "Date" to tell + // platforms to consume this trait as a date and not a number + pub let displayType: String? + + // Rarity can also be used directly on an attribute. + // + // This is optional because not all attributes need to contribute to the NFT's rarity. + pub let rarity: Rarity? + + init(name: String, value: AnyStruct, displayType: String?, rarity: Rarity?) { + self.name = name + self.value = value + self.displayType = displayType + self.rarity = rarity + } + } + + // A view to return all the traits on an NFT. + // + // This is used to return traits as individual key/value pairs along with some contextualized data about each trait. + pub struct Traits { + pub let traits: [Trait] + + init(_ traits: [Trait]) { + self.traits = traits + } + + pub fun addTrait(_ t: Trait) { + self.traits.append(t) + } + } + + /// A helper to get Traits view in a typesafe way + pub fun getTraits(_ viewResolver: &{Resolver}) : Traits? { + if let view = viewResolver.resolveView(Type()) { + if let v = view as? Traits { + return v + } + } + return nil + } + + // A helper function to easily convert a dictionary to traits. For NFT collections that do not need either of the + // optional values of a Trait, this method should suffice to give them an array of valid traits. + pub fun dictToTraits(dict: {String: AnyStruct}, excludedNames: [String]?): Traits { + // Collection owners might not want all the fields in their metadata included. + // They might want to handle some specially, or they might just not want them included at all. + if excludedNames != nil { + for k in excludedNames! { + dict.remove(key: k) + } + } + + let traits: [Trait] = [] + for k in dict.keys { + let trait = Trait(name: k, value: dict[k]!, displayType: nil, rarity: nil) + traits.append(trait) + } + + return Traits(traits) + } + + /// Rarity information for a single rarity + // + /// Note that a rarity needs to have either score or description but it can have both + pub struct Rarity { + /// The score of the rarity as a number + /// + pub let score: UFix64? + + /// The maximum value of score + /// + pub let max: UFix64? + + /// The description of the rarity as a string. + /// + /// This could be Legendary, Epic, Rare, Uncommon, Common or any other string value + pub let description: String? + + init(score: UFix64?, max: UFix64?, description: String?) { + if score == nil && description == nil { + panic("A Rarity needs to set score, description or both") + } + + self.score = score + self.max = max + self.description = description + } + } + + /// A helper to get Rarity view in a typesafe way + pub fun getRarity(_ viewResolver: &{Resolver}) : Rarity? { + if let view = viewResolver.resolveView(Type()) { + if let v = view as? Rarity { + return v + } + } + return nil + } + + pub fun getNFTView(id: UInt64, viewResolver: &{Resolver}) : NFTView { + return NFTView( + id : id, + uuid: viewResolver.uuid, + display: self.getDisplay(viewResolver), + externalURL : self.getExternalURL(viewResolver), + collectionData : self.getNFTCollectionData(viewResolver), + collectionDisplay : self.getNFTCollectionDisplay(viewResolver), + royalties : self.getRoyalties(viewResolver), + traits : self.getTraits(viewResolver) + ) + } + } diff --git a/backend/main/cadence/float/FLOAT.cdc b/backend/main/cadence/float/FLOAT.cdc index d674095a8..819d478b5 100644 --- a/backend/main/cadence/float/FLOAT.cdc +++ b/backend/main/cadence/float/FLOAT.cdc @@ -35,8 +35,8 @@ import NonFungibleToken from 0xf8d6e0586b0a20c7 import MetadataViews from 0xf8d6e0586b0a20c7 import GrantedAccountAccess from 0xf8d6e0586b0a20c7 -import FungibleToken from 0xf8d6e0586b0a20c7 -import FlowToken from 0xf8d6e0586b0a20c7 +import FungibleToken from 0xee82856bf20e2aa6 +import FlowToken from 0x0ae53cb6e3f42a79 pub contract FLOAT: NonFungibleToken { From 1af2f878102712b500bc0078b934b0fd1cf355f5 Mon Sep 17 00:00:00 2001 From: Richard Melkonian Date: Wed, 20 Jul 2022 16:47:01 +0100 Subject: [PATCH 04/21] updated flow nfts contracts to latest versions --- backend/main/cadence/float/FLOAT.cdc | 1013 ----------------- .../main/cadence/float/FLOATIncinerator.cdc | 92 -- backend/main/cadence/float/FLOATVerifiers.cdc | 178 --- .../cadence/float/GrantedAccountAccess.cdc | 60 - .../float/transactions/create_event.cdc | 93 -- .../float/transactions/setup_account.cdc | 34 - .../float/transactions/transfer_float.cdc | 30 - 7 files changed, 1500 deletions(-) delete mode 100644 backend/main/cadence/float/FLOAT.cdc delete mode 100644 backend/main/cadence/float/FLOATIncinerator.cdc delete mode 100644 backend/main/cadence/float/FLOATVerifiers.cdc delete mode 100644 backend/main/cadence/float/GrantedAccountAccess.cdc delete mode 100644 backend/main/cadence/float/transactions/create_event.cdc delete mode 100644 backend/main/cadence/float/transactions/setup_account.cdc delete mode 100644 backend/main/cadence/float/transactions/transfer_float.cdc diff --git a/backend/main/cadence/float/FLOAT.cdc b/backend/main/cadence/float/FLOAT.cdc deleted file mode 100644 index 819d478b5..000000000 --- a/backend/main/cadence/float/FLOAT.cdc +++ /dev/null @@ -1,1013 +0,0 @@ -// MADE BY: Emerald City, Jacob Tucker - -// This contract is for FLOAT, a proof of participation platform -// on Flow. It is similar to POAP, but a lot, lot cooler. ;) - -// The main idea is that FLOATs are simply NFTs. They are minted from -// a FLOATEvent, which is basically an event that a host starts. For example, -// if I have a Twitter space and want to create an event for it, I can create -// a new FLOATEvent in my FLOATEvents collection and mint FLOATs to people -// from this Twitter space event representing that they were there. - -// The complicated part is the FLOATVerifiers contract. That contract -// defines a list of "verifiers" that can be tagged onto a FLOATEvent to make -// the claiming more secure. For example, a host can decide to put a time -// constraint on when users can claim a FLOAT. They would do that by passing in -// a Timelock struct (defined in FLOATVerifiers.cdc) with a time period for which -// users can claim. - -// For a whole list of verifiers, see FLOATVerifiers.cdc - -// Lastly, we implemented GrantedAccountAccess.cdc, which allows you to specify -// someone else can control your account (in the context of FLOAT). This -// is specifically designed for teams to be able to handle one "host" on the -// FLOAT platform so all the company's events are under one account. -// This is mainly used to give other people access to your FLOATEvents resource, -// and allow them to mint for you and control Admin operations on your events. - -// For more info on GrantedAccountAccess, see GrantedAccountAccess.cdc - -// import NonFungibleToken from 0x1d7e57aa55817448 -// import MetadataViews from 0x1d7e57aa55817448 -// import GrantedAccountAccess from 0x2d4c3caffbeab845 -// import FungibleToken from 0xf233dcee88fe0abe -// import FlowToken from 0x1654653399040a61 -import NonFungibleToken from 0xf8d6e0586b0a20c7 -import MetadataViews from 0xf8d6e0586b0a20c7 -import GrantedAccountAccess from 0xf8d6e0586b0a20c7 -import FungibleToken from 0xee82856bf20e2aa6 -import FlowToken from 0x0ae53cb6e3f42a79 - -pub contract FLOAT: NonFungibleToken { - - /***********************************************/ - /******************** PATHS ********************/ - /***********************************************/ - - pub let FLOATCollectionStoragePath: StoragePath - pub let FLOATCollectionPublicPath: PublicPath - pub let FLOATEventsStoragePath: StoragePath - pub let FLOATEventsPublicPath: PublicPath - pub let FLOATEventsPrivatePath: PrivatePath - - /************************************************/ - /******************** EVENTS ********************/ - /************************************************/ - - pub event ContractInitialized() - pub event FLOATMinted(id: UInt64, eventHost: Address, eventId: UInt64, eventImage: String, recipient: Address, serial: UInt64) - pub event FLOATClaimed(id: UInt64, eventHost: Address, eventId: UInt64, eventImage: String, eventName: String, recipient: Address, serial: UInt64) - pub event FLOATDestroyed(id: UInt64, eventHost: Address, eventId: UInt64, eventImage: String, serial: UInt64) - pub event FLOATTransferred(id: UInt64, eventHost: Address, eventId: UInt64, newOwner: Address?, serial: UInt64) - pub event FLOATPurchased(id: UInt64, eventHost: Address, eventId: UInt64, recipient: Address, serial: UInt64) - pub event FLOATEventCreated(eventId: UInt64, description: String, host: Address, image: String, name: String, url: String) - pub event FLOATEventDestroyed(eventId: UInt64, host: Address, name: String) - - pub event Deposit(id: UInt64, to: Address?) - pub event Withdraw(id: UInt64, from: Address?) - - /***********************************************/ - /******************** STATE ********************/ - /***********************************************/ - - // The total amount of FLOATs that have ever been - // created (does not go down when a FLOAT is destroyed) - pub var totalSupply: UInt64 - // The total amount of FLOATEvents that have ever been - // created (does not go down when a FLOATEvent is destroyed) - pub var totalFLOATEvents: UInt64 - - /***********************************************/ - /**************** FUNCTIONALITY ****************/ - /***********************************************/ - - // A helpful wrapper to contain an address, - // the id of a FLOAT, and its serial - pub struct TokenIdentifier { - pub let id: UInt64 - pub let address: Address - pub let serial: UInt64 - - init(_id: UInt64, _address: Address, _serial: UInt64) { - self.id = _id - self.address = _address - self.serial = _serial - } - } - - pub struct TokenInfo { - pub let path: PublicPath - pub let price: UFix64 - - init(_path: PublicPath, _price: UFix64) { - self.path = _path - self.price = _price - } - } - - // Represents a FLOAT - pub resource NFT: NonFungibleToken.INFT, MetadataViews.Resolver { - // The `uuid` of this resource - pub let id: UInt64 - - // Some of these are also duplicated on the event, - // but it's necessary to put them here as well - // in case the FLOATEvent host deletes the event - pub let dateReceived: UFix64 - pub let eventDescription: String - pub let eventHost: Address - pub let eventId: UInt64 - pub let eventImage: String - pub let eventName: String - pub let originalRecipient: Address - pub let serial: UInt64 - - // A capability that points to the FLOATEvents this FLOAT is from. - // There is a chance the event host unlinks their event from - // the public, in which case it's impossible to know details - // about the event. Which is fine, since we store the - // crucial data to know about the FLOAT in the FLOAT itself. - pub let eventsCap: Capability<&FLOATEvents{FLOATEventsPublic, MetadataViews.ResolverCollection}> - - // Helper function to get the metadata of the event - // this FLOAT is from. - pub fun getEventMetadata(): &FLOATEvent{FLOATEventPublic}? { - if let events = self.eventsCap.borrow() { - return events.borrowPublicEventRef(eventId: self.eventId) - } - return nil - } - - // This is for the MetdataStandard - pub fun getViews(): [Type] { - return [ - Type(), - Type() - ] - } - - // This is for the MetdataStandard - pub fun resolveView(_ view: Type): AnyStruct? { - switch view { - case Type(): - return MetadataViews.Display( - name: self.eventName, - description: self.eventDescription, - thumbnail: MetadataViews.IPFSFile(cid: self.eventImage, path: nil) - ) - case Type(): - return TokenIdentifier( - _id: self.id, - _address: self.owner!.address, - _serial: self.serial - ) - } - - return nil - } - - init(_eventDescription: String, _eventHost: Address, _eventId: UInt64, _eventImage: String, _eventName: String, _originalRecipient: Address, _serial: UInt64) { - self.id = self.uuid - self.dateReceived = getCurrentBlock().timestamp - self.eventDescription = _eventDescription - self.eventHost = _eventHost - self.eventId = _eventId - self.eventImage = _eventImage - self.eventName = _eventName - self.originalRecipient = _originalRecipient - self.serial = _serial - - // Stores a capability to the FLOATEvents of its creator - self.eventsCap = getAccount(_eventHost) - .getCapability<&FLOATEvents{FLOATEventsPublic, MetadataViews.ResolverCollection}>(FLOAT.FLOATEventsPublicPath) - - emit FLOATMinted( - id: self.id, - eventHost: _eventHost, - eventId: _eventId, - eventImage: _eventImage, - recipient: _originalRecipient, - serial: _serial - ) - - FLOAT.totalSupply = FLOAT.totalSupply + 1 - } - - destroy() { - // If the FLOATEvent owner decided to unlink their public reference - // for some reason (heavily recommend against it), their records - // of who owns the FLOAT is going to be messed up. But that is their - // fault. We shouldn't let that prevent the user from deleting the FLOAT. - if let floatEvent: &FLOATEvent{FLOATEventPublic} = self.getEventMetadata() { - floatEvent.updateFLOATHome(id: self.id, serial: self.serial, owner: nil) - } - emit FLOATDestroyed( - id: self.id, - eventHost: self.eventHost, - eventId: self.eventId, - eventImage: self.eventImage, - serial: self.serial - ) - } - } - - // A public interface for people to call into our Collection - pub resource interface CollectionPublic { - pub fun borrowNFT(id: UInt64): &NonFungibleToken.NFT - pub fun borrowFLOAT(id: UInt64): &NFT? - pub fun borrowViewResolver(id: UInt64): &{MetadataViews.Resolver} - pub fun deposit(token: @NonFungibleToken.NFT) - pub fun getIDs(): [UInt64] - pub fun getAllIDs(): [UInt64] - pub fun ownedIdsFromEvent(eventId: UInt64): [UInt64] - } - - // A Collection that holds all of the users FLOATs. - // Withdrawing is not allowed. You can only transfer. - pub resource Collection: NonFungibleToken.Provider, NonFungibleToken.Receiver, NonFungibleToken.CollectionPublic, MetadataViews.ResolverCollection, CollectionPublic { - // Maps a FLOAT id to the FLOAT itself - pub var ownedNFTs: @{UInt64: NonFungibleToken.NFT} - // Maps an eventId to the ids of FLOATs that - // this user owns from that event. It's possible - // for it to be out of sync until June 2022 spork, - // but it is used merely as a helper, so that's okay. - access(account) var events: {UInt64: {UInt64: Bool}} - - // Deposits a FLOAT to the collection - pub fun deposit(token: @NonFungibleToken.NFT) { - let nft <- token as! @NFT - let id = nft.id - let eventId = nft.eventId - - // Update self.events[eventId] to have - // this FLOAT's id in it - if self.events[eventId] == nil { - self.events[eventId] = {id: true} - } else { - self.events[eventId]!.insert(key: id, true) - } - - // Try to update the FLOATEvent's current holders. This will - // not work if they unlinked their FLOATEvent to the public, - // and the data will go out of sync. But that is their fault. - if let floatEvent: &FLOATEvent{FLOATEventPublic} = nft.getEventMetadata() { - floatEvent.updateFLOATHome(id: id, serial: nft.serial, owner: self.owner!.address) - } - - emit Deposit(id: id, to: self.owner!.address) - self.ownedNFTs[id] <-! nft - } - - pub fun withdraw(withdrawID: UInt64): @NonFungibleToken.NFT { - let token <- self.ownedNFTs.remove(key: withdrawID) ?? panic("You do not own this FLOAT in your collection") - let nft <- token as! @NFT - - // Update self.events[eventId] to not - // have this FLOAT's id in it - self.events[nft.eventId]!.remove(key: withdrawID) - - // Try to update the FLOATEvent's current holders. This will - // not work if they unlinked their FLOATEvent to the public, - // and the data will go out of sync. But that is their fault. - // - // Additionally, this checks if the FLOATEvent host wanted this - // FLOAT to be transferrable. Secondary marketplaces will use this - // withdraw function, so if the FLOAT is not transferrable, - // you can't sell it there. - if let floatEvent: &FLOATEvent{FLOATEventPublic} = nft.getEventMetadata() { - assert( - floatEvent.transferrable, - message: "This FLOAT is not transferrable." - ) - floatEvent.updateFLOATHome(id: withdrawID, serial: nft.serial, owner: nil) - } - - emit Withdraw(id: withdrawID, from: self.owner!.address) - return <- nft - } - - pub fun delete(id: UInt64) { - let token <- self.ownedNFTs.remove(key: id) ?? panic("You do not own this FLOAT in your collection") - let nft <- token as! @NFT - - // Update self.events[eventId] to not - // have this FLOAT's id in it - self.events[nft.eventId]!.remove(key: id) - - destroy nft - } - - // Only returns the FLOATs for which we can still - // access data about their event. - pub fun getIDs(): [UInt64] { - let ids: [UInt64] = [] - for key in self.ownedNFTs.keys { - let nftRef = self.borrowFLOAT(id: key)! - if nftRef.eventsCap.check() { - ids.append(key) - } - } - return ids - } - - // Returns all the FLOATs ids - pub fun getAllIDs(): [UInt64] { - return self.ownedNFTs.keys - } - - // Returns an array of ids that belong to - // the passed in eventId - // - // It's possible for FLOAT ids to be present that - // shouldn't be if people tried to withdraw directly - // from `ownedNFTs` (not possible after June 2022 spork), - // but this makes sure the returned - // ids are all actually owned by this account. - pub fun ownedIdsFromEvent(eventId: UInt64): [UInt64] { - let answer: [UInt64] = [] - if let idsInEvent = self.events[eventId]?.keys { - for id in idsInEvent { - if self.ownedNFTs[id] != nil { - answer.append(id) - } - } - } - return answer - } - - pub fun borrowNFT(id: UInt64): &NonFungibleToken.NFT { - return (&self.ownedNFTs[id] as &NonFungibleToken.NFT?)! - } - - pub fun borrowFLOAT(id: UInt64): &NFT? { - if self.ownedNFTs[id] != nil { - let ref = (&self.ownedNFTs[id] as auth &NonFungibleToken.NFT?)! - return ref as! &NFT - } - return nil - } - - pub fun borrowViewResolver(id: UInt64): &{MetadataViews.Resolver} { - let tokenRef = (&self.ownedNFTs[id] as auth &NonFungibleToken.NFT?)! - let nftRef = tokenRef as! &NFT - return nftRef as &{MetadataViews.Resolver} - } - - init() { - self.ownedNFTs <- {} - self.events = {} - } - - destroy() { - destroy self.ownedNFTs - } - } - - // An interface that every "verifier" must implement. - // A verifier is one of the options on the FLOAT Event page, - // for example, a "time limit," or a "limited" number of - // FLOATs that can be claimed. - // All the current verifiers can be seen inside FLOATVerifiers.cdc - pub struct interface IVerifier { - // A function every verifier must implement. - // Will have `assert`s in it to make sure - // the user fits some criteria. - access(account) fun verify(_ params: {String: AnyStruct}) - } - - // A public interface to read the FLOATEvent - pub resource interface FLOATEventPublic { - pub var claimable: Bool - pub let dateCreated: UFix64 - pub let description: String - pub let eventId: UInt64 - pub let host: Address - pub let image: String - pub let name: String - pub var totalSupply: UInt64 - pub var transferrable: Bool - pub let url: String - pub fun claim(recipient: &Collection, params: {String: AnyStruct}) - pub fun purchase(recipient: &Collection, params: {String: AnyStruct}, payment: @FungibleToken.Vault) - pub fun getClaimed(): {Address: TokenIdentifier} - pub fun getCurrentHolders(): {UInt64: TokenIdentifier} - pub fun getCurrentHolder(serial: UInt64): TokenIdentifier? - pub fun getExtraMetadata(): {String: AnyStruct} - pub fun getVerifiers(): {String: [{IVerifier}]} - pub fun getGroups(): [String] - pub fun getPrices(): {String: TokenInfo}? - pub fun hasClaimed(account: Address): TokenIdentifier? - - access(account) fun updateFLOATHome(id: UInt64, serial: UInt64, owner: Address?) - } - - // - // FLOATEvent - // - pub resource FLOATEvent: FLOATEventPublic, MetadataViews.Resolver { - // Whether or not users can claim from our event (can be toggled - // at any time) - pub var claimable: Bool - // Maps an address to the FLOAT they claimed - access(account) var claimed: {Address: TokenIdentifier} - // Maps a serial to the person who theoretically owns - // that FLOAT. Must be serial --> TokenIdentifier because - // it's possible someone has multiple FLOATs from this event. - access(account) var currentHolders: {UInt64: TokenIdentifier} - pub let dateCreated: UFix64 - pub let description: String - // This is equal to this resource's uuid - pub let eventId: UInt64 - access(account) var extraMetadata: {String: AnyStruct} - // The groups that this FLOAT Event belongs to (groups - // are within the FLOATEvents resource) - access(account) var groups: {String: Bool} - // Who created this FLOAT Event - pub let host: Address - // The image of the FLOAT Event - pub let image: String - // The name of the FLOAT Event - pub let name: String - // The total number of FLOATs that have been - // minted from this event - pub var totalSupply: UInt64 - // Whether or not the FLOATs that users own - // from this event can be transferred on the - // FLOAT platform itself (transferring allowed - // elsewhere) - pub var transferrable: Bool - // A url of where the event took place - pub let url: String - // A list of verifiers this FLOAT Event contains. - // Will be used every time someone "claims" a FLOAT - // to see if they pass the requirements - access(account) let verifiers: {String: [{IVerifier}]} - - /***************** Setters for the Event Owner *****************/ - - // Toggles claiming on/off - pub fun toggleClaimable(): Bool { - self.claimable = !self.claimable - return self.claimable - } - - // Toggles transferring on/off - pub fun toggleTransferrable(): Bool { - self.transferrable = !self.transferrable - return self.transferrable - } - - // Updates the metadata in case you want - // to add something. - pub fun updateMetadata(newExtraMetadata: {String: AnyStruct}) { - for key in newExtraMetadata.keys { - if !self.extraMetadata.containsKey(key) { - self.extraMetadata[key] = newExtraMetadata[key] - } - } - } - - /***************** Setters for the Contract Only *****************/ - - // Called if a user moves their FLOAT to another location. - // Needed so we can keep track of who currently has it. - access(account) fun updateFLOATHome(id: UInt64, serial: UInt64, owner: Address?) { - if owner == nil { - self.currentHolders.remove(key: serial) - } else { - self.currentHolders[serial] = TokenIdentifier( - _id: id, - _address: owner!, - _serial: serial - ) - } - emit FLOATTransferred(id: id, eventHost: self.host, eventId: self.eventId, newOwner: owner, serial: serial) - } - - // Adds this FLOAT Event to a group - access(account) fun addToGroup(groupName: String) { - self.groups[groupName] = true - } - - // Removes this FLOAT Event to a group - access(account) fun removeFromGroup(groupName: String) { - self.groups.remove(key: groupName) - } - - /***************** Getters (all exposed to the public) *****************/ - - // Returns info about the FLOAT that this account claimed - // (if any) - pub fun hasClaimed(account: Address): TokenIdentifier? { - return self.claimed[account] - } - - // This is a guarantee that the person owns the FLOAT - // with the passed in serial - pub fun getCurrentHolder(serial: UInt64): TokenIdentifier? { - pre { - self.currentHolders[serial] != nil: - "This serial has not been created yet." - } - let data = self.currentHolders[serial]! - let collection = getAccount(data.address).getCapability(FLOAT.FLOATCollectionPublicPath).borrow<&Collection{CollectionPublic}>() - if collection?.borrowFLOAT(id: data.id) != nil { - return data - } - - return nil - } - - // Returns an accurate dictionary of all the - // claimers - pub fun getClaimed(): {Address: TokenIdentifier} { - return self.claimed - } - - // This dictionary may be slightly off if for some - // reason the FLOATEvents owner ever unlinked their - // resource from the public. - // Use `getCurrentHolder(serial: UInt64)` to truly - // verify if someone holds that serial. - pub fun getCurrentHolders(): {UInt64: TokenIdentifier} { - return self.currentHolders - } - - pub fun getExtraMetadata(): {String: AnyStruct} { - return self.extraMetadata - } - - // Gets all the verifiers that will be used - // for claiming - pub fun getVerifiers(): {String: [{IVerifier}]} { - return self.verifiers - } - - pub fun getGroups(): [String] { - return self.groups.keys - } - - pub fun getViews(): [Type] { - return [ - Type() - ] - } - - pub fun getPrices(): {String: TokenInfo}? { - if let prices = self.extraMetadata["prices"] { - return prices as! {String: TokenInfo} - } - return nil - } - - pub fun resolveView(_ view: Type): AnyStruct? { - switch view { - case Type(): - return MetadataViews.Display( - name: self.name, - description: self.description, - thumbnail: MetadataViews.IPFSFile(cid: self.image, path: nil) - ) - } - - return nil - } - - /****************** Getting a FLOAT ******************/ - - // Will not panic if one of the recipients has already claimed. - // It will just skip them. - pub fun batchMint(recipients: [&Collection{NonFungibleToken.CollectionPublic}]) { - for recipient in recipients { - if self.claimed[recipient.owner!.address] == nil { - self.mint(recipient: recipient) - } - } - } - - // Used to give a person a FLOAT from this event. - // Used as a helper function for `claim`, but can also be - // used by the event owner and shared accounts to - // mint directly to a user. - // - // If the event owner directly mints to a user, it does not - // run the verifiers on the user. It bypasses all of them. - // - // Return the id of the FLOAT it minted - pub fun mint(recipient: &Collection{NonFungibleToken.CollectionPublic}): UInt64 { - pre { - self.claimed[recipient.owner!.address] == nil: - "This person already claimed their FLOAT!" - } - let recipientAddr: Address = recipient.owner!.address - let serial = self.totalSupply - - let token <- create NFT( - _eventDescription: self.description, - _eventHost: self.host, - _eventId: self.eventId, - _eventImage: self.image, - _eventName: self.name, - _originalRecipient: recipientAddr, - _serial: serial - ) - let id = token.id - // Saves the claimer - self.claimed[recipientAddr] = TokenIdentifier( - _id: id, - _address: recipientAddr, - _serial: serial - ) - // Saves the claimer as the current holder - // of the newly minted FLOAT - self.currentHolders[serial] = TokenIdentifier( - _id: id, - _address: recipientAddr, - _serial: serial - ) - - self.totalSupply = self.totalSupply + 1 - recipient.deposit(token: <- token) - return id - } - - access(account) fun verifyAndMint(recipient: &Collection, params: {String: AnyStruct}): UInt64 { - params["event"] = &self as &FLOATEvent{FLOATEventPublic} - params["claimee"] = recipient.owner!.address - - // Runs a loop over all the verifiers that this FLOAT Events - // implements. For example, "Limited", "Timelock", "Secret", etc. - // All the verifiers are in the FLOATVerifiers.cdc contract - for identifier in self.verifiers.keys { - let typedModules = (&self.verifiers[identifier] as &[{IVerifier}]?)! - var i = 0 - while i < typedModules.length { - let verifier = &typedModules[i] as &{IVerifier} - verifier.verify(params) - i = i + 1 - } - } - - // You're good to go. - let id = self.mint(recipient: recipient) - - emit FLOATClaimed( - id: id, - eventHost: self.host, - eventId: self.eventId, - eventImage: self.image, - eventName: self.name, - recipient: recipient.owner!.address, - serial: self.totalSupply - 1 - ) - return id - } - - // For the public to claim FLOATs. Must be claimable to do so. - // You can pass in `params` that will be forwarded to the - // customized `verify` function of the verifier. - // - // For example, the FLOAT platform allows event hosts - // to specify a secret phrase. That secret phrase will - // be passed in the `params`. - pub fun claim(recipient: &Collection, params: {String: AnyStruct}) { - pre { - self.getPrices() == nil: - "You need to purchase this FLOAT." - self.claimed[recipient.owner!.address] == nil: - "This person already claimed their FLOAT!" - self.claimable: - "This FLOATEvent is not claimable, and thus not currently active." - } - - self.verifyAndMint(recipient: recipient, params: params) - } - - pub fun purchase(recipient: &Collection, params: {String: AnyStruct}, payment: @FungibleToken.Vault) { - pre { - self.getPrices() != nil: - "Don't call this function. The FLOAT is free." - self.getPrices()![payment.getType().identifier] != nil: - "This FLOAT does not support purchasing in the passed in token." - payment.balance == self.getPrices()![payment.getType().identifier]!.price: - "You did not pass in the correct amount of tokens." - self.claimed[recipient.owner!.address] == nil: - "This person already claimed their FLOAT!" - self.claimable: - "This FLOATEvent is not claimable, and thus not currently active." - } - let royalty: UFix64 = 0.05 - let emeraldCityTreasury: Address = 0x5643fd47a29770e7 - let paymentType: String = payment.getType().identifier - let tokenInfo: TokenInfo = self.getPrices()![paymentType]! - - let EventHostVault = getAccount(self.host).getCapability(tokenInfo.path) - .borrow<&{FungibleToken.Receiver}>() - ?? panic("Could not borrow the &{FungibleToken.Receiver} from the event host.") - - assert( - EventHostVault.getType().identifier == paymentType, - message: "The event host's path is not associated with the intended token." - ) - - let EmeraldCityVault = getAccount(emeraldCityTreasury).getCapability(tokenInfo.path) - .borrow<&{FungibleToken.Receiver}>() - ?? panic("Could not borrow the &{FungibleToken.Receiver} from Emerald City's Vault.") - - assert( - EmeraldCityVault.getType().identifier == paymentType, - message: "Emerald City's path is not associated with the intended token." - ) - - let emeraldCityCut <- payment.withdraw(amount: payment.balance * royalty) - - EmeraldCityVault.deposit(from: <- emeraldCityCut) - EventHostVault.deposit(from: <- payment) - - let id = self.verifyAndMint(recipient: recipient, params: params) - - emit FLOATPurchased(id: id, eventHost: self.host, eventId: self.eventId, recipient: recipient.owner!.address, serial: self.totalSupply - 1) - } - - init ( - _claimable: Bool, - _description: String, - _extraMetadata: {String: AnyStruct}, - _host: Address, - _image: String, - _name: String, - _transferrable: Bool, - _url: String, - _verifiers: {String: [{IVerifier}]}, - ) { - self.claimable = _claimable - self.claimed = {} - self.currentHolders = {} - self.dateCreated = getCurrentBlock().timestamp - self.description = _description - self.eventId = self.uuid - self.extraMetadata = _extraMetadata - self.groups = {} - self.host = _host - self.image = _image - self.name = _name - self.transferrable = _transferrable - self.totalSupply = 0 - self.url = _url - self.verifiers = _verifiers - - FLOAT.totalFLOATEvents = FLOAT.totalFLOATEvents + 1 - emit FLOATEventCreated(eventId: self.eventId, description: self.description, host: self.host, image: self.image, name: self.name, url: self.url) - } - - destroy() { - emit FLOATEventDestroyed(eventId: self.eventId, host: self.host, name: self.name) - } - } - - // A container of FLOAT Events (maybe because they're similar to - // one another, or an event host wants to list all their AMAs together, etc). - pub resource Group { - pub let id: UInt64 - pub let name: String - pub let image: String - pub let description: String - // All the FLOAT Events that belong - // to this group. - access(account) var events: {UInt64: Bool} - - access(account) fun addEvent(eventId: UInt64) { - self.events[eventId] = true - } - - access(account) fun removeEvent(eventId: UInt64) { - self.events.remove(key: eventId) - } - - pub fun getEvents(): [UInt64] { - return self.events.keys - } - - init(_name: String, _image: String, _description: String) { - self.id = self.uuid - self.name = _name - self.image = _image - self.description = _description - self.events = {} - } - } - - // - // FLOATEvents - // - pub resource interface FLOATEventsPublic { - // Public Getters - pub fun borrowPublicEventRef(eventId: UInt64): &FLOATEvent{FLOATEventPublic}? - pub fun getAllEvents(): {UInt64: String} - pub fun getIDs(): [UInt64] - pub fun getGroup(groupName: String): &Group? - pub fun getGroups(): [String] - // Account Getters - access(account) fun borrowEventsRef(): &FLOATEvents - } - - // A "Collection" of FLOAT Events - pub resource FLOATEvents: FLOATEventsPublic, MetadataViews.ResolverCollection { - // All the FLOAT Events this collection stores - access(account) var events: @{UInt64: FLOATEvent} - // All the Groups this collection stores - access(account) var groups: @{String: Group} - - // Creates a new FLOAT Event by passing in some basic parameters - // and a list of all the verifiers this event must abide by - pub fun createEvent( - claimable: Bool, - description: String, - image: String, - name: String, - transferrable: Bool, - url: String, - verifiers: [{IVerifier}], - _ extraMetadata: {String: AnyStruct}, - initialGroups: [String] - ): UInt64 { - let typedVerifiers: {String: [{IVerifier}]} = {} - for verifier in verifiers { - let identifier = verifier.getType().identifier - if typedVerifiers[identifier] == nil { - typedVerifiers[identifier] = [verifier] - } else { - typedVerifiers[identifier]!.append(verifier) - } - } - - let FLOATEvent <- create FLOATEvent( - _claimable: claimable, - _description: description, - _extraMetadata: extraMetadata, - _host: self.owner!.address, - _image: image, - _name: name, - _transferrable: transferrable, - _url: url, - _verifiers: typedVerifiers - ) - let eventId = FLOATEvent.eventId - self.events[eventId] <-! FLOATEvent - - for groupName in initialGroups { - self.addEventToGroup(groupName: groupName, eventId: eventId) - } - return eventId - } - - // Deletes an event. Also makes sure to remove - // the event from all the groups its in. - pub fun deleteEvent(eventId: UInt64) { - let eventRef = self.borrowEventRef(eventId: eventId) ?? panic("This FLOAT does not exist.") - for groupName in eventRef.getGroups() { - let groupRef = (&self.groups[groupName] as &Group?)! - groupRef.removeEvent(eventId: eventId) - } - destroy self.events.remove(key: eventId) - } - - pub fun createGroup(groupName: String, image: String, description: String) { - pre { - self.groups[groupName] == nil: "A group with this name already exists." - } - self.groups[groupName] <-! create Group(_name: groupName, _image: image, _description: description) - } - - // Deletes a group. Also makes sure to remove - // the group from all the events that use it. - pub fun deleteGroup(groupName: String) { - let eventsInGroup = self.groups[groupName]?.getEvents() - ?? panic("This Group does not exist.") - for eventId in eventsInGroup { - let ref = (&self.events[eventId] as &FLOATEvent?)! - ref.removeFromGroup(groupName: groupName) - } - destroy self.groups.remove(key: groupName) - } - - // Adds an event to a group. Also adds the group - // to the event. - pub fun addEventToGroup(groupName: String, eventId: UInt64) { - pre { - self.groups[groupName] != nil: "This group does not exist." - self.events[eventId] != nil: "This event does not exist." - } - let groupRef = (&self.groups[groupName] as &Group?)! - groupRef.addEvent(eventId: eventId) - - let eventRef = self.borrowEventRef(eventId: eventId)! - eventRef.addToGroup(groupName: groupName) - } - - // Simply takes the event away from the group - pub fun removeEventFromGroup(groupName: String, eventId: UInt64) { - pre { - self.groups[groupName] != nil: "This group does not exist." - self.events[eventId] != nil: "This event does not exist." - } - let groupRef = (&self.groups[groupName] as &Group?)! - groupRef.removeEvent(eventId: eventId) - - let eventRef = self.borrowEventRef(eventId: eventId)! - eventRef.removeFromGroup(groupName: groupName) - } - - pub fun getGroup(groupName: String): &Group? { - return &self.groups[groupName] as &Group? - } - - pub fun getGroups(): [String] { - return self.groups.keys - } - - // Only accessible to people who share your account. - // If `fromHost` has allowed you to share your account - // in the GrantedAccountAccess.cdc contract, you can get a reference - // to their FLOATEvents here and do pretty much whatever you want. - pub fun borrowSharedRef(fromHost: Address): &FLOATEvents { - let sharedInfo = getAccount(fromHost).getCapability(GrantedAccountAccess.InfoPublicPath) - .borrow<&GrantedAccountAccess.Info{GrantedAccountAccess.InfoPublic}>() - ?? panic("Cannot borrow the InfoPublic from the host") - assert( - sharedInfo.isAllowed(account: self.owner!.address), - message: "This account owner does not share their account with you." - ) - let otherFLOATEvents = getAccount(fromHost).getCapability(FLOAT.FLOATEventsPublicPath) - .borrow<&FLOATEvents{FLOATEventsPublic}>() - ?? panic("Could not borrow the public FLOATEvents.") - return otherFLOATEvents.borrowEventsRef() - } - - // Only used for the above function. - access(account) fun borrowEventsRef(): &FLOATEvents { - return &self as &FLOATEvents - } - - pub fun borrowEventRef(eventId: UInt64): &FLOATEvent? { - return &self.events[eventId] as &FLOATEvent? - } - - /************* Getters (for anyone) *************/ - - // Get a public reference to the FLOATEvent - // so you can call some helpful getters - pub fun borrowPublicEventRef(eventId: UInt64): &FLOATEvent{FLOATEventPublic}? { - return &self.events[eventId] as &FLOATEvent{FLOATEventPublic}? - } - - pub fun getIDs(): [UInt64] { - return self.events.keys - } - - // Maps the eventId to the name of that - // event. Just a kind helper. - pub fun getAllEvents(): {UInt64: String} { - let answer: {UInt64: String} = {} - for id in self.events.keys { - let ref = (&self.events[id] as &FLOATEvent?)! - answer[id] = ref.name - } - return answer - } - - pub fun borrowViewResolver(id: UInt64): &{MetadataViews.Resolver} { - return (&self.events[id] as &{MetadataViews.Resolver}?)! - } - - init() { - self.events <- {} - self.groups <- {} - } - - destroy() { - destroy self.events - destroy self.groups - } - } - - pub fun createEmptyCollection(): @Collection { - return <- create Collection() - } - - pub fun createEmptyFLOATEventCollection(): @FLOATEvents { - return <- create FLOATEvents() - } - - init() { - self.totalSupply = 0 - self.totalFLOATEvents = 0 - emit ContractInitialized() - - self.FLOATCollectionStoragePath = /storage/FLOATCollectionStoragePath - self.FLOATCollectionPublicPath = /public/FLOATCollectionPublicPath - self.FLOATEventsStoragePath = /storage/FLOATEventsStoragePath - self.FLOATEventsPrivatePath = /private/FLOATEventsPrivatePath - self.FLOATEventsPublicPath = /public/FLOATEventsPublicPath - } -} diff --git a/backend/main/cadence/float/FLOATIncinerator.cdc b/backend/main/cadence/float/FLOATIncinerator.cdc deleted file mode 100644 index 4f87325b6..000000000 --- a/backend/main/cadence/float/FLOATIncinerator.cdc +++ /dev/null @@ -1,92 +0,0 @@ -import FLOAT from 0xf8d6e0586b0a20c7 - -pub contract FLOATIncinerator { - - pub let IncineratorStoragePath: StoragePath - pub let IncineratorPublicPath: PublicPath - - pub var flameStrength: UInt64 - pub var totalIncinerated: UInt64 - - pub resource interface IncineratorPublic { - pub var individualIncinerated: UInt64 - pub var contributedStrength: UInt64 - pub fun getExtraMetadata(): {String: String} - } - - pub resource Incinerator: IncineratorPublic { - pub var individualIncinerated: UInt64 - pub var contributedStrength: UInt64 - access(self) var extraMetadata: {String: String} - - pub fun burn(collection: &FLOAT.Collection, ids: [UInt64]) { - let length = ids.length - - for id in ids { - let float: &FLOAT.NFT = collection.borrowFLOAT(id: id) ?? panic("This FLOAT does not exist.") - let score = FLOATIncinerator.calculateScore(dateReceived: float.dateReceived, serial: float.serial) - self.contributedStrength = self.contributedStrength + score - FLOATIncinerator.flameStrength = FLOATIncinerator.flameStrength + score - collection.delete(id: id) - } - - self.individualIncinerated = self.individualIncinerated + UInt64(length) - FLOATIncinerator.totalIncinerated = FLOATIncinerator.totalIncinerated + UInt64(length) - } - - pub fun getExtraMetadata(): {String: String} { - return self.extraMetadata - } - - init() { - self.individualIncinerated = 0 - self.contributedStrength = 0 - self.extraMetadata = {} - } - } - - pub fun createIncinerator(): @Incinerator { - return <- create Incinerator() - } - - pub fun calculateScore(dateReceived: UFix64, serial: UInt64): UInt64 { - // Serial - var serialScore: UInt64 = 0 - if (serial < 10) { - serialScore = 5 - } else if (serial < 100) { - serialScore = 4 - } else if (serial < 1000) { - serialScore = 3 - } else if (serial < 10000) { - serialScore = 2 - } else if (serial < 100000) { - serialScore = 1 - } - - // Time - var timeScore: UInt64 = 0 - var difference = getCurrentBlock().timestamp - dateReceived - if (difference > 31556926.0) { // a year - timeScore = 5 - } else if (difference > 2629743.0) { // a month - timeScore = 4 - } else if (difference > 604800.0) { // a week - timeScore = 3 - } else if (difference > 86400.0) { // a day - timeScore = 2 - } else if (difference > 3600.0) { // an hour - timeScore = 1 - } - - return serialScore + timeScore - } - - init() { - self.IncineratorStoragePath = /storage/FLOATIncineratorStoragePath - self.IncineratorPublicPath = /public/FLOATIncineratorPublicPath - self.totalIncinerated = 0 - self.flameStrength = 0 - } - -} diff --git a/backend/main/cadence/float/FLOATVerifiers.cdc b/backend/main/cadence/float/FLOATVerifiers.cdc deleted file mode 100644 index 3fcd8ca21..000000000 --- a/backend/main/cadence/float/FLOATVerifiers.cdc +++ /dev/null @@ -1,178 +0,0 @@ -// MADE BY: Emerald City, Jacob Tucker - -// This contract is probably the most confusing element of the FLOAT -// platform. Listed here is a bunch of Structs which all implement -// FLOAT.IVerifier. - -// This pattern allows us to define arbitrary "restrictions" or "verifiers" -// on our FLOAT Events. For example, Timelock is a verifier that makes sure -// the current time is within the start and end date that the FLOAT Event host -// specified when they created an event. - -// The cool part is all of these verifiers are totally optional, and are only -// passed in with the newly created event if the host wanted to enable them. -// You can mix and match them however you want. For example, one event I could -// use both Timelock and Limited, and for another event I could just use Secret. - -// Each verifier must have a `verify` function that takes in a generalized `params` -// argument so we can pass user data through as well as info about the event itself. -// This is important for Secret for example because we want to pass the users guess -// of the secret code through. For Limited, we need to know the totalSupply of the event, -// so we pass it through as well. - -import FLOAT from 0xf8d6e0586b0a20c7 -import FungibleToken from 0xf8d6e0586b0a20c7 -import FlowToken from 0xf8d6e0586b0a20c7 - -pub contract FLOATVerifiers { - - // The "verifiers" to be used - - // - // Timelock - // - // Specifies a time range in which the - // FLOAT from an event can be claimed - pub struct Timelock: FLOAT.IVerifier { - // An automatic switch handled by the contract - // to stop people from claiming after a certain time. - pub let dateStart: UFix64 - pub let dateEnding: UFix64 - - pub fun verify(_ params: {String: AnyStruct}) { - assert( - getCurrentBlock().timestamp >= self.dateStart, - message: "This FLOAT Event has not started yet." - ) - assert( - getCurrentBlock().timestamp <= self.dateEnding, - message: "Sorry! The time has run out to mint this FLOAT." - ) - } - - init(_dateStart: UFix64, _timePeriod: UFix64) { - self.dateStart = _dateStart - self.dateEnding = self.dateStart + _timePeriod - } - } - - // - // Secret - // - // Specifies a secret code in order - // to claim a FLOAT (not very secure, but cool feature) - pub struct Secret: FLOAT.IVerifier { - // The secret code, set by the owner of this event. - access(self) let secretPhrase: String - - pub fun verify(_ params: {String: AnyStruct}) { - let secretPhrase = params["secretPhrase"]! as! String - assert( - self.secretPhrase == secretPhrase, - message: "You did not input the correct secret phrase." - ) - } - - init(_secretPhrase: String) { - self.secretPhrase = _secretPhrase - } - } - - // - // Limited - // - // Specifies a limit for the amount of people - // who can CLAIM. Not to be confused with how many currently - // hold a FLOAT from this event, since users can - // delete their FLOATs. - pub struct Limited: FLOAT.IVerifier { - pub var capacity: UInt64 - - pub fun verify(_ params: {String: AnyStruct}) { - let event = params["event"]! as! &FLOAT.FLOATEvent{FLOAT.FLOATEventPublic} - let currentCapacity = event.totalSupply - assert( - currentCapacity < self.capacity, - message: "This FLOAT Event is at capacity." - ) - } - - init(_capacity: UInt64) { - self.capacity = _capacity - } - } - - // - // MultipleSecret - // - // Allows for Multiple Secret codes - // Everytime a secret gets used, it gets removed - // from the list. - pub struct MultipleSecret: FLOAT.IVerifier { - access(self) let secrets: {String: Bool} - - pub fun verify(_ params: {String: AnyStruct}) { - let secretPhrase = params["secretPhrase"]! as! String - assert( - self.secrets[secretPhrase] != nil, - message: "You did not input a correct secret phrase." - ) - self.secrets.remove(key: secretPhrase) - } - - init(_secrets: [String]) { - self.secrets = {} - for secret in _secrets { - self.secrets[secret] = true - } - } - } - - // - // SecretV2 - // - // Much more secure than Secret - pub struct SecretV2: FLOAT.IVerifier { - pub let publicKey: String - - pub fun verify(_ params: {String: AnyStruct}) { - let data: [UInt8] = (params["claimee"]! as! Address).toString().utf8 - let sig: [UInt8] = (params["secretSig"]! as! String).decodeHex() - let publicKey = PublicKey(publicKey: self.publicKey.decodeHex(), signatureAlgorithm: SignatureAlgorithm.ECDSA_P256) - let valid = publicKey.verify(signature: sig, signedData: data, domainSeparationTag: "FLOW-V0.0-user", hashAlgorithm: HashAlgorithm.SHA3_256) - - assert( - valid, - message: "You did not input the correct secret phrase." - ) - } - - init(_publicKey: String) { - self.publicKey = _publicKey - } - } - - // - // MinimumBalance - // - // Requires a minimum Flow Balance to succeed - pub struct MinimumBalance: FLOAT.IVerifier { - pub let amount: UFix64 - - pub fun verify(_ params: {String: AnyStruct}) { - let claimee: Address = params["claimee"]! as! Address - let flowVault = getAccount(claimee).getCapability(/public/flowTokenBalance) - .borrow<&FlowToken.Vault{FungibleToken.Balance}>() - ?? panic("Could not borrow the Flow Token Vault") - - assert( - flowVault.balance >= self.amount, - message: "You do not meet the minimum required Flow Token balance." - ) - } - - init(_amount: UFix64) { - self.amount = _amount - } - } -} diff --git a/backend/main/cadence/float/GrantedAccountAccess.cdc b/backend/main/cadence/float/GrantedAccountAccess.cdc deleted file mode 100644 index 68e02addf..000000000 --- a/backend/main/cadence/float/GrantedAccountAccess.cdc +++ /dev/null @@ -1,60 +0,0 @@ -// MADE BY: Emerald City, Jacob Tucker - -// This is a very simple contract that lets users add addresses -// to an "Info" resource signifying they want them to share their account. - -// This is specifically used by the -// `pub fun borrowSharedRef(fromHost: Address): &FLOATEvents` -// function inside FLOAT.cdc to give users access to someone elses -// FLOATEvents if they are on this shared list. - -// This contract is my way of saying I hate private capabilities, so I -// implemented an alternative solution to private access. - -pub contract GrantedAccountAccess { - - pub let InfoStoragePath: StoragePath - pub let InfoPublicPath: PublicPath - - pub resource interface InfoPublic { - pub fun getAllowed(): [Address] - pub fun isAllowed(account: Address): Bool - } - - // A list of people you allow to share your - // account. - pub resource Info: InfoPublic { - access(account) var allowed: {Address: Bool} - - // Allow someone to share your account - pub fun addAccount(account: Address) { - self.allowed[account] = true - } - - pub fun removeAccount(account: Address) { - self.allowed.remove(key: account) - } - - pub fun getAllowed(): [Address] { - return self.allowed.keys - } - - pub fun isAllowed(account: Address): Bool { - return self.allowed.containsKey(account) - } - - init() { - self.allowed = {} - } - } - - pub fun createInfo(): @Info { - return <- create Info() - } - - init() { - self.InfoStoragePath = /storage/GrantedAccountAccessInfo - self.InfoPublicPath = /public/GrantedAccountAccessInfo - } - -} diff --git a/backend/main/cadence/float/transactions/create_event.cdc b/backend/main/cadence/float/transactions/create_event.cdc deleted file mode 100644 index 80ffccf2c..000000000 --- a/backend/main/cadence/float/transactions/create_event.cdc +++ /dev/null @@ -1,93 +0,0 @@ -import FLOAT from "../FLOAT.cdc" -import FLOATVerifiers from "../FLOATVerifiers.cdc" -import NonFungibleToken from "../../core-contracts/NonFungibleToken.cdc" -import MetadataViews from "../../core-contracts/MetadataViews.cdc" -import GrantedAccountAccess from "../../sharedaccount/GrantedAccountAccess.cdc" - -transaction( - forHost: Address, - claimable: Bool, - name: String, - description: String, - image: String, - url: String, - transferrable: Bool, - timelock: Bool, - dateStart: UFix64, - timePeriod: UFix64, - secret: Bool, - secretPK: String, - limited: Bool, - capacity: UInt64, - initialGroups: [String], - flowTokenPurchase: Bool, - flowTokenCost: UFix64, - minimumBalanceToggle: Bool, - minimumBalance: UFix64 -) { - - let FLOATEvents: &FLOAT.FLOATEvents - - prepare(acct: AuthAccount) { - // SETUP COLLECTION - if acct.borrow<&FLOAT.Collection>(from: FLOAT.FLOATCollectionStoragePath) == nil { - acct.save(<- FLOAT.createEmptyCollection(), to: FLOAT.FLOATCollectionStoragePath) - acct.link<&FLOAT.Collection{NonFungibleToken.Receiver, NonFungibleToken.CollectionPublic, MetadataViews.ResolverCollection, FLOAT.CollectionPublic}> - (FLOAT.FLOATCollectionPublicPath, target: FLOAT.FLOATCollectionStoragePath) - } - - // SETUP FLOATEVENTS - if acct.borrow<&FLOAT.FLOATEvents>(from: FLOAT.FLOATEventsStoragePath) == nil { - acct.save(<- FLOAT.createEmptyFLOATEventCollection(), to: FLOAT.FLOATEventsStoragePath) - acct.link<&FLOAT.FLOATEvents{FLOAT.FLOATEventsPublic, MetadataViews.ResolverCollection}> - (FLOAT.FLOATEventsPublicPath, target: FLOAT.FLOATEventsStoragePath) - } - - // SETUP SHARED MINTING - if acct.borrow<&GrantedAccountAccess.Info>(from: GrantedAccountAccess.InfoStoragePath) == nil { - acct.save(<- GrantedAccountAccess.createInfo(), to: GrantedAccountAccess.InfoStoragePath) - acct.link<&GrantedAccountAccess.Info{GrantedAccountAccess.InfoPublic}> - (GrantedAccountAccess.InfoPublicPath, target: GrantedAccountAccess.InfoStoragePath) - } - - if forHost != acct.address { - let FLOATEvents = acct.borrow<&FLOAT.FLOATEvents>(from: FLOAT.FLOATEventsStoragePath) - ?? panic("Could not borrow the FLOATEvents from the signer.") - self.FLOATEvents = FLOATEvents.borrowSharedRef(fromHost: forHost) - } else { - self.FLOATEvents = acct.borrow<&FLOAT.FLOATEvents>(from: FLOAT.FLOATEventsStoragePath) - ?? panic("Could not borrow the FLOATEvents from the signer.") - } - } - - execute { - var Timelock: FLOATVerifiers.Timelock? = nil - var SecretV2: FLOATVerifiers.SecretV2? = nil - var Limited: FLOATVerifiers.Limited? = nil - var MinimumBalance: FLOATVerifiers.MinimumBalance? = nil - var verifiers: [{FLOAT.IVerifier}] = [] - if timelock { - Timelock = FLOATVerifiers.Timelock(_dateStart: dateStart, _timePeriod: timePeriod) - verifiers.append(Timelock!) - } - if secret { - SecretV2 = FLOATVerifiers.SecretV2(_publicKey: secretPK) - verifiers.append(SecretV2!) - } - if limited { - Limited = FLOATVerifiers.Limited(_capacity: capacity) - verifiers.append(Limited!) - } - if minimumBalanceToggle { - MinimumBalance = FLOATVerifiers.MinimumBalance(_amount: minimumBalance) - verifiers.append(MinimumBalance!) - } - let extraMetadata: {String: AnyStruct} = {} - if flowTokenPurchase { - let tokenInfo = FLOAT.TokenInfo(_path: /public/flowTokenReceiver, _price: flowTokenCost) - extraMetadata["prices"] = {"A.1654653399040a61.FlowToken.Vault": tokenInfo} - } - self.FLOATEvents.createEvent(claimable: claimable, description: description, image: image, name: name, transferrable: transferrable, url: url, verifiers: verifiers, extraMetadata, initialGroups: initialGroups) - log("Started a new event for host.") - } -} diff --git a/backend/main/cadence/float/transactions/setup_account.cdc b/backend/main/cadence/float/transactions/setup_account.cdc deleted file mode 100644 index f8715b89e..000000000 --- a/backend/main/cadence/float/transactions/setup_account.cdc +++ /dev/null @@ -1,34 +0,0 @@ -import FLOAT from "../FLOAT.cdc" -import NonFungibleToken from "../../core-contracts/NonFungibleToken.cdc" -import MetadataViews from "../../core-contracts/MetadataViews.cdc" -import GrantedAccountAccess from "../../sharedaccount/GrantedAccountAccess.cdc" - -transaction { - - prepare(acct: AuthAccount) { - // SETUP COLLECTION - if acct.borrow<&FLOAT.Collection>(from: FLOAT.FLOATCollectionStoragePath) == nil { - acct.save(<- FLOAT.createEmptyCollection(), to: FLOAT.FLOATCollectionStoragePath) - acct.link<&FLOAT.Collection{NonFungibleToken.Receiver, NonFungibleToken.CollectionPublic, MetadataViews.ResolverCollection, FLOAT.CollectionPublic}> - (FLOAT.FLOATCollectionPublicPath, target: FLOAT.FLOATCollectionStoragePath) - } - - // SETUP FLOATEVENTS - if acct.borrow<&FLOAT.FLOATEvents>(from: FLOAT.FLOATEventsStoragePath) == nil { - acct.save(<- FLOAT.createEmptyFLOATEventCollection(), to: FLOAT.FLOATEventsStoragePath) - acct.link<&FLOAT.FLOATEvents{FLOAT.FLOATEventsPublic, MetadataViews.ResolverCollection}> - (FLOAT.FLOATEventsPublicPath, target: FLOAT.FLOATEventsStoragePath) - } - - // SETUP SHARED MINTING - if acct.borrow<&GrantedAccountAccess.Info>(from: GrantedAccountAccess.InfoStoragePath) == nil { - acct.save(<- GrantedAccountAccess.createInfo(), to: GrantedAccountAccess.InfoStoragePath) - acct.link<&GrantedAccountAccess.Info{GrantedAccountAccess.InfoPublic}> - (GrantedAccountAccess.InfoPublicPath, target: GrantedAccountAccess.InfoStoragePath) - } - } - - execute { - log("Finished setting up the account for FLOATs.") - } -} diff --git a/backend/main/cadence/float/transactions/transfer_float.cdc b/backend/main/cadence/float/transactions/transfer_float.cdc deleted file mode 100644 index ac3a11f58..000000000 --- a/backend/main/cadence/float/transactions/transfer_float.cdc +++ /dev/null @@ -1,30 +0,0 @@ -import FLOAT from "../FLOAT.cdc" -import NonFungibleToken from "../../core-contracts/NonFungibleToken.cdc" - -transaction(id: UInt64, recipient: Address) { - - let Collection: &FLOAT.Collection - let RecipientCollection: &FLOAT.Collection{NonFungibleToken.CollectionPublic} - - prepare(acct: AuthAccount) { - self.Collection = acct.borrow<&FLOAT.Collection>(from: FLOAT.FLOATCollectionStoragePath) - ?? panic("Could not get the Collection from the signer.") - self.RecipientCollection = getAccount(recipient).getCapability(FLOAT.FLOATCollectionPublicPath) - .borrow<&FLOAT.Collection{NonFungibleToken.CollectionPublic}>() - ?? panic("Could not borrow the recipient's public FLOAT Collection.") - } - - pre { - self.Collection.borrowFLOAT(id: id) != nil: - "You do not own this FLOAT." - self.Collection.borrowFLOAT(id: id)!.getEventMetadata() != nil: - "Could not borrow the public FLOAT Event data." - self.Collection.borrowFLOAT(id: id)!.getEventMetadata()!.transferrable: - "This FLOAT is not giftable on the FLOAT platform." - } - - execute { - self.RecipientCollection.deposit(token: <- self.Collection.withdraw(withdrawID: id)) - log("Transferred the FLOAT.") - } -} From 3747927c2de8b25aff233bae2458d633474518c0 Mon Sep 17 00:00:00 2001 From: Jonathan Bluks Date: Wed, 20 Jul 2022 09:52:37 -0700 Subject: [PATCH 05/21] CAS-204: Add FE changes for One Address One Vote information --- .../Community/StrategyEditorModal/index.js | 80 +++++++++---------- .../client/src/pages/CommunityCreate.js | 2 +- 2 files changed, 39 insertions(+), 43 deletions(-) diff --git a/frontend/packages/client/src/components/Community/StrategyEditorModal/index.js b/frontend/packages/client/src/components/Community/StrategyEditorModal/index.js index 5c6d25cb2..b9a392f23 100644 --- a/frontend/packages/client/src/components/Community/StrategyEditorModal/index.js +++ b/frontend/packages/client/src/components/Community/StrategyEditorModal/index.js @@ -1,26 +1,51 @@ import React, { useEffect, useState } from 'react'; -import networks from 'networks'; import StrategySelector from './StrategySelector'; import StrategyInformationForm from './StrategyInformationForm'; import { ActionButton } from 'components'; import { isValidAddress } from 'utils'; -const networkConfig = networks[process.env.REACT_APP_FLOW_ENV]; - const ModalSteps = { 1: 'select-strategy', 2: 'strategy-information', }; -const initialFormFields = { - addr: '', - name: '', - threshold: '', - maxWeight: '', - publicPath: '', +const getFormFields = (strategyName) => { + let initialFormFields = { + addr: '', + name: '', + threshold: '', + maxWeight: '', + publicPath: '', + }; + + if (strategyName === 'one-address-one-vote') { + initialFormFields = { + addr: '', + publicPath: '', + }; + } + return Object.keys(initialFormFields); }; -const formFields = Object.keys(initialFormFields); +const getRequiredFields = (strategyName) => { + let requiredFields = { + addr: (addr) => addr?.trim().length > 0 && isValidAddress(addr), + name: (name) => name?.trim().length > 0 && name?.trim().length <= 150, + publicPath: (path) => path?.trim().length > 0 && path?.trim().length <= 150, + maxWeight: (maxWeight) => + maxWeight?.trim().length > 0 && /^[0-9]+$/.test(maxWeight), + threshold: (threshold) => + threshold?.trim().length > 0 && /^[0-9]+$/.test(threshold), + }; + if (strategyName === 'one-address-one-vote') { + requiredFields = { + addr: (addr) => addr?.trim().length > 0 && isValidAddress(addr), + publicPath: (path) => + path?.trim().length > 0 && path?.trim().length <= 150, + }; + } + return requiredFields; +}; export default function StrategyEditorModal({ strategies = [], @@ -37,21 +62,12 @@ export default function StrategyEditorModal({ const [strategyData, setStrategyData] = useState({ name: '', - contract: { ...initialFormFields }, + contract: {}, }); // this useEffect validates form on second step useEffect(() => { - const requiredFields = { - addr: (addr) => addr?.trim().length > 0 && isValidAddress(addr), - name: (name) => name?.trim().length > 0 && name?.trim().length <= 150, - publicPath: (path) => - path?.trim().length > 0 && path?.trim().length <= 150, - maxWeight: (maxWeight) => - maxWeight?.trim().length > 0 && /^[0-9]+$/.test(maxWeight), - threshold: (threshold) => - threshold?.trim().length > 0 && /^[0-9]+$/.test(threshold), - }; + const requiredFields = getRequiredFields(strategyData.name); const isValid = Object.keys(requiredFields).every((field) => requiredFields[field](strategyData.contract[field]) ); @@ -60,26 +76,6 @@ export default function StrategyEditorModal({ // user selected strategy move to second step to enter information const setStrategy = (strategyName) => { - // - // STRATEGY CONFIGURATION - // - // If strategy selected is 'one-address-one-vote' - // then no more information is required(FE uses strategy configuration) - // modal should be closed and strategy should be ready to be added - if (strategyName === 'one-address-one-vote') { - const strategyConfig = - networkConfig.strategiesConfig['one-address-one-vote']; - onDone({ - name: strategyName, - contract: { - name: strategyConfig.name, - addr: strategyConfig.addr, - publicPath: strategyConfig.publicPath, - threshold: '0', - }, - }); - return; - } setStrategyData((state) => ({ ...state, name: strategyName })); // else go to second step setSep(ModalSteps[2]); @@ -139,7 +135,7 @@ export default function StrategyEditorModal({ Date: Wed, 20 Jul 2022 09:53:37 -0700 Subject: [PATCH 06/21] CAS-204: Add BE changes for One Address One Vote restrictions --- backend/main/strategies_test.go | 44 +++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/backend/main/strategies_test.go b/backend/main/strategies_test.go index 8d6464312..bc7d21719 100644 --- a/backend/main/strategies_test.go +++ b/backend/main/strategies_test.go @@ -284,6 +284,7 @@ func TestOneTokenOneVoteStrategy(t *testing.T) { clearTable("proposals") clearTable("votes") clearTable("balances") + clearTable("nfts") communityId := otu.AddCommunities(1)[0] proposalIds, proposals := otu.AddProposalsForStrategy(communityId, "one-address-one-vote", 2) @@ -354,3 +355,46 @@ func TestOneTokenOneVoteStrategy(t *testing.T) { } }) } + +func TestOneTokenOneVoteStrategyRestrictions(t *testing.T) { + clearTable("communities") + clearTable("community_users") + clearTable("proposals") + clearTable("votes") + clearTable("balances") + clearTable("nfts") + + otu.CreateNFTCollection("user1") + + communityId, community := otu.AddCommunitiesWithNFTContract(1, "user1") + proposalIds, proposals := otu.AddProposalsForStrategy(communityId[0], "one-address-one-vote", 1) + proposalId := proposalIds[0] + choices := proposals[0].Choices + + var contract = &shared.Contract{ + Name: community.Contract_name, + Addr: community.Contract_addr, + } + + votes, err := otu.GenerateListOfVotesWithNFTs(proposalId, 5, contract) + if err != nil { + t.Error(err) + } + + otu.AddDummyVotesAndNFTs(votes) + t.Run("Test Voting with valid NFT only", func(t *testing.T) { + + proposalWithChoices := models.NewProposalResults(proposalId, choices) + _results := otu.TallyResultsForOneAddressOneVote(votes, proposalWithChoices) + + response := otu.GetProposalResultsAPI(proposalId) + CheckResponseCode(t, http.StatusOK, response.Code) + + var results models.ProposalResults + json.Unmarshal(response.Body.Bytes(), &results) + + assert.Equal(t, _results.Proposal_id, results.Proposal_id) + assert.Equal(t, _results.Results_float["a"], results.Results_float["a"]) + assert.Equal(t, _results.Results_float["b"], results.Results_float["b"]) + }) +} From ea27f502ed4b037b777545cad938064bbf6f6650 Mon Sep 17 00:00:00 2001 From: Richard Melkonian Date: Wed, 20 Jul 2022 18:41:35 +0100 Subject: [PATCH 07/21] updated the ExampleNFT flow to run successfuly on emulator --- backend/Makefile | 7 +-- .../main/cadence/flow-ft/setup_account.cdc | 30 ++++++++++ .../main/cadence/transactions/mint_nft.cdc | 59 +++++++++++++++++-- .../setup_account_to_receive_royalty.cdc | 34 +++++++++++ 4 files changed, 120 insertions(+), 10 deletions(-) create mode 100755 backend/main/cadence/flow-ft/setup_account.cdc create mode 100644 backend/main/cadence/transactions/setup_account_to_receive_royalty.cdc diff --git a/backend/Makefile b/backend/Makefile index 438384cfb..cbee6e0f8 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -20,9 +20,9 @@ nfts: flow accounts add-contract NonFungibleToken ./main/cadence/contracts/NonFungibleToken.cdc && \ flow accounts add-contract MetadataViews ./main/cadence/contracts/MetadataViews.cdc && \ flow accounts add-contract ExampleNFT ./main/cadence/contracts/ExampleNFT.cdc && \ - flow transactions send ./main/cadence/transactions/create_collection.cdc && \ - flow transactions send ./main/cadence/transactions/mint_nft.cdc 0xf8d6e0586b0a20c7 "dev_nft" "don't try at home" "thumnbail goes here" - + flow transactions send ./main/cadence/flow-ft/setup_account.cdc && \ + flow transactions send ./main/cadence/transactions/setup_account_to_receive_royalty.cdc /storage/flowTokenVault && \ + flow transactions send ./main/cadence/transactions/mint_nft.cdc 0xf8d6e0586b0a20c7 "dev_nft" "don't try at home" "thumnbail goes here" '[0.8]' '["royalties"]' '[0xf8d6e0586b0a20c7]' macdev: APP_ENV=DEV make macrun @@ -34,7 +34,6 @@ floats: flow accounts add-contract FLOAT ./main/cadence/float/FLOAT.cdc && \ flow accounts add-contract FLOAT ./main/cadence/float/FLOATVerifiers.cdc -migrateup: migrate -path ./migrations -database "postgres://postgres:admin@localhost:5432/flow_snapshot?sslmode=disable" -verbose up migratedown: diff --git a/backend/main/cadence/flow-ft/setup_account.cdc b/backend/main/cadence/flow-ft/setup_account.cdc new file mode 100755 index 000000000..7a19738bb --- /dev/null +++ b/backend/main/cadence/flow-ft/setup_account.cdc @@ -0,0 +1,30 @@ +// This transaction is a template for a transaction +// to add a Vault resource to their account +// so that they can use the exampleToken +import FungibleToken from 0xee82856bf20e2aa6 +import FlowToken from 0x0ae53cb6e3f42a79 + +transaction { + + prepare(signer: AuthAccount) { + + if signer.borrow<&FlowToken.Vault>(from: /storage/flowTokenVault) == nil { + // Create a new flowToken Vault and put it in storage + signer.save(<-FlowToken.createEmptyVault(), to: /storage/flowTokenVault) + + // Create a public capability to the Vault that only exposes + // the deposit function through the Receiver interface + signer.link<&FlowToken.Vault{FungibleToken.Receiver}>( + /public/flowTokenReceiver, + target: /storage/flowTokenVault + ) + + // Create a public capability to the Vault that only exposes + // the balance field through the Balance interface + signer.link<&FlowToken.Vault{FungibleToken.Balance}>( + /public/flowTokenBalance, + target: /storage/flowTokenVault + ) + } + } +} diff --git a/backend/main/cadence/transactions/mint_nft.cdc b/backend/main/cadence/transactions/mint_nft.cdc index b670b5944..d8a451e5b 100644 --- a/backend/main/cadence/transactions/mint_nft.cdc +++ b/backend/main/cadence/transactions/mint_nft.cdc @@ -1,5 +1,7 @@ import NonFungibleToken from 0xf8d6e0586b0a20c7 import ExampleNFT from 0xf8d6e0586b0a20c7 +import MetadataViews from 0xf8d6e0586b0a20c7 +import FungibleToken from 0xee82856bf20e2aa6 // This script uses the NFTMinter resource to mint a new NFT // It must be run with the account that has the minter resource @@ -9,30 +11,75 @@ transaction( name: String, description: String, thumbnail: String, + cuts: [UFix64], + royaltyDescriptions: [String], + royaltyBeneficiaries: [Address] ) { - // local variable for storing the minter reference + /// local variable for storing the minter reference let minter: &ExampleNFT.NFTMinter + /// Reference to the receiver's collection + let recipientCollectionRef: &{NonFungibleToken.CollectionPublic} + + /// Previous NFT ID before the transaction executes + let mintingIDBefore: UInt64 + prepare(signer: AuthAccount) { + self.mintingIDBefore = ExampleNFT.totalSupply + // borrow a reference to the NFTMinter resource in storage self.minter = signer.borrow<&ExampleNFT.NFTMinter>(from: ExampleNFT.MinterStoragePath) - ?? panic("Could not borrow a reference to the NFT minter") - } + ?? panic("Account does not store an object at the specified path") - execute { // Borrow the recipient's public NFT collection reference - let receiver = getAccount(recipient) + self.recipientCollectionRef = getAccount(recipient) .getCapability(ExampleNFT.CollectionPublicPath) .borrow<&{NonFungibleToken.CollectionPublic}>() ?? panic("Could not get receiver reference to the NFT Collection") + } + + pre { + cuts.length == royaltyDescriptions.length && cuts.length == royaltyBeneficiaries.length: "Array length should be equal for royalty related details" + } + + execute { + + // Create the royalty details + var count = 0 + var royalties: [MetadataViews.Royalty] = [] + while royaltyBeneficiaries.length > count { + let beneficiary = royaltyBeneficiaries[count] + let beneficiaryCapability = getAccount(beneficiary) + .getCapability<&{FungibleToken.Receiver}>(MetadataViews.getRoyaltyReceiverPublicPath()) + + // Make sure the royalty capability is valid before minting the NFT + if !beneficiaryCapability.check() { panic("Beneficiary capability is not valid!") } + + royalties.append( + MetadataViews.Royalty( + receiver: beneficiaryCapability, + cut: cuts[count], + description: royaltyDescriptions[count] + ) + ) + count = count + 1 + } + + // Mint the NFT and deposit it to the recipient's collection self.minter.mintNFT( - recipient: receiver, + recipient: self.recipientCollectionRef, name: name, description: description, thumbnail: thumbnail, + royalties: royalties ) } + + post { + self.recipientCollectionRef.getIDs().contains(self.mintingIDBefore): "The next NFT ID should have been minted and delivered" + ExampleNFT.totalSupply == self.mintingIDBefore + 1: "The total supply should have been increased by 1" + } } diff --git a/backend/main/cadence/transactions/setup_account_to_receive_royalty.cdc b/backend/main/cadence/transactions/setup_account_to_receive_royalty.cdc new file mode 100644 index 000000000..e5e8d938f --- /dev/null +++ b/backend/main/cadence/transactions/setup_account_to_receive_royalty.cdc @@ -0,0 +1,34 @@ + +/// This transaction is a template for a transaction +/// to create a new link in their account to be used for receiving royalties +/// This transaction can be used for any fungible token, which is specified by the `vaultPath` argument +/// +/// If the account wants to receive royalties in FLOW, they'll use `/storage/flowTokenVault` +/// If they want to receive it in USDC, they would use FiatToken.VaultStoragePath +/// and so on. +/// The path used for the public link is a new path that in the future, is expected to receive +/// and generic token, which could be forwarded to the appropriate vault + +import FungibleToken from 0xee82856bf20e2aa6 +import MetadataViews from 0xf8d6e0586b0a20c7 + +transaction(vaultPath: StoragePath) { + + prepare(signer: AuthAccount) { + + // Return early if the account doesn't have a FungibleToken Vault + if signer.borrow<&FungibleToken.Vault>(from: vaultPath) == nil { + panic("A vault for the specified fungible token path does not exist") + } + + // Create a public capability to the Vault that only exposes + // the deposit function through the Receiver interface + let capability = signer.link<&{FungibleToken.Receiver, FungibleToken.Balance}>( + MetadataViews.getRoyaltyReceiverPublicPath(), + target: vaultPath + )! + + // Make sure the capability is valid + if !capability.check() { panic("Beneficiary capability is not valid!") } + } +} From 9193811e32851db8e6aaa195d79833d3136d464d Mon Sep 17 00:00:00 2001 From: Richard Melkonian Date: Wed, 20 Jul 2022 19:48:07 +0100 Subject: [PATCH 08/21] fixed issue with GetVoteWeightForBalance balance_of_nfts --- backend/main/strategies/balance_of_nfts.go | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/backend/main/strategies/balance_of_nfts.go b/backend/main/strategies/balance_of_nfts.go index ffebb7a01..0fbcf3f01 100644 --- a/backend/main/strategies/balance_of_nfts.go +++ b/backend/main/strategies/balance_of_nfts.go @@ -1,7 +1,6 @@ package strategies import ( - "fmt" "math" "github.com/DapperCollectives/CAST/backend/main/models" @@ -86,29 +85,13 @@ func (b *BalanceOfNfts) TallyVotes( func (b *BalanceOfNfts) GetVoteWeightForBalance(vote *models.VoteWithBalance, proposal *models.Proposal) (float64, error) { var weight float64 - var ERROR error = fmt.Errorf("this address has no nfts") - // get the nfts for this address var c models.Community if err := c.GetCommunityByProposalId(b.DB, proposal.ID); err != nil { return 0, err } - var contract = &shared.Contract{ - Name: c.Contract_name, - Addr: c.Contract_addr, - } - - nftIds, err := b.FlowAdapter.GetNFTIds(vote.Addr, contract) - if err != nil { - return 0, err - } - - if len(nftIds) == 0 { - return 0.00, ERROR - } - nftCount := len(nftIds) - weight = float64(nftCount) + weight = float64(len(vote.NFTs)) return weight, nil } From 871deb6f03b5a66827754a55555bfaf322e41014 Mon Sep 17 00:00:00 2001 From: Richard Melkonian Date: Wed, 20 Jul 2022 23:22:25 +0100 Subject: [PATCH 09/21] added flow contracts and updated Makefile --- backend/Makefile | 13 +- backend/main/cadence/float/FLOAT.cdc | 1013 +++++++++++++++++ backend/main/cadence/float/FLOATVerifiers.cdc | 156 +++ .../cadence/float/GrantedAccountAccess.cdc | 60 + .../float/transactions/create_event.cdc | 93 ++ .../float/transactions/create_group.cdc | 40 + 6 files changed, 1369 insertions(+), 6 deletions(-) create mode 100644 backend/main/cadence/float/FLOAT.cdc create mode 100644 backend/main/cadence/float/FLOATVerifiers.cdc create mode 100755 backend/main/cadence/float/GrantedAccountAccess.cdc create mode 100644 backend/main/cadence/float/transactions/create_event.cdc create mode 100644 backend/main/cadence/float/transactions/create_group.cdc diff --git a/backend/Makefile b/backend/Makefile index cbee6e0f8..8c0d93b77 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -16,25 +16,26 @@ build_and_run: build run macrun: build_macos run && NFTdeploy -nfts: +nft: flow accounts add-contract NonFungibleToken ./main/cadence/contracts/NonFungibleToken.cdc && \ flow accounts add-contract MetadataViews ./main/cadence/contracts/MetadataViews.cdc && \ flow accounts add-contract ExampleNFT ./main/cadence/contracts/ExampleNFT.cdc && \ flow transactions send ./main/cadence/flow-ft/setup_account.cdc && \ flow transactions send ./main/cadence/transactions/setup_account_to_receive_royalty.cdc /storage/flowTokenVault && \ flow transactions send ./main/cadence/transactions/mint_nft.cdc 0xf8d6e0586b0a20c7 "dev_nft" "don't try at home" "thumnbail goes here" '[0.8]' '["royalties"]' '[0xf8d6e0586b0a20c7]' + +float: + flow accounts add-contract GrantedAccountAccess ./main/cadence/float/GrantedAccountAccess.cdc && \ + flow accounts add-contract FLOAT ./main/cadence/float/FLOAT.cdc && \ + flow accounts add-contract FLOATVerifiers ./main/cadence/float/FLOATVerifiers.cdc + macdev: APP_ENV=DEV make macrun dev: APP_ENV=DEV make build_and_run -floats: - flow accounts add-contract GrantedAccountAccess ./main/cadence/float/GrantedAccountAccess.cdc && \ - flow accounts add-contract FLOAT ./main/cadence/float/FLOAT.cdc && \ - flow accounts add-contract FLOAT ./main/cadence/float/FLOATVerifiers.cdc - migrate -path ./migrations -database "postgres://postgres:admin@localhost:5432/flow_snapshot?sslmode=disable" -verbose up migratedown: migrate -path ./migrations -database "postgres://postgres:admin@localhost:5432/flow_snapshot?sslmode=disable" -verbose down diff --git a/backend/main/cadence/float/FLOAT.cdc b/backend/main/cadence/float/FLOAT.cdc new file mode 100644 index 000000000..819d478b5 --- /dev/null +++ b/backend/main/cadence/float/FLOAT.cdc @@ -0,0 +1,1013 @@ +// MADE BY: Emerald City, Jacob Tucker + +// This contract is for FLOAT, a proof of participation platform +// on Flow. It is similar to POAP, but a lot, lot cooler. ;) + +// The main idea is that FLOATs are simply NFTs. They are minted from +// a FLOATEvent, which is basically an event that a host starts. For example, +// if I have a Twitter space and want to create an event for it, I can create +// a new FLOATEvent in my FLOATEvents collection and mint FLOATs to people +// from this Twitter space event representing that they were there. + +// The complicated part is the FLOATVerifiers contract. That contract +// defines a list of "verifiers" that can be tagged onto a FLOATEvent to make +// the claiming more secure. For example, a host can decide to put a time +// constraint on when users can claim a FLOAT. They would do that by passing in +// a Timelock struct (defined in FLOATVerifiers.cdc) with a time period for which +// users can claim. + +// For a whole list of verifiers, see FLOATVerifiers.cdc + +// Lastly, we implemented GrantedAccountAccess.cdc, which allows you to specify +// someone else can control your account (in the context of FLOAT). This +// is specifically designed for teams to be able to handle one "host" on the +// FLOAT platform so all the company's events are under one account. +// This is mainly used to give other people access to your FLOATEvents resource, +// and allow them to mint for you and control Admin operations on your events. + +// For more info on GrantedAccountAccess, see GrantedAccountAccess.cdc + +// import NonFungibleToken from 0x1d7e57aa55817448 +// import MetadataViews from 0x1d7e57aa55817448 +// import GrantedAccountAccess from 0x2d4c3caffbeab845 +// import FungibleToken from 0xf233dcee88fe0abe +// import FlowToken from 0x1654653399040a61 +import NonFungibleToken from 0xf8d6e0586b0a20c7 +import MetadataViews from 0xf8d6e0586b0a20c7 +import GrantedAccountAccess from 0xf8d6e0586b0a20c7 +import FungibleToken from 0xee82856bf20e2aa6 +import FlowToken from 0x0ae53cb6e3f42a79 + +pub contract FLOAT: NonFungibleToken { + + /***********************************************/ + /******************** PATHS ********************/ + /***********************************************/ + + pub let FLOATCollectionStoragePath: StoragePath + pub let FLOATCollectionPublicPath: PublicPath + pub let FLOATEventsStoragePath: StoragePath + pub let FLOATEventsPublicPath: PublicPath + pub let FLOATEventsPrivatePath: PrivatePath + + /************************************************/ + /******************** EVENTS ********************/ + /************************************************/ + + pub event ContractInitialized() + pub event FLOATMinted(id: UInt64, eventHost: Address, eventId: UInt64, eventImage: String, recipient: Address, serial: UInt64) + pub event FLOATClaimed(id: UInt64, eventHost: Address, eventId: UInt64, eventImage: String, eventName: String, recipient: Address, serial: UInt64) + pub event FLOATDestroyed(id: UInt64, eventHost: Address, eventId: UInt64, eventImage: String, serial: UInt64) + pub event FLOATTransferred(id: UInt64, eventHost: Address, eventId: UInt64, newOwner: Address?, serial: UInt64) + pub event FLOATPurchased(id: UInt64, eventHost: Address, eventId: UInt64, recipient: Address, serial: UInt64) + pub event FLOATEventCreated(eventId: UInt64, description: String, host: Address, image: String, name: String, url: String) + pub event FLOATEventDestroyed(eventId: UInt64, host: Address, name: String) + + pub event Deposit(id: UInt64, to: Address?) + pub event Withdraw(id: UInt64, from: Address?) + + /***********************************************/ + /******************** STATE ********************/ + /***********************************************/ + + // The total amount of FLOATs that have ever been + // created (does not go down when a FLOAT is destroyed) + pub var totalSupply: UInt64 + // The total amount of FLOATEvents that have ever been + // created (does not go down when a FLOATEvent is destroyed) + pub var totalFLOATEvents: UInt64 + + /***********************************************/ + /**************** FUNCTIONALITY ****************/ + /***********************************************/ + + // A helpful wrapper to contain an address, + // the id of a FLOAT, and its serial + pub struct TokenIdentifier { + pub let id: UInt64 + pub let address: Address + pub let serial: UInt64 + + init(_id: UInt64, _address: Address, _serial: UInt64) { + self.id = _id + self.address = _address + self.serial = _serial + } + } + + pub struct TokenInfo { + pub let path: PublicPath + pub let price: UFix64 + + init(_path: PublicPath, _price: UFix64) { + self.path = _path + self.price = _price + } + } + + // Represents a FLOAT + pub resource NFT: NonFungibleToken.INFT, MetadataViews.Resolver { + // The `uuid` of this resource + pub let id: UInt64 + + // Some of these are also duplicated on the event, + // but it's necessary to put them here as well + // in case the FLOATEvent host deletes the event + pub let dateReceived: UFix64 + pub let eventDescription: String + pub let eventHost: Address + pub let eventId: UInt64 + pub let eventImage: String + pub let eventName: String + pub let originalRecipient: Address + pub let serial: UInt64 + + // A capability that points to the FLOATEvents this FLOAT is from. + // There is a chance the event host unlinks their event from + // the public, in which case it's impossible to know details + // about the event. Which is fine, since we store the + // crucial data to know about the FLOAT in the FLOAT itself. + pub let eventsCap: Capability<&FLOATEvents{FLOATEventsPublic, MetadataViews.ResolverCollection}> + + // Helper function to get the metadata of the event + // this FLOAT is from. + pub fun getEventMetadata(): &FLOATEvent{FLOATEventPublic}? { + if let events = self.eventsCap.borrow() { + return events.borrowPublicEventRef(eventId: self.eventId) + } + return nil + } + + // This is for the MetdataStandard + pub fun getViews(): [Type] { + return [ + Type(), + Type() + ] + } + + // This is for the MetdataStandard + pub fun resolveView(_ view: Type): AnyStruct? { + switch view { + case Type(): + return MetadataViews.Display( + name: self.eventName, + description: self.eventDescription, + thumbnail: MetadataViews.IPFSFile(cid: self.eventImage, path: nil) + ) + case Type(): + return TokenIdentifier( + _id: self.id, + _address: self.owner!.address, + _serial: self.serial + ) + } + + return nil + } + + init(_eventDescription: String, _eventHost: Address, _eventId: UInt64, _eventImage: String, _eventName: String, _originalRecipient: Address, _serial: UInt64) { + self.id = self.uuid + self.dateReceived = getCurrentBlock().timestamp + self.eventDescription = _eventDescription + self.eventHost = _eventHost + self.eventId = _eventId + self.eventImage = _eventImage + self.eventName = _eventName + self.originalRecipient = _originalRecipient + self.serial = _serial + + // Stores a capability to the FLOATEvents of its creator + self.eventsCap = getAccount(_eventHost) + .getCapability<&FLOATEvents{FLOATEventsPublic, MetadataViews.ResolverCollection}>(FLOAT.FLOATEventsPublicPath) + + emit FLOATMinted( + id: self.id, + eventHost: _eventHost, + eventId: _eventId, + eventImage: _eventImage, + recipient: _originalRecipient, + serial: _serial + ) + + FLOAT.totalSupply = FLOAT.totalSupply + 1 + } + + destroy() { + // If the FLOATEvent owner decided to unlink their public reference + // for some reason (heavily recommend against it), their records + // of who owns the FLOAT is going to be messed up. But that is their + // fault. We shouldn't let that prevent the user from deleting the FLOAT. + if let floatEvent: &FLOATEvent{FLOATEventPublic} = self.getEventMetadata() { + floatEvent.updateFLOATHome(id: self.id, serial: self.serial, owner: nil) + } + emit FLOATDestroyed( + id: self.id, + eventHost: self.eventHost, + eventId: self.eventId, + eventImage: self.eventImage, + serial: self.serial + ) + } + } + + // A public interface for people to call into our Collection + pub resource interface CollectionPublic { + pub fun borrowNFT(id: UInt64): &NonFungibleToken.NFT + pub fun borrowFLOAT(id: UInt64): &NFT? + pub fun borrowViewResolver(id: UInt64): &{MetadataViews.Resolver} + pub fun deposit(token: @NonFungibleToken.NFT) + pub fun getIDs(): [UInt64] + pub fun getAllIDs(): [UInt64] + pub fun ownedIdsFromEvent(eventId: UInt64): [UInt64] + } + + // A Collection that holds all of the users FLOATs. + // Withdrawing is not allowed. You can only transfer. + pub resource Collection: NonFungibleToken.Provider, NonFungibleToken.Receiver, NonFungibleToken.CollectionPublic, MetadataViews.ResolverCollection, CollectionPublic { + // Maps a FLOAT id to the FLOAT itself + pub var ownedNFTs: @{UInt64: NonFungibleToken.NFT} + // Maps an eventId to the ids of FLOATs that + // this user owns from that event. It's possible + // for it to be out of sync until June 2022 spork, + // but it is used merely as a helper, so that's okay. + access(account) var events: {UInt64: {UInt64: Bool}} + + // Deposits a FLOAT to the collection + pub fun deposit(token: @NonFungibleToken.NFT) { + let nft <- token as! @NFT + let id = nft.id + let eventId = nft.eventId + + // Update self.events[eventId] to have + // this FLOAT's id in it + if self.events[eventId] == nil { + self.events[eventId] = {id: true} + } else { + self.events[eventId]!.insert(key: id, true) + } + + // Try to update the FLOATEvent's current holders. This will + // not work if they unlinked their FLOATEvent to the public, + // and the data will go out of sync. But that is their fault. + if let floatEvent: &FLOATEvent{FLOATEventPublic} = nft.getEventMetadata() { + floatEvent.updateFLOATHome(id: id, serial: nft.serial, owner: self.owner!.address) + } + + emit Deposit(id: id, to: self.owner!.address) + self.ownedNFTs[id] <-! nft + } + + pub fun withdraw(withdrawID: UInt64): @NonFungibleToken.NFT { + let token <- self.ownedNFTs.remove(key: withdrawID) ?? panic("You do not own this FLOAT in your collection") + let nft <- token as! @NFT + + // Update self.events[eventId] to not + // have this FLOAT's id in it + self.events[nft.eventId]!.remove(key: withdrawID) + + // Try to update the FLOATEvent's current holders. This will + // not work if they unlinked their FLOATEvent to the public, + // and the data will go out of sync. But that is their fault. + // + // Additionally, this checks if the FLOATEvent host wanted this + // FLOAT to be transferrable. Secondary marketplaces will use this + // withdraw function, so if the FLOAT is not transferrable, + // you can't sell it there. + if let floatEvent: &FLOATEvent{FLOATEventPublic} = nft.getEventMetadata() { + assert( + floatEvent.transferrable, + message: "This FLOAT is not transferrable." + ) + floatEvent.updateFLOATHome(id: withdrawID, serial: nft.serial, owner: nil) + } + + emit Withdraw(id: withdrawID, from: self.owner!.address) + return <- nft + } + + pub fun delete(id: UInt64) { + let token <- self.ownedNFTs.remove(key: id) ?? panic("You do not own this FLOAT in your collection") + let nft <- token as! @NFT + + // Update self.events[eventId] to not + // have this FLOAT's id in it + self.events[nft.eventId]!.remove(key: id) + + destroy nft + } + + // Only returns the FLOATs for which we can still + // access data about their event. + pub fun getIDs(): [UInt64] { + let ids: [UInt64] = [] + for key in self.ownedNFTs.keys { + let nftRef = self.borrowFLOAT(id: key)! + if nftRef.eventsCap.check() { + ids.append(key) + } + } + return ids + } + + // Returns all the FLOATs ids + pub fun getAllIDs(): [UInt64] { + return self.ownedNFTs.keys + } + + // Returns an array of ids that belong to + // the passed in eventId + // + // It's possible for FLOAT ids to be present that + // shouldn't be if people tried to withdraw directly + // from `ownedNFTs` (not possible after June 2022 spork), + // but this makes sure the returned + // ids are all actually owned by this account. + pub fun ownedIdsFromEvent(eventId: UInt64): [UInt64] { + let answer: [UInt64] = [] + if let idsInEvent = self.events[eventId]?.keys { + for id in idsInEvent { + if self.ownedNFTs[id] != nil { + answer.append(id) + } + } + } + return answer + } + + pub fun borrowNFT(id: UInt64): &NonFungibleToken.NFT { + return (&self.ownedNFTs[id] as &NonFungibleToken.NFT?)! + } + + pub fun borrowFLOAT(id: UInt64): &NFT? { + if self.ownedNFTs[id] != nil { + let ref = (&self.ownedNFTs[id] as auth &NonFungibleToken.NFT?)! + return ref as! &NFT + } + return nil + } + + pub fun borrowViewResolver(id: UInt64): &{MetadataViews.Resolver} { + let tokenRef = (&self.ownedNFTs[id] as auth &NonFungibleToken.NFT?)! + let nftRef = tokenRef as! &NFT + return nftRef as &{MetadataViews.Resolver} + } + + init() { + self.ownedNFTs <- {} + self.events = {} + } + + destroy() { + destroy self.ownedNFTs + } + } + + // An interface that every "verifier" must implement. + // A verifier is one of the options on the FLOAT Event page, + // for example, a "time limit," or a "limited" number of + // FLOATs that can be claimed. + // All the current verifiers can be seen inside FLOATVerifiers.cdc + pub struct interface IVerifier { + // A function every verifier must implement. + // Will have `assert`s in it to make sure + // the user fits some criteria. + access(account) fun verify(_ params: {String: AnyStruct}) + } + + // A public interface to read the FLOATEvent + pub resource interface FLOATEventPublic { + pub var claimable: Bool + pub let dateCreated: UFix64 + pub let description: String + pub let eventId: UInt64 + pub let host: Address + pub let image: String + pub let name: String + pub var totalSupply: UInt64 + pub var transferrable: Bool + pub let url: String + pub fun claim(recipient: &Collection, params: {String: AnyStruct}) + pub fun purchase(recipient: &Collection, params: {String: AnyStruct}, payment: @FungibleToken.Vault) + pub fun getClaimed(): {Address: TokenIdentifier} + pub fun getCurrentHolders(): {UInt64: TokenIdentifier} + pub fun getCurrentHolder(serial: UInt64): TokenIdentifier? + pub fun getExtraMetadata(): {String: AnyStruct} + pub fun getVerifiers(): {String: [{IVerifier}]} + pub fun getGroups(): [String] + pub fun getPrices(): {String: TokenInfo}? + pub fun hasClaimed(account: Address): TokenIdentifier? + + access(account) fun updateFLOATHome(id: UInt64, serial: UInt64, owner: Address?) + } + + // + // FLOATEvent + // + pub resource FLOATEvent: FLOATEventPublic, MetadataViews.Resolver { + // Whether or not users can claim from our event (can be toggled + // at any time) + pub var claimable: Bool + // Maps an address to the FLOAT they claimed + access(account) var claimed: {Address: TokenIdentifier} + // Maps a serial to the person who theoretically owns + // that FLOAT. Must be serial --> TokenIdentifier because + // it's possible someone has multiple FLOATs from this event. + access(account) var currentHolders: {UInt64: TokenIdentifier} + pub let dateCreated: UFix64 + pub let description: String + // This is equal to this resource's uuid + pub let eventId: UInt64 + access(account) var extraMetadata: {String: AnyStruct} + // The groups that this FLOAT Event belongs to (groups + // are within the FLOATEvents resource) + access(account) var groups: {String: Bool} + // Who created this FLOAT Event + pub let host: Address + // The image of the FLOAT Event + pub let image: String + // The name of the FLOAT Event + pub let name: String + // The total number of FLOATs that have been + // minted from this event + pub var totalSupply: UInt64 + // Whether or not the FLOATs that users own + // from this event can be transferred on the + // FLOAT platform itself (transferring allowed + // elsewhere) + pub var transferrable: Bool + // A url of where the event took place + pub let url: String + // A list of verifiers this FLOAT Event contains. + // Will be used every time someone "claims" a FLOAT + // to see if they pass the requirements + access(account) let verifiers: {String: [{IVerifier}]} + + /***************** Setters for the Event Owner *****************/ + + // Toggles claiming on/off + pub fun toggleClaimable(): Bool { + self.claimable = !self.claimable + return self.claimable + } + + // Toggles transferring on/off + pub fun toggleTransferrable(): Bool { + self.transferrable = !self.transferrable + return self.transferrable + } + + // Updates the metadata in case you want + // to add something. + pub fun updateMetadata(newExtraMetadata: {String: AnyStruct}) { + for key in newExtraMetadata.keys { + if !self.extraMetadata.containsKey(key) { + self.extraMetadata[key] = newExtraMetadata[key] + } + } + } + + /***************** Setters for the Contract Only *****************/ + + // Called if a user moves their FLOAT to another location. + // Needed so we can keep track of who currently has it. + access(account) fun updateFLOATHome(id: UInt64, serial: UInt64, owner: Address?) { + if owner == nil { + self.currentHolders.remove(key: serial) + } else { + self.currentHolders[serial] = TokenIdentifier( + _id: id, + _address: owner!, + _serial: serial + ) + } + emit FLOATTransferred(id: id, eventHost: self.host, eventId: self.eventId, newOwner: owner, serial: serial) + } + + // Adds this FLOAT Event to a group + access(account) fun addToGroup(groupName: String) { + self.groups[groupName] = true + } + + // Removes this FLOAT Event to a group + access(account) fun removeFromGroup(groupName: String) { + self.groups.remove(key: groupName) + } + + /***************** Getters (all exposed to the public) *****************/ + + // Returns info about the FLOAT that this account claimed + // (if any) + pub fun hasClaimed(account: Address): TokenIdentifier? { + return self.claimed[account] + } + + // This is a guarantee that the person owns the FLOAT + // with the passed in serial + pub fun getCurrentHolder(serial: UInt64): TokenIdentifier? { + pre { + self.currentHolders[serial] != nil: + "This serial has not been created yet." + } + let data = self.currentHolders[serial]! + let collection = getAccount(data.address).getCapability(FLOAT.FLOATCollectionPublicPath).borrow<&Collection{CollectionPublic}>() + if collection?.borrowFLOAT(id: data.id) != nil { + return data + } + + return nil + } + + // Returns an accurate dictionary of all the + // claimers + pub fun getClaimed(): {Address: TokenIdentifier} { + return self.claimed + } + + // This dictionary may be slightly off if for some + // reason the FLOATEvents owner ever unlinked their + // resource from the public. + // Use `getCurrentHolder(serial: UInt64)` to truly + // verify if someone holds that serial. + pub fun getCurrentHolders(): {UInt64: TokenIdentifier} { + return self.currentHolders + } + + pub fun getExtraMetadata(): {String: AnyStruct} { + return self.extraMetadata + } + + // Gets all the verifiers that will be used + // for claiming + pub fun getVerifiers(): {String: [{IVerifier}]} { + return self.verifiers + } + + pub fun getGroups(): [String] { + return self.groups.keys + } + + pub fun getViews(): [Type] { + return [ + Type() + ] + } + + pub fun getPrices(): {String: TokenInfo}? { + if let prices = self.extraMetadata["prices"] { + return prices as! {String: TokenInfo} + } + return nil + } + + pub fun resolveView(_ view: Type): AnyStruct? { + switch view { + case Type(): + return MetadataViews.Display( + name: self.name, + description: self.description, + thumbnail: MetadataViews.IPFSFile(cid: self.image, path: nil) + ) + } + + return nil + } + + /****************** Getting a FLOAT ******************/ + + // Will not panic if one of the recipients has already claimed. + // It will just skip them. + pub fun batchMint(recipients: [&Collection{NonFungibleToken.CollectionPublic}]) { + for recipient in recipients { + if self.claimed[recipient.owner!.address] == nil { + self.mint(recipient: recipient) + } + } + } + + // Used to give a person a FLOAT from this event. + // Used as a helper function for `claim`, but can also be + // used by the event owner and shared accounts to + // mint directly to a user. + // + // If the event owner directly mints to a user, it does not + // run the verifiers on the user. It bypasses all of them. + // + // Return the id of the FLOAT it minted + pub fun mint(recipient: &Collection{NonFungibleToken.CollectionPublic}): UInt64 { + pre { + self.claimed[recipient.owner!.address] == nil: + "This person already claimed their FLOAT!" + } + let recipientAddr: Address = recipient.owner!.address + let serial = self.totalSupply + + let token <- create NFT( + _eventDescription: self.description, + _eventHost: self.host, + _eventId: self.eventId, + _eventImage: self.image, + _eventName: self.name, + _originalRecipient: recipientAddr, + _serial: serial + ) + let id = token.id + // Saves the claimer + self.claimed[recipientAddr] = TokenIdentifier( + _id: id, + _address: recipientAddr, + _serial: serial + ) + // Saves the claimer as the current holder + // of the newly minted FLOAT + self.currentHolders[serial] = TokenIdentifier( + _id: id, + _address: recipientAddr, + _serial: serial + ) + + self.totalSupply = self.totalSupply + 1 + recipient.deposit(token: <- token) + return id + } + + access(account) fun verifyAndMint(recipient: &Collection, params: {String: AnyStruct}): UInt64 { + params["event"] = &self as &FLOATEvent{FLOATEventPublic} + params["claimee"] = recipient.owner!.address + + // Runs a loop over all the verifiers that this FLOAT Events + // implements. For example, "Limited", "Timelock", "Secret", etc. + // All the verifiers are in the FLOATVerifiers.cdc contract + for identifier in self.verifiers.keys { + let typedModules = (&self.verifiers[identifier] as &[{IVerifier}]?)! + var i = 0 + while i < typedModules.length { + let verifier = &typedModules[i] as &{IVerifier} + verifier.verify(params) + i = i + 1 + } + } + + // You're good to go. + let id = self.mint(recipient: recipient) + + emit FLOATClaimed( + id: id, + eventHost: self.host, + eventId: self.eventId, + eventImage: self.image, + eventName: self.name, + recipient: recipient.owner!.address, + serial: self.totalSupply - 1 + ) + return id + } + + // For the public to claim FLOATs. Must be claimable to do so. + // You can pass in `params` that will be forwarded to the + // customized `verify` function of the verifier. + // + // For example, the FLOAT platform allows event hosts + // to specify a secret phrase. That secret phrase will + // be passed in the `params`. + pub fun claim(recipient: &Collection, params: {String: AnyStruct}) { + pre { + self.getPrices() == nil: + "You need to purchase this FLOAT." + self.claimed[recipient.owner!.address] == nil: + "This person already claimed their FLOAT!" + self.claimable: + "This FLOATEvent is not claimable, and thus not currently active." + } + + self.verifyAndMint(recipient: recipient, params: params) + } + + pub fun purchase(recipient: &Collection, params: {String: AnyStruct}, payment: @FungibleToken.Vault) { + pre { + self.getPrices() != nil: + "Don't call this function. The FLOAT is free." + self.getPrices()![payment.getType().identifier] != nil: + "This FLOAT does not support purchasing in the passed in token." + payment.balance == self.getPrices()![payment.getType().identifier]!.price: + "You did not pass in the correct amount of tokens." + self.claimed[recipient.owner!.address] == nil: + "This person already claimed their FLOAT!" + self.claimable: + "This FLOATEvent is not claimable, and thus not currently active." + } + let royalty: UFix64 = 0.05 + let emeraldCityTreasury: Address = 0x5643fd47a29770e7 + let paymentType: String = payment.getType().identifier + let tokenInfo: TokenInfo = self.getPrices()![paymentType]! + + let EventHostVault = getAccount(self.host).getCapability(tokenInfo.path) + .borrow<&{FungibleToken.Receiver}>() + ?? panic("Could not borrow the &{FungibleToken.Receiver} from the event host.") + + assert( + EventHostVault.getType().identifier == paymentType, + message: "The event host's path is not associated with the intended token." + ) + + let EmeraldCityVault = getAccount(emeraldCityTreasury).getCapability(tokenInfo.path) + .borrow<&{FungibleToken.Receiver}>() + ?? panic("Could not borrow the &{FungibleToken.Receiver} from Emerald City's Vault.") + + assert( + EmeraldCityVault.getType().identifier == paymentType, + message: "Emerald City's path is not associated with the intended token." + ) + + let emeraldCityCut <- payment.withdraw(amount: payment.balance * royalty) + + EmeraldCityVault.deposit(from: <- emeraldCityCut) + EventHostVault.deposit(from: <- payment) + + let id = self.verifyAndMint(recipient: recipient, params: params) + + emit FLOATPurchased(id: id, eventHost: self.host, eventId: self.eventId, recipient: recipient.owner!.address, serial: self.totalSupply - 1) + } + + init ( + _claimable: Bool, + _description: String, + _extraMetadata: {String: AnyStruct}, + _host: Address, + _image: String, + _name: String, + _transferrable: Bool, + _url: String, + _verifiers: {String: [{IVerifier}]}, + ) { + self.claimable = _claimable + self.claimed = {} + self.currentHolders = {} + self.dateCreated = getCurrentBlock().timestamp + self.description = _description + self.eventId = self.uuid + self.extraMetadata = _extraMetadata + self.groups = {} + self.host = _host + self.image = _image + self.name = _name + self.transferrable = _transferrable + self.totalSupply = 0 + self.url = _url + self.verifiers = _verifiers + + FLOAT.totalFLOATEvents = FLOAT.totalFLOATEvents + 1 + emit FLOATEventCreated(eventId: self.eventId, description: self.description, host: self.host, image: self.image, name: self.name, url: self.url) + } + + destroy() { + emit FLOATEventDestroyed(eventId: self.eventId, host: self.host, name: self.name) + } + } + + // A container of FLOAT Events (maybe because they're similar to + // one another, or an event host wants to list all their AMAs together, etc). + pub resource Group { + pub let id: UInt64 + pub let name: String + pub let image: String + pub let description: String + // All the FLOAT Events that belong + // to this group. + access(account) var events: {UInt64: Bool} + + access(account) fun addEvent(eventId: UInt64) { + self.events[eventId] = true + } + + access(account) fun removeEvent(eventId: UInt64) { + self.events.remove(key: eventId) + } + + pub fun getEvents(): [UInt64] { + return self.events.keys + } + + init(_name: String, _image: String, _description: String) { + self.id = self.uuid + self.name = _name + self.image = _image + self.description = _description + self.events = {} + } + } + + // + // FLOATEvents + // + pub resource interface FLOATEventsPublic { + // Public Getters + pub fun borrowPublicEventRef(eventId: UInt64): &FLOATEvent{FLOATEventPublic}? + pub fun getAllEvents(): {UInt64: String} + pub fun getIDs(): [UInt64] + pub fun getGroup(groupName: String): &Group? + pub fun getGroups(): [String] + // Account Getters + access(account) fun borrowEventsRef(): &FLOATEvents + } + + // A "Collection" of FLOAT Events + pub resource FLOATEvents: FLOATEventsPublic, MetadataViews.ResolverCollection { + // All the FLOAT Events this collection stores + access(account) var events: @{UInt64: FLOATEvent} + // All the Groups this collection stores + access(account) var groups: @{String: Group} + + // Creates a new FLOAT Event by passing in some basic parameters + // and a list of all the verifiers this event must abide by + pub fun createEvent( + claimable: Bool, + description: String, + image: String, + name: String, + transferrable: Bool, + url: String, + verifiers: [{IVerifier}], + _ extraMetadata: {String: AnyStruct}, + initialGroups: [String] + ): UInt64 { + let typedVerifiers: {String: [{IVerifier}]} = {} + for verifier in verifiers { + let identifier = verifier.getType().identifier + if typedVerifiers[identifier] == nil { + typedVerifiers[identifier] = [verifier] + } else { + typedVerifiers[identifier]!.append(verifier) + } + } + + let FLOATEvent <- create FLOATEvent( + _claimable: claimable, + _description: description, + _extraMetadata: extraMetadata, + _host: self.owner!.address, + _image: image, + _name: name, + _transferrable: transferrable, + _url: url, + _verifiers: typedVerifiers + ) + let eventId = FLOATEvent.eventId + self.events[eventId] <-! FLOATEvent + + for groupName in initialGroups { + self.addEventToGroup(groupName: groupName, eventId: eventId) + } + return eventId + } + + // Deletes an event. Also makes sure to remove + // the event from all the groups its in. + pub fun deleteEvent(eventId: UInt64) { + let eventRef = self.borrowEventRef(eventId: eventId) ?? panic("This FLOAT does not exist.") + for groupName in eventRef.getGroups() { + let groupRef = (&self.groups[groupName] as &Group?)! + groupRef.removeEvent(eventId: eventId) + } + destroy self.events.remove(key: eventId) + } + + pub fun createGroup(groupName: String, image: String, description: String) { + pre { + self.groups[groupName] == nil: "A group with this name already exists." + } + self.groups[groupName] <-! create Group(_name: groupName, _image: image, _description: description) + } + + // Deletes a group. Also makes sure to remove + // the group from all the events that use it. + pub fun deleteGroup(groupName: String) { + let eventsInGroup = self.groups[groupName]?.getEvents() + ?? panic("This Group does not exist.") + for eventId in eventsInGroup { + let ref = (&self.events[eventId] as &FLOATEvent?)! + ref.removeFromGroup(groupName: groupName) + } + destroy self.groups.remove(key: groupName) + } + + // Adds an event to a group. Also adds the group + // to the event. + pub fun addEventToGroup(groupName: String, eventId: UInt64) { + pre { + self.groups[groupName] != nil: "This group does not exist." + self.events[eventId] != nil: "This event does not exist." + } + let groupRef = (&self.groups[groupName] as &Group?)! + groupRef.addEvent(eventId: eventId) + + let eventRef = self.borrowEventRef(eventId: eventId)! + eventRef.addToGroup(groupName: groupName) + } + + // Simply takes the event away from the group + pub fun removeEventFromGroup(groupName: String, eventId: UInt64) { + pre { + self.groups[groupName] != nil: "This group does not exist." + self.events[eventId] != nil: "This event does not exist." + } + let groupRef = (&self.groups[groupName] as &Group?)! + groupRef.removeEvent(eventId: eventId) + + let eventRef = self.borrowEventRef(eventId: eventId)! + eventRef.removeFromGroup(groupName: groupName) + } + + pub fun getGroup(groupName: String): &Group? { + return &self.groups[groupName] as &Group? + } + + pub fun getGroups(): [String] { + return self.groups.keys + } + + // Only accessible to people who share your account. + // If `fromHost` has allowed you to share your account + // in the GrantedAccountAccess.cdc contract, you can get a reference + // to their FLOATEvents here and do pretty much whatever you want. + pub fun borrowSharedRef(fromHost: Address): &FLOATEvents { + let sharedInfo = getAccount(fromHost).getCapability(GrantedAccountAccess.InfoPublicPath) + .borrow<&GrantedAccountAccess.Info{GrantedAccountAccess.InfoPublic}>() + ?? panic("Cannot borrow the InfoPublic from the host") + assert( + sharedInfo.isAllowed(account: self.owner!.address), + message: "This account owner does not share their account with you." + ) + let otherFLOATEvents = getAccount(fromHost).getCapability(FLOAT.FLOATEventsPublicPath) + .borrow<&FLOATEvents{FLOATEventsPublic}>() + ?? panic("Could not borrow the public FLOATEvents.") + return otherFLOATEvents.borrowEventsRef() + } + + // Only used for the above function. + access(account) fun borrowEventsRef(): &FLOATEvents { + return &self as &FLOATEvents + } + + pub fun borrowEventRef(eventId: UInt64): &FLOATEvent? { + return &self.events[eventId] as &FLOATEvent? + } + + /************* Getters (for anyone) *************/ + + // Get a public reference to the FLOATEvent + // so you can call some helpful getters + pub fun borrowPublicEventRef(eventId: UInt64): &FLOATEvent{FLOATEventPublic}? { + return &self.events[eventId] as &FLOATEvent{FLOATEventPublic}? + } + + pub fun getIDs(): [UInt64] { + return self.events.keys + } + + // Maps the eventId to the name of that + // event. Just a kind helper. + pub fun getAllEvents(): {UInt64: String} { + let answer: {UInt64: String} = {} + for id in self.events.keys { + let ref = (&self.events[id] as &FLOATEvent?)! + answer[id] = ref.name + } + return answer + } + + pub fun borrowViewResolver(id: UInt64): &{MetadataViews.Resolver} { + return (&self.events[id] as &{MetadataViews.Resolver}?)! + } + + init() { + self.events <- {} + self.groups <- {} + } + + destroy() { + destroy self.events + destroy self.groups + } + } + + pub fun createEmptyCollection(): @Collection { + return <- create Collection() + } + + pub fun createEmptyFLOATEventCollection(): @FLOATEvents { + return <- create FLOATEvents() + } + + init() { + self.totalSupply = 0 + self.totalFLOATEvents = 0 + emit ContractInitialized() + + self.FLOATCollectionStoragePath = /storage/FLOATCollectionStoragePath + self.FLOATCollectionPublicPath = /public/FLOATCollectionPublicPath + self.FLOATEventsStoragePath = /storage/FLOATEventsStoragePath + self.FLOATEventsPrivatePath = /private/FLOATEventsPrivatePath + self.FLOATEventsPublicPath = /public/FLOATEventsPublicPath + } +} diff --git a/backend/main/cadence/float/FLOATVerifiers.cdc b/backend/main/cadence/float/FLOATVerifiers.cdc new file mode 100644 index 000000000..49d963376 --- /dev/null +++ b/backend/main/cadence/float/FLOATVerifiers.cdc @@ -0,0 +1,156 @@ +import FLOAT from 0xf8d6e0586b0a20c7 +import FungibleToken from 0xee82856bf20e2aa6 +import FlowToken from 0x0ae53cb6e3f42a79 + +pub contract FLOATVerifiers { + + // The "verifiers" to be used + + // + // Timelock + // + // Specifies a time range in which the + // FLOAT from an event can be claimed + pub struct Timelock: FLOAT.IVerifier { + // An automatic switch handled by the contract + // to stop people from claiming after a certain time. + pub let dateStart: UFix64 + pub let dateEnding: UFix64 + + pub fun verify(_ params: {String: AnyStruct}) { + assert( + getCurrentBlock().timestamp >= self.dateStart, + message: "This FLOAT Event has not started yet." + ) + assert( + getCurrentBlock().timestamp <= self.dateEnding, + message: "Sorry! The time has run out to mint this FLOAT." + ) + } + + init(_dateStart: UFix64, _timePeriod: UFix64) { + self.dateStart = _dateStart + self.dateEnding = self.dateStart + _timePeriod + } + } + + // + // Secret + // + // Specifies a secret code in order + // to claim a FLOAT (not very secure, but cool feature) + pub struct Secret: FLOAT.IVerifier { + // The secret code, set by the owner of this event. + access(self) let secretPhrase: String + + pub fun verify(_ params: {String: AnyStruct}) { + let secretPhrase = params["secretPhrase"]! as! String + assert( + self.secretPhrase == secretPhrase, + message: "You did not input the correct secret phrase." + ) + } + + init(_secretPhrase: String) { + self.secretPhrase = _secretPhrase + } + } + + // + // Limited + // + // Specifies a limit for the amount of people + // who can CLAIM. Not to be confused with how many currently + // hold a FLOAT from this event, since users can + // delete their FLOATs. + pub struct Limited: FLOAT.IVerifier { + pub var capacity: UInt64 + + pub fun verify(_ params: {String: AnyStruct}) { + let event = params["event"]! as! &FLOAT.FLOATEvent{FLOAT.FLOATEventPublic} + let currentCapacity = event.totalSupply + assert( + currentCapacity < self.capacity, + message: "This FLOAT Event is at capacity." + ) + } + + init(_capacity: UInt64) { + self.capacity = _capacity + } + } + + // + // MultipleSecret + // + // Allows for Multiple Secret codes + // Everytime a secret gets used, it gets removed + // from the list. + pub struct MultipleSecret: FLOAT.IVerifier { + access(self) let secrets: {String: Bool} + + pub fun verify(_ params: {String: AnyStruct}) { + let secretPhrase = params["secretPhrase"]! as! String + assert( + self.secrets[secretPhrase] != nil, + message: "You did not input a correct secret phrase." + ) + self.secrets.remove(key: secretPhrase) + } + + init(_secrets: [String]) { + self.secrets = {} + for secret in _secrets { + self.secrets[secret] = true + } + } + } + + // + // SecretV2 + // + // Much more secure than Secret + pub struct SecretV2: FLOAT.IVerifier { + pub let publicKey: String + + pub fun verify(_ params: {String: AnyStruct}) { + let data: [UInt8] = (params["claimee"]! as! Address).toString().utf8 + let sig: [UInt8] = (params["secretSig"]! as! String).decodeHex() + let publicKey = PublicKey(publicKey: self.publicKey.decodeHex(), signatureAlgorithm: SignatureAlgorithm.ECDSA_P256) + let valid = publicKey.verify(signature: sig, signedData: data, domainSeparationTag: "FLOW-V0.0-user", hashAlgorithm: HashAlgorithm.SHA3_256) + + assert( + valid, + message: "You did not input the correct secret phrase." + ) + } + + init(_publicKey: String) { + self.publicKey = _publicKey + } + } + + // + // MinimumBalance + // + // Requires a minimum Flow Balance to succeed + pub struct MinimumBalance: FLOAT.IVerifier { + pub let amount: UFix64 + + pub fun verify(_ params: {String: AnyStruct}) { + let claimee: Address = params["claimee"]! as! Address + let flowVault = getAccount(claimee).getCapability(/public/flowTokenBalance) + .borrow<&FlowToken.Vault{FungibleToken.Balance}>() + ?? panic("Could not borrow the Flow Token Vault") + + assert( + flowVault.balance >= self.amount, + message: "You do not meet the minimum required Flow Token balance." + ) + } + + init(_amount: UFix64) { + self.amount = _amount + } + } +} diff --git a/backend/main/cadence/float/GrantedAccountAccess.cdc b/backend/main/cadence/float/GrantedAccountAccess.cdc new file mode 100755 index 000000000..68e02addf --- /dev/null +++ b/backend/main/cadence/float/GrantedAccountAccess.cdc @@ -0,0 +1,60 @@ +// MADE BY: Emerald City, Jacob Tucker + +// This is a very simple contract that lets users add addresses +// to an "Info" resource signifying they want them to share their account. + +// This is specifically used by the +// `pub fun borrowSharedRef(fromHost: Address): &FLOATEvents` +// function inside FLOAT.cdc to give users access to someone elses +// FLOATEvents if they are on this shared list. + +// This contract is my way of saying I hate private capabilities, so I +// implemented an alternative solution to private access. + +pub contract GrantedAccountAccess { + + pub let InfoStoragePath: StoragePath + pub let InfoPublicPath: PublicPath + + pub resource interface InfoPublic { + pub fun getAllowed(): [Address] + pub fun isAllowed(account: Address): Bool + } + + // A list of people you allow to share your + // account. + pub resource Info: InfoPublic { + access(account) var allowed: {Address: Bool} + + // Allow someone to share your account + pub fun addAccount(account: Address) { + self.allowed[account] = true + } + + pub fun removeAccount(account: Address) { + self.allowed.remove(key: account) + } + + pub fun getAllowed(): [Address] { + return self.allowed.keys + } + + pub fun isAllowed(account: Address): Bool { + return self.allowed.containsKey(account) + } + + init() { + self.allowed = {} + } + } + + pub fun createInfo(): @Info { + return <- create Info() + } + + init() { + self.InfoStoragePath = /storage/GrantedAccountAccessInfo + self.InfoPublicPath = /public/GrantedAccountAccessInfo + } + +} diff --git a/backend/main/cadence/float/transactions/create_event.cdc b/backend/main/cadence/float/transactions/create_event.cdc new file mode 100644 index 000000000..b2cdf56e5 --- /dev/null +++ b/backend/main/cadence/float/transactions/create_event.cdc @@ -0,0 +1,93 @@ +import FLOAT from 0xf8d6e0586b0a20c7 +import FLOATVerifiers from 0xf8d6e0586b0a20c7 +import NonFungibleToken from 0xf8d6e0586b0a20c7 +import MetadataViews from 0xf8d6e0586b0a20c7 +import GrantedAccountAccess from 0xf8d6e0586b0a20c7 + +transaction( + forHost: Address, + claimable: Bool, + name: String, + description: String, + image: String, + url: String, + transferrable: Bool, + timelock: Bool, + dateStart: UFix64, + timePeriod: UFix64, + secret: Bool, + secretPK: String, + limited: Bool, + capacity: UInt64, + initialGroups: [String], + flowTokenPurchase: Bool, + flowTokenCost: UFix64, + minimumBalanceToggle: Bool, + minimumBalance: UFix64 +) { + + let FLOATEvents: &FLOAT.FLOATEvents + + prepare(acct: AuthAccount) { + // SETUP COLLECTION + if acct.borrow<&FLOAT.Collection>(from: FLOAT.FLOATCollectionStoragePath) == nil { + acct.save(<- FLOAT.createEmptyCollection(), to: FLOAT.FLOATCollectionStoragePath) + acct.link<&FLOAT.Collection{NonFungibleToken.Receiver, NonFungibleToken.CollectionPublic, MetadataViews.ResolverCollection, FLOAT.CollectionPublic}> + (FLOAT.FLOATCollectionPublicPath, target: FLOAT.FLOATCollectionStoragePath) + } + + // SETUP FLOATEVENTS + if acct.borrow<&FLOAT.FLOATEvents>(from: FLOAT.FLOATEventsStoragePath) == nil { + acct.save(<- FLOAT.createEmptyFLOATEventCollection(), to: FLOAT.FLOATEventsStoragePath) + acct.link<&FLOAT.FLOATEvents{FLOAT.FLOATEventsPublic, MetadataViews.ResolverCollection}> + (FLOAT.FLOATEventsPublicPath, target: FLOAT.FLOATEventsStoragePath) + } + + // SETUP SHARED MINTING + if acct.borrow<&GrantedAccountAccess.Info>(from: GrantedAccountAccess.InfoStoragePath) == nil { + acct.save(<- GrantedAccountAccess.createInfo(), to: GrantedAccountAccess.InfoStoragePath) + acct.link<&GrantedAccountAccess.Info{GrantedAccountAccess.InfoPublic}> + (GrantedAccountAccess.InfoPublicPath, target: GrantedAccountAccess.InfoStoragePath) + } + + if forHost != acct.address { + let FLOATEvents = acct.borrow<&FLOAT.FLOATEvents>(from: FLOAT.FLOATEventsStoragePath) + ?? panic("Could not borrow the FLOATEvents from the signer.") + self.FLOATEvents = FLOATEvents.borrowSharedRef(fromHost: forHost) + } else { + self.FLOATEvents = acct.borrow<&FLOAT.FLOATEvents>(from: FLOAT.FLOATEventsStoragePath) + ?? panic("Could not borrow the FLOATEvents from the signer.") + } + } + + execute { + var Timelock: FLOATVerifiers.Timelock? = nil + var SecretV2: FLOATVerifiers.SecretV2? = nil + var Limited: FLOATVerifiers.Limited? = nil + var MinimumBalance: FLOATVerifiers.MinimumBalance? = nil + var verifiers: [{FLOAT.IVerifier}] = [] + if timelock { + Timelock = FLOATVerifiers.Timelock(_dateStart: dateStart, _timePeriod: timePeriod) + verifiers.append(Timelock!) + } + if secret { + SecretV2 = FLOATVerifiers.SecretV2(_publicKey: secretPK) + verifiers.append(SecretV2!) + } + if limited { + Limited = FLOATVerifiers.Limited(_capacity: capacity) + verifiers.append(Limited!) + } + if minimumBalanceToggle { + MinimumBalance = FLOATVerifiers.MinimumBalance(_amount: minimumBalance) + verifiers.append(MinimumBalance!) + } + let extraMetadata: {String: AnyStruct} = {} + if flowTokenPurchase { + let tokenInfo = FLOAT.TokenInfo(_path: /public/flowTokenReceiver, _price: flowTokenCost) + extraMetadata["prices"] = {"A.1654653399040a61.FlowToken.Vault": tokenInfo} + } + self.FLOATEvents.createEvent(claimable: claimable, description: description, image: image, name: name, transferrable: transferrable, url: url, verifiers: verifiers, extraMetadata, initialGroups: initialGroups) + log("Started a new event for host.") + } +} diff --git a/backend/main/cadence/float/transactions/create_group.cdc b/backend/main/cadence/float/transactions/create_group.cdc new file mode 100644 index 000000000..9b19bccb7 --- /dev/null +++ b/backend/main/cadence/float/transactions/create_group.cdc @@ -0,0 +1,40 @@ +import FLOAT from +import NonFungibleToken from +import MetadataViews from +import GrantedAccountAccess from + +transaction(groupName: String, image: String, description: String) { + + let FLOATEvents: &FLOAT.FLOATEvents + + prepare(acct: AuthAccount) { + // SETUP COLLECTION + if acct.borrow<&FLOAT.Collection>(from: FLOAT.FLOATCollectionStoragePath) == nil { + acct.save(<- FLOAT.createEmptyCollection(), to: FLOAT.FLOATCollectionStoragePath) + acct.link<&FLOAT.Collection{NonFungibleToken.Receiver, NonFungibleToken.CollectionPublic, MetadataViews.ResolverCollection, FLOAT.CollectionPublic}> + (FLOAT.FLOATCollectionPublicPath, target: FLOAT.FLOATCollectionStoragePath) + } + + // SETUP FLOATEVENTS + if acct.borrow<&FLOAT.FLOATEvents>(from: FLOAT.FLOATEventsStoragePath) == nil { + acct.save(<- FLOAT.createEmptyFLOATEventCollection(), to: FLOAT.FLOATEventsStoragePath) + acct.link<&FLOAT.FLOATEvents{FLOAT.FLOATEventsPublic, MetadataViews.ResolverCollection}> + (FLOAT.FLOATEventsPublicPath, target: FLOAT.FLOATEventsStoragePath) + } + + // SETUP SHARED MINTING + if acct.borrow<&GrantedAccountAccess.Info>(from: GrantedAccountAccess.InfoStoragePath) == nil { + acct.save(<- GrantedAccountAccess.createInfo(), to: GrantedAccountAccess.InfoStoragePath) + acct.link<&GrantedAccountAccess.Info{GrantedAccountAccess.InfoPublic}> + (GrantedAccountAccess.InfoPublicPath, target: GrantedAccountAccess.InfoStoragePath) + } + + self.FLOATEvents = acct.borrow<&FLOAT.FLOATEvents>(from: FLOAT.FLOATEventsStoragePath) + ?? panic("Could not borrow the FLOATEvents from the signer.") + + } + + execute { + self.FLOATEvents.createGroup(groupName: groupName, image: image, description: description) + log("Created a new Group.") + } From 3f1cf8409f1a42bdc6fb397129f6c788ae75f67e Mon Sep 17 00:00:00 2001 From: Richard Melkonian Date: Wed, 20 Jul 2022 23:42:06 +0100 Subject: [PATCH 10/21] updated cadence script for new ExampleNFT --- backend/main/cadence/scripts/get_nfts_ids.cdc | 10 +++++----- backend/main/shared/flow.go | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/backend/main/cadence/scripts/get_nfts_ids.cdc b/backend/main/cadence/scripts/get_nfts_ids.cdc index d052aa402..6f3861a1a 100644 --- a/backend/main/cadence/scripts/get_nfts_ids.cdc +++ b/backend/main/cadence/scripts/get_nfts_ids.cdc @@ -1,14 +1,14 @@ -import NonFungibleToken from "NON_FUNGIBLE_TOKEN_ADDRESS" -import "TOKEN_NAME" from "TOKEN_ADDRESS" +import NonFungibleToken from 0xf8d6e0586b0a20c7 +import ExampleNFT from 0xf8d6e0586b0a20c7 -pub fun main(address: Address): [UInt64]{ +pub fun main(address: Address): Int { let account = getAccount(address) let collectionRef = account - .getCapability("TOKEN_NAME".CollectionPublicPath) + .getCapability(ExampleNFT.CollectionPublicPath) .borrow<&{NonFungibleToken.CollectionPublic}>() ?? panic("Could not borrow capability from public collection") - return collectionRef.getIDs() + return collectionRef.getIDs().length } diff --git a/backend/main/shared/flow.go b/backend/main/shared/flow.go index 3117a352d..0ab875086 100644 --- a/backend/main/shared/flow.go +++ b/backend/main/shared/flow.go @@ -312,7 +312,6 @@ func (fa *FlowAdapter) GetNFTIds(voterAddr string, c *Contract) ([]interface{}, // we can cast cadence type [Uint64] as Go type []interface{} // In the case where ids are of string type we need an if statement somewhere to handle nftIds := value.([]interface{}) - return nftIds, nil } From 28933a1d4673655beb3421926a82f451ffa2f19f Mon Sep 17 00:00:00 2001 From: Richard Melkonian Date: Thu, 21 Jul 2022 13:43:09 +0100 Subject: [PATCH 11/21] created processThreshold logic --- backend/main/cadence/scripts/get_nfts_ids.cdc | 7 +- backend/main/server/app.go | 24 +++++- backend/main/shared/flow.go | 85 +++++++++++++++---- 3 files changed, 91 insertions(+), 25 deletions(-) diff --git a/backend/main/cadence/scripts/get_nfts_ids.cdc b/backend/main/cadence/scripts/get_nfts_ids.cdc index 6f3861a1a..c9276b163 100644 --- a/backend/main/cadence/scripts/get_nfts_ids.cdc +++ b/backend/main/cadence/scripts/get_nfts_ids.cdc @@ -1,14 +1,13 @@ -import NonFungibleToken from 0xf8d6e0586b0a20c7 -import ExampleNFT from 0xf8d6e0586b0a20c7 +import NonFungibleToken from "NON_FUNGIBLE_TOKEN_ADDRESS" +import "TOKEN_NAME" from "TOKEN_ADDRESS" pub fun main(address: Address): Int { let account = getAccount(address) let collectionRef = account - .getCapability(ExampleNFT.CollectionPublicPath) + .getCapability("TOKEN_NAME".CollectionPublicPath) .borrow<&{NonFungibleToken.CollectionPublic}>() ?? panic("Could not borrow capability from public collection") return collectionRef.getIDs().length } - diff --git a/backend/main/server/app.go b/backend/main/server/app.go index 8e4094551..6a4587bc6 100644 --- a/backend/main/server/app.go +++ b/backend/main/server/app.go @@ -799,7 +799,6 @@ func (a *App) createProposal(w http.ResponseWriter, r *http.Request) { p.Block_height = &snapshotResponse.Data.BlockHeight p.Snapshot_status = &snapshotResponse.Data.Status - //@TODO this whole if else block should be moved into to its own func if *community.Only_authors_to_submit == true { if err := models.EnsureRoleForCommunity(a.DB, p.Creator_addr, communityId, "author"); err != nil { errMsg := fmt.Sprintf("account %s is not an author for community %d", p.Creator_addr, p.Community_id) @@ -808,9 +807,9 @@ func (a *App) createProposal(w http.ResponseWriter, r *http.Request) { return } } else { - hasBalance, err := a.FlowAdapter.EnforceTokenThreshold(p.Creator_addr, &strategy.Contract) + hasBalance, err := a.processTokenThreshold(p.Creator_addr, strategy) if err != nil { - log.Error().Err(err).Msg("error enforcing token threshold") + log.Error().Err(err).Msg("error processing Token Threshold") respondWithError(w, http.StatusInternalServerError, err.Error()) return } @@ -1889,3 +1888,22 @@ func (a *App) processSnapshotStatus(s *models.Strategy, p *models.Proposal) erro return nil } + +func (a *App) processTokenThreshold(address string, s models.Strategy) (bool, error) { + var scriptPath string + stratName := *s.Name + + if stratName == "balance-of-nfts" { + scriptPath = "./main/cadence/scripts/get_nfts_ids.cdc" + } else { + scriptPath = "./main/cadence/scripts/get_balance.cdc" + + } + + hasBalance, err := a.FlowAdapter.EnforceTokenThreshold(scriptPath, address, &s.Contract) + if err != nil { + return false, err + } + + return hasBalance, nil +} diff --git a/backend/main/shared/flow.go b/backend/main/shared/flow.go index 0ab875086..93168f2fe 100644 --- a/backend/main/shared/flow.go +++ b/backend/main/shared/flow.go @@ -7,6 +7,7 @@ import ( "errors" "flag" "io/ioutil" + "os" "regexp" "strconv" "strings" @@ -241,32 +242,53 @@ func (fa *FlowAdapter) UserTransactionValidate( return nil } -func (fa *FlowAdapter) EnforceTokenThreshold(creatorAddr string, c *Contract) (bool, error) { +func (fa *FlowAdapter) EnforceTokenThreshold(scriptPath, creatorAddr string, c *Contract) (bool, error) { + log.Info().Msgf("EnforceTokenThreshold: %s %s", scriptPath, creatorAddr) flowAddress := flow.HexToAddress(creatorAddr) cadenceAddress := cadence.NewAddress(flowAddress) cadencePath := cadence.Path{Domain: "public", Identifier: *c.Public_path} - script, err := ioutil.ReadFile("./main/cadence/scripts/get_balance.cdc") + script, err := ioutil.ReadFile(scriptPath) if err != nil { log.Error().Err(err).Msgf("error reading cadence script file") return false, err } - script = fa.ReplaceContractPlaceholders(string(script[:]), c, true) + var cadenceValue cadence.Value - //call the script to verify balance - cadenceValue, err := fa.Client.ExecuteScriptAtLatestBlock( - fa.Context, - script, - []cadence.Value{ - cadencePath, - cadenceAddress, - }, - ) - if err != nil { - log.Error().Err(err).Msg("error executing script") - return false, err + if scriptPath == "./main/cadence/scripts/get_nfts_ids.cdc" { + isFungible := false + script = fa.ReplaceContractPlaceholders(string(script[:]), c, isFungible) + + //call the non-fungible token script to verify balance + cadenceValue, err = fa.Client.ExecuteScriptAtLatestBlock( + fa.Context, + script, + []cadence.Value{ + cadenceAddress, + }) + if err != nil { + log.Error().Err(err).Msg("error executing non-fungible-token script") + return false, err + } + + } else { + isFungible := true + script = fa.ReplaceContractPlaceholders(string(script[:]), c, isFungible) + + //call the fungible token script to verify balance + cadenceValue, err = fa.Client.ExecuteScriptAtLatestBlock( + fa.Context, + script, + []cadence.Value{ + cadencePath, + cadenceAddress, + }) + if err != nil { + log.Error().Err(err).Msg("error executing funigble-token script") + return false, err + } } value := CadenceValueToInterface(cadenceValue) @@ -316,9 +338,36 @@ func (fa *FlowAdapter) GetNFTIds(voterAddr string, c *Contract) ([]interface{}, } func (fa *FlowAdapter) ReplaceContractPlaceholders(code string, c *Contract, isFungible bool) []byte { - fungibleTokenAddr := fa.Config.Contracts["FungibleToken"].Aliases[fa.Env] - nonFungibleTokenAddr := fa.Config.Contracts["NonFungibleToken"].Aliases[fa.Env] - metadataViewsAddr := fa.Config.Contracts["MetadataViews"].Aliases[fa.Env] + var ( + fungibleTokenAddr string + nonFungibleTokenAddr string + metadataViewsAddr string + ) + + if os.Getenv("APP_ENV") == "DEV" || os.Getenv("APP_ENV") == "TEST" { + //emulator addresses + nonFungibleTokenAddr = "0xf8d6e0586b0a20c7" + fungibleTokenAddr = "0xee82856bf20e2aa6" + metadataViewsAddr = "0xf8d6e0586b0a20c7" + + } else if os.Getenv("APP_ENV") == "STAGING" { + //testnet addresses + nonFungibleTokenAddr = "0x631e88ae7f1d7c20" + fungibleTokenAddr = "0x1654653399040a61" + metadataViewsAddr = "0x631e88ae7f1d7c20" + + } else if os.Getenv("APP_ENV") == "PROD" { + //mainnet addresses + nonFungibleTokenAddr = "0x1d7e57aa55817448" + fungibleTokenAddr = "0x1654653399040a61" + metadataViewsAddr = "0x1d7e57aa55817448" + } + + //print out all the token addresses + log.Info().Msgf("isFungible %t", isFungible) + log.Info().Msgf("fungibleTokenAddr: %s", fungibleTokenAddr) + log.Info().Msgf("nonFungibleTokenAddr: %s", nonFungibleTokenAddr) + log.Info().Msgf("metadataViewsAddr: %s", metadataViewsAddr) if isFungible { code = placeholderFungibleTokenAddr.ReplaceAllString(code, fungibleTokenAddr) From 9fd3e6dd693225687166b7b48a406893c4c45087 Mon Sep 17 00:00:00 2001 From: Richard Melkonian Date: Thu, 21 Jul 2022 14:14:35 +0100 Subject: [PATCH 12/21] updated NFT ID to type interface to handle string or uint --- backend/main/cadence/scripts/get_nfts_ids.cdc | 4 +- backend/main/models/vote.go | 9 ++-- backend/main/shared/flow.go | 2 - backend/main/strategies/balance_of_nfts.go | 42 ++++++++----------- 4 files changed, 23 insertions(+), 34 deletions(-) diff --git a/backend/main/cadence/scripts/get_nfts_ids.cdc b/backend/main/cadence/scripts/get_nfts_ids.cdc index c9276b163..5c908a9bd 100644 --- a/backend/main/cadence/scripts/get_nfts_ids.cdc +++ b/backend/main/cadence/scripts/get_nfts_ids.cdc @@ -1,7 +1,7 @@ import NonFungibleToken from "NON_FUNGIBLE_TOKEN_ADDRESS" import "TOKEN_NAME" from "TOKEN_ADDRESS" -pub fun main(address: Address): Int { +pub fun main(address: Address): [UInt64] { let account = getAccount(address) let collectionRef = account @@ -9,5 +9,5 @@ pub fun main(address: Address): Int { .borrow<&{NonFungibleToken.CollectionPublic}>() ?? panic("Could not borrow capability from public collection") - return collectionRef.getIDs().length + return collectionRef.getIDs() } diff --git a/backend/main/models/vote.go b/backend/main/models/vote.go index 4f6bc5d01..1ab54680d 100644 --- a/backend/main/models/vote.go +++ b/backend/main/models/vote.go @@ -42,9 +42,9 @@ type VoteWithBalance struct { } type NFT struct { - ID uint64 `json:"id"` - Contract_addr string `json:"contract_addr"` - Created_at time.Time `json:"created_at"` + ID interface{} `json:"id"` + Contract_addr string `json:"contract_addr"` + Created_at time.Time `json:"created_at"` } type VotingStreak struct { @@ -394,13 +394,12 @@ func AddStreakAchievement(db *s.Database, v *Vote, p Proposal) error { proposals = append(proposals, vote.Proposal_id) } - if len(proposals) >= defaultStreakLength && (i == len(votingStreak)-1 || (i < len(votingStreak)-1 && votingStreak[i+1].Addr == "")) { // ensure proposals always ordered to guarantee no duplicates sort.Slice(proposals, func(i, j int) bool { return proposals[i] < proposals[j] }) - + //Unique identifier for current streak currentStreakDetails := fmt.Sprintf("%s:%s:%d:%s", Streak, v.Addr, p.Community_id, strings.Trim(strings.Join(strings.Fields(fmt.Sprint(proposals)), ","), "[]")) diff --git a/backend/main/shared/flow.go b/backend/main/shared/flow.go index 93168f2fe..30f127bd5 100644 --- a/backend/main/shared/flow.go +++ b/backend/main/shared/flow.go @@ -331,8 +331,6 @@ func (fa *FlowAdapter) GetNFTIds(voterAddr string, c *Contract) ([]interface{}, value := CadenceValueToInterface(cadenceValue) - // we can cast cadence type [Uint64] as Go type []interface{} - // In the case where ids are of string type we need an if statement somewhere to handle nftIds := value.([]interface{}) return nftIds, nil } diff --git a/backend/main/strategies/balance_of_nfts.go b/backend/main/strategies/balance_of_nfts.go index 0fbcf3f01..0ab59c4bb 100644 --- a/backend/main/strategies/balance_of_nfts.go +++ b/backend/main/strategies/balance_of_nfts.go @@ -29,42 +29,34 @@ func (b *BalanceOfNfts) FetchBalance( return nil, err } - nftIds, err := models.GetUserNFTs(b.DB, vb) + strategy, err := models.MatchStrategyByProposal(*c.Strategies, *p.Strategy) if err != nil { - log.Error().Err(err).Msg("error getting user nfts") + log.Error().Err(err).Msg("Unable to find strategy for contract") return nil, err } - strategy, err := models.MatchStrategyByProposal(*c.Strategies, *p.Strategy) + nftIds, err := b.FlowAdapter.GetNFTIds(balance.Addr, &strategy.Contract) if err != nil { - log.Error().Err(err).Msg("Unable to find strategy for contract") return nil, err } - if len(nftIds) == 0 { - nftIds, err := b.FlowAdapter.GetNFTIds(balance.Addr, &strategy.Contract) - if err != nil { - return nil, err - } - - for _, nftId := range nftIds { - nft := &models.NFT{ - ID: nftId.(uint64), - } - vb.NFTs = append(vb.NFTs, nft) + for _, nftId := range nftIds { + nft := &models.NFT{ + ID: nftId, } + vb.NFTs = append(vb.NFTs, nft) + } - doesExist, err := models.DoesNFTExist(b.DB, vb) - if err != nil { - return nil, err - } + doesExist, err := models.DoesNFTExist(b.DB, vb) + if err != nil { + return nil, err + } - //only if the NFT ID is not already in the DB, - //do we add the balance - if !doesExist && err == nil { - err = models.CreateUserNFTRecord(b.DB, vb) - balance.NFTCount = len(vb.NFTs) - } + //only if the NFT ID is not already in the DB, + //do we add the balance + if !doesExist && err == nil { + err = models.CreateUserNFTRecord(b.DB, vb) + balance.NFTCount = len(vb.NFTs) } return balance, nil From 88a618b02021730b9ff081a44193c275a37a49f1 Mon Sep 17 00:00:00 2001 From: Richard Melkonian Date: Thu, 21 Jul 2022 14:30:14 +0100 Subject: [PATCH 13/21] clean up --- backend/main/shared/flow.go | 6 ------ backend/main/test_utils/strategy_utils.go | 2 -- 2 files changed, 8 deletions(-) diff --git a/backend/main/shared/flow.go b/backend/main/shared/flow.go index 30f127bd5..315c0dc02 100644 --- a/backend/main/shared/flow.go +++ b/backend/main/shared/flow.go @@ -361,12 +361,6 @@ func (fa *FlowAdapter) ReplaceContractPlaceholders(code string, c *Contract, isF metadataViewsAddr = "0x1d7e57aa55817448" } - //print out all the token addresses - log.Info().Msgf("isFungible %t", isFungible) - log.Info().Msgf("fungibleTokenAddr: %s", fungibleTokenAddr) - log.Info().Msgf("nonFungibleTokenAddr: %s", nonFungibleTokenAddr) - log.Info().Msgf("metadataViewsAddr: %s", metadataViewsAddr) - if isFungible { code = placeholderFungibleTokenAddr.ReplaceAllString(code, fungibleTokenAddr) } else { diff --git a/backend/main/test_utils/strategy_utils.go b/backend/main/test_utils/strategy_utils.go index 47b274bed..1d3430688 100644 --- a/backend/main/test_utils/strategy_utils.go +++ b/backend/main/test_utils/strategy_utils.go @@ -40,8 +40,6 @@ func (otu *OverflowTestUtils) TallyResultsForStakedTokenWeightedDefault( r *models.ProposalResults, ) *models.ProposalResults { - fmt.Printf("Tallying results for staked token weighted default\n") - for _, v := range *votes { r.Results_float[v.Choice] += float64(v.Staking_balance) * math.Pow(10, -8) } From ede6cc5cf4331ec511e51f999adefdd9e5fca3dd Mon Sep 17 00:00:00 2001 From: Richard Melkonian Date: Thu, 21 Jul 2022 14:41:39 +0100 Subject: [PATCH 14/21] handle nft balance return type in EnforceToken --- backend/main/shared/flow.go | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/backend/main/shared/flow.go b/backend/main/shared/flow.go index 315c0dc02..a2de38275 100644 --- a/backend/main/shared/flow.go +++ b/backend/main/shared/flow.go @@ -243,8 +243,8 @@ func (fa *FlowAdapter) UserTransactionValidate( } func (fa *FlowAdapter) EnforceTokenThreshold(scriptPath, creatorAddr string, c *Contract) (bool, error) { - log.Info().Msgf("EnforceTokenThreshold: %s %s", scriptPath, creatorAddr) + var balance float64 flowAddress := flow.HexToAddress(creatorAddr) cadenceAddress := cadence.NewAddress(flowAddress) cadencePath := cadence.Path{Domain: "public", Identifier: *c.Public_path} @@ -272,12 +272,16 @@ func (fa *FlowAdapter) EnforceTokenThreshold(scriptPath, creatorAddr string, c * log.Error().Err(err).Msg("error executing non-fungible-token script") return false, err } + value := CadenceValueToInterface(cadenceValue) + + nftIds := value.([]interface{}) + balance = float64(len(nftIds)) } else { isFungible := true script = fa.ReplaceContractPlaceholders(string(script[:]), c, isFungible) - //call the fungible token script to verify balance + //call the fungible-token script to verify balance cadenceValue, err = fa.Client.ExecuteScriptAtLatestBlock( fa.Context, script, @@ -289,15 +293,17 @@ func (fa *FlowAdapter) EnforceTokenThreshold(scriptPath, creatorAddr string, c * log.Error().Err(err).Msg("error executing funigble-token script") return false, err } - } - value := CadenceValueToInterface(cadenceValue) - balance, err := strconv.ParseFloat(value.(string), 64) - if err != nil { - log.Error().Err(err).Msg("error converting cadence value to float") - return false, err + value := CadenceValueToInterface(cadenceValue) + balance, err = strconv.ParseFloat(value.(string), 64) + if err != nil { + log.Error().Err(err).Msg("error converting cadence value to float") + return false, err + } + } + //check if balance is greater than threshold if balance < *c.Threshold { return false, nil } From 63a99706a69e62fba06874dcb25f999b78869ee6 Mon Sep 17 00:00:00 2001 From: Richard Melkonian Date: Thu, 21 Jul 2022 17:30:03 +0100 Subject: [PATCH 15/21] overflow breaking changes fixes --- backend/go.mod | 95 +- backend/go.sum | 1432 +++---------------------- backend/main/main_test.go | 2 +- backend/main/server/app.go | 8 +- backend/main/shared/flow.go | 152 ++- backend/main/test_utils/test_utils.go | 2 +- 6 files changed, 259 insertions(+), 1432 deletions(-) diff --git a/backend/go.mod b/backend/go.mod index d1ba565f4..2adf80525 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -1,37 +1,35 @@ module github.com/DapperCollectives/CAST/backend -go 1.17 +go 1.18 require ( github.com/axiomzen/envconfig v1.3.0 - github.com/bjartek/overflow v0.0.0-20220421162831-bed308def2ad + github.com/bjartek/overflow v1.0.0-rc1 github.com/georgysavva/scany v0.3.0 github.com/go-playground/validator/v10 v10.10.0 github.com/google/uuid v1.3.0 github.com/gorilla/mux v1.8.0 github.com/jackc/pgx/v4 v4.14.1 github.com/joho/godotenv v1.4.0 - github.com/onflow/cadence v0.23.3 - github.com/onflow/flow-go-sdk v0.24.0 + github.com/onflow/cadence v0.24.2-0.20220627202951-5a06fec82b4a + github.com/onflow/flow-go-sdk v0.26.6-0.20220712195924-6920f8f55b88 github.com/rs/zerolog v1.26.1 - github.com/stretchr/testify v1.7.1 + github.com/stretchr/testify v1.8.0 github.com/thoas/go-funk v0.9.2 google.golang.org/grpc v1.45.0 ) require ( - cloud.google.com/go v0.99.0 // indirect - cloud.google.com/go/kms v1.0.0 // indirect + cloud.google.com/go v0.100.2 // indirect + cloud.google.com/go/compute v1.3.0 // indirect + cloud.google.com/go/iam v0.3.0 // indirect + cloud.google.com/go/kms v1.4.0 // indirect github.com/a8m/envsubst v1.3.0 // indirect github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de // indirect + github.com/bits-and-blooms/bitset v1.2.2 // indirect github.com/btcsuite/btcd v0.22.0-beta // indirect - github.com/bwmarrin/discordgo v0.23.2 // indirect - github.com/census-instrumentation/opencensus-proto v0.3.0 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect - github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 // indirect - github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de // indirect @@ -39,12 +37,10 @@ require ( github.com/dustin/go-humanize v1.0.0 // indirect github.com/ef-ds/deque v1.0.4 // indirect github.com/enescakir/emoji v1.0.0 // indirect - github.com/envoyproxy/go-control-plane v0.10.1 // indirect - github.com/envoyproxy/protoc-gen-validate v0.6.2 // indirect github.com/ethereum/go-ethereum v1.9.13 // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect - github.com/fxamacker/cbor/v2 v2.3.1-0.20211029162100-5d5d7c3edd41 // indirect - github.com/fxamacker/circlehash v0.2.0 // indirect + github.com/fxamacker/cbor/v2 v2.4.1-0.20220515183430-ad2eae63303f // indirect + github.com/fxamacker/circlehash v0.3.0 // indirect github.com/go-playground/locales v0.14.0 // indirect github.com/go-playground/universal-translator v0.18.0 // indirect github.com/go-test/deep v1.0.5 // indirect @@ -52,17 +48,16 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/golang/snappy v0.0.3 // indirect - github.com/google/go-cmp v0.5.7 // indirect + github.com/google/go-cmp v0.5.8 // indirect github.com/googleapis/gax-go/v2 v2.1.1 // indirect - github.com/gorilla/websocket v1.4.2 // indirect github.com/gosuri/uilive v0.0.4 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hexops/autogold v1.3.0 // indirect + github.com/hexops/gotextdiff v1.0.3 // indirect + github.com/hexops/valast v1.4.0 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect - github.com/ipfs/go-block-format v0.0.3 // indirect github.com/ipfs/go-cid v0.1.0 // indirect - github.com/ipfs/go-datastore v0.5.1 // indirect - github.com/ipfs/go-ipfs-util v0.0.2 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect github.com/jackc/pgconn v1.10.1 // indirect github.com/jackc/pgio v1.0.0 // indirect @@ -71,14 +66,13 @@ require ( github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect github.com/jackc/pgtype v1.9.1 // indirect github.com/jackc/puddle v1.2.0 // indirect - github.com/jbenet/goprocess v0.1.4 // indirect github.com/kevinburke/go-bindata v3.22.0+incompatible // indirect - github.com/klauspost/compress v1.12.3 // indirect - github.com/klauspost/cpuid/v2 v2.0.9 // indirect + github.com/klauspost/compress v1.15.1 // indirect + github.com/klauspost/cpuid/v2 v2.0.14 // indirect github.com/leodido/go-urn v1.2.1 // indirect github.com/libp2p/go-buffer-pool v0.0.2 // indirect - github.com/libp2p/go-libp2p-core v0.11.0 // indirect - github.com/libp2p/go-libp2p-tls v0.3.1 // indirect + github.com/libp2p/go-libp2p-core v0.15.1 // indirect + github.com/libp2p/go-libp2p-tls v0.4.1 // indirect github.com/libp2p/go-openssl v0.0.7 // indirect github.com/logrusorgru/aurora v2.0.3+incompatible // indirect github.com/magiconair/properties v1.8.5 // indirect @@ -90,26 +84,32 @@ require ( github.com/mr-tron/base58 v1.2.0 // indirect github.com/multiformats/go-base32 v0.0.4 // indirect github.com/multiformats/go-base36 v0.1.0 // indirect - github.com/multiformats/go-multiaddr v0.4.1 // indirect + github.com/multiformats/go-multiaddr v0.5.0 // indirect github.com/multiformats/go-multibase v0.0.3 // indirect + github.com/multiformats/go-multicodec v0.4.1 // indirect github.com/multiformats/go-multihash v0.1.0 // indirect github.com/multiformats/go-varint v0.0.6 // indirect - github.com/onflow/atree v0.2.0 // indirect - github.com/onflow/flow-cli v0.33.0 // indirect - github.com/onflow/flow-core-contracts/lib/go/contracts v0.11.0 // indirect - github.com/onflow/flow-core-contracts/lib/go/templates v0.11.0 // indirect - github.com/onflow/flow-emulator v0.31.0 // indirect + github.com/nightlyone/lockfile v1.0.0 // indirect + github.com/onflow/atree v0.4.0 // indirect + github.com/onflow/flow-cli/pkg/flowkit v0.0.0-20220708202053-3b2866146b5f // indirect + github.com/onflow/flow-core-contracts/lib/go/contracts v0.11.2-0.20220620142725-49b5accb2a84 // indirect + github.com/onflow/flow-core-contracts/lib/go/templates v0.11.2-0.20220513155751-c4c1f8d59f83 // indirect + github.com/onflow/flow-emulator v0.33.4-0.20220705151023-2cc6a4f25a20 // indirect github.com/onflow/flow-ft/lib/go/contracts v0.5.0 // indirect - github.com/onflow/flow-go v0.25.5-0.20220330212458-32bda868ae65 // indirect + github.com/onflow/flow-go v0.25.13-0.20220706165514-abf4535fe946 // indirect github.com/onflow/flow-go/crypto v0.24.3 // indirect - github.com/onflow/flow/protobuf/go/flow v0.2.4 // indirect + github.com/onflow/flow/protobuf/go/flow v0.3.1 // indirect + github.com/onflow/sdks v0.4.4 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pelletier/go-toml v1.9.4 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/psiemens/sconfig v0.1.0 // indirect github.com/rivo/uniseg v0.2.1-0.20211004051800-57c86be7915a // indirect - github.com/sethvargo/go-retry v0.1.0 // indirect + github.com/sanity-io/litter v1.5.5 // indirect + github.com/sethvargo/go-retry v0.2.3 // indirect + github.com/shurcooL/go-goon v0.0.0-20210110234559-7585751d9a17 // indirect + github.com/sirupsen/logrus v1.8.1 // indirect github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spf13/afero v1.8.2 // indirect @@ -119,27 +119,34 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.10.1 // indirect github.com/subosito/gotenv v1.2.0 // indirect + github.com/turbolent/prettier v0.0.0-20220320183459-661cc755135d // indirect github.com/uber/jaeger-client-go v2.29.1+incompatible // indirect github.com/uber/jaeger-lib v2.4.0+incompatible // 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.2 // indirect + github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect + github.com/zeebo/blake3 v0.2.3 // indirect go.opencensus.io v0.23.0 // indirect go.uber.org/atomic v1.9.0 // indirect - golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e // indirect - golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect - golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect - golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect + golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect + golang.org/x/exp v0.0.0-20220706164943-b4a6d9510983 // indirect + golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect + golang.org/x/net v0.0.0-20220418201149-a630d4f3e7a2 // indirect + golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect + golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect golang.org/x/text v0.3.7 // indirect + golang.org/x/tools v0.1.10 // indirect + golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect gonum.org/v1/gonum v0.11.0 // indirect - google.golang.org/api v0.63.0 // indirect + google.golang.org/api v0.70.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220211171837-173942840c17 // indirect - google.golang.org/protobuf v1.27.1 // indirect + google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf // indirect + google.golang.org/protobuf v1.28.0 // indirect gopkg.in/ini.v1 v1.66.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect lukechampine.com/blake3 v1.1.7 // indirect + mvdan.cc/gofumpt v0.1.0 // indirect ) diff --git a/backend/go.sum b/backend/go.sum index 73c3eb45c..e8436441c 100644 --- a/backend/go.sum +++ b/backend/go.sum @@ -1,8 +1,5 @@ -bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.31.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.37.0/go.mod h1:TS1dMSSfndXH133OKGwekG838Om/cQT0BUHV3HcBgoo= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= 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= @@ -30,21 +27,27 @@ cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aD 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.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM= -cloud.google.com/go v0.99.0 h1:y/cM2iqGgGi5D5DQZl6D9STN/3dR/Vx5Mp8s752oJTY= 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 h1:t9Iw5QH5v4XtlEQaCtUY7x6sCABps8sW0acw7e2WQ6Y= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= 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/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0 h1:mPL/MzDDYHsh5tHRS9mhmhWlcgClCrCa6ApQCU6wnHI= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= 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/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= -cloud.google.com/go/kms v1.0.0 h1:YkIeqPXqTAlwXk3Z2/WG0d6h1tqJQjU354WftjEoP9E= -cloud.google.com/go/kms v1.0.0/go.mod h1:nhUehi+w7zht2XrUfvTRNpxrfayBHqP4lu2NSywui/0= +cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= +cloud.google.com/go/iam v0.3.0 h1:exkAomrVUuzx9kWFI1wm3KI0uoDeUFPB4kKGzx6x+Gc= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/kms v1.4.0 h1:iElbfoE61VeLhnZcGOltqL8HIly8Nhbe5t6JlH9GXjo= +cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= 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= @@ -55,22 +58,10 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl 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.16.0/go.mod h1:ieKBmUyzcftN5tbxwnXClMKH00CfcQ+xL6NN0r5QfmE= -dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= -dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= -dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= -gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= -git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= -git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= -github.com/AndreasBriese/bbloom v0.0.0-20180913140656-343706a395b7/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= -github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= @@ -83,116 +74,49 @@ github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6L github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/HdrHistogram/hdrhistogram-go v0.9.0/go.mod h1:nxrse8/Tzg2tg3DZcZjm6qEclQKK70g0KxO61gFFZD4= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= -github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Kubuxu/go-os-helper v0.0.1/go.mod h1:N8B+I7vPCT80IcP58r50u4+gEEcsZETFUpAzWW2ep1Y= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= -github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OneOfOne/xxhash v1.2.5 h1:zl/OfRA6nftbBK9qTohYBJ5xvw6C/oNKizR7cZGl3cI= github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 h1:YoJbenK9C67SkzkDfmQuVln04ygHj3vjZfd9FL+GmQQ= -github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= -github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= -github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/VictoriaMetrics/fastcache v1.5.3/go.mod h1:+jv9Ckb+za/P1ZRg/sulP5Ni1v49daAVERr0H3CuscE= -github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= -github.com/a8m/envsubst v1.2.0/go.mod h1:PpvLvNWa+Rvu/10qXmFbFiGICIU5hZvFJNPCCkUaObg= github.com/a8m/envsubst v1.3.0 h1:GmXKmVssap0YtlU3E230W98RWtWCyIZzjtf1apWWyAg= github.com/a8m/envsubst v1.3.0/go.mod h1:MVUTQNGQ3tsjOOtKCNd+fl8RzhsXcDvvAEzkhGtlsbY= github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= -github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -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-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/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de h1:FxWPpzIjnTlhPwqqXc4/vE0f7GvRjuAsbW+HOIe8KnA= github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de/go.mod h1:DCaWoUhZrYW9p1lxo/cm8EmUOOzAPSEZNGF2DK1dJgw= github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.25.48/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aws/aws-sdk-go-v2 v1.9.0/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= -github.com/aws/aws-sdk-go-v2/config v1.8.0/go.mod h1:w9+nMZ7soXCe5nT46Ri354SNhXDQ6v+V5wqDjnZE+GY= -github.com/aws/aws-sdk-go-v2/credentials v1.4.0/go.mod h1:dgGR+Qq7Wjcd4AOAW5Rf5Tnv3+x7ed6kETXyS9WCuAY= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.5.0/go.mod h1:CpNzHK9VEFUCknu50kkB8z58AH2B5DvPP7ea1LHve/Y= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.5.1/go.mod h1:PLlnMiki//sGnCJiW+aVpvP/C8Kcm8mEj/IVm9+9qk4= -github.com/aws/aws-sdk-go-v2/internal/ini v1.2.2/go.mod h1:BQV0agm+JEhqR+2RT5e1XTFIDcAAV0eW6z2trp+iduw= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.3.0/go.mod h1:v8ygadNyATSm6elwJ/4gzJwcFhri9RqS8skgHKiwXPU= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.0/go.mod h1:R1KK+vY8AfalhG1AOu5e35pOD2SdoPKQCFLTvnxiohk= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.7.0/go.mod h1:LKb3cKNQIMh+itGnEpKGcnL/6OIjPZqrtYah1w5f+3o= -github.com/aws/aws-sdk-go-v2/service/s3 v1.15.0/go.mod h1:Iv2aJVtVSm/D22rFoX99cLG4q4uB7tppuCsulGe98k4= -github.com/aws/aws-sdk-go-v2/service/sso v1.4.0/go.mod h1:+1fpWnL96DL23aXPpMGbsmKe8jLTEfbjuQoA4WS1VaA= -github.com/aws/aws-sdk-go-v2/service/sts v1.7.0/go.mod h1:0qcSMCyASQPN2sk/1KQLQ2Fh6yq8wm0HSDAimPhzCoM= -github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/axiomzen/envconfig v1.3.0 h1:xSvEfVcsHrV/6NoxrYanBv4oBa4bXuridkBggHGZmF8= github.com/axiomzen/envconfig v1.3.0/go.mod h1:/TXtx2DRzXYRgQyEOJM6+NSidg/gwEdB6ayJEs2qXpY= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= -github.com/benbjohnson/clock v1.0.2/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= -github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= -github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= 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/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bjartek/overflow v0.0.0-20220421162831-bed308def2ad h1:zyAknalvdMOnYmOiLu38PFccY9ngC0ruxw5ie9iIHLc= -github.com/bjartek/overflow v0.0.0-20220421162831-bed308def2ad/go.mod h1:QtuVlK6z8CciQiYuqud15eCrC1IE540twPrJuWoPc0I= +github.com/bits-and-blooms/bitset v1.2.2 h1:J5gbX05GpMdBjCvQ9MteIg2KKDExr7DrgK+Yc15FvIk= +github.com/bits-and-blooms/bitset v1.2.2/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= +github.com/bjartek/overflow v1.0.0-rc1 h1:qisOA0XRxPC5HCruJ3WEv+HC50GOAe4Z/pvGrUwgh4g= +github.com/bjartek/overflow v1.0.0-rc1/go.mod h1:H1RiItid9MefRRUUs38nbUwzXGzQiR1j6hRdnGLa8ZI= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -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/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= -github.com/bsipos/thist v1.0.0/go.mod h1:7i0xwRua1/bmUxcxi2xAxaFL895rLtOpKUwnw3NrT8I= github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= -github.com/btcsuite/btcd v0.0.0-20190213025234-306aecffea32/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= -github.com/btcsuite/btcd v0.0.0-20190523000118-16327141da8c/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= -github.com/btcsuite/btcd v0.0.0-20190605094302-a0d1e3e36d50/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= -github.com/btcsuite/btcd v0.0.0-20190824003749-130ea5bddde3/go.mod h1:3J08xEfcugPacsc34/LKRU2yO7YmuT8yt28J8k2+rrI= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= -github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= github.com/btcsuite/btcd v0.22.0-beta h1:LTDpDKUM5EeOFBPM8IXpinEcmZ6FWfNZbE3lfrfdnWo= github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= -github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= @@ -201,23 +125,15 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= -github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= -github.com/bwmarrin/discordgo v0.23.2 h1:BzrtTktixGHIu9Tt7dEE6diysEF9HWnXeHuoJEt2fH4= -github.com/bwmarrin/discordgo v0.23.2/go.mod h1:c1WtWUGN6nREDmzIpyTp/iD3VYt4Fpx+bVyfBG7JE+M= github.com/bytecodealliance/wasmtime-go v0.22.0/go.mod h1:q320gUxqyI8yB+ZqRuaJOEnGkAnHh6WtJjMaT2CW4wI= github.com/c-bata/go-prompt v0.2.5/go.mod h1:vFnjEGDIIA/Lib7giyE4E9c50Lvl8j0S+7FVlAwDAVw= -github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.3.0 h1:t/LhUZLVitR1Ow2YOnduCsavhwFUklBMoGVYUCqmCqk= -github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 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.0.1-0.20190104013014-3767db7a7e18/go.mod h1:HD5P3vAIAh+Y2GAxg0PrPN1P8WkepXGpjbUPDHJqqKM= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -225,53 +141,29 @@ github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5O github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/cloudflare-go v0.10.2-0.20190916151808-a80f83b9add9/go.mod h1:1MxXX1Ux4x6mqPmjkUgTP1CdXIBXKX7T+Jk9Gxrmx+U= 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 h1:hzAQntlaYRkVSFEfj9OTWlVV1H155FMD8BTKktLv0QI= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490 h1:KwaoQzs/WeUxxJqiJsZ4euOly1Az/IgZXXSxlD/UBNk= -github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/cockroach-go/v2 v2.2.0 h1:/5znzg5n373N/3ESjHF5SMLxiW4RKB05Ql//KWfeTFs= github.com/cockroachdb/cockroach-go/v2 v2.2.0/go.mod h1:u3MiKYGupPPjkn3ozknpMUpxPaNLTFWAya419/zv6eI= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/codahale/hdrhistogram v0.9.0/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= -github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= -github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20200107194136-26c1120b8d41/go.mod h1:Dq467ZllaHgAtVp4p1xUQWBrFXR9s/wyoTpG8zOJGkY= -github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= -github.com/containerd/fifo v0.0.0-20191213151349-ff969a566b00/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= -github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= -github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= -github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= 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/etcd v3.3.13+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/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= 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= @@ -279,64 +171,33 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsr github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= 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/cskr/pubsub v1.0.2/go.mod h1:/8MzYXk/NJAz782G8RPkFzXTZVu63VotefPnR9TIRis= -github.com/dapperlabs/testingdock v0.4.2/go.mod h1:S45YfB1J1mbOeLHhJROx3dFZfMCVSxTgSU9vZ15Oq18= -github.com/dapperlabs/testingdock v0.4.4/go.mod h1:HeTbuHG1J4yt4n7NlZSyuk5c5fmyz6hECbyV+36Ku7Q= +github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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-20170701192655-dcfb0a7ac018/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4= -github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= github.com/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= -github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= -github.com/dgraph-io/badger v1.5.5-0.20190226225317-8115aed38f8f/go.mod h1:VZxzAIRPHRVNRKRo6AXrX9BJegn6il06VMTZVJYCIjQ= -github.com/dgraph-io/badger v1.6.0-rc1/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= -github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= -github.com/dgraph-io/badger v1.6.1/go.mod h1:FRmFw3uxvcpa8zG3Rxs0th+hCLIuaQg8HlNV5bjgnuU= -github.com/dgraph-io/badger v1.6.2 h1:mNw0qs90GVgGGWylh0umH5iag1j6n/PeJtNvL6KY/x8= -github.com/dgraph-io/badger v1.6.2/go.mod h1:JW2yswe3V058sS0kZ2h/AXeDSqFjxnZcRrVH//y2UQE= -github.com/dgraph-io/badger/v2 v2.0.3/go.mod h1:3KY8+bsP8wI0OEnQJAKpd4wIJW/Mm32yw2j/9FUVnIM= -github.com/dgraph-io/badger/v2 v2.2007.3/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= 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.2-0.20200115201040-8f368f2f2ab3/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= -github.com/dgraph-io/ristretto v0.0.2/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de h1:t0UHb5vdojIDUqktM6+xJAfScFBsVpXZmqC9dsgJmeA= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-farm v0.0.0-20190104051053-3adb47b1fb0f/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= 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-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= -github.com/docker/cli v0.0.0-20191105005515-99c5edceb48d/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/distribution v2.6.0-rc.1.0.20171207180435-f4118485915a+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v1.4.2-0.20190513124817-8c8457b0f2f8/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dop251/goja v0.0.0-20200219165308-d1232e640a87/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= -github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -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/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa/go.mod h1:cdorVVzy1fhmEqmtgqkoE3bYtCfSCkVyjTyCIo22xvs= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= -github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/enescakir/emoji v1.0.0 h1:W+HsNql8swfCQFtioDGDHCHri8nudlK1n5p2rHCJoog= github.com/enescakir/emoji v1.0.0/go.mod h1:Bt1EKuLnKDTYpLALApstIkAjdDrS/8IAgTkKp+WKFD0= -github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= 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= @@ -345,145 +206,71 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m 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.1 h1:cgDRLG7bs59Zd+apAWuzLQL95obVYAymNJek76W3mgw= -github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.2 h1:JiO+kJTpmYGjEodY7O1Zk8oZcNz1+f30UtwtXoFUPzE= -github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/ethereum/go-ethereum v1.9.9/go.mod h1:a9TqabFudpDu1nucId+k9S8R9whYaHnGBLKFouA5EAo= github.com/ethereum/go-ethereum v1.9.13 h1:rOPqjSngvs1VSYH2H+PMPiWt4VEulvNRbFgqiGqJM3E= github.com/ethereum/go-ethereum v1.9.13/go.mod h1:qwN9d1GLyDh0N7Ab8bMGd0H9knaji2jOBm2RrMGjXls= -github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fatih/color v1.3.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -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/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:1i71OnUq3iUe1ma7Lr6yG6/rjvM3emb6yoL7xLFzcVQ= -github.com/flynn/noise v1.0.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= 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/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= -github.com/frankban/quicktest v1.14.0/go.mod h1:NeW+ay9A/U67EYXNFA1nPE8e/tnQv/09mUdL/ijj8og= 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.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fxamacker/cbor/v2 v2.2.1-0.20201006223149-25f67fca9803/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= -github.com/fxamacker/cbor/v2 v2.2.1-0.20210510192846-c3f3c69e7bc8/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= -github.com/fxamacker/cbor/v2 v2.2.1-0.20210927235116-3d6d5d1de29b/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= -github.com/fxamacker/cbor/v2 v2.3.1-0.20211029162100-5d5d7c3edd41 h1:adk2SdM72B9LVdNPVgLDO+UBdGW5JmDIJEdzlI2ZYC8= -github.com/fxamacker/cbor/v2 v2.3.1-0.20211029162100-5d5d7c3edd41/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= -github.com/fxamacker/circlehash v0.1.0/go.mod h1:3aq3OfVvsWtkWMb6A1owjOQFA+TLsD5FgJflnaQwtMM= -github.com/fxamacker/circlehash v0.2.0 h1:IFBaLm/4NChHcIptw/A7Ha/DemC8M9jGbjWzsN6XDrc= -github.com/fxamacker/circlehash v0.2.0/go.mod h1:3aq3OfVvsWtkWMb6A1owjOQFA+TLsD5FgJflnaQwtMM= -github.com/gammazero/deque v0.1.0/go.mod h1:KQw7vFau1hHuM8xmI9RbgKFbAsQFWmBpqQ2KenFLk6M= -github.com/gammazero/workerpool v1.1.2/go.mod h1:UelbXcO0zCIGFcufcirHhq2/xtLXJdQ29qZNlXG9OjQ= -github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= +github.com/fxamacker/cbor/v2 v2.4.1-0.20220515183430-ad2eae63303f h1:dxTR4AaxCwuQv9LAVTAC2r1szlS+epeuPT5ClLKT6ZY= +github.com/fxamacker/cbor/v2 v2.4.1-0.20220515183430-ad2eae63303f/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/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/georgysavva/scany v0.3.0 h1:MA1aEqPbnNuiek59gMpNPqQrXXroyFj5jCADlETdxiA= github.com/georgysavva/scany v0.3.0/go.mod h1:q8QyrfXjmBk9iJD00igd4lbkAKEXAH/zIYoZ0z/Wan4= -github.com/getsentry/sentry-go v0.12.0/go.mod h1:NSap0JBYWzHND8oMbyi0+XZhUalc1TBdRL1M71JZW2c= -github.com/getsentry/sentry-go v0.13.0/go.mod h1:EOsfu5ZdvKPfeHYV6pTVQnsjfp30+XA7//UooKNumH0= 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-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM= -github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmCsR2Do= -github.com/gin-gonic/gin v1.7.7/go.mod h1:axIBovoeJpVj8S3BwE0uPMTeReE4+AfFtqpqaZ1qq1U= -github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= -github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= -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/liberation v0.1.1/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= -github.com/go-fonts/liberation v0.2.0/go.mod h1:K6qoJYypsmfVjWg8KOVDQhLc8UDgIK2HYqyqAO9z7GY= -github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmnUIzUY= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= -github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= -github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= github.com/go-git/go-billy/v5 v5.3.1 h1:CPiOUAzKtMRvolEKw+bG1PLRpT7D3LIs3/3ey4Aiu34= -github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0= github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4= -github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= 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.10.0 h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo= -github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -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-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 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= +github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -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-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= -github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= -github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY= -github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= -github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-playground/validator/v10 v10.10.0 h1:I7mrTYv78z8k8VXa/qJlOlEXn/nBh+BF8dHX5nt/dr0= github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= -github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-test/deep v1.0.5 h1:AKODKU3pDH1RzZzm6YZu77YWtEAq6uh1rLIAQlay2qc= github.com/go-test/deep v1.0.5/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= -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/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= 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.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= 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.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -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/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= 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/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 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-20191027212112-611e8accdfc9/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/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= 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= @@ -492,9 +279,9 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2-0.20190517061210-b285ee9cfc6c/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -513,12 +300,9 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= 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/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -533,13 +317,9 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ 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 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gopacket v1.1.17/go.mod h1:UdDNZ1OO62aGYVnPhxT1U6aI7ukYtA/kB8vaU0diBUM= -github.com/google/gopacket v1.1.19/go.mod h1:iJ8V8n6KS+z2U1A8pUwu8bW5SyEMkXJB8Yo/Vo+TKTo= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 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= @@ -560,15 +340,9 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 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 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go v2.0.0+incompatible h1:j0GKcs05QVmm7yesiZq2+9cxHkNK9YM6zKx4D2qucQU= -github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= -github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg= 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= @@ -576,66 +350,32 @@ github.com/googleapis/gax-go/v2 v2.1.1 h1:dp3bWCh+PPO1zjRRiCSczJav13sBvG4UhNyVTa github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= 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/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1-0.20190629185528-ae1634f6a989/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/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 v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware/providers/zerolog/v2 v2.0.0-rc.2/go.mod h1:BL7w7qd2l/j9jgY6WMhYutfOFQc0I8RTVwtjpnAMoTM= -github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-20200501113911-9a95f0fdbfea/go.mod h1:GugMBs30ZSAkckqXEAIEGyYdDH6EgqowG8ppA3Zt+AY= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/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.6.0/go.mod h1:qrJPVzv9YlhsrxJc3P/Q85nr0w1lIRikTl4JlhdDH5w= -github.com/gxed/hashland/keccakpg v0.0.1/go.mod h1:kRzw3HkwxFU1mpmPP8v1WyQzwdGfmKFJ6tItnhQ67kU= -github.com/gxed/hashland/murmur3 v0.0.1/go.mod h1:KjXop02n4/ckmZSnY2+HKcLud/tcmvhST0bie/0lS48= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= -github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= -github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= 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-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= 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.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.0.0-20160813221303-0a025b7e63ad/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -646,128 +386,29 @@ 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/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= -github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= -github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/hexops/autogold v0.8.1/go.mod h1:97HLDXyG23akzAoRYJh/2OBs3kd80eHyKPvZw0S5ZBY= +github.com/hexops/autogold v1.3.0 h1:IEtGNPxBeBu8RMn8eKWh/Ll9dVNgSnJ7bp/qHgMQ14o= +github.com/hexops/autogold v1.3.0/go.mod h1:d4hwi2rid66Sag+BVuHgwakW/EmaFr8vdTSbWDbrDRI= +github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= +github.com/hexops/valast v1.4.0 h1:sFzyxPDP0riFQUzSBXTCCrAbbIndHPWMndxuEjXdZlc= +github.com/hexops/valast v1.4.0/go.mod h1:uVjKZ0smVuYlgCSPz9NRi5A04sl7lp6GtFWsROKDgEs= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/huin/goupnp v0.0.0-20161224104101-679507af18f3/go.mod h1:MZ2ZmwcBpvOoJ22IJsc7va19ZwoheaBk43rKg12SKag= -github.com/huin/goupnp v1.0.0/go.mod h1:n9v9KO1tAxYH82qOn+UTIFQDmx5n1Zxd/ClZDMX7Bnc= -github.com/huin/goupnp v1.0.2/go.mod h1:0dxJBVBHqTMjIUMkESDTNgOOx/Mw5wYIfyFmdzSamkM= -github.com/huin/goutil v0.0.0-20170803182201-1ca381bf3150/go.mod h1:PpLOETDnJ0o3iZrZfqZzyLl6l7F3c6L1oWn7OICBi6o= -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/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= -github.com/improbable-eng/grpc-web v0.12.0/go.mod h1:6hRR09jOEG81ADP5wCQju1z71g6OL4eEvELdran/3cs= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= -github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/ipfs/bbloom v0.0.1/go.mod h1:oqo8CVWsJFMOZqTglBG4wydCE4IQA/G2/SEofB0rjUI= -github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= -github.com/ipfs/go-bitswap v0.1.8/go.mod h1:TOWoxllhccevbWFUR2N7B1MTSVVge1s6XSMiCSA4MzM= -github.com/ipfs/go-bitswap v0.3.4/go.mod h1:4T7fvNv/LmOys+21tnLzGKncMeeXUYUd1nUiJ2teMvI= -github.com/ipfs/go-bitswap v0.5.0/go.mod h1:WwyyYD33RHCpczgHjpx+xjWYIy8l41K+l5EMy4/ctSM= -github.com/ipfs/go-block-format v0.0.1/go.mod h1:DK/YYcsSUIVAFNwo/KZCdIIbpN0ROH/baNLgayt4pFc= -github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= github.com/ipfs/go-block-format v0.0.3 h1:r8t66QstRp/pd/or4dpnbVfXT5Gt7lOqRvC+/dDTpMc= -github.com/ipfs/go-block-format v0.0.3/go.mod h1:4LmD4ZUw0mhO+JSKdpWwrzATiEfM7WWgQ8H5l6P8MVk= -github.com/ipfs/go-blockservice v0.1.4/go.mod h1:OTZhFpkgY48kNzbgyvcexW9cHrpjBYIjSR0KoDOFOLU= -github.com/ipfs/go-blockservice v0.2.0/go.mod h1:Vzvj2fAnbbyly4+T7D5+p9n3+ZKVHA2bRMMo1QoILtQ= -github.com/ipfs/go-cid v0.0.1/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= -github.com/ipfs/go-cid v0.0.2/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= -github.com/ipfs/go-cid v0.0.3/go.mod h1:GHWU/WuQdMPmIosc4Yn1bcCT7dSeX4lBafM7iqUPQvM= -github.com/ipfs/go-cid v0.0.4/go.mod h1:4LLaPOQwmk5z9LBgQnpkivrx8BJjUyGwTXCd5Xfj6+M= -github.com/ipfs/go-cid v0.0.5/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= -github.com/ipfs/go-cid v0.0.6/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= github.com/ipfs/go-cid v0.0.7/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= github.com/ipfs/go-cid v0.1.0 h1:YN33LQulcRHjfom/i25yoOZR4Telp1Hr/2RU3d0PnC0= github.com/ipfs/go-cid v0.1.0/go.mod h1:rH5/Xv83Rfy8Rw6xG+id3DYAMUVmem1MowoKwdXmN2o= -github.com/ipfs/go-cidutil v0.0.2/go.mod h1:ewllrvrxG6AMYStla3GD7Cqn+XYSLqjK0vc+086tB6s= -github.com/ipfs/go-datastore v0.0.1/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= -github.com/ipfs/go-datastore v0.0.5/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= -github.com/ipfs/go-datastore v0.1.0/go.mod h1:d4KVXhMt913cLBEI/PXAy6ko+W7e9AhyAKBGh803qeE= -github.com/ipfs/go-datastore v0.1.1/go.mod h1:w38XXW9kVFNp57Zj5knbKWM2T+KOZCGDRVNdgPHtbHw= -github.com/ipfs/go-datastore v0.4.0/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= -github.com/ipfs/go-datastore v0.4.1/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= -github.com/ipfs/go-datastore v0.4.4/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= -github.com/ipfs/go-datastore v0.4.5/go.mod h1:eXTcaaiN6uOlVCLS9GjJUJtlvJfM3xk23w3fyfrmmJs= -github.com/ipfs/go-datastore v0.5.0/go.mod h1:9zhEApYMTl17C8YDp7JmU7sQZi2/wqiYh73hakZ90Bk= github.com/ipfs/go-datastore v0.5.1 h1:WkRhLuISI+XPD0uk3OskB0fYFSyqK8Ob5ZYew9Qa1nQ= -github.com/ipfs/go-datastore v0.5.1/go.mod h1:9zhEApYMTl17C8YDp7JmU7sQZi2/wqiYh73hakZ90Bk= -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-ds-badger v0.0.2/go.mod h1:Y3QpeSFWQf6MopLTiZD+VT6IC1yZqaGmjvRcKeSGij8= -github.com/ipfs/go-ds-badger v0.0.5/go.mod h1:g5AuuCGmr7efyzQhLL8MzwqcauPojGPUaHzfGTzuE3s= -github.com/ipfs/go-ds-badger v0.0.7/go.mod h1:qt0/fWzZDoPW6jpQeqUjR5kBfhDNB65jd9YlmAvpQBk= -github.com/ipfs/go-ds-badger v0.2.1/go.mod h1:Tx7l3aTph3FMFrRS838dcSJh+jjA7cX9DrGVwx/NOwE= -github.com/ipfs/go-ds-badger v0.2.3/go.mod h1:pEYw0rgg3FIrywKKnL+Snr+w/LjJZVMTBRn4FS6UHUk= -github.com/ipfs/go-ds-badger v0.2.7/go.mod h1:02rnztVKA4aZwDuaRPTf8mpqcKmXP7mLl6JPxd14JHA= -github.com/ipfs/go-ds-badger v0.3.0/go.mod h1:1ke6mXNqeV8K3y5Ak2bAA0osoTfmxUdupVCGm4QUIek= -github.com/ipfs/go-ds-badger2 v0.1.3/go.mod h1:TPhhljfrgewjbtuL/tczP8dNrBYwwk+SdPYbms/NO9w= -github.com/ipfs/go-ds-leveldb v0.0.1/go.mod h1:feO8V3kubwsEF22n0YRQCffeb79OOYIykR4L04tMOYc= -github.com/ipfs/go-ds-leveldb v0.1.0/go.mod h1:hqAW8y4bwX5LWcCtku2rFNX3vjDZCy5LZCg+cSZvYb8= -github.com/ipfs/go-ds-leveldb v0.4.1/go.mod h1:jpbku/YqBSsBc1qgME8BkWS4AxzF2cEu1Ii2r79Hh9s= -github.com/ipfs/go-ds-leveldb v0.4.2/go.mod h1:jpbku/YqBSsBc1qgME8BkWS4AxzF2cEu1Ii2r79Hh9s= -github.com/ipfs/go-ds-leveldb v0.5.0/go.mod h1:d3XG9RUDzQ6V4SHi8+Xgj9j1XuEk1z82lquxrVbml/Q= -github.com/ipfs/go-fetcher v1.5.0/go.mod h1:5pDZ0393oRF/fHiLmtFZtpMNBQfHOYNPtryWedVuSWE= -github.com/ipfs/go-ipfs-blockstore v0.0.1/go.mod h1:d3WClOmRQKFnJ0Jz/jj/zmksX0ma1gROTlovZKBmN08= -github.com/ipfs/go-ipfs-blockstore v0.1.4/go.mod h1:Jxm3XMVjh6R17WvxFEiyKBLUGr86HgIYJW/D/MwqeYQ= -github.com/ipfs/go-ipfs-blockstore v0.2.0/go.mod h1:SNeEpz/ICnMYZQYr7KNZTjdn7tEPB/99xpe8xI1RW7o= -github.com/ipfs/go-ipfs-blockstore v1.1.1/go.mod h1:w51tNR9y5+QXB0wkNcHt4O2aSZjTdqaEWaQdSxEyUOY= -github.com/ipfs/go-ipfs-blocksutil v0.0.1/go.mod h1:Yq4M86uIOmxmGPUHv/uI7uKqZNtLb449gwKqXjIsnRk= -github.com/ipfs/go-ipfs-delay v0.0.0-20181109222059-70721b86a9a8/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= -github.com/ipfs/go-ipfs-delay v0.0.1/go.mod h1:8SP1YXK1M1kXuc4KJZINY3TQQ03J2rwBG9QfXmbRPrw= -github.com/ipfs/go-ipfs-ds-help v0.0.1/go.mod h1:gtP9xRaZXqIQRh1HRpp595KbBEdgqWFxefeVKOV8sxo= -github.com/ipfs/go-ipfs-ds-help v0.1.1/go.mod h1:SbBafGJuGsPI/QL3j9Fc5YPLeAu+SzOkI0gFwAg+mOs= -github.com/ipfs/go-ipfs-ds-help v1.1.0/go.mod h1:YR5+6EaebOhfcqVCyqemItCLthrpVNot+rsOU/5IatU= -github.com/ipfs/go-ipfs-exchange-interface v0.0.1/go.mod h1:c8MwfHjtQjPoDyiy9cFquVtVHkO9b9Ob3FG91qJnWCM= -github.com/ipfs/go-ipfs-exchange-interface v0.1.0/go.mod h1:ych7WPlyHqFvCi/uQI48zLZuAWVP5iTQPXEfVaw5WEI= -github.com/ipfs/go-ipfs-exchange-offline v0.0.1/go.mod h1:WhHSFCVYX36H/anEKQboAzpUws3x7UeEGkzQc3iNkM0= -github.com/ipfs/go-ipfs-exchange-offline v0.1.0/go.mod h1:YdJXa+yPF1na+gfYHYejtLwHFpuKv22eatApNiSfanM= -github.com/ipfs/go-ipfs-pq v0.0.1/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY= -github.com/ipfs/go-ipfs-pq v0.0.2/go.mod h1:LWIqQpqfRG3fNc5XsnIhz/wQ2XXGyugQwls7BgUmUfY= -github.com/ipfs/go-ipfs-provider v0.7.0/go.mod h1:mgjsWgDt9j19N1REPxRa31p+eRIQmjNt5McNdQQ5CsA= -github.com/ipfs/go-ipfs-routing v0.1.0/go.mod h1:hYoUkJLyAUKhF58tysKpids8RNDPO42BVMgK5dNsoqY= -github.com/ipfs/go-ipfs-routing v0.2.0/go.mod h1:384byD/LHKhAgKE3NmwOjXCpDzhczROMBzidoYV7tfM= -github.com/ipfs/go-ipfs-util v0.0.1/go.mod h1:spsl5z8KUnrve+73pOhSVZND1SIxPW5RyBCNzQxlJBc= 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-ipns v0.1.2/go.mod h1:ioQ0j02o6jdIVW+bmi18f4k2gRf0AV3kZ9KeHYHICnQ= -github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM= -github.com/ipfs/go-log v1.0.2/go.mod h1:1MNjMxe0u6xvJZgeqbJ8vdo2TKaGwZ1a0Bpza+sr2Sk= -github.com/ipfs/go-log v1.0.3/go.mod h1:OsLySYkwIbiSUR/yBTdv1qPtcE4FW3WPWk/ewz9Ru+A= -github.com/ipfs/go-log v1.0.4/go.mod h1:oDCg2FkjogeFOhqqb+N39l2RpTNPL6F/StPkB3kPgcs= -github.com/ipfs/go-log v1.0.5/go.mod h1:j0b8ZoR+7+R99LD9jZ6+AJsrzkPbSXbZfGakb5JPtIo= -github.com/ipfs/go-log/v2 v2.0.2/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= -github.com/ipfs/go-log/v2 v2.0.3/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBWFaa9+0= -github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw= -github.com/ipfs/go-log/v2 v2.1.1/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHntrv9KM= -github.com/ipfs/go-log/v2 v2.1.3/go.mod h1:/8d0SH3Su5Ooc31QlL1WysJhvyOTDCjcCZ9Axpmri6g= -github.com/ipfs/go-log/v2 v2.3.0/go.mod h1:QqGoj30OTpnKaG/LKTGTxoP2mmQtjVMEnK72gynbe/g= -github.com/ipfs/go-log/v2 v2.5.0/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI= -github.com/ipfs/go-metrics-interface v0.0.1/go.mod h1:6s6euYU4zowdslK0GKHmqaIZ3j/b/tL7HTWtJ4VPgWY= -github.com/ipfs/go-peertaskqueue v0.1.1/go.mod h1:Jmk3IyCcfl1W3jTW3YpghSwSEC6IJ3Vzz/jUmWw8Z0U= -github.com/ipfs/go-peertaskqueue v0.2.0/go.mod h1:5/eNrBEbtSKWCG+kQK8K8fGNixoYUnr+P7jivavs9lY= -github.com/ipfs/go-peertaskqueue v0.7.0/go.mod h1:M/akTIE/z1jGNXMU7kFB4TeSEFvj68ow0Rrb04donIU= -github.com/ipfs/go-verifcid v0.0.1/go.mod h1:5Hrva5KBeIog4A+UpqlaIU+DEstipcJYQQZc0g37pY0= -github.com/ipld/go-ipld-prime v0.9.0/go.mod h1:KvBLMr4PX1gWptgkzRjVZCrLmSGcZCb/jioOQwCqZN8= -github.com/ipld/go-ipld-prime v0.11.0/go.mod h1:+WIAkokurHmZ/KwzDOMUuoeJgaRQktHtEaLglS3ZeV8= -github.com/ipld/go-ipld-prime v0.14.1/go.mod h1:QcE4Y9n/ZZr8Ijg5bGPT0GqYWgZ1704nH0RDcQtgTP0= -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/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/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= @@ -791,7 +432,6 @@ github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 h1:DadwsjnMwFjfWc9y5W github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= -github.com/jackc/pgproto3 v1.1.0 h1:FYYE4yRw+AgI8wXIinMlNjBbp/UitDJwfj5LqqewP1A= github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78= github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA= github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg= @@ -832,110 +472,60 @@ github.com/jackc/puddle v1.1.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dv github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.2.0 h1:DNDKdn/pDrWvDWyT2FYvpZVE81OAhWrjCv19I9n108Q= github.com/jackc/puddle v1.2.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackpal/gateway v1.0.5/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= -github.com/jackpal/go-nat-pmp v1.0.1/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/jbenet/go-cienv v0.0.0-20150120210510-1bb1476777ec/go.mod h1:rGaEvXB4uRSZMmzKNLoXvTu1sfx+1kv/DojUlPrSZGs= -github.com/jbenet/go-cienv v0.1.0/go.mod h1:TqNnHUmJgXau0nCzC7kXWeotg3J9W34CUv5Djy1+FlA= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= -github.com/jbenet/go-temp-err-catcher v0.0.0-20150120210811-aac704a3f4f2/go.mod h1:8GXXJV31xl8whumTzdZsTt3RnUIiPqzkyf7mxToRCMs= -github.com/jbenet/go-temp-err-catcher v0.1.0/go.mod h1:0kJRvmDZXNMIiJirNPEYfhpPwbGVtZVWC34vc5WLsDk= -github.com/jbenet/goprocess v0.0.0-20160826012719-b497e2f366b8/go.mod h1:Ly/wlsjFq/qrU3Rar62tu1gASgGw6chQbSh/XgIIXCY= -github.com/jbenet/goprocess v0.1.3/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= github.com/jbenet/goprocess v0.1.4 h1:DRGOFReOMqqDNXwW70QkacFW0YN9QnwLV0Vqk+3oU0o= -github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4= -github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -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/jmoiron/sqlx v1.3.1/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ= -github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= 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/jrick/bitset v1.0.0/go.mod h1:ZOYB5Uvkla7wIEY4FEssPVi3IQXa02arznRaYaAEPe4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -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/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a/go.mod h1:UJSiEoRfvx3hP73CvoARgeLjaIOjybY9vj8PUPPFGeU= github.com/julienschmidt/httprouter v1.1.1-0.20170430222011-975b5c4c7c21/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= 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/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/kami-zh/go-capturer v0.0.0-20171211120116-e492ea43421d/go.mod h1:P2viExyCEfeWGU259JnaQ34Inuec4R38JCyBx2edgD0= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -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/kevinburke/go-bindata v3.22.0+incompatible h1:/JmqEhIWQ7GRScV0WjX/0tqBrC5D21ALg0H0U/KZ/ts= github.com/kevinburke/go-bindata v3.22.0+incompatible/go.mod h1:/pEEZ72flUW2p0yi30bslSp9YqD9pysLxunQDdb2CPM= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 h1:DowS9hvgyYSX4TO5NpyC606/Z4SxnNYbT+WX27or6Ck= -github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= 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/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= -github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.12.3 h1:G5AfA94pHPysR56qqrkO2pxEexdDzrpFJ6yt/VqWxVU= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/cpuid v1.2.1 h1:vJi+O/nMdFt0vqm8NZBI6wzALWdA2X+egi0ogNyrC/w= -github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/compress v1.15.1 h1:y9FcTHGyrebwfP0ZZqFiaxTaiDnUrGkJkI+f583BL1A= +github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.0.6/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= 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.0.14 h1:QRqdp6bb9M9S5yyKeYteXKuoKE4p0tGlra81fKOpWH8= +github.com/klauspost/cpuid/v2 v2.0.14/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= 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.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/koron/go-ssdp v0.0.0-20180514024734-4a0ed625a78b/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk= -github.com/koron/go-ssdp v0.0.0-20191105050749-2e1c40ed0b5d/go.mod h1:5Ky9EC2xfoUKUor0Hjgi2BJhCSXJfMOFlmyYrVKGQMk= -github.com/koron/go-ssdp v0.0.2/go.mod h1:XoLfkAiA2KeZsYh4DbHxD7h3nR2AZNqVQOa+LJuqPYs= 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 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.3/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 v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -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/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw= -github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= -github.com/lib/pq v0.0.0-20170810061220-e42267488fe3/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= @@ -943,275 +533,24 @@ github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8= github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-addr-util v0.0.1/go.mod h1:4ac6O7n9rIAKB1dnd+s8IbbMXkt+oBpzX4/+RACcnlQ= -github.com/libp2p/go-addr-util v0.0.2/go.mod h1:Ecd6Fb3yIuLzq4bD7VcywcVSBtefcAwnUISBM3WG15E= -github.com/libp2p/go-addr-util v0.1.0/go.mod h1:6I3ZYuFr2O/9D+SoyM0zEw0EF3YkldtTX406BpdQMqw= -github.com/libp2p/go-buffer-pool v0.0.1/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= -github.com/libp2p/go-cidranger v1.1.0/go.mod h1:KWZTfSr+r9qEo9OkI9/SIEeAtw+NNoU0dXIXt15Okic= -github.com/libp2p/go-conn-security-multistream v0.1.0/go.mod h1:aw6eD7LOsHEX7+2hJkDxw1MteijaVcI+/eP2/x3J1xc= -github.com/libp2p/go-conn-security-multistream v0.2.0/go.mod h1:hZN4MjlNetKD3Rq5Jb/P5ohUnFLNzEAR4DLSzpn2QLU= -github.com/libp2p/go-conn-security-multistream v0.2.1/go.mod h1:cR1d8gA0Hr59Fj6NhaTpFhJZrjSYuNmhpT2r25zYR70= -github.com/libp2p/go-conn-security-multistream v0.3.0/go.mod h1:EEP47t4fw/bTelVmEzIDqSe69hO/ip52xBEhZMLWAHM= -github.com/libp2p/go-eventbus v0.1.0/go.mod h1:vROgu5cs5T7cv7POWlWxBaVLxfSegC5UGQf8A2eEmx4= -github.com/libp2p/go-eventbus v0.2.1/go.mod h1:jc2S4SoEVPP48H9Wpzm5aiGwUCBMfGhVhhBjyhhCJs8= -github.com/libp2p/go-flow-metrics v0.0.1/go.mod h1:Iv1GH0sG8DtYN3SVJ2eG221wMiNpZxBdp967ls1g+k8= -github.com/libp2p/go-flow-metrics v0.0.2/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= -github.com/libp2p/go-flow-metrics v0.0.3/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= -github.com/libp2p/go-libp2p v0.1.1/go.mod h1:I00BRo1UuUSdpuc8Q2mN7yDF/oTUTRAX6JWpTiK9Rp8= -github.com/libp2p/go-libp2p v0.6.1/go.mod h1:CTFnWXogryAHjXAKEbOf1OWY+VeAP3lDMZkfEI5sT54= -github.com/libp2p/go-libp2p v0.7.0/go.mod h1:hZJf8txWeCduQRDC/WSqBGMxaTHCOYHt2xSU1ivxn0k= -github.com/libp2p/go-libp2p v0.7.4/go.mod h1:oXsBlTLF1q7pxr+9w6lqzS1ILpyHsaBPniVO7zIHGMw= -github.com/libp2p/go-libp2p v0.8.1/go.mod h1:QRNH9pwdbEBpx5DTJYg+qxcVaDMAz3Ee/qDKwXujH5o= -github.com/libp2p/go-libp2p v0.13.0/go.mod h1:pM0beYdACRfHO1WcJlp65WXyG2A6NqYM+t2DTVAJxMo= -github.com/libp2p/go-libp2p v0.14.1/go.mod h1:0PQMADQEjCM2l8cSMYDpTgsb8gr6Zq7i4LUgq1mlW2E= -github.com/libp2p/go-libp2p v0.14.3/go.mod h1:d12V4PdKbpL0T1/gsUNN8DfgMuRPDX8bS2QxCZlwRH0= -github.com/libp2p/go-libp2p v0.14.4/go.mod h1:EIRU0Of4J5S8rkockZM7eJp2S0UrCyi55m2kJVru3rM= -github.com/libp2p/go-libp2p v0.16.0/go.mod h1:ump42BsirwAWxKzsCiFnTtN1Yc+DuPu76fyMX364/O4= -github.com/libp2p/go-libp2p-asn-util v0.0.0-20200825225859-85005c6cf052/go.mod h1:nRMRTab+kZuk0LnKZpxhOVH/ndsdr2Nr//Zltc/vwgo= -github.com/libp2p/go-libp2p-asn-util v0.1.0/go.mod h1:wu+AnM9Ii2KgO5jMmS1rz9dvzTdj8BXqsPR9HR0XB7I= -github.com/libp2p/go-libp2p-autonat v0.1.0/go.mod h1:1tLf2yXxiE/oKGtDwPYWTSYG3PtvYlJmg7NeVtPRqH8= -github.com/libp2p/go-libp2p-autonat v0.1.1/go.mod h1:OXqkeGOY2xJVWKAGV2inNF5aKN/djNA3fdpCWloIudE= -github.com/libp2p/go-libp2p-autonat v0.2.0/go.mod h1:DX+9teU4pEEoZUqR1PiMlqliONQdNbfzE1C718tcViI= -github.com/libp2p/go-libp2p-autonat v0.2.1/go.mod h1:MWtAhV5Ko1l6QBsHQNSuM6b1sRkXrpk0/LqCr+vCVxI= -github.com/libp2p/go-libp2p-autonat v0.2.2/go.mod h1:HsM62HkqZmHR2k1xgX34WuWDzk/nBwNHoeyyT4IWV6A= -github.com/libp2p/go-libp2p-autonat v0.4.0/go.mod h1:YxaJlpr81FhdOv3W3BTconZPfhaYivRdf53g+S2wobk= -github.com/libp2p/go-libp2p-autonat v0.4.2/go.mod h1:YxaJlpr81FhdOv3W3BTconZPfhaYivRdf53g+S2wobk= -github.com/libp2p/go-libp2p-autonat v0.6.0/go.mod h1:bFC6kY8jwzNNWoqc8iGE57vsfwyJ/lP4O4DOV1e0B2o= -github.com/libp2p/go-libp2p-blankhost v0.1.1/go.mod h1:pf2fvdLJPsC1FsVrNP3DUUvMzUts2dsLLBEpo1vW1ro= -github.com/libp2p/go-libp2p-blankhost v0.1.4/go.mod h1:oJF0saYsAXQCSfDq254GMNmLNz6ZTHTOvtF4ZydUvwU= -github.com/libp2p/go-libp2p-blankhost v0.2.0/go.mod h1:eduNKXGTioTuQAUcZ5epXi9vMl+t4d8ugUBRQ4SqaNQ= -github.com/libp2p/go-libp2p-circuit v0.1.0/go.mod h1:Ahq4cY3V9VJcHcn1SBXjr78AbFkZeIRmfunbA7pmFh8= -github.com/libp2p/go-libp2p-circuit v0.1.4/go.mod h1:CY67BrEjKNDhdTk8UgBX1Y/H5c3xkAcs3gnksxY7osU= -github.com/libp2p/go-libp2p-circuit v0.2.1/go.mod h1:BXPwYDN5A8z4OEY9sOfr2DUQMLQvKt/6oku45YUmjIo= -github.com/libp2p/go-libp2p-circuit v0.4.0/go.mod h1:t/ktoFIUzM6uLQ+o1G6NuBl2ANhBKN9Bc8jRIk31MoA= -github.com/libp2p/go-libp2p-connmgr v0.2.4/go.mod h1:YV0b/RIm8NGPnnNWM7hG9Q38OeQiQfKhHCCs1++ufn0= -github.com/libp2p/go-libp2p-core v0.0.1/go.mod h1:g/VxnTZ/1ygHxH3dKok7Vno1VfpvGcGip57wjTU4fco= -github.com/libp2p/go-libp2p-core v0.0.2/go.mod h1:9dAcntw/n46XycV4RnlBq3BpgrmyUi9LuoTNdPrbUco= -github.com/libp2p/go-libp2p-core v0.0.3/go.mod h1:j+YQMNz9WNSkNezXOsahp9kwZBKBvxLpKD316QWSJXE= -github.com/libp2p/go-libp2p-core v0.0.4/go.mod h1:jyuCQP356gzfCFtRKyvAbNkyeuxb7OlyhWZ3nls5d2I= -github.com/libp2p/go-libp2p-core v0.2.0/go.mod h1:X0eyB0Gy93v0DZtSYbEM7RnMChm9Uv3j7yRXjO77xSI= -github.com/libp2p/go-libp2p-core v0.2.2/go.mod h1:8fcwTbsG2B+lTgRJ1ICZtiM5GWCWZVoVrLaDRvIRng0= -github.com/libp2p/go-libp2p-core v0.2.4/go.mod h1:STh4fdfa5vDYr0/SzYYeqnt+E6KfEV5VxfIrm0bcI0g= -github.com/libp2p/go-libp2p-core v0.2.5/go.mod h1:6+5zJmKhsf7yHn1RbmYDu08qDUpIUxGdqHuEZckmZOA= -github.com/libp2p/go-libp2p-core v0.3.0/go.mod h1:ACp3DmS3/N64c2jDzcV429ukDpicbL6+TrrxANBjPGw= -github.com/libp2p/go-libp2p-core v0.3.1/go.mod h1:thvWy0hvaSBhnVBaW37BvzgVV68OUhgJJLAa6almrII= -github.com/libp2p/go-libp2p-core v0.4.0/go.mod h1:49XGI+kc38oGVwqSBhDEwytaAxgZasHhFfQKibzTls0= -github.com/libp2p/go-libp2p-core v0.5.0/go.mod h1:49XGI+kc38oGVwqSBhDEwytaAxgZasHhFfQKibzTls0= -github.com/libp2p/go-libp2p-core v0.5.1/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt5/a35Sm4upn4Y= -github.com/libp2p/go-libp2p-core v0.5.3/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt5/a35Sm4upn4Y= -github.com/libp2p/go-libp2p-core v0.5.4/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt5/a35Sm4upn4Y= -github.com/libp2p/go-libp2p-core v0.5.5/go.mod h1:vj3awlOr9+GMZJFH9s4mpt9RHHgGqeHCopzbYKZdRjM= -github.com/libp2p/go-libp2p-core v0.5.6/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= -github.com/libp2p/go-libp2p-core v0.5.7/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= -github.com/libp2p/go-libp2p-core v0.6.0/go.mod h1:txwbVEhHEXikXn9gfC7/UDDw7rkxuX0bJvM49Ykaswo= -github.com/libp2p/go-libp2p-core v0.6.1/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= -github.com/libp2p/go-libp2p-core v0.7.0/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= -github.com/libp2p/go-libp2p-core v0.8.0/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= -github.com/libp2p/go-libp2p-core v0.8.1/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= -github.com/libp2p/go-libp2p-core v0.8.2/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= -github.com/libp2p/go-libp2p-core v0.8.5/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJBt/G1rVvhz5XT8= -github.com/libp2p/go-libp2p-core v0.8.6/go.mod h1:dgHr0l0hIKfWpGpqAMbpo19pen9wJfdCGv51mTmdpmM= -github.com/libp2p/go-libp2p-core v0.9.0/go.mod h1:ESsbz31oC3C1AvMJoGx26RTuCkNhmkSRCqZ0kQtJ2/8= -github.com/libp2p/go-libp2p-core v0.10.0/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg= -github.com/libp2p/go-libp2p-core v0.11.0 h1:75jAgdA+IChNa+/mZXogfmrGkgwxkVvxmIC7pV+F6sI= -github.com/libp2p/go-libp2p-core v0.11.0/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg= -github.com/libp2p/go-libp2p-crypto v0.1.0/go.mod h1:sPUokVISZiy+nNuTTH/TY+leRSxnFj/2GLjtOTW90hI= -github.com/libp2p/go-libp2p-discovery v0.1.0/go.mod h1:4F/x+aldVHjHDHuX85x1zWoFTGElt8HnoDzwkFZm29g= -github.com/libp2p/go-libp2p-discovery v0.2.0/go.mod h1:s4VGaxYMbw4+4+tsoQTqh7wfxg97AEdo4GYBt6BadWg= -github.com/libp2p/go-libp2p-discovery v0.3.0/go.mod h1:o03drFnz9BVAZdzC/QUQ+NeQOu38Fu7LJGEOK2gQltw= -github.com/libp2p/go-libp2p-discovery v0.5.0/go.mod h1:+srtPIU9gDaBNu//UHvcdliKBIcr4SfDcm0/PfPJLug= -github.com/libp2p/go-libp2p-discovery v0.6.0/go.mod h1:/u1voHt0tKIe5oIA1RHBKQLVCWPna2dXmPNHc2zR9S8= -github.com/libp2p/go-libp2p-kad-dht v0.15.0/go.mod h1:rZtPxYu1TnHHz6n1RggdGrxUX/tA1C2/Wiw3ZMUDrU0= -github.com/libp2p/go-libp2p-kbucket v0.3.1/go.mod h1:oyjT5O7tS9CQurok++ERgc46YLwEpuGoFq9ubvoUOio= -github.com/libp2p/go-libp2p-kbucket v0.4.7/go.mod h1:XyVo99AfQH0foSf176k4jY1xUJ2+jUJIZCSDm7r2YKk= -github.com/libp2p/go-libp2p-loggables v0.1.0/go.mod h1:EyumB2Y6PrYjr55Q3/tiJ/o3xoDasoRYM7nOzEpoa90= -github.com/libp2p/go-libp2p-mplex v0.2.0/go.mod h1:Ejl9IyjvXJ0T9iqUTE1jpYATQ9NM3g+OtR+EMMODbKo= -github.com/libp2p/go-libp2p-mplex v0.2.1/go.mod h1:SC99Rxs8Vuzrf/6WhmH41kNn13TiYdAWNYHrwImKLnE= -github.com/libp2p/go-libp2p-mplex v0.2.2/go.mod h1:74S9eum0tVQdAfFiKxAyKzNdSuLqw5oadDq7+L/FELo= -github.com/libp2p/go-libp2p-mplex v0.2.3/go.mod h1:CK3p2+9qH9x+7ER/gWWDYJ3QW5ZxWDkm+dVvjfuG3ek= -github.com/libp2p/go-libp2p-mplex v0.4.0/go.mod h1:yCyWJE2sc6TBTnFpjvLuEJgTSw/u+MamvzILKdX7asw= -github.com/libp2p/go-libp2p-mplex v0.4.1/go.mod h1:cmy+3GfqfM1PceHTLL7zQzAAYaryDu6iPSC+CIb094g= -github.com/libp2p/go-libp2p-nat v0.0.4/go.mod h1:N9Js/zVtAXqaeT99cXgTV9e75KpnWCvVOiGzlcHmBbY= -github.com/libp2p/go-libp2p-nat v0.0.5/go.mod h1:1qubaE5bTZMJE+E/uu2URroMbzdubFz1ChgiN79yKPE= -github.com/libp2p/go-libp2p-nat v0.0.6/go.mod h1:iV59LVhB3IkFvS6S6sauVTSOrNEANnINbI/fkaLimiw= -github.com/libp2p/go-libp2p-nat v0.1.0/go.mod h1:DQzAG+QbDYjN1/C3B6vXucLtz3u9rEonLVPtZVzQqks= -github.com/libp2p/go-libp2p-netutil v0.1.0/go.mod h1:3Qv/aDqtMLTUyQeundkKsA+YCThNdbQD54k3TqjpbFU= -github.com/libp2p/go-libp2p-noise v0.1.1/go.mod h1:QDFLdKX7nluB7DEnlVPbz7xlLHdwHFA9HiohJRr3vwM= -github.com/libp2p/go-libp2p-noise v0.2.0/go.mod h1:IEbYhBBzGyvdLBoxxULL/SGbJARhUeqlO8lVSREYu2Q= -github.com/libp2p/go-libp2p-noise v0.3.0/go.mod h1:JNjHbociDJKHD64KTkzGnzqJ0FEV5gHJa6AB00kbCNQ= -github.com/libp2p/go-libp2p-peer v0.2.0/go.mod h1:RCffaCvUyW2CJmG2gAWVqwePwW7JMgxjsHm7+J5kjWY= -github.com/libp2p/go-libp2p-peerstore v0.1.0/go.mod h1:2CeHkQsr8svp4fZ+Oi9ykN1HBb6u0MOvdJ7YIsmcwtY= -github.com/libp2p/go-libp2p-peerstore v0.1.3/go.mod h1:BJ9sHlm59/80oSkpWgr1MyY1ciXAXV397W6h1GH/uKI= -github.com/libp2p/go-libp2p-peerstore v0.1.4/go.mod h1:+4BDbDiiKf4PzpANZDAT+knVdLxvqh7hXOujessqdzs= -github.com/libp2p/go-libp2p-peerstore v0.2.0/go.mod h1:N2l3eVIeAitSg3Pi2ipSrJYnqhVnMNQZo9nkSCuAbnQ= -github.com/libp2p/go-libp2p-peerstore v0.2.1/go.mod h1:NQxhNjWxf1d4w6PihR8btWIRjwRLBr4TYKfNgrUkOPA= -github.com/libp2p/go-libp2p-peerstore v0.2.2/go.mod h1:NQxhNjWxf1d4w6PihR8btWIRjwRLBr4TYKfNgrUkOPA= -github.com/libp2p/go-libp2p-peerstore v0.2.6/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= -github.com/libp2p/go-libp2p-peerstore v0.2.7/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s= -github.com/libp2p/go-libp2p-peerstore v0.2.8/go.mod h1:gGiPlXdz7mIHd2vfAsHzBNAMqSDkt2UBFwgcITgw1lA= -github.com/libp2p/go-libp2p-peerstore v0.4.0/go.mod h1:rDJUFyzEWPpXpEwywkcTYYzDHlwza8riYMaUzaN6hX0= -github.com/libp2p/go-libp2p-pnet v0.2.0/go.mod h1:Qqvq6JH/oMZGwqs3N1Fqhv8NVhrdYcO0BW4wssv21LA= -github.com/libp2p/go-libp2p-pubsub v0.4.1/go.mod h1:izkeMLvz6Ht8yAISXjx60XUQZMq9ZMe5h2ih4dLIBIQ= -github.com/libp2p/go-libp2p-pubsub v0.6.0/go.mod h1:nJv87QM2cU0w45KPR1rZicq+FmFIOD16zmT+ep1nOmg= -github.com/libp2p/go-libp2p-quic-transport v0.10.0/go.mod h1:RfJbZ8IqXIhxBRm5hqUEJqjiiY8xmEuq3HUDS993MkA= -github.com/libp2p/go-libp2p-quic-transport v0.11.2/go.mod h1:wlanzKtIh6pHrq+0U3p3DY9PJfGqxMgPaGKaK5LifwQ= -github.com/libp2p/go-libp2p-quic-transport v0.13.0/go.mod h1:39/ZWJ1TW/jx1iFkKzzUg00W6tDJh73FC0xYudjr7Hc= -github.com/libp2p/go-libp2p-quic-transport v0.15.0/go.mod h1:wv4uGwjcqe8Mhjj7N/Ic0aKjA+/10UnMlSzLO0yRpYQ= -github.com/libp2p/go-libp2p-record v0.1.0/go.mod h1:ujNc8iuE5dlKWVy6wuL6dd58t0n7xI4hAIl8pE6wu5Q= -github.com/libp2p/go-libp2p-record v0.1.2/go.mod h1:pal0eNcT5nqZaTV7UGhqeGqxFgGdsU/9W//C8dqjQDk= -github.com/libp2p/go-libp2p-record v0.1.3/go.mod h1:yNUff/adKIfPnYQXgp6FQmNu3gLJ6EMg7+/vv2+9pY4= -github.com/libp2p/go-libp2p-routing-helpers v0.2.3/go.mod h1:795bh+9YeoFl99rMASoiVgHdi5bjack0N1+AFAdbvBw= -github.com/libp2p/go-libp2p-secio v0.1.0/go.mod h1:tMJo2w7h3+wN4pgU2LSYeiKPrfqBgkOsdiKK77hE7c8= -github.com/libp2p/go-libp2p-secio v0.2.0/go.mod h1:2JdZepB8J5V9mBp79BmwsaPQhRPNN2NrnB2lKQcdy6g= -github.com/libp2p/go-libp2p-secio v0.2.1/go.mod h1:cWtZpILJqkqrSkiYcDBh5lA3wbT2Q+hz3rJQq3iftD8= -github.com/libp2p/go-libp2p-secio v0.2.2/go.mod h1:wP3bS+m5AUnFA+OFO7Er03uO1mncHG0uVwGrwvjYlNY= -github.com/libp2p/go-libp2p-swarm v0.1.0/go.mod h1:wQVsCdjsuZoc730CgOvh5ox6K8evllckjebkdiY5ta4= -github.com/libp2p/go-libp2p-swarm v0.2.2/go.mod h1:fvmtQ0T1nErXym1/aa1uJEyN7JzaTNyBcHImCxRpPKU= -github.com/libp2p/go-libp2p-swarm v0.2.3/go.mod h1:P2VO/EpxRyDxtChXz/VPVXyTnszHvokHKRhfkEgFKNM= -github.com/libp2p/go-libp2p-swarm v0.2.8/go.mod h1:JQKMGSth4SMqonruY0a8yjlPVIkb0mdNSwckW7OYziM= -github.com/libp2p/go-libp2p-swarm v0.3.0/go.mod h1:hdv95GWCTmzkgeJpP+GK/9D9puJegb7H57B5hWQR5Kk= -github.com/libp2p/go-libp2p-swarm v0.3.1/go.mod h1:hdv95GWCTmzkgeJpP+GK/9D9puJegb7H57B5hWQR5Kk= -github.com/libp2p/go-libp2p-swarm v0.4.0/go.mod h1:XVFcO52VoLoo0eitSxNQWYq4D6sydGOweTOAjJNraCw= -github.com/libp2p/go-libp2p-swarm v0.5.0/go.mod h1:sU9i6BoHE0Ve5SKz3y9WfKrh8dUat6JknzUehFx8xW4= -github.com/libp2p/go-libp2p-swarm v0.5.3/go.mod h1:NBn7eNW2lu568L7Ns9wdFrOhgRlkRnIDg0FLKbuu3i8= -github.com/libp2p/go-libp2p-swarm v0.8.0/go.mod h1:sOMp6dPuqco0r0GHTzfVheVBh6UEL0L1lXUZ5ot2Fvc= -github.com/libp2p/go-libp2p-testing v0.0.2/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= -github.com/libp2p/go-libp2p-testing v0.0.3/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= -github.com/libp2p/go-libp2p-testing v0.0.4/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E= -github.com/libp2p/go-libp2p-testing v0.1.0/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= -github.com/libp2p/go-libp2p-testing v0.1.1/go.mod h1:xaZWMJrPUM5GlDBxCeGUi7kI4eqnjVyavGroI2nxEM0= -github.com/libp2p/go-libp2p-testing v0.1.2-0.20200422005655-8775583591d8/go.mod h1:Qy8sAncLKpwXtS2dSnDOP8ktexIAHKu+J+pnZOFZLTc= -github.com/libp2p/go-libp2p-testing v0.3.0/go.mod h1:efZkql4UZ7OVsEfaxNHZPzIehtsBXMrXnCfJIgDti5g= -github.com/libp2p/go-libp2p-testing v0.4.0/go.mod h1:Q+PFXYoiYFN5CAEG2w3gLPEzotlKsNSbKQ/lImlOWF0= -github.com/libp2p/go-libp2p-testing v0.4.2/go.mod h1:Q+PFXYoiYFN5CAEG2w3gLPEzotlKsNSbKQ/lImlOWF0= -github.com/libp2p/go-libp2p-testing v0.5.0/go.mod h1:QBk8fqIL1XNcno/l3/hhaIEn4aLRijpYOR+zVjjlh+A= -github.com/libp2p/go-libp2p-tls v0.1.3/go.mod h1:wZfuewxOndz5RTnCAxFliGjvYSDA40sKitV4c50uI1M= -github.com/libp2p/go-libp2p-tls v0.3.0/go.mod h1:fwF5X6PWGxm6IDRwF3V8AVCCj/hOd5oFlg+wo2FxJDY= -github.com/libp2p/go-libp2p-tls v0.3.1 h1:lsE2zYte+rZCEOHF72J1Fg3XK3dGQyKvI6i5ehJfEp0= -github.com/libp2p/go-libp2p-tls v0.3.1/go.mod h1:fwF5X6PWGxm6IDRwF3V8AVCCj/hOd5oFlg+wo2FxJDY= -github.com/libp2p/go-libp2p-transport-upgrader v0.1.1/go.mod h1:IEtA6or8JUbsV07qPW4r01GnTenLW4oi3lOPbUMGJJA= -github.com/libp2p/go-libp2p-transport-upgrader v0.2.0/go.mod h1:mQcrHj4asu6ArfSoMuyojOdjx73Q47cYD7s5+gZOlns= -github.com/libp2p/go-libp2p-transport-upgrader v0.3.0/go.mod h1:i+SKzbRnvXdVbU3D1dwydnTmKRPXiAR/fyvi1dXuL4o= -github.com/libp2p/go-libp2p-transport-upgrader v0.4.0/go.mod h1:J4ko0ObtZSmgn5BX5AmegP+dK3CSnU2lMCKsSq/EY0s= -github.com/libp2p/go-libp2p-transport-upgrader v0.4.2/go.mod h1:NR8ne1VwfreD5VIWIU62Agt/J18ekORFU/j1i2y8zvk= -github.com/libp2p/go-libp2p-transport-upgrader v0.4.3/go.mod h1:bpkldbOWXMrXhpZbSV1mQxTrefOg2Fi+k1ClDSA4ppw= -github.com/libp2p/go-libp2p-transport-upgrader v0.4.6/go.mod h1:JE0WQuQdy+uLZ5zOaI3Nw9dWGYJIA7mywEtP2lMvnyk= -github.com/libp2p/go-libp2p-transport-upgrader v0.5.0/go.mod h1:Rc+XODlB3yce7dvFV4q/RmyJGsFcCZRkeZMu/Zdg0mo= -github.com/libp2p/go-libp2p-xor v0.0.0-20210714161855-5c005aca55db/go.mod h1:LSTM5yRnjGZbWNTA/hRwq2gGFrvRIbQJscoIL/u6InY= -github.com/libp2p/go-libp2p-yamux v0.2.0/go.mod h1:Db2gU+XfLpm6E4rG5uGCFX6uXA8MEXOxFcRoXUODaK8= -github.com/libp2p/go-libp2p-yamux v0.2.1/go.mod h1:1FBXiHDk1VyRM1C0aez2bCfHQ4vMZKkAQzZbkSQt5fI= -github.com/libp2p/go-libp2p-yamux v0.2.2/go.mod h1:lIohaR0pT6mOt0AZ0L2dFze9hds9Req3OfS+B+dv4qw= -github.com/libp2p/go-libp2p-yamux v0.2.5/go.mod h1:Zpgj6arbyQrmZ3wxSZxfBmbdnWtbZ48OpsfmQVTErwA= -github.com/libp2p/go-libp2p-yamux v0.2.7/go.mod h1:X28ENrBMU/nm4I3Nx4sZ4dgjZ6VhLEn0XhIoZ5viCwU= -github.com/libp2p/go-libp2p-yamux v0.2.8/go.mod h1:/t6tDqeuZf0INZMTgd0WxIRbtK2EzI2h7HbFm9eAKI4= -github.com/libp2p/go-libp2p-yamux v0.4.0/go.mod h1:+DWDjtFMzoAwYLVkNZftoucn7PelNoy5nm3tZ3/Zw30= -github.com/libp2p/go-libp2p-yamux v0.5.0/go.mod h1:AyR8k5EzyM2QN9Bbdg6X1SkVVuqLwTGf0L4DFq9g6po= -github.com/libp2p/go-libp2p-yamux v0.5.1/go.mod h1:dowuvDu8CRWmr0iqySMiSxK+W0iL5cMVO9S94Y6gkv4= -github.com/libp2p/go-libp2p-yamux v0.5.4/go.mod h1:tfrXbyaTqqSU654GTvK3ocnSZL3BuHoeTSqhcel1wsE= -github.com/libp2p/go-libp2p-yamux v0.6.0/go.mod h1:MRhd6mAYnFRnSISp4M8i0ClV/j+mWHo2mYLifWGw33k= -github.com/libp2p/go-maddr-filter v0.0.4/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q= -github.com/libp2p/go-maddr-filter v0.0.5/go.mod h1:Jk+36PMfIqCJhAnaASRH83bdAvfDRp/w6ENFaC9bG+M= -github.com/libp2p/go-maddr-filter v0.1.0/go.mod h1:VzZhTXkMucEGGEOSKddrwGiOv0tUhgnKqNEmIAz/bPU= -github.com/libp2p/go-mplex v0.0.3/go.mod h1:pK5yMLmOoBR1pNCqDlA2GQrdAVTMkqFalaTWe7l4Yd0= -github.com/libp2p/go-mplex v0.1.0/go.mod h1:SXgmdki2kwCUlCCbfGLEgHjC4pFqhTp0ZoV6aiKgxDU= -github.com/libp2p/go-mplex v0.1.1/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3SFXI1lk= -github.com/libp2p/go-mplex v0.1.2/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3SFXI1lk= -github.com/libp2p/go-mplex v0.2.0/go.mod h1:0Oy/A9PQlwBytDRp4wSkFnzHYDKcpLot35JQ6msjvYQ= -github.com/libp2p/go-mplex v0.3.0/go.mod h1:0Oy/A9PQlwBytDRp4wSkFnzHYDKcpLot35JQ6msjvYQ= -github.com/libp2p/go-msgio v0.0.2/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= -github.com/libp2p/go-msgio v0.0.4/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= -github.com/libp2p/go-msgio v0.0.6/go.mod h1:4ecVB6d9f4BDSL5fqvPiC4A3KivjWn+Venn/1ALLMWA= -github.com/libp2p/go-msgio v0.1.0/go.mod h1:eNlv2vy9V2X/kNldcZ+SShFE++o2Yjxwx6RAYsmgJnE= -github.com/libp2p/go-nat v0.0.3/go.mod h1:88nUEt0k0JD45Bk93NIwDqjlhiOwOoV36GchpcVc1yI= -github.com/libp2p/go-nat v0.0.4/go.mod h1:Nmw50VAvKuk38jUBcmNh6p9lUJLoODbJRvYAa/+KSDo= -github.com/libp2p/go-nat v0.0.5/go.mod h1:B7NxsVNPZmRLvMOwiEO1scOSyjA56zxYAGv1yQgRkEU= -github.com/libp2p/go-nat v0.1.0/go.mod h1:X7teVkwRHNInVNWQiO/tAiAVRwSr5zoRz4YSTC3uRBM= -github.com/libp2p/go-netroute v0.1.2/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk= -github.com/libp2p/go-netroute v0.1.3/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk= -github.com/libp2p/go-netroute v0.1.5/go.mod h1:V1SR3AaECRkEQCoFFzYwVYWvYIEtlxx89+O3qcpCl4A= -github.com/libp2p/go-netroute v0.1.6/go.mod h1:AqhkMh0VuWmfgtxKPp3Oc1LdU5QSWS7wl0QLhSZqXxQ= -github.com/libp2p/go-openssl v0.0.2/go.mod h1:v8Zw2ijCSWBQi8Pq5GAixw6DbFfa9u6VIYDXnvOXkc0= -github.com/libp2p/go-openssl v0.0.3/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= -github.com/libp2p/go-openssl v0.0.4/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= -github.com/libp2p/go-openssl v0.0.5/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= +github.com/libp2p/go-libp2p-core v0.15.1 h1:0RY+Mi/ARK9DgG1g9xVQLb8dDaaU8tCePMtGALEfBnM= +github.com/libp2p/go-libp2p-core v0.15.1/go.mod h1:agSaboYM4hzB1cWekgVReqV5M4g5M+2eNNejV+1EEhs= +github.com/libp2p/go-libp2p-tls v0.4.1 h1:1ByJUbyoMXvYXDoW6lLsMxqMViQNXmt+CfQqlnCpY+M= +github.com/libp2p/go-libp2p-tls v0.4.1/go.mod h1:EKCixHEysLNDlLUoKxv+3f/Lp90O2EXNjTr0UQDnrIw= github.com/libp2p/go-openssl v0.0.7 h1:eCAzdLejcNVBzP/iZM9vqHnQm+XyCEbSSIheIPRGNsw= github.com/libp2p/go-openssl v0.0.7/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= -github.com/libp2p/go-reuseport v0.0.1/go.mod h1:jn6RmB1ufnQwl0Q1f+YxAj8isJgDCQzaaxIFYDhcYEA= -github.com/libp2p/go-reuseport v0.0.2/go.mod h1:SPD+5RwGC7rcnzngoYC86GjPzjSywuQyMVAheVBD9nQ= -github.com/libp2p/go-reuseport v0.1.0/go.mod h1:bQVn9hmfcTaoo0c9v5pBhOarsU1eNOBZdaAd2hzXRKU= -github.com/libp2p/go-reuseport-transport v0.0.2/go.mod h1:YkbSDrvjUVDL6b8XqriyA20obEtsW9BLkuOUyQAOCbs= -github.com/libp2p/go-reuseport-transport v0.0.3/go.mod h1:Spv+MPft1exxARzP2Sruj2Wb5JSyHNncjf1Oi2dEbzM= -github.com/libp2p/go-reuseport-transport v0.0.4/go.mod h1:trPa7r/7TJK/d+0hdBLOCGvpQQVOU74OXbNCIMkufGw= -github.com/libp2p/go-reuseport-transport v0.0.5/go.mod h1:TC62hhPc8qs5c/RoXDZG6YmjK+/YWUPC0yYmeUecbjc= -github.com/libp2p/go-reuseport-transport v0.1.0/go.mod h1:vev0C0uMkzriDY59yFHD9v+ujJvYmDQVLowvAjEOmfw= -github.com/libp2p/go-sockaddr v0.0.2/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= -github.com/libp2p/go-sockaddr v0.1.0/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= -github.com/libp2p/go-sockaddr v0.1.1/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k= -github.com/libp2p/go-stream-muxer v0.0.1/go.mod h1:bAo8x7YkSpadMTbtTaxGVHWUQsR/l5MEaHbKaliuT14= -github.com/libp2p/go-stream-muxer-multistream v0.2.0/go.mod h1:j9eyPol/LLRqT+GPLSxvimPhNph4sfYfMoDPd7HkzIc= -github.com/libp2p/go-stream-muxer-multistream v0.3.0/go.mod h1:yDh8abSIzmZtqtOt64gFJUXEryejzNb0lisTt+fAMJA= -github.com/libp2p/go-tcp-transport v0.1.0/go.mod h1:oJ8I5VXryj493DEJ7OsBieu8fcg2nHGctwtInJVpipc= -github.com/libp2p/go-tcp-transport v0.1.1/go.mod h1:3HzGvLbx6etZjnFlERyakbaYPdfjg2pWP97dFZworkY= -github.com/libp2p/go-tcp-transport v0.2.0/go.mod h1:vX2U0CnWimU4h0SGSEsg++AzvBcroCGYw28kh94oLe0= -github.com/libp2p/go-tcp-transport v0.2.1/go.mod h1:zskiJ70MEfWz2MKxvFB/Pv+tPIB1PpPUrHIWQ8aFw7M= -github.com/libp2p/go-tcp-transport v0.2.3/go.mod h1:9dvr03yqrPyYGIEN6Dy5UvdJZjyPFvl1S/igQ5QD1SU= -github.com/libp2p/go-tcp-transport v0.2.4/go.mod h1:9dvr03yqrPyYGIEN6Dy5UvdJZjyPFvl1S/igQ5QD1SU= -github.com/libp2p/go-tcp-transport v0.2.7/go.mod h1:lue9p1b3VmZj1MhhEGB/etmvF/nBQ0X9CW2DutBT3MM= -github.com/libp2p/go-tcp-transport v0.4.0/go.mod h1:0y52Rwrn4076xdJYu/51/qJIdxz+EWDAOG2S45sV3VI= -github.com/libp2p/go-ws-transport v0.1.0/go.mod h1:rjw1MG1LU9YDC6gzmwObkPd/Sqwhw7yT74kj3raBFuo= -github.com/libp2p/go-ws-transport v0.2.0/go.mod h1:9BHJz/4Q5A9ludYWKoGCFC5gUElzlHoKzu0yY9p/klM= -github.com/libp2p/go-ws-transport v0.3.0/go.mod h1:bpgTJmRZAvVHrgHybCVyqoBmyLQ1fiZuEaBYusP5zsk= -github.com/libp2p/go-ws-transport v0.4.0/go.mod h1:EcIEKqf/7GDjth6ksuS/6p7R49V4CBY6/E7R/iyhYUA= -github.com/libp2p/go-ws-transport v0.5.0/go.mod h1:I2juo1dNTbl8BKSBYo98XY85kU2xds1iamArLvl8kNg= -github.com/libp2p/go-yamux v1.2.2/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux v1.2.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux v1.3.0/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux v1.3.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux v1.3.5/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow= -github.com/libp2p/go-yamux v1.3.7/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= -github.com/libp2p/go-yamux v1.4.0/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= -github.com/libp2p/go-yamux v1.4.1/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE= -github.com/libp2p/go-yamux/v2 v2.0.0/go.mod h1:NVWira5+sVUIU6tu1JWvaRn1dRnG+cawOJiflsAM+7U= -github.com/libp2p/go-yamux/v2 v2.2.0/go.mod h1:3So6P6TV6r75R9jiBpiIKgU/66lOarCZjqROGxzPpPQ= -github.com/libp2p/go-yamux/v2 v2.3.0/go.mod h1:iTU+lOIn/2h0AgKcL49clNTwfEw+WSfDYrXe05EyKIs= -github.com/libp2p/zeroconf/v2 v2.1.1/go.mod h1:fuJqLnUwZTshS3U/bMRJ3+ow/v9oid1n0DmyYyNO1Xs= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= -github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= 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/lucas-clemente/quic-go v0.19.3/go.mod h1:ADXpNbTQjq1hIzCpB+y/k5iz4n4z4IwqoLb94Kh5Hu8= -github.com/lucas-clemente/quic-go v0.21.2/go.mod h1:vF5M1XqhBAHgbjKcJOXY3JZz3GP0T3FQhz/uyOUS38Q= -github.com/lucas-clemente/quic-go v0.23.0/go.mod h1:paZuzjXCE5mj6sikVLMvqXk8lJV2AsqtJ6bDhjEfxx0= -github.com/lucas-clemente/quic-go v0.24.0/go.mod h1:paZuzjXCE5mj6sikVLMvqXk8lJV2AsqtJ6bDhjEfxx0= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= -github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= -github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= -github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/m4ksio/wal v1.0.0 h1:PucHOZPz58BgWowe+Gf+gZUbgEdd4zFx+He45SGkHG0= -github.com/m4ksio/wal v1.0.0/go.mod h1:S3UyatBTuMdoI5QTuz2DWb8Csd9568vYrFAmMI/bnMw= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/manifoldco/promptui v0.8.0/go.mod h1:n4zTdgP0vr0S3w7/O/g98U+e0gwLScEXGwov2nIKuGQ= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= -github.com/marten-seemann/qpack v0.2.1/go.mod h1:F7Gl5L1jIgN1D11ucXefiuJS9UMVP2opoCp2jDKb7wc= -github.com/marten-seemann/qtls v0.10.0/go.mod h1:UvMd1oaYDACI99/oZUYLzMCkBXQVT0aGm99sJhbT8hs= -github.com/marten-seemann/qtls-go1-15 v0.1.1/go.mod h1:GyFwywLKkRt+6mfU99csTEY1joMZz5vmB1WNZH3P81I= -github.com/marten-seemann/qtls-go1-15 v0.1.4/go.mod h1:GyFwywLKkRt+6mfU99csTEY1joMZz5vmB1WNZH3P81I= -github.com/marten-seemann/qtls-go1-15 v0.1.5/go.mod h1:GyFwywLKkRt+6mfU99csTEY1joMZz5vmB1WNZH3P81I= -github.com/marten-seemann/qtls-go1-16 v0.1.4/go.mod h1:gNpI2Ol+lRS3WwSOtIUUtRwZEQMXjYK+dQSBFbethAk= -github.com/marten-seemann/qtls-go1-17 v0.1.0-rc.1/go.mod h1:fz4HIxByo+LlWcreM4CZOYNuz3taBQ8rN2X6FqvaWo8= -github.com/marten-seemann/qtls-go1-17 v0.1.0/go.mod h1:fz4HIxByo+LlWcreM4CZOYNuz3taBQ8rN2X6FqvaWo8= -github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd/go.mod h1:QuCEs1Nt24+FYQEqAAncTDPJIuGs+LxK1MCiFL25pMU= -github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.0/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= @@ -1219,62 +558,34 @@ github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= 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-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5-0.20180830101745-3fb116b82035/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= 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.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/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.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= -github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= 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 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= -github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.12/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.28/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/miekg/dns v1.1.31/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= -github.com/mikioh/tcp v0.0.0-20190314235350-803a9b46060c/go.mod h1:0SQS9kMwD2VsyFEB++InYyBJroV/FRmBgcydeSUcJms= -github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b/go.mod h1:lxPUiZwKoFL8DUUmalo2yJJUCxbPKtm8OKfqr2/FTNU= -github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc/go.mod h1:cGKTAVKx4SxOuR/czcZ/E2RSJ3sfHs8FpHhQ5CWMf9s= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= -github.com/minio/sha256-simd v0.0.0-20190131020904-2d45a736cd16/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= -github.com/minio/sha256-simd v0.0.0-20190328051042-05b4dd3047e5/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= -github.com/minio/sha256-simd v0.1.0/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= -github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -1284,19 +595,11 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4 github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -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/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -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.1/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= -github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mr-tron/base58 v1.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= @@ -1305,286 +608,98 @@ github.com/multiformats/go-base32 v0.0.4 h1:+qMh4a2f37b4xTNs6mqitDinryCI+tfO2dRV github.com/multiformats/go-base32 v0.0.4/go.mod h1:jNLFzjPZtp3aIARHbJRZIaPuspdH0J6q39uUM5pnABM= github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4= github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= -github.com/multiformats/go-multiaddr v0.0.1/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= -github.com/multiformats/go-multiaddr v0.0.2/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= -github.com/multiformats/go-multiaddr v0.0.4/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= -github.com/multiformats/go-multiaddr v0.1.0/go.mod h1:xKVEak1K9cS1VdmPZW3LSIb6lgmoS58qz/pzqmAxV44= -github.com/multiformats/go-multiaddr v0.1.1/go.mod h1:aMKBKNEYmzmDmxfX88/vz+J5IU55txyt0p4aiWVohjo= -github.com/multiformats/go-multiaddr v0.2.0/go.mod h1:0nO36NvPpyV4QzvTLi/lafl2y95ncPj0vFwVF6k6wJ4= -github.com/multiformats/go-multiaddr v0.2.1/go.mod h1:s/Apk6IyxfvMjDafnhJgJ3/46z7tZ04iMk5wP4QMGGE= -github.com/multiformats/go-multiaddr v0.2.2/go.mod h1:NtfXiOtHvghW9KojvtySjH5y0u0xW5UouOmQQrn6a3Y= -github.com/multiformats/go-multiaddr v0.3.0/go.mod h1:dF9kph9wfJ+3VLAaeBqo9Of8x4fJxp6ggJGteB8HQTI= -github.com/multiformats/go-multiaddr v0.3.1/go.mod h1:uPbspcUPd5AfaP6ql3ujFY+QWzmBD8uLLL4bXW0XfGc= -github.com/multiformats/go-multiaddr v0.3.3/go.mod h1:lCKNGP1EQ1eZ35Za2wlqnabm9xQkib3fyB+nZXHLag0= -github.com/multiformats/go-multiaddr v0.4.0/go.mod h1:YcpyLH8ZPudLxQlemYBPhSm0/oCXAT8Z4mzFpyoPyRc= -github.com/multiformats/go-multiaddr v0.4.1 h1:Pq37uLx3hsyNlTDir7FZyU8+cFCTqd5y1KiM2IzOutI= -github.com/multiformats/go-multiaddr v0.4.1/go.mod h1:3afI9HfVW8csiF8UZqtpYRiDyew8pRX7qLIGHu9FLuM= -github.com/multiformats/go-multiaddr-dns v0.0.1/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= -github.com/multiformats/go-multiaddr-dns v0.0.2/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q= -github.com/multiformats/go-multiaddr-dns v0.2.0/go.mod h1:TJ5pr5bBO7Y1B18djPuRsVkduhQH2YqYSbxWJzYGdK0= -github.com/multiformats/go-multiaddr-dns v0.3.1/go.mod h1:G/245BRQ6FJGmryJCrOuTdB37AMA5AMOVuO6NY3JwTk= -github.com/multiformats/go-multiaddr-fmt v0.0.1/go.mod h1:aBYjqL4T/7j4Qx+R73XSv/8JsgnRFlf0w2KGLCmXl3Q= -github.com/multiformats/go-multiaddr-fmt v0.1.0/go.mod h1:hGtDIW4PU4BqJ50gW2quDuPVjyWNZxToGUh/HwTZYJo= -github.com/multiformats/go-multiaddr-net v0.0.1/go.mod h1:nw6HSxNmCIQH27XPGBuX+d1tnvM7ihcFwHMSstNAVUU= -github.com/multiformats/go-multiaddr-net v0.1.0/go.mod h1:5JNbcfBOP4dnhoZOv10JJVkJO0pCCEf8mTnipAo2UZQ= -github.com/multiformats/go-multiaddr-net v0.1.1/go.mod h1:5JNbcfBOP4dnhoZOv10JJVkJO0pCCEf8mTnipAo2UZQ= -github.com/multiformats/go-multiaddr-net v0.1.2/go.mod h1:QsWt3XK/3hwvNxZJp92iMQKME1qHfpYmyIjFVsSOY6Y= -github.com/multiformats/go-multiaddr-net v0.1.3/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= -github.com/multiformats/go-multiaddr-net v0.1.4/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= -github.com/multiformats/go-multiaddr-net v0.1.5/go.mod h1:ilNnaM9HbmVFqsb/qcNysjCu4PVONlrBZpHIrw/qQuA= -github.com/multiformats/go-multiaddr-net v0.2.0/go.mod h1:gGdH3UXny6U3cKKYCvpXI5rnK7YaOIEOPVDI9tsJbEA= -github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= +github.com/multiformats/go-multiaddr v0.5.0 h1:i/JuOoVg4szYQ4YEzDGtb2h0o8M7CG/Yq6cGlcjWZpM= +github.com/multiformats/go-multiaddr v0.5.0/go.mod h1:3KAxNkUqLTJ20AAwN4XVX4kZar+bR+gh4zgbfr3SNug= github.com/multiformats/go-multibase v0.0.3 h1:l/B6bJDQjvQ5G52jw4QGSYeOTZoAwIO77RblWplfIqk= github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc= -github.com/multiformats/go-multicodec v0.2.0/go.mod h1:/y4YVwkfMyry5kFbMTbLJKErhycTIftytRV+llXdyS4= -github.com/multiformats/go-multicodec v0.3.0/go.mod h1:qGGaQmioCDh+TeFOnxrbU0DaIPw8yFgAZgFG0V7p1qQ= -github.com/multiformats/go-multihash v0.0.1/go.mod h1:w/5tugSrLEbWqlcgJabL3oHFKTwfvkofsjW2Qa1ct4U= -github.com/multiformats/go-multihash v0.0.5/go.mod h1:lt/HCbqlQwlPBz7lv0sQCdtfcMtlJvakRUn/0Ual8po= -github.com/multiformats/go-multihash v0.0.8/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= -github.com/multiformats/go-multihash v0.0.9/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= -github.com/multiformats/go-multihash v0.0.10/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= +github.com/multiformats/go-multicodec v0.4.1 h1:BSJbf+zpghcZMZrwTYBGwy0CPcVZGWiC72Cp8bBd4R4= +github.com/multiformats/go-multicodec v0.4.1/go.mod h1:1Hj/eHRaVWSXiSNNfcEPcwZleTmdNP81xlxDLnWU9GQ= github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= github.com/multiformats/go-multihash v0.0.14/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= github.com/multiformats/go-multihash v0.0.15/go.mod h1:D6aZrWNLFTV/ynMpKsNtB40mJzmCl4jb1alC0OvHiHg= -github.com/multiformats/go-multihash v0.0.16/go.mod h1:zhfEIgVnB/rPMfxgFw15ZmGoNaKyNUIE4IWHG/kC+Ag= github.com/multiformats/go-multihash v0.1.0 h1:CgAgwqk3//SVEw3T+6DqI4mWMyRuDwZtOWcJT0q9+EA= github.com/multiformats/go-multihash v0.1.0/go.mod h1:RJlXsxt6vHGaia+S8We0ErjhojtKzPP2AH4+kYM7k84= -github.com/multiformats/go-multistream v0.1.0/go.mod h1:fJTiDfXJVmItycydCnNx4+wSzZ5NwG2FEVAI30fiovg= -github.com/multiformats/go-multistream v0.1.1/go.mod h1:KmHZ40hzVxiaiwlj3MEbYgK9JFk2/9UktWZAF54Du38= -github.com/multiformats/go-multistream v0.2.0/go.mod h1:5GZPQZbkWOLOn3J2y4Y99vVW7vOfsAflxARk3x14o6k= -github.com/multiformats/go-multistream v0.2.1/go.mod h1:5GZPQZbkWOLOn3J2y4Y99vVW7vOfsAflxARk3x14o6k= -github.com/multiformats/go-multistream v0.2.2/go.mod h1:UIcnm7Zuo8HKG+HkWgfQsGL+/MIEhyTqbODbIUwSXKs= -github.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= -github.com/multiformats/go-varint v0.0.2/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.6 h1:gk85QWKxh3TazbLxED/NlDVv8+q+ReFJk7Y2W/KhfNY= github.com/multiformats/go-varint v0.0.6/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -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/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= -github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= -github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= -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/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/nightlyone/lockfile v1.0.0 h1:RHep2cFKK4PonZJDdEl4GmkabuhbsRMgk/k3uAmxBiA= +github.com/nightlyone/lockfile v1.0.0/go.mod h1:rywoIealpdNse2r832aiD9jRk8ErCatROs6LzC841CI= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.2-0.20190409134802-7e037d187b0c/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/onflow/atree v0.1.0-beta1.0.20211027184039-559ee654ece9/go.mod h1:+6x071HgCF/0v5hQcaE5qqjc2UqN5gCU8h5Mk6uqpOg= -github.com/onflow/atree v0.1.1/go.mod h1:95SqSEPgfijF1ZkLKbVgYVrfQzvP0fhayh555v1oLbs= -github.com/onflow/atree v0.2.0 h1:2Ea0PEDuOL48oOUlVEb7ry8W8HCkRUEnNQZ0W9IfIAk= -github.com/onflow/atree v0.2.0/go.mod h1:f4/LWn5dJiD63/BK35gnw8sNYWAXHapuekslfrmKvLo= -github.com/onflow/cadence v0.14.2/go.mod h1:EEXKRNuW5C2E1wRM4fLhfqoTgXohPFieXwOGJubz1Jg= +github.com/onflow/atree v0.4.0 h1:+TbNisavAkukAKhgQ4plWnvR9o5+SkwPIsi3jaeAqKs= +github.com/onflow/atree v0.4.0/go.mod h1:7Qe1xaW0YewvouLXrugzMFUYXNoRQ8MT/UsVAWx1Ndo= github.com/onflow/cadence v0.15.0/go.mod h1:KMzDF6cIv6nb5PJW9aITaqazbmJX8MMeibFcpPP385M= -github.com/onflow/cadence v0.15.1/go.mod h1:KMzDF6cIv6nb5PJW9aITaqazbmJX8MMeibFcpPP385M= -github.com/onflow/cadence v0.16.0/go.mod h1:iR/tZpP+1YhM8iRnOBPiBIs7on5dE3hk2ZfunCRQswE= -github.com/onflow/cadence v0.17.0/go.mod h1:iR/tZpP+1YhM8iRnOBPiBIs7on5dE3hk2ZfunCRQswE= -github.com/onflow/cadence v0.18.0/go.mod h1:iR/tZpP+1YhM8iRnOBPiBIs7on5dE3hk2ZfunCRQswE= -github.com/onflow/cadence v0.18.1-0.20210617175100-225316245130/go.mod h1:iR/tZpP+1YhM8iRnOBPiBIs7on5dE3hk2ZfunCRQswE= -github.com/onflow/cadence v0.20.1/go.mod h1:7mzUvPZUIJztIbr9eTvs+fQjWWHTF8veC+yk4ihcNIA= -github.com/onflow/cadence v0.21.0/go.mod h1:KBxn7AyO+R2RFpFHjsWKJFAokyJaCZXc9Hr9MlEOq9g= -github.com/onflow/cadence v0.23.2/go.mod h1:Y++seAx3qsNjjZYTQhClD86D5aF951cMHVPL94Z64J8= -github.com/onflow/cadence v0.23.3 h1:Hau2tiEyXkEt/9ZdQw+sr8CBofXwJ6rBqT7iWi/7vrM= -github.com/onflow/cadence v0.23.3/go.mod h1:Y++seAx3qsNjjZYTQhClD86D5aF951cMHVPL94Z64J8= -github.com/onflow/cadence/languageserver v0.15.2/go.mod h1:hQGE8dYH5CfQ1Oe0nXglchgURzZwR3JQhmuXtv4ROHs= -github.com/onflow/cadence/languageserver v0.16.0/go.mod h1:UPV1so9LcMrhj27IegrTucoyS4TLRVjNr4DJqjqBhFA= -github.com/onflow/cadence/languageserver v0.18.2/go.mod h1:ehuDCUevEEavUzgJqLevcZPjfmTzMBX7Sglbi5ur9uU= -github.com/onflow/cadence/languageserver v0.18.3-0.20220202133308-207188a51831/go.mod h1:sOABh+6LBUWgY6r5iYhu98mDgfiBVTXAKVYHPQV/nvo= -github.com/onflow/fcl-dev-wallet v0.4.2/go.mod h1:xWVEyGZgdDt4/+PLSlpuqhtzobjnWy5giceIGoErPzs= -github.com/onflow/flow v0.2.3-0.20220131193101-d4e2ca43a621/go.mod h1:lzyAYmbu1HfkZ9cfnL5/sjrrsnJiUU8fRL26CqLP7+c= -github.com/onflow/flow v0.2.4 h1:w93wtRDGeFLzjR73IaeSFCUHVv/ITExk5bfDGdvzWm8= -github.com/onflow/flow v0.2.4/go.mod h1:lzyAYmbu1HfkZ9cfnL5/sjrrsnJiUU8fRL26CqLP7+c= -github.com/onflow/flow-cli v0.20.3-0.20210512000809-474effb7e7db/go.mod h1:Yh4dgrNiZdXhbU+3UVUmo4gRM0TEBVvhW4ITKVo82dg= -github.com/onflow/flow-cli v0.23.1-0.20210621124332-11c4cd22ffb4/go.mod h1:OD9UVPFIvktnO86dSLavf1tTVFIsKQ5By5KBBDLfC3Q= -github.com/onflow/flow-cli v0.30.3-0.20220202132709-c9157226af28/go.mod h1:8g9X+IB3lALiTzMIRFkTJzuLcfYawMp2WzLhs90NJfU= -github.com/onflow/flow-cli v0.33.0 h1:x1xahtjR7UcZDcYc5Ustn1E4vr5nNS1Ea1n4n7dfhx0= -github.com/onflow/flow-cli v0.33.0/go.mod h1:FF71NjdmHr5QEhApWRNOLzjSk488DRRTGGRUr+zlybQ= -github.com/onflow/flow-core-contracts/lib/go/contracts v0.7.2/go.mod h1:IZ2e7UyLCYmpQ8Kd7k0A32uXqdqfiV1r2sKs5/riblo= -github.com/onflow/flow-core-contracts/lib/go/contracts v0.7.3-0.20210527134022-58c25247091a/go.mod h1:IZ2e7UyLCYmpQ8Kd7k0A32uXqdqfiV1r2sKs5/riblo= -github.com/onflow/flow-core-contracts/lib/go/contracts v0.7.3/go.mod h1:MSNt2rodpRXm1n0iGQWL6ltDoJCtXEzlPw9nhE/zQmk= -github.com/onflow/flow-core-contracts/lib/go/contracts v0.9.0/go.mod h1:MSNt2rodpRXm1n0iGQWL6ltDoJCtXEzlPw9nhE/zQmk= -github.com/onflow/flow-core-contracts/lib/go/contracts v0.11.0 h1:S8UxLG4H2bAx9YjRjVY2/pYIFwrzlg2Q/kbFVQmkql0= -github.com/onflow/flow-core-contracts/lib/go/contracts v0.11.0/go.mod h1:MSNt2rodpRXm1n0iGQWL6ltDoJCtXEzlPw9nhE/zQmk= -github.com/onflow/flow-core-contracts/lib/go/templates v0.6.0/go.mod h1:fLJbjGUHrlHdrjaeRDgKG9nZJ6spiCScc+Q5SARgH38= -github.com/onflow/flow-core-contracts/lib/go/templates v0.9.0/go.mod h1:ckE1lQ18DQVLH9gI63JnGLmBJL/Bo8FPsgYefcWpWhg= -github.com/onflow/flow-core-contracts/lib/go/templates v0.11.0 h1:TykcO0LCrwf/1HhUZ/x6V1ru0DTSdaFX0WryDvDxokc= -github.com/onflow/flow-core-contracts/lib/go/templates v0.11.0/go.mod h1:ckE1lQ18DQVLH9gI63JnGLmBJL/Bo8FPsgYefcWpWhg= -github.com/onflow/flow-emulator v0.19.0/go.mod h1:k5un51XlFJavboagCqTxd6x8Gle7lxWlXdUepoNB5fA= -github.com/onflow/flow-emulator v0.20.3/go.mod h1:xNdVsrMJiAaYJ59Dwo+xvj0ENdvk/bI14zkGN4V0ozs= -github.com/onflow/flow-emulator v0.21.0/go.mod h1:/2dNG6K4fKtpZsazdIeK8Fs0IWXUzqvO3qK5467pYsc= -github.com/onflow/flow-emulator v0.28.1-0.20220202131242-21a2c6e3eac7/go.mod h1:75iLaCkteYi8VsRnPH7RC9jeKjOIXogFq4TkPU71r1c= -github.com/onflow/flow-emulator v0.31.0 h1:KxhQkqc5THLYDuMMgNluLS8SNRV4/MQKt7QLvj5zGHE= -github.com/onflow/flow-emulator v0.31.0/go.mod h1:iK+mlolbPpCXvDeaDNiqgZy6F78OK5+nBYhS+OvLfsg= +github.com/onflow/cadence v0.24.2-0.20220627202951-5a06fec82b4a h1:Wr7+zfFj7ehr3nwNtQ9LXGpwS3MWDsUvnlX78aOnnZY= +github.com/onflow/cadence v0.24.2-0.20220627202951-5a06fec82b4a/go.mod h1:g19FlFrcQsiegiZDe6wYtUCBO8O1hM1x/+l68aVO07k= +github.com/onflow/flow-cli/pkg/flowkit v0.0.0-20220708202053-3b2866146b5f h1:jwIqiaxZYj//tpNzDAwsB7ZGJaEV8iiQMLgh7ge1PYg= +github.com/onflow/flow-cli/pkg/flowkit v0.0.0-20220708202053-3b2866146b5f/go.mod h1:o3cep2V/P22xopmOiRPYdpotoZ8s6SLrvqH7w+r7CeI= +github.com/onflow/flow-core-contracts/lib/go/contracts v0.11.2-0.20220620142725-49b5accb2a84 h1:VKIZufzFyxfeMbKeDIyttN2CmFYCzHOimr4xNFimVpA= +github.com/onflow/flow-core-contracts/lib/go/contracts v0.11.2-0.20220620142725-49b5accb2a84/go.mod h1:T6yhM+kWrFxiP6F3hh8lh9DcocHfmv48P4ITnjLhKSk= +github.com/onflow/flow-core-contracts/lib/go/templates v0.11.2-0.20220513155751-c4c1f8d59f83 h1:w4uXFTvjQmLtA/X50H4YXVlzbdsoL3vDI3Y86jtJOMM= +github.com/onflow/flow-core-contracts/lib/go/templates v0.11.2-0.20220513155751-c4c1f8d59f83/go.mod h1:JB2hWVxUjhMshUDNVQKfn4dzhhawOO+i3XjlhLMV5MM= +github.com/onflow/flow-emulator v0.33.4-0.20220705151023-2cc6a4f25a20 h1:jXFBCt2TOsBc8NqR9sqItg4NkxNmWdpXtqw7MtI5/as= +github.com/onflow/flow-emulator v0.33.4-0.20220705151023-2cc6a4f25a20/go.mod h1:coblYSDdorqGkiJtYNFntoQPzYc7jIzWj46P6MvLodM= github.com/onflow/flow-ft/lib/go/contracts v0.5.0 h1:Cg4gHGVblxcejfNNG5Mfj98Wf4zbY76O0Y28QB0766A= github.com/onflow/flow-ft/lib/go/contracts v0.5.0/go.mod h1:1zoTjp1KzNnOPkyqKmWKerUyf0gciw+e6tAEt0Ks3JE= -github.com/onflow/flow-go v0.16.3-0.20210427194927-6050c2a3ae42/go.mod h1:9GUEbBhOGDVf91ZJB6QWqVNQkrM3INEudNyDtIttOu0= -github.com/onflow/flow-go v0.17.1/go.mod h1:j8zCo01+2pJL00qpOnwdOqU7spTgOLHFRUp9gsamyNA= -github.com/onflow/flow-go v0.18.0/go.mod h1:cQpvFoqth9PR7tarWDa36R/dDOqUK5QYfeYzCdXPLII= -github.com/onflow/flow-go v0.18.2-canary/go.mod h1:mGzTPbzG1YrckrFQfjCw6NzfflP1o3TjRxI9LRWZbpc= -github.com/onflow/flow-go v0.23.2-0.20220201222302-cff34195a61a/go.mod h1:ci9UXmbx+2nloojjgXCaBCFhpYjssgRNH/s+HEATuzA= -github.com/onflow/flow-go v0.25.5-0.20220330212458-32bda868ae65 h1:OkDLQsN2LT0+JeGPddczp0HZD1xIrAKHXuAYadx/k0M= -github.com/onflow/flow-go v0.25.5-0.20220330212458-32bda868ae65/go.mod h1:yT5chaiogk6OTPSI/xMj8E+yDiAyCvngyhChwS8hp9U= -github.com/onflow/flow-go-sdk v0.18.0/go.mod h1:AjXHdxguP/PK5P8tWKHH4jR6oLISTgLoXXQrbQsHY+E= -github.com/onflow/flow-go-sdk v0.19.0/go.mod h1:52QZyLwU3p3UZ2FXOy+sRl4JPdtvJoae1spIUBOFxA8= -github.com/onflow/flow-go-sdk v0.20.0-alpha.1/go.mod h1:52QZyLwU3p3UZ2FXOy+sRl4JPdtvJoae1spIUBOFxA8= +github.com/onflow/flow-go v0.25.13-0.20220706165514-abf4535fe946 h1:47Z+6Gjtm608VTmtiw6MgRbV3rKzEAdlWVtQPTmefKI= +github.com/onflow/flow-go v0.25.13-0.20220706165514-abf4535fe946/go.mod h1:1cK4eFgKJKQmCa3SxelxGCWjQAUeBYECeHTmYXvTCoQ= github.com/onflow/flow-go-sdk v0.20.0/go.mod h1:52QZyLwU3p3UZ2FXOy+sRl4JPdtvJoae1spIUBOFxA8= -github.com/onflow/flow-go-sdk v0.24.0 h1:+p9Cqs3U34KVs5vvnjdLyRAne0ROEfjgJDeDn7ne+4k= -github.com/onflow/flow-go-sdk v0.24.0/go.mod h1:IoptMLPyFXWvyd9yYA6/4EmSeeozl6nJoIv4FaEMg74= +github.com/onflow/flow-go-sdk v0.26.6-0.20220712195924-6920f8f55b88 h1:TR5TTp3RpO7tqN0BWPbB2PVYJOkJ/v7OPwxXWvpnzIY= +github.com/onflow/flow-go-sdk v0.26.6-0.20220712195924-6920f8f55b88/go.mod h1:Gaje48ZNasB5EjEgdSJwC3CEPXcgUURIcCSJPPMui4s= github.com/onflow/flow-go/crypto v0.12.0/go.mod h1:oXuvU0Dr4lHKgye6nHEFbBXIWNv+dBQUzoVW5Go38+o= -github.com/onflow/flow-go/crypto v0.18.0/go.mod h1:3Ah843iPyjIL+7nH9EillV3OWNptrL+DrQUbVKgg2E4= -github.com/onflow/flow-go/crypto v0.21.3/go.mod h1:vI6V4CY3R6c4JKBxdcRiR/AnjBfL8OSD97bJc60cLuQ= -github.com/onflow/flow-go/crypto v0.21.4-0.20211125190211-7b31c986316e/go.mod h1:vI6V4CY3R6c4JKBxdcRiR/AnjBfL8OSD97bJc60cLuQ= -github.com/onflow/flow-go/crypto v0.24.2/go.mod h1:dkVL98P6GHR48iD9zCB6XlnkJX8IQd00FKgt1reV90w= github.com/onflow/flow-go/crypto v0.24.3 h1:5puosmiy853m1GPmBLJr4PiLVcCzE4n5o60hRPo9kYA= github.com/onflow/flow-go/crypto v0.24.3/go.mod h1:dkVL98P6GHR48iD9zCB6XlnkJX8IQd00FKgt1reV90w= -github.com/onflow/flow-nft/lib/go/contracts v0.0.0-20210915191154-12ee8c507a0e/go.mod h1:epgW8P53PDpHaqBQCmMgJqdet4h7ONaoIL3kVD/nnzU= github.com/onflow/flow/protobuf/go/flow v0.1.9/go.mod h1:kRugbzZjwQqvevJhrnnCFMJZNmoSJmxlKt6hTGXZojM= -github.com/onflow/flow/protobuf/go/flow v0.2.0/go.mod h1:kRugbzZjwQqvevJhrnnCFMJZNmoSJmxlKt6hTGXZojM= -github.com/onflow/flow/protobuf/go/flow v0.2.2/go.mod h1:gQxYqCfkI8lpnKsmIjwtN2mV/N2PIwc1I+RUK4HPIc8= -github.com/onflow/flow/protobuf/go/flow v0.2.3/go.mod h1:gQxYqCfkI8lpnKsmIjwtN2mV/N2PIwc1I+RUK4HPIc8= -github.com/onflow/flow/protobuf/go/flow v0.2.4 h1:4+/JBD8SKh/6o+LeFgOeI3snnYYpsgdZdyhZ6UXj3xw= -github.com/onflow/flow/protobuf/go/flow v0.2.4/go.mod h1:gQxYqCfkI8lpnKsmIjwtN2mV/N2PIwc1I+RUK4HPIc8= -github.com/onflow/fusd/lib/go/contracts v0.0.0-20211021081023-ae9de8fb2c7e/go.mod h1:CRX9eXtc9zHaRVTW1Xh4Cf5pZgKkQuu1NuSEVyHXr/0= +github.com/onflow/flow/protobuf/go/flow v0.3.1 h1:4I8ykG6naR3n8Or6eXrZDaGVaoztb3gP2KJ6XKyDufg= +github.com/onflow/flow/protobuf/go/flow v0.3.1/go.mod h1:gQxYqCfkI8lpnKsmIjwtN2mV/N2PIwc1I+RUK4HPIc8= +github.com/onflow/sdks v0.4.4 h1:aJPGJJLAN+mlBWAQxsyuJXeRRMFeLwU6Mp4e/YL6bdU= +github.com/onflow/sdks v0.4.4/go.mod h1:F0dj0EyHC55kknLkeD10js4mo14yTdMotnWMslPirrU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/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.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= -github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.13.0 h1:7lLHu94wT9Ij0o6EWWclhu0aOh32VxhkwEJvzuWPeak= -github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= -github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= -github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= -github.com/opentracing/opentracing-go v1.0.2/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/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= -github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= -github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= -github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v0.0.0-20170112150404-1b00554d8222/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34= -github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= -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 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= 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-0.20171018195549-f15c970de5b7/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/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -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 v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/polydawn/refmt v0.0.0-20190807091052-3d65705ee9f1/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= -github.com/polydawn/refmt v0.0.0-20201211092308-30ac6d18308e/go.mod h1:uIp+gprXxxrWSjjklXD+mN4wed/tMfjMMmN/9+JsA9o= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= 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.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= -github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU= -github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU= -github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/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.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= 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.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.18.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.30.0 h1:JEkYlQnpzrzQFxi6gnukFPdQ+ac82oRhzMcIduJu/Ug= -github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/common v0.33.0 h1:rHgav/0a6+uYgGdNt3jwz8FNSesO/Hsang3O0T9A5SE= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/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.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.2.0/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 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.6.2-0.20190402121629-4f204dcbc150/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/psiemens/graceland v1.0.0/go.mod h1:1Tof+vt1LbmcZFE0lzgdwMN0QBymAChG3FRgDx8XisU= github.com/psiemens/sconfig v0.0.0-20190623041652-6e01eb1354fc/go.mod h1:+MLKqdledP/8G3rOBpknbLh0IclCf4WneJUtS26JB2U= github.com/psiemens/sconfig v0.1.0 h1:xfWqW+TRpih7mXZIqKYTmpRhlZLQ1kbxV8EjllPv76s= github.com/psiemens/sconfig v0.1.0/go.mod h1:+MLKqdledP/8G3rOBpknbLh0IclCf4WneJUtS26JB2U= -github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.1-0.20211004051800-57c86be7915a h1:s7GrsqeorVkFR1vGmQ6WVL9nup0eyQCC+YVUeSQLH/Q= @@ -1595,84 +710,47 @@ github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6So 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.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.0/go.mod h1:EBwu+T5AvHOcXwvZIkQFjUN6s8Czyqw12GL/Y0tUyRM= github.com/rs/xhandler v0.0.0-20160618193221-ed27b6fd6521/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= -github.com/rs/zerolog v1.19.0/go.mod h1:IzD0RJ65iWH0w97OQQebJEvTZYvsCUm9WVLWBQrJRjo= github.com/rs/zerolog v1.26.1 h1:/ihwxqH+4z8UxyI70wM1z9yCvkWcfz/a3mj48k/Zngc= github.com/rs/zerolog v1.26.1/go.mod h1:/wSSJWX7lVrsOwlbyTRSOJvqRlc+WjWlfes+CiJ+tmc= 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 v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= -github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo= +github.com/sanity-io/litter v1.5.5/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= github.com/schollz/progressbar/v3 v3.7.6/go.mod h1:Y9mmL2knZj3LUaBDyBEzFdPrymIr08hnlFMZmfxwbx4= -github.com/schollz/progressbar/v3 v3.8.3/go.mod h1:pWnVCjSBZsT2X3nx9HfRdnCDrpbevliMeoEVhStwHko= github.com/scylladb/termtables v0.0.0-20191203121021-c4c0b6d42ff4/go.mod h1:C1a7PQSMz9NShzorzCiG2fk9+xuCgLkPeCvMHYR2OWg= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/segmentio/fasthash v1.0.2/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/sethvargo/go-retry v0.1.0 h1:8sPqlWannzcReEcYjHSNw9becsiYudcwTD7CasGjQaI= -github.com/sethvargo/go-retry v0.1.0/go.mod h1:JzIOdZqQDNpPkQDmcqgtteAcxFLtYpNF/zJCM1ysDg8= -github.com/shirou/gopsutil/v3 v3.22.2/go.mod h1:WapW1AOOPlHyXr+yOyw3uYx36enocrtSoSBy0L5vUHY= +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/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY= -github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM= -github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= -github.com/shurcooL/gofontwoff v0.0.0-20180329035133-29b52fc0a18d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw= -github.com/shurcooL/gopherjslib v0.0.0-20160914041154-feb6d3990c2c/go.mod h1:8d3azKNyqcHP1GaQE/c6dDgjkgSx2BZ4IoEi4F1reUI= -github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU= -github.com/shurcooL/highlight_go v0.0.0-20181028180052-98c3abbbae20/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag= -github.com/shurcooL/home v0.0.0-20181020052607-80b7ffcb30f9/go.mod h1:+rgNQw2P9ARFAs37qieuu7ohDNQ3gds9msbT2yn85sg= -github.com/shurcooL/htmlg v0.0.0-20170918183704-d01228ac9e50/go.mod h1:zPn1wHpTIePGnXSHpsVPWEktKXHr6+SS6x/IKRb7cpw= -github.com/shurcooL/httperror v0.0.0-20170206035902-86b7830d14cc/go.mod h1:aYMfkZ6DWSJPJ6c4Wwz3QtW22G7mf/PEgaB9k/ik5+Y= -github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= -github.com/shurcooL/httpgzip v0.0.0-20180522190206-b1c53ac65af9/go.mod h1:919LwcH0M7/W4fcZ0/jy0qGght1GIhqyS/EgWGH2j5Q= -github.com/shurcooL/issues v0.0.0-20181008053335-6292fdc1e191/go.mod h1:e2qWDig5bLteJ4fwvDAc2NHzqFEthkqn7aOZAOpj+PQ= -github.com/shurcooL/issuesapp v0.0.0-20180602232740-048589ce2241/go.mod h1:NPpHK2TI7iSaM0buivtFUc9offApnI0Alt/K8hcHy0I= -github.com/shurcooL/notifications v0.0.0-20181007000457-627ab5aea122/go.mod h1:b5uSkrEVM1jQUspwbixRBhaIjIzL2xazXp6kntxYle0= -github.com/shurcooL/octicon v0.0.0-20181028054416-fa4f57f9efb2/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ= -github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1lToEk4d2s07G3XGfz2QrgHXg4RJBvjrOozvoWfk= -github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/shurcooL/go-goon v0.0.0-20210110234559-7585751d9a17 h1:lRAUE0dIvigSSFAmaM2dfg7OH8T+a8zJ5smEh09a/GI= +github.com/shurcooL/go-goon v0.0.0-20210110234559-7585751d9a17/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4= -github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw= -github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smola/gocompat v0.2.0/go.mod h1:1B0MlxbmoZNo3h8guHp8HztB3BSYR5itql9qtVc0ypY= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= -github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= -github.com/sourcegraph/jsonrpc2 v0.0.0-20191222043438-96c4efab7ee2/go.mod h1:ZafdZgk/axhT1cvZAPOhw+95nz2I/Ra5qMlU4gTRwIo= -github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA= -github.com/spacemonkeygo/openssl v0.0.0-20181017203307-c2dcc5cca94a/go.mod h1:7AyxJNCJ7SBZ1MfVQCWD6Uqo2oubI2Eq2y2eqf+A5r0= github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU= github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= @@ -1680,247 +758,143 @@ github.com/spaolacci/murmur3 v1.0.1-0.20190317074736-539464a789e9/go.mod h1:JwIa 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.8.0/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -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 v0.0.6/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/cobra v0.0.7/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= 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.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= 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.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= github.com/spf13/viper v1.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk= github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= -github.com/src-d/envconfig v1.0.0/go.mod h1:Q9YQZ7BKITldTBnoxsE5gOeB5y66RyPXeue/R4aaNBc= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw= github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU= -github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= 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.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/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.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-0.20210824115523-ab6dc3262822/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/supranational/blst v0.3.4 h1:iZE9lBMoywK2uy2U/5hDOvobQk9FnOQ2wNlu9GmRCoA= github.com/supranational/blst v0.3.4/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= -github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJhf154huy1nPWmuSrkgjPUtUNhA+Zmy+6AESzuA= -github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= -github.com/thoas/go-funk v0.7.0/go.mod h1:+IWnUfUmFO1+WVYQWQtIJHeRRdaIyyYglZN7xzUPe4Q= 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/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= -github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +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/uber/jaeger-client-go v2.22.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-client-go v2.29.1+incompatible h1:R9ec3zO3sGpzs0abd43Y+fBZRJ9uiH6lXyR/+u6brW4= github.com/uber/jaeger-client-go v2.29.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.3.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/uber/jaeger-lib v2.4.0+incompatible h1:fY7QsGQWiCt8pajv4r7JEvmATdCVaWxXbjwyYwsNaLQ= github.com/uber/jaeger-lib v2.4.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= 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 v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -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/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU= -github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM= 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/wangjia184/sortedset v0.0.0-20160527075905-f5d03557ba30/go.mod h1:YkocrP2K2tcw938x9gCOmT5G5eCD6jsTz0SZuyAqwIE= -github.com/warpfork/go-testmark v0.3.0/go.mod h1:jhEf8FVxd+F17juRubpmut64NEG6I2rgkUhlcqqXwE0= -github.com/warpfork/go-wish v0.0.0-20200122115046-b9ea61034e4a/go.mod h1:x6AKhvSSexNrVSrViXSHUEbICjmGXhtgABaHIySUSGw= -github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h1:8UvriyWtv5Q5EOgjHaSseUEdkQfvwFv1I/In/O2M9gc= -github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc/go.mod h1:bopw91TMyo8J3tvftk8xmU2kPmlrt4nScJQZU2hE5EM= -github.com/whyrusleeping/go-logging v0.0.1/go.mod h1:lDPYj54zutzG1XYfHAhcc7oNXEburHQBn+Iqd4yS4vE= -github.com/whyrusleeping/go-notifier v0.0.0-20170827234753-097c5d47330f/go.mod h1:cZNvX9cFybI01GriPRMXDtczuvUhgbcYr9iCGaNlRv8= -github.com/whyrusleeping/mafmt v1.2.8/go.mod h1:faQJFPbLSxzD9xpA02ttW/tS9vZykNvXwGvqIpk20FA= -github.com/whyrusleeping/mdns v0.0.0-20180901202407-ef14215e6b30/go.mod h1:j4l84WPFclQPj320J9gp0XwNKBb3U0zt5CBqjPp22G4= -github.com/whyrusleeping/mdns v0.0.0-20190826153040-b9b60ed33aa9/go.mod h1:j4l84WPFclQPj320J9gp0XwNKBb3U0zt5CBqjPp22G4= -github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7/go.mod h1:X2c0RVCI1eSUFI8eLcY3c0423ykwiUdxLJtkDvruhjI= -github.com/whyrusleeping/timecache v0.0.0-20160911033111-cfcb2f1abfee/go.mod h1:m2aV4LZI4Aez7dP5PMyVKEHhUyEJ/RjmPEDOpDvudHg= github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208/go.mod h1:IotVbo4F+mw0EzQ08zFqg7pK3FebNXpaMsRy2RT+Ees= -github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE= 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/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= -github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= -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 v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -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.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zeebo/assert v1.1.0 h1:hU1L1vLTHsnO8x8c9KAR5GmM5QscxHg5RNU5z5qbUWY= github.com/zeebo/assert v1.1.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= -github.com/zeebo/blake3 v0.2.0/go.mod h1:G9pM4qQwjRzF1/v7+vabMj/c5mWpGZ2Wzo3Eb4z0pb4= -github.com/zeebo/blake3 v0.2.2 h1:ddH9fUIlef5r+pqvJShGgSXFd6c7k54eQXZ48hNjotQ= -github.com/zeebo/blake3 v0.2.2/go.mod h1:TSQ0KjMH+pht+bRyvVooJ1rBpvvngSGaPISafq9MxJk= -github.com/zeebo/pcg v1.0.0/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4= +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/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= -go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= -go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= -go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= 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.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= 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 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= -go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= -go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= 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.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.1.11-0.20210813005559-691160354723 h1:sHOAIxRGBp443oHZIPB+HsUGaksVCXVQENPxwTfQdH4= -go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= 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.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= 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.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= -go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= -go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= -go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= -golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190225124518-7f87c0fbb88b/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-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/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-20190618222545-ea8f1a30c443/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-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= 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-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200423211502-4bdfaf469ed5/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/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-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/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-20210506145944-38f3c27a63bf/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= -golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210813211128-0a44fdfbc16e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -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-20211215165025-cf75a172585e h1:1SzTfNOXwIS2oWiMF+6qu0OUDKb0dauo6MoDUQyu+yU= golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= 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= @@ -1928,28 +902,17 @@ golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL 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 h1:QE6XYQK6naiK1EPAe1g/ILLxN5RBoH5xkJk3CqlMI/Y= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20220706164943-b4a6d9510983 h1:sUweFwmLOje8KNfXAVqGGAsmgJ/F8jJ6wBLJDt4BTKY= +golang.org/x/exp v0.0.0-20220706164943-b4a6d9510983/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= 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/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 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= @@ -1961,6 +924,7 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= 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= @@ -1973,40 +937,28 @@ 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 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38= -golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 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-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181106065722-10aee1819953/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-20181201002055-351d144fa1fc/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-20190125091013-d26f9f9a57f3/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-20190227160552-c95aed5357e7/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-20190313220215-9f648a60d977/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-20190611141213-3f473d35a33a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -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-20190813141303-74dc4d7220e7/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-20190923162816-aa69164e4478/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= @@ -2017,12 +969,10 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/ 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-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 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= @@ -2031,23 +981,13 @@ golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-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-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= 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-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-20211123203042-d83791d6bcd9/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220418201149-a630d4f3e7a2 h1:6mzvA99KwZxbOrxww4EvWVQUnN1+xEu9tafK5ZxkYeA= +golang.org/x/net v0.0.0-20220418201149-a630d4f3e7a2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/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= @@ -2059,14 +999,12 @@ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ 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-20210615190721-d04028783cf1/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-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b h1:clP8eMhB30EHdc0bd2Twtq6kgU7yl5ub2cQLSdrv1Dg= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= 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= @@ -2083,55 +1021,35 @@ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5h 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-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/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-20181122145206-62eef0e2fa9b/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-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e/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-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/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-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190526052359-791d8a0f4d09/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190610200419-93c9922d18ae/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-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/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-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/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-20191206220618-eeba5f6aabab/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/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-20200124204421-9fbb57f87de9/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= @@ -2141,76 +1059,48 @@ golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7w 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-20200828194041-157a740278f4/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-20201008064518-c1f3e3309c71/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201014080544-cc95f250f6bc/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-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/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-20210218084038-e8e29180ff58/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210223095934-7937bea0104d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/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-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210317225723-c4fcb01b228e/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-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-20210426080607-c94f62235c83/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/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-20210511113859-b0526f3d8744/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/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-20210910150752-751e447fb3d0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/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-20211025112917-711f33c9992c/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-20211205182925-97ca703d548d/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-20220111092808-5a964db01320/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-20220209214540-3681064d5158 h1:rm+CHSpPEEW2IsXUib1ThaHIjuBVZjxNgSKmBLFfD4c= +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-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= 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= @@ -2222,42 +1112,29 @@ 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 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 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/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-20180828015842-6cd1fcedba52/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-20181030000716-a0a13e073c7b/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-20181130052023-1c3d964395ce/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-20190425163242-31fd60d6bfdc/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-20190606050223-4d9ae51c2468/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 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-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190828213141-aed303cbaa74/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/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= @@ -2268,7 +1145,6 @@ golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtn 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-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 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-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -2293,11 +1169,10 @@ golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200828161849-5deb26317202/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201020161133-226fd2f889ca/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/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-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210101214203-2dba1e4ea05c/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= @@ -2308,29 +1183,22 @@ 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.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= -golang.org/x/tools v0.1.9 h1:j9KsMiaP1c3B0OTQGth0/k+miLGTgLsAFUCrF2vLcF8= -golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= 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 h1:f1IJhK4Km5tBJmaiJXtk/PkL4cdVX6J+tGiM187uT5E= gonum.org/v1/gonum v0.11.0/go.mod h1:fSG4YDCxxUZQJ7rKsQrj0gMOg00Il0Z96/qMA4bVQhA= 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.1/go.mod h1:VZW5OlhkL1mysU9vaqNHnsy86inf6Ot+jB3r+BczCEo= -google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= -google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y= -google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= 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= @@ -2355,22 +1223,18 @@ google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBz 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.49.0/go.mod h1:BECiH72wsfwUvOVn3+btPD5WHi0LzavZReBndi42L18= 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.58.0/go.mod h1:cAbP2FsxoGVNwtgNAmmn3y5G1TWAiVYRmg4yku3lv+E= -google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= -google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw= -google.golang.org/api v0.63.0 h1:n2bqqK895ygnBpdPDYetfy23K7fJ22wsrZKCyfuRkkA= 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 h1:67zQnAE0T2rB0A3CwLSas0K+SbVzSxP+zTLkQLexeiw= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 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= @@ -2379,15 +1243,10 @@ google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID 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-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= -google.golang.org/genproto v0.0.0-20190306203927-b5d61aea6440/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 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-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= 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= @@ -2430,8 +1289,6 @@ google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQ 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-20210617175327-b9e0b3197ced/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210624174822-c5cf32407d0a/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= 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= @@ -2443,36 +1300,26 @@ google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEc 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-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210921142501-181ce0d877f6/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211007155348-82e027067bd4/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/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-20220211171837-173942840c17 h1:2X+CNIheCutWRyKRte8szGxrE5ggtV4U+NKAbh/oLhg= -google.golang.org/genproto v0.0.0-20220211171837-173942840c17/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= -google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= +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 h1:SVYXkUz2yZS9FWb2Gm8ivSlbNQzL2Z/NpPKE3RG2jWk= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= 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.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/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.28.1/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= @@ -2490,8 +1337,6 @@ google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnD 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.43.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 h1:NEpgUqV3Z+ZjkqMsxMg11IaDrXY4RY6CQukSGK0uI1M= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= @@ -2508,65 +1353,45 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.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-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= 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/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -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/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.2 h1:XfR1dOYubytKy4Shzc2LHrrGhU0lDCfDGG1yLPmpgsI= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20190213234257-ec84240a7772/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/olebedev/go-duktape.v3 v3.0.0-20200316214253-d7b0ff38cac9/go.mod h1:uAJfkITjFhyEEuUfm7bsmCZRbW5WRq8s9EY8HZ6hCns= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= -gopkg.in/src-d/go-cli.v0 v0.0.0-20181105080154-d492247bbc0d/go.mod h1:z+K8VcOYVYcSwSjGebuDL6176A1XskgbtNl64NSg+n8= -gopkg.in/src-d/go-log.v1 v1.0.1/go.mod h1:GN34hKP0g305ysm2/hctJ0Y8nWP3zxXXJ8GFabTyABE= -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/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= 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-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/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= gorm.io/driver/postgres v1.0.8/go.mod h1:4eOzrI1MUfm6ObJU/UcmbXyiHSs8jSwH95G5P5dxcAg= gorm.io/gorm v1.20.12/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= gorm.io/gorm v1.21.4/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= -honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 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= @@ -2574,18 +1399,15 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh 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= -k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= lukechampine.com/blake3 v1.1.6/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= lukechampine.com/blake3 v1.1.7 h1:GgRMhmdsuK8+ii6UZFDL8Nb+VyMwadAgcJyfYHxG6n0= lukechampine.com/blake3 v1.1.7/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA= +mvdan.cc/gofumpt v0.0.0-20210107193838-d24d34e18d44/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48= +mvdan.cc/gofumpt v0.1.0 h1:hsVv+Y9UsZ/mFZTxJZuHVI6shSQCtzZ11h1JEFPAZLw= +mvdan.cc/gofumpt v0.1.0/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48= 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= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= -sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= -sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= diff --git a/backend/main/main_test.go b/backend/main/main_test.go index 39c210512..8c5670abd 100644 --- a/backend/main/main_test.go +++ b/backend/main/main_test.go @@ -15,7 +15,7 @@ import ( ) var A server.App -var O *overflow.Overflow +var O *overflow.OverflowState var otu *utils.OverflowTestUtils const ServiceAddress = "0xf8d6e0586b0a20c7" diff --git a/backend/main/server/app.go b/backend/main/server/app.go index 6a4587bc6..bcf49e612 100644 --- a/backend/main/server/app.go +++ b/backend/main/server/app.go @@ -589,10 +589,10 @@ func (a *App) createVoteForProposal(w http.ResponseWriter, r *http.Request) { return } // validate user signature - if err := a.FlowAdapter.UserTransactionValidate(v.Addr, v.Message, v.Composite_signatures, v.TransactionId, a.TxOptionsAddresses, p.Choices); err != nil { - respondWithError(w, http.StatusBadRequest, err.Error()) - return - } + // if err := a.FlowAdapter.UserTransactionValidate(v.Addr, v.Message, v.Composite_signatures, v.TransactionId, a.TxOptionsAddresses, p.Choices); err != nil { + // respondWithError(w, http.StatusBadRequest, err.Error()) + // return + // } v.Proposal_id = proposalId diff --git a/backend/main/shared/flow.go b/backend/main/shared/flow.go index a2de38275..6941ee626 100644 --- a/backend/main/shared/flow.go +++ b/backend/main/shared/flow.go @@ -2,7 +2,6 @@ package shared import ( "context" - "encoding/hex" "encoding/json" "errors" "flag" @@ -16,7 +15,6 @@ import ( "github.com/rs/zerolog/log" "github.com/onflow/cadence" - jsoncdc "github.com/onflow/cadence/encoding/json" "github.com/onflow/flow-go-sdk" "github.com/onflow/flow-go-sdk/client" "google.golang.org/grpc" @@ -166,81 +164,81 @@ func (fa *FlowAdapter) UserSignatureValidate( return nil } -func (fa *FlowAdapter) UserTransactionValidate( - address string, - message string, - sigs *[]CompositeSignature, - transactionId string, - txOptaddrs []string, - choices []Choice, -) error { - if transactionId == "" { - // need user signature validation - return nil - } - log.Info().Msgf("Process Vote TXID %s", transactionId) - - // wait on transaction details and verify - txId := flow.HexToID(transactionId) - txr, tx, err := WaitForSeal(fa.Context, fa.Client, txId) - if err != nil || txr.Error != nil { - log.Error().Err(err).Msgf("Tranaction vote has error %s", txr.Error.Error()) - return errors.New("transaction vote invalid") - } - - isSealed := txr.Status.String() == "SEALED" - isVoter := "0x"+tx.ProposalKey.Address.String() == address - if !isSealed { - return errors.New("transaction vote not processed") - } else if !isVoter { - return errors.New("invalid voter address") - } - - txBlockByID, errBlockHeader := fa.Client.GetBlockHeaderByID(fa.Context, tx.ReferenceBlockID) - if errBlockHeader != nil { - log.Error().Err(err).Msgf("Get block header has error %s", errBlockHeader.Error()) - return errors.New("can not verify tx is recent") - } - - if txBlockByID.Timestamp.Before(time.Now().Add(-15 * time.Minute)) { - log.Error(). - Err(err). - Msgf("Tx timestamp too old, now: %s block: %s, blockId %s", time.Now(), txBlockByID.Timestamp, txBlockByID.ID) - return errors.New("voting transaction is invalid") - } - - // validate transaction arguments - toAddressDecoded, errAddress := jsoncdc.Decode(tx.Arguments[1]) - if errAddress != nil { - log.Error().Err(err).Msgf("toAddress in tx invalid %s", errAddress.Error()) - return errors.New("transaction vote is invalid, option not found") - } - - toAddress := toAddressDecoded.(cadence.Address) - vars := strings.Split(message, ":") - encodedChoice := vars[1] - choiceBytes, errChoice := hex.DecodeString(encodedChoice) - - if errChoice != nil { - return errors.New("couldnt decode choice in message from hex string") - } - - isToAddressValid := false - for index, element := range txOptaddrs { - addr := toAddress.String() - if element == addr { - isToAddressValid = true - if choices[index].Choice_text != string(choiceBytes) { - return errors.New("vote choice does not match tx to address") - } - } - } - - if !isToAddressValid { - return errors.New("transaction to address not recognized") - } - return nil -} +// func (fa *FlowAdapter) UserTransactionValidate( +// address string, +// message string, +// sigs *[]CompositeSignature, +// transactionId string, +// txOptaddrs []string, +// choices []Choice, +// ) error { +// if transactionId == "" { +// // need user signature validation +// return nil +// } +// log.Info().Msgf("Process Vote TXID %s", transactionId) + +// // wait on transaction details and verify +// txId := flow.HexToID(transactionId) +// txr, tx, err := WaitForSeal(fa.Context, fa.Client, txId) +// if err != nil || txr.Error != nil { +// log.Error().Err(err).Msgf("Tranaction vote has error %s", txr.Error.Error()) +// return errors.New("transaction vote invalid") +// } + +// isSealed := txr.Status.String() == "SEALED" +// isVoter := "0x"+tx.ProposalKey.Address.String() == address +// if !isSealed { +// return errors.New("transaction vote not processed") +// } else if !isVoter { +// return errors.New("invalid voter address") +// } + +// txBlockByID, errBlockHeader := fa.Client.GetBlockHeaderByID(fa.Context, tx.ReferenceBlockID) +// if errBlockHeader != nil { +// log.Error().Err(err).Msgf("Get block header has error %s", errBlockHeader.Error()) +// return errors.New("can not verify tx is recent") +// } + +// if txBlockByID.Timestamp.Before(time.Now().Add(-15 * time.Minute)) { +// log.Error(). +// Err(err). +// Msgf("Tx timestamp too old, now: %s block: %s, blockId %s", time.Now(), txBlockByID.Timestamp, txBlockByID.ID) +// return errors.New("voting transaction is invalid") +// } + +// // validate transaction arguments +// toAddressDecoded, errAddress := jsoncdc.Decode(tx.Arguments[1]) +// if errAddress != nil { +// log.Error().Err(err).Msgf("toAddress in tx invalid %s", errAddress.Error()) +// return errors.New("transaction vote is invalid, option not found") +// } + +// toAddress := toAddressDecoded.(cadence.Address) +// vars := strings.Split(message, ":") +// encodedChoice := vars[1] +// choiceBytes, errChoice := hex.DecodeString(encodedChoice) + +// if errChoice != nil { +// return errors.New("couldnt decode choice in message from hex string") +// } + +// isToAddressValid := false +// for index, element := range txOptaddrs { +// addr := toAddress.String() +// if element == addr { +// isToAddressValid = true +// if choices[index].Choice_text != string(choiceBytes) { +// return errors.New("vote choice does not match tx to address") +// } +// } +// } + +// if !isToAddressValid { +// return errors.New("transaction to address not recognized") +// } +// return nil +// } func (fa *FlowAdapter) EnforceTokenThreshold(scriptPath, creatorAddr string, c *Contract) (bool, error) { diff --git a/backend/main/test_utils/test_utils.go b/backend/main/test_utils/test_utils.go index 97b97448c..3db67a6c9 100644 --- a/backend/main/test_utils/test_utils.go +++ b/backend/main/test_utils/test_utils.go @@ -11,7 +11,7 @@ import ( ) type OverflowTestUtils struct { - O *overflow.Overflow + O *overflow.OverflowState T *testing.T A *server.App Adapter *shared.FlowAdapter From 20f82d848be9c812b96537875f03421ec3007063 Mon Sep 17 00:00:00 2001 From: Richard Melkonian Date: Thu, 21 Jul 2022 17:49:06 +0100 Subject: [PATCH 16/21] added in wrongly deleted make command --- backend/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/Makefile b/backend/Makefile index 8c0d93b77..02409afd6 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -35,11 +35,13 @@ macdev: dev: APP_ENV=DEV make build_and_run - +migrateup: + migrate -path ./migrations -database "postgres://postgres:admin@localhost:5432/flow_snapshot?sslmode=disable" -verbose up migratedown: migrate -path ./migrations -database "postgres://postgres:admin@localhost:5432/flow_snapshot?sslmode=disable" -verbose down + testmigrateup: migrate -path ./migrations -database "postgres://postgres:admin@localhost:5432/flow_snapshot_test?sslmode=disable" -verbose up From 4b90dd391737b59baf7c30777430465739a53f06 Mon Sep 17 00:00:00 2001 From: Richard Melkonian Date: Thu, 21 Jul 2022 20:54:41 +0100 Subject: [PATCH 17/21] updated NFT Test --- backend/Makefile | 3 +- .../setup_flow_token_account.cdc} | 0 backend/main/shared/structs.go | 10 +++++ backend/main/strategies_test.go | 2 - backend/main/test_utils/strategy_utils.go | 45 +++++++++++++++---- 5 files changed, 47 insertions(+), 13 deletions(-) rename backend/main/cadence/{flow-ft/setup_account.cdc => transactions/setup_flow_token_account.cdc} (100%) diff --git a/backend/Makefile b/backend/Makefile index 02409afd6..4b7569fa9 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -20,7 +20,7 @@ nft: flow accounts add-contract NonFungibleToken ./main/cadence/contracts/NonFungibleToken.cdc && \ flow accounts add-contract MetadataViews ./main/cadence/contracts/MetadataViews.cdc && \ flow accounts add-contract ExampleNFT ./main/cadence/contracts/ExampleNFT.cdc && \ - flow transactions send ./main/cadence/flow-ft/setup_account.cdc && \ + flow transactions send ./main/cadence/transactions/flow-ft/setup_account.cdc && \ flow transactions send ./main/cadence/transactions/setup_account_to_receive_royalty.cdc /storage/flowTokenVault && \ flow transactions send ./main/cadence/transactions/mint_nft.cdc 0xf8d6e0586b0a20c7 "dev_nft" "don't try at home" "thumnbail goes here" '[0.8]' '["royalties"]' '[0xf8d6e0586b0a20c7]' @@ -41,7 +41,6 @@ migrateup: migratedown: migrate -path ./migrations -database "postgres://postgres:admin@localhost:5432/flow_snapshot?sslmode=disable" -verbose down - testmigrateup: migrate -path ./migrations -database "postgres://postgres:admin@localhost:5432/flow_snapshot_test?sslmode=disable" -verbose up diff --git a/backend/main/cadence/flow-ft/setup_account.cdc b/backend/main/cadence/transactions/setup_flow_token_account.cdc similarity index 100% rename from backend/main/cadence/flow-ft/setup_account.cdc rename to backend/main/cadence/transactions/setup_flow_token_account.cdc diff --git a/backend/main/shared/structs.go b/backend/main/shared/structs.go index a03dd4b64..0d8ae603b 100644 --- a/backend/main/shared/structs.go +++ b/backend/main/shared/structs.go @@ -55,6 +55,16 @@ type Choice struct { Choice_img_url *string `json:"choiceImgUrl"` } +type MintParams struct { + Recipient string + Name string + Description string + Thumbnail string + Cuts []float64 + RoyaltyDescriptions []string + RoyaltyBeneficiaries []string +} + // Underlying value of payload needs to be a slice func GetPaginatedResponseWithPayload(payload interface{}, start, count, totalRecords int) *PaginatedResponse { // Tricky way of getting the length of a slice diff --git a/backend/main/strategies_test.go b/backend/main/strategies_test.go index 8d6464312..4343fb9b6 100644 --- a/backend/main/strategies_test.go +++ b/backend/main/strategies_test.go @@ -102,8 +102,6 @@ func TestBalanceOfNFTsStrategy(t *testing.T) { clearTable("balances") clearTable("nfts") - otu.CreateNFTCollection("user1") - communityId, community := otu.AddCommunitiesWithNFTContract(1, "user1") proposalIds, proposals := otu.AddProposalsForStrategy(communityId[0], "balance-of-nfts", 1) proposalId := proposalIds[0] diff --git a/backend/main/test_utils/strategy_utils.go b/backend/main/test_utils/strategy_utils.go index 1d3430688..dff6e29fe 100644 --- a/backend/main/test_utils/strategy_utils.go +++ b/backend/main/test_utils/strategy_utils.go @@ -130,12 +130,29 @@ func (otu *OverflowTestUtils) GenerateListOfVotesWithNFTs( count int, contract *shared.Contract, ) (*[]VoteWithBalance, error) { + + mintParams := shared.MintParams{ + Recipient: "user1", + Description: "the best NFT", + Cuts: []float64{0.8}, + RoyaltyDescriptions: []string{"the best NFT"}, + RoyaltyBeneficiaries: []string{"0xf8d6e0586b0a20c7"}, + } + var votes []VoteWithBalance choices := []string{"a", "b"} + + otu.SetupAccountForFlow("account") + otu.SetupToReceiveRoyalty("account") + for i := 0; i < count; i++ { accountName := "user" + strconv.Itoa(i+1) - otu.SetupAccountForNFTs(accountName) - otu.MintNFT("user1", accountName) + + mintParams.Name = accountName + + otu.SetupAccountForFlow(accountName) + otu.SetupToReceiveRoyalty(accountName) + otu.MintNFT(mintParams) addr := otu.ResolveUser(i + 1) randomNumber := rand.Intn(2) @@ -220,20 +237,30 @@ func (otu *OverflowTestUtils) SetupAccountForNFTs(account string) { RunPrintEventsFull() } -func (otu *OverflowTestUtils) CreateNFTCollection(account string) { - otu.O.TransactionFromFile("create_collection"). +func (otu *OverflowTestUtils) SetupToReceiveRoyalty(account string) { + otu.O.TransactionFromFile("setup_account_to_receive_royalty"). + SignProposeAndPayAs(account). + Args(otu.O.Arguments().StoragePath("/storage/flowTokenVault")). + RunPrintEventsFull() +} + +func (otu *OverflowTestUtils) SetupAccountForFlow(account string) { + otu.O.TransactionFromFile("setup_flow_token_account"). SignProposeAndPayAs(account). RunPrintEventsFull() } -func (otu *OverflowTestUtils) MintNFT(signer, recipient string) { +func (otu *OverflowTestUtils) MintNFT(p shared.MintParams) { otu.O.TransactionFromFile("mint_nft"). SignProposeAndPayAsService(). Args(otu.O.Arguments(). - Account(recipient). - String("name"). - String("description"). - String("thumbnail")). + Account(p.Recipient). + String(p.Name). + String(p.Description). + String(p.Thumbnail). + UFix64Array(0.8). + StringArray("royalties"). + AccountArray(p.Recipient)). RunPrintEventsFull() } From 5f00dd79caeb889f1cbeefc1a41ed2f3f3f5a23c Mon Sep 17 00:00:00 2001 From: Richard Melkonian Date: Thu, 21 Jul 2022 21:38:28 +0100 Subject: [PATCH 18/21] updated Makefile --- backend/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/Makefile b/backend/Makefile index 4b7569fa9..d884d4ab2 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -20,7 +20,7 @@ nft: flow accounts add-contract NonFungibleToken ./main/cadence/contracts/NonFungibleToken.cdc && \ flow accounts add-contract MetadataViews ./main/cadence/contracts/MetadataViews.cdc && \ flow accounts add-contract ExampleNFT ./main/cadence/contracts/ExampleNFT.cdc && \ - flow transactions send ./main/cadence/transactions/flow-ft/setup_account.cdc && \ + flow transactions send ./main/cadence/transactions/setup_flow_token_account.cdc && \ flow transactions send ./main/cadence/transactions/setup_account_to_receive_royalty.cdc /storage/flowTokenVault && \ flow transactions send ./main/cadence/transactions/mint_nft.cdc 0xf8d6e0586b0a20c7 "dev_nft" "don't try at home" "thumnbail goes here" '[0.8]' '["royalties"]' '[0xf8d6e0586b0a20c7]' From 89559abac942701868efdca771bdd526a756cf69 Mon Sep 17 00:00:00 2001 From: Jonathan Bluks Date: Thu, 21 Jul 2022 15:09:12 -0700 Subject: [PATCH 19/21] CAS-204: Add NFT/FT restrictions to One Address One Vote strategies --- backend/main/server/app.go | 12 +- backend/main/strategies/balance_of_nfts.go | 46 +----- .../main/strategies/one_address_one_vote.go | 30 ++-- .../staked_token_weighted_default.go | 3 + .../main/strategies/token_weighted_default.go | 3 + backend/main/strategies/utils.go | 98 +++++++++++ backend/main/strategies_test.go | 153 +++++++++++++++++- ...7_add_one_address_nft_ft_strategy.down.sql | 8 + ...027_add_one_address_nft_ft_strategy.up.sql | 10 ++ .../StrategyEditorModal/StrategySelector.js | 2 +- .../Community/StrategyEditorModal/index.js | 12 +- .../client/src/hooks/useVotingStrategies.js | 14 +- 12 files changed, 323 insertions(+), 68 deletions(-) create mode 100644 backend/main/strategies/utils.go create mode 100644 backend/migrations/000027_add_one_address_nft_ft_strategy.down.sql create mode 100644 backend/migrations/000027_add_one_address_nft_ft_strategy.up.sql diff --git a/backend/main/server/app.go b/backend/main/server/app.go index bcf49e612..3f7512812 100644 --- a/backend/main/server/app.go +++ b/backend/main/server/app.go @@ -66,7 +66,7 @@ type Strategy interface { TallyVotes(votes []*models.VoteWithBalance, p *models.ProposalResults) (models.ProposalResults, error) GetVotes(votes []*models.VoteWithBalance, proposal *models.Proposal) ([]*models.VoteWithBalance, error) GetVoteWeightForBalance(vote *models.VoteWithBalance, proposal *models.Proposal) (float64, error) - InitStrategy(f *shared.FlowAdapter, db *shared.Database, sc *shared.SnapshotClient) + InitStrategy(f *shared.FlowAdapter, db *shared.Database, sc *shared.SnapshotClient, name string) FetchBalance(b *models.Balance, p *models.Proposal) (*models.Balance, error) } @@ -74,6 +74,8 @@ var strategyMap = map[string]Strategy{ "token-weighted-default": &strategies.TokenWeightedDefault{}, "staked-token-weighted-default": &strategies.StakedTokenWeightedDefault{}, "one-address-one-vote": &strategies.OneAddressOneVote{}, + "one-address-one-vote-ft": &strategies.OneAddressOneVote{}, + "one-address-one-vote-nft": &strategies.OneAddressOneVote{}, "balance-of-nfts": &strategies.BalanceOfNfts{}, } @@ -320,7 +322,7 @@ func (a *App) getResultsForProposal(w http.ResponseWriter, r *http.Request) { } proposalWithChoices := models.NewProposalResults(proposalId, p.Choices) - s.InitStrategy(a.FlowAdapter, a.DB, a.SnapshotClient) + s.InitStrategy(a.FlowAdapter, a.DB, a.SnapshotClient, *p.Strategy) proposalResults, err := s.TallyVotes(votes, proposalWithChoices) if err != nil { @@ -383,7 +385,7 @@ func (a *App) getVotesForProposal(w http.ResponseWriter, r *http.Request) { return } - s.InitStrategy(a.FlowAdapter, a.DB, a.SnapshotClient) + s.InitStrategy(a.FlowAdapter, a.DB, a.SnapshotClient, *proposal.Strategy) votesWithWeights, err := s.GetVotes(votes, &proposal) if err != nil { @@ -588,7 +590,7 @@ func (a *App) createVoteForProposal(w http.ResponseWriter, r *http.Request) { respondWithError(w, http.StatusBadRequest, err.Error()) return } - // validate user signature + // validate transaction signature // if err := a.FlowAdapter.UserTransactionValidate(v.Addr, v.Message, v.Composite_signatures, v.TransactionId, a.TxOptionsAddresses, p.Choices); err != nil { // respondWithError(w, http.StatusBadRequest, err.Error()) // return @@ -608,7 +610,7 @@ func (a *App) createVoteForProposal(w http.ResponseWriter, r *http.Request) { Proposal_id: p.ID, } - s.InitStrategy(a.FlowAdapter, a.DB, a.SnapshotClient) + s.InitStrategy(a.FlowAdapter, a.DB, a.SnapshotClient, *p.Strategy) balance, err := s.FetchBalance(emptyBalance, &p) if err != nil { diff --git a/backend/main/strategies/balance_of_nfts.go b/backend/main/strategies/balance_of_nfts.go index 0ab59c4bb..cb2c1a2a5 100644 --- a/backend/main/strategies/balance_of_nfts.go +++ b/backend/main/strategies/balance_of_nfts.go @@ -6,60 +6,20 @@ import ( "github.com/DapperCollectives/CAST/backend/main/models" "github.com/DapperCollectives/CAST/backend/main/shared" s "github.com/DapperCollectives/CAST/backend/main/shared" - "github.com/rs/zerolog/log" ) type BalanceOfNfts struct { s.StrategyStruct SC s.SnapshotClient DB *s.Database + name string } func (b *BalanceOfNfts) FetchBalance( balance *models.Balance, p *models.Proposal, ) (*models.Balance, error) { - - vb := &models.VoteWithBalance{ - NFTs: []*models.NFT{}, - } - - var c models.Community - if err := c.GetCommunityByProposalId(b.DB, balance.Proposal_id); err != nil { - return nil, err - } - - strategy, err := models.MatchStrategyByProposal(*c.Strategies, *p.Strategy) - if err != nil { - log.Error().Err(err).Msg("Unable to find strategy for contract") - return nil, err - } - - nftIds, err := b.FlowAdapter.GetNFTIds(balance.Addr, &strategy.Contract) - if err != nil { - return nil, err - } - - for _, nftId := range nftIds { - nft := &models.NFT{ - ID: nftId, - } - vb.NFTs = append(vb.NFTs, nft) - } - - doesExist, err := models.DoesNFTExist(b.DB, vb) - if err != nil { - return nil, err - } - - //only if the NFT ID is not already in the DB, - //do we add the balance - if !doesExist && err == nil { - err = models.CreateUserNFTRecord(b.DB, vb) - balance.NFTCount = len(vb.NFTs) - } - - return balance, nil + return FetchNFTBalance(b.DB, b.FlowAdapter, balance, p) } func (b *BalanceOfNfts) TallyVotes( @@ -107,8 +67,10 @@ func (s *BalanceOfNfts) InitStrategy( f *shared.FlowAdapter, db *shared.Database, sc *s.SnapshotClient, + name string, ) { s.FlowAdapter = f s.DB = db s.SC = *sc + s.name = name } diff --git a/backend/main/strategies/one_address_one_vote.go b/backend/main/strategies/one_address_one_vote.go index 522abd614..157177044 100644 --- a/backend/main/strategies/one_address_one_vote.go +++ b/backend/main/strategies/one_address_one_vote.go @@ -14,6 +14,7 @@ type OneAddressOneVote struct { s.StrategyStruct SC s.SnapshotClient DB *s.Database + name string } func (s *OneAddressOneVote) FetchBalance( @@ -21,19 +22,26 @@ func (s *OneAddressOneVote) FetchBalance( p *models.Proposal, ) (*models.Balance, error) { - if err := b.GetBalanceByAddressAndBlockHeight(s.DB); err != nil && err.Error() != pgx.ErrNoRows.Error() { - log.Error().Err(err).Msg("error querying address b at blockheight") - return nil, err - } - - if b.ID == "" { - if err := b.CreateBalance(s.DB); err != nil { - log.Error().Err(err).Msg("error saving b to DB") + if s.name == "one-address-one-vote-nft" { + return FetchNFTBalance(s.DB, s.FlowAdapter, b, p) + } else if s.name == "one-address-one-vote-ft" { + return FetchFTBalance(s.DB, s.SC, b, p) + } else { + // DEPRECATED: original one-address-one-vote balance implementation before NFT/FT restrictions were introduced + if err := b.GetBalanceByAddressAndBlockHeight(s.DB); err != nil && err.Error() != pgx.ErrNoRows.Error() { + log.Error().Err(err).Msg("error querying address b at blockheight") return nil, err } + + if b.ID == "" { + if err := b.CreateBalance(s.DB); err != nil { + log.Error().Err(err).Msg("error saving b to DB") + return nil, err + } + } + + return b, nil } - - return b, nil } func (s *OneAddressOneVote) TallyVotes( @@ -83,8 +91,10 @@ func (s *OneAddressOneVote) InitStrategy( f *shared.FlowAdapter, db *shared.Database, sc *s.SnapshotClient, + name string, ) { s.FlowAdapter = f s.DB = db s.SC = *sc + s.name = name } diff --git a/backend/main/strategies/staked_token_weighted_default.go b/backend/main/strategies/staked_token_weighted_default.go index eeccd98df..da4d2633b 100644 --- a/backend/main/strategies/staked_token_weighted_default.go +++ b/backend/main/strategies/staked_token_weighted_default.go @@ -14,6 +14,7 @@ type StakedTokenWeightedDefault struct { s.StrategyStruct SC s.SnapshotClient DB *s.Database + name string } func (s *StakedTokenWeightedDefault) FetchBalance( @@ -113,8 +114,10 @@ func (s *StakedTokenWeightedDefault) InitStrategy( f *shared.FlowAdapter, db *shared.Database, sc *s.SnapshotClient, + name string, ) { s.FlowAdapter = f s.DB = db s.SC = *sc + s.name = name } diff --git a/backend/main/strategies/token_weighted_default.go b/backend/main/strategies/token_weighted_default.go index 5352af0c1..cf5cb8812 100644 --- a/backend/main/strategies/token_weighted_default.go +++ b/backend/main/strategies/token_weighted_default.go @@ -15,6 +15,7 @@ type TokenWeightedDefault struct { s.StrategyStruct SC s.SnapshotClient DB *s.Database + name string } func (s *TokenWeightedDefault) FetchBalance( @@ -118,8 +119,10 @@ func (s *TokenWeightedDefault) InitStrategy( f *shared.FlowAdapter, db *shared.Database, sc *s.SnapshotClient, + name string, ) { s.FlowAdapter = f s.DB = db s.SC = *sc + s.name = name } diff --git a/backend/main/strategies/utils.go b/backend/main/strategies/utils.go new file mode 100644 index 000000000..4d237d3af --- /dev/null +++ b/backend/main/strategies/utils.go @@ -0,0 +1,98 @@ +package strategies + +import ( + "github.com/DapperCollectives/CAST/backend/main/models" + s "github.com/DapperCollectives/CAST/backend/main/shared" + "github.com/jackc/pgx/v4" + "github.com/rs/zerolog/log" +) + +func FetchNFTBalance( + db *s.Database, + fa *s.FlowAdapter, + balance *models.Balance, + p *models.Proposal, +) (*models.Balance, error) { + + vb := &models.VoteWithBalance{ + NFTs: []*models.NFT{}, + } + + var c models.Community + if err := c.GetCommunityByProposalId(db, balance.Proposal_id); err != nil { + return nil, err + } + + strategy, err := models.MatchStrategyByProposal(*c.Strategies, *p.Strategy) + if err != nil { + log.Error().Err(err).Msg("Unable to find strategy for contract") + return nil, err + } + + nftIds, err := fa.GetNFTIds(balance.Addr, &strategy.Contract) + if err != nil { + return nil, err + } + + for _, nftId := range nftIds { + nft := &models.NFT{ + ID: nftId, + } + vb.NFTs = append(vb.NFTs, nft) + } + + doesExist, err := models.DoesNFTExist(db, vb) + if err != nil { + return nil, err + } + + //only if the NFT ID is not already in the DB, + //do we add the balance + if !doesExist && err == nil { + err = models.CreateUserNFTRecord(db, vb) + balance.NFTCount = len(vb.NFTs) + } + + return balance, nil +} + +func FetchFTBalance( + db *s.Database, + sc s.SnapshotClient, + b *models.Balance, + p *models.Proposal, +) (*models.Balance, error) { + + var c models.Community + if err := c.GetCommunityByProposalId(db, b.Proposal_id); err != nil { + return nil, err + } + + if err := b.GetBalanceByAddressAndBlockHeight(db); err != nil && err.Error() != pgx.ErrNoRows.Error() { + log.Error().Err(err).Msg("error fetching balance from DB") + return nil, err + } + + strategy, err := models.MatchStrategyByProposal(*c.Strategies, *p.Strategy) + if err != nil { + log.Error().Err(err).Msg("Unable to find strategy for contract") + return nil, err + } + + if err := sc.GetAddressBalanceAtBlockHeight( + b.Addr, + b.BlockHeight, + b, + &strategy.Contract, + ); err != nil { + log.Error().Err(err).Msg("error fetching balance") + return nil, err + } + + if err := b.CreateBalance(db); err != nil { + log.Error().Err(err).Msg("error creating balance in the DB") + return nil, err + } + + return b, nil +} \ No newline at end of file diff --git a/backend/main/strategies_test.go b/backend/main/strategies_test.go index 496371089..c915a8c68 100644 --- a/backend/main/strategies_test.go +++ b/backend/main/strategies_test.go @@ -282,7 +282,6 @@ func TestOneTokenOneVoteStrategy(t *testing.T) { clearTable("proposals") clearTable("votes") clearTable("balances") - clearTable("nfts") communityId := otu.AddCommunities(1)[0] proposalIds, proposals := otu.AddProposalsForStrategy(communityId, "one-address-one-vote", 2) @@ -354,7 +353,8 @@ func TestOneTokenOneVoteStrategy(t *testing.T) { }) } -func TestOneTokenOneVoteStrategyRestrictions(t *testing.T) { +/* One Address One Vote NFT */ +func TestOneTokenOneVoteNFTStrategy(t *testing.T) { clearTable("communities") clearTable("community_users") clearTable("proposals") @@ -362,10 +362,8 @@ func TestOneTokenOneVoteStrategyRestrictions(t *testing.T) { clearTable("balances") clearTable("nfts") - otu.CreateNFTCollection("user1") - communityId, community := otu.AddCommunitiesWithNFTContract(1, "user1") - proposalIds, proposals := otu.AddProposalsForStrategy(communityId[0], "one-address-one-vote", 1) + proposalIds, proposals := otu.AddProposalsForStrategy(communityId[0], "one-address-one-vote-nft", 1) proposalId := proposalIds[0] choices := proposals[0].Choices @@ -380,10 +378,10 @@ func TestOneTokenOneVoteStrategyRestrictions(t *testing.T) { } otu.AddDummyVotesAndNFTs(votes) - t.Run("Test Voting with valid NFT only", func(t *testing.T) { + t.Run("Test Tallying Results For One Address One Vote NFT Strategy", func(t *testing.T) { proposalWithChoices := models.NewProposalResults(proposalId, choices) - _results := otu.TallyResultsForOneAddressOneVote(votes, proposalWithChoices) + _results := otu.TallyResultsForBalanceOfNfts(votes, proposalWithChoices) response := otu.GetProposalResultsAPI(proposalId) CheckResponseCode(t, http.StatusOK, response.Code) @@ -395,4 +393,145 @@ func TestOneTokenOneVoteStrategyRestrictions(t *testing.T) { assert.Equal(t, _results.Results_float["a"], results.Results_float["a"]) assert.Equal(t, _results.Results_float["b"], results.Results_float["b"]) }) + + t.Run("Test Fetching Votes for Proposal", func(t *testing.T) { + response := otu.GetVotesForProposalAPI(proposalId) + CheckResponseCode(t, http.StatusOK, response.Code) + + var body utils.PaginatedResponseWithVotes + json.Unmarshal(response.Body.Bytes(), &body) + + // Validate vote weights are returned correctly + for _, v := range body.Data { + expectedWeight := float64(1.00) + assert.Equal(t, expectedWeight, *v.Weight) + } + }) + + t.Run("Test Fetching Vote for Address", func(t *testing.T) { + _vote := (*votes)[0] + response := otu.GetVoteForProposalByAddressAPI(proposalId, _vote.Addr) + + CheckResponseCode(t, http.StatusOK, response.Code) + + var vote models.VoteWithBalance + json.Unmarshal(response.Body.Bytes(), &vote) + + expectedWeight := float64(1.00) + assert.Equal(t, expectedWeight, *vote.Weight) + }) + + t.Run("Attempt to cheat the NFT strategy", func(t *testing.T) { + proposalWithChoices := models.NewProposalResults(proposalId, choices) + _ = otu.TallyResultsForBalanceOfNfts(votes, proposalWithChoices) + + response := otu.GetProposalResultsAPI(proposalId) + CheckResponseCode(t, http.StatusOK, response.Code) + + var correctResults models.ProposalResults + json.Unmarshal(response.Body.Bytes(), &correctResults) + + otu.SetupAccountForNFTs("user6") + otu.TransferNFT("user2", "user3", 1) + + cheatVote, err := otu.GenerateSingleVoteWithNFT(proposalId, 3, contract) + if err != nil { + t.Error(err) + } + votesWithCheat := append(*votes, *cheatVote) + cheatResults := otu.TallyResultsForBalanceOfNfts(&votesWithCheat, proposalWithChoices) + + response = otu.GetProposalResultsAPI(proposalId) + CheckResponseCode(t, http.StatusOK, response.Code) + + json.Unmarshal(response.Body.Bytes(), &cheatResults) + + //weight should be the same as before the cheat vote was added + //because the cheat vote should be ignored by the server + //therefore the cheatResults should be the same as the correctResults + + assert.Equal(t, correctResults.Proposal_id, cheatResults.Proposal_id) + assert.Equal(t, correctResults.Results_float["a"], cheatResults.Results_float["a"]) + assert.Equal(t, correctResults.Results_float["b"], cheatResults.Results_float["b"]) + }) } + +/* One Token One Vote FT */ +func TestOneTokenOneVoteFTStrategy(t *testing.T) { + clearTable("communities") + clearTable("community_users") + clearTable("proposals") + clearTable("votes") + clearTable("balances") + + communityId := otu.AddCommunities(1)[0] + proposalIds, proposals := otu.AddProposalsForStrategy(communityId, "one-address-one-vote-ft", 2) + votes := otu.GenerateListOfVotes(proposalIds[0], 10) + proposalId := proposalIds[0] + proposalIdTwo := proposalIds[1] + choices := proposals[0].Choices + + otu.AddDummyVotesAndBalances(votes) + + t.Run("Test Tallying Results", func(t *testing.T) { + // Tally results + + proposalWithChoices := models.NewProposalResults(proposalId, choices) + _results := otu.TallyResultsForOneAddressOneVote(votes, proposalWithChoices) + + // Fetch Proposal Results + response := otu.GetProposalResultsAPI(proposalIds[0]) + CheckResponseCode(t, http.StatusOK, response.Code) + + var results models.ProposalResults + json.Unmarshal(response.Body.Bytes(), &results) + + assert.Equal(t, _results.Proposal_id, results.Proposal_id) + assert.Equal(t, _results.Results_float["a"], results.Results_float["a"]) + assert.Equal(t, _results.Results_float["b"], results.Results_float["b"]) + }) + + t.Run("Test Fetching Votes for Proposal", func(t *testing.T) { + response := otu.GetVotesForProposalAPI(proposalId) + + CheckResponseCode(t, http.StatusOK, response.Code) + + var body utils.PaginatedResponseWithVotes + json.Unmarshal(response.Body.Bytes(), &body) + + // Validate vote weights are returned correctly + for _, v := range body.Data { + expectedWeight := 1.00 + assert.Equal(t, &expectedWeight, v.Weight) + } + }) + + t.Run("Test Fetching Vote for Address", func(t *testing.T) { + _vote := (*votes)[0] + response := otu.GetVoteForProposalByAddressAPI(proposalId, _vote.Addr) + + CheckResponseCode(t, http.StatusOK, response.Code) + + var vote models.VoteWithBalance + json.Unmarshal(response.Body.Bytes(), &vote) + + _expectedWeight := 1.00 + assert.Equal(t, _expectedWeight, *vote.Weight) + }) + + t.Run("Test Fetching Votes For Address", func(t *testing.T) { + _vote := (*votes)[0] + proposalIds := []int{proposalId, proposalIdTwo} + + response := otu.GetVotesForAddressAPI(_vote.Addr, proposalIds) + CheckResponseCode(t, http.StatusOK, response.Code) + + var votes []models.VoteWithBalance + json.Unmarshal(response.Body.Bytes(), &votes) + + for _, v := range votes { + _expectedWeight := 1.00 + assert.Equal(t, _expectedWeight, *v.Weight) + } + }) +} \ No newline at end of file diff --git a/backend/migrations/000027_add_one_address_nft_ft_strategy.down.sql b/backend/migrations/000027_add_one_address_nft_ft_strategy.down.sql new file mode 100644 index 000000000..f9417f4d0 --- /dev/null +++ b/backend/migrations/000027_add_one_address_nft_ft_strategy.down.sql @@ -0,0 +1,8 @@ +DELETE FROM voting_strategies WHERE key='one-address-one-vote-nft' +DELETE FROM voting_strategies WHERE key='one-address-one-vote-ft' + +-- Remove values from enum +DELETE FROM pg_enum WHERE oid IN ( + SELECT oid FROM pg_enum where enumLabel='one-address-one-vote-nft' OR enumLabel='one-address-one-vote-ft' +) + diff --git a/backend/migrations/000027_add_one_address_nft_ft_strategy.up.sql b/backend/migrations/000027_add_one_address_nft_ft_strategy.up.sql new file mode 100644 index 000000000..6a46f2fde --- /dev/null +++ b/backend/migrations/000027_add_one_address_nft_ft_strategy.up.sql @@ -0,0 +1,10 @@ +BEGIN; +ALTER TYPE strategies ADD VALUE IF NOT EXISTS 'one-address-one-vote-nft'; +ALTER TYPE strategies ADD VALUE IF NOT EXISTS 'one-address-one-vote-ft'; +END TRANSACTION; +COMMIT; + +INSERT INTO voting_strategies (key, name, description) +VALUES ('one-address-one-vote-nft', 'One Address One Vote (NFT)', 'One address is simply only allowed one vote, if they own the specified NFT.'); +INSERT INTO voting_strategies (key, name, description) +VALUES ('one-address-one-vote-ft', 'One Address One Vote (FT)', 'One address is simply only allowed one vote, if they own the specified FT.'); diff --git a/frontend/packages/client/src/components/Community/StrategyEditorModal/StrategySelector.js b/frontend/packages/client/src/components/Community/StrategyEditorModal/StrategySelector.js index 7741747e9..ca9804d42 100644 --- a/frontend/packages/client/src/components/Community/StrategyEditorModal/StrategySelector.js +++ b/frontend/packages/client/src/components/Community/StrategyEditorModal/StrategySelector.js @@ -5,7 +5,7 @@ export default function StrategySelector({ strategies = [], onSelectStrategy, } = {}) { - const selectStrategy = (stratgy) => () => onSelectStrategy(stratgy); + const selectStrategy = (strategy) => () => onSelectStrategy(strategy); return (
{ publicPath: '', }; - if (strategyName === 'one-address-one-vote') { + if ( + strategyName === 'one-address-one-vote-nft' || + strategyName === 'one-address-one-vote-ft' + ) { initialFormFields = { addr: '', + name: '', publicPath: '', }; } @@ -37,9 +41,13 @@ const getRequiredFields = (strategyName) => { threshold: (threshold) => threshold?.trim().length > 0 && /^[0-9]+$/.test(threshold), }; - if (strategyName === 'one-address-one-vote') { + if ( + strategyName === 'one-address-one-vote-nft' || + strategyName === 'one-address-one-vote-ft' + ) { requiredFields = { addr: (addr) => addr?.trim().length > 0 && isValidAddress(addr), + name: (name) => name?.trim().length > 0 && name?.trim().length <= 150, publicPath: (path) => path?.trim().length > 0 && path?.trim().length <= 150, }; diff --git a/frontend/packages/client/src/hooks/useVotingStrategies.js b/frontend/packages/client/src/hooks/useVotingStrategies.js index ab9e12bbc..5bc5067ec 100644 --- a/frontend/packages/client/src/hooks/useVotingStrategies.js +++ b/frontend/packages/client/src/hooks/useVotingStrategies.js @@ -11,7 +11,19 @@ export default function useVotingStrategies() { const url = `${process.env.REACT_APP_BACK_END_SERVER_API}/voting-strategies`; try { const response = await fetch(url); - const strategies = await checkResponse(response); + let strategies = await checkResponse(response); + // If nft/ft strategies exist for one-address-one-vote, remove one-address-one-vote as an option as it is deprecated + if ( + strategies.filter( + (strategy) => + strategy.key === 'one-address-one-vote-nft' || + strategy.key === 'one-address-one-vote-ft' + ).length === 2 + ) { + strategies = strategies.filter( + (strategy) => strategy.key !== 'one-address-one-vote' + ); + } dispatch({ type: 'SUCCESS', payload: strategies }); } catch (err) { notifyError(err, url); From 841e6cc8b5d9e7fabcdf77e97e3f61affef38d53 Mon Sep 17 00:00:00 2001 From: Jonathan Bluks Date: Fri, 22 Jul 2022 13:30:07 -0700 Subject: [PATCH 20/21] CAS-204: Fix strategy display text and migration file bug --- .../000027_add_one_address_nft_ft_strategy.down.sql | 6 +++--- .../StrategyEditorModal/StrategySelector.js | 12 +++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/backend/migrations/000027_add_one_address_nft_ft_strategy.down.sql b/backend/migrations/000027_add_one_address_nft_ft_strategy.down.sql index f9417f4d0..7c373320e 100644 --- a/backend/migrations/000027_add_one_address_nft_ft_strategy.down.sql +++ b/backend/migrations/000027_add_one_address_nft_ft_strategy.down.sql @@ -1,8 +1,8 @@ -DELETE FROM voting_strategies WHERE key='one-address-one-vote-nft' -DELETE FROM voting_strategies WHERE key='one-address-one-vote-ft' +DELETE FROM voting_strategies WHERE key='one-address-one-vote-nft'; +DELETE FROM voting_strategies WHERE key='one-address-one-vote-ft'; -- Remove values from enum DELETE FROM pg_enum WHERE oid IN ( SELECT oid FROM pg_enum where enumLabel='one-address-one-vote-nft' OR enumLabel='one-address-one-vote-ft' -) +); diff --git a/frontend/packages/client/src/components/Community/StrategyEditorModal/StrategySelector.js b/frontend/packages/client/src/components/Community/StrategyEditorModal/StrategySelector.js index ca9804d42..5afe58d0e 100644 --- a/frontend/packages/client/src/components/Community/StrategyEditorModal/StrategySelector.js +++ b/frontend/packages/client/src/components/Community/StrategyEditorModal/StrategySelector.js @@ -1,6 +1,16 @@ import React from 'react'; import { kebabToString } from 'utils'; +const getStrategyDisplayName = (name) => { + if (name === 'one-address-one-vote-nft') { + return 'One Address, One Vote (NFT)'; + } else if (name === 'one-address-one-vote-ft') { + return 'One Address, One Vote (Token)'; + } else { + return kebabToString(name); + } +}; + export default function StrategySelector({ strategies = [], onSelectStrategy, @@ -22,7 +32,7 @@ export default function StrategySelector({

- {kebabToString(st.key)} + {getStrategyDisplayName(st.key)}

From ce478b524e428456f2c41666bcf0ad9eee80bccb Mon Sep 17 00:00:00 2001 From: Jonathan Bluks Date: Fri, 22 Jul 2022 16:44:17 -0700 Subject: [PATCH 21/21] CAS-204: Update descriptions for one address one vote nft/ft --- ...wn.sql => 000029_add_one_address_nft_ft_strategy.down.sql} | 0 ...y.up.sql => 000029_add_one_address_nft_ft_strategy.up.sql} | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename backend/migrations/{000027_add_one_address_nft_ft_strategy.down.sql => 000029_add_one_address_nft_ft_strategy.down.sql} (100%) rename backend/migrations/{000027_add_one_address_nft_ft_strategy.up.sql => 000029_add_one_address_nft_ft_strategy.up.sql} (61%) diff --git a/backend/migrations/000027_add_one_address_nft_ft_strategy.down.sql b/backend/migrations/000029_add_one_address_nft_ft_strategy.down.sql similarity index 100% rename from backend/migrations/000027_add_one_address_nft_ft_strategy.down.sql rename to backend/migrations/000029_add_one_address_nft_ft_strategy.down.sql diff --git a/backend/migrations/000027_add_one_address_nft_ft_strategy.up.sql b/backend/migrations/000029_add_one_address_nft_ft_strategy.up.sql similarity index 61% rename from backend/migrations/000027_add_one_address_nft_ft_strategy.up.sql rename to backend/migrations/000029_add_one_address_nft_ft_strategy.up.sql index 6a46f2fde..41af2b9ed 100644 --- a/backend/migrations/000027_add_one_address_nft_ft_strategy.up.sql +++ b/backend/migrations/000029_add_one_address_nft_ft_strategy.up.sql @@ -5,6 +5,6 @@ END TRANSACTION; COMMIT; INSERT INTO voting_strategies (key, name, description) -VALUES ('one-address-one-vote-nft', 'One Address One Vote (NFT)', 'One address is simply only allowed one vote, if they own the specified NFT.'); +VALUES ('one-address-one-vote-nft', 'One Address One Vote (NFT)', 'A wallet address vote counts as one vote as long as it has at least one NFT that matches the contract of the proposal.'); INSERT INTO voting_strategies (key, name, description) -VALUES ('one-address-one-vote-ft', 'One Address One Vote (FT)', 'One address is simply only allowed one vote, if they own the specified FT.'); +VALUES ('one-address-one-vote-ft', 'One Address One Vote (FT)', 'A wallet address vote counts as one vote as long as it has at least one fungible token that matches the contract of the proposal.');