From c0672169d61605aeebe83c13a4e6cd129e3271e5 Mon Sep 17 00:00:00 2001 From: marino39 <722509+marino39@users.noreply.github.com> Date: Thu, 6 Feb 2025 13:03:15 +0000 Subject: [PATCH] [AUTOMATED] Update: proto/clients/metadata.gen.go --- metadata/metadata.gen.go | 80 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 2 deletions(-) diff --git a/metadata/metadata.gen.go b/metadata/metadata.gen.go index b3f76619..018cfb12 100644 --- a/metadata/metadata.gen.go +++ b/metadata/metadata.gen.go @@ -1,4 +1,4 @@ -// sequence-metadata v0.4.0 e06ac865e8df630513b2639b3c0df8aa308beb23 +// sequence-metadata v0.4.0 674b211879a80aaf72087afbe63c0fca78a1897b // -- // Code generated by webrpc-gen@v0.21.1 with golang generator. DO NOT EDIT. // @@ -36,7 +36,7 @@ func WebRPCSchemaVersion() string { // Schema hash generated from your RIDL schema func WebRPCSchemaHash() string { - return "e06ac865e8df630513b2639b3c0df8aa308beb23" + return "674b211879a80aaf72087afbe63c0fca78a1897b" } type WebrpcGenVersions struct { @@ -142,6 +142,78 @@ func (x *ContractType) Is(values ...ContractType) bool { return false } +type Source uint8 + +const ( + Source_UNKNOWN Source = 0x00 + Source_FETCHER Source = 0x10 + Source_FETCHER_ON_CHAIN_CONTRACT_URI Source = 0x11 + Source_FETCHER_ON_CHAIN_TOKEN_URI Source = 0x12 + Source_FETCHER_ON_CHAIN_ERC20_INTERFACE Source = 0x13 + Source_FETCHER_ENS_API Source = 0x14 + Source_FETCHER_OPENSEA_API Source = 0x15 + Source_TOKEN_DIRECTORY Source = 0x40 + Source_TOKEN_DIRECTORY_PUBLIC_TOKEN_LIST Source = 0x41 + Source_TOKEN_DIRECTORY_3RD_PARTY Source = 0x42 + Source_TOKEN_DIRECTORY_SEQUENCE_GITHUB Source = 0x43 + Source_SEQUENCE_BUILDER Source = 0x80 +) + +var Source_name = map[uint8]string{ + 0x00: "UNKNOWN", + 0x10: "FETCHER", + 0x11: "FETCHER_ON_CHAIN_CONTRACT_URI", + 0x12: "FETCHER_ON_CHAIN_TOKEN_URI", + 0x13: "FETCHER_ON_CHAIN_ERC20_INTERFACE", + 0x14: "FETCHER_ENS_API", + 0x15: "FETCHER_OPENSEA_API", + 0x40: "TOKEN_DIRECTORY", + 0x41: "TOKEN_DIRECTORY_PUBLIC_TOKEN_LIST", + 0x42: "TOKEN_DIRECTORY_3RD_PARTY", + 0x43: "TOKEN_DIRECTORY_SEQUENCE_GITHUB", + 0x80: "SEQUENCE_BUILDER", +} + +var Source_value = map[string]uint8{ + "UNKNOWN": 0x00, + "FETCHER": 0x10, + "FETCHER_ON_CHAIN_CONTRACT_URI": 0x11, + "FETCHER_ON_CHAIN_TOKEN_URI": 0x12, + "FETCHER_ON_CHAIN_ERC20_INTERFACE": 0x13, + "FETCHER_ENS_API": 0x14, + "FETCHER_OPENSEA_API": 0x15, + "TOKEN_DIRECTORY": 0x40, + "TOKEN_DIRECTORY_PUBLIC_TOKEN_LIST": 0x41, + "TOKEN_DIRECTORY_3RD_PARTY": 0x42, + "TOKEN_DIRECTORY_SEQUENCE_GITHUB": 0x43, + "SEQUENCE_BUILDER": 0x80, +} + +func (x Source) String() string { + return Source_name[uint8(x)] +} + +func (x Source) MarshalText() ([]byte, error) { + return []byte(Source_name[uint8(x)]), nil +} + +func (x *Source) UnmarshalText(b []byte) error { + *x = Source(Source_value[string(b)]) + return nil +} + +func (x *Source) Is(values ...Source) bool { + if x == nil { + return false + } + for _, v := range values { + if *x == v { + return true + } + } + return false +} + type ResourceStatus uint32 const ( @@ -364,6 +436,7 @@ type ContractIndex struct { ChainID uint64 `json:"chainId" db:"chain_id"` Address prototyp.Hash `json:"address" db:"contract_address"` Type ContractType `json:"type" db:"type"` + Source Source `json:"source" db:"source"` Metadata map[string]interface{} `json:"metadata" db:"metadata"` ContentHash uint64 `json:"contentHash,omitempty" db:"content_hash,omitempty"` Deployed bool `json:"deployed" db:"deployed"` @@ -378,6 +451,7 @@ type ContractIndex struct { // are fetched on-demand through traversing on-chain contract metadata. type TokenIndex struct { Key prototyp.Key `json:"key" db:"key"` + Source Source `json:"source" db:"source"` ChainID uint64 `json:"chainId" db:"chain_id"` ContractAddress prototyp.Hash `json:"contractAddress,omitempty" db:"contract_address"` TokenID prototyp.BigInt `json:"tokenId" db:"token_id"` @@ -394,6 +468,7 @@ type TokenIndex struct { type ContractInfo struct { ChainID uint64 `json:"chainId" cbor:"-"` Address string `json:"address" cbor:"-"` + Source string `json:"source" cbor:"-"` Name string `json:"name" cbor:"-"` Type string `json:"type" cbor:"-"` Symbol string `json:"symbol" cbor:"-"` @@ -430,6 +505,7 @@ type ContractInfoExtensions struct { // the token-level metadata. type TokenMetadata struct { TokenID string `json:"tokenId" cbor:"-"` + Source string `json:"source" cbor:"-"` Name string `json:"name" cbor:"-"` Description string `json:"description" cbor:"-"` // url