diff --git a/cmd/assetCollectionService/main.go b/cmd/assetCollectionService/main.go index b7dfc1a09..9d5af4aaa 100644 --- a/cmd/assetCollectionService/main.go +++ b/cmd/assetCollectionService/main.go @@ -170,6 +170,7 @@ func NewAssetScraper(exchange string, secret string, relDB *models.RelDB) source return source.NewJSONReader(exchange, secret) case dia.AyinExchange: return source.NewAyinAssetSource(exchanges[dia.AyinExchange], relDB) +<<<<<<< HEAD case dia.BitflowExchange: return source.NewBitflowAssetSource(exchanges[dia.BitflowExchange], relDB) case dia.VelarExchange: @@ -178,6 +179,10 @@ func NewAssetScraper(exchange string, secret string, relDB *models.RelDB) source return source.NewVelodromeAssetSource(exchanges[dia.AerodromeSlipstreamExchange], relDB) case dia.AerodromeV1Exchange: return source.NewVelodromeAssetSource(exchanges[dia.AerodromeV1Exchange], relDB) +======= + case dia.BifrostExchange: + return source.NewBifrostAssetSource(exchanges[dia.BifrostExchange], relDB) +>>>>>>> cd7e3ff50b351adef5c2999645e18ccd225ead0e default: return nil } diff --git a/cmd/exchange-scrapers/collector/collector.go b/cmd/exchange-scrapers/collector/collector.go index 2ba4439de..a46f5cde6 100644 --- a/cmd/exchange-scrapers/collector/collector.go +++ b/cmd/exchange-scrapers/collector/collector.go @@ -42,8 +42,12 @@ var ( dia.ZenlinkswapExchangeBifrostPolkadot, dia.PearlfiExchangeTestnet, dia.PanCakeSwapExchangeV3, +<<<<<<< HEAD dia.BitflowExchange, dia.VelarExchange, +======= + dia.BifrostExchange, +>>>>>>> cd7e3ff50b351adef5c2999645e18ccd225ead0e } exchange = flag.String("exchange", "", "which exchange") diff --git a/deployments/local/local.env b/deployments/local/local.env index af7104d71..cb37244bb 100644 --- a/deployments/local/local.env +++ b/deployments/local/local.env @@ -8,5 +8,4 @@ export POSTGRES_HOST=localhost export POSTGRES_DB=postgres export REDISURL=localhost:6379 export KAFKAURL=localhost:9094 -export KAFKA_TOPIC_SUFFIX=dia - +export KAFKA_TOPIC_SUFFIX=dia \ No newline at end of file diff --git a/go.mod b/go.mod index 518759008..2410e8e8a 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/diadata-org/diadata -go 1.17 +go 1.22 + +toolchain go1.22.8 require ( github.com/Kucoin/kucoin-go-sdk v1.2.7 @@ -14,7 +16,7 @@ require ( github.com/cosmos/ibc-go/v3 v3.0.0 github.com/cryptwire/go-binance/v2 v2.2.3 github.com/davecgh/go-spew v1.1.1 - github.com/ethereum/go-ethereum v1.10.10 + github.com/ethereum/go-ethereum v1.10.26 github.com/fatih/structs v1.1.0 github.com/gagliardetto/binary v0.7.9 github.com/gagliardetto/gofuzz v1.2.2 @@ -25,41 +27,46 @@ require ( github.com/go-redis/redis v6.15.9+incompatible github.com/go-resty/resty/v2 v2.7.0 github.com/gocolly/colly v1.2.0 + github.com/google/gofuzz v1.2.0 github.com/gorilla/websocket v1.5.0 - github.com/graph-gophers/graphql-go v1.1.0 - github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab + github.com/graph-gophers/graphql-go v1.3.0 + github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c github.com/jackc/pgtype v1.7.0 github.com/jackc/pgx/v4 v4.11.0 + github.com/machinebox/graphql v0.2.2 github.com/mr-tron/base58 v1.2.0 github.com/onflow/cadence v0.15.0 github.com/onflow/flow-go-sdk v0.20.0 github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 github.com/osmosis-labs/osmosis/v6 v6.4.1 + github.com/pierrec/xxHash v0.1.5 github.com/pkg/errors v0.9.1 github.com/portto/solana-go-sdk v1.22.0 github.com/preichenberger/go-coinbasepro/v2 v2.0.5 + github.com/rs/cors v1.8.2 github.com/segmentio/kafka-go v0.4.35 - github.com/shopspring/decimal v1.3.1 + github.com/shopspring/decimal v1.4.0 github.com/sirupsen/logrus v1.9.3 - github.com/status-im/keycard-go v0.0.0-20200402102358-957c09536969 + github.com/status-im/keycard-go v0.2.0 github.com/streamingfast/solana-go v0.5.1-0.20220502224452-432fbe84aee8 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 github.com/tendermint/liquidity v1.5.0 github.com/tendermint/tendermint v0.34.15 github.com/tkanos/gonfig v0.0.0-20181112185242-896f3d81fadf github.com/vincent-petithory/dataurl v1.0.0 github.com/x-cray/logrus-prefixed-formatter v0.5.2 go.uber.org/ratelimit v0.2.0 - golang.org/x/crypto v0.18.0 - golang.org/x/sync v0.1.0 + golang.org/x/crypto v0.28.0 + golang.org/x/sync v0.8.0 google.golang.org/grpc v1.44.0 - google.golang.org/protobuf v1.32.0 + google.golang.org/protobuf v1.34.2 + gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce ) require ( filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect - github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect + github.com/ChainSafe/go-schnorrkel v0.0.0-20210318173838-ccb5cd955283 // indirect github.com/DataDog/zstd v1.4.5 // indirect github.com/GeertJohan/go.rice v1.0.0 // indirect github.com/StackExchange/wmi v1.2.1 // indirect @@ -73,10 +80,11 @@ require ( github.com/bitly/go-simplejson v0.5.0 // indirect github.com/blendle/zapdriver v1.3.1 // indirect github.com/btcsuite/btcd v0.22.0-beta // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect github.com/buger/jsonparser v1.1.1 // indirect github.com/bytedance/sonic v1.10.2 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cheekybits/genny v1.0.0 // indirect github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect github.com/chenzhuoyu/iasm v0.9.1 // indirect @@ -88,13 +96,14 @@ require ( github.com/cosmos/ledger-go v0.9.2 // indirect github.com/daaku/go.zipexe v1.0.0 // indirect github.com/danieljoos/wincred v1.1.2 // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect github.com/dgraph-io/badger/v2 v2.2007.3 // indirect github.com/dgraph-io/ristretto v0.0.3 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.0 // indirect github.com/dvsekhvalnov/jose2go v1.5.0 // indirect - github.com/fatih/color v1.13.0 // indirect - github.com/fsnotify/fsnotify v1.5.1 // indirect + github.com/fatih/color v1.16.0 // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/fxamacker/cbor/v2 v2.2.1-0.20201006223149-25f67fca9803 // indirect github.com/gabriel-vasile/mimetype v1.4.3 // indirect github.com/ghodss/yaml v1.0.0 // indirect @@ -102,19 +111,19 @@ require ( github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.0 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect - github.com/go-ole/go-ole v1.2.5 // indirect + github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.17.0 // indirect - github.com/go-stack/stack v1.8.0 // indirect + github.com/go-stack/stack v1.8.1 // indirect github.com/go-test/deep v1.0.5 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/protobuf v1.3.3 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/golang/snappy v0.0.4 // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/btree v1.0.1 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/uuid v1.3.0 // indirect @@ -129,6 +138,7 @@ require ( github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect github.com/hashicorp/hcl v1.0.0 // indirect + github.com/holiman/uint256 v1.3.1 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect github.com/jackc/pgconn v1.8.1 // indirect @@ -140,17 +150,18 @@ require ( github.com/jmhodges/levigo v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.15.7 // indirect + github.com/klauspost/compress v1.16.0 // indirect github.com/klauspost/cpuid/v2 v2.2.6 // indirect - github.com/kr/pretty v0.3.0 // indirect + github.com/kr/pretty v0.3.1 // indirect github.com/leodido/go-urn v1.3.0 // indirect github.com/libp2p/go-buffer-pool v0.0.2 // indirect github.com/logrusorgru/aurora v2.0.3+incompatible // indirect github.com/machinebox/graphql v0.2.2 // indirect github.com/magiconair/properties v1.8.5 // indirect - github.com/mattn/go-colorable v0.1.12 // indirect + github.com/matryer/is v1.4.1 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.4.3 // indirect @@ -167,13 +178,14 @@ require ( github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect github.com/pierrec/lz4/v4 v4.1.15 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.11.0 // indirect - github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.30.0 // indirect + github.com/prometheus/client_golang v1.12.0 // indirect + github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a // indirect + github.com/prometheus/common v0.32.1 // indirect github.com/prometheus/procfs v0.7.3 // indirect github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect github.com/regen-network/cosmos-proto v0.3.1 // indirect github.com/rivo/uniseg v0.2.0 // indirect + github.com/rjeczalik/notify v0.9.1 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa // indirect github.com/segmentio/fasthash v1.0.3 // indirect @@ -185,6 +197,7 @@ require ( github.com/spf13/viper v1.10.1 // indirect github.com/streamingfast/binary v0.0.0-20210928223119-44fc44e4a0b5 // indirect github.com/streamingfast/logging v0.0.0-20230608130331-f22c91403091 // indirect + github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.2.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect @@ -194,8 +207,8 @@ require ( github.com/tendermint/tm-db v0.6.6 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect - github.com/tklauser/go-sysconf v0.3.7 // indirect - github.com/tklauser/numcpus v0.2.3 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.12 // indirect github.com/x448/float16 v0.8.4 // indirect @@ -206,15 +219,14 @@ require ( go.uber.org/multierr v1.7.0 // indirect go.uber.org/zap v1.21.0 // indirect golang.org/x/arch v0.7.0 // indirect - golang.org/x/net v0.20.0 // indirect - golang.org/x/sys v0.16.0 // indirect - golang.org/x/term v0.16.0 // indirect - golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect + golang.org/x/net v0.24.0 // indirect + golang.org/x/sys v0.26.0 // indirect + golang.org/x/term v0.25.0 // indirect + golang.org/x/text v0.19.0 // indirect + golang.org/x/time v0.5.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect gopkg.in/ini.v1 v1.66.2 // indirect - gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) @@ -225,21 +237,17 @@ require ( github.com/adshao/go-binance/v2 v2.3.6 github.com/antchfx/htmlquery v1.2.5 // indirect github.com/antchfx/xmlquery v1.3.13 // indirect - github.com/deckarep/golang-set v1.7.1 // indirect + github.com/deckarep/golang-set v1.8.0 github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect - github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/kennygrant/sanitize v1.2.4 // indirect github.com/machinebox/graphql v0.2.2 github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect - github.com/prometheus/tsdb v0.10.0 // indirect - github.com/rjeczalik/notify v0.9.2 // indirect github.com/rs/zerolog v1.29.0 // indirect github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d // indirect - github.com/spf13/cobra v1.3.0 // indirect + github.com/spf13/cobra v1.5.0 // indirect github.com/temoto/robotstxt v1.1.2 // indirect github.com/tidwall/gjson v1.17.0 - github.com/tyler-smith/go-bip39 v1.1.0 // indirect github.com/zekroTJA/timedmap v1.4.0 ) diff --git a/go.sum b/go.sum index 178a8c287..494501c95 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,4 @@ -4d63.com/gochecknoglobals v0.0.0-20201008074935-acfc0b28355a/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo= -bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM= -bitbucket.org/creachadair/shell v0.0.6/go.mod h1:8Qqi/cYk7vPnsOePHroKXDJYmb5x7ENhtiFtfZq8K+M= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -11,13 +8,11 @@ cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxK cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= -cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= -cloud.google.com/go v0.60.0/go.mod h1:yw2G51M9IfRboUH61Us8GqCeF1PzPblB823Mn2q2eAU= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= @@ -30,34 +25,25 @@ cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSU cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= 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/bigtable v1.2.0/go.mod h1:JcVAOl45lrTmQfLj7T6TxyMzIN/3FGGcFm+2xVAli2o= 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.0/go.mod h1:afJwI0vaXwAG54kI7A//lP/lSPDkQORQuMkv56TxEPU= -cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/pubsub v1.5.0/go.mod h1:ZEwJccE3z93Z2HWvstpri00jOg7oO4UZDtKhwDwqF0w= -cloud.google.com/go/spanner v1.7.0/go.mod h1:sd3K2gZ9Fd0vMPLXzeCrF6fq4i63Q7aTLW/lBIfBkIk= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= contrib.go.opencensus.io/exporter/stackdriver v0.12.6/go.mod h1:8x999/OcIPy5ivx/wDiV7Gx4D+VUPODf0mWRGRc5kSk= contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -69,7 +55,6 @@ github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMb github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/AlekSi/pointer v1.1.0 h1:SSDMPcXD9jSl8FPy9cRzoRaMJtm9g9ggGTxecRUbQoI= github.com/AlekSi/pointer v1.1.0/go.mod h1:y7BvfRI3wXPWKXEBhU71nbnIEEZX0QTSB2Bj48UJIZE= -github.com/Antonboom/errname v0.1.4/go.mod h1:jRXo3m0E0EuCnK3wbsSVH3X55Z4iTDLl6ZfCxwFj4TM= 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= @@ -88,14 +73,13 @@ github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbt github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= -github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= +github.com/ChainSafe/go-schnorrkel v0.0.0-20210318173838-ccb5cd955283 h1:bCAjrlKrO8Y9biIFMx2ejhXpG1x75mwKqbsL8dx5EOk= +github.com/ChainSafe/go-schnorrkel v0.0.0-20210318173838-ccb5cd955283/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= 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/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0= github.com/GeertJohan/go.rice v1.0.0 h1:KkI6O9uMaQU3VEKaj01ulavtF7o1fWT7+pk/4voiMLQ= github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0= @@ -104,21 +88,13 @@ github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXY github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Kucoin/kucoin-go-sdk v1.2.7 h1:lh74YnCmcswmnvkk0nMeodw+y17UEjMhyEzrIS14SDs= github.com/Kucoin/kucoin-go-sdk v1.2.7/go.mod h1:Wz3fTuM5gIct9chN6H6OBCXbku10XEcAjH5g/FL3wIY= -github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= -github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= 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/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= -github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= github.com/PuerkitoBio/goquery v1.8.0 h1:PJTF7AmFCFKk1N6V6jmKfrNH9tV5pNE6lZMkG0gta/U= github.com/PuerkitoBio/goquery v1.8.0/go.mod h1:ypIiRMtY7COPGk+I/YbZLbxsxn9g5ejnI2HSMtkjZvI= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= @@ -136,7 +112,6 @@ github.com/Workiva/go-datastructures v1.0.52/go.mod h1:Z+F2Rca0qCsVYDS8z7bAGm8f3 github.com/Workiva/go-datastructures v1.0.53 h1:J6Y/52yX10Xc5JjXmGtWoSSxs3mZnGSaq37xZZh7Yig= github.com/Workiva/go-datastructures v1.0.53/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= github.com/Zilliqa/gozilliqa-sdk v1.2.1-0.20201201074141-dd0ecada1be6/go.mod h1:eSYp2T6f0apnuW8TzhV3f6Aff2SE8Dwio++U4ha4yEM= -github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/adlio/schema v1.1.13/go.mod h1:L5Z7tw+7lRK1Fnpi/LT/ooCP1elkXn0krMWBQHUhEDE= github.com/adlio/schema v1.1.14/go.mod h1:hQveFEMiDlG/M9yz9RAajnH5DzT6nAfqOG9YkEQU2pg= github.com/adshao/go-binance/v2 v2.3.6 h1:aGmMczrtscRCGV3WESoWmZXEAL4NwbHQUTzv7J4swC4= @@ -150,27 +125,20 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy 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/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/anaskhan96/soup v1.1.1 h1:Duux/0htS2Va7XLJ9qIakCSey790hg9OFRm2FwlMTy0= github.com/anaskhan96/soup v1.1.1/go.mod h1:pT5vs4HXDwA5y4KQCsKvnkpQd3D+joP7IqpiGskfWW0= github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 h1:MzBOUgng9orim59UnfUTLRjMpd09C5uEVQ6RPGeCaVI= github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129/go.mod h1:rFgpPQZYZ8vdbc+48xibu8ALc3yeyd64IhHS+PU6Yyg= -github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= -github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c= github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/antchfx/htmlquery v1.2.5 h1:1lXnx46/1wtv1E/kzmH8vrfMuUKYgkdDBA9pIdMJnk4= github.com/antchfx/htmlquery v1.2.5/go.mod h1:2MCVBzYVafPBmKbrmwB9F5xdd+IEgRY61ci2oOsOQVw= github.com/antchfx/xmlquery v1.3.13 h1:wqhTv2BN5MzYg9rnPVtZb3IWP8kW6WV/ebAY0FCTI7Y= github.com/antchfx/xmlquery v1.3.13/go.mod h1:3w2RvQvTz+DaT5fSgsELkSJcdNgkmg6vuXDEuhdwsPQ= github.com/antchfx/xpath v1.2.1 h1:qhp4EW6aCOVr5XIkT+l6LJ9ck/JsUH/yyauNgTQkBF8= github.com/antchfx/xpath v1.2.1/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs= -github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= -github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= 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/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= @@ -182,31 +150,16 @@ github.com/armon/go-metrics v0.3.10 h1:FR+drcQStOe+32sYyJYyZ7FIdgoGGBnwLl+flodp8 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/ashanbrown/forbidigo v1.2.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= -github.com/ashanbrown/makezero v0.0.0-20210520155254-b6261585ddde/go.mod h1:oG9Dnez7/ESBqc4EdrdNlryeo7d0KcW1ftXHm7nU/UU= -github.com/avast/retry-go v2.6.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.22.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= 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 v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aws/aws-sdk-go-v2 v1.2.0/go.mod h1:zEQs02YRBw1DjK0PoJv3ygDYOFTre1ejlJWl8FwAuQo= github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= -github.com/aws/aws-sdk-go-v2/config v1.1.1/go.mod h1:0XsVy9lBI/BCXm+2Tuvt39YmdHwS5unDQmxZOYe8F5Y= -github.com/aws/aws-sdk-go-v2/credentials v1.1.1/go.mod h1:mM2iIjwl7LULWtS6JCACyInboHirisUUdkBPoTHMOUo= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.0.2/go.mod h1:3hGg3PpiEjHnrkrlasTfxFqUsZ2GCk/fMUn4CbKgSkM= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.2/go.mod h1:45MfaXZ0cNbeuT0KQ1XJylq8A6+OpVV2E5kvY/Kq+u8= -github.com/aws/aws-sdk-go-v2/service/route53 v1.1.1/go.mod h1:rLiOUrPLW/Er5kRcQ7NkwbjlijluLsrIbu/iyl35RO4= -github.com/aws/aws-sdk-go-v2/service/sso v1.1.1/go.mod h1:SuZJxklHxLAXgLTc1iFXbEWkXs7QRTQpCLGaKIprQW0= -github.com/aws/aws-sdk-go-v2/service/sts v1.1.1/go.mod h1:Wi0EBZwiz/K44YliU0EKxqTCJGUfYTWXrrBwkq736bM= -github.com/aws/smithy-go v1.1.0/go.mod h1:EzMw8dbp/YJL4A5/sbhGddag+NPT7q084agLbB9LgIw= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59 h1:WWB576BN5zNSZc/M9d/10pqEx5VHNhaQ/yOVAkmj5Yo= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= @@ -227,16 +180,12 @@ github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngE github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= -github.com/bkielbasa/cyclop v1.2.0/go.mod h1:qOI0yy6A7dYC4Zgsa72Ppm9kONl0RoIlPbzot9mhmeI= github.com/blendle/zapdriver v1.3.1 h1:C3dydBOWYRiOk+B8X9IVZ5IOe+7cl+tGOexN4QqHfpE= github.com/blendle/zapdriver v1.3.1/go.mod h1:mdXfREi6u5MArG4j9fewC+FGnXaBR+T4Ox4J2u4eHCc= github.com/blockstatecom/go-bitcoind v0.0.0-20180820094557-9dedf42af7c3 h1:bYH0LZaG8o45Btk4KS2Qd5LDdIQpi54U530naACq79E= github.com/blockstatecom/go-bitcoind v0.0.0-20180820094557-9dedf42af7c3/go.mod h1:z6Z4wRBUb8iLJqONl1Pn0y5BsyI4qoL9j/vkhSpl2tg= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= -github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= -github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= -github.com/bombsimon/wsl/v3 v3.3.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= github.com/btcsuite/btcd v0.0.0-20171128150713-2e60448ffcc6/go.mod h1:Dmm/EzmjnCiweXmzRIAiUWCInVmPgjkzgv5k4tVyXiQ= github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= github.com/btcsuite/btcd v0.0.0-20190315201642-aa6e0f35703c/go.mod h1:DrZx5ec/dmnfpw9KyYoQyYo7d0KEvTkk/5M/vbZjAr8= @@ -244,6 +193,8 @@ github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13P 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/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ= +github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190207003914-4c204d697803/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= @@ -263,30 +214,24 @@ github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMU github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/bytecodealliance/wasmtime-go v0.22.0/go.mod h1:q320gUxqyI8yB+ZqRuaJOEnGkAnHh6WtJjMaT2CW4wI= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= -github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM= github.com/bytedance/sonic v1.10.2 h1:GQebETVBxYB7JGWJtLBi07OVzWwt+8dWA00gEVW2ZFE= github.com/bytedance/sonic v1.10.2/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4= -github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34= 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/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= -github.com/cenkalti/backoff/v3 v3.2.2/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= 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/charithe/durationcheck v0.0.8/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= -github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af/go.mod h1:Qjyv4H3//PWVzTeCezG2b9IRn6myJxJSr4TD/xo6ojU= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= @@ -307,7 +252,6 @@ github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5P 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/cloudflare/cloudflare-go v0.14.0/go.mod h1:EnwdgGMaFOruiPZRFSgn+TsQ3hQ7C/YWzIGLeu5c304= 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= @@ -315,28 +259,20 @@ github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XP 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/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cnf/structhash v0.0.0-20180104161610-62a607eb0224 h1:rnCKRrdSBqc061l0CDuYB+7X3w6w8IK/VCSChJXv62g= github.com/cnf/structhash v0.0.0-20180104161610-62a607eb0224/go.mod h1:pCxVEbcm3AMg7ejXyorUXi6HQCzOIBf7zEDVPtw0/U4= 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/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/coinbase/rosetta-sdk-go v0.6.10/go.mod h1:J/JFMsfcePrjJZkwQFLh+hJErkAmdm9Iyy3D5Y0LfXo= github.com/coinbase/rosetta-sdk-go v0.7.0 h1:lmTO/JEpCvZgpbkOITL95rA80CPKb5CtMzLaqF2mCNg= github.com/coinbase/rosetta-sdk-go v0.7.0/go.mod h1:7nD3oBPIiHqhRprqvMgPoGxe/nyq3yftRmpsy29coWE= -github.com/confio/ics23/go v0.0.0-20200817220745-f173e6211efb/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= -github.com/confio/ics23/go v0.6.3/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= github.com/confio/ics23/go v0.6.6/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= github.com/confio/ics23/go v0.7.0 h1:00d2kukk7sPoHWL4zZBZwzxnpA2pec1NPdwbSokJ5w8= github.com/confio/ics23/go v0.7.0/go.mod h1:E45NqnlpxGnpfTWL/xauN7MRwEE28T4Dd4uraToOaKg= -github.com/consensys/bavard v0.1.8-0.20210406032232-f3452dc9b572/go.mod h1:Bpd0/3mZuaj6Sj+PqrmIquiOKy397AKGThQPaGzNXAQ= -github.com/consensys/gnark-crypto v0.4.1-0.20210426202927-39ac3d4b3f1f/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q= github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= github.com/containerd/continuity v0.2.0/go.mod h1:wCYX+dRqZdImhGucXOqTQn05AhX6EUDaGEMUzTFFpLg= 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= @@ -346,7 +282,6 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee 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-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a/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/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= @@ -354,66 +289,50 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.4 h1:n7C2ngKXo7UC9gNyMNLbzqz7Asuf+7Qv4gnX/rOdQ44= github.com/cosmos/btcutil v1.0.4/go.mod h1:Ffqc8Hn6TJUdDgHBwIZLtrLQC1KdJ9jGJl/TvgUaxbU= -github.com/cosmos/cosmos-sdk v0.44.1/go.mod h1:fwQJdw+aECatpTvQTo1tSfHEsxACdZYU80QCZUPnHr4= -github.com/cosmos/cosmos-sdk v0.44.3/go.mod h1:bA3+VenaR/l/vDiYzaiwbWvRPWHMBX2jG0ygiFtiBp0= -github.com/cosmos/cosmos-sdk v0.44.5/go.mod h1:maUA6m2TBxOJZkbwl0eRtEBgTX37kcaiOWU5t1HEGaY= github.com/cosmos/cosmos-sdk v0.45.1 h1:PY79YxPea5qlRLExRnzg8/rT1Scc8GGgRs22p7DX99Q= github.com/cosmos/cosmos-sdk v0.45.1/go.mod h1:XXS/asyCqWNWkx2rW6pSuen+EVcpAFxq6khrhnZgHaQ= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= -github.com/cosmos/iavl v0.15.0-rc3.0.20201009144442-230e9bdf52cd/go.mod h1:3xOIaNNX19p0QrX0VqWa6voPRoJRGGYtny+DH8NEPvE= -github.com/cosmos/iavl v0.15.0-rc5/go.mod h1:WqoPL9yPTQ85QBMT45OOUzPxG/U/JcJoN7uMjgxke/I= -github.com/cosmos/iavl v0.15.3/go.mod h1:OLjQiAQ4fGD2KDZooyJG9yz+p2ao2IAYSbke8mVvSA4= -github.com/cosmos/iavl v0.17.1/go.mod h1:7aisPZK8yCpQdy3PMvKeO+bhq1NwDjUwjzxwwROUxFk= -github.com/cosmos/iavl v0.17.2/go.mod h1:prJoErZFABYZGDHka1R6Oay4z9PrNeFFiMKHDAMOi4w= github.com/cosmos/iavl v0.17.3 h1:s2N819a2olOmiauVa0WAhoIJq9EhSXE9HDBAoR9k+8Y= github.com/cosmos/iavl v0.17.3/go.mod h1:prJoErZFABYZGDHka1R6Oay4z9PrNeFFiMKHDAMOi4w= -github.com/cosmos/ibc-go/v2 v2.0.0-rc0/go.mod h1:z1LmpWwZF8YBeA3w2ibYG53R4HkhQGWjdUew/EfTSDw= -github.com/cosmos/ibc-go/v2 v2.0.0/go.mod h1:n53VhNSUxCtMLysvgyNhwrGHL8OW+318LMjtSmaVe9Q= -github.com/cosmos/ibc-go/v2 v2.0.2/go.mod h1:XUmW7wmubCRhIEAGtMGS+5IjiSSmcAwihoN/yPGd6Kk= github.com/cosmos/ibc-go/v3 v3.0.0 h1:XUNplHVS51Q2gMnTFsFsH9QJ7flsovMamnltKbEgPQ4= github.com/cosmos/ibc-go/v3 v3.0.0/go.mod h1:Mb+1NXiPOLd+CPFlOC6BKeAUaxXlhuWenMmRiUiSmwY= github.com/cosmos/ledger-cosmos-go v0.11.1 h1:9JIYsGnXP613pb2vPjFeMMjBI5lEDsEaF6oYorTy6J4= github.com/cosmos/ledger-cosmos-go v0.11.1/go.mod h1:J8//BsAGTo3OC/vDLjMRFLW6q0WAaXvHnVc7ZmE8iUY= github.com/cosmos/ledger-go v0.9.2 h1:Nnao/dLwaVTk1Q5U9THldpUMMXU94BOTWPddSmVB6pI= github.com/cosmos/ledger-go v0.9.2/go.mod h1:oZJ2hHAZROdlHiwTg4t7kP+GKIIkBT+o6c9QWFanOyI= -github.com/cosmos/relayer v1.0.0/go.mod h1:jIFz7lytxGMCC3mcI9pQ0/IBMMaaNEyTP0OMmzzq0p4= +github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= +github.com/cpuguy83/go-md2man/v2 v2.0.2/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/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cryptwire/go-binance/v2 v2.2.3 h1:WJF0SmODYrBfw13Oog0ch3pg4XjjhA006OYEOu7tcPA= github.com/cryptwire/go-binance/v2 v2.2.3/go.mod h1:e7Z51L/p17P9GRpaf6Hg5gFNZM+6S0NlFyJ+snt1W0w= -github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/daaku/go.zipexe v1.0.0 h1:VSOgZtH418pH9L16hC/JrgSNJbbAL26pj7lmD1+CGdY= github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E= -github.com/daixiang0/gci v0.2.9/go.mod h1:+4dZ7TISfSmqfAGv59ePaHfNzgGtIkHAhhdKggP1JAc= -github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= -github.com/dave/jennifer v1.2.0/go.mod h1:fIb+770HOpJ2fmN9EPPKOqm1vMGhB+TwXKMZhrIygKg= -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/deckarep/golang-set v0.0.0-20180603214616-504e848d77ea/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= -github.com/deckarep/golang-set v1.7.1 h1:SCQV0S6gTtp6itiFrTqI+pfmJ4LN85S1YzhDf9rTHJQ= -github.com/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ= +github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= +github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= +github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= +github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 h1:YLtO71vCjJRCBcrPMtQ9nqBsqpA1m5sE92cU+pd5Mcc= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= -github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= -github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRktEqrX88CvjIw= -github.com/denis-tingajkin/go-header v0.4.2/go.mod h1:eLRHAVXzE5atsKAnNRDB90WHCFFnBUn4RN0nRcs1LJA= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= github.com/dfuse-io/logging v0.0.0-20201110202154-26697de88c79/go.mod h1:V+ED4kT/t/lKtH99JQmKIb0v9WL3VaYkJ36CfHlVECI= github.com/dfuse-io/logging v0.0.0-20210109005628-b97a57253f70/go.mod h1:EoK/8RFbMEteaCaz89uessDTnCWjbbcr+DXcBh4el5o= -github.com/dgraph-io/badger/v2 v2.2007.1/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= github.com/dgraph-io/badger/v2 v2.2007.3 h1:Sl9tQWz92WCbVSe8pj04Tkqlm2boW+KAxd+XSs58SQI= github.com/dgraph-io/badger/v2 v2.2007.3/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= @@ -421,36 +340,28 @@ github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KP github.com/dgraph-io/ristretto v0.0.3 h1:jh22xisGBjrEVnRZ1DVTpBVQm0Xndu8sMl0CWDzSIBI= github.com/dgraph-io/ristretto v0.0.3/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-bitstream v0.0.0-20180413035011-3522498ce2c8/go.mod h1:VMaSuZ+SZcx/wljOQKvp5srsbCiKDEb6K2wC4+PiBmQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/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/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/docker/docker v1.4.2-0.20180625184442-8e610b2b55bf/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dop251/goja v0.0.0-20200721192441-a695b0cdd498/go.mod h1:Mw6PkjjMXWbTj+nnj4s3QPXq1jaT0s5pC0iFD4+BOAA= -github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= -github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= 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/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM= github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/dvyukov/go-fuzz v0.0.0-20200318091601-be3528f3a813/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= 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/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= github.com/edsrzf/mmap-go v0.0.0-20160512033002-935e0e8a636c/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elastic/gosigar v0.8.1-0.20180330100440-37f05ff46ffa/go.mod h1:cdorVVzy1fhmEqmtgqkoE3bYtCfSCkVyjTyCIo22xvs= -github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= -github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25/go.mod h1:hTr8+TLQmkUkgcuh3mcr5fjrT9c64ZzsBCdCEC6UppY= 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= @@ -460,16 +371,11 @@ 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/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= -github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= -github.com/esimonov/ifshort v1.0.2/go.mod h1:yZqNJUrNn20K8Q9n2CrjTKYyVEmX209Hgu+M1LBpeZE= github.com/ethereum/go-ethereum v1.9.9/go.mod h1:a9TqabFudpDu1nucId+k9S8R9whYaHnGBLKFouA5EAo= github.com/ethereum/go-ethereum v1.9.25/go.mod h1:vMkFiYLHI4tgPw4k2j4MHKoovchFE8plZ0M9VMk4/oM= -github.com/ethereum/go-ethereum v1.10.10 h1:Ft2GcLQrr2M89l49g9NoqgNtJZ9AahzMb7N6VXKZy5U= -github.com/ethereum/go-ethereum v1.10.10/go.mod h1:W3yfrFyL9C1pHcwY5hmRHVDaorTiQxhYBkKyu5mEDHw= -github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= +github.com/ethereum/go-ethereum v1.10.26 h1:i/7d9RBBwiXCEuyduBQzJw/mKmnvzsN14jqBmytw72s= +github.com/ethereum/go-ethereum v1.10.26/go.mod h1:EYFyF19u3ezGLD4RqOkLq+ZCXzYbLoNDdZlMt7kyKFg= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51 h1:0JZ+dUmQeA8IIVUMzysrX4/AKuQwWhV2dYQuPZdvdSQ= github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= @@ -481,17 +387,16 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fjl/memsize v0.0.0-20180418122429-ca190fb6ffbc/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlKLDt+S+6hbjVMEW6RGQ7aUf7c= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= @@ -501,13 +406,11 @@ github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2 github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= 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/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/fxamacker/cbor/v2 v2.2.1-0.20201006223149-25f67fca9803 h1:CS/w4nHgzo/lk+H/b5BRnfGRCKw/0DBdRjIRULZWLsg= github.com/fxamacker/cbor/v2 v2.2.1-0.20201006223149-25f67fca9803/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= -github.com/fzipp/gocyclo v0.3.1/go.mod h1:DJHO6AUmbdqj2ET4Z9iArSuwWgYDRryYt2wASxc7x3E= -github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0= github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk= github.com/gagliardetto/binary v0.6.1/go.mod h1:aOfYkc20U0deHaHn/LVZXiqlkDbFAX0FpTlDhsXa0S0= @@ -528,27 +431,14 @@ github.com/gagliardetto/utilz v0.1.1/go.mod h1:b+rGFkRHz3HWJD0RYMzat47JyvbTtpE0i github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= -github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= -github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmCsR2Do= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/gin-gonic/gin v1.7.0/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY= github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= -github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= -github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= -github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= -github.com/go-critic/go-critic v0.5.6/go.mod h1:cVjj0DfqewQVIlIAGexPCaGaZDAqGE29PYDDADIVNEo= -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/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/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= @@ -565,12 +455,10 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-ole/go-ole v1.2.5 h1:t4MGB5xEDZvXI+0rMjjsfBsD7yAgp/s9ZDkL1JndXwY= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= +github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= @@ -583,36 +471,20 @@ github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= -github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-playground/validator/v10 v10.17.0 h1:SmVVlfAOtlZncTxRuinDPomC2DkXJ4E5T9gDA0AIH74= github.com/go-playground/validator/v10 v10.17.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= -github.com/go-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg= github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY= github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= -github.com/go-sourcemap/sourcemap v2.1.3+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.4.1/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 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= +github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/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/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= -github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= -github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= -github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= -github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= -github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= -github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= -github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= -github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= -github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= @@ -626,16 +498,15 @@ github.com/gocolly/colly v1.2.0/go.mod h1:Hof5T3ZswNVsOHYmba1u03W65HDWgpV5HifSuu github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid v3.3.0+incompatible h1:8K4tyRfvU1CYPgJsveYFQMhpFd/wXNM7iK6rR7UHz84= -github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0= github.com/gogo/gateway v1.1.0/go.mod h1:S7rR8FRQyG3QFESeSv4l2WnsyzlCLG0CzBbUUo/mbic= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.3.0 h1:kHL1vqdqWNfATmA0FNMdmZNMyZI1U6O31X4rlIPoBog= +github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= -github.com/golang/geo v0.0.0-20190916061304-5b978397cfec/go.mod h1:QZ0nwyI2jOfgRAoBvP+ab5aRr7c9x7lhGEJrKvBwjWI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/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= @@ -654,7 +525,6 @@ github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71 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.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -674,32 +544,19 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= 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.3-0.20201103224600-674baa8c7fc3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= -github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= -github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= -github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= -github.com/golangci/golangci-lint v1.42.1/go.mod h1:MuInrVlgg2jq4do6XI1jbkErbVHVbwdrLLtGv6p2wPI= -github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= -github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= -github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= -github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= -github.com/golangci/revgrep v0.0.0-20210208091834-cd28932614b5/go.mod h1:LK+zW4MpyytAWQRz0M4xnzEk50lSvqDQKfx304apFkY= -github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/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/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= -github.com/google/certificate-transparency-go v1.1.1/go.mod h1:FDKqPvSXawb2ecErVRrD+nfy23RCzyl7eqVCEmlT1Zs= -github.com/google/flatbuffers v1.11.0/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -712,13 +569,13 @@ 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.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa h1:Q75Upo5UN4JbPFURXZ8nLKYUvF85dyFRop/vQ0Rv+64= github.com/google/gofuzz v1.1.1-0.20200604201612-c04b05f3adfa/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -731,35 +588,25 @@ github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200507031123-427632fa3b1c/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/trillian v1.3.11/go.mod h1:0tPraVHrSDkA3BO6vKX67zgLXs6SsOAbHEivX+9mPgw= -github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.5/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 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= -github.com/gookit/color v1.4.2/go.mod h1:fqRyamkC1W8uxl+lxCQxOT09l/vYfZ+QeiX3rKQHCoQ= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= -github.com/gordonklaus/ineffassign v0.0.0-20210225214923-2e10b2664254/go.mod h1:M9mZEtGIsR1oDaZagNPNG9iq9n2HrhZ17dsXk73V3Lw= -github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= @@ -777,23 +624,12 @@ github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= -github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw= -github.com/gostaticanalysis/analysisutil v0.4.1/go.mod h1:18U/DLpRgIUd459wGxVHE0fRgmo1UgHDcbw7F5idXu0= -github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI= -github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= -github.com/gostaticanalysis/forcetypeassert v0.0.0-20200621232751-01d4955beaa5/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= -github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= github.com/graph-gophers/graphql-go v0.0.0-20191115155744-f33e81362277/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= -github.com/graph-gophers/graphql-go v0.0.0-20201113091052-beb923fada29/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= -github.com/graph-gophers/graphql-go v1.1.0 h1:wVVEPeC5IXelyaQ8UyWKugIyNIFOVF9Kn+gu/1/tXTE= -github.com/graph-gophers/graphql-go v1.1.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= -github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/graph-gophers/graphql-go v1.3.0 h1:Eb9x/q6MFpCLz7jBCiP/WTxjSDrYLR1QY41SORZyNJ0= +github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.2.1/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= @@ -801,8 +637,6 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= 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.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= -github.com/grpc-ecosystem/grpc-gateway v1.14.7/go.mod h1:oYZKL012gGh6LMyg/xA7Q2yq6j8bu0wa+9w14EEthWU= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.0.1 h1:X2vfSnm1WC8HEo0MBHZg2TcuDUHJj6kd1TmEAQncnSA= @@ -818,8 +652,6 @@ github.com/hako/durafmt v0.0.0-20200710122514-c0fb7b4da026/go.mod h1:5Scbynm8dF1 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.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= -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= @@ -831,14 +663,12 @@ github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng 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 v0.16.2/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 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= 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 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/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= @@ -861,57 +691,37 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T 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/hdevalence/ed25519consensus v0.0.0-20210204194344-59a8610d2b87/go.mod h1:XGsKKeXxeRr95aEOgipvluMPlgjr7dGlk9ZTWOjcUcg= github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.1.1/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= -github.com/holiman/uint256 v1.2.0 h1:gpSYcPLWGv4sG43I2mVLiDZCNDh/EpGjSk8tmtxitHM= -github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= +github.com/holiman/uint256 v1.3.1 h1:JfTzmih28bittyHM8z360dCjIA9dbPIBlcTI6lmctQs= +github.com/holiman/uint256 v1.3.1/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= -github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= 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 h1:RfGLP+h3mvisuWEyybxNq5Eft3NWhHLPeUN72kpKZoI= -github.com/huin/goupnp v1.0.2/go.mod h1:0dxJBVBHqTMjIUMkESDTNgOOx/Mw5wYIfyFmdzSamkM= +github.com/huin/goupnp v1.0.3 h1:N8No57ls+MnjlB+JPiCVSOyy/ot7MJTqlo7rn+NYSqQ= +github.com/huin/goupnp v1.0.3/go.mod h1:ZxNlw5WqJj6wSsRK5+YfflQGXYfccj5VgQsMNixHM7Y= 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.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/improbable-eng/grpc-web v0.14.1 h1:NrN4PY71A6tAz2sKDvC5JCauENWp0ykG8Oq1H3cpFvw= github.com/improbable-eng/grpc-web v0.14.1/go.mod h1:zEjGHa8DAlkoOXmswrNvhUGEYQA9UI7DhrGeHR1DMGU= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/influxdata/flux v0.65.1/go.mod h1:J754/zds0vvpfwuq7Gc2wRdVwEodfpCFM7mYlOw2LqY= github.com/influxdata/influxdb v1.2.3-0.20180221223340-01288bdb0883/go.mod h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY= -github.com/influxdata/influxdb v1.8.3/go.mod h1:JugdFhsvvI8gadxOI6noqNeeBHvWNTbfYGtiAn+2jhI= -github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab h1:HqW4xhhynfjrtEiiSGcQUd6vrK23iMam1FO8rI7mwig= github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/influxdata/influxql v1.1.1-0.20200828144457-65d3ef77d385/go.mod h1:gHp9y86a/pxhjJ+zMjNXiQAA197Xk9wLxaz+fGG+kWk= -github.com/influxdata/line-protocol v0.0.0-20180522152040-32c6aa80de5e/go.mod h1:4kt73NQhadE3daL3WhR5EJ/J2ocX0PZzwxQ0gXJ7oFE= -github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= -github.com/influxdata/line-protocol v0.0.0-20210311194329-9aa0e372d097/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= -github.com/influxdata/promql/v2 v2.12.0/go.mod h1:fxOPu+DY0bqCTCECchSRtWfc+0X19ybifQhZoQNF5D8= -github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bSgUQ7q5ZLSO+bKBGqJiCBGAl+9DxyW63zLTujjUlOE= -github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0= -github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po= -github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0= +github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c h1:qSHzRbhzK8RdXOsAdfDgO49TtqC1oZ+acxPrkfTxcCs= +github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= 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= @@ -930,7 +740,6 @@ github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2 h1:JVX6jT/XfzNqIjye47 github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= 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= @@ -967,24 +776,16 @@ github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dv github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jedisct1/go-minisign v0.0.0-20190909160543-45766022959e/go.mod h1:G1CVv03EnqU1wYL2dFwXxW2An0az9JTl/ZsqXQeBlkU= 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/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= -github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4= github.com/jhump/protoreflect v1.9.0/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= -github.com/jingyugao/rowserrcheck v1.1.0/go.mod h1:TOQpc2SLx6huPfoFGK3UOnEG+u02D3C1GeosjupAKCA= -github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= 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/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= -github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= @@ -998,47 +799,30 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jsternberg/zap-logfmt v1.0.0/go.mod h1:uvPs/4X51zdkcm5jXl5SYoN+4RK21K8mysFmDaM/h+o= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= 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/julz/importas v0.0.0-20210419104244-841f0c0fe66d/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= -github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef/go.mod h1:Ct9fl0F6iIOGgxJ5npU/IUOhOhqlVrGjyIZc8/MagT0= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw= github.com/karalabe/usb v0.0.0-20190919080040-51dc0efba356/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= -github.com/karalabe/usb v0.0.0-20211005121534-4c5740d64559/go.mod h1:Od972xHfMJowv7NGVDiWVxk2zxnWgjLlJzE+F4F7AGU= github.com/kennygrant/sanitize v1.2.4 h1:gN25/otpP5vAsO2djbMhF/LQX6R7+O1TB4yv8NzpJ3o= github.com/kennygrant/sanitize v1.2.4/go.mod h1:LGsjYYtgxbetdg5owWB2mpgUL6e2nfw2eObZ0u0qvak= -github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/errcheck v1.6.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/kkdai/bstream v1.0.0/go.mod h1:FDnDOHt5Yx4p3FaHcioFT0QjDOtgUpvjeZqAs+NVZZA= -github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.10.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.15.7 h1:7cgTQxJCU/vy+oP/E3B9RGbQTgbiVzIJWIKOLoAsPok= github.com/klauspost/compress v1.15.7/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= -github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5 h1:2U0HzY8BJ8hVwDKIzp7y4voR9CX/nvcfymLmg2UiOio= -github.com/klauspost/cpuid v0.0.0-20170728055534-ae7887de9fa5/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/klauspost/compress v1.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw1HU4= +github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc= github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= -github.com/klauspost/crc32 v0.0.0-20161016154125-cb6bfca970f6/go.mod h1:+ZoRqAPRLkC4NPOvfYeR5KNOrY6TD+/sAC3HXPZgDYg= -github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= 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= @@ -1048,35 +832,22 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB 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/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kulti/thelper v0.4.0/go.mod h1:vMu2Cizjy/grP+jmsvOFDx1kYP6+PD1lqg4Yu5exl2U= -github.com/kunwardeep/paralleltest v1.0.2/go.mod h1:ZPqNm1fVHPllh5LPVujzbVz1JN2GhLxSfY+oqUsvG30= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= -github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= -github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= -github.com/ldez/gomoddirectives v0.2.2/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= -github.com/ldez/tagliatelle v0.2.0/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= -github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= 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/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= github.com/leodido/go-urn v1.3.0 h1:jX8FDLfW4ThVXctBNZ+3cIWnCSnrACDV73r76dy0aQQ= github.com/leodido/go-urn v1.3.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= -github.com/letsencrypt/pkcs11key/v4 v4.0.0/go.mod h1:EFUvBDay26dErnNb70Nd0/VW3tJiIbETBPTl9ATXQag= -github.com/lib/pq v0.0.0-20180327071824-d34b9ff171c2/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= github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.3/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.4 h1:SO9z7FRPzA03QhHKJrH5BXA6HU1rS4V2nIVrrNC1iYk= @@ -1085,12 +856,10 @@ github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOS github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= 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-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= 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/lucasjones/reggen v0.0.0-20180717132126-cdb49ff09d77/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= -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/machinebox/graphql v0.2.2 h1:dWKpJligYKhYKO5A2gvNhkJdQMNZeChZYyBbrZkBZfo= github.com/machinebox/graphql v0.2.2/go.mod h1:F+kbVMHuwrQ5tYgU9JXlnskM8nOaFxCAEolaQybkjWA= @@ -1098,12 +867,8 @@ github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czP 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-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= -github.com/matoous/godox v0.0.0-20210227103229-6504466cf951/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= -github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= -github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= +github.com/matryer/is v1.4.1 h1:55ehd8zaGABKLXQUe2awZ99BD/PTc2ls+KV/dXphgEQ= +github.com/matryer/is v1.4.1/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= 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= @@ -1113,8 +878,9 @@ github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope 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.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-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= @@ -1128,7 +894,7 @@ github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcME 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.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= @@ -1138,25 +904,16 @@ github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.10 h1:CoZ3S2P7pvtP45xOtBw+/mDL2z0RKI576gSkzRRpdGg= github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= -github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/mattn/go-tty v0.0.3/go.mod h1:ihxohKRERHTVzN+aSVRwACLCeqIoZAWpoICkkvrWyR0= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= -github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= -github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= -github.com/mgechev/revive v1.1.1/go.mod h1:PKqk4L74K6wVNwY2b6fr+9Qqr/3hIsHVfZCJdbvozrY= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI= github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.35/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/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= -github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= @@ -1165,10 +922,8 @@ github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLT 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/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= @@ -1183,11 +938,7 @@ github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGg github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= -github.com/moby/term v0.0.0-20200915141129-7f0af18e79f2/go.mod h1:TjQg8pa4iejrUrjiz0MCtMV38jdMNW4doKSiBrEvCQQ= -github.com/moby/term v0.0.0-20201101162038-25d840ce174a/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -1195,24 +946,16 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= -github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k= github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1 h1:mPMvm6X6tf4w8y7j9YIt6V9jfWhL6QlbEc7CCmeQlWk= github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1/go.mod h1:ye2e/VUEtE2BHE+G/QcKkcLQVAEJoYRFj5VUOQatCRE= -github.com/mozilla/scribe v0.0.0-20180711195314-fb71baf557c1/go.mod h1:FIczTrinKo8VaLxe6PWTPEXRXDIHz2QAwiaBaP5/4a8= -github.com/mozilla/tls-observatory v0.0.0-20210609171429-7bc42856d2e5/go.mod h1:FUqVoUPHSEdDR0MnFM3Dh8AU0pZHLXUD127SAJGER/s= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= -github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= 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/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= -github.com/mwitkow/go-proto-validators v0.2.0/go.mod h1:ZfA1hW+UH/2ZHOWvQ3HnQaU0DtnpXu850MZiy+YUgcc= github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= -github.com/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c= 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= @@ -1228,15 +971,10 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= github.com/near/borsh-go v0.3.1-0.20210831082424-4377deff6791/go.mod h1:NeMochZp7jN/pYFuxLkrZtmLqbADmnp/y1+/dL+AsyQ= -github.com/near/borsh-go v0.3.2-0.20220516180422-1ff87d108454/go.mod h1:NeMochZp7jN/pYFuxLkrZtmLqbADmnp/y1+/dL+AsyQ= github.com/neilotoole/errgroup v0.1.5/go.mod h1:Q2nLGf+594h0CLBs/Mbg6qOr7GtqDK7C2S41udRnToE= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/nishanths/exhaustive v0.2.3/go.mod h1:bhIX678Nx8inLM9PbpvK1yv6oGtoP8BfaIeMzgBNKvc= -github.com/nishanths/predeclared v0.0.0-20190419143655-18a43bb90ffc/go.mod h1:62PewwiQTlm/7Rj+cxVYqZvDIUc+JjZq6GHAC1fsObQ= github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= -github.com/nishanths/predeclared v0.2.1/go.mod h1:HvkGJcA3naj4lOwnFXFDkFxVtSqQMB9sbB1usJ+xjQE= github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E= github.com/nnn-gif/keyring v1.0.0 h1:vw75XxoBi90eYK3XhvO3++iL+hdm1zBczVvs579zmMk= github.com/nnn-gif/keyring v1.0.0/go.mod h1:wes/FrByc8j7lFOAGLGSNEg8f/PaI3cgTBqhFkHUrPk= @@ -1249,7 +987,6 @@ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn 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/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onflow/cadence v0.15.0 h1:CqvXDUTnN8W34lsrpPSxnw7aOioaABUGppC2hiYhkHQ= @@ -1262,37 +999,16 @@ github.com/onflow/flow/protobuf/go/flow v0.1.9 h1:ugK6/9K4AkMxqPbCvQzbbV24AH50Oz github.com/onflow/flow/protobuf/go/flow v0.1.9/go.mod h1:kRugbzZjwQqvevJhrnnCFMJZNmoSJmxlKt6hTGXZojM= 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.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.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/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= -github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk= -github.com/onsi/ginkgo/v2 v2.3.0/go.mod h1:Eew0uilEqZmIEZr8JrvYlvOM7Rr6xzTmMV8AyFNU9d0= -github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo= -github.com/onsi/ginkgo/v2 v2.5.0/go.mod h1:Luc4sArBICYCS8THh8v3i3i5CuSZO+RaQRaJoeNwomw= -github.com/onsi/ginkgo/v2 v2.7.0/go.mod h1:yjiuMwPokqY1XauOgju45q3sJt6VzQ/Fict1LFVcsAo= -github.com/onsi/ginkgo/v2 v2.8.1/go.mod h1:N1/NbDngAFcSLdyZ+/aYTYGSlq9qMCS/cNKGJjy+csc= -github.com/onsi/ginkgo/v2 v2.9.0/go.mod h1:4xkjoL/tZv4SMWeww56BU5kAt19mVB47gTWxmrTcxyk= -github.com/onsi/ginkgo/v2 v2.9.1/go.mod h1:FEcmzVcCHl+4o9bQZVab+4dC9+j+91t2FHSzmGAPfuo= 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.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= -github.com/onsi/gomega v1.21.1/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc= -github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ1tuM= -github.com/onsi/gomega v1.24.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= -github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= -github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= -github.com/onsi/gomega v1.27.1/go.mod h1:aHX5xOykVYzWOV4WqQy0sy8BQptgukenXpCXfadcIAw= -github.com/onsi/gomega v1.27.3/go.mod h1:5vG284IBtfDAmDyrK+eGyZmUgUlmi+Wngqo557cZ6Gw= github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E= github.com/onsi/gomega v1.27.4/go.mod h1:riYq/GJKh8hhoM01HN6Vmuy93AarCXCBGpvFDK3q3fQ= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88= @@ -1300,17 +1016,13 @@ github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWEr github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= -github.com/opencontainers/runc v1.0.3/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= 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.0.3-0.20180606204148-bd9c31933947/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= @@ -1320,8 +1032,6 @@ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnh github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= -github.com/ory/dockertest/v3 v3.6.2/go.mod h1:EFLcVUOl8qCwp9NyDAcCDtq/QviLtYswW/VbWzUnTNE= -github.com/osmosis-labs/bech32-ibc v0.2.0-rc2/go.mod h1:0JCaioRNOVUiw7c3MngmKACnumaQ2sjPenXCnwxCttI= github.com/osmosis-labs/osmosis/v6 v6.4.1 h1:ujdqijmytHyALEEW4G80SrCCJtcGydhaeBOuzOiDmu4= github.com/osmosis-labs/osmosis/v6 v6.4.1/go.mod h1:MHMaO/uSurpZ2GAgWrvN14kCKwq350XuZV+sgZdgrhU= github.com/otiai10/copy v1.6.0 h1:IinKAryFFuPONZ7cm6T6E2QX/vcJwSnlaA5lfoaXIiQ= @@ -1334,43 +1044,36 @@ github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIw github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/paulbellamy/ratecounter v0.2.0/go.mod h1:Hfx1hDpSGoqxkVVpBi/IlYD7kChlfo5C6hzIHwPqfFE= 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.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= 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/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= -github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= -github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4/v4 v4.1.15 h1:MO0/ucJhngq7299dKLwIMtgTfbkoSPF6AoMYDd8Q4q0= github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pierrec/xxHash v0.1.5 h1:n/jBpwTHiER4xYvK3/CdPVnLDPchj8eTJFFLUb4QHBo= +github.com/pierrec/xxHash v0.1.5/go.mod h1:w2waW5Zoa/Wc4Yqe0wgrIYAGKqRMf7czn2HNKXmuL+I= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= -github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5/go.mod h1:eCbImbZ95eXtAUIbLAuAVnBnwf83mjf6QIVH8SHYwqQ= 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/polyfloyd/go-errorlint v0.0.0-20210722154253-910bb7978349/go.mod h1:wi9BfjxjF/bwiZ701TzmfKu6UKC357IOAtNr0Td0Lvw= github.com/portto/solana-go-sdk v1.22.0 h1:WVmAXyw/sAXIk64wC/q8R86Y4FvyIJgYwr2e01GeXPs= github.com/portto/solana-go-sdk v1.22.0/go.mod h1:CZfIfBqsf50c3wZi78YwlAjsbL7MsLXIarGYhC6hmhQ= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= @@ -1385,20 +1088,21 @@ github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeD 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.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= -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.0 h1:C+UIj/QWtmqY13Arb8kwMt5j34/0Z2iKamrJ+ryC0Gg= +github.com/prometheus/client_golang v1.12.0/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= 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/client_model v0.2.1-0.20210607210712-147c58e9608a h1:CmF68hwI0XsOQ5UwlBopMi2Ow4Pbg32akc4KIVCOm+Y= +github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= 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= @@ -1406,8 +1110,9 @@ github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16 github.com/prometheus/common v0.15.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.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -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/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= 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= @@ -1420,19 +1125,8 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 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 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/prometheus/tsdb v0.10.0 h1:If5rVCMTp6W2SiRAQFlbpJNgVlgMEd+U2GZckwK38ic= -github.com/prometheus/tsdb v0.10.0/go.mod h1:oi49uRhEe9dPUTlS3JRZOwJuVi6tmh10QSgwXEyGCt4= -github.com/pseudomuto/protoc-gen-doc v1.3.2/go.mod h1:y5+P6n3iGrbKG+9O04V5ld71in3v/bX88wUwgt+U8EA= -github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= -github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= -github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8/go.mod h1:KsAh3x0e7Fkpgs+Q9pNLS5XpFSvYCEVl5gP9Pp1xp30= -github.com/quasilyte/go-ruleguard v0.3.4/go.mod h1:57FZgMnoo6jqxkYKmVj5Fc8vOt0rVzoE/UNAmFFIPqA= -github.com/quasilyte/go-ruleguard/dsl v0.3.0/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/go-ruleguard/dsl v0.3.2/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mod h1:7JTjp89EGyU1d6XfBiXihJNG37wB2VRkd125Q1u7Plc= -github.com/quasilyte/go-ruleguard/rules v0.0.0-20210203162857-b223e0831f88/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= -github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -1442,25 +1136,23 @@ github.com/regen-network/cosmos-proto v0.3.1 h1:rV7iM4SSFAagvy8RiyhiACbWEGotmqzy github.com/regen-network/cosmos-proto v0.3.1/go.mod h1:jO0sVX6a1B36nmE8C9xBFXpNwWejXC7QqCOnH3O0+YM= github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= -github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE= github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= -github.com/rjeczalik/notify v0.9.2 h1:MiTWrPj55mNDHEiIX5YUSKefw/+lCQVoAFmD6oQm5w8= -github.com/rjeczalik/notify v0.9.2/go.mod h1:aErll2f0sUX9PXZnVNyeiObbmTlk5jnMoCa4QEjJeqM= github.com/robertkrimen/otto v0.0.0-20170205013659-6a77b7cbc37d/go.mod h1:xvqspoSXJTIpemEonrMDFq6XzwHYYgToXWj5eRX1OtY= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.6.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.8.0 h1:P2KMzcFwrPoSjkF1WLRPsp3UMLyql8L4v9hQpVeK5so= github.com/rs/cors v1.8.0/go.mod h1:EBwu+T5AvHOcXwvZIkQFjUN6s8Czyqw12GL/Y0tUyRM= +github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= +github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= @@ -1469,48 +1161,36 @@ github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThC github.com/rs/zerolog v1.23.0/go.mod h1:6c7hFfxPOy7TacJc4Fcdi24/J0NKYGzjG8FWRI916Qo= github.com/rs/zerolog v1.29.0 h1:Zes4hju04hjbvkVkOhdl2HpZa+0PmVwigmo8XoORE5w= github.com/rs/zerolog v1.29.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= 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 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryancurrah/gomodguard v1.2.3/go.mod h1:rYbA/4Tg5c54mV1sv4sQTP5WOPBcoLtnBZ7/TEhXAbg= -github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0KCtEdgEkHwDbigdA= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= github.com/sagikazarmark/crypt v0.1.0/go.mod h1:B/mN0msZuINBtQ1zZLEQcegFJJf9vnYIR88KRMEuODE= -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/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d h1:hrujxIzL1woJ7AwssoOcM/tq5JjjG2yYOc8odClEiXA= github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d/go.mod h1:uugorj2VCxiV1x+LzaIdVa9b4S4qGAcH6cbhh4qVxOU= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/sanposhiho/wastedassign/v2 v2.0.6/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= -github.com/sasha-s/go-deadlock v0.2.0/go.mod h1:StQn567HiB1fF2yJ44N9au7wOhrPS3iZqiDbRupzT10= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4= github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/schollz/progressbar/v3 v3.7.6/go.mod h1:Y9mmL2knZj3LUaBDyBEzFdPrymIr08hnlFMZmfxwbx4= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= -github.com/securego/gosec/v2 v2.8.1/go.mod h1:pUmsq6+VyFEElJMUX+QB3p3LWNHXg1R3xh2ssVJPs8Q= github.com/segmentio/fasthash v1.0.2/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= github.com/segmentio/fasthash v1.0.3 h1:EI9+KE1EwvMLBWwjpRDc+fEM+prwxDYbslddQGtrmhM= github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY= -github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= -github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/segmentio/kafka-go v0.4.35 h1:TAsQ7q1SjS39PcFvU0zDJhCuVAxHomy7xOAfbdSuhzs= github.com/segmentio/kafka-go v0.4.35/go.mod h1:GAjxBQJdQMB5zfNA21AhpaqOB2Mu+w3De4ni3Gbm8y0= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shirou/gopsutil/v3 v3.21.7/go.mod h1:RGl11Y7XMTQPmHh8F0ayC6haKNBgH4PXMJuTAcMOlz4= 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.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -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/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= +github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= @@ -1524,15 +1204,12 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1 github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sonatard/noctx v0.0.1/go.mod h1:9D2D/EoULe8Yy2joDHJj7bv3sZoq9AaSb8B4lqBjiZI= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= -github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.0.1-0.20190317074736-539464a789e9/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= @@ -1544,8 +1221,8 @@ github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tL github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= -github.com/spf13/cobra v1.3.0 h1:R7cSvGu+Vv+qX0gW5R/85dx2kmmJT5z5NM8ifdYjdn0= -github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= +github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= +github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= 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= @@ -1559,13 +1236,11 @@ github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5q github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/spf13/viper v1.9.0/go.mod h1:+i6ajR7OX2XaiBkrcZJFK21htRk7eDeLg7+O6bhUPP4= -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/ssgreg/nlreturn/v2 v2.1.0/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= -github.com/status-im/keycard-go v0.0.0-20200402102358-957c09536969 h1:Oo2KZNP70KE0+IUJSidPj/BFS/RXNHmKIJOdckzml2E= -github.com/status-im/keycard-go v0.0.0-20200402102358-957c09536969/go.mod h1:RZLeN1LMWmRsyYjvAu+I6Dm9QmlDaIIt+Y+4Kd7Tp+Q= +github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= +github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= 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= @@ -1587,11 +1262,9 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.3.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.1/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= @@ -1602,10 +1275,9 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= @@ -1613,7 +1285,6 @@ github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d/go.mod h1:9OrXJ github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= -github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/temoto/robotstxt v1.1.2 h1:W2pOjSJ6SWvldyEuiFXNxz3xZ8aiWX5LbfDiOFd7Fxg= @@ -1626,15 +1297,9 @@ github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2l github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= github.com/tendermint/liquidity v1.5.0 h1:jpDUsF8eOi9q9jmuqnNS5NJwor7U6A6YaECg3Eca7jk= github.com/tendermint/liquidity v1.5.0/go.mod h1:wBQtB3BnTevEOD3NY6e23d3P/tfdzjYbqLPzvhHqlRk= -github.com/tendermint/tendermint v0.34.0-rc4/go.mod h1:yotsojf2C1QBOw4dZrTcxbyxmPUrT4hNuOQWX9XUwB4= -github.com/tendermint/tendermint v0.34.0-rc6/go.mod h1:ugzyZO5foutZImv0Iyx/gOFCX6mjJTgbLHTwi17VDVg= -github.com/tendermint/tendermint v0.34.0/go.mod h1:Aj3PIipBFSNO21r+Lq3TtzQ+uKESxkbA3yo/INM4QwQ= -github.com/tendermint/tendermint v0.34.13/go.mod h1:6RVVRBqwtKhA+H59APKumO+B7Nye4QXSFc6+TYxAxCI= github.com/tendermint/tendermint v0.34.14/go.mod h1:FrwVm3TvsVicI9Z7FlucHV6Znfd5KBc/Lpp69cCwtk0= github.com/tendermint/tendermint v0.34.15 h1:45OEYTBD/TL0YFn8MF7yYJvC5iubyN4AbEjctPi1UqA= github.com/tendermint/tendermint v0.34.15/go.mod h1:/7EDAw02rD7GT8syC317cX9ZhZTCdaFVvYjU8W+yJSs= -github.com/tendermint/tm-db v0.6.2/go.mod h1:GYtQ67SUvATOcoY8/+x6ylk8Qo02BQyLrAs+yAcLvGI= -github.com/tendermint/tm-db v0.6.3/go.mod h1:lfA1dL9/Y/Y8wwyPp2NMLyn5P5Ptr/gvDFNWtrCWSf8= github.com/tendermint/tm-db v0.6.4/go.mod h1:dptYhIpJ2M5kUuenLr+Yyf3zQOv1SgBZcl8/BmWlMBw= github.com/tendermint/tm-db v0.6.6 h1:EzhaOfR0bdKyATqcd5PNeyeq8r+V4bRPHBfyFdD9kGM= github.com/tendermint/tm-db v0.6.6/go.mod h1:wP8d49A85B7/erz/r4YbKssKw6ylsO/hKtFk7E1aWZI= @@ -1642,7 +1307,6 @@ github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf/go.mod h1:M8agBzg github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125/go.mod h1:M8agBzgqHIhgj7wEn9/0hJUZcrvt9VY+Ln+S1I5Mha0= github.com/test-go/testify v1.1.4 h1:Tf9lntrKUMHiXQ07qBScBTSA0dhYQlu83hswqelv1iE= github.com/test-go/testify v1.1.4/go.mod h1:rH7cfJo/47vWGdi4GPj16x3/t1xGOj2YxzmNQzk2ghU= -github.com/tetafro/godot v1.4.9/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= github.com/tidwall/gjson v1.6.3/go.mod h1:BaHyNc5bjzYkPqgLq7mdVzeiRtULKULXLgZFKsxEHI0= github.com/tidwall/gjson v1.6.7/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI= github.com/tidwall/gjson v1.9.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= @@ -1657,87 +1321,62 @@ github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhV github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/sjson v1.1.4/go.mod h1:wXpKXu8CtDjKAZ+3DrKY5ROCorDFahq8l0tey/Lx1fg= -github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= -github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tkanos/gonfig v0.0.0-20181112185242-896f3d81fadf h1:sepG1nOX39NO8y8E+sYMkkKSDxiAfZ0XL0l0+vogwBw= github.com/tkanos/gonfig v0.0.0-20181112185242-896f3d81fadf/go.mod h1:DaZPBuToMc2eezA9R9nDAnmS2RMwL7yEa5YD36ESQdI= -github.com/tklauser/go-sysconf v0.3.5/go.mod h1:MkWzOF4RMCshBAMXuhXJs64Rte09mITnppBXY/rYEFI= -github.com/tklauser/go-sysconf v0.3.7 h1:HT7h4+536gjqeq1ZIJPgOl1rg1XFatQGVZWp7Py53eg= -github.com/tklauser/go-sysconf v0.3.7/go.mod h1:JZIdXh4RmBvZDBZ41ld2bGxRV3n4daiiqA3skYhAoQ4= -github.com/tklauser/numcpus v0.2.2/go.mod h1:x3qojaO3uyYt0i56EW/VUYs7uBvdl2fkfZFu0T9wgjM= -github.com/tklauser/numcpus v0.2.3 h1:nQ0QYpiritP6ViFhrKYsiv6VVxOpum2Gks5GhnJbS/8= -github.com/tklauser/numcpus v0.2.3/go.mod h1:vpEPS/JC+oZGGQ/My/vJnNsvMDQL6PwOqt8dsCw5j+E= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tmc/grpc-websocket-proxy v0.0.0-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/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tomarrell/wrapcheck/v2 v2.3.0/go.mod h1:aF5rnkdtqNWP/gC7vPUO5pKsB0Oac2FDTQP4F+dpZMU= -github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= -github.com/tommy-muehle/go-mnd/v2 v2.4.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/tyler-smith/go-bip39 v1.0.1-0.20181017060643-dbb3b84ba2ef/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= +github.com/tyler-smith/go-bip39 v1.0.2 h1:+t3w+KwLXO6154GNJY+qUtIxLTmFjfUmpguQT1OlOT8= github.com/tyler-smith/go-bip39 v1.0.2/go.mod h1:sJ5fKU0s6JVwZjjcUEX2zFOnvq0ASQ2K9Zr6cf67kNs= -github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= -github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= 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/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= -github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= -github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI= -github.com/uudashr/gocognit v1.0.5/go.mod h1:wgYz0mitoKOTysqxTDMOUXg+Jb5SvtihkfmugIZYpEA= +github.com/urfave/cli/v2 v2.10.2 h1:x3p8awjp/2arX+Nl/G2040AZpOCHS/eMJJ1/a+mye4Y= +github.com/urfave/cli/v2 v2.10.2/go.mod h1:f8iq5LtQ/bLxafbdBSLPPNsgaW0l/2fYYEHhAyPlwvo= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.16.0/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA= 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/quicktemplate v1.6.3/go.mod h1:fwPzK2fHuYEODzJ9pkw0ipCPNHZ2tD5KW4lOuSdPKzY= -github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= -github.com/viki-org/dnscache v0.0.0-20130720023526-c70c1f23c5d8/go.mod h1:dniwbG03GafCjFohMDmz6Zc6oCuiqgH6tGNyXTkHzXE= github.com/vincent-petithory/dataurl v1.0.0 h1:cXw+kPto8NLuJtlMsI152irrVw9fRDX8AbShPRpg2CI= github.com/vincent-petithory/dataurl v1.0.0/go.mod h1:FHafX5vmDzyP+1CQATJn7WFKc9CvnvxyvZy6I1MrG/U= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/vmihailenco/msgpack/v5 v5.1.4/go.mod h1:C5gboKD0TJPqWDTVTtrQNfRbiBwHZGo8UTqP/9/XvLI= github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= -github.com/willf/bitset v1.1.3/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= 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 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg= 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/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/xdg/scram v1.0.5 h1:TuS0RFmt5Is5qm9Tm2SoD89OPqe4IRiFtyFY4iwWXsw= github.com/xdg/scram v1.0.5/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= github.com/xdg/stringprep v1.0.3 h1:cmL5Enob4W83ti/ZHuZLuKD/xqJfus4fVPwE+/BDm+4= github.com/xdg/stringprep v1.0.3/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v0.0.0-20180616005107-d6fb6747feb6/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= -github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= +github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/ybbus/jsonrpc v2.1.2+incompatible h1:V4mkE9qhbDQ92/MLMIhlhMSbz8jNXdagC3xBR5NDwaQ= github.com/ybbus/jsonrpc v2.1.2+incompatible/go.mod h1:XJrh1eMSzdIYFbM08flv0wp5G35eRniyeGut1z+LSiE= -github.com/yeya24/promlinter v0.1.0/go.mod h1:rs5vtZzeBHqqMwXqFScncpCF6u06lezhZepno9AB1Oc= -github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= -github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= -github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zekroTJA/timedmap v1.4.0 h1:NIkLScX6kMzkzFP7kCIkkgKYdooAJ1itkMbJODX2WPU= github.com/zekroTJA/timedmap v1.4.0/go.mod h1:Go4uPxMN1Wjl5IgO6HYD1tM9IQhkYEVqcrrdsI4ljXo= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= @@ -1745,20 +1384,14 @@ github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= 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/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= -go.etcd.io/etcd v0.0.0-20200513171258-e048e166ab9c/go.mod h1:xCI7ZzBfRuGgBXyXO6yfWfDmlWd35khcWpUa4L0xI/k= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.mozilla.org/mozlog v0.0.0-20170222151521-4bb13139d403/go.mod h1:jHoPAGnDrCy6kaI2tAze5Prf0Nr0w/oNkROt2lw3n3o= 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= @@ -1783,7 +1416,6 @@ go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= 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.4.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 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= @@ -1801,15 +1433,12 @@ go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.7.0 h1:pskyeJh/3AmoQ8CPE95vxHLqp1G1GfGNXTmcl9NEKTc= golang.org/x/arch v0.7.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/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-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/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-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -1827,29 +1456,21 @@ golang.org/x/crypto v0.0.0-20200117160349-530e935923ad/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/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-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= 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-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-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/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-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= -golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= -golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw= +golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U= 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= @@ -1894,12 +1515,6 @@ 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.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= -golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/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= @@ -1924,8 +1539,6 @@ golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLL 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-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191003171128-d98b1b443823/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= @@ -1939,7 +1552,6 @@ golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/ 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-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -1951,42 +1563,24 @@ golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= -golang.org/x/net v0.0.0-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-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-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211005001312-d4b1ae081e3b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220706163947-c90051bbdb60/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2003,13 +1597,10 @@ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ 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/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2017,14 +1608,12 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/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-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2080,15 +1669,12 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200824131525-c12d262b63d8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200828194041-157a740278f4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/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= @@ -2106,15 +1692,11 @@ golang.org/x/sys v0.0.0-20210223095934-7937bea0104d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/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-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2123,51 +1705,35 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210903071746-97244b99971b/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-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-20211004093028-2c5d950f24ef/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-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-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/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-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= -golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= -golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= +golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= +golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2177,40 +1743,25 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= 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-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= -golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= 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-20190110163146-51295c7ec13a/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-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/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-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/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= @@ -2218,14 +1769,11 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/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-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/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-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/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= @@ -2241,10 +1789,8 @@ golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapK 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= -golang.org/x/tools v0.0.0-20200108203644-89082a384178/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117012304-6edc0a871e69/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -2254,12 +1800,7 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -2267,36 +1808,17 @@ golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200601175630-2caf76543d99/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200622203043-20e05c1c8ffa/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200630154851-b2d8b0336632/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200706234117-b22de6825cf7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200812195022-5ae4c3c160a0/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= 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-20200831203904-5a2aa26beb65/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201002184944-ecd9fd270d5d/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201028025901-8cd080b735b3/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201114224030-61ea331ec02b/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201118003311-bd56c0adb394/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-20201230224404-63754364767c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210101214203-2dba1e4ea05c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210104081019-d8d6ddbec6ee/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.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= @@ -2305,12 +1827,6 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= -golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/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= @@ -2318,11 +1834,8 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= -gonum.org/v1/gonum v0.6.0/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= gonum.org/v1/gonum v0.6.1/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= -gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= @@ -2355,13 +1868,7 @@ google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtuk 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.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/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= 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.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2372,10 +1879,8 @@ google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= 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-20181107211654-5fc9ac540362/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -2385,12 +1890,10 @@ google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200108215221-bd8f9a0ef82f/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= @@ -2408,8 +1911,6 @@ google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200626011028-ee7919e894b5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200707001353-8e8330bf89df/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -2417,7 +1918,6 @@ google.golang.org/genproto v0.0.0-20200831141814-d751682dd103/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201111145450-ac7456db90a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201119123407-9b1e624d6bc4/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -2440,20 +1940,9 @@ google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKr google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/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 h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -2464,13 +1953,11 @@ google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ij 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.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= -google.golang.org/grpc v1.29.0/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= 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= @@ -2488,9 +1975,7 @@ google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQ google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.44.0 h1:weqSxi/TMs1SqFRMHCtBgXRs8k3X39QIDEZ0pRcttUg= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= @@ -2509,10 +1994,8 @@ google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX7 google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= 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= @@ -2522,7 +2005,6 @@ gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8 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/cheggaaa/pb.v1 v1.0.28/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= @@ -2542,7 +2024,6 @@ 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/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 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= 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= @@ -2551,8 +2032,6 @@ 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.6/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7/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= @@ -2562,7 +2041,6 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= 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= @@ -2571,12 +2049,6 @@ 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= -honnef.co/go/tools v0.2.1/go.mod h1:lPVVZ2BS5TfnjLyizF7o7hv7j9/L+8cZY2hLyjP9cGY= -mvdan.cc/gofumpt v0.1.1/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48= -mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= -mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= -mvdan.cc/unparam v0.0.0-20210104141923-aac4ce9116a7/go.mod h1:hBpJkZE8H/sb+VRFvw2+rBpHNsTBcvSpk61hr8mzXZE= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= diff --git a/pkg/dia/Config.go b/pkg/dia/Config.go index 96fb4fec1..e9db8ece5 100644 --- a/pkg/dia/Config.go +++ b/pkg/dia/Config.go @@ -126,6 +126,7 @@ const ( VelarExchange = "Velar" AerodromeSlipstreamExchange = "AerodromeSlipstream" AerodromeV1Exchange = "AerodromeV1" + BifrostExchange = "Bifrost" // FinageForex = "FinageForex" ) diff --git a/pkg/dia/helpers/bifrost-helper/client.go b/pkg/dia/helpers/bifrost-helper/client.go new file mode 100644 index 000000000..d112b3608 --- /dev/null +++ b/pkg/dia/helpers/bifrost-helper/client.go @@ -0,0 +1,157 @@ +package bifrosthelper + +import ( + "bytes" + "encoding/json" + "fmt" + "net/http" + "strconv" + "strings" + "sync" + "time" + "unicode/utf8" + + "github.com/diadata-org/diadata/pkg/dia" + "github.com/diadata-org/diadata/pkg/utils" + "github.com/sirupsen/logrus" +) + +const ( + AssetAddressURI = "AssetRegistry:Assets" + Blockchain = "Bifrost" + ExchangeName = "Bifrost" + GetAssetsPath = "assets" +) + +type BifrostClient struct { + logger *logrus.Entry + sleepBetweenCalls time.Duration + debug bool +} + +func NewBifrostClient(logger *logrus.Entry, sleepBetweenCalls time.Duration, isDebug bool) *BifrostClient { + return &BifrostClient{ + logger: logger, + sleepBetweenCalls: sleepBetweenCalls, + debug: isDebug, + } +} +func (c *BifrostClient) waiting() { + time.Sleep(c.sleepBetweenCalls) +} +func (c *BifrostClient) GetAssetAllAssets() ([]BifrostAssetMetadata, error) { + var wg sync.WaitGroup + wg.Add(1) + + apiURL := utils.Getenv(strings.ToUpper(ExchangeName)+"_API_URL", "http://localhost:3000/bifrost/v1") + getAllAssetsURI := fmt.Sprintf("%s/%s", apiURL, GetAssetsPath) + c.logger.Infof("Getting assets from: %s", getAllAssetsURI) + var assets []BifrostAssetMetadata + var err error + go func() { + defer wg.Done() + response, err := http.Get(getAllAssetsURI) + if err != nil { + c.logger.WithError(err).Error("Failed to get assets") + return + } + defer response.Body.Close() + if response.StatusCode != http.StatusOK { + c.logger.Errorf("Failed to get assets, status code: %d", response.StatusCode) + err = fmt.Errorf("failed to get assets, status code: %d", response.StatusCode) + return + } + if json.NewDecoder(response.Body).Decode(&assets) != nil { + c.logger.Error("Failed to decode assets") + err = fmt.Errorf("failed to decode assets") + } + }() + wg.Wait() + if err != nil { + return nil, err + } + return assets, nil +} +func (c *BifrostClient) GetAllPoolAssets() ([]BifrostPoolMetadata, error) { + + var wg sync.WaitGroup + wg.Add(1) + + apiURL := utils.Getenv(strings.ToUpper(ExchangeName)+"_API_URL", "http://localhost:3000/bifrost/v1") + getAllPoolAssetsURI := fmt.Sprintf("%s/%s", apiURL, "pools") + c.logger.Infof("Getting pool assets from: %s", getAllPoolAssetsURI) + var pools []BifrostPoolMetadata + var err error + go func() { + defer wg.Done() + response, err := http.Get(getAllPoolAssetsURI) + if err != nil { + c.logger.WithError(err).Error("Failed to get token pools") + return + } + defer response.Body.Close() + c.logger.Infof("Response: %d", response.Body) + if response.StatusCode != http.StatusOK { + c.logger.Errorf("Failed to get token pools, status code: %d", response.StatusCode) + err = fmt.Errorf("failed to get token pools, status code: %d", response.StatusCode) + return + } + if json.NewDecoder(response.Body).Decode(&pools) != nil { + c.logger.Error("Failed to decode token pools") + err = fmt.Errorf("failed to decode token pools") + } + }() + wg.Wait() + if err != nil { + return nil, err + } + return pools, nil +} +func (c *BifrostClient) ScrapAssets() ([]*dia.Asset, error) { + bifrostAssets, err := c.GetAssetAllAssets() + if err != nil { + c.logger.WithError(err).Error("Failed to get assets") + return nil, err + } + diaAssets := c.parseAssets(bifrostAssets) + c.logger.Infof("Scraped (%d) assets.", len(diaAssets)) + return diaAssets, nil +} +func (c *BifrostClient) parseAsset(bifrostAsset BifrostAssetMetadata) *dia.Asset { + decimals, err := strconv.ParseUint(bifrostAsset.Decimals, 10, 8) + if err != nil { + c.logger.WithError(err).Errorf("Failed to parse decimals: %s", bifrostAsset.Decimals) + return nil + } + return &dia.Asset{ + Name: bifrostAsset.Name, + Symbol: bifrostAsset.Symbol, + Decimals: uint8(decimals), + Blockchain: Blockchain, + Address: strings.ToLower(bifrostAsset.AssetKey), + } +} +func (c *BifrostClient) parseAssets(bifrostAssets []BifrostAssetMetadata) []*dia.Asset { + diaAssets := make([]*dia.Asset, 0, len(bifrostAssets)) + for _, asset := range bifrostAssets { + diaAssets = append(diaAssets, c.parseAsset(asset)) + } + return diaAssets +} +func (c *BifrostClient) sanitizeToUTF8(data []byte) string { + var buf bytes.Buffer + for len(data) > 0 { + r, size := utf8.DecodeRune(data) + if r == utf8.RuneError && size == 1 { + data = data[size:] + continue + } + if r == 0 { + data = data[size:] + continue + } + buf.WriteRune(r) + data = data[size:] + } + return buf.String() +} diff --git a/pkg/dia/helpers/bifrost-helper/model.go b/pkg/dia/helpers/bifrost-helper/model.go new file mode 100644 index 000000000..357570686 --- /dev/null +++ b/pkg/dia/helpers/bifrost-helper/model.go @@ -0,0 +1,32 @@ +package bifrosthelper + +const ( + DefaultRefreshDelay = 400 // millisec + DefaultSleepBetweenContractCalls = 300 // millisec + DefaultEventsLimit = 100 + DefaultSwapContractsLimit = 100 +) + +type BifrostAssetMetadata struct { + AssetKey string `json:"assetKey"` + Name string `json:"name"` + Symbol string `json:"symbol"` + Decimals string `json:"decimals"` + MinimalBalance string `json:"minimalBalance"` +} + +type BifrostPoolMetadata struct { + PoolId string `json:"poolId"` + PoolAsset map[string]string `json:"poolAsset"` + Assets []string `json:"assets"` + Precisions []string `json:"precisions"` + MintFee string `json:"mintFee"` + SwapFee string `json:"swapFee"` + RedeemFee string `json:"redeemFee"` + TotalSupply string `json:"totalSupply"` + Balances []string `json:"balances"` + FeeRecipient string `json:"feeRecipient"` + AccountId string `json:"accountId"` + YieldRecipient string `json:"yieldRecipient"` + Precision string `json:"precision"` +} diff --git a/pkg/dia/helpers/substrate-helper/event.go b/pkg/dia/helpers/substrate-helper/event.go new file mode 100644 index 000000000..cfff9e884 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/event.go @@ -0,0 +1,94 @@ +package substratehelper + +import ( + "errors" + "fmt" + + gsrpc "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/registry/parser" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/registry/retriever" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/registry/state" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" + + "github.com/sirupsen/logrus" +) + +type SubstrateEventHelper struct { + logger *logrus.Entry + API *gsrpc.SubstrateAPI +} + +func NewSubstrateEventHelper(nodeURL string, logger *logrus.Entry) (*SubstrateEventHelper, error) { + api, err := gsrpc.NewSubstrateAPI(nodeURL) + if err != nil { + return nil, fmt.Errorf("failed to connect to Substrate node: %v", err) + } + return &SubstrateEventHelper{API: api, logger: logger}, nil +} + +func (s *SubstrateEventHelper) ListenForSpecificBlock(blockNumber uint64, callback func([]*parser.Event, uint64)) error { + blockHash, err := s.API.RPC.Chain.GetBlockHash(blockNumber) + if err != nil { + message := fmt.Sprintf("Failed to fetch block hash: %v", err) + s.logger.Errorf(message, err) + return errors.New(message) + } + + events, err := s.DecodeEvents(blockHash) + if err != nil { + message := fmt.Sprintf("Failed to decode events: %v", err) + s.logger.Errorf(message, err) + return err + } + + callback(events, blockNumber) + + return nil +} + +func (s *SubstrateEventHelper) DecodeEvents(blockHash types.Hash) ([]*parser.Event, error) { + r, err := retriever.NewDefaultEventRetriever(state.NewEventProvider(s.API.RPC.State), s.API.RPC.State) + + if err != nil { + return nil, fmt.Errorf("couldn't create event retriever: %s", err) + } + + events, err := r.GetEvents(blockHash) + + if err != nil { + return nil, fmt.Errorf("couldn't retrieve events for block hash %d: %s", blockHash, err) + } + + s.logger.Infof("Found %d events\n", len(events)) + + return events, nil +} + +// ListenForNewBlocks listens for new blocks and continuously decodes events. +func (s *SubstrateEventHelper) ListenForNewBlocks(callback func([]*parser.Event, uint64)) error { + sub, err := s.API.RPC.Chain.SubscribeNewHeads() + if err != nil { + return fmt.Errorf("failed to subscribe to new heads: %v", err) + } + s.logger.Info("Listening for new blocks...") + + for { + head := <-sub.Chan() + blockNumber := uint64(head.Number) + blockHash, err := s.API.RPC.Chain.GetBlockHash(blockNumber) + if err != nil { + s.logger.Errorf("Failed to fetch block hash: %v\n", err) + continue + } + s.logger.Infof("\nNew block detected! Block number: %v, Block hash: %v\n", head.Number, blockHash.Hex()) + + events, err := s.DecodeEvents(blockHash) + if err != nil { + s.logger.Errorf("Failed to decode events: %v\n", err) + continue + } + + callback(events, blockNumber) + } +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/README.md b/pkg/dia/helpers/substrate-helper/gsrpc/README.md new file mode 100644 index 000000000..001270737 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/README.md @@ -0,0 +1,55 @@ +# Go Substrate RPC Client (GSRPC) + +[![License: Apache v2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) +[![GoDoc Reference](https://godoc.org/github.com/centrifuge/go-substrate-rpc-client?status.svg)](https://godoc.org/github.com/centrifuge/go-substrate-rpc-client) +[![Build Status](https://travis-ci.com/centrifuge/go-substrate-rpc-client.svg?branch=master)](https://travis-ci.com/centrifuge/go-substrate-rpc-client) +[![codecov](https://codecov.io/gh/centrifuge/go-substrate-rpc-client/branch/master/graph/badge.svg)](https://codecov.io/gh/centrifuge/go-substrate-rpc-client) +[![Go Report Card](https://goreportcard.com/badge/github.com/centrifuge/go-substrate-rpc-client)](https://goreportcard.com/report/github.com/centrifuge/go-substrate-rpc-client) + +This is a modified version of centrifuge/go-substrate-rpc-client + +Substrate RPC client in Go. It provides APIs and types around Polkadot and any Substrate-based chain RPC calls. +This client is modeled after [polkadot-js/api](https://github.com/polkadot-js/api). + +## State + +This package is feature complete, but it is relatively new and might still contain bugs. We advise to use it with caution in production. It comes without any warranties, please refer to LICENCE for details. + +## Documentation & Usage Examples + +Please refer to https://godoc.org/github.com/centrifuge/go-substrate-rpc-client + +### Usage test examples of Dynamic Parsing of events & extrinsics + +[Registry docs](registry/REGISTRY.md) + +## Contributing + +1. Install dependencies by running `make` +2. Build the project with `go build` +3. Lint `make lint` (you can use `make lint-fix` to automatically fix issues) +4. Run `make run-substrate-docker` to run the Substrate docker container + +### Testing + +We run our tests against a Substrate Docker image. You can choose to run +the tests within a tests-dedicated Docker container or without a container. + +1. `make test-dockerized` + Run tests within a docker container of its own against the Substrate docker container. + +2. `make test` + Run the tests locally against the Substrate docker container. Note that it expects the + Substrate docker container to be up and running to execute the whole test suite properly. + +Visit https://polkadot.js.org/apps for inspection + +**Note**: To use a custom Substrate endpoint, first set the environment variable before running the tests: +`export RPC_URL="http://example.com:9934"` + +### Adding support for new RPC methods + +After adding support for new methods, update the RPC mocks. + +1. Install [mockery](https://github.com/vektra/mockery) +2. Run `go generate ./...` diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/client/client.go b/pkg/dia/helpers/substrate-helper/gsrpc/client/client.go new file mode 100644 index 000000000..175bd8176 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/client/client.go @@ -0,0 +1,114 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package client + +import ( + "context" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/config" + gethrpc "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/codec" +) + +//go:generate mockery --name Client + +type Client interface { + // Call makes the call to RPC method with the provided args + // args must be encoded in the format RPC understands + Call(result interface{}, method string, args ...interface{}) error + + CallContext( + ctx context.Context, + result interface{}, + method string, + args ...interface{}, + ) error + + Subscribe( + ctx context.Context, + namespace, subscribeMethodSuffix, unsubscribeMethodSuffix, + notificationMethodSuffix string, + channel interface{}, + args ...interface{}, + ) (*gethrpc.ClientSubscription, error) + + URL() string + + Close() +} + +type client struct { + gethrpc.Client + + url string +} + +// URL returns the URL the client connects to +func (c client) URL() string { + return c.url +} + +func (c client) Close() { + c.Client.Close() +} + +// Connect connects to the provided url +func Connect(url string) (Client, error) { + ctx, cancel := context.WithTimeout(context.Background(), config.Default().DialTimeout) + defer cancel() + + c, err := gethrpc.DialContext(ctx, url) + if err != nil { + return nil, err + } + cc := client{*c, url} + return &cc, nil +} + +func CallWithBlockHash(c Client, target interface{}, method string, blockHash *types.Hash, args ...interface{}) error { + ctx := context.Background() + + return CallWithBlockHashContext(ctx, c, target, method, blockHash, args...) +} + +func CallWithBlockHashContext( + ctx context.Context, + c Client, + target interface{}, + method string, + blockHash *types.Hash, + args ...interface{}, +) error { + if blockHash == nil { + err := c.CallContext(ctx, target, method, args...) + if err != nil { + return err + } + return nil + } + hexHash, err := codec.Hex(*blockHash) + if err != nil { + return err + } + args = append(args, hexHash) + err = c.CallContext(ctx, target, method, args...) + if err != nil { + return err + } + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/config/config.go b/pkg/dia/helpers/substrate-helper/gsrpc/config/config.go new file mode 100644 index 000000000..61f5d189c --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/config/config.go @@ -0,0 +1,51 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package config + +import ( + "os" + "time" +) + +type Config struct { + RPCURL string + + // Timeouts + DialTimeout time.Duration + SubscribeTimeout time.Duration +} + +// DefaultConfig returns the default config. Default values can be overwritten with env variables, most importantly +// RPC_URL for a custom RPC endpoint. +func Default() Config { + return Config{ + RPCURL: extractDefaultRPCURL(), + DialTimeout: 10 * time.Second, + SubscribeTimeout: 5 * time.Second, + } +} + +// ExtractDefaultRPCURL reads the env variable RPC_URL and returns it. If that variable is unset or empty, +// it will fallback to "ws://127.0.0.1:9944" +func extractDefaultRPCURL() string { + if url, ok := os.LookupEnv("RPC_URL"); ok { + return url + } + + // Fallback + return "ws://127.0.0.1:9944" +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/error/error.go b/pkg/dia/helpers/substrate-helper/gsrpc/error/error.go new file mode 100644 index 000000000..0ea4966cd --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/error/error.go @@ -0,0 +1,26 @@ +package error + +import ( + "fmt" + "strings" +) + +type Error string + +func (e Error) Error() string { + return string(e) +} + +func (e Error) Is(err error) bool { + return strings.Contains(string(e), err.Error()) +} + +func (e Error) Wrap(err error) Error { + return Error(fmt.Errorf("%s: %w", e, err).Error()) +} + +func (e Error) WithMsg(msgFormat string, formatArgs ...any) Error { + msg := fmt.Sprintf(msgFormat, formatArgs...) + + return Error(fmt.Sprintf("%s: %s", e, msg)) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/AUTHORS b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/AUTHORS new file mode 100644 index 000000000..526ea35c2 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/AUTHORS @@ -0,0 +1,369 @@ +# This is the official list of go-ethereum authors for copyright purposes. + +a e r t h +Abel Nieto +Abel Nieto +Adam Babik +Aditya +Adrià Cidre +Afri Schoedon <5chdn@users.noreply.github.com> +Agustin Armellini Fischer +Airead +Alan Chen +Alejandro Isaza +Ales Katona +Alex Leverington +Alex Wu +Alexandre Van de Sande +Ali Hajimirza +am2rican5 +Andrea Franz +Andrey Petrov +Andrey Petrov +ANOTHEL +Antoine Rondelet +Anton Evangelatov +Antonio Salazar Cardozo +Arba Sasmoyo +Armani Ferrante +Armin Braun +Aron Fischer +atsushi-ishibashi +ayeowch +b00ris +bailantaotao +baizhenxuan +Balint Gabor +Bas van Kervel +Benjamin Brent +benma +Benoit Verkindt +bloonfield +Bo +Bo Ye +Bob Glickstein +Brent +Brian Schroeder +Bruno Škvorc +C. Brown +Caesar Chad +Casey Detrio +CDsigma +changhong +Chase Wright +Chen Quan +chenyufeng +Christian Muehlhaeuser +Christoph Jentzsch +cong +Corey Lin <514971757@qq.com> +cpusoft +Crispin Flowerday +croath +cui <523516579@qq.com> +Dan Kinsley +Daniel A. Nagy +Daniel Sloof +Darrel Herbst +Dave Appleton +Dave McGregor +David Huie +Derek Gottfrid +Diego Siqueira +Diep Pham +dipingxian2 <39109351+dipingxian2@users.noreply.github.com> +dm4 +Dmitrij Koniajev +Dmitry Shulyak +Domino Valdano +Domino Valdano +Dragan Milic +dragonvslinux <35779158+dragononcrypto@users.noreply.github.com> +Egon Elbre +Elad +Eli +Elias Naur +Elliot Shepherd +Emil +emile +Enrique Fynn +Enrique Fynn +EOS Classic +Erichin +Ernesto del Toro +Ethan Buchman +ethersphere +Eugene Valeyev +Evangelos Pappas +Evgeny +Evgeny Danilenko <6655321@bk.ru> +evgk +Fabian Vogelsteller +Fabio Barone +Fabio Berger +FaceHo +Felix Lange +Ferenc Szabo +ferhat elmas +Fiisio +Frank Szendzielarz <33515470+FrankSzendzielarz@users.noreply.github.com> +Frank Wang +Franklin +Furkan KAMACI +GagziW +Gary Rong +George Ornbo +Gregg Dourgarian +Guilherme Salgado +Guillaume Ballet +Guillaume Nicolas +GuiltyMorishita +Gus +Gustav Simonsson +Gísli Kristjánsson +Ha ĐANG +HackyMiner +hadv +Hao Bryan Cheng +HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com> +Henning Diedrich +holisticode +Hongbin Mao +Hsien-Tang Kao +Husam Ibrahim <39692071+HusamIbrahim@users.noreply.github.com> +hydai +Hyung-Kyu Hqueue Choi +Ian Macalinao +Ian Norden +Isidoro Ghezzi +Iskander (Alex) Sharipov +Ivan Daniluk +Ivo Georgiev +Jae Kwon +Jamie Pitts +Janos Guljas +Janoš Guljaš +Jason Carver +Javier Peletier +Javier Peletier +Javier Sagredo +Jay +Jay Guo +Jaynti Kanani +Jeff Prestes +Jeff R. Allen +Jeffery Robert Walsh +Jeffrey Wilcke +Jens Agerberg +Jeremy McNevin +Jeremy Schlatter +Jerzy Lasyk +Jia Chenhui +Jim McDonald +jkcomment +Joel Burget +John C. Vernaleo +Johns Beharry +Jonas +Jonathan Brown +JoranHonig +Jordan Krage +Joseph Chow +jtakalai +JU HYEONG PARK +Justin Clark-Casey +Justin Drake +jwasinger +ken10100147 +Kenji Siu +Kenso Trabing +Kenso Trabing +Kevin +kevin.xu +kiel barry +kimmylin <30611210+kimmylin@users.noreply.github.com> +Kitten King <53072918+kittenking@users.noreply.github.com> +knarfeh +Kobi Gurkan +Konrad Feldmeier +Kris Shinn +Kurkó Mihály +Kushagra Sharma +Kwuaint <34888408+kwuaint@users.noreply.github.com> +Kyuntae Ethan Kim +ledgerwatch +Lefteris Karapetsas +Leif Jurvetson +Leo Shklovskii +LeoLiao +Lewis Marshall +lhendre +Liang Ma +Liang Ma +Liang ZOU +libotony +ligi +Lio李欧 +Lorenzo Manacorda +Louis Holbrook +Luca Zeug +Magicking +manlio +Maran Hidskes +Marek Kotewicz +Marius van der Wijden +Mark +Mark Rushakoff +mark.lin +Martin Alex Philip Dawson +Martin Holst Swende +Martin Klepsch +Mats Julian Olsen +Matt K <1036969+mkrump@users.noreply.github.com> +Matthew Di Ferrante +Matthew Halpern +Matthew Halpern +Matthew Wampler-Doty +Max Sistemich +Maximilian Meister +Micah Zoltu +Michael Ruminer +Miguel Mota +Miya Chen +Mohanson +mr_franklin +Mymskmkt <1847234666@qq.com> +Nalin Bhardwaj +Nchinda Nchinda +necaremus +needkane <604476380@qq.com> +Nguyen Kien Trung +Nguyen Sy Thanh Son +Nick Dodson +Nick Johnson +Nicolas Guillaume +Nilesh Trivedi +Nimrod Gutman +njupt-moon <1015041018@njupt.edu.cn> +nkbai +nobody +Noman +Oleg Kovalov +Oli Bye +Osuke +Paul Berg +Paul Litvak +Paulo L F Casaretto +Paweł Bylica +Pedro Pombeiro +Peter Broadhurst +Peter Pratscher +Petr Mikusek +Philip Schlump +Pierre Neter +PilkyuJung +protolambda +Péter Szilágyi +qd-ethan <31876119+qdgogogo@users.noreply.github.com> +Raghav Sood +Ralph Caraveo +Ralph Caraveo III +Ramesh Nair +reinerRubin +rhaps107 +Ricardo Catalinas Jiménez +Ricardo Domingos +Richard Hart +RJ Catalano +Rob +Rob Mulholand +Robert Zaremba +Roc Yu +Runchao Han +Russ Cox +Ryan Schneider +Rémy Roy +S. Matthew English +salanfe +Samuel Marks +Sarlor +Sasuke1964 +Saulius Grigaitis +Sean +Sheldon <11510383@mail.sustc.edu.cn> +Sheldon <374662347@qq.com> +Shintaro Kaneko +Shuai Qi +Shunsuke Watanabe +silence +Simon Jentzsch +slumber1122 +Smilenator +Sorin Neacsu +Stein Dekker +Steve Gattuso +Steve Ruckdashel +Steve Waldman +Steven Roose +stompesi +stormpang +sunxiaojun2014 +tamirms +Taylor Gerring +TColl <38299499+TColl@users.noreply.github.com> +terasum +Thomas Bocek +thomasmodeneis +thumb8432 +Ti Zhou +Tosh Camille +tsarpaul +tzapu +ult-bobonovski +Valentin Wüstholz +Vedhavyas Singareddi +Victor Farazdagi +Victor Tran +Vie +Viktor Trón +Ville Sundell +vim88 +Vincent G +Vincent Serpoul +Vitalik Buterin +Vitaly Bogdanov +Vitaly V +Vivek Anand +Vlad +Vlad Bokov +Vlad Gluhovsky +weimumu <934657014@qq.com> +Wenbiao Zheng +William Setzer +williambannas +Wuxiang +xiekeyang +xincaosu +yahtoo +YaoZengzeng +YH-Zhou +Yohann Léon +Yoichi Hirai +Yondon Fu +YOSHIDA Masanori +yoza +Yusup +Zach +zah +Zahoor Mohamed +Zak Cole +zer0to0ne <36526113+zer0to0ne@users.noreply.github.com> +Zhenguo Niu +Zoe Nolan +Zsolt Felföldi +Łukasz Kurowski +ΞTHΞЯSPHΞЯΞ <{viktor.tron,nagydani,zsfelfoldi}@gmail.com> +Максим Чусовлянов +大彬 +贺鹏飞 +유용환 <33824408+eric-yoo@users.noreply.github.com> diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/COPYING b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/COPYING new file mode 100644 index 000000000..8d66e8772 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/COPYING @@ -0,0 +1,619 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2014 The go-ethereum Authors. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. \ No newline at end of file diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/COPYING.LESSER b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/COPYING.LESSER new file mode 100644 index 000000000..65c5ca88a --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/COPYING.LESSER @@ -0,0 +1,165 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/client.go b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/client.go new file mode 100644 index 000000000..baf746898 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/client.go @@ -0,0 +1,643 @@ +// Copyright 2016 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package rpc + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "net/url" + "reflect" + "strconv" + "sync/atomic" + "time" + + "github.com/ethereum/go-ethereum/log" +) + +var ( + ErrClientQuit = errors.New("client is closed") + ErrNoResult = errors.New("no result in JSON-RPC response") + ErrSubscriptionQueueOverflow = errors.New("subscription queue overflow") + errClientReconnected = errors.New("client reconnected") + errDead = errors.New("connection lost") +) + +const ( + // Timeouts + defaultDialTimeout = 10 * time.Second // used if context has no deadline + subscribeTimeout = 5 * time.Second // overall timeout eth_subscribe, rpc_modules calls +) + +const ( + // Subscriptions are removed when the subscriber cannot keep up. + // + // This can be worked around by supplying a channel with sufficiently sized buffer, + // but this can be inconvenient and hard to explain in the docs. Another issue with + // buffered channels is that the buffer is static even though it might not be needed + // most of the time. + // + // The approach taken here is to maintain a per-subscription linked list buffer + // shrinks on demand. If the buffer reaches the size below, the subscription is + // dropped. + maxClientSubscriptionBuffer = 20000 +) + +// BatchElem is an element in a batch request. +type BatchElem struct { + Method string + Args []interface{} + // The result is unmarshaled into this field. Result must be set to a + // non-nil pointer value of the desired type, otherwise the response will be + // discarded. + Result interface{} + // Error is set if the server returns an error for this request, or if + // unmarshaling into Result fails. It is not set for I/O errors. + Error error +} + +// Client represents a connection to an RPC server. +type Client struct { + idgen func() ID // for subscriptions + isHTTP bool + services *serviceRegistry + + idCounter uint32 + + // This function, if non-nil, is called when the connection is lost. + reconnectFunc reconnectFunc + + // writeConn is used for writing to the connection on the caller's goroutine. It should + // only be accessed outside of dispatch, with the write lock held. The write lock is + // taken by sending on requestOp and released by sending on sendDone. + writeConn jsonWriter + + // for dispatch + close chan struct{} + closing chan struct{} // closed when client is quitting + didClose chan struct{} // closed when client quits + reconnected chan ServerCodec // where write/reconnect sends the new connection + readOp chan readOp // read messages + readErr chan error // errors from read + reqInit chan *requestOp // register response IDs, takes write lock + reqSent chan error // signals write completion, releases write lock + reqTimeout chan *requestOp // removes response IDs when call timeout expires +} + +type reconnectFunc func(ctx context.Context) (ServerCodec, error) + +type clientContextKey struct{} + +type clientConn struct { + codec ServerCodec + handler *handler +} + +func (c *Client) newClientConn(conn ServerCodec) *clientConn { + ctx := context.WithValue(context.Background(), clientContextKey{}, c) + handler := newHandler(ctx, conn, c.idgen, c.services) + return &clientConn{conn, handler} +} + +func (cc *clientConn) close(err error, inflightReq *requestOp) { + cc.handler.close(err, inflightReq) + cc.codec.Close() +} + +type readOp struct { + msgs []*jsonrpcMessage + batch bool +} + +type requestOp struct { + ids []json.RawMessage + err error + resp chan *jsonrpcMessage // receives up to len(ids) responses + sub *ClientSubscription // only set for EthSubscribe requests +} + +func (op *requestOp) wait(ctx context.Context, c *Client) (*jsonrpcMessage, error) { + select { + case <-ctx.Done(): + // Send the timeout to dispatch so it can remove the request IDs. + if !c.isHTTP { + select { + case c.reqTimeout <- op: + case <-c.closing: + } + } + return nil, ctx.Err() + case resp := <-op.resp: + return resp, op.err + } +} + +// Dial creates a new client for the given URL. +// +// The currently supported URL schemes are "http", "https", "ws" and "wss". If rawurl is a +// file name with no URL scheme, a local socket connection is established using UNIX +// domain sockets on supported platforms and named pipes on Windows. If you want to +// configure transport options, use DialHTTP, DialWebsocket or DialIPC instead. +// +// For websocket connections, the origin is set to the local host name. +// +// The client reconnects automatically if the connection is lost. +func Dial(rawurl string) (*Client, error) { + return DialContext(context.Background(), rawurl) +} + +// DialContext creates a new RPC client, just like Dial. +// +// The context is used to cancel or time out the initial connection establishment. It does +// not affect subsequent interactions with the client. +func DialContext(ctx context.Context, rawurl string) (*Client, error) { + u, err := url.Parse(rawurl) + if err != nil { + return nil, err + } + switch u.Scheme { + case "http", "https": + return DialHTTP(rawurl) + case "ws", "wss": + return DialWebsocket(ctx, rawurl, "") + case "stdio": + return DialStdIO(ctx) + case "": + return DialIPC(ctx, rawurl) + default: + return nil, fmt.Errorf("no known transport for URL scheme %q", u.Scheme) + } +} + +// Client retrieves the client from the context, if any. This can be used to perform +// 'reverse calls' in a handler method. +func ClientFromContext(ctx context.Context) (*Client, bool) { + client, ok := ctx.Value(clientContextKey{}).(*Client) + return client, ok +} + +func newClient(initctx context.Context, connect reconnectFunc) (*Client, error) { + conn, err := connect(initctx) + if err != nil { + return nil, err + } + c := initClient(conn, randomIDGenerator(), new(serviceRegistry)) + c.reconnectFunc = connect + return c, nil +} + +func initClient(conn ServerCodec, idgen func() ID, services *serviceRegistry) *Client { + _, isHTTP := conn.(*httpConn) + c := &Client{ + idgen: idgen, + isHTTP: isHTTP, + services: services, + writeConn: conn, + close: make(chan struct{}), + closing: make(chan struct{}), + didClose: make(chan struct{}), + reconnected: make(chan ServerCodec), + readOp: make(chan readOp), + readErr: make(chan error), + reqInit: make(chan *requestOp), + reqSent: make(chan error, 1), + reqTimeout: make(chan *requestOp), + } + if !isHTTP { + go c.dispatch(conn) + } + return c +} + +// RegisterName creates a service for the given receiver type under the given name. When no +// methods on the given receiver match the criteria to be either a RPC method or a +// subscription an error is returned. Otherwise a new service is created and added to the +// service collection this client provides to the server. +func (c *Client) RegisterName(name string, receiver interface{}) error { + return c.services.registerName(name, receiver) +} + +func (c *Client) nextID() json.RawMessage { + id := atomic.AddUint32(&c.idCounter, 1) + return strconv.AppendUint(nil, uint64(id), 10) +} + +// SupportedModules calls the rpc_modules method, retrieving the list of +// APIs that are available on the server. +func (c *Client) SupportedModules() (map[string]string, error) { + var result map[string]string + ctx, cancel := context.WithTimeout(context.Background(), subscribeTimeout) + defer cancel() + err := c.CallContext(ctx, &result, "rpc_modules") + return result, err +} + +// Close closes the client, aborting any in-flight requests. +func (c *Client) Close() { + if c.isHTTP { + return + } + select { + case c.close <- struct{}{}: + <-c.didClose + case <-c.didClose: + } +} + +// Call performs a JSON-RPC call with the given arguments and unmarshals into +// result if no error occurred. +// +// The result must be a pointer so that package json can unmarshal into it. You +// can also pass nil, in which case the result is ignored. +func (c *Client) Call(result interface{}, method string, args ...interface{}) error { + ctx := context.Background() + return c.CallContext(ctx, result, method, args...) +} + +// CallContext performs a JSON-RPC call with the given arguments. If the context is +// canceled before the call has successfully returned, CallContext returns immediately. +// +// The result must be a pointer so that package json can unmarshal into it. You +// can also pass nil, in which case the result is ignored. +func (c *Client) CallContext(ctx context.Context, result interface{}, method string, args ...interface{}) error { + msg, err := c.newMessage(method, args...) + if err != nil { + return err + } + op := &requestOp{ids: []json.RawMessage{msg.ID}, resp: make(chan *jsonrpcMessage, 1)} + + if c.isHTTP { + err = c.sendHTTP(ctx, op, msg) + } else { + err = c.send(ctx, op, msg) + } + if err != nil { + return err + } + + // dispatch has accepted the request and will close the channel when it quits. + switch resp, err := op.wait(ctx, c); { + case err != nil: + return err + case resp.Error != nil: + return resp.Error + case len(resp.Result) == 0: + return ErrNoResult + default: + return json.Unmarshal(resp.Result, &result) + } +} + +// BatchCall sends all given requests as a single batch and waits for the server +// to return a response for all of them. +// +// In contrast to Call, BatchCall only returns I/O errors. Any error specific to +// a request is reported through the Error field of the corresponding BatchElem. +// +// Note that batch calls may not be executed atomically on the server side. +func (c *Client) BatchCall(b []BatchElem) error { + ctx := context.Background() + return c.BatchCallContext(ctx, b) +} + +// BatchCall sends all given requests as a single batch and waits for the server +// to return a response for all of them. The wait duration is bounded by the +// context's deadline. +// +// In contrast to CallContext, BatchCallContext only returns errors that have occurred +// while sending the request. Any error specific to a request is reported through the +// Error field of the corresponding BatchElem. +// +// Note that batch calls may not be executed atomically on the server side. +func (c *Client) BatchCallContext(ctx context.Context, b []BatchElem) error { + msgs := make([]*jsonrpcMessage, len(b)) + op := &requestOp{ + ids: make([]json.RawMessage, len(b)), + resp: make(chan *jsonrpcMessage, len(b)), + } + for i, elem := range b { + msg, err := c.newMessage(elem.Method, elem.Args...) + if err != nil { + return err + } + msgs[i] = msg + op.ids[i] = msg.ID + } + + var err error + if c.isHTTP { + err = c.sendBatchHTTP(ctx, op, msgs) + } else { + err = c.send(ctx, op, msgs) + } + + // Wait for all responses to come back. + for n := 0; n < len(b) && err == nil; n++ { + var resp *jsonrpcMessage + resp, err = op.wait(ctx, c) + if err != nil { + break + } + // Find the element corresponding to this response. + // The element is guaranteed to be present because dispatch + // only sends valid IDs to our channel. + var elem *BatchElem + for i := range msgs { + if bytes.Equal(msgs[i].ID, resp.ID) { + elem = &b[i] + break + } + } + if resp.Error != nil { + elem.Error = resp.Error + continue + } + if len(resp.Result) == 0 { + elem.Error = ErrNoResult + continue + } + elem.Error = json.Unmarshal(resp.Result, elem.Result) + } + return err +} + +// Notify sends a notification, i.e. a method call that doesn't expect a response. +func (c *Client) Notify(ctx context.Context, method string, args ...interface{}) error { + op := new(requestOp) + msg, err := c.newMessage(method, args...) + if err != nil { + return err + } + msg.ID = nil + + if c.isHTTP { + return c.sendHTTP(ctx, op, msg) + } else { + return c.send(ctx, op, msg) + } +} + +// // EthSubscribe registers a subscripion under the "eth" namespace. +// func (c *Client) EthSubscribe(ctx context.Context, channel interface{}, args ...interface{}) (*ClientSubscription, error) { +// return c.Subscribe(ctx, "eth", channel, args...) +// } + +// // ShhSubscribe registers a subscripion under the "shh" namespace. +// func (c *Client) ShhSubscribe(ctx context.Context, channel interface{}, args ...interface{}) (*ClientSubscription, error) { +// return c.Subscribe(ctx, "shh", channel, args...) +// } + +// Subscribe calls the "_subscribe" method with the given arguments, +// registering a subscription. Server notifications for the subscription are +// sent to the given channel. The element type of the channel must match the +// expected type of content returned by the subscription. +// +// The context argument cancels the RPC request that sets up the subscription but has no +// effect on the subscription after Subscribe has returned. +// +// Slow subscribers will be dropped eventually. Client buffers up to 20000 notifications +// before considering the subscriber dead. The subscription Err channel will receive +// ErrSubscriptionQueueOverflow. Use a sufficiently large buffer on the channel or ensure +// that the channel usually has at least one reader to prevent this issue. +func (c *Client) Subscribe(ctx context.Context, namespace, subscribeMethodSuffix, unsubscribeMethodSuffix, + notificationMethodSuffix string, channel interface{}, args ...interface{}) (*ClientSubscription, error) { + // Check type of channel first. + chanVal := reflect.ValueOf(channel) + if chanVal.Kind() != reflect.Chan || chanVal.Type().ChanDir()&reflect.SendDir == 0 { + panic("sixth argument to Subscribe must be a writable channel") + } + if chanVal.IsNil() { + panic("channel given to Subscribe must not be nil") + } + if c.isHTTP { + return nil, ErrNotificationsUnsupported + } + + msg, err := c.newMessage(namespace+"_"+subscribeMethodSuffix, args...) + if err != nil { + return nil, err + } + op := &requestOp{ + ids: []json.RawMessage{msg.ID}, + resp: make(chan *jsonrpcMessage), + sub: newClientSubscription(c, namespace, subscribeMethodSuffix, unsubscribeMethodSuffix, + notificationMethodSuffix, chanVal), + } + + // Send the subscription request. + // The arrival and validity of the response is signaled on sub.quit. + if err := c.send(ctx, op, msg); err != nil { + return nil, err + } + if _, err := op.wait(ctx, c); err != nil { + return nil, err + } + return op.sub, nil +} + +func (c *Client) newMessage(method string, paramsIn ...interface{}) (*jsonrpcMessage, error) { + msg := &jsonrpcMessage{Version: vsn, ID: c.nextID(), Method: method} + if paramsIn != nil { // prevent sending "params":null + var err error + if msg.Params, err = json.Marshal(paramsIn); err != nil { + return nil, err + } + } + return msg, nil +} + +// send registers op with the dispatch loop, then sends msg on the connection. +// if sending fails, op is deregistered. +func (c *Client) send(ctx context.Context, op *requestOp, msg interface{}) error { + select { + case c.reqInit <- op: + err := c.write(ctx, msg) + c.reqSent <- err + return err + case <-ctx.Done(): + // This can happen if the client is overloaded or unable to keep up with + // subscription notifications. + return ctx.Err() + case <-c.closing: + return ErrClientQuit + } +} + +func (c *Client) write(ctx context.Context, msg interface{}) error { + if err := c.checkWriteConn(ctx); err != nil { + return err + } + + if err := c.writeConn.Write(ctx, msg); err != nil { + c.writeConn = nil + return err + } + + return nil +} + +func (c *Client) checkWriteConn(ctx context.Context) error { + // The previous write failed. Try to establish a new connection. + if c.writeConn == nil { + return c.reconnect(ctx) + } + + // Extra check to ensure that connection is not closed. + select { + case <-c.writeConn.Closed(): + return c.reconnect(ctx) + case <-ctx.Done(): + return ctx.Err() + default: + return nil + } +} + +func (c *Client) reconnect(ctx context.Context) error { + if c.reconnectFunc == nil { + return errDead + } + + if _, ok := ctx.Deadline(); !ok { + var cancel func() + ctx, cancel = context.WithTimeout(ctx, defaultDialTimeout) + defer cancel() + } + newconn, err := c.reconnectFunc(ctx) + if err != nil { + log.Trace("RPC client reconnect failed", "err", err) + return err + } + select { + case c.reconnected <- newconn: + c.writeConn = newconn + return nil + case <-c.didClose: + newconn.Close() + return ErrClientQuit + } +} + +// dispatch is the main loop of the client. +// It sends read messages to waiting calls to Call and BatchCall +// and subscription notifications to registered subscriptions. +func (c *Client) dispatch(codec ServerCodec) { + var ( + lastOp *requestOp // tracks last send operation + reqInitLock = c.reqInit // nil while the send lock is held + conn = c.newClientConn(codec) + reading = true + ) + defer func() { + close(c.closing) + if reading { + conn.close(ErrClientQuit, nil) + c.drainRead() + } + close(c.didClose) + }() + + // Spawn the initial read loop. + go c.read(codec) + + for { + select { + case <-c.close: + return + + // Read path: + case op := <-c.readOp: + if op.batch { + conn.handler.handleBatch(op.msgs) + } else { + conn.handler.handleMsg(op.msgs[0]) + } + + case err := <-c.readErr: + conn.handler.log.Debug("RPC connection read error", "err", err) + conn.close(err, lastOp) + reading = false + + // Reconnect: + case newcodec := <-c.reconnected: + log.Debug("RPC client reconnected", "reading", reading, "conn", newcodec.RemoteAddr()) + if reading { + // Wait for the previous read loop to exit. This is a rare case which + // happens if this loop isn't notified in time after the connection breaks. + // In those cases the caller will notice first and reconnect. Closing the + // handler terminates all waiting requests (closing op.resp) except for + // lastOp, which will be transferred to the new handler. + conn.close(errClientReconnected, lastOp) + c.drainRead() + } + go c.read(newcodec) + reading = true + conn = c.newClientConn(newcodec) + // Re-register the in-flight request on the new handler + // because that's where it will be sent. + conn.handler.addRequestOp(lastOp) + + // Send path: + case op := <-reqInitLock: + // Stop listening for further requests until the current one has been sent. + reqInitLock = nil + lastOp = op + conn.handler.addRequestOp(op) + + case err := <-c.reqSent: + if err != nil { + // Remove response handlers for the last send. When the read loop + // goes down, it will signal all other current operations. + conn.handler.removeRequestOp(lastOp) + } + // Let the next request in. + reqInitLock = c.reqInit + lastOp = nil + + case op := <-c.reqTimeout: + conn.handler.removeRequestOp(op) + } + } +} + +// drainRead drops read messages until an error occurs. +func (c *Client) drainRead() { + for { + select { + case <-c.readOp: + case <-c.readErr: + return + } + } +} + +// read decodes RPC messages from a codec, feeding them into dispatch. +func (c *Client) read(codec ServerCodec) { + for { + msgs, batch, err := codec.Read() + if _, ok := err.(*json.SyntaxError); ok { + codec.Write(context.Background(), errorMessage(&parseError{err.Error()})) + } + if err != nil { + c.readErr <- err + return + } + c.readOp <- readOp{msgs, batch} + } +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/constants_unix.go b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/constants_unix.go new file mode 100644 index 000000000..7695221dc --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/constants_unix.go @@ -0,0 +1,21 @@ +// Copyright 2019 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package rpc + +var ( + max_path_size = 108 +) diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/doc.go b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/doc.go new file mode 100644 index 000000000..e5840c32d --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/doc.go @@ -0,0 +1,118 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +/* + +Package rpc implements bi-directional JSON-RPC 2.0 on multiple transports. + +It provides access to the exported methods of an object across a network or other I/O +connection. After creating a server or client instance, objects can be registered to make +them visible as 'services'. Exported methods that follow specific conventions can be +called remotely. It also has support for the publish/subscribe pattern. + +RPC Methods + +Methods that satisfy the following criteria are made available for remote access: + + - method must be exported + - method returns 0, 1 (response or error) or 2 (response and error) values + - method argument(s) must be exported or builtin types + - method returned value(s) must be exported or builtin types + +An example method: + + func (s *CalcService) Add(a, b int) (int, error) + +When the returned error isn't nil the returned integer is ignored and the error is sent +back to the client. Otherwise the returned integer is sent back to the client. + +Optional arguments are supported by accepting pointer values as arguments. E.g. if we want +to do the addition in an optional finite field we can accept a mod argument as pointer +value. + + func (s *CalcService) Add(a, b int, mod *int) (int, error) + +This RPC method can be called with 2 integers and a null value as third argument. In that +case the mod argument will be nil. Or it can be called with 3 integers, in that case mod +will be pointing to the given third argument. Since the optional argument is the last +argument the RPC package will also accept 2 integers as arguments. It will pass the mod +argument as nil to the RPC method. + +The server offers the ServeCodec method which accepts a ServerCodec instance. It will read +requests from the codec, process the request and sends the response back to the client +using the codec. The server can execute requests concurrently. Responses can be sent back +to the client out of order. + +An example server which uses the JSON codec: + + type CalculatorService struct {} + + func (s *CalculatorService) Add(a, b int) int { + return a + b + } + + func (s *CalculatorService) Div(a, b int) (int, error) { + if b == 0 { + return 0, errors.New("divide by zero") + } + return a/b, nil + } + + calculator := new(CalculatorService) + server := NewServer() + server.RegisterName("calculator", calculator") + + l, _ := net.ListenUnix("unix", &net.UnixAddr{Net: "unix", Name: "/tmp/calculator.sock"}) + for { + c, _ := l.AcceptUnix() + codec := v2.NewJSONCodec(c) + go server.ServeCodec(codec, 0) + } + +Subscriptions + +The package also supports the publish subscribe pattern through the use of subscriptions. +A method that is considered eligible for notifications must satisfy the following +criteria: + + - method must be exported + - first method argument type must be context.Context + - method argument(s) must be exported or builtin types + - method must have return types (rpc.Subscription, error) + +An example method: + + func (s *BlockChainService) NewBlocks(ctx context.Context) (rpc.Subscription, error) { + ... + } + +When the service containing the subscription method is registered to the server, for +example under the "blockchain" namespace, a subscription is created by calling the +"blockchain_subscribe" method. + +Subscriptions are deleted when the user sends an unsubscribe request or when the +connection which was used to create the subscription is closed. This can be initiated by +the client and server. The server will close the connection for any write error. + +For more information about subscriptions, see https://github.com/ethereum/go-ethereum/wiki/RPC-PUB-SUB. + +Reverse Calls + +In any method handler, an instance of rpc.Client can be accessed through the +ClientFromContext method. Using this client instance, server-to-client method calls can be +performed on the RPC connection. +*/ +package rpc diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/endpoints.go b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/endpoints.go new file mode 100644 index 000000000..8ca6d4eb0 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/endpoints.go @@ -0,0 +1,102 @@ +// Copyright 2018 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package rpc + +import ( + "net" + + "github.com/ethereum/go-ethereum/log" +) + +// StartHTTPEndpoint starts the HTTP RPC endpoint, configured with cors/vhosts/modules +func StartHTTPEndpoint(endpoint string, apis []API, modules []string, cors []string, vhosts []string, timeouts HTTPTimeouts) (net.Listener, *Server, error) { + // Generate the whitelist based on the allowed modules + whitelist := make(map[string]bool) + for _, module := range modules { + whitelist[module] = true + } + // Register all the APIs exposed by the services + handler := NewServer() + for _, api := range apis { + if whitelist[api.Namespace] || (len(whitelist) == 0 && api.Public) { + if err := handler.RegisterName(api.Namespace, api.Service); err != nil { + return nil, nil, err + } + log.Debug("HTTP registered", "namespace", api.Namespace) + } + } + // All APIs registered, start the HTTP listener + var ( + listener net.Listener + err error + ) + if listener, err = net.Listen("tcp", endpoint); err != nil { + return nil, nil, err + } + go NewHTTPServer(cors, vhosts, timeouts, handler).Serve(listener) + return listener, handler, err +} + +// StartWSEndpoint starts a websocket endpoint +func StartWSEndpoint(endpoint string, apis []API, modules []string, wsOrigins []string, exposeAll bool) (net.Listener, *Server, error) { + + // Generate the whitelist based on the allowed modules + whitelist := make(map[string]bool) + for _, module := range modules { + whitelist[module] = true + } + // Register all the APIs exposed by the services + handler := NewServer() + for _, api := range apis { + if exposeAll || whitelist[api.Namespace] || (len(whitelist) == 0 && api.Public) { + if err := handler.RegisterName(api.Namespace, api.Service); err != nil { + return nil, nil, err + } + log.Debug("WebSocket registered", "service", api.Service, "namespace", api.Namespace) + } + } + // All APIs registered, start the HTTP listener + var ( + listener net.Listener + err error + ) + if listener, err = net.Listen("tcp", endpoint); err != nil { + return nil, nil, err + } + go NewWSServer(wsOrigins, handler).Serve(listener) + return listener, handler, err + +} + +// StartIPCEndpoint starts an IPC endpoint. +func StartIPCEndpoint(ipcEndpoint string, apis []API) (net.Listener, *Server, error) { + // Register all the APIs exposed by the services. + handler := NewServer() + for _, api := range apis { + if err := handler.RegisterName(api.Namespace, api.Service); err != nil { + return nil, nil, err + } + log.Debug("IPC registered", "namespace", api.Namespace) + } + // All APIs registered, start the IPC listener. + listener, err := ipcListen(ipcEndpoint) + if err != nil { + return nil, nil, err + } + go handler.ServeListener(listener) + return listener, handler, nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/errors.go b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/errors.go new file mode 100644 index 000000000..c3aa826cc --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/errors.go @@ -0,0 +1,65 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package rpc + +import "fmt" + +const defaultErrorCode = -32000 + +type methodNotFoundError struct{ method string } + +func (e *methodNotFoundError) ErrorCode() int { return -32601 } + +func (e *methodNotFoundError) Error() string { + return fmt.Sprintf("the method %s does not exist/is not available", e.method) +} + +type subscriptionNotFoundError struct{ namespace, subscription string } + +func (e *subscriptionNotFoundError) ErrorCode() int { return -32601 } + +func (e *subscriptionNotFoundError) Error() string { + return fmt.Sprintf("no %q subscription in %s namespace", e.subscription, e.namespace) +} + +// Invalid JSON was received by the server. +type parseError struct{ message string } + +func (e *parseError) ErrorCode() int { return -32700 } + +func (e *parseError) Error() string { return e.message } + +// received message isn't a valid request +type invalidRequestError struct{ message string } + +func (e *invalidRequestError) ErrorCode() int { return -32600 } + +func (e *invalidRequestError) Error() string { return e.message } + +// received message is invalid +type invalidMessageError struct{ message string } + +func (e *invalidMessageError) ErrorCode() int { return -32700 } + +func (e *invalidMessageError) Error() string { return e.message } + +// unable to decode supplied params, or an invalid number of parameters +type invalidParamsError struct{ message string } + +func (e *invalidParamsError) ErrorCode() int { return -32602 } + +func (e *invalidParamsError) Error() string { return e.message } diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/gzip.go b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/gzip.go new file mode 100644 index 000000000..a14fd09d5 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/gzip.go @@ -0,0 +1,66 @@ +// Copyright 2019 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package rpc + +import ( + "compress/gzip" + "io" + "io/ioutil" + "net/http" + "strings" + "sync" +) + +var gzPool = sync.Pool{ + New: func() interface{} { + w := gzip.NewWriter(ioutil.Discard) + return w + }, +} + +type gzipResponseWriter struct { + io.Writer + http.ResponseWriter +} + +func (w *gzipResponseWriter) WriteHeader(status int) { + w.Header().Del("Content-Length") + w.ResponseWriter.WriteHeader(status) +} + +func (w *gzipResponseWriter) Write(b []byte) (int, error) { + return w.Writer.Write(b) +} + +func newGzipHandler(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if !strings.Contains(r.Header.Get("Accept-Encoding"), "gzip") { + next.ServeHTTP(w, r) + return + } + + w.Header().Set("Content-Encoding", "gzip") + + gz := gzPool.Get().(*gzip.Writer) + defer gzPool.Put(gz) + + gz.Reset(w) + defer gz.Close() + + next.ServeHTTP(&gzipResponseWriter{ResponseWriter: w, Writer: gz}, r) + }) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/handler.go b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/handler.go new file mode 100644 index 000000000..eb1880715 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/handler.go @@ -0,0 +1,401 @@ +// Copyright 2019 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package rpc + +import ( + "context" + "encoding/json" + "fmt" + "reflect" + "strconv" + "sync" + "time" + + "github.com/ethereum/go-ethereum/log" +) + +// handler handles JSON-RPC messages. There is one handler per connection. Note that +// handler is not safe for concurrent use. Message handling never blocks indefinitely +// because RPCs are processed on background goroutines launched by handler. +// +// The entry points for incoming messages are: +// +// h.handleMsg(message) +// h.handleBatch(message) +// +// Outgoing calls use the requestOp struct. Register the request before sending it +// on the connection: +// +// op := &requestOp{ids: ...} +// h.addRequestOp(op) +// +// Now send the request, then wait for the reply to be delivered through handleMsg: +// +// if err := op.wait(...); err != nil { +// h.removeRequestOp(op) // timeout, etc. +// } +// +type handler struct { + reg *serviceRegistry + unsubscribeCb *callback + idgen func() ID // subscription ID generator + respWait map[string]*requestOp // active client requests + clientSubs map[string]*ClientSubscription // active client subscriptions + callWG sync.WaitGroup // pending call goroutines + rootCtx context.Context // canceled by close() + cancelRoot func() // cancel function for rootCtx + conn jsonWriter // where responses will be sent + log log.Logger + allowSubscribe bool + + subLock sync.Mutex + serverSubs map[ID]*Subscription +} + +type callProc struct { + ctx context.Context + notifiers []*Notifier +} + +func newHandler(connCtx context.Context, conn jsonWriter, idgen func() ID, reg *serviceRegistry) *handler { + rootCtx, cancelRoot := context.WithCancel(connCtx) + h := &handler{ + reg: reg, + idgen: idgen, + conn: conn, + respWait: make(map[string]*requestOp), + clientSubs: make(map[string]*ClientSubscription), + rootCtx: rootCtx, + cancelRoot: cancelRoot, + allowSubscribe: true, + serverSubs: make(map[ID]*Subscription), + log: log.Root(), + } + if conn.RemoteAddr() != "" { + h.log = h.log.New("conn", conn.RemoteAddr()) + } + h.unsubscribeCb = newCallback(reflect.Value{}, reflect.ValueOf(h.unsubscribe)) + return h +} + +// handleBatch executes all messages in a batch and returns the responses. +func (h *handler) handleBatch(msgs []*jsonrpcMessage) { + // Emit error response for empty batches: + if len(msgs) == 0 { + h.startCallProc(func(cp *callProc) { + h.conn.Write(cp.ctx, errorMessage(&invalidRequestError{"empty batch"})) + }) + return + } + + // Handle non-call messages first: + calls := make([]*jsonrpcMessage, 0, len(msgs)) + for _, msg := range msgs { + if handled := h.handleImmediate(msg); !handled { + calls = append(calls, msg) + } + } + if len(calls) == 0 { + return + } + // Process calls on a goroutine because they may block indefinitely: + h.startCallProc(func(cp *callProc) { + answers := make([]*jsonrpcMessage, 0, len(msgs)) + for _, msg := range calls { + if answer := h.handleCallMsg(cp, msg); answer != nil { + answers = append(answers, answer) + } + } + h.addSubscriptions(cp.notifiers) + if len(answers) > 0 { + h.conn.Write(cp.ctx, answers) + } + for _, n := range cp.notifiers { + n.activate() + } + }) +} + +// handleMsg handles a single message. +func (h *handler) handleMsg(msg *jsonrpcMessage) { + if ok := h.handleImmediate(msg); ok { + return + } + h.startCallProc(func(cp *callProc) { + answer := h.handleCallMsg(cp, msg) + h.addSubscriptions(cp.notifiers) + if answer != nil { + h.conn.Write(cp.ctx, answer) + } + for _, n := range cp.notifiers { + n.activate() + } + }) +} + +// close cancels all requests except for inflightReq and waits for +// call goroutines to shut down. +func (h *handler) close(err error, inflightReq *requestOp) { + h.cancelAllRequests(err, inflightReq) + h.callWG.Wait() + h.cancelRoot() + h.cancelServerSubscriptions(err) +} + +// addRequestOp registers a request operation. +func (h *handler) addRequestOp(op *requestOp) { + for _, id := range op.ids { + h.respWait[string(id)] = op + } +} + +// removeRequestOps stops waiting for the given request IDs. +func (h *handler) removeRequestOp(op *requestOp) { + for _, id := range op.ids { + delete(h.respWait, string(id)) + } +} + +// cancelAllRequests unblocks and removes pending requests and active subscriptions. +func (h *handler) cancelAllRequests(err error, inflightReq *requestOp) { + didClose := make(map[*requestOp]bool) + if inflightReq != nil { + didClose[inflightReq] = true + } + + for id, op := range h.respWait { + // Remove the op so that later calls will not close op.resp again. + delete(h.respWait, id) + + if !didClose[op] { + op.err = err + close(op.resp) + didClose[op] = true + } + } + for id, sub := range h.clientSubs { + delete(h.clientSubs, id) + sub.quitWithError(err, false) + } +} + +func (h *handler) addSubscriptions(nn []*Notifier) { + h.subLock.Lock() + defer h.subLock.Unlock() + + for _, n := range nn { + if sub := n.takeSubscription(); sub != nil { + h.serverSubs[sub.ID] = sub + } + } +} + +// cancelServerSubscriptions removes all subscriptions and closes their error channels. +func (h *handler) cancelServerSubscriptions(err error) { + h.subLock.Lock() + defer h.subLock.Unlock() + + for id, s := range h.serverSubs { + s.err <- err + close(s.err) + delete(h.serverSubs, id) + } +} + +// startCallProc runs fn in a new goroutine and starts tracking it in the h.calls wait group. +func (h *handler) startCallProc(fn func(*callProc)) { + h.callWG.Add(1) + go func() { + ctx, cancel := context.WithCancel(h.rootCtx) + defer h.callWG.Done() + defer cancel() + fn(&callProc{ctx: ctx}) + }() +} + +// handleImmediate executes non-call messages. It returns false if the message is a +// call or requires a reply. +func (h *handler) handleImmediate(msg *jsonrpcMessage) bool { + start := time.Now() + switch { + case msg.isNotification(): + // TODO find better way to perform this check + // if strings.HasSuffix(msg.Method, notificationMethodSuffix) { + h.handleSubscriptionResult(msg) + return true + // } + // return false + case msg.isResponse(): + h.handleResponse(msg) + h.log.Trace("Handled RPC response", "reqid", idForLog{msg.ID}, "t", time.Since(start)) + return true + default: + return false + } +} + +// handleSubscriptionResult processes subscription notifications. +func (h *handler) handleSubscriptionResult(msg *jsonrpcMessage) { + var result subscriptionResult + if err := json.Unmarshal(msg.Params, &result); err != nil { + h.log.Debug("Dropping invalid subscription message") + return + } + resultID := fmt.Sprint(result.ID) + if h.clientSubs[resultID] != nil { + h.clientSubs[resultID].deliver(result.Result) + } +} + +// handleResponse processes method call responses. +func (h *handler) handleResponse(msg *jsonrpcMessage) { + op := h.respWait[string(msg.ID)] + if op == nil { + h.log.Debug("Unsolicited RPC response", "reqid", idForLog{msg.ID}) + return + } + delete(h.respWait, string(msg.ID)) + // For normal responses, just forward the reply to Call/BatchCall. + if op.sub == nil { + op.resp <- msg + return + } + // For subscription responses, start the subscription if the server + // indicates success. EthSubscribe gets unblocked in either case though + // the op.resp channel. + defer close(op.resp) + if msg.Error != nil { + op.err = msg.Error + return + } + var subID string + if op.err = json.Unmarshal(msg.Result, &subID); op.err == nil { + op.sub.subid = subID + go op.sub.start() + h.clientSubs[op.sub.subid] = op.sub + } +} + +// handleCallMsg executes a call message and returns the answer. +func (h *handler) handleCallMsg(ctx *callProc, msg *jsonrpcMessage) *jsonrpcMessage { + start := time.Now() + switch { + case msg.isNotification(): + h.handleCall(ctx, msg) + h.log.Debug("Served "+msg.Method, "t", time.Since(start)) + return nil + case msg.isCall(): + resp := h.handleCall(ctx, msg) + if resp.Error != nil { + h.log.Warn("Served "+msg.Method, "reqid", idForLog{msg.ID}, "t", time.Since(start), "err", resp.Error.Message) + } else { + h.log.Debug("Served "+msg.Method, "reqid", idForLog{msg.ID}, "t", time.Since(start)) + } + return resp + case msg.hasValidID(): + return msg.errorResponse(&invalidRequestError{"invalid request"}) + default: + return errorMessage(&invalidRequestError{"invalid request"}) + } +} + +// handleCall processes method calls. +func (h *handler) handleCall(cp *callProc, msg *jsonrpcMessage) *jsonrpcMessage { + // if msg.isSubscribe() { + // return h.handleSubscribe(cp, msg) + // } + var callb *callback + // if msg.isUnsubscribe() { + // callb = h.unsubscribeCb + // } else { + callb = h.reg.callback(msg.Method) + // } + if callb == nil { + return msg.errorResponse(&methodNotFoundError{method: msg.Method}) + } + args, err := parsePositionalArguments(msg.Params, callb.argTypes) + if err != nil { + return msg.errorResponse(&invalidParamsError{err.Error()}) + } + + return h.runMethod(cp.ctx, msg, callb, args) +} + +// handleSubscribe processes *_subscribe method calls. +// func (h *handler) handleSubscribe(cp *callProc, msg *jsonrpcMessage) *jsonrpcMessage { +// if !h.allowSubscribe { +// return msg.errorResponse(ErrNotificationsUnsupported) +// } + +// // Subscription method name is first argument. +// name, err := parseSubscriptionName(msg.Params) +// if err != nil { +// return msg.errorResponse(&invalidParamsError{err.Error()}) +// } +// namespace := msg.namespace() +// callb := h.reg.subscription(namespace, name) +// if callb == nil { +// return msg.errorResponse(&subscriptionNotFoundError{namespace, name}) +// } + +// // Parse subscription name arg too, but remove it before calling the callback. +// argTypes := append([]reflect.Type{stringType}, callb.argTypes...) +// args, err := parsePositionalArguments(msg.Params, argTypes) +// if err != nil { +// return msg.errorResponse(&invalidParamsError{err.Error()}) +// } +// args = args[1:] + +// // Install notifier in context so the subscription handler can find it. +// n := &Notifier{h: h, namespace: namespace} +// cp.notifiers = append(cp.notifiers, n) +// ctx := context.WithValue(cp.ctx, notifierKey{}, n) + +// return h.runMethod(ctx, msg, callb, args) +// } + +// runMethod runs the Go callback for an RPC method. +func (h *handler) runMethod(ctx context.Context, msg *jsonrpcMessage, callb *callback, args []reflect.Value) *jsonrpcMessage { + result, err := callb.call(ctx, msg.Method, args) + if err != nil { + return msg.errorResponse(err) + } + return msg.response(result) +} + +// unsubscribe is the callback function for all *_unsubscribe calls. +func (h *handler) unsubscribe(ctx context.Context, id ID) (bool, error) { + h.subLock.Lock() + defer h.subLock.Unlock() + + s := h.serverSubs[id] + if s == nil { + return false, ErrSubscriptionNotFound + } + close(s.err) + delete(h.serverSubs, id) + return true, nil +} + +type idForLog struct{ json.RawMessage } + +func (id idForLog) String() string { + if s, err := strconv.Unquote(string(id.RawMessage)); err == nil { + return s + } + return string(id.RawMessage) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/http.go b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/http.go new file mode 100644 index 000000000..2c0cb5edb --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/http.go @@ -0,0 +1,359 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package rpc + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "io/ioutil" + "mime" + "net" + "net/http" + "strings" + "sync" + "time" + + "github.com/ethereum/go-ethereum/log" + "github.com/rs/cors" +) + +const ( + maxRequestContentLength = 1024 * 1024 * 5 + contentType = "application/json" +) + +// https://www.jsonrpc.org/historical/json-rpc-over-http.html#id13 +var acceptedContentTypes = []string{contentType, "application/json-rpc", "application/jsonrequest"} + +type httpConn struct { + client *http.Client + req *http.Request + closeOnce sync.Once + closed chan interface{} +} + +// httpConn is treated specially by Client. +func (hc *httpConn) Write(context.Context, interface{}) error { + panic("Write called on httpConn") +} + +func (hc *httpConn) RemoteAddr() string { + return hc.req.URL.String() +} + +func (hc *httpConn) Read() ([]*jsonrpcMessage, bool, error) { + <-hc.closed + return nil, false, io.EOF +} + +func (hc *httpConn) Close() { + hc.closeOnce.Do(func() { close(hc.closed) }) +} + +func (hc *httpConn) Closed() <-chan interface{} { + return hc.closed +} + +// HTTPTimeouts represents the configuration params for the HTTP RPC server. +type HTTPTimeouts struct { + // ReadTimeout is the maximum duration for reading the entire + // request, including the body. + // + // Because ReadTimeout does not let Handlers make per-request + // decisions on each request body's acceptable deadline or + // upload rate, most users will prefer to use + // ReadHeaderTimeout. It is valid to use them both. + ReadTimeout time.Duration + + // WriteTimeout is the maximum duration before timing out + // writes of the response. It is reset whenever a new + // request's header is read. Like ReadTimeout, it does not + // let Handlers make decisions on a per-request basis. + WriteTimeout time.Duration + + // IdleTimeout is the maximum amount of time to wait for the + // next request when keep-alives are enabled. If IdleTimeout + // is zero, the value of ReadTimeout is used. If both are + // zero, ReadHeaderTimeout is used. + IdleTimeout time.Duration +} + +// DefaultHTTPTimeouts represents the default timeout values used if further +// configuration is not provided. +var DefaultHTTPTimeouts = HTTPTimeouts{ + ReadTimeout: 30 * time.Second, + WriteTimeout: 30 * time.Second, + IdleTimeout: 120 * time.Second, +} + +// DialHTTPWithClient creates a new RPC client that connects to an RPC server over HTTP +// using the provided HTTP Client. +func DialHTTPWithClient(endpoint string, client *http.Client) (*Client, error) { + req, err := http.NewRequest(http.MethodPost, endpoint, nil) + if err != nil { + return nil, err + } + req.Header.Set("Content-Type", contentType) + req.Header.Set("Accept", contentType) + + initctx := context.Background() + return newClient(initctx, func(context.Context) (ServerCodec, error) { + return &httpConn{client: client, req: req, closed: make(chan interface{})}, nil + }) +} + +// DialHTTP creates a new RPC client that connects to an RPC server over HTTP. +func DialHTTP(endpoint string) (*Client, error) { + return DialHTTPWithClient(endpoint, new(http.Client)) +} + +func (c *Client) sendHTTP(ctx context.Context, op *requestOp, msg interface{}) error { + hc := c.writeConn.(*httpConn) + respBody, err := hc.doRequest(ctx, msg) + if respBody != nil { + defer respBody.Close() + } + + if err != nil { + if respBody != nil { + buf := new(bytes.Buffer) + if _, err2 := buf.ReadFrom(respBody); err2 == nil { + return fmt.Errorf("%v %v", err, buf.String()) + } + } + return err + } + var respmsg jsonrpcMessage + if err := json.NewDecoder(respBody).Decode(&respmsg); err != nil { + return err + } + op.resp <- &respmsg + return nil +} + +func (c *Client) sendBatchHTTP(ctx context.Context, op *requestOp, msgs []*jsonrpcMessage) error { + hc := c.writeConn.(*httpConn) + respBody, err := hc.doRequest(ctx, msgs) + if err != nil { + return err + } + defer respBody.Close() + var respmsgs []jsonrpcMessage + if err := json.NewDecoder(respBody).Decode(&respmsgs); err != nil { + return err + } + for i := 0; i < len(respmsgs); i++ { + op.resp <- &respmsgs[i] + } + return nil +} + +func (hc *httpConn) doRequest(ctx context.Context, msg interface{}) (io.ReadCloser, error) { + body, err := json.Marshal(msg) + if err != nil { + return nil, err + } + req := hc.req.WithContext(ctx) + req.Body = ioutil.NopCloser(bytes.NewReader(body)) + req.ContentLength = int64(len(body)) + + resp, err := hc.client.Do(req) + if err != nil { + return nil, err + } + if resp.StatusCode < 200 || resp.StatusCode >= 300 { + return resp.Body, errors.New(resp.Status) + } + return resp.Body, nil +} + +// httpServerConn turns a HTTP connection into a Conn. +type httpServerConn struct { + io.Reader + io.Writer + r *http.Request +} + +func newHTTPServerConn(r *http.Request, w http.ResponseWriter) ServerCodec { + body := io.LimitReader(r.Body, maxRequestContentLength) + conn := &httpServerConn{Reader: body, Writer: w, r: r} + return NewJSONCodec(conn) +} + +// Close does nothing and always returns nil. +func (t *httpServerConn) Close() error { return nil } + +// RemoteAddr returns the peer address of the underlying connection. +func (t *httpServerConn) RemoteAddr() string { + return t.r.RemoteAddr +} + +// SetWriteDeadline does nothing and always returns nil. +func (t *httpServerConn) SetWriteDeadline(time.Time) error { return nil } + +// NewHTTPServer creates a new HTTP RPC server around an API provider. +// +// Deprecated: Server implements http.Handler +func NewHTTPServer(cors []string, vhosts []string, timeouts HTTPTimeouts, srv http.Handler) *http.Server { + // Wrap the CORS-handler within a host-handler + handler := newCorsHandler(srv, cors) + handler = newVHostHandler(vhosts, handler) + handler = newGzipHandler(handler) + + // Make sure timeout values are meaningful + if timeouts.ReadTimeout < time.Second { + log.Warn("Sanitizing invalid HTTP read timeout", "provided", timeouts.ReadTimeout, "updated", DefaultHTTPTimeouts.ReadTimeout) + timeouts.ReadTimeout = DefaultHTTPTimeouts.ReadTimeout + } + if timeouts.WriteTimeout < time.Second { + log.Warn("Sanitizing invalid HTTP write timeout", "provided", timeouts.WriteTimeout, "updated", DefaultHTTPTimeouts.WriteTimeout) + timeouts.WriteTimeout = DefaultHTTPTimeouts.WriteTimeout + } + if timeouts.IdleTimeout < time.Second { + log.Warn("Sanitizing invalid HTTP idle timeout", "provided", timeouts.IdleTimeout, "updated", DefaultHTTPTimeouts.IdleTimeout) + timeouts.IdleTimeout = DefaultHTTPTimeouts.IdleTimeout + } + // Bundle and start the HTTP server + return &http.Server{ + Handler: handler, + ReadTimeout: timeouts.ReadTimeout, + WriteTimeout: timeouts.WriteTimeout, + IdleTimeout: timeouts.IdleTimeout, + } +} + +// ServeHTTP serves JSON-RPC requests over HTTP. +func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { + // Permit dumb empty requests for remote health-checks (AWS) + if r.Method == http.MethodGet && r.ContentLength == 0 && r.URL.RawQuery == "" { + return + } + if code, err := validateRequest(r); err != nil { + http.Error(w, err.Error(), code) + return + } + // All checks passed, create a codec that reads direct from the request body + // untilEOF and writes the response to w and order the server to process a + // single request. + ctx := r.Context() + ctx = context.WithValue(ctx, "remote", r.RemoteAddr) + ctx = context.WithValue(ctx, "scheme", r.Proto) + ctx = context.WithValue(ctx, "local", r.Host) + if ua := r.Header.Get("User-Agent"); ua != "" { + ctx = context.WithValue(ctx, "User-Agent", ua) + } + if origin := r.Header.Get("Origin"); origin != "" { + ctx = context.WithValue(ctx, "Origin", origin) + } + + w.Header().Set("content-type", contentType) + codec := newHTTPServerConn(r, w) + defer codec.Close() + s.serveSingleRequest(ctx, codec) +} + +// validateRequest returns a non-zero response code and error message if the +// request is invalid. +func validateRequest(r *http.Request) (int, error) { + if r.Method == http.MethodPut || r.Method == http.MethodDelete { + return http.StatusMethodNotAllowed, errors.New("method not allowed") + } + if r.ContentLength > maxRequestContentLength { + err := fmt.Errorf("content length too large (%d>%d)", r.ContentLength, maxRequestContentLength) + return http.StatusRequestEntityTooLarge, err + } + // Allow OPTIONS (regardless of content-type) + if r.Method == http.MethodOptions { + return 0, nil + } + // Check content-type + if mt, _, err := mime.ParseMediaType(r.Header.Get("content-type")); err == nil { + for _, accepted := range acceptedContentTypes { + if accepted == mt { + return 0, nil + } + } + } + // Invalid content-type + err := fmt.Errorf("invalid content type, only %s is supported", contentType) + return http.StatusUnsupportedMediaType, err +} + +func newCorsHandler(srv http.Handler, allowedOrigins []string) http.Handler { + // disable CORS support if user has not specified a custom CORS configuration + if len(allowedOrigins) == 0 { + return srv + } + c := cors.New(cors.Options{ + AllowedOrigins: allowedOrigins, + AllowedMethods: []string{http.MethodPost, http.MethodGet}, + MaxAge: 600, + AllowedHeaders: []string{"*"}, + }) + return c.Handler(srv) +} + +// virtualHostHandler is a handler which validates the Host-header of incoming requests. +// The virtualHostHandler can prevent DNS rebinding attacks, which do not utilize CORS-headers, +// since they do in-domain requests against the RPC api. Instead, we can see on the Host-header +// which domain was used, and validate that against a whitelist. +type virtualHostHandler struct { + vhosts map[string]struct{} + next http.Handler +} + +// ServeHTTP serves JSON-RPC requests over HTTP, implements http.Handler +func (h *virtualHostHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + // if r.Host is not set, we can continue serving since a browser would set the Host header + if r.Host == "" { + h.next.ServeHTTP(w, r) + return + } + host, _, err := net.SplitHostPort(r.Host) + if err != nil { + // Either invalid (too many colons) or no port specified + host = r.Host + } + if ipAddr := net.ParseIP(host); ipAddr != nil { + // It's an IP address, we can serve that + h.next.ServeHTTP(w, r) + return + + } + // Not an ip address, but a hostname. Need to validate + if _, exist := h.vhosts["*"]; exist { + h.next.ServeHTTP(w, r) + return + } + if _, exist := h.vhosts[host]; exist { + h.next.ServeHTTP(w, r) + return + } + http.Error(w, "invalid host specified", http.StatusForbidden) +} + +func newVHostHandler(vhosts []string, next http.Handler) http.Handler { + vhostMap := make(map[string]struct{}) + for _, allowedHost := range vhosts { + vhostMap[strings.ToLower(allowedHost)] = struct{}{} + } + return &virtualHostHandler{vhostMap, next} +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/inproc.go b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/inproc.go new file mode 100644 index 000000000..c4456cfc4 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/inproc.go @@ -0,0 +1,33 @@ +// Copyright 2016 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package rpc + +import ( + "context" + "net" +) + +// DialInProc attaches an in-process connection to the given RPC server. +func DialInProc(handler *Server) *Client { + initctx := context.Background() + c, _ := newClient(initctx, func(context.Context) (ServerCodec, error) { + p1, p2 := net.Pipe() + go handler.ServeCodec(NewJSONCodec(p1), OptionMethodInvocation|OptionSubscriptions) + return NewJSONCodec(p2), nil + }) + return c +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/ipc.go b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/ipc.go new file mode 100644 index 000000000..ad8ce0309 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/ipc.go @@ -0,0 +1,56 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package rpc + +import ( + "context" + "net" + + "github.com/ethereum/go-ethereum/log" + "github.com/ethereum/go-ethereum/p2p/netutil" +) + +// ServeListener accepts connections on l, serving JSON-RPC on them. +func (s *Server) ServeListener(l net.Listener) error { + for { + conn, err := l.Accept() + if netutil.IsTemporaryError(err) { + log.Warn("RPC accept error", "err", err) + continue + } else if err != nil { + return err + } + log.Trace("Accepted RPC connection", "conn", conn.RemoteAddr()) + go s.ServeCodec(NewJSONCodec(conn), OptionMethodInvocation|OptionSubscriptions) + } +} + +// DialIPC create a new IPC client that connects to the given endpoint. On Unix it assumes +// the endpoint is the full path to a unix socket, and Windows the endpoint is an +// identifier for a named pipe. +// +// The context is used for the initial connection establishment. It does not +// affect subsequent interactions with the client. +func DialIPC(ctx context.Context, endpoint string) (*Client, error) { + return newClient(ctx, func(ctx context.Context) (ServerCodec, error) { + conn, err := newIPCConnection(ctx, endpoint) + if err != nil { + return nil, err + } + return NewJSONCodec(conn), err + }) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/ipc_js.go b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/ipc_js.go new file mode 100644 index 000000000..7e7554a76 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/ipc_js.go @@ -0,0 +1,37 @@ +// Copyright 2018 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +// +build js + +package rpc + +import ( + "context" + "errors" + "net" +) + +var errNotSupported = errors.New("rpc: not supported") + +// ipcListen will create a named pipe on the given endpoint. +func ipcListen(endpoint string) (net.Listener, error) { + return nil, errNotSupported +} + +// newIPCConnection will connect to a named pipe with the given endpoint as name. +func newIPCConnection(ctx context.Context, endpoint string) (net.Conn, error) { + return nil, errNotSupported +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/ipc_unix.go b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/ipc_unix.go new file mode 100644 index 000000000..f4690cc0a --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/ipc_unix.go @@ -0,0 +1,54 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris + +package rpc + +import ( + "context" + "fmt" + "net" + "os" + "path/filepath" + + "github.com/ethereum/go-ethereum/log" +) + +// ipcListen will create a Unix socket on the given endpoint. +func ipcListen(endpoint string) (net.Listener, error) { + if len(endpoint) > int(max_path_size) { + log.Warn(fmt.Sprintf("The ipc endpoint is longer than %d characters. ", max_path_size), + "endpoint", endpoint) + } + + // Ensure the IPC path exists and remove any previous leftover + if err := os.MkdirAll(filepath.Dir(endpoint), 0751); err != nil { + return nil, err + } + os.Remove(endpoint) + l, err := net.Listen("unix", endpoint) + if err != nil { + return nil, err + } + os.Chmod(endpoint, 0600) + return l, nil +} + +// newIPCConnection will connect to a Unix socket on the given endpoint. +func newIPCConnection(ctx context.Context, endpoint string) (net.Conn, error) { + return new(net.Dialer).DialContext(ctx, "unix", endpoint) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/ipc_windows.go b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/ipc_windows.go new file mode 100644 index 000000000..ca56a3ce4 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/ipc_windows.go @@ -0,0 +1,48 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +// +build windows + +package rpc + +import ( + "context" + "net" + "time" + + "gopkg.in/natefinch/npipe.v2" +) + +// This is used if the dialing context has no deadline. It is much smaller than the +// defaultDialTimeout because named pipes are local and there is no need to wait so long. +const defaultPipeDialTimeout = 2 * time.Second + +// ipcListen will create a named pipe on the given endpoint. +func ipcListen(endpoint string) (net.Listener, error) { + return npipe.Listen(endpoint) +} + +// newIPCConnection will connect to a named pipe with the given endpoint as name. +func newIPCConnection(ctx context.Context, endpoint string) (net.Conn, error) { + timeout := defaultPipeDialTimeout + if deadline, ok := ctx.Deadline(); ok { + timeout = deadline.Sub(time.Now()) + if timeout < 0 { + timeout = 0 + } + } + return npipe.DialTimeout(endpoint, timeout) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/json.go b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/json.go new file mode 100644 index 000000000..e991363a2 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/json.go @@ -0,0 +1,324 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package rpc + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "reflect" + "strings" + "sync" + "time" +) + +const ( + vsn = "2.0" + serviceMethodSeparator = "_" + + defaultWriteTimeout = 10 * time.Second // used if context has no deadline +) + +var null = json.RawMessage("null") + +type subscriptionResult struct { + ID string `json:"subscription"` + Result json.RawMessage `json:"result,omitempty"` +} + +// A value of this type can be a JSON-RPC request, notification, successful response or +// error response. Which one it is depends on the fields. +type jsonrpcMessage struct { + Version string `json:"jsonrpc,omitempty"` + ID json.RawMessage `json:"id,omitempty"` + Method string `json:"method,omitempty"` + Params json.RawMessage `json:"params,omitempty"` + Error *jsonError `json:"error,omitempty"` + Result json.RawMessage `json:"result,omitempty"` +} + +func (msg *jsonrpcMessage) isNotification() bool { + return msg.ID == nil && msg.Method != "" +} + +func (msg *jsonrpcMessage) isCall() bool { + return msg.hasValidID() && msg.Method != "" +} + +func (msg *jsonrpcMessage) isResponse() bool { + return msg.hasValidID() && msg.Method == "" && msg.Params == nil && (msg.Result != nil || msg.Error != nil) +} + +func (msg *jsonrpcMessage) hasValidID() bool { + return len(msg.ID) > 0 && msg.ID[0] != '{' && msg.ID[0] != '[' +} + +func (msg *jsonrpcMessage) namespace() string { + elem := strings.SplitN(msg.Method, serviceMethodSeparator, 2) + return elem[0] +} + +func (msg *jsonrpcMessage) String() string { + b, _ := json.Marshal(msg) + return string(b) +} + +func (msg *jsonrpcMessage) errorResponse(err error) *jsonrpcMessage { + resp := errorMessage(err) + resp.ID = msg.ID + return resp +} + +func (msg *jsonrpcMessage) response(result interface{}) *jsonrpcMessage { + enc, err := json.Marshal(result) + if err != nil { + // TODO: wrap with 'internal server error' + return msg.errorResponse(err) + } + return &jsonrpcMessage{Version: vsn, ID: msg.ID, Result: enc} +} + +func errorMessage(err error) *jsonrpcMessage { + msg := &jsonrpcMessage{Version: vsn, ID: null, Error: &jsonError{ + Code: defaultErrorCode, + Message: err.Error(), + }} + ec, ok := err.(Error) + if ok { + msg.Error.Code = ec.ErrorCode() + } + return msg +} + +type jsonError struct { + Code int `json:"code"` + Message string `json:"message"` + Data interface{} `json:"data,omitempty"` +} + +func (err *jsonError) Error() string { + if err.Message == "" { + return fmt.Sprintf("json-rpc error %d", err.Code) + } + return err.Message +} + +func (err *jsonError) ErrorCode() int { + return err.Code +} + +// Conn is a subset of the methods of net.Conn which are sufficient for ServerCodec. +type Conn interface { + io.ReadWriteCloser + SetWriteDeadline(time.Time) error +} + +type deadlineCloser interface { + io.Closer + SetWriteDeadline(time.Time) error +} + +// ConnRemoteAddr wraps the RemoteAddr operation, which returns a description +// of the peer address of a connection. If a Conn also implements ConnRemoteAddr, this +// description is used in log messages. +type ConnRemoteAddr interface { + RemoteAddr() string +} + +// connWithRemoteAddr overrides the remote address of a connection. +type connWithRemoteAddr struct { + Conn + addr string +} + +func (c connWithRemoteAddr) RemoteAddr() string { return c.addr } + +// jsonCodec reads and writes JSON-RPC messages to the underlying connection. It also has +// support for parsing arguments and serializing (result) objects. +type jsonCodec struct { + remoteAddr string + closer sync.Once // close closed channel once + closed chan interface{} // closed on Close + decode func(v interface{}) error // decoder to allow multiple transports + encMu sync.Mutex // guards the encoder + encode func(v interface{}) error // encoder to allow multiple transports + conn deadlineCloser +} + +func newCodec(conn deadlineCloser, encode, decode func(v interface{}) error) ServerCodec { + codec := &jsonCodec{ + closed: make(chan interface{}), + encode: encode, + decode: decode, + conn: conn, + } + if ra, ok := conn.(ConnRemoteAddr); ok { + codec.remoteAddr = ra.RemoteAddr() + } + return codec +} + +// NewJSONCodec creates a codec that reads from the given connection. If conn implements +// ConnRemoteAddr, log messages will use it to include the remote address of the +// connection. +func NewJSONCodec(conn Conn) ServerCodec { + enc := json.NewEncoder(conn) + dec := json.NewDecoder(conn) + dec.UseNumber() + return newCodec(conn, enc.Encode, dec.Decode) +} + +func (c *jsonCodec) RemoteAddr() string { + return c.remoteAddr +} + +func (c *jsonCodec) Read() (msg []*jsonrpcMessage, batch bool, err error) { + // Decode the next JSON object in the input stream. + // This verifies basic syntax, etc. + var rawmsg json.RawMessage + if err := c.decode(&rawmsg); err != nil { + return nil, false, err + } + msg, batch = parseMessage(rawmsg) + return msg, batch, nil +} + +// Write sends a message to client. +func (c *jsonCodec) Write(ctx context.Context, v interface{}) error { + c.encMu.Lock() + defer c.encMu.Unlock() + + deadline, ok := ctx.Deadline() + if !ok { + deadline = time.Now().Add(defaultWriteTimeout) + } + c.conn.SetWriteDeadline(deadline) + return c.encode(v) +} + +// Close the underlying connection +func (c *jsonCodec) Close() { + c.closer.Do(func() { + close(c.closed) + c.conn.Close() + }) +} + +// Closed returns a channel which will be closed when Close is called +func (c *jsonCodec) Closed() <-chan interface{} { + return c.closed +} + +// parseMessage parses raw bytes as a (batch of) JSON-RPC message(s). There are no error +// checks in this function because the raw message has already been syntax-checked when it +// is called. Any non-JSON-RPC messages in the input return the zero value of +// jsonrpcMessage. +func parseMessage(raw json.RawMessage) ([]*jsonrpcMessage, bool) { + if !isBatch(raw) { + msgs := []*jsonrpcMessage{{}} + json.Unmarshal(raw, &msgs[0]) + return msgs, false + } + dec := json.NewDecoder(bytes.NewReader(raw)) + dec.Token() // skip '[' + var msgs []*jsonrpcMessage + for dec.More() { + msgs = append(msgs, new(jsonrpcMessage)) + dec.Decode(&msgs[len(msgs)-1]) + } + return msgs, true +} + +// isBatch returns true when the first non-whitespace characters is '[' +func isBatch(raw json.RawMessage) bool { + for _, c := range raw { + // skip insignificant whitespace (http://www.ietf.org/rfc/rfc4627.txt) + if c == 0x20 || c == 0x09 || c == 0x0a || c == 0x0d { + continue + } + return c == '[' + } + return false +} + +// parsePositionalArguments tries to parse the given args to an array of values with the +// given types. It returns the parsed values or an error when the args could not be +// parsed. Missing optional arguments are returned as reflect.Zero values. +func parsePositionalArguments(rawArgs json.RawMessage, types []reflect.Type) ([]reflect.Value, error) { + dec := json.NewDecoder(bytes.NewReader(rawArgs)) + var args []reflect.Value + tok, err := dec.Token() + switch { + case err == io.EOF || tok == nil && err == nil: + // "params" is optional and may be empty. Also allow "params":null even though it's + // not in the spec because our own client used to send it. + case err != nil: + return nil, err + case tok == json.Delim('['): + // Read argument array. + if args, err = parseArgumentArray(dec, types); err != nil { + return nil, err + } + default: + return nil, errors.New("non-array args") + } + // Set any missing args to nil. + for i := len(args); i < len(types); i++ { + if types[i].Kind() != reflect.Ptr { + return nil, fmt.Errorf("missing value for required argument %d", i) + } + args = append(args, reflect.Zero(types[i])) + } + return args, nil +} + +func parseArgumentArray(dec *json.Decoder, types []reflect.Type) ([]reflect.Value, error) { + args := make([]reflect.Value, 0, len(types)) + for i := 0; dec.More(); i++ { + if i >= len(types) { + return args, fmt.Errorf("too many arguments, want at most %d", len(types)) + } + argval := reflect.New(types[i]) + if err := dec.Decode(argval.Interface()); err != nil { + return args, fmt.Errorf("invalid argument %d: %v", i, err) + } + if argval.IsNil() && types[i].Kind() != reflect.Ptr { + return args, fmt.Errorf("missing value for required argument %d", i) + } + args = append(args, argval.Elem()) + } + // Read end of args array. + _, err := dec.Token() + return args, err +} + +// parseSubscriptionName extracts the subscription name from an encoded argument array. +func parseSubscriptionName(rawArgs json.RawMessage) (string, error) { + dec := json.NewDecoder(bytes.NewReader(rawArgs)) + if tok, _ := dec.Token(); tok != json.Delim('[') { + return "", errors.New("non-array args") + } + v, _ := dec.Token() + method, ok := v.(string) + if !ok { + return "", errors.New("expected subscription name as first argument") + } + return method, nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/server.go b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/server.go new file mode 100644 index 000000000..a6b3604ed --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/server.go @@ -0,0 +1,147 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package rpc + +import ( + "context" + "io" + "sync/atomic" + + mapset "github.com/deckarep/golang-set" + "github.com/ethereum/go-ethereum/log" +) + +const MetadataApi = "rpc" + +// CodecOption specifies which type of messages a codec supports. +// +// Deprecated: this option is no longer honored by Server. +type CodecOption int + +const ( + // OptionMethodInvocation is an indication that the codec supports RPC method calls + OptionMethodInvocation CodecOption = 1 << iota + + // OptionSubscriptions is an indication that the codec supports RPC notifications + OptionSubscriptions = 1 << iota // support pub sub +) + +// Server is an RPC server. +type Server struct { + services serviceRegistry + idgen func() ID + run int32 + codecs mapset.Set +} + +// NewServer creates a new server instance with no registered handlers. +func NewServer() *Server { + server := &Server{idgen: randomIDGenerator(), codecs: mapset.NewSet(), run: 1} + // Register the default service providing meta information about the RPC service such + // as the services and methods it offers. + rpcService := &RPCService{server} + server.RegisterName(MetadataApi, rpcService) + return server +} + +// RegisterName creates a service for the given receiver type under the given name. When no +// methods on the given receiver match the criteria to be either a RPC method or a +// subscription an error is returned. Otherwise a new service is created and added to the +// service collection this server provides to clients. +func (s *Server) RegisterName(name string, receiver interface{}) error { + return s.services.registerName(name, receiver) +} + +// ServeCodec reads incoming requests from codec, calls the appropriate callback and writes +// the response back using the given codec. It will block until the codec is closed or the +// server is stopped. In either case the codec is closed. +// +// Note that codec options are no longer supported. +func (s *Server) ServeCodec(codec ServerCodec, options CodecOption) { + defer codec.Close() + + // Don't serve if server is stopped. + if atomic.LoadInt32(&s.run) == 0 { + return + } + + // Add the codec to the set so it can be closed by Stop. + s.codecs.Add(codec) + defer s.codecs.Remove(codec) + + c := initClient(codec, s.idgen, &s.services) + <-codec.Closed() + c.Close() +} + +// serveSingleRequest reads and processes a single RPC request from the given codec. This +// is used to serve HTTP connections. Subscriptions and reverse calls are not allowed in +// this mode. +func (s *Server) serveSingleRequest(ctx context.Context, codec ServerCodec) { + // Don't serve if server is stopped. + if atomic.LoadInt32(&s.run) == 0 { + return + } + + h := newHandler(ctx, codec, s.idgen, &s.services) + h.allowSubscribe = false + defer h.close(io.EOF, nil) + + reqs, batch, err := codec.Read() + if err != nil { + if err != io.EOF { + codec.Write(ctx, errorMessage(&invalidMessageError{"parse error"})) + } + return + } + if batch { + h.handleBatch(reqs) + } else { + h.handleMsg(reqs[0]) + } +} + +// Stop stops reading new requests, waits for stopPendingRequestTimeout to allow pending +// requests to finish, then closes all codecs which will cancel pending requests and +// subscriptions. +func (s *Server) Stop() { + if atomic.CompareAndSwapInt32(&s.run, 1, 0) { + log.Debug("RPC server shutting down") + s.codecs.Each(func(c interface{}) bool { + c.(ServerCodec).Close() + return true + }) + } +} + +// RPCService gives meta information about the server. +// e.g. gives information about the loaded modules. +type RPCService struct { + server *Server +} + +// Modules returns the list of RPC services with their version number +func (s *RPCService) Modules() map[string]string { + s.server.services.mu.Lock() + defer s.server.services.mu.Unlock() + + modules := make(map[string]string) + for name := range s.server.services.services { + modules[name] = "1.0" + } + return modules +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/service.go b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/service.go new file mode 100644 index 000000000..81e65f810 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/service.go @@ -0,0 +1,285 @@ +// Copyright 2019 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package rpc + +import ( + "context" + "errors" + "fmt" + "reflect" + "runtime" + "strings" + "sync" + "unicode" + "unicode/utf8" + + "github.com/ethereum/go-ethereum/log" +) + +var ( + contextType = reflect.TypeOf((*context.Context)(nil)).Elem() + errorType = reflect.TypeOf((*error)(nil)).Elem() + subscriptionType = reflect.TypeOf(Subscription{}) + stringType = reflect.TypeOf("") +) + +type serviceRegistry struct { + mu sync.Mutex + services map[string]service +} + +// service represents a registered object. +type service struct { + name string // name for service + callbacks map[string]*callback // registered handlers + subscriptions map[string]*callback // available subscriptions/notifications +} + +// callback is a method callback which was registered in the server +type callback struct { + fn reflect.Value // the function + rcvr reflect.Value // receiver object of method, set if fn is method + argTypes []reflect.Type // input argument types + hasCtx bool // method's first argument is a context (not included in argTypes) + errPos int // err return idx, of -1 when method cannot return error + isSubscribe bool // true if this is a subscription callback +} + +func (r *serviceRegistry) registerName(name string, rcvr interface{}) error { + rcvrVal := reflect.ValueOf(rcvr) + if name == "" { + return fmt.Errorf("no service name for type %s", rcvrVal.Type().String()) + } + callbacks := suitableCallbacks(rcvrVal) + if len(callbacks) == 0 { + return fmt.Errorf("service %T doesn't have any suitable methods/subscriptions to expose", rcvr) + } + + r.mu.Lock() + defer r.mu.Unlock() + if r.services == nil { + r.services = make(map[string]service) + } + svc, ok := r.services[name] + if !ok { + svc = service{ + name: name, + callbacks: make(map[string]*callback), + subscriptions: make(map[string]*callback), + } + r.services[name] = svc + } + for name, cb := range callbacks { + if cb.isSubscribe { + svc.subscriptions[name] = cb + } else { + svc.callbacks[name] = cb + } + } + return nil +} + +// callback returns the callback corresponding to the given RPC method name. +func (r *serviceRegistry) callback(method string) *callback { + elem := strings.SplitN(method, serviceMethodSeparator, 2) + if len(elem) != 2 { + return nil + } + r.mu.Lock() + defer r.mu.Unlock() + return r.services[elem[0]].callbacks[elem[1]] +} + +// subscription returns a subscription callback in the given service. +func (r *serviceRegistry) subscription(service, name string) *callback { + r.mu.Lock() + defer r.mu.Unlock() + return r.services[service].subscriptions[name] +} + +// suitableCallbacks iterates over the methods of the given type. It determines if a method +// satisfies the criteria for a RPC callback or a subscription callback and adds it to the +// collection of callbacks. See server documentation for a summary of these criteria. +func suitableCallbacks(receiver reflect.Value) map[string]*callback { + typ := receiver.Type() + callbacks := make(map[string]*callback) + for m := 0; m < typ.NumMethod(); m++ { + method := typ.Method(m) + if method.PkgPath != "" { + continue // method not exported + } + cb := newCallback(receiver, method.Func) + if cb == nil { + continue // function invalid + } + name := formatName(method.Name) + callbacks[name] = cb + } + return callbacks +} + +// newCallback turns fn (a function) into a callback object. It returns nil if the function +// is unsuitable as an RPC callback. +func newCallback(receiver, fn reflect.Value) *callback { + fntype := fn.Type() + c := &callback{fn: fn, rcvr: receiver, errPos: -1, isSubscribe: isPubSub(fntype)} + // Determine parameter types. They must all be exported or builtin types. + c.makeArgTypes() + if !allExportedOrBuiltin(c.argTypes) { + return nil + } + // Verify return types. The function must return at most one error + // and/or one other non-error value. + outs := make([]reflect.Type, fntype.NumOut()) + for i := 0; i < fntype.NumOut(); i++ { + outs[i] = fntype.Out(i) + } + if len(outs) > 2 || !allExportedOrBuiltin(outs) { + return nil + } + // If an error is returned, it must be the last returned value. + switch { + case len(outs) == 1 && isErrorType(outs[0]): + c.errPos = 0 + case len(outs) == 2: + if isErrorType(outs[0]) || !isErrorType(outs[1]) { + return nil + } + c.errPos = 1 + } + return c +} + +// makeArgTypes composes the argTypes list. +func (c *callback) makeArgTypes() { + fntype := c.fn.Type() + // Skip receiver and context.Context parameter (if present). + firstArg := 0 + if c.rcvr.IsValid() { + firstArg++ + } + if fntype.NumIn() > firstArg && fntype.In(firstArg) == contextType { + c.hasCtx = true + firstArg++ + } + // Add all remaining parameters. + c.argTypes = make([]reflect.Type, fntype.NumIn()-firstArg) + for i := firstArg; i < fntype.NumIn(); i++ { + c.argTypes[i-firstArg] = fntype.In(i) + } +} + +// call invokes the callback. +func (c *callback) call(ctx context.Context, method string, args []reflect.Value) (res interface{}, errRes error) { + // Create the argument slice. + fullargs := make([]reflect.Value, 0, 2+len(args)) + if c.rcvr.IsValid() { + fullargs = append(fullargs, c.rcvr) + } + if c.hasCtx { + fullargs = append(fullargs, reflect.ValueOf(ctx)) + } + fullargs = append(fullargs, args...) + + // Catch panic while running the callback. + defer func() { + if err := recover(); err != nil { + const size = 64 << 10 + buf := make([]byte, size) + buf = buf[:runtime.Stack(buf, false)] + log.Error("RPC method " + method + " crashed: " + fmt.Sprintf("%v\n%s", err, buf)) + errRes = errors.New("method handler crashed") + } + }() + // Run the callback. + results := c.fn.Call(fullargs) + if len(results) == 0 { + return nil, nil + } + if c.errPos >= 0 && !results[c.errPos].IsNil() { + // Method has returned non-nil error value. + err := results[c.errPos].Interface().(error) + return reflect.Value{}, err + } + return results[0].Interface(), nil +} + +// Is this an exported - upper case - name? +func isExported(name string) bool { + rune, _ := utf8.DecodeRuneInString(name) + return unicode.IsUpper(rune) +} + +// Are all those types exported or built-in? +func allExportedOrBuiltin(types []reflect.Type) bool { + for _, typ := range types { + for typ.Kind() == reflect.Ptr { + typ = typ.Elem() + } + // PkgPath will be non-empty even for an exported type, + // so we need to check the type name as well. + if !isExported(typ.Name()) && typ.PkgPath() != "" { + return false + } + } + return true +} + +// Is t context.Context or *context.Context? +func isContextType(t reflect.Type) bool { + for t.Kind() == reflect.Ptr { + t = t.Elem() + } + return t == contextType +} + +// Does t satisfy the error interface? +func isErrorType(t reflect.Type) bool { + for t.Kind() == reflect.Ptr { + t = t.Elem() + } + return t.Implements(errorType) +} + +// Is t Subscription or *Subscription? +func isSubscriptionType(t reflect.Type) bool { + for t.Kind() == reflect.Ptr { + t = t.Elem() + } + return t == subscriptionType +} + +// isPubSub tests whether the given method has as as first argument a context.Context and +// returns the pair (Subscription, error). +func isPubSub(methodType reflect.Type) bool { + // numIn(0) is the receiver type + if methodType.NumIn() < 2 || methodType.NumOut() != 2 { + return false + } + return isContextType(methodType.In(1)) && + isSubscriptionType(methodType.Out(0)) && + isErrorType(methodType.Out(1)) +} + +// formatName converts to first character of name to lowercase. +func formatName(name string) string { + ret := []rune(name) + if len(ret) > 0 { + ret[0] = unicode.ToLower(ret[0]) + } + return string(ret) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/stdio.go b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/stdio.go new file mode 100644 index 000000000..d5dc066c9 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/stdio.go @@ -0,0 +1,66 @@ +// Copyright 2018 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package rpc + +import ( + "context" + "errors" + "io" + "net" + "os" + "time" +) + +// DialStdIO creates a client on stdin/stdout. +func DialStdIO(ctx context.Context) (*Client, error) { + return DialIO(ctx, os.Stdin, os.Stdout) +} + +// DialIO creates a client which uses the given IO channels +func DialIO(ctx context.Context, in io.Reader, out io.Writer) (*Client, error) { + return newClient(ctx, func(_ context.Context) (ServerCodec, error) { + return NewJSONCodec(stdioConn{ + in: in, + out: out, + }), nil + }) +} + +type stdioConn struct { + in io.Reader + out io.Writer +} + +func (io stdioConn) Read(b []byte) (n int, err error) { + return io.in.Read(b) +} + +func (io stdioConn) Write(b []byte) (n int, err error) { + return io.out.Write(b) +} + +func (io stdioConn) Close() error { + return nil +} + +func (io stdioConn) RemoteAddr() string { + return "/dev/stdin" +} + +func (io stdioConn) SetWriteDeadline(t time.Time) error { + return &net.OpError{Op: "set", Net: "stdio", Source: nil, Addr: nil, Err: errors.New("deadline not supported")} +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/subscription.go b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/subscription.go new file mode 100644 index 000000000..d972244db --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/subscription.go @@ -0,0 +1,335 @@ +// Copyright 2016 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package rpc + +import ( + "bufio" + "container/list" + "context" + crand "crypto/rand" + "encoding/binary" + "encoding/json" + "errors" + "math/rand" + "reflect" + "sync" + "time" +) + +var ( + // ErrNotificationsUnsupported is returned when the connection doesn't support notifications + ErrNotificationsUnsupported = errors.New("notifications not supported") + // ErrNotificationNotFound is returned when the notification for the given id is not found + ErrSubscriptionNotFound = errors.New("subscription not found") +) + +var globalGen = randomIDGenerator() + +// ID defines a pseudo random number that is used to identify RPC subscriptions. +type ID uint32 + +// NewID returns a new, random ID. +func NewID() ID { + return globalGen() +} + +// randomIDGenerator returns a function generates a random IDs. +func randomIDGenerator() func() ID { + seed, err := binary.ReadVarint(bufio.NewReader(crand.Reader)) + if err != nil { + seed = int64(time.Now().Nanosecond()) + } + var ( + mu sync.Mutex + rng = rand.New(rand.NewSource(seed)) + ) + return func() ID { + mu.Lock() + defer mu.Unlock() + id := make([]byte, 4) + rng.Read(id) + return encodeID(id) + } +} + +func encodeID(b []byte) ID { + return ID(uint32(b[0])<<24 | uint32(b[1])<<16 | uint32(b[2])<<8 | uint32(b[3])) +} + +type notifierKey struct{} + +// NotifierFromContext returns the Notifier value stored in ctx, if any. +func NotifierFromContext(ctx context.Context) (*Notifier, bool) { + n, ok := ctx.Value(notifierKey{}).(*Notifier) + return n, ok +} + +// Notifier is tied to a RPC connection that supports subscriptions. +// Server callbacks use the notifier to send notifications. +type Notifier struct { + h *handler + namespace string + subscribeMethodSuffix string + unsubscribeMethodSuffix string + notificationMethodSuffix string + + mu sync.Mutex + sub *Subscription + buffer []json.RawMessage + callReturned bool + activated bool +} + +// CreateSubscription returns a new subscription that is coupled to the +// RPC connection. By default subscriptions are inactive and notifications +// are dropped until the subscription is marked as active. This is done +// by the RPC server after the subscription ID is send to the client. +func (n *Notifier) CreateSubscription() *Subscription { + n.mu.Lock() + defer n.mu.Unlock() + + if n.sub != nil { + panic("can't create multiple subscriptions with Notifier") + } else if n.callReturned { + panic("can't create subscription after subscribe call has returned") + } + n.sub = &Subscription{ID: n.h.idgen(), namespace: n.namespace, subscribeMethodSuffix: n.subscribeMethodSuffix, + unsubscribeMethodSuffix: n.unsubscribeMethodSuffix, notificationMethodSuffix: n.notificationMethodSuffix, + err: make(chan error, 1)} + return n.sub +} + +// Notify sends a notification to the client with the given data as payload. +// If an error occurs the RPC connection is closed and the error is returned. +func (n *Notifier) Notify(id ID, data interface{}) error { + enc, err := json.Marshal(data) + if err != nil { + return err + } + + n.mu.Lock() + defer n.mu.Unlock() + + if n.sub == nil { + panic("can't Notify before subscription is created") + } else if n.sub.ID != id { + panic("Notify with wrong ID") + } + if n.activated { + return n.send(n.sub, enc) + } + n.buffer = append(n.buffer, enc) + return nil +} + +// Closed returns a channel that is closed when the RPC connection is closed. +// Deprecated: use subscription error channel +func (n *Notifier) Closed() <-chan interface{} { + return n.h.conn.Closed() +} + +// takeSubscription returns the subscription (if one has been created). No subscription can +// be created after this call. +func (n *Notifier) takeSubscription() *Subscription { + n.mu.Lock() + defer n.mu.Unlock() + n.callReturned = true + return n.sub +} + +// activate is called after the subscription ID was sent to client. Notifications are +// buffered before activation. This prevents notifications being sent to the client before +// the subscription ID is sent to the client. +func (n *Notifier) activate() error { + n.mu.Lock() + defer n.mu.Unlock() + + for _, data := range n.buffer { + if err := n.send(n.sub, data); err != nil { + return err + } + } + n.activated = true + return nil +} + +func (n *Notifier) send(sub *Subscription, data json.RawMessage) error { + params, _ := json.Marshal(&subscriptionResult{ID: string(sub.ID), Result: data}) + ctx := context.Background() + return n.h.conn.Write(ctx, &jsonrpcMessage{ + Version: vsn, + Method: n.namespace + n.notificationMethodSuffix, + Params: params, + }) +} + +// A Subscription is created by a notifier and tight to that notifier. The client can use +// this subscription to wait for an unsubscribe request for the client, see Err(). +type Subscription struct { + ID ID + namespace string + subscribeMethodSuffix string + unsubscribeMethodSuffix string + notificationMethodSuffix string + err chan error // closed on unsubscribe +} + +// Err returns a channel that is closed when the client send an unsubscribe request. +func (s *Subscription) Err() <-chan error { + return s.err +} + +// MarshalJSON marshals a subscription as its ID. +func (s *Subscription) MarshalJSON() ([]byte, error) { + return json.Marshal(s.ID) +} + +// ClientSubscription is a subscription established through the Client's Subscribe or +// EthSubscribe methods. +type ClientSubscription struct { + client *Client + etype reflect.Type + channel reflect.Value + namespace string + subscribeMethodSuffix string + unsubscribeMethodSuffix string + notificationMethodSuffix string + subid string + in chan json.RawMessage + + quitOnce sync.Once // ensures quit is closed once + quit chan struct{} // quit is closed when the subscription exits + errOnce sync.Once // ensures err is closed once + err chan error +} + +func newClientSubscription(c *Client, namespace, subscribeMethodSuffix, unsubscribeMethodSuffix, + notificationMethodSuffix string, channel reflect.Value) *ClientSubscription { + sub := &ClientSubscription{ + client: c, + namespace: namespace, + subscribeMethodSuffix: subscribeMethodSuffix, + unsubscribeMethodSuffix: unsubscribeMethodSuffix, + notificationMethodSuffix: notificationMethodSuffix, + etype: channel.Type().Elem(), + channel: channel, + quit: make(chan struct{}), + err: make(chan error, 1), + in: make(chan json.RawMessage), + } + return sub +} + +// Err returns the subscription error channel. The intended use of Err is to schedule +// resubscription when the client connection is closed unexpectedly. +// +// The error channel receives a value when the subscription has ended due +// to an error. The received error is nil if Close has been called +// on the underlying client and no other error has occurred. +// +// The error channel is closed when Unsubscribe is called on the subscription. +func (sub *ClientSubscription) Err() <-chan error { + return sub.err +} + +// Unsubscribe unsubscribes the notification and closes the error channel. +// It can safely be called more than once. +func (sub *ClientSubscription) Unsubscribe() { + sub.quitWithError(nil, true) + sub.errOnce.Do(func() { close(sub.err) }) +} + +func (sub *ClientSubscription) quitWithError(err error, unsubscribeServer bool) { + sub.quitOnce.Do(func() { + // The dispatch loop won't be able to execute the unsubscribe call + // if it is blocked on deliver. Close sub.quit first because it + // unblocks deliver. + close(sub.quit) + if unsubscribeServer { + sub.requestUnsubscribe() + } + if err != nil { + if err == ErrClientQuit { + err = nil // Adhere to subscription semantics. + } + sub.err <- err + } + }) +} + +func (sub *ClientSubscription) deliver(result json.RawMessage) (ok bool) { + select { + case sub.in <- result: + return true + case <-sub.quit: + return false + } +} + +func (sub *ClientSubscription) start() { + sub.quitWithError(sub.forward()) +} + +func (sub *ClientSubscription) forward() (err error, unsubscribeServer bool) { + cases := []reflect.SelectCase{ + {Dir: reflect.SelectRecv, Chan: reflect.ValueOf(sub.quit)}, + {Dir: reflect.SelectRecv, Chan: reflect.ValueOf(sub.in)}, + {Dir: reflect.SelectSend, Chan: sub.channel}, + } + buffer := list.New() + defer buffer.Init() + for { + var chosen int + var recv reflect.Value + if buffer.Len() == 0 { + // Idle, omit send case. + chosen, recv, _ = reflect.Select(cases[:2]) + } else { + // Non-empty buffer, send the first queued item. + cases[2].Send = reflect.ValueOf(buffer.Front().Value) + chosen, recv, _ = reflect.Select(cases) + } + + switch chosen { + case 0: // <-sub.quit + return nil, false + case 1: // <-sub.in + val, err := sub.unmarshal(recv.Interface().(json.RawMessage)) + if err != nil { + return err, true + } + if buffer.Len() == maxClientSubscriptionBuffer { + return ErrSubscriptionQueueOverflow, true + } + buffer.PushBack(val) + case 2: // sub.channel<- + cases[2].Send = reflect.Value{} // Don't hold onto the value. + buffer.Remove(buffer.Front()) + } + } +} + +func (sub *ClientSubscription) unmarshal(result json.RawMessage) (interface{}, error) { + val := reflect.New(sub.etype) + err := json.Unmarshal(result, val.Interface()) + return val.Elem().Interface(), err +} + +func (sub *ClientSubscription) requestUnsubscribe() error { + var result interface{} + return sub.client.Call(&result, sub.namespace+"_"+sub.unsubscribeMethodSuffix, sub.subid) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/types.go b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/types.go new file mode 100644 index 000000000..e6b9f2a30 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/types.go @@ -0,0 +1,200 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package rpc + +import ( + "context" + "encoding/json" + "fmt" + "math" + "strings" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" +) + +// API describes the set of methods offered over the RPC interface +type API struct { + Namespace string // namespace under which the rpc methods of Service are exposed + Version string // api version for DApp's + Service interface{} // receiver instance which holds the methods + Public bool // indication if the methods must be considered safe for public use +} + +// Error wraps RPC errors, which contain an error code in addition to the message. +type Error interface { + Error() string // returns the message + ErrorCode() int // returns the code +} + +// ServerCodec implements reading, parsing and writing RPC messages for the server side of +// a RPC session. Implementations must be go-routine safe since the codec can be called in +// multiple go-routines concurrently. +type ServerCodec interface { + Read() (msgs []*jsonrpcMessage, isBatch bool, err error) + Close() + jsonWriter +} + +// jsonWriter can write JSON messages to its underlying connection. +// Implementations must be safe for concurrent use. +type jsonWriter interface { + Write(context.Context, interface{}) error + // Closed returns a channel which is closed when the connection is closed. + Closed() <-chan interface{} + // RemoteAddr returns the peer address of the connection. + RemoteAddr() string +} + +type BlockNumber int64 + +const ( + PendingBlockNumber = BlockNumber(-2) + LatestBlockNumber = BlockNumber(-1) + EarliestBlockNumber = BlockNumber(0) +) + +// UnmarshalJSON parses the given JSON fragment into a BlockNumber. It supports: +// - "latest", "earliest" or "pending" as string arguments +// - the block number +// Returned errors: +// - an invalid block number error when the given argument isn't a known strings +// - an out of range error when the given block number is either too little or too large +func (bn *BlockNumber) UnmarshalJSON(data []byte) error { + input := strings.TrimSpace(string(data)) + if len(input) >= 2 && input[0] == '"' && input[len(input)-1] == '"' { + input = input[1 : len(input)-1] + } + + switch input { + case "earliest": + *bn = EarliestBlockNumber + return nil + case "latest": + *bn = LatestBlockNumber + return nil + case "pending": + *bn = PendingBlockNumber + return nil + } + + blckNum, err := hexutil.DecodeUint64(input) + if err != nil { + return err + } + if blckNum > math.MaxInt64 { + return fmt.Errorf("Blocknumber too high") + } + + *bn = BlockNumber(blckNum) + return nil +} + +func (bn BlockNumber) Int64() int64 { + return (int64)(bn) +} + +type BlockNumberOrHash struct { + BlockNumber *BlockNumber `json:"blockNumber,omitempty"` + BlockHash *common.Hash `json:"blockHash,omitempty"` + RequireCanonical bool `json:"requireCanonical,omitempty"` +} + +func (bnh *BlockNumberOrHash) UnmarshalJSON(data []byte) error { + type erased BlockNumberOrHash + e := erased{} + err := json.Unmarshal(data, &e) + if err == nil { + if e.BlockNumber != nil && e.BlockHash != nil { + return fmt.Errorf("cannot specify both BlockHash and BlockNumber, choose one or the other") + } + bnh.BlockNumber = e.BlockNumber + bnh.BlockHash = e.BlockHash + bnh.RequireCanonical = e.RequireCanonical + return nil + } + var input string + err = json.Unmarshal(data, &input) + if err != nil { + return err + } + switch input { + case "earliest": + bn := EarliestBlockNumber + bnh.BlockNumber = &bn + return nil + case "latest": + bn := LatestBlockNumber + bnh.BlockNumber = &bn + return nil + case "pending": + bn := PendingBlockNumber + bnh.BlockNumber = &bn + return nil + default: + if len(input) == 66 { + hash := common.Hash{} + err := hash.UnmarshalText([]byte(input)) + if err != nil { + return err + } + bnh.BlockHash = &hash + return nil + } else { + blckNum, err := hexutil.DecodeUint64(input) + if err != nil { + return err + } + if blckNum > math.MaxInt64 { + return fmt.Errorf("blocknumber too high") + } + bn := BlockNumber(blckNum) + bnh.BlockNumber = &bn + return nil + } + } +} + +func (bnh *BlockNumberOrHash) Number() (BlockNumber, bool) { + if bnh.BlockNumber != nil { + return *bnh.BlockNumber, true + } + return BlockNumber(0), false +} + +func (bnh *BlockNumberOrHash) Hash() (common.Hash, bool) { + if bnh.BlockHash != nil { + return *bnh.BlockHash, true + } + return common.Hash{}, false +} + +func BlockNumberOrHashWithNumber(blockNr BlockNumber) BlockNumberOrHash { + return BlockNumberOrHash{ + BlockNumber: &blockNr, + BlockHash: nil, + RequireCanonical: false, + } +} + +func BlockNumberOrHashWithHash(hash common.Hash, canonical bool) BlockNumberOrHash { + return BlockNumberOrHash{ + BlockNumber: nil, + BlockHash: &hash, + RequireCanonical: canonical, + } +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/websocket.go b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/websocket.go new file mode 100644 index 000000000..1632d6af4 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc/websocket.go @@ -0,0 +1,175 @@ +// Copyright 2015 The go-ethereum Authors +// This file is part of the go-ethereum library. +// +// The go-ethereum library is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// The go-ethereum library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with the go-ethereum library. If not, see . + +package rpc + +import ( + "context" + "encoding/base64" + "fmt" + "net/http" + "net/url" + "os" + "strings" + "sync" + + mapset "github.com/deckarep/golang-set" + "github.com/ethereum/go-ethereum/log" + "github.com/gorilla/websocket" +) + +const ( + wsReadBuffer = 1024 + wsWriteBuffer = 1024 +) + +var wsBufferPool = new(sync.Pool) + +// NewWSServer creates a new websocket RPC server around an API provider. +// +// Deprecated: use Server.WebsocketHandler +func NewWSServer(allowedOrigins []string, srv *Server) *http.Server { + return &http.Server{Handler: srv.WebsocketHandler(allowedOrigins)} +} + +// WebsocketHandler returns a handler that serves JSON-RPC to WebSocket connections. +// +// allowedOrigins should be a comma-separated list of allowed origin URLs. +// To allow connections with any origin, pass "*". +func (s *Server) WebsocketHandler(allowedOrigins []string) http.Handler { + var upgrader = websocket.Upgrader{ + ReadBufferSize: wsReadBuffer, + WriteBufferSize: wsWriteBuffer, + WriteBufferPool: wsBufferPool, + CheckOrigin: wsHandshakeValidator(allowedOrigins), + } + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + conn, err := upgrader.Upgrade(w, r, nil) + if err != nil { + log.Debug("WebSocket upgrade failed", "err", err) + return + } + codec := newWebsocketCodec(conn) + s.ServeCodec(codec, OptionMethodInvocation|OptionSubscriptions) + }) +} + +// wsHandshakeValidator returns a handler that verifies the origin during the +// websocket upgrade process. When a '*' is specified as an allowed origins all +// connections are accepted. +func wsHandshakeValidator(allowedOrigins []string) func(*http.Request) bool { + origins := mapset.NewSet() + allowAllOrigins := false + + for _, origin := range allowedOrigins { + if origin == "*" { + allowAllOrigins = true + } + if origin != "" { + origins.Add(strings.ToLower(origin)) + } + } + // allow localhost if no allowedOrigins are specified. + if len(origins.ToSlice()) == 0 { + origins.Add("http://localhost") + if hostname, err := os.Hostname(); err == nil { + origins.Add("http://" + strings.ToLower(hostname)) + } + } + log.Debug(fmt.Sprintf("Allowed origin(s) for WS RPC interface %v", origins.ToSlice())) + + f := func(req *http.Request) bool { + // Skip origin verification if no Origin header is present. The origin check + // is supposed to protect against browser based attacks. Browsers always set + // Origin. Non-browser software can put anything in origin and checking it doesn't + // provide additional security. + if _, ok := req.Header["Origin"]; !ok { + return true + } + // Verify origin against whitelist. + origin := strings.ToLower(req.Header.Get("Origin")) + if allowAllOrigins || origins.Contains(origin) { + return true + } + log.Warn("Rejected WebSocket connection", "origin", origin) + return false + } + + return f +} + +type wsHandshakeError struct { + err error + status string +} + +func (e wsHandshakeError) Error() string { + s := e.err.Error() + if e.status != "" { + s += " (HTTP status " + e.status + ")" + } + return s +} + +// DialWebsocket creates a new RPC client that communicates with a JSON-RPC server +// that is listening on the given endpoint. +// +// The context is used for the initial connection establishment. It does not +// affect subsequent interactions with the client. +func DialWebsocket(ctx context.Context, endpoint, origin string) (*Client, error) { + endpoint, header, err := wsClientHeaders(endpoint, origin) + if err != nil { + return nil, err + } + dialer := websocket.Dialer{ + ReadBufferSize: wsReadBuffer, + WriteBufferSize: wsWriteBuffer, + WriteBufferPool: wsBufferPool, + } + return newClient(ctx, func(ctx context.Context) (ServerCodec, error) { + conn, resp, err := dialer.DialContext(ctx, endpoint, header) + if err != nil { + hErr := wsHandshakeError{err: err} + if resp != nil { + hErr.status = resp.Status + } + return nil, hErr + } + return newWebsocketCodec(conn), nil + }) +} + +func wsClientHeaders(endpoint, origin string) (string, http.Header, error) { + endpointURL, err := url.Parse(endpoint) + if err != nil { + return endpoint, nil, err + } + header := make(http.Header) + if origin != "" { + header.Add("origin", origin) + } + if endpointURL.User != nil { + b64auth := base64.StdEncoding.EncodeToString([]byte(endpointURL.User.String())) + header.Add("authorization", "Basic "+b64auth) + endpointURL.User = nil + } + return endpointURL.String(), header, nil +} + +func newWebsocketCodec(conn *websocket.Conn) ServerCodec { + conn.SetReadLimit(maxRequestContentLength) + return newCodec(conn, conn.WriteJSON, conn.ReadJSON) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/hash/blake2b.go b/pkg/dia/helpers/substrate-helper/gsrpc/hash/blake2b.go new file mode 100644 index 000000000..06b2fc05c --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/hash/blake2b.go @@ -0,0 +1,83 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package hash + +import ( + "hash" + + "golang.org/x/crypto/blake2b" +) + +type blake2b128Concat struct { + hasher hash.Hash + data []byte +} + +// NewBlake2b128Concat returns an instance of blake2b concat hasher +func NewBlake2b128Concat(k []byte) (hash.Hash, error) { + h, err := blake2b.New(16, k) + if err != nil { + return nil, err + } + return &blake2b128Concat{hasher: h, data: k}, nil +} + +// Write (via the embedded io.Writer interface) adds more data to the running hash. +func (bc *blake2b128Concat) Write(p []byte) (n int, err error) { + bc.data = append(bc.data, p...) + return bc.hasher.Write(p) +} + +// Sum appends the current hash to b and returns the resulting slice. +// It does not change the underlying hash state. +func (bc *blake2b128Concat) Sum(b []byte) []byte { + return append(bc.hasher.Sum(b), bc.data...) +} + +// Reset resets the Hash to its initial state. +func (bc *blake2b128Concat) Reset() { + bc.data = nil + bc.hasher.Reset() +} + +// Size returns the number of bytes Sum will return. +func (bc *blake2b128Concat) Size() int { + return len(bc.Sum(nil)) +} + +// BlockSize returns the hash's underlying block size. +// The Write method must be able to accept any amount +// of data, but it may operate more efficiently if all writes +// are a multiple of the block size. +func (bc *blake2b128Concat) BlockSize() int { + return bc.hasher.BlockSize() +} + +// NewBlake2b128 returns blake2b-128 hasher +func NewBlake2b128(k []byte) (hash.Hash, error) { + return blake2b.New(16, k) +} + +// NewBlake2b256 returns blake2b-256 hasher +func NewBlake2b256(k []byte) (hash.Hash, error) { + return blake2b.New256(k) +} + +// NewBlake2b512 returns blake2b-512 hasher +func NewBlake2b512(k []byte) (hash.Hash, error) { + return blake2b.New512(k) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/hash/identity.go b/pkg/dia/helpers/substrate-helper/gsrpc/hash/identity.go new file mode 100644 index 000000000..bc824cade --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/hash/identity.go @@ -0,0 +1,60 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package hash + +import ( + "hash" +) + +type identity struct { + data []byte +} + +func NewIdentity(b []byte) hash.Hash { + return &identity{data: b} +} + +// Write (via the embedded io.Writer interface) adds more data to the running hash. +// It never returns an error. +func (i *identity) Write(p []byte) (n int, err error) { + i.data = append(i.data, p...) + return len(p), nil +} + +// Sum appends the current hash to b and returns the resulting slice. +// It does not change the underlying hash state. +func (i *identity) Sum(b []byte) []byte { + return append(b, i.data...) +} + +// Reset resets the Hash to its initial state. +func (i *identity) Reset() { + i.data = make([]byte, 0) +} + +// Size returns the number of bytes Sum will return. +func (i *identity) Size() int { + return len(i.Sum(nil)) +} + +// BlockSize returns the hash's underlying block size. +// The Write method must be able to accept any amount +// of data, but it may operate more efficiently if all writes +// are a multiple of the block size. +func (i *identity) BlockSize() int { + return 0 +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/main.go b/pkg/dia/helpers/substrate-helper/gsrpc/main.go new file mode 100644 index 000000000..755b4367f --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/main.go @@ -0,0 +1,44 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package gsrpc + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/client" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/rpc" +) + +type SubstrateAPI struct { + RPC *rpc.RPC + Client client.Client +} + +func NewSubstrateAPI(url string) (*SubstrateAPI, error) { + cl, err := client.Connect(url) + if err != nil { + return nil, err + } + + newRPC, err := rpc.NewRPC(cl) + if err != nil { + return nil, err + } + + return &SubstrateAPI{ + RPC: newRPC, + Client: cl, + }, nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/registry/REGISTRY.md b/pkg/dia/helpers/substrate-helper/gsrpc/registry/REGISTRY.md new file mode 100644 index 000000000..1dd9b32bb --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/registry/REGISTRY.md @@ -0,0 +1,79 @@ +# GSRPC Registry +The GSRPC Registry can parse target metadata information into an in-memory registry of complex structures. + +By leveraging the on-chain metadata, GSRPC is more robust to changes on types, allowing clients to only keep updated the types that are relevant to their business operation. + +This registry can be used afterwards to decode data read from live chains (events & extrinsics). + +## How to parse events and their fields +First we instantiate the API with the client node and open a connection: +```go +testURL := "wss://fullnode.parachain.centrifuge.io" // Your endpoint +api, err := gsrpc.NewSubstrateAPI(testURL) + +if err != nil { + log.Printf("Couldn't connect to '%s': %s\n", testURL, err) + return +} +``` +Then we instantiate the Event Retriever logic which internally creates a new EventRegistry reading from the target metadata of the connected chain. We pass as well the state RPC so the storage API is available: +```go +retriever, err := NewDefaultEventRetriever(state.NewEventProvider(api.RPC.State), api.RPC.State) + +if err != nil { + log.Printf("Couldn't create event retriever: %s", err) + return +} +``` +At this point what we need is a block hash to read the events within. In this example we get the latest block header and the correspondent block hash out of the block number: +```go +header, err := api.RPC.Chain.GetHeaderLatest() + +if err != nil { + log.Printf("Couldn't get latest header for '%s': %s\n", testURL, err) + return +} + +blockHash, err := api.RPC.Chain.GetBlockHash(uint64(header.Number)) + +if err != nil { + log.Printf("Couldn't retrieve blockHash for '%s', block number %d: %s\n", testURL, header.Number, err) + return +} +``` +Finally, we just use the retriever function to read all the events in that block based on the chain metadata loaded in the event registry: +```go +events, err := retriever.GetEvents(blockHash) + +if err != nil { + log.Printf("Couldn't retrieve events for '%s', block number %d: %s\n", testURL, header.Number, err) + return +} + +log.Printf("Found %d events for '%s', at block number %d.\n", len(events), testURL, header.Number) + +// Example of the events returned structure +for _, event := range events { + log.Printf("Event ID: %x \n", event.EventID) + log.Printf("Event Name: %s \n", event.Name) + log.Printf("Event Fields Count: %d \n", len(event.Fields)) + for k, v := range event.Fields { + log.Printf("Field Name: %s \n", k) + log.Printf("Field Type: %v \n", reflect.TypeOf(v)) + log.Printf("Field Value: %v \n", v) + } +} + +``` + +## Extended Usage +Since docs get outdated fairly quick, here are links to tests that will always be up-to-date. +### Populate Call, Error & Events Registries, Extrinsic Decoder +[Factory tests](factory_test.go) +[Decoder tests](decoder_test.go) + +### Event retriever +[TestLive_EventRetriever_GetEvents](retriever/event_retriever_live_test.go) + +### Extrinsic retriever +[TestLive_ExtrinsicRetriever_GetExtrinsics](retriever/extrinsic_retriever_live_test.go) \ No newline at end of file diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/registry/decoder.go b/pkg/dia/helpers/substrate-helper/gsrpc/registry/decoder.go new file mode 100644 index 000000000..11f9764cc --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/registry/decoder.go @@ -0,0 +1,518 @@ +package registry + +import ( + "bytes" + "fmt" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic" + "github.com/ethereum/go-ethereum/common/hexutil" +) + +// FieldDecoder is the interface implemented by all the different types that are available. +type FieldDecoder interface { + Decode(decoder *scale.Decoder) (any, error) +} + +// NoopDecoder is a FieldDecoder that does not decode anything. It comes in handy for nil tuples or variants +// with no inner types. +type NoopDecoder struct{} + +func (n *NoopDecoder) Decode(_ *scale.Decoder) (any, error) { + return nil, nil +} + +// VariantDecoder holds a FieldDecoder for each variant/enum. +type VariantDecoder struct { + FieldDecoderMap map[byte]FieldDecoder +} + +type VariantDecoderResult struct { + FieldName string + Value any +} + +func (v *VariantDecoder) Decode(decoder *scale.Decoder) (any, error) { + variantByte, err := decoder.ReadOneByte() + + if err != nil { + return nil, ErrVariantByteDecoding.Wrap(err) + } + + variantDecoder, ok := v.FieldDecoderMap[variantByte] + + if !ok { + return nil, ErrVariantFieldDecoderNotFound.WithMsg("variant '%d'", variantByte) + } + + if _, ok := variantDecoder.(*NoopDecoder); ok { + return variantByte, nil + } + + var fieldName string + if _, ok := variantDecoder.(*CompositeDecoder); ok { + fieldName = variantDecoder.(*CompositeDecoder).FieldName + } + + value, err := variantDecoder.Decode(decoder) + if err != nil { + return nil, err + } + + return VariantDecoderResult{fieldName, value}, nil +} + +// ArrayDecoder holds information about the length of the array and the FieldDecoder used for its items. +type ArrayDecoder struct { + Length uint + ItemDecoder FieldDecoder +} + +func (a *ArrayDecoder) Decode(decoder *scale.Decoder) (any, error) { + if a.ItemDecoder == nil { + return nil, ErrArrayItemDecoderNotFound + } + + slice := make([]any, 0, a.Length) + + for i := uint(0); i < a.Length; i++ { + item, err := a.ItemDecoder.Decode(decoder) + + if err != nil { + return nil, ErrArrayItemDecoding.Wrap(err) + } + + slice = append(slice, item) + } + + return slice, nil +} + +// SliceDecoder holds a FieldDecoder for the items of a vector/slice. +type SliceDecoder struct { + ItemDecoder FieldDecoder +} + +func (s *SliceDecoder) Decode(decoder *scale.Decoder) (any, error) { + if s.ItemDecoder == nil { + return nil, ErrSliceItemDecoderNotFound + } + + sliceLen, err := decoder.DecodeUintCompact() + + if err != nil { + return nil, ErrSliceLengthDecoding.Wrap(err) + } + + slice := make([]any, 0, sliceLen.Uint64()) + + for i := uint64(0); i < sliceLen.Uint64(); i++ { + item, err := s.ItemDecoder.Decode(decoder) + + if err != nil { + return nil, ErrSliceItemDecoding.Wrap(err) + } + + slice = append(slice, item) + } + + return slice, nil +} + +// CompositeDecoder holds all the information required to decoder a struct/composite. +type CompositeDecoder struct { + FieldName string + Fields []*Field +} + +func (e *CompositeDecoder) Decode(decoder *scale.Decoder) (any, error) { + var decodedFields DecodedFields + + for _, field := range e.Fields { + value, err := field.FieldDecoder.Decode(decoder) + + if err != nil { + return nil, ErrCompositeFieldDecoding.Wrap(err) + } + + decodedFields = append(decodedFields, &DecodedField{ + Name: field.Name, + Value: value, + LookupIndex: field.LookupIndex, + }) + } + + return decodedFields, nil +} + +// ValueDecoder decodes a primitive type. +type ValueDecoder[T any] struct{} + +func (v *ValueDecoder[T]) Decode(decoder *scale.Decoder) (any, error) { + var t T + + if err := decoder.Decode(&t); err != nil { + return nil, ErrValueDecoding.Wrap(err) + } + + return t, nil +} + +// RecursiveDecoder is a wrapper for a FieldDecoder that is recursive. +type RecursiveDecoder struct { + FieldDecoder FieldDecoder +} + +func (r *RecursiveDecoder) Decode(decoder *scale.Decoder) (any, error) { + if r.FieldDecoder == nil { + return nil, ErrRecursiveFieldDecoderNotFound + } + + return r.FieldDecoder.Decode(decoder) +} + +// BitSequenceDecoder holds decoding information for a bit sequence. +type BitSequenceDecoder struct { + FieldName string + BitOrder types.BitOrder +} + +func (b *BitSequenceDecoder) Decode(decoder *scale.Decoder) (any, error) { + bitVec := types.NewBitVec(b.BitOrder) + + if err := bitVec.Decode(*decoder); err != nil { + return nil, ErrBitVecDecoding.Wrap(err) + } + + return map[string]string{ + b.FieldName: bitVec.String(), + }, nil +} + +// TypeDecoder holds all information required to decode a particular type. +type TypeDecoder struct { + Name string + Fields []*Field +} + +func (t *TypeDecoder) Decode(decoder *scale.Decoder) (DecodedFields, error) { + if t == nil { + return nil, ErrNilTypeDecoder + } + + var decodedFields DecodedFields + + for _, field := range t.Fields { + decodedField, err := field.Decode(decoder) + + if err != nil { + return nil, ErrTypeFieldDecoding.Wrap(err) + } + + decodedFields = append(decodedFields, decodedField) + } + + return decodedFields, nil +} + +// getPrimitiveDecoder parses a primitive type definition and returns a ValueDecoder. +func getPrimitiveDecoder(primitiveTypeDef types.Si0TypeDefPrimitive) (FieldDecoder, error) { + switch primitiveTypeDef { + case types.IsBool: + return &ValueDecoder[bool]{}, nil + case types.IsChar: + return &ValueDecoder[byte]{}, nil + case types.IsStr: + return &ValueDecoder[string]{}, nil + case types.IsU8: + return &ValueDecoder[types.U8]{}, nil + case types.IsU16: + return &ValueDecoder[types.U16]{}, nil + case types.IsU32: + return &ValueDecoder[types.U32]{}, nil + case types.IsU64: + return &ValueDecoder[types.U64]{}, nil + case types.IsU128: + return &ValueDecoder[types.U128]{}, nil + case types.IsU256: + return &ValueDecoder[types.U256]{}, nil + case types.IsI8: + return &ValueDecoder[types.I8]{}, nil + case types.IsI16: + return &ValueDecoder[types.I16]{}, nil + case types.IsI32: + return &ValueDecoder[types.I32]{}, nil + case types.IsI64: + return &ValueDecoder[types.I64]{}, nil + case types.IsI128: + return &ValueDecoder[types.I128]{}, nil + case types.IsI256: + return &ValueDecoder[types.I256]{}, nil + default: + return nil, ErrPrimitiveTypeNotSupported.WithMsg("primitive type %v", primitiveTypeDef) + } +} + +// Field represents one field of a TypeDecoder. +type Field struct { + Name string + FieldDecoder FieldDecoder + LookupIndex int64 +} + +func (f *Field) Decode(decoder *scale.Decoder) (*DecodedField, error) { + if f == nil { + return nil, ErrNilField + } + + if f.FieldDecoder == nil { + return nil, ErrNilFieldDecoder + } + + value, err := f.FieldDecoder.Decode(decoder) + + if err != nil { + return nil, err + } + + return &DecodedField{ + Name: f.Name, + Value: value, + LookupIndex: f.LookupIndex, + }, nil +} + +// DecodedField holds the name, value and lookup index of a field that was decoded. +type DecodedField struct { + Name string + Value any + LookupIndex int64 +} + +func (d DecodedField) Encode(encoder scale.Encoder) error { + if d.Value == nil { + return nil + } + + return encoder.Encode(d.Value) +} + +type DecodedFields []*DecodedField + +type DecodedFieldPredicateFn func(fieldIndex int, field *DecodedField) bool +type DecodedValueProcessingFn[T any] func(value any) (T, error) + +// ProcessDecodedFieldValue applies the processing func to the value of the field +// that matches the provided predicate func. +func ProcessDecodedFieldValue[T any]( + decodedFields DecodedFields, + fieldPredicateFn DecodedFieldPredicateFn, + valueProcessingFn DecodedValueProcessingFn[T], +) (T, error) { + var t T + + for decodedFieldIndex, decodedField := range decodedFields { + if !fieldPredicateFn(decodedFieldIndex, decodedField) { + continue + } + + res, err := valueProcessingFn(decodedField.Value) + + if err != nil { + return t, ErrDecodedFieldValueProcessingError.Wrap(err) + } + + return res, nil + } + + return t, ErrDecodedFieldNotFound +} + +// GetDecodedFieldAsType returns the value of the field that matches the provided predicate func +// as the provided generic argument. +func GetDecodedFieldAsType[T any]( + decodedFields DecodedFields, + fieldPredicateFn DecodedFieldPredicateFn, +) (T, error) { + return ProcessDecodedFieldValue( + decodedFields, + fieldPredicateFn, + func(value any) (T, error) { + if res, ok := value.(T); ok { + return res, nil + } + + var t T + + err := fmt.Errorf("expected %T, got %T", t, value) + + return t, ErrDecodedFieldValueTypeMismatch.Wrap(err) + }, + ) +} + +// GetDecodedFieldAsSliceOfType returns the value of the field that matches the provided predicate func +// as a slice of the provided generic argument. +func GetDecodedFieldAsSliceOfType[T any]( + decodedFields DecodedFields, + fieldPredicateFn DecodedFieldPredicateFn, +) ([]T, error) { + return ProcessDecodedFieldValue( + decodedFields, + fieldPredicateFn, + func(value any) ([]T, error) { + v, ok := value.([]any) + + if !ok { + return nil, ErrDecodedFieldValueNotAGenericSlice + } + + res, err := convertSliceToType[T](v) + + if err != nil { + return nil, ErrDecodedFieldValueTypeMismatch.Wrap(err) + } + + return res, nil + }, + ) +} + +func convertSliceToType[T any](slice []any) ([]T, error) { + res := make([]T, 0) + + for _, item := range slice { + if v, ok := item.(T); ok { + res = append(res, v) + continue + } + + var t T + + return nil, fmt.Errorf("expected %T, got %T", t, item) + } + + return res, nil +} + +// DecodedExtrinsic is the type returned when an extrinsic is decoded. +type DecodedExtrinsic struct { + Version byte + DecodedFields DecodedFields +} + +// IsSigned returns true if the extrinsic is signed. +func (d DecodedExtrinsic) IsSigned() bool { + return d.Version&extrinsic.BitSigned == extrinsic.BitSigned +} + +// ExtrinsicDecoder holds all the decoders for all the fields of an extrinsic. +type ExtrinsicDecoder struct { + Fields []*Field +} + +func (d *ExtrinsicDecoder) getFieldWithName(fieldName string) (*Field, error) { + for _, field := range d.Fields { + if field.Name == fieldName { + return field, nil + } + } + + return nil, ErrExtrinsicFieldNotFound.WithMsg("expected field name '%s'", fieldName) +} + +func (d *ExtrinsicDecoder) decodeField(fieldName string, decoder *scale.Decoder) (*DecodedField, error) { + extrinsicField, err := d.getFieldWithName(fieldName) + + if err != nil { + return nil, err + } + + decodedField, err := extrinsicField.Decode(decoder) + + if err != nil { + return nil, ErrExtrinsicFieldDecoding.Wrap(err).WithMsg("field name - '%s'", fieldName) + } + + return decodedField, nil +} + +func (d *ExtrinsicDecoder) DecodeHex(hexEncodedExtrinsic string) (*DecodedExtrinsic, error) { + extrinsicBytes, err := hexutil.Decode(hexEncodedExtrinsic) + + if err != nil { + return nil, err + } + + decoder := scale.NewDecoder(bytes.NewReader(extrinsicBytes)) + + return d.Decode(decoder) +} + +// Decode is used to decode the fields of an extrinsic in the following order: +// +// 1. Address +// 2. Signature +// 3. Extra +// 4. Call +// +// NOTE - the decoding order is different from the order of the Extrinsic parameters provided in the metadata. +func (d *ExtrinsicDecoder) Decode(decoder *scale.Decoder) (*DecodedExtrinsic, error) { + if d == nil { + return nil, ErrNilExtrinsicDecoder + } + + decodedExtrinsic := &DecodedExtrinsic{} + + // compact length encoding (1, 2, or 4 bytes) (may not be there for Extrinsics older than Jan 11 2019) + _, err := decoder.DecodeUintCompact() + + if err != nil { + return nil, ErrExtrinsicCompactLengthDecoding.Wrap(err) + } + + if err := decoder.Decode(&decodedExtrinsic.Version); err != nil { + return nil, ErrExtrinsicVersionDecoding.Wrap(err) + } + + var decodedFields DecodedFields + + if decodedExtrinsic.IsSigned() { + decodedAddress, err := d.decodeField(ExtrinsicAddressName, decoder) + + if err != nil { + return nil, err + } + + decodedFields = append(decodedFields, decodedAddress) + + decodedSignature, err := d.decodeField(ExtrinsicSignatureName, decoder) + + if err != nil { + return nil, err + } + + decodedFields = append(decodedFields, decodedSignature) + + decodedExtraField, err := d.decodeField(ExtrinsicExtraName, decoder) + + if err != nil { + return nil, err + } + + decodedFields = append(decodedFields, decodedExtraField) + } + + decodedCall, err := d.decodeField(ExtrinsicCallName, decoder) + + if err != nil { + return nil, err + } + + decodedFields = append(decodedFields, decodedCall) + + decodedExtrinsic.DecodedFields = decodedFields + + return decodedExtrinsic, nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/registry/error.go b/pkg/dia/helpers/substrate-helper/gsrpc/registry/error.go new file mode 100644 index 000000000..afbfcc948 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/registry/error.go @@ -0,0 +1,68 @@ +package registry + +import libErr "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/error" + +const ( + ErrRecursiveDecodersResolving = libErr.Error("recursive decoders resolving") + ErrErrorsTypeNotFound = libErr.Error("errors type not found") + ErrErrorsTypeNotVariant = libErr.Error("errors type not a variant") + ErrErrorFieldsRetrieval = libErr.Error("error fields retrieval") + ErrCallsTypeNotFound = libErr.Error("calls type not found") + ErrCallsTypeNotVariant = libErr.Error("calls type not a variant") + ErrCallFieldsRetrieval = libErr.Error("call fields retrieval") + ErrEventsTypeNotFound = libErr.Error("events type not found") + ErrEventsTypeNotVariant = libErr.Error("events type not a variant") + ErrEventFieldsRetrieval = libErr.Error("event fields retrieval") + ErrFieldDecoderForRecursiveFieldNotFound = libErr.Error("field decoder for recursive field not found") + ErrRecursiveFieldResolving = libErr.Error("recursive field resolving") + ErrFieldTypeNotFound = libErr.Error("field type not found") + ErrFieldDecoderRetrieval = libErr.Error("field decoder retrieval") + ErrCompactFieldTypeNotFound = libErr.Error("compact field type not found") + ErrCompositeTypeFieldsRetrieval = libErr.Error("composite type fields retrieval") + ErrArrayFieldTypeNotFound = libErr.Error("array field type not found") + ErrVectorFieldTypeNotFound = libErr.Error("vector field type not found") + ErrFieldTypeDefinitionNotSupported = libErr.Error("field type definition not supported") + ErrVariantTypeFieldsRetrieval = libErr.Error("variant type fields decoding") + ErrCompactTupleItemTypeNotFound = libErr.Error("compact tuple item type not found") + ErrCompactTupleItemFieldDecoderRetrieval = libErr.Error("compact tuple item field decoder retrieval") + ErrCompactCompositeFieldTypeNotFound = libErr.Error("compact composite field type not found") + ErrCompactCompositeFieldDecoderRetrieval = libErr.Error("compact composite field decoder retrieval") + ErrArrayItemFieldDecoderRetrieval = libErr.Error("array item field decoder retrieval") + ErrSliceItemFieldDecoderRetrieval = libErr.Error("slice item field decoder retrieval") + ErrTupleItemTypeNotFound = libErr.Error("tuple item type not found") + ErrTupleItemFieldDecoderRetrieval = libErr.Error("tuple item field decoder retrieval") + ErrBitStoreTypeNotFound = libErr.Error("bit store type not found") + ErrBitStoreTypeNotSupported = libErr.Error("bit store type not supported") + ErrBitOrderTypeNotFound = libErr.Error("bit order type not found") + ErrBitOrderCreation = libErr.Error("bit order creation") + ErrPrimitiveTypeNotSupported = libErr.Error("primitive type not supported") + ErrTypeFieldDecoding = libErr.Error("type field decoding") + ErrVariantByteDecoding = libErr.Error("variant byte decoding") + ErrVariantFieldDecoderNotFound = libErr.Error("variant field decoder not found") + ErrArrayItemDecoderNotFound = libErr.Error("array item decoder not found") + ErrArrayItemDecoding = libErr.Error("array item decoding") + ErrSliceItemDecoderNotFound = libErr.Error("slice item decoder not found") + ErrSliceLengthDecoding = libErr.Error("slice length decoding") + ErrSliceItemDecoding = libErr.Error("slice item decoding") + ErrCompositeFieldDecoding = libErr.Error("composite field decoding") + ErrValueDecoding = libErr.Error("value decoding") + ErrRecursiveFieldDecoderNotFound = libErr.Error("recursive field decoder not found") + ErrBitVecDecoding = libErr.Error("bit vec decoding") + ErrNilTypeDecoder = libErr.Error("nil type decoder") + ErrNilField = libErr.Error("nil field") + ErrNilFieldDecoder = libErr.Error("nil field decoder") + ErrDecodedFieldNotFound = libErr.Error("decoded field not found") + ErrDecodedFieldValueTypeMismatch = libErr.Error("decoded field value type mismatch") + ErrDecodedFieldValueProcessingError = libErr.Error("decoded field value processing error") + ErrDecodedFieldValueNotAGenericSlice = libErr.Error("decoded field value is not a generic slice") + ErrExtrinsicFieldRetrieval = libErr.Error("extrinsic field retrieval") + ErrInvalidExtrinsicParams = libErr.Error("invalid extrinsic params") + ErrInvalidExtrinsicType = libErr.Error("invalid extrinsic type") + ErrInvalidGenericExtrinsicType = libErr.Error("invalid generic extrinsic type") + ErrNilExtrinsicDecoder = libErr.Error("nil type decoder") + ErrExtrinsicFieldNotFound = libErr.Error("extrinsic field not found") + ErrExtrinsicCompactLengthDecoding = libErr.Error("extrinsic compact length decoding") + ErrExtrinsicVersionDecoding = libErr.Error("extrinsic version decoding") + ErrUnexpectedExtrinsicParam = libErr.Error("unexpected extrinsic param") + ErrExtrinsicFieldDecoding = libErr.Error("extrinsic field decoding") +) diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/registry/exec/exec.go b/pkg/dia/helpers/substrate-helper/gsrpc/registry/exec/exec.go new file mode 100644 index 000000000..79e08f8c8 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/registry/exec/exec.go @@ -0,0 +1,161 @@ +package exec + +import ( + "errors" + "fmt" + "strings" + "time" +) + +//go:generate mockery --name RetryableExecutor --structname RetryableExecutorMock --filename exec_mock.go --inpackage + +// RetryableExecutor is the interface used for executing a closure and its fallback if the initial execution fails. +// +// The interface is generic over type T which represents the return value of the closure. +type RetryableExecutor[T any] interface { + ExecWithFallback(execFn func() (T, error), fallbackFn func() error) (T, error) +} + +// retryableExecutor implements RetryableExecutor. +// +// It can be configured via the provided OptsFn(s). +type retryableExecutor[T any] struct { + opts *Opts +} + +// NewRetryableExecutor creates a new RetryableExecutor. +func NewRetryableExecutor[T any](opts ...OptsFn) RetryableExecutor[T] { + execOpts := NewDefaultExecOpts() + + for _, opt := range opts { + opt(execOpts) + } + + return &retryableExecutor[T]{ + execOpts, + } +} + +// ExecWithFallback will attempt to execute the provided execFn and, in the case of failure, it will execute +// the fallbackFn and retry execution of execFn. +func (r *retryableExecutor[T]) ExecWithFallback(execFn func() (T, error), fallbackFn func() error) (res T, err error) { + if execFn == nil { + return res, ErrMissingExecFn + } + + if fallbackFn == nil { + return res, ErrMissingFallbackFn + } + + execErr := &Error{} + + retryCount := uint(0) + + for { + res, err = execFn() + + if err == nil { + return res, nil + } + + execErr.AddErr(fmt.Errorf("exec function error: %w", err)) + + if retryCount == r.opts.maxRetryCount { + return res, execErr + } + + if err = fallbackFn(); err != nil && !r.opts.retryOnFallbackError { + execErr.AddErr(fmt.Errorf("fallback function error: %w", err)) + + return res, execErr + } + + retryCount++ + + time.Sleep(r.opts.retryTimeout) + } +} + +var ( + ErrMissingExecFn = errors.New("no exec function provided") + ErrMissingFallbackFn = errors.New("no fallback function provided") +) + +const ( + defaultMaxRetryCount = 3 + defaultErrTimeout = 0 * time.Second + defaultRetryOnFallbackError = true +) + +// Opts holds the configurable options for a RetryableExecutor. +type Opts struct { + // maxRetryCount holds maximum number of retries in the case of failure. + maxRetryCount uint + + // retryTimeout holds the timeout between retries. + retryTimeout time.Duration + + // retryOnFallbackError specifies whether a retry will be done in the case of + // failure of the fallback function. + retryOnFallbackError bool +} + +// NewDefaultExecOpts creates the default Opts. +func NewDefaultExecOpts() *Opts { + return &Opts{ + maxRetryCount: defaultMaxRetryCount, + retryTimeout: defaultErrTimeout, + retryOnFallbackError: defaultRetryOnFallbackError, + } +} + +// OptsFn is function that operate on Opts. +type OptsFn func(opts *Opts) + +// WithMaxRetryCount sets the max retry count. +// +// Note that a default value is provided if the provided count is 0. +func WithMaxRetryCount(maxRetryCount uint) OptsFn { + return func(opts *Opts) { + if maxRetryCount == 0 { + maxRetryCount = defaultMaxRetryCount + } + + opts.maxRetryCount = maxRetryCount + } +} + +// WithRetryTimeout sets the retry timeout. +func WithRetryTimeout(retryTimeout time.Duration) OptsFn { + return func(opts *Opts) { + opts.retryTimeout = retryTimeout + } +} + +// WithRetryOnFallBackError sets the retryOnFallbackError flag. +func WithRetryOnFallBackError(retryOnFallbackError bool) OptsFn { + return func(opts *Opts) { + opts.retryOnFallbackError = retryOnFallbackError + } +} + +// Error holds none or multiple errors that can happen during execution. +type Error struct { + errs []error +} + +// AddErr appends an error to the error slice of Error. +func (e *Error) AddErr(err error) { + e.errs = append(e.errs, err) +} + +// Error implements the standard error interface. +func (e *Error) Error() string { + sb := strings.Builder{} + + for i, err := range e.errs { + sb.WriteString(fmt.Sprintf("error %d: %s\n", i, err)) + } + + return sb.String() +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/registry/factory.go b/pkg/dia/helpers/substrate-helper/gsrpc/registry/factory.go new file mode 100644 index 000000000..a8a48339e --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/registry/factory.go @@ -0,0 +1,796 @@ +package registry + +import ( + "errors" + "fmt" + "strings" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +//go:generate mockery --name Factory --structname FactoryMock --filename factory_mock.go --inpackage + +// Factory is the interface responsible for generating the according registries from the metadata. +type Factory interface { + CreateCallRegistry(meta *types.Metadata) (CallRegistry, error) + CreateErrorRegistry(meta *types.Metadata) (ErrorRegistry, error) + CreateEventRegistry(meta *types.Metadata) (EventRegistry, error) + CreateExtrinsicDecoder(meta *types.Metadata) (*ExtrinsicDecoder, error) +} + +// CallRegistry maps a call name to its TypeDecoder. +type CallRegistry map[types.CallIndex]*TypeDecoder + +// ErrorID is the type using for identifying an error in the metadata. +type ErrorID struct { + ModuleIndex types.U8 + ErrorIndex [4]types.U8 +} + +// ErrorRegistry maps an error name to its TypeDecoder. +type ErrorRegistry map[ErrorID]*TypeDecoder + +// EventRegistry maps an event ID to its TypeDecoder. +type EventRegistry map[types.EventID]*TypeDecoder + +// FieldOverride is used to override the default FieldDecoder for a particular type. +type FieldOverride struct { + FieldLookupIndex int64 + FieldDecoder FieldDecoder +} + +type factory struct { + fieldStorage map[int64]FieldDecoder + recursiveFieldStorage map[int64]*RecursiveDecoder + fieldOverrides []FieldOverride +} + +// NewFactory creates a new Factory using the provided overrides, if any. +func NewFactory(fieldOverrides ...FieldOverride) Factory { + f := &factory{} + f.fieldOverrides = fieldOverrides + + return f +} + +func (f *factory) resetStorages() { + f.fieldStorage = make(map[int64]FieldDecoder) + f.recursiveFieldStorage = make(map[int64]*RecursiveDecoder) + + for _, fieldOverride := range f.fieldOverrides { + f.fieldStorage[fieldOverride.FieldLookupIndex] = fieldOverride.FieldDecoder + } +} + +// CreateErrorRegistry creates the registry that contains the types for errors. +// nolint:dupl +func (f *factory) CreateErrorRegistry(meta *types.Metadata) (ErrorRegistry, error) { + f.resetStorages() + + errorRegistry := make(map[ErrorID]*TypeDecoder) + + for _, mod := range meta.AsMetadataV14.Pallets { + if !mod.HasErrors { + continue + } + + errorsType, ok := meta.AsMetadataV14.EfficientLookup[mod.Errors.Type.Int64()] + + if !ok { + return nil, ErrErrorsTypeNotFound.WithMsg("errors type '%d', module '%s'", mod.Errors.Type.Int64(), mod.Name) + } + + if !errorsType.Def.IsVariant { + return nil, ErrErrorsTypeNotVariant.WithMsg("errors type '%d', module '%s'", mod.Errors.Type.Int64(), mod.Name) + } + + for _, errorVariant := range errorsType.Def.Variant.Variants { + errorName := fmt.Sprintf("%s.%s", mod.Name, errorVariant.Name) + + errorFields, err := f.getTypeFields(meta, errorVariant.Fields) + + if err != nil { + return nil, ErrErrorFieldsRetrieval.WithMsg(errorName).Wrap(err) + } + + errorID := ErrorID{ + ModuleIndex: mod.Index, + ErrorIndex: [4]types.U8{errorVariant.Index}, + } + + errorRegistry[errorID] = &TypeDecoder{ + Name: errorName, + Fields: errorFields, + } + } + } + + if err := f.resolveRecursiveDecoders(); err != nil { + return nil, ErrRecursiveDecodersResolving.Wrap(err) + } + + return errorRegistry, nil +} + +// CreateCallRegistry creates the registry that contains the types for calls. +// nolint:dupl +func (f *factory) CreateCallRegistry(meta *types.Metadata) (CallRegistry, error) { + f.resetStorages() + + callRegistry := make(map[types.CallIndex]*TypeDecoder) + + for _, mod := range meta.AsMetadataV14.Pallets { + if !mod.HasCalls { + continue + } + + callsType, ok := meta.AsMetadataV14.EfficientLookup[mod.Calls.Type.Int64()] + + if !ok { + return nil, ErrCallsTypeNotFound.WithMsg("calls type '%d', module '%s'", mod.Calls.Type.Int64(), mod.Name) + } + + if !callsType.Def.IsVariant { + return nil, ErrCallsTypeNotVariant.WithMsg("calls type '%d', module '%s'", mod.Calls.Type.Int64(), mod.Name) + } + + for _, callVariant := range callsType.Def.Variant.Variants { + callIndex := types.CallIndex{ + SectionIndex: uint8(mod.Index), + MethodIndex: uint8(callVariant.Index), + } + + callName := fmt.Sprintf("%s.%s", mod.Name, callVariant.Name) + + callFields, err := f.getTypeFields(meta, callVariant.Fields) + + if err != nil { + return nil, ErrCallFieldsRetrieval.WithMsg(callName).Wrap(err) + } + + callRegistry[callIndex] = &TypeDecoder{ + Name: callName, + Fields: callFields, + } + } + } + + if err := f.resolveRecursiveDecoders(); err != nil { + return nil, ErrRecursiveDecodersResolving.Wrap(err) + } + + return callRegistry, nil +} + +// CreateEventRegistry creates the registry that contains the types for events. +func (f *factory) CreateEventRegistry(meta *types.Metadata) (EventRegistry, error) { + f.resetStorages() + + eventRegistry := make(map[types.EventID]*TypeDecoder) + + for _, mod := range meta.AsMetadataV14.Pallets { + if !mod.HasEvents { + continue + } + + eventsType, ok := meta.AsMetadataV14.EfficientLookup[mod.Events.Type.Int64()] + + if !ok { + return nil, ErrEventsTypeNotFound.WithMsg("events type '%d', module '%s'", mod.Events.Type.Int64(), mod.Name) + } + + if !eventsType.Def.IsVariant { + return nil, ErrEventsTypeNotVariant.WithMsg("events type '%d', module '%s'", mod.Events.Type.Int64(), mod.Name) + } + + for _, eventVariant := range eventsType.Def.Variant.Variants { + eventID := types.EventID{byte(mod.Index), byte(eventVariant.Index)} + + eventName := fmt.Sprintf("%s.%s", mod.Name, eventVariant.Name) + + eventFields, err := f.getTypeFields(meta, eventVariant.Fields) + + if err != nil { + return nil, ErrEventFieldsRetrieval.WithMsg(eventName).Wrap(err) + } + + eventRegistry[eventID] = &TypeDecoder{ + Name: eventName, + Fields: eventFields, + } + } + } + + if err := f.resolveRecursiveDecoders(); err != nil { + return nil, ErrRecursiveDecodersResolving.Wrap(err) + } + + return eventRegistry, nil +} + +// CreateExtrinsicDecoder creates an ExtrinsicDecoder based on the Extrinsic information provided in the metadata. +func (f *factory) CreateExtrinsicDecoder(meta *types.Metadata) (*ExtrinsicDecoder, error) { + f.resetStorages() + + extrinsicLookupID := meta.AsMetadataV14.Extrinsic.Type + + extrinsicType := meta.AsMetadataV14.EfficientLookup[extrinsicLookupID.Int64()] + + extrinsicParams, err := extractExtrinsicParams(extrinsicType, meta) + + if err != nil { + return nil, err + } + + if err := validateExtrinsicParams(extrinsicParams); err != nil { + return nil, err + } + + extrinsicFields, err := f.getTypeParams(meta, extrinsicParams) + + if err != nil { + return nil, ErrExtrinsicFieldRetrieval + } + + if err := f.resolveRecursiveDecoders(); err != nil { + return nil, ErrRecursiveDecodersResolving.Wrap(err) + } + + return &ExtrinsicDecoder{ + Fields: extrinsicFields, + }, nil +} + +const ( + ExtrinsicAddressName = "Address" + ExtrinsicSignatureName = "Signature" + ExtrinsicExtraName = "Extra" + ExtrinsicCallName = "Call" +) + +var expectedExtrinsicParams = map[string]struct{}{ + ExtrinsicAddressName: {}, + ExtrinsicSignatureName: {}, + ExtrinsicExtraName: {}, + ExtrinsicCallName: {}, +} + +func validateExtrinsicParams(params []types.Si1TypeParameter) error { + if len(params) != ExpectedExtrinsicParamsCount { + return ErrInvalidExtrinsicParams + } + + for _, param := range params { + if _, ok := expectedExtrinsicParams[string(param.Name)]; !ok { + return ErrUnexpectedExtrinsicParam.WithMsg("param - '%s'", param.Name) + } + } + + return nil +} + +// resolveRecursiveDecoders resolves all recursive decoders with their according FieldDecoder. +// nolint:lll +func (f *factory) resolveRecursiveDecoders() error { + for recursiveFieldLookupIndex, recursiveFieldDecoder := range f.recursiveFieldStorage { + if recursiveFieldDecoder.FieldDecoder != nil { + // Skip if the inner FieldDecoder is present, this could be an override. + continue + } + + fieldDecoder, ok := f.fieldStorage[recursiveFieldLookupIndex] + + if !ok { + return ErrFieldDecoderForRecursiveFieldNotFound. + WithMsg( + "recursive field lookup index %d", + recursiveFieldLookupIndex, + ) + } + + if _, ok := fieldDecoder.(*RecursiveDecoder); ok { + return ErrRecursiveFieldResolving. + WithMsg( + "recursive field lookup index %d", + recursiveFieldLookupIndex, + ) + } + + recursiveFieldDecoder.FieldDecoder = fieldDecoder + } + + return nil +} + +// getTypeFields returns a list of fields and their respective decoders from the provided parameters. +func (f *factory) getTypeParams(meta *types.Metadata, params []types.Si1TypeParameter) ([]*Field, error) { + var typeFields []*Field + + for _, param := range params { + paramType, ok := meta.AsMetadataV14.EfficientLookup[param.Type.Int64()] + + if !ok { + return nil, ErrFieldTypeNotFound.WithMsg(string(param.Name)) + } + + paramName := string(param.Name) + + if storedFieldDecoder, ok := f.getStoredFieldDecoder(param.Type.Int64()); ok { + typeFields = append(typeFields, &Field{ + Name: paramName, + FieldDecoder: storedFieldDecoder, + LookupIndex: param.Type.Int64(), + }) + continue + } + + paramTypeDef := paramType.Def + + fieldDecoder, err := f.getFieldDecoder(meta, paramName, paramTypeDef) + + if err != nil { + return nil, ErrFieldDecoderRetrieval.WithMsg(paramName).Wrap(err) + } + + f.fieldStorage[param.Type.Int64()] = fieldDecoder + + typeFields = append(typeFields, &Field{ + Name: paramName, + FieldDecoder: fieldDecoder, + LookupIndex: param.Type.Int64(), + }) + } + + return typeFields, nil +} + +// getTypeFields parses and returns all Field(s) for a type. +func (f *factory) getTypeFields(meta *types.Metadata, fields []types.Si1Field) ([]*Field, error) { + var typeFields []*Field + + for _, field := range fields { + fieldType, ok := meta.AsMetadataV14.EfficientLookup[field.Type.Int64()] + + if !ok { + return nil, ErrFieldTypeNotFound.WithMsg(string(field.Name)) + } + + fieldName := getFullFieldName(field, fieldType) + + if storedFieldDecoder, ok := f.getStoredFieldDecoder(field.Type.Int64()); ok { + typeFields = append(typeFields, &Field{ + Name: fieldName, + FieldDecoder: storedFieldDecoder, + LookupIndex: field.Type.Int64(), + }) + continue + } + + fieldTypeDef := fieldType.Def + + fieldDecoder, err := f.getFieldDecoder(meta, fieldName, fieldTypeDef) + + if err != nil { + return nil, ErrFieldDecoderRetrieval.WithMsg(fieldName).Wrap(err) + } + + f.fieldStorage[field.Type.Int64()] = fieldDecoder + + typeFields = append(typeFields, &Field{ + Name: fieldName, + FieldDecoder: fieldDecoder, + LookupIndex: field.Type.Int64(), + }) + } + + return typeFields, nil +} + +// getFieldDecoder returns the FieldDecoder based on the provided type definition. +// nolint:funlen +func (f *factory) getFieldDecoder( + meta *types.Metadata, + fieldName string, + typeDef types.Si1TypeDef, +) (FieldDecoder, error) { + switch { + case typeDef.IsCompact: + compactFieldType, ok := meta.AsMetadataV14.EfficientLookup[typeDef.Compact.Type.Int64()] + + if !ok { + return nil, ErrCompactFieldTypeNotFound.WithMsg(fieldName) + } + + return f.getCompactFieldDecoder(meta, fieldName, compactFieldType.Def) + case typeDef.IsComposite: + compositeDecoder := &CompositeDecoder{ + FieldName: fieldName, + } + + fields, err := f.getTypeFields(meta, typeDef.Composite.Fields) + + if err != nil { + return nil, ErrCompositeTypeFieldsRetrieval.WithMsg(fieldName).Wrap(err) + } + + compositeDecoder.Fields = fields + + return compositeDecoder, nil + case typeDef.IsVariant: + return f.getVariantFieldDecoder(meta, typeDef) + case typeDef.IsPrimitive: + return getPrimitiveDecoder(typeDef.Primitive.Si0TypeDefPrimitive) + case typeDef.IsArray: + arrayFieldType, ok := meta.AsMetadataV14.EfficientLookup[typeDef.Array.Type.Int64()] + + if !ok { + return nil, ErrArrayFieldTypeNotFound.WithMsg(fieldName) + } + + return f.getArrayFieldDecoder(uint(typeDef.Array.Len), meta, fieldName, arrayFieldType.Def) + case typeDef.IsSequence: + vectorFieldType, ok := meta.AsMetadataV14.EfficientLookup[typeDef.Sequence.Type.Int64()] + + if !ok { + return nil, ErrVectorFieldTypeNotFound.WithMsg(fieldName) + } + + return f.getSliceFieldDecoder(meta, fieldName, vectorFieldType.Def) + case typeDef.IsTuple: + if typeDef.Tuple == nil { + return &NoopDecoder{}, nil + } + + return f.getTupleFieldDecoder(meta, fieldName, typeDef.Tuple) + case typeDef.IsBitSequence: + return f.getBitSequenceDecoder(meta, fieldName, typeDef.BitSequence) + default: + return nil, ErrFieldTypeDefinitionNotSupported.WithMsg(fieldName) + } +} + +// getVariantFieldDecoder parses a variant type definition and returns a VariantDecoder. +func (f *factory) getVariantFieldDecoder(meta *types.Metadata, typeDef types.Si1TypeDef) (FieldDecoder, error) { + variantDecoder := &VariantDecoder{} + + fieldDecoderMap := make(map[byte]FieldDecoder) + + for _, variant := range typeDef.Variant.Variants { + if len(variant.Fields) == 0 { + fieldDecoderMap[byte(variant.Index)] = &NoopDecoder{} + continue + } + + variantName := getVariantName(variant) + + compositeDecoder := &CompositeDecoder{ + FieldName: variantName, + } + + fields, err := f.getTypeFields(meta, variant.Fields) + + if err != nil { + return nil, ErrVariantTypeFieldsRetrieval.WithMsg("variant '%d'", variant.Index).Wrap(err) + } + + compositeDecoder.Fields = fields + + fieldDecoderMap[byte(variant.Index)] = compositeDecoder + } + + variantDecoder.FieldDecoderMap = fieldDecoderMap + + return variantDecoder, nil +} + +const ( + variantItemFieldNameFormat = "variant_item_%d" +) + +func getVariantName(variant types.Si1Variant) string { + if variant.Name != "" { + return string(variant.Name) + } + + return fmt.Sprintf(variantItemFieldNameFormat, variant.Index) +} + +const ( + tupleItemFieldNameFormat = "tuple_item_%d" +) + +// getCompactFieldDecoder parses a compact type definition and returns the according field decoder. +// nolint:funlen,lll +func (f *factory) getCompactFieldDecoder(meta *types.Metadata, fieldName string, typeDef types.Si1TypeDef) (FieldDecoder, error) { + switch { + case typeDef.IsPrimitive: + return &ValueDecoder[types.UCompact]{}, nil + case typeDef.IsTuple: + if typeDef.Tuple == nil { + return &NoopDecoder{}, nil + } + + compositeDecoder := &CompositeDecoder{ + FieldName: fieldName, + } + + for i, item := range typeDef.Tuple { + itemTypeDef, ok := meta.AsMetadataV14.EfficientLookup[item.Int64()] + + if !ok { + return nil, ErrCompactTupleItemTypeNotFound.WithMsg("tuple item '%d'", item.Int64()) + } + + fieldName := fmt.Sprintf(tupleItemFieldNameFormat, i) + + itemFieldDecoder, err := f.getCompactFieldDecoder(meta, fieldName, itemTypeDef.Def) + + if err != nil { + return nil, ErrCompactTupleItemFieldDecoderRetrieval. + WithMsg("tuple item '%d'", item.Int64()). + Wrap(err) + } + + compositeDecoder.Fields = append(compositeDecoder.Fields, &Field{ + Name: fieldName, + FieldDecoder: itemFieldDecoder, + LookupIndex: item.Int64(), + }) + } + + return compositeDecoder, nil + case typeDef.IsComposite: + compactCompositeFields := typeDef.Composite.Fields + + compositeDecoder := &CompositeDecoder{ + FieldName: fieldName, + } + + for _, compactCompositeField := range compactCompositeFields { + compactCompositeFieldType, ok := meta.AsMetadataV14.EfficientLookup[compactCompositeField.Type.Int64()] + + if !ok { + return nil, ErrCompactCompositeFieldTypeNotFound + } + + compactFieldName := getFullFieldName(compactCompositeField, compactCompositeFieldType) + + compactCompositeDecoder, err := f.getCompactFieldDecoder(meta, compactFieldName, compactCompositeFieldType.Def) + + if err != nil { + return nil, ErrCompactCompositeFieldDecoderRetrieval.Wrap(err) + } + + compositeDecoder.Fields = append(compositeDecoder.Fields, &Field{ + Name: compactFieldName, + FieldDecoder: compactCompositeDecoder, + LookupIndex: compactCompositeField.Type.Int64(), + }) + } + + return compositeDecoder, nil + default: + return nil, errors.New("unsupported compact field type") + } +} + +// getArrayFieldDecoder parses an array type definition and returns an ArrayDecoder. +// nolint:lll +func (f *factory) getArrayFieldDecoder(arrayLen uint, meta *types.Metadata, fieldName string, typeDef types.Si1TypeDef) (FieldDecoder, error) { + itemFieldDecoder, err := f.getFieldDecoder(meta, fieldName, typeDef) + + if err != nil { + return nil, ErrArrayItemFieldDecoderRetrieval.Wrap(err) + } + + return &ArrayDecoder{Length: arrayLen, ItemDecoder: itemFieldDecoder}, nil +} + +// getSliceFieldDecoder parses a slice type definition and returns an SliceDecoder. +func (f *factory) getSliceFieldDecoder( + meta *types.Metadata, + fieldName string, + typeDef types.Si1TypeDef, +) (FieldDecoder, error) { + itemFieldDecoder, err := f.getFieldDecoder(meta, fieldName, typeDef) + + if err != nil { + return nil, ErrSliceItemFieldDecoderRetrieval.Wrap(err) + } + + return &SliceDecoder{itemFieldDecoder}, nil +} + +// getTupleFieldDecoder parses a tuple type definition and returns a CompositeDecoder. +func (f *factory) getTupleFieldDecoder( + meta *types.Metadata, + fieldName string, + tuple types.Si1TypeDefTuple, +) (FieldDecoder, error) { + compositeDecoder := &CompositeDecoder{ + FieldName: fieldName, + } + + for i, item := range tuple { + itemTypeDef, ok := meta.AsMetadataV14.EfficientLookup[item.Int64()] + + if !ok { + return nil, ErrTupleItemTypeNotFound.WithMsg("tuple item '%d'", i) + } + + tupleFieldName := fmt.Sprintf(tupleItemFieldNameFormat, i) + + itemFieldDecoder, err := f.getFieldDecoder(meta, tupleFieldName, itemTypeDef.Def) + + if err != nil { + return nil, ErrTupleItemFieldDecoderRetrieval.Wrap(err) + } + + compositeDecoder.Fields = append(compositeDecoder.Fields, &Field{ + Name: tupleFieldName, + FieldDecoder: itemFieldDecoder, + LookupIndex: item.Int64(), + }) + } + + return compositeDecoder, nil +} + +func (f *factory) getBitSequenceDecoder( + meta *types.Metadata, + fieldName string, + bitSequenceTypeDef types.Si1TypeDefBitSequence, +) (FieldDecoder, error) { + bitStoreType, ok := meta.AsMetadataV14.EfficientLookup[bitSequenceTypeDef.BitStoreType.Int64()] + + if !ok { + return nil, ErrBitStoreTypeNotFound.WithMsg(fieldName) + } + + if bitStoreType.Def.Primitive.Si0TypeDefPrimitive != types.IsU8 { + return nil, ErrBitStoreTypeNotSupported.WithMsg(fieldName) + } + + bitOrderType, ok := meta.AsMetadataV14.EfficientLookup[bitSequenceTypeDef.BitOrderType.Int64()] + + if !ok { + return nil, ErrBitOrderTypeNotFound.WithMsg(fieldName) + } + + bitOrder, err := types.NewBitOrderFromString(getBitOrderString(bitOrderType.Path)) + + if err != nil { + return nil, ErrBitOrderCreation.Wrap(err) + } + + bitSequenceDecoder := &BitSequenceDecoder{ + FieldName: fieldName, + BitOrder: bitOrder, + } + + return bitSequenceDecoder, nil +} + +// getStoredFieldDecoder will attempt to return a FieldDecoder from storage, +// and perform an extra check for recursive decoders. +func (f *factory) getStoredFieldDecoder(fieldLookupIndex int64) (FieldDecoder, bool) { + if ft, ok := f.fieldStorage[fieldLookupIndex]; ok { + if rt, ok := ft.(*RecursiveDecoder); ok { + f.recursiveFieldStorage[fieldLookupIndex] = rt + } + + return ft, ok + } + + // Ensure that a recursive type such as Xcm::TransferReserveAsset does not cause an infinite loop + // by adding the RecursiveDecoder the first time the field is encountered. + f.fieldStorage[fieldLookupIndex] = &RecursiveDecoder{} + + return nil, false +} + +const ( + // ExpectedExtrinsicParamsCount is the count of generic params that we expect for a + // generic Extrinsic type from the metadata. + // + // The parameters are expected to be in the following order: + // 1. Address + // 2. Call + // 3. Signature + // 4. Extra + ExpectedExtrinsicParamsCount = 4 +) + +// genericExtrinsicPath represents the expected metadata path of a generic extrinsic. +var genericExtrinsicPath = types.Si1Path{ + "sp_runtime", + "generic", + "unchecked_extrinsic", + "UncheckedExtrinsic", +} + +// isGenericExtrinsic checks if the metadata path of the extrinsic path matches the one of the +// generic extrinsic. +func isGenericExtrinsic(path types.Si1Path) bool { + if len(path) != len(genericExtrinsicPath) { + return false + } + + for i := range path { + if path[i] != genericExtrinsicPath[i] { + return false + } + } + + return true +} + +// extractExtrinsicParams returns the extrinsic params if the provided extrinsic type is generic, otherwise, +// it extracts the generic extrinsic and then returns its params. +func extractExtrinsicParams(extrinsicType *types.Si1Type, meta *types.Metadata) ([]types.Si1TypeParameter, error) { + if isGenericExtrinsic(extrinsicType.Path) { + return extrinsicType.Params, nil + } + + // If the metadata extrinsic type is not generic, its type is expected to be a composite with 1 field. + if !extrinsicType.Def.IsComposite || len(extrinsicType.Def.Composite.Fields) != 1 { + return nil, ErrInvalidExtrinsicType + } + + // This composite field is the `sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic`. + genericUncheckedExtrinsic := extrinsicType.Def.Composite.Fields[0] + + genericUncheckedExtrinsicType := meta.AsMetadataV14.EfficientLookup[genericUncheckedExtrinsic.Type.Int64()] + + if !isGenericExtrinsic(genericUncheckedExtrinsicType.Path) { + return nil, ErrInvalidGenericExtrinsicType + } + + return genericUncheckedExtrinsicType.Params, nil +} + +func getBitOrderString(path types.Si1Path) string { + pathLen := len(path) + + if pathLen == 0 { + return "" + } + + return string(path[pathLen-1]) +} + +const ( + fieldSeparator = "." + lookupIndexFormat = "lookup_index_%d" +) + +func getFieldPath(fieldType *types.Si1Type) string { + var nameParts []string + + for _, pathEntry := range fieldType.Path { + nameParts = append(nameParts, string(pathEntry)) + } + + return strings.Join(nameParts, fieldSeparator) +} + +func getFullFieldName(field types.Si1Field, fieldType *types.Si1Type) string { + fieldName := getFieldName(field) + + if fieldPath := getFieldPath(fieldType); fieldPath != "" { + return fmt.Sprintf("%s%s%s", fieldPath, fieldSeparator, fieldName) + } + + return getFieldName(field) +} + +func getFieldName(field types.Si1Field) string { + switch { + case field.HasName: + return string(field.Name) + case field.HasTypeName: + return string(field.TypeName) + default: + return fmt.Sprintf(lookupIndexFormat, field.Type.Int64()) + } +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/registry/parser/error.go b/pkg/dia/helpers/substrate-helper/gsrpc/registry/parser/error.go new file mode 100644 index 000000000..0fc7d0eea --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/registry/parser/error.go @@ -0,0 +1,12 @@ +package parser + +import libErr "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/error" + +const ( + ErrEventsCountDecoding = libErr.Error("events count decoding") + ErrEventPhaseDecoding = libErr.Error("event phase decoding") + ErrEventIDDecoding = libErr.Error("event ID decoding") + ErrEventDecoderNotFound = libErr.Error("event decoder not found") + ErrEventFieldsDecoding = libErr.Error("event fields decoding") + ErrEventTopicsDecoding = libErr.Error("event topics decoding") +) diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/registry/parser/event_parser.go b/pkg/dia/helpers/substrate-helper/gsrpc/registry/parser/event_parser.go new file mode 100644 index 000000000..69e5742cc --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/registry/parser/event_parser.go @@ -0,0 +1,95 @@ +package parser + +import ( + "bytes" + "fmt" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/registry" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// Event holds all the information of a decoded storage event. +type Event struct { + Name string + Fields registry.DecodedFields + EventID types.EventID + Phase *types.Phase + Topics []types.Hash +} + +//go:generate mockery --name EventParser --structname EventParserMock --filename event_parser_mock.go --inpackage + +// EventParser is the interface used for parsing event storage data into []*Event. +type EventParser interface { + ParseEvents(eventRegistry registry.EventRegistry, sd *types.StorageDataRaw) ([]*Event, error) +} + +// EventParserFn implements EventParser. +type EventParserFn func(eventRegistry registry.EventRegistry, sd *types.StorageDataRaw) ([]*Event, error) + +// ParseEvents is the function required for satisfying the EventParser interface. +func (f EventParserFn) ParseEvents(eventRegistry registry.EventRegistry, sd *types.StorageDataRaw) ([]*Event, error) { + return f(eventRegistry, sd) +} + +// NewEventParser creates a new EventParser. +func NewEventParser() EventParser { + // The EventParserFn provided here is decoding the total number of events from the storage data then attempts + // to decode all the information for each event. + return EventParserFn(func(eventRegistry registry.EventRegistry, sd *types.StorageDataRaw) ([]*Event, error) { + decoder := scale.NewDecoder(bytes.NewReader(*sd)) + + eventsCount, err := decoder.DecodeUintCompact() + + if err != nil { + return nil, ErrEventsCountDecoding.Wrap(err) + } + + var events []*Event + + for i := uint64(0); i < eventsCount.Uint64(); i++ { + var phase types.Phase + + if err := decoder.Decode(&phase); err != nil { + return nil, ErrEventPhaseDecoding.Wrap(fmt.Errorf("event #%d: %w", i, err)) + } + + var eventID types.EventID + + if err := decoder.Decode(&eventID); err != nil { + return nil, ErrEventIDDecoding.Wrap(fmt.Errorf("event #%d: %w", i, err)) + } + + eventDecoder, ok := eventRegistry[eventID] + + if !ok { + return nil, ErrEventDecoderNotFound.WithMsg("event #%d with ID: %v", i, eventID) + } + + eventFields, err := eventDecoder.Decode(decoder) + + if err != nil { + return nil, ErrEventFieldsDecoding.Wrap(fmt.Errorf("event #%d: %w", i, err)) + } + + var topics []types.Hash + + if err := decoder.Decode(&topics); err != nil { + return nil, ErrEventTopicsDecoding.Wrap(fmt.Errorf("event #%d: %w", i, err)) + } + + event := &Event{ + Name: eventDecoder.Name, + Fields: eventFields, + EventID: eventID, + Phase: &phase, + Topics: topics, + } + + events = append(events, event) + } + + return events, nil + }) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/registry/retriever/error.go b/pkg/dia/helpers/substrate-helper/gsrpc/registry/retriever/error.go new file mode 100644 index 000000000..8f42546f8 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/registry/retriever/error.go @@ -0,0 +1,14 @@ +package retriever + +import libErr "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/error" + +const ( + ErrInternalStateUpdate = libErr.Error("internal state update") + ErrBlockRetrieval = libErr.Error("block retrieval") + ErrExtrinsicDecoding = libErr.Error("extrinsic parsing") + ErrMetadataRetrieval = libErr.Error("metadata retrieval") + ErrExtrinsicDecoderCreation = libErr.Error("extrinsic decoder creation") + ErrStorageEventRetrieval = libErr.Error("storage event retrieval") + ErrEventParsing = libErr.Error("event parsing") + ErrEventRegistryCreation = libErr.Error("event registry creation") +) diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/registry/retriever/event_retriever.go b/pkg/dia/helpers/substrate-helper/gsrpc/registry/retriever/event_retriever.go new file mode 100644 index 000000000..e9e172089 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/registry/retriever/event_retriever.go @@ -0,0 +1,152 @@ +package retriever + +import ( + "time" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/registry" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/registry/exec" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/registry/parser" + regState "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/registry/state" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +//nolint:lll +//go:generate mockery --name EventRetriever --structname EventRetrieverMock --filename event_retriever_mock.go --inpackage + +// EventRetriever is the interface used for retrieving and decoding events. +type EventRetriever interface { + GetEvents(blockHash types.Hash) ([]*parser.Event, error) +} + +// eventRetriever implements the EventRetriever interface. +type eventRetriever struct { + eventParser parser.EventParser + + eventProvider regState.EventProvider + stateRPC state.State + + registryFactory registry.Factory + + eventStorageExecutor exec.RetryableExecutor[*types.StorageDataRaw] + eventParsingExecutor exec.RetryableExecutor[[]*parser.Event] + + eventRegistry registry.EventRegistry + meta *types.Metadata +} + +// NewEventRetriever creates a new EventRetriever. +func NewEventRetriever( + eventParser parser.EventParser, + eventProvider regState.EventProvider, + stateRPC state.State, + registryFactory registry.Factory, + eventStorageExecutor exec.RetryableExecutor[*types.StorageDataRaw], + eventParsingExecutor exec.RetryableExecutor[[]*parser.Event], +) (EventRetriever, error) { + retriever := &eventRetriever{ + eventParser: eventParser, + eventProvider: eventProvider, + stateRPC: stateRPC, + registryFactory: registryFactory, + eventStorageExecutor: eventStorageExecutor, + eventParsingExecutor: eventParsingExecutor, + } + + if err := retriever.updateInternalState(nil); err != nil { + return nil, ErrInternalStateUpdate.Wrap(err) + } + + return retriever, nil +} + +// NewDefaultEventRetriever creates a new EventRetriever using defaults for: +// +// - parser.EventParser +// - registry.Factory +// - exec.RetryableExecutor - used for retrieving event storage data. +// - exec.RetryableExecutor - used for parsing events. +func NewDefaultEventRetriever( + eventProvider regState.EventProvider, + stateRPC state.State, + fieldOverrides ...registry.FieldOverride, +) (EventRetriever, error) { + eventParser := parser.NewEventParser() + registryFactory := registry.NewFactory(fieldOverrides...) + + eventStorageExecutor := exec.NewRetryableExecutor[*types.StorageDataRaw](exec.WithRetryTimeout(1 * time.Second)) + eventParsingExecutor := exec.NewRetryableExecutor[[]*parser.Event](exec.WithMaxRetryCount(1)) + + return NewEventRetriever( + eventParser, + eventProvider, + stateRPC, + registryFactory, + eventStorageExecutor, + eventParsingExecutor, + ) +} + +// GetEvents retrieves the storage data for an Event and then parses it. +// +// Both the event storage data retrieval and the event parsing are handled via the exec.RetryableExecutor +// in order to ensure retries in case of network errors or parsing errors due to an outdated event registry. +func (e *eventRetriever) GetEvents(blockHash types.Hash) ([]*parser.Event, error) { + storageEvents, err := e.eventStorageExecutor.ExecWithFallback( + func() (*types.StorageDataRaw, error) { + return e.eventProvider.GetStorageEvents(e.meta, blockHash) + }, + func() error { + return e.updateInternalState(&blockHash) + }, + ) + + if err != nil { + return nil, ErrStorageEventRetrieval.Wrap(err) + } + + events, err := e.eventParsingExecutor.ExecWithFallback( + func() ([]*parser.Event, error) { + return e.eventParser.ParseEvents(e.eventRegistry, storageEvents) + }, + func() error { + return e.updateInternalState(&blockHash) + }, + ) + + if err != nil { + return nil, ErrEventParsing.Wrap(err) + } + + return events, nil +} + +// updateInternalState will retrieve the metadata at the provided blockHash, if provided, +// create an event registry based on this metadata and store both. +func (e *eventRetriever) updateInternalState(blockHash *types.Hash) error { + var ( + meta *types.Metadata + err error + ) + + if blockHash == nil { + meta, err = e.stateRPC.GetMetadataLatest() + } else { + meta, err = e.stateRPC.GetMetadata(*blockHash) + } + + if err != nil { + return ErrMetadataRetrieval.Wrap(err) + } + + eventRegistry, err := e.registryFactory.CreateEventRegistry(meta) + + if err != nil { + return ErrEventRegistryCreation.Wrap(err) + } + + e.meta = meta + e.eventRegistry = eventRegistry + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/registry/retriever/extrinsic_retriever.go b/pkg/dia/helpers/substrate-helper/gsrpc/registry/retriever/extrinsic_retriever.go new file mode 100644 index 000000000..cbffa5e02 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/registry/retriever/extrinsic_retriever.go @@ -0,0 +1,140 @@ +package retriever + +import ( + "time" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/registry" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/registry/exec" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/rpc/chain" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/block" +) + +//nolint:lll +//go:generate mockery --name ExtrinsicRetriever --structname ExtrinsicRetrieverMock --filename extrinsic_retriever_mock.go --inpackage + +// ExtrinsicRetriever is the interface used for retrieving and decoding extrinsic information +// from a particular block. +type ExtrinsicRetriever interface { + GetExtrinsics(blockHash types.Hash) ([]*registry.DecodedExtrinsic, error) +} + +// extrinsicRetriever implements the ExtrinsicRetriever interface. +type extrinsicRetriever struct { + chainRPC chain.Chain + stateRPC state.State + + registryFactory registry.Factory + + chainExecutor exec.RetryableExecutor[*block.SignedBlock] + extrinsicDecodingExecutor exec.RetryableExecutor[[]*registry.DecodedExtrinsic] + + extrinsicDecoder *registry.ExtrinsicDecoder +} + +// NewExtrinsicRetriever creates a new ExtrinsicRetriever. +func NewExtrinsicRetriever( + chainRPC chain.Chain, + stateRPC state.State, + registryFactory registry.Factory, + chainExecutor exec.RetryableExecutor[*block.SignedBlock], + extrinsicDecodingExecutor exec.RetryableExecutor[[]*registry.DecodedExtrinsic], +) (ExtrinsicRetriever, error) { + retriever := &extrinsicRetriever{ + chainRPC: chainRPC, + stateRPC: stateRPC, + registryFactory: registryFactory, + chainExecutor: chainExecutor, + extrinsicDecodingExecutor: extrinsicDecodingExecutor, + } + + if err := retriever.updateInternalState(nil); err != nil { + return nil, ErrInternalStateUpdate.Wrap(err) + } + + return retriever, nil +} + +// NewDefaultExtrinsicRetriever returns an ExtrinsicRetriever with default values for the factory and executors. +func NewDefaultExtrinsicRetriever( + chainRPC chain.Chain, + stateRPC state.State, + fieldOverrides ...registry.FieldOverride, +) (ExtrinsicRetriever, error) { + registryFactory := registry.NewFactory(fieldOverrides...) + + chainExecutor := exec.NewRetryableExecutor[*block.SignedBlock](exec.WithRetryTimeout(1 * time.Second)) + extrinsicDecodingExecutor := exec.NewRetryableExecutor[[]*registry.DecodedExtrinsic](exec.WithMaxRetryCount(1)) + + return NewExtrinsicRetriever( + chainRPC, + stateRPC, + registryFactory, + chainExecutor, + extrinsicDecodingExecutor, + ) +} + +// GetExtrinsics retrieves a generic.SignedBlock and then parses the extrinsics found in it. +// +// Both the block retrieval and the extrinsic parsing are handled via the exec.RetryableExecutor +// in order to ensure retries in case of network errors or parsing errors due to an outdated extrinsic decoder. +func (e *extrinsicRetriever) GetExtrinsics(blockHash types.Hash) ([]*registry.DecodedExtrinsic, error) { + block, err := e.chainExecutor.ExecWithFallback( + func() (*block.SignedBlock, error) { + return e.chainRPC.GetBlock(blockHash) + }, + func() error { + return nil + }, + ) + + if err != nil { + return nil, ErrBlockRetrieval.Wrap(err) + } + + calls, err := e.extrinsicDecodingExecutor.ExecWithFallback( + func() ([]*registry.DecodedExtrinsic, error) { + return block.DecodeExtrinsics(e.extrinsicDecoder) + }, + func() error { + return e.updateInternalState(&blockHash) + }, + ) + + if err != nil { + return nil, ErrExtrinsicDecoding.Wrap(err) + } + + return calls, nil +} + +// updateInternalState will retrieve the metadata at the provided blockHash, if provided, +// create an extrinsic decoder based on this metadata and store both. +func (e *extrinsicRetriever) updateInternalState(blockHash *types.Hash) error { + var ( + meta *types.Metadata + err error + ) + + if blockHash == nil { + meta, err = e.stateRPC.GetMetadataLatest() + } else { + meta, err = e.stateRPC.GetMetadata(*blockHash) + } + + if err != nil { + return ErrMetadataRetrieval.Wrap(err) + } + + extrinsicDecoder, err := e.registryFactory.CreateExtrinsicDecoder(meta) + + if err != nil { + return ErrExtrinsicDecoderCreation.Wrap(err) + } + + e.extrinsicDecoder = extrinsicDecoder + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/registry/state/event_provider.go b/pkg/dia/helpers/substrate-helper/gsrpc/registry/state/event_provider.go new file mode 100644 index 000000000..734a80ae3 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/registry/state/event_provider.go @@ -0,0 +1,51 @@ +package state + +import ( + libErr "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/error" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +const ( + ErrEventStorageKeyCreation = libErr.Error("event storage key creation") + ErrEventStorageRetrieval = libErr.Error("event storage retrieval") +) + +//go:generate mockery --name EventProvider --structname EventProviderMock --filename event_provider_mock.go --inpackage + +// EventProvider is the interface used for retrieving event data from the storage. +type EventProvider interface { + GetStorageEvents(meta *types.Metadata, blockHash types.Hash) (*types.StorageDataRaw, error) +} + +// eventProvider implements the EventProvider interface. +type eventProvider struct { + stateRPC state.State +} + +// NewEventProvider creates a new EventProvider. +func NewEventProvider(stateRPC state.State) EventProvider { + return &eventProvider{stateRPC: stateRPC} +} + +const ( + storagePrefix = "System" + storageMethod = "Events" +) + +// GetStorageEvents returns the event storage data found at the provided blockHash. +func (p *eventProvider) GetStorageEvents(meta *types.Metadata, blockHash types.Hash) (*types.StorageDataRaw, error) { + key, err := types.CreateStorageKey(meta, storagePrefix, storageMethod, nil) + + if err != nil { + return nil, ErrEventStorageKeyCreation.Wrap(err) + } + + storageData, err := p.stateRPC.GetStorageRaw(key, blockHash) + + if err != nil { + return nil, ErrEventStorageRetrieval.Wrap(err) + } + + return storageData, nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/author/author.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/author/author.go new file mode 100644 index 000000000..4c65ddc6c --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/author/author.go @@ -0,0 +1,41 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:generate mockery --name Author --filename author.go + +package author + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/client" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic" +) + +type Author interface { + SubmitAndWatchExtrinsic(xt extrinsic.Extrinsic) (*ExtrinsicStatusSubscription, error) + SubmitExtrinsic(xt extrinsic.Extrinsic) (types.Hash, error) + PendingExtrinsics() ([]string, error) +} + +// author exposes methods for authoring of network items +type author struct { + client client.Client +} + +// NewAuthor creates a new author struct +func NewAuthor(cl client.Client) Author { + return &author{cl} +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/author/pending_extrinsics.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/author/pending_extrinsics.go new file mode 100644 index 000000000..4b4b8339b --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/author/pending_extrinsics.go @@ -0,0 +1,28 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package author + +// PendingExtrinsics returns all pending extrinsics. +func (a *author) PendingExtrinsics() ([]string, error) { + var extrinsics []string + err := a.client.Call(&extrinsics, "author_pendingExtrinsics") + if err != nil { + return nil, err + } + + return extrinsics, nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/author/submit_and_watch_extrinsic.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/author/submit_and_watch_extrinsic.go new file mode 100644 index 000000000..1fb0f323f --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/author/submit_and_watch_extrinsic.go @@ -0,0 +1,89 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package author + +import ( + "context" + "sync" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/config" + gethrpc "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/codec" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic" +) + +// ExtrinsicStatusSubscription is a subscription established through one of the Client's subscribe methods. +type ExtrinsicStatusSubscription struct { + sub *gethrpc.ClientSubscription + channel chan types.ExtrinsicStatus + quitOnce sync.Once // ensures quit is closed once +} + +// Chan returns the subscription channel. +// +// The channel is closed when Unsubscribe is called on the subscription. +func (s *ExtrinsicStatusSubscription) Chan() <-chan types.ExtrinsicStatus { + return s.channel +} + +// Err returns the subscription error channel. The intended use of Err is to schedule +// resubscription when the client connection is closed unexpectedly. +// +// The error channel receives a value when the subscription has ended due +// to an error. The received error is nil if Close has been called +// on the underlying client and no other error has occurred. +// +// The error channel is closed when Unsubscribe is called on the subscription. +func (s *ExtrinsicStatusSubscription) Err() <-chan error { + return s.sub.Err() +} + +// Unsubscribe unsubscribes the notification and closes the error channel. +// It can safely be called more than once. +func (s *ExtrinsicStatusSubscription) Unsubscribe() { + s.sub.Unsubscribe() + s.quitOnce.Do(func() { + close(s.channel) + }) +} + +// SubmitAndWatchExtrinsic will submit and subscribe to watch an extrinsic until unsubscribed, returning a subscription +// that will receive server notifications containing the extrinsic status updates. +func (a *author) SubmitAndWatchExtrinsic(xt extrinsic.Extrinsic) (*ExtrinsicStatusSubscription, error) { //nolint:lll + hexEncodedExtrinsic, err := codec.EncodeToHex(xt) + if err != nil { + return nil, err + } + + return a.submitAndWatchExtrinsic(hexEncodedExtrinsic) +} + +func (a *author) submitAndWatchExtrinsic(hexEncodedExtrinsic string) (*ExtrinsicStatusSubscription, error) { //nolint:lll + ctx, cancel := context.WithTimeout(context.Background(), config.Default().SubscribeTimeout) + defer cancel() + + c := make(chan types.ExtrinsicStatus) + + sub, err := a.client.Subscribe(ctx, "author", "submitAndWatchExtrinsic", "unwatchExtrinsic", "extrinsicUpdate", + c, hexEncodedExtrinsic) + if err != nil { + return nil, err + } + + return &ExtrinsicStatusSubscription{sub: sub, channel: c}, nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/author/submit_extrinsic.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/author/submit_extrinsic.go new file mode 100644 index 000000000..47a6f94f2 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/author/submit_extrinsic.go @@ -0,0 +1,39 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package author + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/codec" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic" +) + +// SubmitExtrinsic will submit a fully formatted extrinsic for block inclusion +func (a *author) SubmitExtrinsic(xt extrinsic.Extrinsic) (types.Hash, error) { + enc, err := codec.EncodeToHex(xt) + if err != nil { + return types.Hash{}, err + } + + var res string + err = a.client.Call(&res, "author_submitExtrinsic", enc) + if err != nil { + return types.Hash{}, err + } + + return types.NewHashFromHexString(res) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/beefy/beefy.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/beefy/beefy.go new file mode 100644 index 000000000..39e029e5f --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/beefy/beefy.go @@ -0,0 +1,39 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2021 Snowfork +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:generate mockery --name Beefy --filename beefy.go + +package beefy + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/client" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +type Beefy interface { + GetFinalizedHead() (types.Hash, error) + SubscribeJustifications() (*JustificationsSubscription, error) +} + +// Beefy exposes methods for retrieval of chain data +type beefy struct { + client client.Client +} + +// NewBeefy creates a new Chain struct +func NewBeefy(cl client.Client) Beefy { + return &beefy{cl} +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/beefy/get_finalized_head.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/beefy/get_finalized_head.go new file mode 100644 index 000000000..3374688d3 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/beefy/get_finalized_head.go @@ -0,0 +1,33 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2021 Snowfork +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package beefy + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// GetFinalizedHead returns the hash of the latest BEEFY block +func (b *beefy) GetFinalizedHead() (types.Hash, error) { + var res string + + err := b.client.Call(&res, "beefy_getFinalizedHead") + if err != nil { + return types.Hash{}, err + } + + return types.NewHashFromHexString(res) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/beefy/subscribe_justifications.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/beefy/subscribe_justifications.go new file mode 100644 index 000000000..37fd18f88 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/beefy/subscribe_justifications.go @@ -0,0 +1,78 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2021 Snowfork +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package beefy + +import ( + "context" + "sync" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/config" + gethrpc "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// JustificationsSubscription is a subscription established through one of the Client's subscribe methods. +type JustificationsSubscription struct { + sub *gethrpc.ClientSubscription + channel chan types.SignedCommitment + quitOnce sync.Once // ensures quit is closed once +} + +// Chan returns the subscription channel. +// +// The channel is closed when Unsubscribe is called on the subscription. +func (s *JustificationsSubscription) Chan() <-chan types.SignedCommitment { + return s.channel +} + +// Err returns the subscription error channel. The intended use of Err is to schedule +// resubscription when the client connection is closed unexpectedly. +// +// The error channel receives a value when the subscription has ended due +// to an error. The received error is nil if Close has been called +// on the underlying client and no other error has occurred. +// +// The error channel is closed when Unsubscribe is called on the subscription. +func (s *JustificationsSubscription) Err() <-chan error { + return s.sub.Err() +} + +// Unsubscribe unsubscribes the notification and closes the error channel. +// It can safely be called more than once. +func (s *JustificationsSubscription) Unsubscribe() { + s.sub.Unsubscribe() + s.quitOnce.Do(func() { + close(s.channel) + }) +} + +// SubscribeJustifications subscribes beefy justifications, returning a subscription that will +// receive server notifications containing the Header. +func (b *beefy) SubscribeJustifications() (*JustificationsSubscription, error) { + ctx, cancel := context.WithTimeout(context.Background(), config.Default().SubscribeTimeout) + defer cancel() + + ch := make(chan types.SignedCommitment) + + sub, err := b.client.Subscribe(ctx, "beefy", "subscribeJustifications", "unsubscribeJustifications", + "justifications", ch) + if err != nil { + return nil, err + } + + return &JustificationsSubscription{sub: sub, channel: ch}, nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/chain/chain.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/chain/chain.go new file mode 100644 index 000000000..a47b59f57 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/chain/chain.go @@ -0,0 +1,49 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:generate mockery --name Chain --filename chain.go + +package chain + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/client" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/block" +) + +//go:generate mockery --name Chain --filename chain.go + +type Chain interface { + SubscribeFinalizedHeads() (*FinalizedHeadsSubscription, error) + SubscribeNewHeads() (*NewHeadsSubscription, error) + GetBlockHash(blockNumber uint64) (types.Hash, error) + GetBlockHashLatest() (types.Hash, error) + GetFinalizedHead() (types.Hash, error) + GetBlock(blockHash types.Hash) (*block.SignedBlock, error) + GetBlockLatest() (*block.SignedBlock, error) + GetHeader(blockHash types.Hash) (*types.Header, error) + GetHeaderLatest() (*types.Header, error) +} + +// chain exposes methods for retrieval of chain data +type chain struct { + client client.Client +} + +// NewChain creates a new chain struct +func NewChain(cl client.Client) Chain { + return &chain{cl} +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/chain/get_block.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/chain/get_block.go new file mode 100644 index 000000000..a77ad30dc --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/chain/get_block.go @@ -0,0 +1,43 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package chain + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/client" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/block" +) + +// GetBlock returns the header and body of the relay chain block with the given hash +func (c *chain) GetBlock(blockHash types.Hash) (*block.SignedBlock, error) { + return c.getBlock(&blockHash) +} + +// GetBlockLatest returns the header and body of the latest relay chain block +func (c *chain) GetBlockLatest() (*block.SignedBlock, error) { + return c.getBlock(nil) +} + +func (c *chain) getBlock(blockHash *types.Hash) (*block.SignedBlock, error) { + var res block.SignedBlock + err := client.CallWithBlockHash(c.client, &res, "chain_getBlock", blockHash) + if err != nil { + return nil, err + } + + return &res, nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/chain/get_block_hash.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/chain/get_block_hash.go new file mode 100644 index 000000000..a395867b3 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/chain/get_block_hash.go @@ -0,0 +1,48 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package chain + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// GetBlockHash returns the block hash for a specific block height +func (c *chain) GetBlockHash(blockNumber uint64) (types.Hash, error) { + return c.getBlockHash(&blockNumber) +} + +// GetBlockHashLatest returns the latest block hash +func (c *chain) GetBlockHashLatest() (types.Hash, error) { + return c.getBlockHash(nil) +} + +func (c *chain) getBlockHash(blockNumber *uint64) (types.Hash, error) { + var res string + var err error + + if blockNumber == nil { + err = c.client.Call(&res, "chain_getBlockHash") + } else { + err = c.client.Call(&res, "chain_getBlockHash", *blockNumber) + } + + if err != nil { + return types.Hash{}, err + } + + return types.NewHashFromHexString(res) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/chain/get_finalized_head.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/chain/get_finalized_head.go new file mode 100644 index 000000000..30f5c60a2 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/chain/get_finalized_head.go @@ -0,0 +1,33 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package chain + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// GetFinalizedHead returns the hash of the last finalized block in the canon chain +func (c *chain) GetFinalizedHead() (types.Hash, error) { + var res string + + err := c.client.Call(&res, "chain_getFinalizedHead") + if err != nil { + return types.Hash{}, err + } + + return types.NewHashFromHexString(res) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/chain/get_header.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/chain/get_header.go new file mode 100644 index 000000000..cfdb79f4d --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/chain/get_header.go @@ -0,0 +1,41 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package chain + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/client" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// GetHeader retrieves the header for the specific block +func (c *chain) GetHeader(blockHash types.Hash) (*types.Header, error) { + return c.getHeader(&blockHash) +} + +// GetHeaderLatest retrieves the header of the latest block +func (c *chain) GetHeaderLatest() (*types.Header, error) { + return c.getHeader(nil) +} + +func (c *chain) getHeader(blockHash *types.Hash) (*types.Header, error) { + var Header types.Header + err := client.CallWithBlockHash(c.client, &Header, "chain_getHeader", blockHash) + if err != nil { + return nil, err + } + return &Header, err +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/chain/subscribe_finalized_heads.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/chain/subscribe_finalized_heads.go new file mode 100644 index 000000000..8898d393c --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/chain/subscribe_finalized_heads.go @@ -0,0 +1,78 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package chain + +import ( + "context" + "sync" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/config" + gethrpc "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// FinalizedHeadsSubscription is a subscription established through one of the Client's subscribe methods. +type FinalizedHeadsSubscription struct { + sub *gethrpc.ClientSubscription + channel chan types.Header + quitOnce sync.Once // ensures quit is closed once +} + +// Chan returns the subscription channel. +// +// The channel is closed when Unsubscribe is called on the subscription. +func (s *FinalizedHeadsSubscription) Chan() <-chan types.Header { + return s.channel +} + +// Err returns the subscription error channel. The intended use of Err is to schedule +// resubscription when the client connection is closed unexpectedly. +// +// The error channel receives a value when the subscription has ended due +// to an error. The received error is nil if Close has been called +// on the underlying client and no other error has occurred. +// +// The error channel is closed when Unsubscribe is called on the subscription. +func (s *FinalizedHeadsSubscription) Err() <-chan error { + return s.sub.Err() +} + +// Unsubscribe unsubscribes the notification and closes the error channel. +// It can safely be called more than once. +func (s *FinalizedHeadsSubscription) Unsubscribe() { + s.sub.Unsubscribe() + s.quitOnce.Do(func() { + close(s.channel) + }) +} + +// SubscribeFinalizedHeads subscribes the best finalized headers, returning a subscription that will +// receive server notifications containing the Header. +func (c *chain) SubscribeFinalizedHeads() (*FinalizedHeadsSubscription, error) { + ctx, cancel := context.WithTimeout(context.Background(), config.Default().SubscribeTimeout) + defer cancel() + + ch := make(chan types.Header) + + sub, err := c.client.Subscribe(ctx, "chain", "subscribeFinalizedHeads", "unsubscribeFinalizedHeads", + "finalizedHead", ch) + if err != nil { + return nil, err + } + + return &FinalizedHeadsSubscription{sub: sub, channel: ch}, nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/chain/subscribe_new_heads.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/chain/subscribe_new_heads.go new file mode 100644 index 000000000..a509c7421 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/chain/subscribe_new_heads.go @@ -0,0 +1,77 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package chain + +import ( + "context" + "sync" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/config" + gethrpc "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// NewHeadsSubscription is a subscription established through one of the Client's subscribe methods. +type NewHeadsSubscription struct { + sub *gethrpc.ClientSubscription + channel chan types.Header + quitOnce sync.Once // ensures quit is closed once +} + +// Chan returns the subscription channel. +// +// The channel is closed when Unsubscribe is called on the subscription. +func (s *NewHeadsSubscription) Chan() <-chan types.Header { + return s.channel +} + +// Err returns the subscription error channel. The intended use of Err is to schedule +// resubscription when the client connection is closed unexpectedly. +// +// The error channel receives a value when the subscription has ended due +// to an error. The received error is nil if Close has been called +// on the underlying client and no other error has occurred. +// +// The error channel is closed when Unsubscribe is called on the subscription. +func (s *NewHeadsSubscription) Err() <-chan error { + return s.sub.Err() +} + +// Unsubscribe unsubscribes the notification and closes the error channel. +// It can safely be called more than once. +func (s *NewHeadsSubscription) Unsubscribe() { + s.sub.Unsubscribe() + s.quitOnce.Do(func() { + close(s.channel) + }) +} + +// SubscribeNewHeads subscribes the best headers, returning a subscription that will +// receive server notifications containing the Header. +func (c *chain) SubscribeNewHeads() (*NewHeadsSubscription, error) { + ctx, cancel := context.WithTimeout(context.Background(), config.Default().SubscribeTimeout) + defer cancel() + + ch := make(chan types.Header) + + sub, err := c.client.Subscribe(ctx, "chain", "subscribeNewHead", "unsubscribeNewHead", "newHead", ch) + if err != nil { + return nil, err + } + + return &NewHeadsSubscription{sub: sub, channel: ch}, nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/main.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/main.go new file mode 100644 index 000000000..ae8e40302 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/main.go @@ -0,0 +1,59 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package rpc + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/client" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/rpc/author" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/rpc/beefy" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/rpc/chain" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/rpc/offchain" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +type RPC struct { + Author author.Author + Beefy beefy.Beefy + Chain chain.Chain + Offchain offchain.Offchain + State state.State + System system.System + client client.Client +} + +func NewRPC(cl client.Client) (*RPC, error) { + st := state.NewState(cl) + meta, err := st.GetMetadataLatest() + if err != nil { + return nil, err + } + + opts := types.SerDeOptionsFromMetadata(meta) + types.SetSerDeOptions(opts) + + return &RPC{ + Author: author.NewAuthor(cl), + Beefy: beefy.NewBeefy(cl), + Chain: chain.NewChain(cl), + Offchain: offchain.NewOffchain(cl), + State: st, + System: system.NewSystem(cl), + client: cl, + }, nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/offchain/get_local_storage.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/offchain/get_local_storage.go new file mode 100644 index 000000000..e06a32269 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/offchain/get_local_storage.go @@ -0,0 +1,68 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2022 Snowfork +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package offchain + +import ( + "fmt" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/codec" +) + +// StorageKind ... +type StorageKind string + +const ( + // Persistent storage + Persistent StorageKind = "PERSISTENT" + // Local storage + Local StorageKind = "LOCAL" +) + +// LocalStorageGet retrieves the stored data +func (c *offchain) LocalStorageGet(kind StorageKind, key []byte) (*types.StorageDataRaw, error) { + var res string + + err := c.client.Call(&res, "offchain_localStorageGet", kind, fmt.Sprintf("%#x", key)) + if err != nil { + return nil, err + } + + if len(res) == 0 { + return nil, nil + } + + b, err := codec.HexDecodeString(res) + if err != nil { + return nil, err + } + + data := types.NewStorageDataRaw(b) + return &data, nil +} + +// LocalStorageSet saves the data +func (c *offchain) LocalStorageSet(kind StorageKind, key []byte, value []byte) error { + var res string + + err := c.client.Call(&res, "offchain_localStorageSet", kind, fmt.Sprintf("%#x", key), fmt.Sprintf("%#x", value)) + if err != nil { + return err + } + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/offchain/offchain.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/offchain/offchain.go new file mode 100644 index 000000000..335b31f36 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/offchain/offchain.go @@ -0,0 +1,39 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2022 Snowfork +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:generate mockery --name Offchain --filename offchain.go + +package offchain + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/client" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +type Offchain interface { + LocalStorageGet(kind StorageKind, key []byte) (*types.StorageDataRaw, error) + LocalStorageSet(kind StorageKind, key []byte, value []byte) error +} + +// offchain exposes methods for retrieval of off-chain data +type offchain struct { + client client.Client +} + +// NewOffchain creates a new offchain struct +func NewOffchain(c client.Client) Offchain { + return &offchain{client: c} +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_child_keys.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_child_keys.go new file mode 100644 index 000000000..9afef0567 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_child_keys.go @@ -0,0 +1,52 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package state + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/client" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/codec" +) + +// GetChildKeys retreives the keys with the given prefix of a specific child storage +func (s *state) GetChildKeys(childStorageKey, prefix types.StorageKey, blockHash types.Hash) ( + []types.StorageKey, error) { + return s.getChildKeys(childStorageKey, prefix, &blockHash) +} + +// GetChildKeysLatest retreives the keys with the given prefix of a specific child storage for the latest block height +func (s *state) GetChildKeysLatest(childStorageKey, prefix types.StorageKey) ([]types.StorageKey, error) { + return s.getChildKeys(childStorageKey, prefix, nil) +} + +func (s *state) getChildKeys(childStorageKey, prefix types.StorageKey, blockHash *types.Hash) ( + []types.StorageKey, error) { + var res []string + err := client.CallWithBlockHash(s.client, &res, "state_getChildKeys", blockHash, childStorageKey.Hex(), prefix.Hex()) + if err != nil { + return nil, err + } + + keys := make([]types.StorageKey, len(res)) + for i, r := range res { + err = codec.DecodeFromHex(r, &keys[i]) + if err != nil { + return nil, err + } + } + return keys, err +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_child_storage.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_child_storage.go new file mode 100644 index 000000000..1f7fb02d7 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_child_storage.go @@ -0,0 +1,80 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package state + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/client" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/codec" +) + +// GetChildStorage retreives the child storage for a key and decodes them into the provided interface. Ok is true if the +// value is not empty. +func (s *state) GetChildStorage(childStorageKey, key types.StorageKey, target interface{}, blockHash types.Hash) ( + ok bool, err error) { + raw, err := s.getChildStorageRaw(childStorageKey, key, &blockHash) + if err != nil { + return false, err + } + if len(*raw) == 0 { + return false, nil + } + return true, codec.Decode(*raw, target) +} + +// GetChildStorageLatest retreives the child storage for a key for the latest block height and decodes them into the +// provided interface. Ok is true if the value is not empty. +func (s *state) GetChildStorageLatest(childStorageKey, key types.StorageKey, target interface{}) (ok bool, err error) { + raw, err := s.getChildStorageRaw(childStorageKey, key, nil) + if err != nil { + return false, err + } + if len(*raw) == 0 { + return false, nil + } + return true, codec.Decode(*raw, target) +} + +// GetChildStorageRaw retreives the child storage for a key as raw bytes, without decoding them +func (s *state) GetChildStorageRaw(childStorageKey, key types.StorageKey, blockHash types.Hash) ( + *types.StorageDataRaw, error) { + return s.getChildStorageRaw(childStorageKey, key, &blockHash) +} + +// GetChildStorageRawLatest retreives the child storage for a key for the latest block height as raw bytes, +// without decoding them +func (s *state) GetChildStorageRawLatest(childStorageKey, key types.StorageKey) (*types.StorageDataRaw, error) { + return s.getChildStorageRaw(childStorageKey, key, nil) +} + +func (s *state) getChildStorageRaw(childStorageKey, key types.StorageKey, blockHash *types.Hash) ( + *types.StorageDataRaw, error) { + var res string + err := client.CallWithBlockHash(s.client, &res, "state_getChildStorage", blockHash, childStorageKey.Hex(), + key.Hex()) + if err != nil { + return nil, err + } + + bz, err := codec.HexDecodeString(res) + if err != nil { + return nil, err + } + + data := types.NewStorageDataRaw(bz) + return &data, nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_child_storage_hash.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_child_storage_hash.go new file mode 100644 index 000000000..bed6aab50 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_child_storage_hash.go @@ -0,0 +1,43 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package state + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/client" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// GetChildStorageHash retreives the child storage hash for the given key +func (s *state) GetChildStorageHash(childStorageKey, key types.StorageKey, blockHash types.Hash) (types.Hash, error) { + return s.getChildStorageHash(childStorageKey, key, &blockHash) +} + +// GetChildStorageHashLatest retreives the child storage hash for the given key for the latest block height +func (s *state) GetChildStorageHashLatest(childStorageKey, key types.StorageKey) (types.Hash, error) { + return s.getChildStorageHash(childStorageKey, key, nil) +} + +func (s *state) getChildStorageHash(childStorageKey, key types.StorageKey, blockHash *types.Hash) (types.Hash, error) { + var res string + err := client.CallWithBlockHash(s.client, &res, "state_getChildStorageHash", blockHash, childStorageKey.Hex(), + key.Hex()) + if err != nil { + return types.Hash{}, err + } + + return types.NewHashFromHexString(res) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_child_storage_size.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_child_storage_size.go new file mode 100644 index 000000000..e5f893451 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_child_storage_size.go @@ -0,0 +1,42 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package state + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/client" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// GetChildStorageSize retreives the child storage size for the given key +func (s *state) GetChildStorageSize(childStorageKey, key types.StorageKey, blockHash types.Hash) (types.U64, error) { + return s.getChildStorageSize(childStorageKey, key, &blockHash) +} + +// GetChildStorageSizeLatest retreives the child storage size for the given key for the latest block height +func (s *state) GetChildStorageSizeLatest(childStorageKey, key types.StorageKey) (types.U64, error) { + return s.getChildStorageSize(childStorageKey, key, nil) +} + +func (s *state) getChildStorageSize(childStorageKey, key types.StorageKey, blockHash *types.Hash) (types.U64, error) { + var res types.U64 + err := client.CallWithBlockHash(s.client, &res, "state_getChildStorageSize", blockHash, childStorageKey.Hex(), + key.Hex()) + if err != nil { + return 0, err + } + return res, err +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_keys.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_keys.go new file mode 100644 index 000000000..8bc46e4ba --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_keys.go @@ -0,0 +1,50 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package state + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/client" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/codec" +) + +// GetKeys retreives the keys with the given prefix +func (s *state) GetKeys(prefix types.StorageKey, blockHash types.Hash) ([]types.StorageKey, error) { + return s.getKeys(prefix, &blockHash) +} + +// GetKeysLatest retreives the keys with the given prefix for the latest block height +func (s *state) GetKeysLatest(prefix types.StorageKey) ([]types.StorageKey, error) { + return s.getKeys(prefix, nil) +} + +func (s *state) getKeys(prefix types.StorageKey, blockHash *types.Hash) ([]types.StorageKey, error) { + var res []string + err := client.CallWithBlockHash(s.client, &res, "state_getKeys", blockHash, prefix.Hex()) + if err != nil { + return nil, err + } + + keys := make([]types.StorageKey, len(res)) + for i, r := range res { + err = codec.DecodeFromHex(r, &keys[i]) + if err != nil { + return nil, err + } + } + return keys, err +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_metadata.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_metadata.go new file mode 100644 index 000000000..a7982ba8d --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_metadata.go @@ -0,0 +1,45 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package state + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/client" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/codec" +) + +// GetMetadata returns the metadata at the given block +func (s *state) GetMetadata(blockHash types.Hash) (*types.Metadata, error) { + return s.getMetadata(&blockHash) +} + +// GetMetadataLatest returns the latest metadata +func (s *state) GetMetadataLatest() (*types.Metadata, error) { + return s.getMetadata(nil) +} + +func (s *state) getMetadata(blockHash *types.Hash) (*types.Metadata, error) { + var res string + err := client.CallWithBlockHash(s.client, &res, "state_getMetadata", blockHash) + if err != nil { + return nil, err + } + + var metadata types.Metadata + err = codec.DecodeFromHex(res, &metadata) + return &metadata, err +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_runtime_version.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_runtime_version.go new file mode 100644 index 000000000..47a60c790 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_runtime_version.go @@ -0,0 +1,41 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package state + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/client" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// GetRuntimeVersion returns the runtime version at the given block +func (s *state) GetRuntimeVersion(blockHash types.Hash) (*types.RuntimeVersion, error) { + return s.getRuntimeVersion(&blockHash) +} + +// GetRuntimeVersionLatest returns the latest runtime version +func (s *state) GetRuntimeVersionLatest() (*types.RuntimeVersion, error) { + return s.getRuntimeVersion(nil) +} + +func (s *state) getRuntimeVersion(blockHash *types.Hash) (*types.RuntimeVersion, error) { + var runtimeVersion types.RuntimeVersion + err := client.CallWithBlockHash(s.client, &runtimeVersion, "state_getRuntimeVersion", blockHash) + if err != nil { + return nil, err + } + return &runtimeVersion, err +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_storage.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_storage.go new file mode 100644 index 000000000..8b0b18bcd --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_storage.go @@ -0,0 +1,75 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package state + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/client" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/codec" +) + +// GetStorage retreives the stored data and decodes them into the provided interface. Ok is true if the value is not +// empty. +func (s *state) GetStorage(key types.StorageKey, target interface{}, blockHash types.Hash) (ok bool, err error) { + raw, err := s.getStorageRaw(key, &blockHash) + if err != nil { + return false, err + } + if len(*raw) == 0 { + return false, nil + } + return true, codec.Decode(*raw, target) +} + +// GetStorageLatest retreives the stored data for the latest block height and decodes them into the provided interface. +// Ok is true if the value is not empty. +func (s *state) GetStorageLatest(key types.StorageKey, target interface{}) (ok bool, err error) { + raw, err := s.getStorageRaw(key, nil) + if err != nil { + return false, err + } + if len(*raw) == 0 { + return false, nil + } + return true, codec.Decode(*raw, target) +} + +// GetStorageRaw retreives the stored data as raw bytes, without decoding them +func (s *state) GetStorageRaw(key types.StorageKey, blockHash types.Hash) (*types.StorageDataRaw, error) { + return s.getStorageRaw(key, &blockHash) +} + +// GetStorageRawLatest retreives the stored data for the latest block height as raw bytes, without decoding them +func (s *state) GetStorageRawLatest(key types.StorageKey) (*types.StorageDataRaw, error) { + return s.getStorageRaw(key, nil) +} + +func (s *state) getStorageRaw(key types.StorageKey, blockHash *types.Hash) (*types.StorageDataRaw, error) { + var res string + err := client.CallWithBlockHash(s.client, &res, "state_getStorage", blockHash, key.Hex()) + if err != nil { + return nil, err + } + + bz, err := codec.HexDecodeString(res) + if err != nil { + return nil, err + } + + data := types.NewStorageDataRaw(bz) + return &data, nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_storage_hash.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_storage_hash.go new file mode 100644 index 000000000..df42e96fb --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_storage_hash.go @@ -0,0 +1,42 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package state + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/client" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// GetStorageHash retreives the storage hash for the given key +func (s *state) GetStorageHash(key types.StorageKey, blockHash types.Hash) (types.Hash, error) { + return s.getStorageHash(key, &blockHash) +} + +// GetStorageHashLatest retreives the storage hash for the given key for the latest block height +func (s *state) GetStorageHashLatest(key types.StorageKey) (types.Hash, error) { + return s.getStorageHash(key, nil) +} + +func (s *state) getStorageHash(key types.StorageKey, blockHash *types.Hash) (types.Hash, error) { + var res string + err := client.CallWithBlockHash(s.client, &res, "state_getStorageHash", blockHash, key.Hex()) + if err != nil { + return types.Hash{}, err + } + + return types.NewHashFromHexString(res) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_storage_size.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_storage_size.go new file mode 100644 index 000000000..8eae6b05c --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/get_storage_size.go @@ -0,0 +1,41 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package state + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/client" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// GetStorageSize retreives the storage size for the given key +func (s *state) GetStorageSize(key types.StorageKey, blockHash types.Hash) (types.U64, error) { + return s.getStorageSize(key, &blockHash) +} + +// GetStorageSizeLatest retreives the storage size for the given key for the latest block height +func (s *state) GetStorageSizeLatest(key types.StorageKey) (types.U64, error) { + return s.getStorageSize(key, nil) +} + +func (s *state) getStorageSize(key types.StorageKey, blockHash *types.Hash) (types.U64, error) { + var res types.U64 + err := client.CallWithBlockHash(s.client, &res, "state_getStorageSize", blockHash, key.Hex()) + if err != nil { + return 0, err + } + return res, err +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/query_storage.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/query_storage.go new file mode 100644 index 000000000..1bd1cb587 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/query_storage.go @@ -0,0 +1,49 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package state + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/client" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// QueryStorage queries historical storage entries (by key) starting from a start block until an end block +func (s *state) QueryStorage(keys []types.StorageKey, startBlock types.Hash, block types.Hash) ( + []types.StorageChangeSet, error) { + return s.queryStorage(keys, startBlock, &block) +} + +// QueryStorageLatest queries historical storage entries (by key) starting from a start block until the latest block +func (s *state) QueryStorageLatest(keys []types.StorageKey, startBlock types.Hash) ([]types.StorageChangeSet, error) { + return s.queryStorage(keys, startBlock, nil) +} + +func (s *state) queryStorage(keys []types.StorageKey, startBlock types.Hash, block *types.Hash) ( + []types.StorageChangeSet, error) { + hexKeys := make([]string, len(keys)) + for i, key := range keys { + hexKeys[i] = key.Hex() + } + + var res []types.StorageChangeSet + err := client.CallWithBlockHash(s.client, &res, "state_queryStorage", block, hexKeys, startBlock.Hex()) + if err != nil { + return nil, err + } + + return res, nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/query_storage_at.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/query_storage_at.go new file mode 100644 index 000000000..c8ae68b9d --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/query_storage_at.go @@ -0,0 +1,47 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2022 Snowfork +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package state + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/client" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// QueryStorageAt performs a low-level storage query +func (s *state) QueryStorageAt(keys []types.StorageKey, block types.Hash) ([]types.StorageChangeSet, error) { + return s.queryStorageAt(keys, &block) +} + +// QueryStorageAtLatest performs a low-level storage query +func (s *state) QueryStorageAtLatest(keys []types.StorageKey) ([]types.StorageChangeSet, error) { + return s.queryStorageAt(keys, nil) +} + +func (s *state) queryStorageAt(keys []types.StorageKey, block *types.Hash) ([]types.StorageChangeSet, error) { + hexKeys := make([]string, len(keys)) + for i, key := range keys { + hexKeys[i] = key.Hex() + } + + var res []types.StorageChangeSet + err := client.CallWithBlockHash(s.client, &res, "state_queryStorageAt", block, hexKeys) + if err != nil { + return nil, err + } + + return res, nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/state.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/state.go new file mode 100644 index 000000000..67fb2b18b --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/state.go @@ -0,0 +1,79 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:generate mockery --name State --filename state.go + +package state + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/client" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +type State interface { + GetStorage(key types.StorageKey, target interface{}, blockHash types.Hash) (ok bool, err error) + GetStorageLatest(key types.StorageKey, target interface{}) (ok bool, err error) + GetStorageRaw(key types.StorageKey, blockHash types.Hash) (*types.StorageDataRaw, error) + GetStorageRawLatest(key types.StorageKey) (*types.StorageDataRaw, error) + + GetChildStorageSize(childStorageKey, key types.StorageKey, blockHash types.Hash) (types.U64, error) + GetChildStorageSizeLatest(childStorageKey, key types.StorageKey) (types.U64, error) + GetChildStorage(childStorageKey, key types.StorageKey, target interface{}, blockHash types.Hash) (ok bool, err error) + GetChildStorageLatest(childStorageKey, key types.StorageKey, target interface{}) (ok bool, err error) + GetChildStorageRaw(childStorageKey, key types.StorageKey, blockHash types.Hash) (*types.StorageDataRaw, error) + GetChildStorageRawLatest(childStorageKey, key types.StorageKey) (*types.StorageDataRaw, error) + + GetMetadata(blockHash types.Hash) (*types.Metadata, error) + GetMetadataLatest() (*types.Metadata, error) + + GetStorageHash(key types.StorageKey, blockHash types.Hash) (types.Hash, error) + GetStorageHashLatest(key types.StorageKey) (types.Hash, error) + + SubscribeStorageRaw(keys []types.StorageKey) (*StorageSubscription, error) + + GetRuntimeVersion(blockHash types.Hash) (*types.RuntimeVersion, error) + GetRuntimeVersionLatest() (*types.RuntimeVersion, error) + + GetChildKeys(childStorageKey, prefix types.StorageKey, blockHash types.Hash) ([]types.StorageKey, error) + GetChildKeysLatest(childStorageKey, prefix types.StorageKey) ([]types.StorageKey, error) + + SubscribeRuntimeVersion() (*RuntimeVersionSubscription, error) + + QueryStorage(keys []types.StorageKey, startBlock types.Hash, block types.Hash) ([]types.StorageChangeSet, error) + QueryStorageLatest(keys []types.StorageKey, startBlock types.Hash) ([]types.StorageChangeSet, error) + + QueryStorageAt(keys []types.StorageKey, block types.Hash) ([]types.StorageChangeSet, error) + QueryStorageAtLatest(keys []types.StorageKey) ([]types.StorageChangeSet, error) + + GetKeys(prefix types.StorageKey, blockHash types.Hash) ([]types.StorageKey, error) + GetKeysLatest(prefix types.StorageKey) ([]types.StorageKey, error) + + GetStorageSize(key types.StorageKey, blockHash types.Hash) (types.U64, error) + GetStorageSizeLatest(key types.StorageKey) (types.U64, error) + + GetChildStorageHash(childStorageKey, key types.StorageKey, blockHash types.Hash) (types.Hash, error) + GetChildStorageHashLatest(childStorageKey, key types.StorageKey) (types.Hash, error) +} + +// state exposes methods for querying state +type state struct { + client client.Client +} + +// NewState creates a new state struct +func NewState(c client.Client) State { + return &state{client: c} +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/subscribe_runtime_version.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/subscribe_runtime_version.go new file mode 100644 index 000000000..67862ebac --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/subscribe_runtime_version.go @@ -0,0 +1,79 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package state //nolint:dupl + +import ( + "context" + "sync" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/config" + gethrpc "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// RuntimeVersionSubscription is a subscription established through one of the Client's subscribe methods. +type RuntimeVersionSubscription struct { + sub *gethrpc.ClientSubscription + channel chan types.RuntimeVersion + quitOnce sync.Once // ensures quit is closed once +} + +// Chan returns the subscription channel. +// +// The channel is closed when Unsubscribe is called on the subscription. +func (s *RuntimeVersionSubscription) Chan() <-chan types.RuntimeVersion { + return s.channel +} + +// Err returns the subscription error channel. The intended use of Err is to schedule +// resubscription when the client connection is closed unexpectedly. +// +// The error channel receives a value when the subscription has ended due +// to an error. The received error is nil if Close has been called +// on the underlying client and no other error has occurred. +// +// The error channel is closed when Unsubscribe is called on the subscription. +func (s *RuntimeVersionSubscription) Err() <-chan error { + return s.sub.Err() +} + +// Unsubscribe unsubscribes the notification and closes the error channel. +// It can safely be called more than once. +func (s *RuntimeVersionSubscription) Unsubscribe() { + s.sub.Unsubscribe() + s.quitOnce.Do(func() { + close(s.channel) + }) +} + +// SubscribeRuntimeVersion subscribes the runtime version, returning a subscription that will +// receive server notifications containing the RuntimeVersion. +func (s *state) SubscribeRuntimeVersion() ( + *RuntimeVersionSubscription, error) { + ctx, cancel := context.WithTimeout(context.Background(), config.Default().SubscribeTimeout) + defer cancel() + + c := make(chan types.RuntimeVersion) + + sub, err := s.client.Subscribe(ctx, "state", "subscribeRuntimeVersion", "unsubscribeRuntimeVersion", + "runtimeVersion", c) + if err != nil { + return nil, err + } + + return &RuntimeVersionSubscription{sub: sub, channel: c}, nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/subscribe_storage.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/subscribe_storage.go new file mode 100644 index 000000000..8c53785c4 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/state/subscribe_storage.go @@ -0,0 +1,87 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package state + +import ( + "context" + "sync" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/config" + gethrpc "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/gethrpc" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// StorageSubscription is a subscription established through one of the Client's subscribe methods. +type StorageSubscription struct { + sub *gethrpc.ClientSubscription + channel chan types.StorageChangeSet + quitOnce sync.Once // ensures quit is closed once +} + +// Chan returns the subscription channel. +// +// The channel is closed when Unsubscribe is called on the subscription. +func (s *StorageSubscription) Chan() <-chan types.StorageChangeSet { + return s.channel +} + +// Err returns the subscription error channel. The intended use of Err is to schedule +// resubscription when the client connection is closed unexpectedly. +// +// The error channel receives a value when the subscription has ended due +// to an error. The received error is nil if Close has been called +// on the underlying client and no other error has occurred. +// +// The error channel is closed when Unsubscribe is called on the subscription. +func (s *StorageSubscription) Err() <-chan error { + return s.sub.Err() +} + +// Unsubscribe unsubscribes the notification and closes the error channel. +// It can safely be called more than once. +func (s *StorageSubscription) Unsubscribe() { + s.sub.Unsubscribe() + s.quitOnce.Do(func() { + close(s.channel) + }) +} + +// SubscribeStorageRaw subscribes the storage for the given keys, returning a subscription that will +// receive server notifications containing the storage change sets. +// +// Slow subscribers will be dropped eventually. Client buffers up to 20000 notifications before considering the +// subscriber dead. The subscription Err channel will receive ErrSubscriptionQueueOverflow. Use a sufficiently +// large buffer on the channel or ensure that the channel usually has at least one reader to prevent this issue. +func (s *state) SubscribeStorageRaw(keys []types.StorageKey) ( + *StorageSubscription, error) { + ctx, cancel := context.WithTimeout(context.Background(), config.Default().SubscribeTimeout) + defer cancel() + + c := make(chan types.StorageChangeSet) + + keyss := make([]string, len(keys)) + for i := range keys { + keyss[i] = keys[i].Hex() + } + + sub, err := s.client.Subscribe(ctx, "state", "subscribeStorage", "unsubscribeStorage", "storage", c, keyss) + if err != nil { + return nil, err + } + + return &StorageSubscription{sub: sub, channel: c}, nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/chain.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/chain.go new file mode 100644 index 000000000..8fb1b04e5 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/chain.go @@ -0,0 +1,28 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package system + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// Chain retrieves the chain +func (c *system) Chain() (types.Text, error) { + var t types.Text + err := c.client.Call(&t, "system_chain") + return t, err +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/health.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/health.go new file mode 100644 index 000000000..b9cef2766 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/health.go @@ -0,0 +1,28 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package system + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// Health retrieves the health status of the connected node +func (c *system) Health() (types.Health, error) { + var h types.Health + err := c.client.Call(&h, "system_health") + return h, err +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/name.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/name.go new file mode 100644 index 000000000..65db39298 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/name.go @@ -0,0 +1,28 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package system + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// Name retrieves the node name +func (c *system) Name() (types.Text, error) { + var t types.Text + err := c.client.Call(&t, "system_name") + return t, err +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/network_state.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/network_state.go new file mode 100644 index 000000000..3a0af1059 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/network_state.go @@ -0,0 +1,28 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package system + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// NetworkState retrieves the current state of the network +func (c *system) NetworkState() (types.NetworkState, error) { + var n types.NetworkState + err := c.client.Call(&n, "system_networkState") + return n, err +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/peers.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/peers.go new file mode 100644 index 000000000..9ad3921cb --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/peers.go @@ -0,0 +1,28 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package system + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// Peers retrieves the currently connected peers +func (c *system) Peers() ([]types.PeerInfo, error) { + var p []types.PeerInfo + err := c.client.Call(&p, "system_peers") + return p, err +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/properties.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/properties.go new file mode 100644 index 000000000..5a5bc57f5 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/properties.go @@ -0,0 +1,28 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package system + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// Properties retrieves a custom set of properties as a JSON object, defined in the chain spec +func (c *system) Properties() (types.ChainProperties, error) { + var p types.ChainProperties + err := c.client.Call(&p, "system_properties") + return p, err +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/system.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/system.go new file mode 100644 index 000000000..ade5fdde6 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/system.go @@ -0,0 +1,44 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:generate mockery --name System --filename system.go + +package system + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/client" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +type System interface { + Properties() (types.ChainProperties, error) + Health() (types.Health, error) + Peers() ([]types.PeerInfo, error) + Name() (types.Text, error) + Chain() (types.Text, error) + Version() (types.Text, error) + NetworkState() (types.NetworkState, error) +} + +// system exposes methods for retrieval of system data +type system struct { + client client.Client +} + +// NewSystem creates a new system struct +func NewSystem(cl client.Client) System { + return &system{cl} +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/version.go b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/version.go new file mode 100644 index 000000000..9042119b0 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/rpc/system/version.go @@ -0,0 +1,28 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package system + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +// Version retrieves the version of the node +func (c *system) Version() (types.Text, error) { + var t types.Text + err := c.client.Call(&t, "system_version") + return t, err +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/scale/Readme.md b/pkg/dia/helpers/substrate-helper/gsrpc/scale/Readme.md new file mode 100644 index 000000000..c6dae1a30 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/scale/Readme.md @@ -0,0 +1,26 @@ +This code was copied over with many thanks from https://github.com/Joystream/parity-codec-go/tree/develop/withreflect + +# Chainsafe vs Joystream scale codec + +- Code quality wise Chainsafe codec is better because of proper handling(no panic), use of standard interfaces, more tests and good comments. +- However Joystream codec has better usability because of the way it handles structs or unknown types by providing two interfaces. + ``` + // Encodeable is an interface that defines a custom encoding rules for a data type. + // Should be defined for structs (not pointers to them). + // See OptionBool for an example implementation. + type Encodeable interface { + // ParityEncode encodes and write this structure into a stream + ParityEncode(encoder Encoder) + } + + // Decodeable is an interface that defines a custom encoding rules for a data type. + // Should be defined for pointers to structs. + // See OptionBool for an example implementation. + type Decodeable interface { + // ParityDecode populates this structure from a stream (overwriting the current contents), return false on failure + ParityDecode(decoder Decoder) + } + ``` + This helped in debugging issues because structs could be debugged one field at a time when decoding and encoding. It was easy to see the progress of decoding for example by looking at already decoded struct fields and the buffere thats passed in within the decoder struct. This could have been implemented in client code for Chainsafe codec in hindsight, but just dealing with RPC execution issues was of higher priority. + +It's better if the good features of both could be integrated together to create a nicer library. diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/scale/codec.go b/pkg/dia/helpers/substrate-helper/gsrpc/scale/codec.go new file mode 100644 index 000000000..183249212 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/scale/codec.go @@ -0,0 +1,652 @@ +// Copyright 2018 Jsgenesis +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package scale + +import ( + "bytes" + "encoding/binary" + "errors" + "fmt" + "io" + "log" + "math" + "math/big" + "reflect" +) + +// Implementation for Parity codec in Go. +// Derived from https://github.com/paritytech/parity-codec/ +// While Rust implementation uses Rust type system and is highly optimized, this one +// has to rely on Go's reflection and thus is notably slower. +// Feature parity is almost full, apart from the lack of support for u128 (which are missing in Go). + +const maxUint = ^uint(0) +const maxInt = int(maxUint >> 1) + +// Encoder is a wrapper around a Writer that allows encoding data items to a stream. +// Allows passing encoding options +type Encoder struct { + writer io.Writer +} + +func NewEncoder(writer io.Writer) *Encoder { + return &Encoder{writer: writer} +} + +// Write several bytes to the encoder. +func (pe Encoder) Write(bytes []byte) error { + c, err := pe.writer.Write(bytes) + if err != nil { + return err + } + if c < len(bytes) { + return fmt.Errorf("Could not write %d bytes to writer", len(bytes)) + } + return nil +} + +// PushByte writes a single byte to an encoder. +func (pe Encoder) PushByte(b byte) error { + return pe.Write([]byte{b}) +} + +// EncodeUintCompact writes an unsigned integer to the stream using the compact encoding. +// A typical usage is storing the length of a collection. +// Definition of compact encoding: +// 0b00 00 00 00 / 00 00 00 00 / 00 00 00 00 / 00 00 00 00 +// xx xx xx 00 (0 ... 2**6 - 1) (u8) +// yL yL yL 01 / yH yH yH yL (2**6 ... 2**14 - 1) (u8, u16) low LH high +// zL zL zL 10 / zM zM zM zL / zM zM zM zM / zH zH zH zM (2**14 ... 2**30 - 1) (u16, u32) low LMMH high +// nn nn nn 11 [ / zz zz zz zz ]{4 + n} (2**30 ... 2**536 - 1) (u32, u64, u128, U256, U512, U520) straight LE-encoded +// Rust implementation: see impl<'a> Encode for CompactRef<'a, u64> +func (pe Encoder) EncodeUintCompact(v big.Int) error { + if v.Sign() == -1 { + return errors.New("Assertion error: EncodeUintCompact cannot process negative numbers") + } + + if v.IsUint64() { + if v.Uint64() < 1<<30 { + if v.Uint64() < 1<<6 { + err := pe.PushByte(byte(v.Uint64()) << 2) + if err != nil { + return err + } + } else if v.Uint64() < 1<<14 { + err := binary.Write(pe.writer, binary.LittleEndian, uint16(v.Uint64()<<2)+1) + if err != nil { + return err + } + } else { + err := binary.Write(pe.writer, binary.LittleEndian, uint32(v.Uint64()<<2)+2) + if err != nil { + return err + } + } + return nil + } + } + + numBytes := len(v.Bytes()) + if numBytes > 255 { + return errors.New("Assertion error: numBytes>255 exeeds allowed for length prefix") + } + topSixBits := uint8(numBytes - 4) + lengthByte := topSixBits<<2 + 3 + + if topSixBits > 63 { + return errors.New("Assertion error: n<=63 needed to compact-encode substrate unsigned big integer") + } + err := pe.PushByte(lengthByte) + if err != nil { + return err + } + buf := v.Bytes() + Reverse(buf) + err = pe.Write(buf) + if err != nil { + return err + } + return nil +} + +// Encode a value to the stream. +func (pe Encoder) Encode(value interface{}) error { + t := reflect.TypeOf(value) + + // If the type implements encodeable, use that implementation + encodeable := reflect.TypeOf((*Encodeable)(nil)).Elem() + if t.Implements(encodeable) { + err := value.(Encodeable).Encode(pe) + if err != nil { + return err + } + return nil + } + + tk := t.Kind() + switch tk { + + // Boolean and numbers are trivially encoded via binary.Write + // It will use reflection again and take a performance hit + // TODO: consider handling every case directly + case reflect.Bool: + fallthrough + case reflect.Int8: + fallthrough + case reflect.Uint8: + fallthrough + case reflect.Int: + fallthrough + case reflect.Int16: + fallthrough + case reflect.Int32: + fallthrough + case reflect.Int64: + fallthrough + case reflect.Uint: + fallthrough + case reflect.Uint16: + fallthrough + case reflect.Uint32: + fallthrough + case reflect.Uint64: + fallthrough + case reflect.Uintptr: + fallthrough + case reflect.Float32: + fallthrough + case reflect.Float64: + err := binary.Write(pe.writer, binary.LittleEndian, value) + if err != nil { + return err + } + case reflect.Ptr: + rv := reflect.ValueOf(value) + if rv.IsNil() { + return errors.New("Encoding null pointers not supported; consider using Option type") + } else { + dereferenced := rv.Elem() + err := pe.Encode(dereferenced.Interface()) + if err != nil { + return err + } + } + + // Arrays: no compact-encoded length prefix + case reflect.Array: + rv := reflect.ValueOf(value) + l := rv.Len() + for i := 0; i < l; i++ { + err := pe.Encode(rv.Index(i).Interface()) + if err != nil { + return err + } + } + + // Slices: first compact-encode length, then each item individually + case reflect.Slice: + rv := reflect.ValueOf(value) + l := rv.Len() + len64 := uint64(l) + if len64 > math.MaxUint32 { + return errors.New("Attempted to serialize a collection with too many elements.") + } + err := pe.EncodeUintCompact(*big.NewInt(0).SetUint64(len64)) + if err != nil { + return err + } + for i := 0; i < l; i++ { + err = pe.Encode(rv.Index(i).Interface()) + if err != nil { + return err + } + } + + // Strings are encoded as UTF-8 byte slices, just as in Rust + case reflect.String: + s := reflect.ValueOf(value).String() + err := pe.Encode([]byte(s)) + if err != nil { + return err + } + + case reflect.Struct: + rv := reflect.ValueOf(value) + for i := 0; i < rv.NumField(); i++ { + ft := rv.Type().Field(i) + tv, ok := ft.Tag.Lookup("scale") + if ok && tv == "-" { + continue + } + err := pe.Encode(rv.Field(i).Interface()) + if err != nil { + return fmt.Errorf("type %s does not support Encodeable interface and could not be "+ + "encoded field by field, error: %v", t, err) + } + } + + // Currently unsupported types + case reflect.Complex64: + fallthrough + case reflect.Complex128: + fallthrough + case reflect.Chan: + fallthrough + case reflect.Func: + fallthrough + case reflect.Interface: + fallthrough + case reflect.Map: + fallthrough + case reflect.UnsafePointer: + fallthrough + case reflect.Invalid: + return fmt.Errorf("Type %s cannot be encoded", t.Kind()) + default: + log.Println("not captured") + } + return nil +} + +// EncodeOption stores optionally present value to the stream. +func (pe Encoder) EncodeOption(hasValue bool, value interface{}) error { + if !hasValue { + err := pe.PushByte(0) + if err != nil { + return err + } + } else { + err := pe.PushByte(1) + if err != nil { + return err + } + err = pe.Encode(value) + if err != nil { + return err + } + } + return nil +} + +// Decoder is a wraper around a Reader that allows decoding data items from a stream. +type Decoder struct { + reader io.Reader +} + +func NewDecoder(reader io.Reader) *Decoder { + return &Decoder{reader: reader} +} + +// Read reads bytes from a stream into a buffer +func (pd Decoder) Read(bytes []byte) error { + c, err := pd.reader.Read(bytes) + if err != nil { + return err + } + if c < len(bytes) { + return fmt.Errorf("Cannot read the required number of bytes %d, only %d available", len(bytes), c) + } + return nil +} + +// ReadOneByte reads a next byte from the stream. +// Named so to avoid a linter warning about a clash with io.ByteReader.ReadByte +func (pd Decoder) ReadOneByte() (byte, error) { + buf := []byte{0} + err := pd.Read(buf) + if err != nil { + return buf[0], err + } + return buf[0], nil +} + +// Decode takes a pointer to a decodable value and populates it from the stream. +func (pd Decoder) Decode(target interface{}) error { + t0 := reflect.TypeOf(target) + if t0.Kind() != reflect.Ptr { + return errors.New("Target must be a pointer, but was " + fmt.Sprint(t0)) + } + val := reflect.ValueOf(target) + if val.IsNil() { + return errors.New("Target is a nil pointer") + } + return pd.DecodeIntoReflectValue(val.Elem()) +} + +// DecodeIntoReflectValue populates a writable reflect.Value from the stream +func (pd Decoder) DecodeIntoReflectValue(target reflect.Value) error { + t := target.Type() + if !target.CanSet() { + return fmt.Errorf("Unsettable value %v", t) + } + + // If the type implements decodeable, use that implementation + decodeable := reflect.TypeOf((*Decodeable)(nil)).Elem() + ptrType := reflect.PtrTo(t) + if ptrType.Implements(decodeable) { + var holder reflect.Value + if t.Kind() == reflect.Slice || t.Kind() == reflect.Array { + slice := reflect.MakeSlice(t, target.Len(), target.Len()) + holder = reflect.New(t) + holder.Elem().Set(slice) + } else { + holder = reflect.New(t) + } + + err := holder.Interface().(Decodeable).Decode(pd) + if err != nil { + return err + } + target.Set(holder.Elem()) + return nil + } + + switch t.Kind() { + + // Boolean and numbers are trivially decoded via binary.Read + // It will use reflection again and take a performance hit + // TODO: consider handling every case directly + case reflect.Bool: + fallthrough + case reflect.Int8: + fallthrough + case reflect.Uint8: + fallthrough + case reflect.Int: + fallthrough + case reflect.Int16: + fallthrough + case reflect.Int32: + fallthrough + case reflect.Int64: + fallthrough + case reflect.Uint: + fallthrough + case reflect.Uint16: + fallthrough + case reflect.Uint32: + fallthrough + case reflect.Uint64: + fallthrough + case reflect.Uintptr: + fallthrough + case reflect.Float32: + fallthrough + case reflect.Float64: + intHolder := reflect.New(t) + intPointer := intHolder.Interface() + err := binary.Read(pd.reader, binary.LittleEndian, intPointer) + if err == io.EOF { + return errors.New("expected more bytes, but could not decode any more") + } + if err != nil { + return err + } + target.Set(intHolder.Elem()) + + // If you want to replicate Option behavior in Rust, see OptionBool and an + // example type OptionInt8 in tests. + case reflect.Ptr: + isNil := target.IsNil() + if isNil { + // target.set + // return nil + } + ptr := target.Elem() + err := pd.DecodeIntoReflectValue(ptr) + if err != nil { + return err + } + + // Arrays: derive the length from the array length + case reflect.Array: + targetLen := target.Len() + for i := 0; i < targetLen; i++ { + err := pd.DecodeIntoReflectValue(target.Index(i)) + if err != nil { + return err + } + } + + // Slices: first compact-encode length, then each item individually + case reflect.Slice: + codedLen64, _ := pd.DecodeUintCompact() + if codedLen64.Uint64() > math.MaxUint32 { + return errors.New("Encoded array length is higher than allowed by the protocol (32-bit unsigned integer)") + } + if codedLen64.Uint64() > uint64(maxInt) { + return errors.New("Encoded array length is higher than allowed by the platform") + } + codedLen := int(codedLen64.Uint64()) + targetLen := target.Len() + if codedLen != targetLen { + if int(codedLen) > target.Cap() { + newSlice := reflect.MakeSlice(t, int(codedLen), int(codedLen)) + target.Set(newSlice) + } else { + target.SetLen(int(codedLen)) + } + } + for i := 0; i < codedLen; i++ { + err := pd.DecodeIntoReflectValue(target.Index(i)) + if err != nil { + return err + } + } + + // Strings are encoded as UTF-8 byte slices, just as in Rust + case reflect.String: + var b []byte + err := pd.Decode(&b) + if err != nil { + return err + } + target.SetString(string(b)) + + case reflect.Struct: + for i := 0; i < target.NumField(); i++ { + ft := target.Type().Field(i) + tv, ok := ft.Tag.Lookup("scale") + if ok && tv == "-" { + continue + } + err := pd.DecodeIntoReflectValue(target.Field(i)) + if err != nil { + return fmt.Errorf("type %s does not support Decodeable interface and could not be "+ + "decoded field by field, error: %v", ptrType, err) + } + } + + // Currently unsupported types + case reflect.Complex64: + fallthrough + case reflect.Complex128: + fallthrough + case reflect.Chan: + fallthrough + case reflect.Func: + fallthrough + case reflect.Interface: + fallthrough + case reflect.Map: + fallthrough + case reflect.UnsafePointer: + fallthrough + case reflect.Invalid: + return fmt.Errorf("Type %s cannot be decoded", t.Kind()) + } + return nil +} + +// DecodeUintCompact decodes a compact-encoded integer. See EncodeUintCompact method. +func (pd Decoder) DecodeUintCompact() (*big.Int, error) { + b, err := pd.ReadOneByte() + + if err != nil { + return nil, err + } + + mode := b & 3 + switch mode { + case 0: + // right shift to remove mode bits + return big.NewInt(0).SetUint64(uint64(b >> 2)), nil + case 1: + bb, err := pd.ReadOneByte() + if err != nil { + return nil, err + } + r := uint64(bb) + // * 2^6 + r <<= 6 + // right shift to remove mode bits and add to prev + r += uint64(b >> 2) + return big.NewInt(0).SetUint64(r), nil + case 2: + // value = 32 bits + mode + buf := make([]byte, 4) + buf[0] = b + err := pd.Read(buf[1:4]) + if err != nil { + return nil, err + } + // set the buffer in little endian order + r := binary.LittleEndian.Uint32(buf) + // remove the last 2 mode bits + r >>= 2 + return big.NewInt(0).SetUint64(uint64(r)), nil + case 3: + // remove mode bits + l := b >> 2 + + if l > 63 { // Max upper bound of 536 is (67 - 4) + return nil, errors.New("Not supported: l>63 encountered when decoding a compact-encoded uint") + } + buf := make([]byte, l+4) + err := pd.Read(buf) + if err != nil { + return nil, err + } + Reverse(buf) + return new(big.Int).SetBytes(buf), nil + default: + return nil, errors.New("Code should be unreachable") + } +} + +// Reverse reverses bytes in place (manipulates the underlying array) +func Reverse(b []byte) { + for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 { + b[i], b[j] = b[j], b[i] + } +} + +// DecodeOption decodes a optionally available value into a boolean presence field and a value. +func (pd Decoder) DecodeOption(hasValue *bool, valuePointer interface{}) error { + b, _ := pd.ReadOneByte() + switch b { + case 0: + *hasValue = false + case 1: + *hasValue = true + err := pd.Decode(valuePointer) + if err != nil { + return err + } + default: + return fmt.Errorf("Unknown byte prefix for encoded OptionBool: %d", b) + } + return nil +} + +// Encodeable is an interface that defines a custom encoding rules for a data type. +// Should be defined for structs (not pointers to them). +// See OptionBool for an example implementation. +type Encodeable interface { + // ParityEncode encodes and write this structure into a stream + Encode(encoder Encoder) error +} + +// Decodeable is an interface that defines a custom encoding rules for a data type. +// Should be defined for pointers to structs. +// See OptionBool for an example implementation. +type Decodeable interface { + // ParityDecode populates this structure from a stream (overwriting the current contents), return false on failure + Decode(decoder Decoder) error +} + +// OptionBool is a structure that can store a boolean or a missing value. +// Note that encoding rules are slightly different from other "Option" fields. +type OptionBool struct { + hasValue bool + value bool +} + +// NewOptionBoolEmpty creates an OptionBool without a value. +func NewOptionBoolEmpty() OptionBool { + return OptionBool{false, false} +} + +// NewOptionBool creates an OptionBool with a value. +func NewOptionBool(value bool) OptionBool { + return OptionBool{true, value} +} + +// ParityEncode implements encoding for OptionBool as per Rust implementation. +func (o OptionBool) Encode(encoder Encoder) error { + var err error + if !o.hasValue { + err = encoder.PushByte(0) + } else { + if o.value { + err = encoder.PushByte(1) + } else { + err = encoder.PushByte(2) + } + } + if err != nil { + return err + } + return nil +} + +// ParityDecode implements decoding for OptionBool as per Rust implementation. +func (o *OptionBool) Decode(decoder Decoder) error { + b, _ := decoder.ReadOneByte() + switch b { + case 0: + o.hasValue = false + o.value = false + case 1: + o.hasValue = true + o.value = true + case 2: + o.hasValue = true + o.value = false + default: + return fmt.Errorf("Unknown byte prefix for encoded OptionBool: %d", b) + } + return nil +} + +// ToKeyedVec replicates the behaviour of Rust's to_keyed_vec helper. +func ToKeyedVec(value interface{}, prependKey []byte) ([]byte, error) { + var buffer = bytes.NewBuffer(prependKey) + err := Encoder{buffer}.Encode(value) + if err != nil { + return nil, err + } + return buffer.Bytes(), nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/account_data.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/account_data.go new file mode 100644 index 000000000..1583f29a3 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/account_data.go @@ -0,0 +1,31 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +// AccountInfo contains information of an account +type AccountInfo struct { + Nonce U32 + Consumers U32 + Providers U32 + Sufficients U32 + Data struct { + Free U128 + Reserved U128 + MiscFrozen U128 + Flags U128 + } +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/account_id.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/account_id.go new file mode 100644 index 000000000..4e14ea255 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/account_id.go @@ -0,0 +1,137 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "strings" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + "github.com/ethereum/go-ethereum/common/hexutil" +) + +type OptionAccountID struct { + option + value AccountID +} + +func NewOptionAccountID(value AccountID) OptionAccountID { + return OptionAccountID{option{hasValue: true}, value} +} + +func NewOptionAccountIDEmpty() OptionAccountID { + return OptionAccountID{option: option{hasValue: false}} +} + +func (o *OptionAccountID) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +func (o OptionAccountID) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +// SetSome sets a value +func (o *OptionAccountID) SetSome(value AccountID) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionAccountID) SetNone() { + o.hasValue = false + o.value = AccountID{} +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o *OptionAccountID) Unwrap() (ok bool, value AccountID) { + return o.hasValue, o.value +} + +const ( + AccountIDLen = 32 +) + +// AccountID represents a public key (an 32 byte array) +type AccountID [AccountIDLen]byte + +func (a *AccountID) ToBytes() []byte { + if a == nil { + return nil + } + + b := a[:] + + return b +} + +func (a *AccountID) ToHexString() string { + if a == nil { + return "" + } + + return hexutil.Encode(a.ToBytes()) +} + +func (a *AccountID) Equal(accountID *AccountID) bool { + return bytes.Equal(a.ToBytes(), accountID.ToBytes()) +} + +func (a AccountID) MarshalJSON() ([]byte, error) { + return json.Marshal(a.ToHexString()) +} + +func (a *AccountID) UnmarshalJSON(data []byte) error { + accID, err := NewAccountIDFromHexString(strings.Trim(string(data), "\"")) + + if err != nil { + return err + } + + *a = *accID + + return nil +} + +var ( + ErrInvalidAccountIDBytes = errors.New("invalid account ID bytes") +) + +// NewAccountID creates a new AccountID type +func NewAccountID(b []byte) (*AccountID, error) { + if len(b) != AccountIDLen { + return nil, ErrInvalidAccountIDBytes + } + + a := AccountID{} + + copy(a[:], b) + + return &a, nil +} + +func NewAccountIDFromHexString(accountIDHex string) (*AccountID, error) { + b, err := hexutil.Decode(accountIDHex) + + if err != nil { + return nil, err + } + + return NewAccountID(b) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/account_index.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/account_index.go new file mode 100644 index 000000000..3aabccecc --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/account_index.go @@ -0,0 +1,25 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +// AccountIndex is a shortened, variable-length encoding for an Account +type AccountIndex uint32 + +// NewAccountIndex creates a new AccountIndex type +func NewAccountIndex(i uint32) AccountIndex { + return AccountIndex(i) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/account_info.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/account_info.go new file mode 100644 index 000000000..c0584674b --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/account_info.go @@ -0,0 +1,28 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +// Deprecated: AccountInfoV4 is an account information structure for contracts +type AccountInfoV4 struct { + TrieID []byte + CurrentMemStored uint64 +} + +// Deprecated: NewAccountInfoV4 creates a new AccountInfoV4 type +func NewAccountInfoV4(trieID []byte, currentMemStored uint64) AccountInfoV4 { + return AccountInfoV4{trieID, currentMemStored} +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/address.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/address.go new file mode 100644 index 000000000..ccb917044 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/address.go @@ -0,0 +1,153 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "fmt" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/codec" +) + +// Address is a wrapper around an AccountId or an AccountIndex. It is encoded with a prefix in case of an AccountID. +// Basically the Address is encoded as `[ , ...publicKey/...bytes ]` as per spec +type Address struct { + IsAccountID bool + AsAccountID AccountID + IsAccountIndex bool + AsAccountIndex AccountIndex +} + +// NewAddressFromAccountID creates an Address from the given AccountID (public key) +func NewAddressFromAccountID(b []byte) (Address, error) { + accountID, err := NewAccountID(b) + + if err != nil { + return Address{}, err + } + + return Address{ + IsAccountID: true, + AsAccountID: *accountID, + }, nil +} + +// NewAddressFromHexAccountID creates an Address from the given hex string that contains an AccountID (public key) +func NewAddressFromHexAccountID(str string) (Address, error) { + b, err := codec.HexDecodeString(str) + if err != nil { + return Address{}, err + } + return NewAddressFromAccountID(b) +} + +// NewAddressFromAccountIndex creates an Address from the given AccountIndex +func NewAddressFromAccountIndex(u uint32) Address { + return Address{ + IsAccountIndex: true, + AsAccountIndex: AccountIndex(u), + } +} + +func (a *Address) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + if defaultOptions.NoPalletIndices { + var sm [31]byte // Reading Address[32] minus b already read + err = decoder.Decode(&sm) + if err != nil { + return err + } + accountID, err := NewAccountID(append([]byte{b}, sm[:]...)) // Push b back to the front + if err != nil { + return err + } + a.AsAccountID = *accountID + a.IsAccountID = true + return nil + } + + if b == 0xff { + err = decoder.Decode(&a.AsAccountID) + a.IsAccountID = true + return err + } + + if b == 0xfe { + return fmt.Errorf("decoding of Address with 0xfe prefix not supported") + } + + if b == 0xfd { + err = decoder.Decode(&a.AsAccountIndex) + a.IsAccountIndex = true + return err + } + + if b == 0xfc { + var aIndex uint16 + err = decoder.Decode(&aIndex) + a.IsAccountIndex = true + a.AsAccountIndex = AccountIndex(aIndex) + return err + } + + a.IsAccountIndex = true + a.AsAccountIndex = AccountIndex(b) + return nil +} + +func (a Address) Encode(encoder scale.Encoder) error { + // type of address - public key + if a.IsAccountID { + if !defaultOptions.NoPalletIndices { // Skip in case target chain doesn't include indices pallet + err := encoder.PushByte(255) + if err != nil { + return err + } + } + + err := encoder.Write(a.AsAccountID[:]) + if err != nil { + return err + } + + return nil + } + + if a.AsAccountIndex > 0xffff { + err := encoder.PushByte(253) + if err != nil { + return err + } + + return encoder.Encode(a.AsAccountIndex) + } + + if a.AsAccountIndex >= 0xf0 { + err := encoder.PushByte(252) + if err != nil { + return err + } + + return encoder.Encode(uint16(a.AsAccountIndex)) + } + + return encoder.Encode(uint8(a.AsAccountIndex)) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/balance_status.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/balance_status.go new file mode 100644 index 000000000..5139ec911 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/balance_status.go @@ -0,0 +1,48 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "fmt" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +type BalanceStatus byte + +const ( + // Funds are free, as corresponding to `free` item in Balances. + Free BalanceStatus = 0 + // Funds are reserved, as corresponding to `reserved` item in Balances. + Reserved BalanceStatus = 1 +) + +func (bs *BalanceStatus) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + vb := BalanceStatus(b) + switch vb { + case Free, Reserved: + *bs = vb + default: + return fmt.Errorf("unknown BalanceStatus enum: %v", vb) + } + return err +} + +func (bs BalanceStatus) Encode(encoder scale.Encoder) error { + return encoder.PushByte(byte(bs)) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/beefy.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/beefy.go new file mode 100644 index 000000000..303a98a64 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/beefy.go @@ -0,0 +1,220 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// Copyright 2021 Snowfork +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/codec" +) + +// PayloadItem ... +type PayloadItem struct { + ID [2]byte + Data []byte +} + +// Commitment is a beefy commitment +type Commitment struct { + Payload []PayloadItem + BlockNumber uint32 + ValidatorSetID uint64 +} + +// SignedCommitment is a beefy commitment with optional signatures from the set of validators +type SignedCommitment struct { + Commitment Commitment + Signatures []OptionBeefySignature +} + +type OptionalSignedCommitment struct { + option + value SignedCommitment +} + +type CompactSignedCommitment struct { + Commitment Commitment + SignaturesFrom []byte + ValidatorSetLen uint32 + SignaturesCompact []BeefySignature +} + +// BeefySignature is a beefy signature +type BeefySignature [65]byte + +// OptionBeefySignature is a structure that can store a BeefySignature or a missing value +type OptionBeefySignature struct { + option + value BeefySignature +} + +// NewOptionBeefySignature creates an OptionBeefySignature with a value +func NewOptionBeefySignature(value BeefySignature) OptionBeefySignature { + return OptionBeefySignature{option{true}, value} +} + +// NewOptionBeefySignatureEmpty creates an OptionBeefySignature without a value +func NewOptionBeefySignatureEmpty() OptionBeefySignature { + return OptionBeefySignature{option: option{false}} +} + +func (o OptionBeefySignature) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionBeefySignature) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionBeefySignature) SetSome(value BeefySignature) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionBeefySignature) SetNone() { + o.hasValue = false + o.value = BeefySignature{} +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionBeefySignature) Unwrap() (ok bool, value BeefySignature) { + return o.hasValue, o.value +} + +// bits are packed into chunks of this size +const containerBitSize = 8 + +func (s *SignedCommitment) Decode(decoder scale.Decoder) error { + compact := CompactSignedCommitment{} + + err := decoder.Decode(&compact) + if err != nil { + return err + } + + var bits []byte + + for _, block := range compact.SignaturesFrom { + for bit := 0; bit < containerBitSize; bit++ { + bits = append(bits, (block>>(containerBitSize-bit-1))&1) + } + } + + bits = bits[0:compact.ValidatorSetLen] + + var signatures []OptionBeefySignature + sigIndex := 0 + + for _, bit := range bits { + if bit == 1 { + signatures = append(signatures, NewOptionBeefySignature(compact.SignaturesCompact[sigIndex])) + sigIndex++ + } else { + signatures = append(signatures, NewOptionBeefySignatureEmpty()) + } + } + + s.Commitment = compact.Commitment + s.Signatures = signatures + + return nil +} + +func (s SignedCommitment) Encode(encoder scale.Encoder) error { + var compact CompactSignedCommitment + var bits []byte + var signaturesFrom []byte + var signaturesCompact []BeefySignature + + validatorSetLen := len(s.Signatures) + + for _, optionSig := range s.Signatures { + if optionSig.IsSome() { + bits = append(bits, 1) + _, signature := optionSig.Unwrap() + signaturesCompact = append(signaturesCompact, signature) + } else { + bits = append(bits, 0) + } + } + + excessBitsLen := containerBitSize - (validatorSetLen % containerBitSize) + bits = append(bits, make([]byte, excessBitsLen)...) + + for _, chunk := range makeChunks(bits, containerBitSize) { + acc := chunk[0] + for i := 1; i < containerBitSize; i++ { + acc <<= 1 + acc |= chunk[i] + } + signaturesFrom = append(signaturesFrom, acc) + } + + compact.Commitment = s.Commitment + compact.SignaturesCompact = signaturesCompact + compact.SignaturesFrom = signaturesFrom + compact.ValidatorSetLen = uint32(validatorSetLen) + + return encoder.Encode(compact) +} + +func makeChunks(slice []byte, chunkSize int) [][]byte { + var chunks [][]byte + for i := 0; i < len(slice); i += chunkSize { + end := i + chunkSize + + // necessary check to avoid slicing beyond + // slice capacity + if end > len(slice) { + end = len(slice) + } + + chunks = append(chunks, slice[i:end]) + } + + return chunks +} + +// UnmarshalText deserializes hex string into a SignedCommitment. +// Used for decoding JSON-RPC subscription messages (beefy_subscribeJustifications) +func (s *SignedCommitment) UnmarshalText(text []byte) error { + return codec.DecodeFromHex(string(text), s) +} + +func (o OptionalSignedCommitment) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionalSignedCommitment) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +func (o OptionalSignedCommitment) Unwrap() (ok bool, value SignedCommitment) { + return o.hasValue, o.value +} + +func (o *OptionalSignedCommitment) SetSome(value SignedCommitment) { + o.hasValue = true + o.value = value +} + +func (o *OptionalSignedCommitment) SetNone() { + o.hasValue = false + o.value = SignedCommitment{} +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/bitvec.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/bitvec.go new file mode 100644 index 000000000..eb07b2db6 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/bitvec.go @@ -0,0 +1,108 @@ +package types + +import ( + "errors" + "fmt" + "math" + "math/bits" + "strings" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +type BitOrder uint + +const ( + BitOrderLsb0 BitOrder = iota + BitOrderMsb0 +) + +var ( + BitOrderName = map[BitOrder]string{ + BitOrderLsb0: "Lsb0", + BitOrderMsb0: "Msb0", + } + + BitOrderValue = map[string]BitOrder{ + "Lsb0": BitOrderLsb0, + "Msb0": BitOrderMsb0, + } +) + +func (b *BitOrder) String() string { + return BitOrderName[*b] +} + +func NewBitOrderFromString(s string) (BitOrder, error) { + bitOrder, ok := BitOrderValue[s] + + if !ok { + return 0, fmt.Errorf("bit order '%s' not supported", s) + } + + return bitOrder, nil +} + +type BitVec struct { + BitOrder BitOrder + + ByteSlice []uint8 +} + +func NewBitVec(bitOrder BitOrder) *BitVec { + return &BitVec{ + BitOrder: bitOrder, + } +} + +func (b *BitVec) Decode(decoder scale.Decoder) error { + numBytes, err := b.GetMinimumNumberOfBytes(decoder) + + if err != nil { + return err + } + + for i := uint(0); i < numBytes; i++ { + decodedByte, err := decoder.ReadOneByte() + + if err != nil { + return err + } + + if b.BitOrder == BitOrderLsb0 { + decodedByte = bits.Reverse8(decodedByte) + } + + b.ByteSlice = append(b.ByteSlice, decodedByte) + } + + return nil +} + +func (b *BitVec) GetMinimumNumberOfBytes(decoder scale.Decoder) (uint, error) { + nb, err := decoder.DecodeUintCompact() + + if err != nil { + return 0, err + } + + numberOfBits := nb.Uint64() + + if numberOfBits == 0 { + return 0, errors.New("invalid number of bits") + } + + return uint(math.Ceil(float64(numberOfBits) / 8)), nil +} + +func (b *BitVec) String() string { + var sb strings.Builder + + sb.WriteString("0b") + + for _, byte := range b.ByteSlice { + sb.WriteString(fmt.Sprintf("%08b", byte)) + } + + return sb.String() +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/block/block.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/block/block.go new file mode 100644 index 000000000..dca50fe37 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/block/block.go @@ -0,0 +1,39 @@ +package block + +import ( + "errors" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/registry" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +type SignedBlock struct { + Block Block `json:"block"` + Justification types.Justification `json:"justification"` +} + +type Block struct { + Header types.Header `json:"header"` + Extrinsics []string `json:"extrinsics"` +} + +// DecodeExtrinsics attempts to decode the extrinsics using the provided decoder. +func (s *SignedBlock) DecodeExtrinsics(decoder *registry.ExtrinsicDecoder) ([]*registry.DecodedExtrinsic, error) { + if s == nil { + return nil, errors.New("nil SignedBlock") + } + + var decodedExtrinsics []*registry.DecodedExtrinsic + + for _, hexEncodedExtrinsic := range s.Block.Extrinsics { + decodedExtrinsic, err := decoder.DecodeHex(hexEncodedExtrinsic) + + if err != nil { + return nil, err + } + + decodedExtrinsics = append(decodedExtrinsics, decodedExtrinsic) + } + + return decodedExtrinsics, nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/body.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/body.go new file mode 100644 index 000000000..d4132a0f1 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/body.go @@ -0,0 +1,202 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +type BodyID struct { + IsUnit bool + + IsNamed bool + Body []U8 + + IsIndex bool + Index U32 + + IsExecutive bool + + IsTechnical bool + + IsLegislative bool + + IsJudicial bool +} + +func (b *BodyID) Decode(decoder scale.Decoder) error { + bb, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch bb { + case 0: + b.IsUnit = true + case 1: + b.IsNamed = true + + return decoder.Decode(&b.Body) + case 2: + b.IsIndex = true + + return decoder.Decode(&b.Index) + case 3: + b.IsExecutive = true + case 4: + b.IsTechnical = true + case 5: + b.IsLegislative = true + case 6: + b.IsJudicial = true + } + + return nil +} + +func (b BodyID) Encode(encoder scale.Encoder) error { + switch { + case b.IsUnit: + return encoder.PushByte(0) + case b.IsNamed: + if err := encoder.PushByte(1); err != nil { + return err + } + + return encoder.Encode(b.Body) + case b.IsIndex: + if err := encoder.PushByte(2); err != nil { + return err + } + + return encoder.Encode(b.Index) + case b.IsExecutive: + return encoder.PushByte(3) + case b.IsTechnical: + return encoder.PushByte(4) + case b.IsLegislative: + return encoder.PushByte(5) + case b.IsJudicial: + return encoder.PushByte(6) + } + + return nil +} + +type BodyPart struct { + IsVoice bool + + IsMembers bool + MembersCount U32 + + IsFraction bool + FractionNom U32 + FractionDenom U32 + + IsAtLeastProportion bool + AtLeastProportionNom U32 + AtLeastProportionDenom U32 + + IsMoreThanProportion bool + MoreThanProportionNom U32 + MoreThanProportionDenom U32 +} + +func (b *BodyPart) Decode(decoder scale.Decoder) error { + bb, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch bb { + case 0: + b.IsVoice = true + case 1: + b.IsMembers = true + + return decoder.Decode(&b.MembersCount) + case 2: + b.IsFraction = true + + if err := decoder.Decode(&b.FractionNom); err != nil { + return err + } + + return decoder.Decode(&b.FractionDenom) + case 3: + b.IsAtLeastProportion = true + + if err := decoder.Decode(&b.AtLeastProportionNom); err != nil { + return err + } + + return decoder.Decode(&b.AtLeastProportionDenom) + case 4: + b.IsMoreThanProportion = true + + if err := decoder.Decode(&b.MoreThanProportionNom); err != nil { + return err + } + + return decoder.Decode(&b.MoreThanProportionDenom) + } + + return nil +} + +func (b BodyPart) Encode(encoder scale.Encoder) error { + switch { + case b.IsVoice: + return encoder.PushByte(0) + case b.IsMembers: + if err := encoder.PushByte(1); err != nil { + return err + } + + return encoder.Encode(b.MembersCount) + case b.IsFraction: + if err := encoder.PushByte(2); err != nil { + return err + } + + if err := encoder.Encode(b.FractionNom); err != nil { + return err + } + + return encoder.Encode(b.FractionDenom) + case b.IsAtLeastProportion: + if err := encoder.PushByte(3); err != nil { + return err + } + + if err := encoder.Encode(b.AtLeastProportionNom); err != nil { + return err + } + + return encoder.Encode(b.AtLeastProportionDenom) + case b.IsMoreThanProportion: + if err := encoder.PushByte(4); err != nil { + return err + } + + if err := encoder.Encode(b.MoreThanProportionNom); err != nil { + return err + } + + return encoder.Encode(b.MoreThanProportionDenom) + } + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/bool.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/bool.go new file mode 100644 index 000000000..fc8036e3c --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/bool.go @@ -0,0 +1,25 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +// Bool represents boolean values +type Bool bool + +// NewBool creates a new Bool +func NewBool(b bool) Bool { + return Bool(b) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/bytes.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/bytes.go new file mode 100644 index 000000000..78bdfc054 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/bytes.go @@ -0,0 +1,118 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "fmt" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +// Bytes represents byte slices. Bytes has a variable length, it is encoded with a scale prefix +type Bytes []byte + +// NewBytes creates a new Bytes type +func NewBytes(b []byte) Bytes { + return Bytes(b) +} + +// BytesBare represents byte slices that will be encoded bare, i. e. without a compact length prefix. This makes it +// impossible to decode the bytes, but is used as the payload for signing. +type BytesBare []byte + +// Encode implements encoding for BytesBare, which just unwraps the bytes of BytesBare without adding a compact +// length prefix +func (b BytesBare) Encode(encoder scale.Encoder) error { + return encoder.Write(b) +} + +// Decode does nothing and always returns an error. BytesBare is only used for encoding, not for decoding +func (b *BytesBare) Decode(decoder scale.Decoder) error { + return fmt.Errorf("decoding of BytesBare is not supported") +} + +// Bytes8 represents an 8 byte array +type Bytes8 [8]byte + +// NewBytes8 creates a new Bytes8 type +func NewBytes8(b [8]byte) Bytes8 { + return Bytes8(b) +} + +// Bytes16 represents an 16 byte array +type Bytes16 [16]byte + +// NewBytes16 creates a new Bytes16 type +func NewBytes16(b [16]byte) Bytes16 { + return Bytes16(b) +} + +// Bytes32 represents an 32 byte array +type Bytes32 [32]byte + +// NewBytes32 creates a new Bytes32 type +func NewBytes32(b [32]byte) Bytes32 { + return Bytes32(b) +} + +// Bytes64 represents an 64 byte array +type Bytes64 [64]byte + +// NewBytes64 creates a new Bytes64 type +func NewBytes64(b [64]byte) Bytes64 { + return Bytes64(b) +} + +// Bytes128 represents an 128 byte array +type Bytes128 [128]byte + +// NewBytes128 creates a new Bytes128 type +func NewBytes128(b [128]byte) Bytes128 { + return Bytes128(b) +} + +// Bytes256 represents an 256 byte array +type Bytes256 [256]byte + +// NewBytes256 creates a new Bytes256 type +func NewBytes256(b [256]byte) Bytes256 { + return Bytes256(b) +} + +// Bytes512 represents an 512 byte array +type Bytes512 [512]byte + +// NewBytes512 creates a new Bytes512 type +func NewBytes512(b [512]byte) Bytes512 { + return Bytes512(b) +} + +// Bytes1024 represents an 1024 byte array +type Bytes1024 [1024]byte + +// NewBytes1024 creates a new Bytes1024 type +func NewBytes1024(b [1024]byte) Bytes1024 { + return Bytes1024(b) +} + +// Bytes2048 represents an 2048 byte array +type Bytes2048 [2048]byte + +// NewBytes2048 creates a new Bytes2048 type +func NewBytes2048(b [2048]byte) Bytes2048 { + return Bytes2048(b) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/call.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/call.go new file mode 100644 index 000000000..1fa8cd9b2 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/call.go @@ -0,0 +1,107 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "io" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/codec" +) + +// Call is the extrinsic function descriptor +type Call struct { + CallIndex CallIndex + Args Args +} + +func NewCall(m *Metadata, call string, args ...interface{}) (Call, error) { + c, err := m.FindCallIndex(call) + if err != nil { + return Call{}, err + } + + var a []byte + for _, arg := range args { + e, err := codec.Encode(arg) + if err != nil { + return Call{}, err + } + a = append(a, e...) + } + + return Call{c, a}, nil +} + +// Callindex is a 16 bit wrapper around the `[sectionIndex, methodIndex]` value that uniquely identifies a method +type CallIndex struct { + SectionIndex uint8 + MethodIndex uint8 +} + +func (m *CallIndex) Decode(decoder scale.Decoder) error { + err := decoder.Decode(&m.SectionIndex) + if err != nil { + return err + } + + err = decoder.Decode(&m.MethodIndex) + if err != nil { + return err + } + + return nil +} + +func (m CallIndex) Encode(encoder scale.Encoder) error { + err := encoder.Encode(m.SectionIndex) + if err != nil { + return err + } + + err = encoder.Encode(m.MethodIndex) + if err != nil { + return err + } + + return nil +} + +// Args are the encoded arguments for a Call +type Args []byte + +// Encode implements encoding for Args, which just unwraps the bytes of Args +func (a Args) Encode(encoder scale.Encoder) error { + return encoder.Write(a) +} + +// Decode implements decoding for Args, which just reads all the remaining bytes into Args +func (a *Args) Decode(decoder scale.Decoder) error { + for i := 0; true; i++ { + b, err := decoder.ReadOneByte() + if err == io.EOF { + break + } + if err != nil { + return err + } + *a = append((*a)[:i], b) + } + return nil +} + +type Justification Bytes diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/candidate_receipt.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/candidate_receipt.go new file mode 100644 index 000000000..57796ee7a --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/candidate_receipt.go @@ -0,0 +1,38 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +type CollatorID [32]U8 +type CollatorSignature [64]U8 + +type CandidateDescriptor struct { + ParachainID ParachainID + RelayParent Hash + CollatorID CollatorID + PersistentValidationDataHash Hash + PoVHash Hash + ErasureRoot Hash + CollatorSignature CollatorSignature + ParaHead Hash + ValidationCodeHash Hash +} + +type CandidateReceipt struct { + Descriptor CandidateDescriptor + + CommitmentsHash Hash +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/chain_properties.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/chain_properties.go new file mode 100644 index 000000000..20cd279f1 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/chain_properties.go @@ -0,0 +1,59 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +// ChainProperties contains the SS58 format, the token decimals and the token symbol +type ChainProperties struct { + IsSS58Format bool + AsSS58Format U8 + IsTokenDecimals bool + AsTokenDecimals U32 + IsTokenSymbol bool + AsTokenSymbol Text +} + +func (a *ChainProperties) Decode(decoder scale.Decoder) error { + if err := decoder.DecodeOption(&a.IsSS58Format, &a.AsSS58Format); err != nil { + return err + } + if err := decoder.DecodeOption(&a.IsTokenDecimals, &a.AsTokenDecimals); err != nil { + return err + } + if err := decoder.DecodeOption(&a.IsTokenSymbol, &a.AsTokenSymbol); err != nil { + return err + } + + return nil +} + +func (a ChainProperties) Encode(encoder scale.Encoder) error { + if err := encoder.EncodeOption(a.IsSS58Format, a.AsSS58Format); err != nil { + return err + } + if err := encoder.EncodeOption(a.IsTokenDecimals, a.AsTokenDecimals); err != nil { + return err + } + if err := encoder.EncodeOption(a.IsTokenSymbol, a.AsTokenSymbol); err != nil { + return err + } + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/class_metadata.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/class_metadata.go new file mode 100644 index 000000000..8bff9af93 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/class_metadata.go @@ -0,0 +1,49 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +type ClassMetadata struct { + Deposit U128 + Data Bytes + IsFrozen bool +} + +func (c *ClassMetadata) Decode(decoder scale.Decoder) error { + if err := decoder.Decode(&c.Deposit); err != nil { + return err + } + + if err := decoder.Decode(&c.Data); err != nil { + return err + } + + return decoder.Decode(&c.IsFrozen) +} + +func (c ClassMetadata) Encode(encoder scale.Encoder) error { + if err := encoder.Encode(c.Deposit); err != nil { + return err + } + + if err := encoder.Encode(c.Data); err != nil { + return err + } + + return encoder.Encode(c.IsFrozen) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/codec/codec.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/codec/codec.go new file mode 100644 index 000000000..c50965f4c --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/codec/codec.go @@ -0,0 +1,125 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package codec + +import ( + "bytes" + "encoding/hex" + "fmt" + "reflect" + "strings" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +// Hexer interface is implemented by any type that has a Hex() function returning a string +type Hexer interface { + Hex() string +} + +// Encode encodes `value` with the scale codec with passed EncoderOptions, returning []byte +func Encode(value interface{}) ([]byte, error) { + var buffer = bytes.Buffer{} + err := scale.NewEncoder(&buffer).Encode(value) + if err != nil { + return buffer.Bytes(), err + } + return buffer.Bytes(), nil +} + +// EncodeToHex encodes `value` with the scale codec, returning a hex string (prefixed by 0x) +func EncodeToHex(value interface{}) (string, error) { + bz, err := Encode(value) + if err != nil { + return "", err + } + + return fmt.Sprintf("%#x", bz), nil +} + +// Decode decodes `bz` with the scale codec into `target`. `target` should be a pointer. +func Decode(bz []byte, target interface{}) error { + return scale.NewDecoder(bytes.NewReader(bz)).Decode(target) +} + +// DecodeFromHex decodes `str` with the scale codec into `target`. `target` should be a pointer. +func DecodeFromHex(str string, target interface{}) error { + bz, err := HexDecodeString(str) + if err != nil { + return err + } + return Decode(bz, target) +} + +// EncodedLength returns the length of the value when encoded as a byte array +func EncodedLength(value interface{}) (int, error) { + var buffer = bytes.Buffer{} + err := scale.NewEncoder(&buffer).Encode(value) + if err != nil { + return 0, err + } + return buffer.Len(), nil +} + +// Eq compares the value of the input to see if there is a match +func Eq(one, other interface{}) bool { + return reflect.DeepEqual(one, other) +} + +// HexDecodeString decodes bytes from a hex string. Contrary to hex.DecodeString, this function does not error if "0x" +// is prefixed, and adds an extra 0 if the hex string has an odd length. +func HexDecodeString(s string) ([]byte, error) { + s = strings.TrimPrefix(s, "0x") + + if len(s)%2 != 0 { + s = "0" + s + } + + b, err := hex.DecodeString(s) + if err != nil { + return nil, err + } + + return b, nil +} + +// MustHexDecodeString panics if str cannot be decoded +func MustHexDecodeString(str string) []byte { + bz, err := HexDecodeString(str) + if err != nil { + panic(err) + } + return bz +} + +// HexEncodeToString encodes bytes to a hex string. Contrary to hex.EncodeToString, +// this function prefixes the hex string with "0x" +func HexEncodeToString(b []byte) string { + return "0x" + hex.EncodeToString(b) +} + +// Hex returns a hex string representation of the value (not of the encoded value) +func Hex(value interface{}) (string, error) { + switch v := value.(type) { + case Hexer: + return v.Hex(), nil + case []byte: + return fmt.Sprintf("%#x", v), nil + default: + return "", fmt.Errorf("does not support %T", v) + } +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/collection_details.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/collection_details.go new file mode 100644 index 000000000..57fa6f7b6 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/collection_details.go @@ -0,0 +1,105 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +type CollectionDetails struct { + Owner AccountID + Issuer AccountID + Admin AccountID + Freezer AccountID + TotalDeposit U128 + FreeHolding bool + Instances U32 + InstanceMetadatas U32 + Attributes U32 + IsFrozen bool +} + +func (c *CollectionDetails) Decode(decoder scale.Decoder) error { + if err := decoder.Decode(&c.Owner); err != nil { + return err + } + + if err := decoder.Decode(&c.Issuer); err != nil { + return err + } + if err := decoder.Decode(&c.Admin); err != nil { + return err + } + if err := decoder.Decode(&c.Freezer); err != nil { + return err + } + if err := decoder.Decode(&c.TotalDeposit); err != nil { + return err + } + if err := decoder.Decode(&c.FreeHolding); err != nil { + return err + } + if err := decoder.Decode(&c.Instances); err != nil { + return err + } + if err := decoder.Decode(&c.InstanceMetadatas); err != nil { + return err + } + if err := decoder.Decode(&c.Attributes); err != nil { + return err + } + + return decoder.Decode(&c.IsFrozen) +} + +func (c CollectionDetails) Encode(encoder scale.Encoder) error { + if err := encoder.Encode(c.Owner); err != nil { + return err + } + + if err := encoder.Encode(c.Issuer); err != nil { + return err + } + + if err := encoder.Encode(c.Admin); err != nil { + return err + } + + if err := encoder.Encode(c.Freezer); err != nil { + return err + } + + if err := encoder.Encode(c.TotalDeposit); err != nil { + return err + } + + if err := encoder.Encode(c.FreeHolding); err != nil { + return err + } + + if err := encoder.Encode(c.Instances); err != nil { + return err + } + + if err := encoder.Encode(c.InstanceMetadatas); err != nil { + return err + } + + if err := encoder.Encode(c.Attributes); err != nil { + return err + } + + return encoder.Encode(c.IsFrozen) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/data.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/data.go new file mode 100644 index 000000000..6b1908fd4 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/data.go @@ -0,0 +1,60 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "fmt" + "io" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +// Data is a raw data structure, containing raw bytes that are not decoded/encoded (without any length encoding). +// Be careful using this in your own structs – it only works as the last value in a struct since it will consume the +// remainder of the encoded data. The reason for this is that it does not contain any length encoding, so it would +// not know where to stop. +type Data []byte + +// NewData creates a new Data type +func NewData(b []byte) Data { + return Data(b) +} + +// Encode implements encoding for Data, which just unwraps the bytes of Data +func (d Data) Encode(encoder scale.Encoder) error { + return encoder.Write(d) +} + +// Decode implements decoding for Data, which just reads all the remaining bytes into Data +func (d *Data) Decode(decoder scale.Decoder) error { + for i := 0; true; i++ { + b, err := decoder.ReadOneByte() + if err == io.EOF { + break + } + if err != nil { + return err + } + *d = append((*d)[:i], b) + } + return nil +} + +// Hex returns a hex string representation of the value +func (d Data) Hex() string { + return fmt.Sprintf("%#x", d) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/digest.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/digest.go new file mode 100644 index 000000000..e08cfacda --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/digest.go @@ -0,0 +1,61 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "encoding/json" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/codec" +) + +// Digest contains logs +type Digest []DigestItem + +// UnmarshalJSON fills u with the JSON encoded byte array given by b +func (d *Digest) UnmarshalJSON(bz []byte) error { + var tmp struct { + Logs []string `json:"logs"` + } + if err := json.Unmarshal(bz, &tmp); err != nil { + return err + } + *d = make([]DigestItem, len(tmp.Logs)) + for i, log := range tmp.Logs { + err := codec.DecodeFromHex(log, &(*d)[i]) + if err != nil { + return err + } + } + return nil +} + +// MarshalJSON returns a JSON encoded byte array of u +func (d Digest) MarshalJSON() ([]byte, error) { + logs := make([]string, len(d)) + var err error + for i, di := range d { + logs[i], err = codec.EncodeToHex(di) + if err != nil { + return nil, err + } + } + return json.Marshal(struct { + Logs []string `json:"logs"` + }{ + Logs: logs, + }) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/digest_item.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/digest_item.go new file mode 100644 index 000000000..051f31d55 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/digest_item.go @@ -0,0 +1,183 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "fmt" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +// DigestItem specifies the item in the logs of a digest +type DigestItem struct { + IsChangesTrieRoot bool // 2 + AsChangesTrieRoot Hash + IsPreRuntime bool // 6 + AsPreRuntime PreRuntime + IsConsensus bool // 4 + AsConsensus Consensus + IsSeal bool // 5 + AsSeal Seal + IsChangesTrieSignal bool // 7 + AsChangesTrieSignal ChangesTrieSignal + IsOther bool // 0 + AsOther Bytes +} + +func (m *DigestItem) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + + if err != nil { + return err + } + + switch b { + case 2: + m.IsChangesTrieRoot = true + err = decoder.Decode(&m.AsChangesTrieRoot) + case 6: + m.IsPreRuntime = true + err = decoder.Decode(&m.AsPreRuntime) + case 4: + m.IsConsensus = true + err = decoder.Decode(&m.AsConsensus) + case 5: + m.IsSeal = true + err = decoder.Decode(&m.AsSeal) + case 7: + m.IsChangesTrieSignal = true + err = decoder.Decode(&m.AsChangesTrieSignal) + case 0: + m.IsOther = true + err = decoder.Decode(&m.AsOther) + } + + if err != nil { + return err + } + + return nil +} + +func (m DigestItem) Encode(encoder scale.Encoder) error { + var err1, err2 error + switch { + case m.IsOther: + err1 = encoder.PushByte(0) + err2 = encoder.Encode(m.AsOther) + case m.IsChangesTrieRoot: + err1 = encoder.PushByte(2) + err2 = encoder.Encode(m.AsChangesTrieRoot) + case m.IsConsensus: + err1 = encoder.PushByte(4) + err2 = encoder.Encode(m.AsConsensus) + case m.IsSeal: + err1 = encoder.PushByte(5) + err2 = encoder.Encode(m.AsSeal) + case m.IsPreRuntime: + err1 = encoder.PushByte(6) + err2 = encoder.Encode(m.AsPreRuntime) + case m.IsChangesTrieSignal: + err1 = encoder.PushByte(7) + err2 = encoder.Encode(m.AsChangesTrieSignal) + } + + if err1 != nil { + return err1 + } + + if err2 != nil { + return err2 + } + + return nil +} + +// AuthorityID represents a public key (an 32 byte array) +type AuthorityID [32]byte + +// NewAuthorityID creates a new AuthorityID type +func NewAuthorityID(b [32]byte) AuthorityID { + return AuthorityID(b) +} + +type Seal struct { + ConsensusEngineID ConsensusEngineID + Bytes Bytes +} + +// ConsensusEngineID is a 4-byte identifier (actually a [u8; 4]) identifying the engine, e.g. for Aura it would be +// [b'a', b'u', b'r', b'a'] +type ConsensusEngineID U32 + +type Consensus struct { + ConsensusEngineID ConsensusEngineID + Bytes Bytes +} + +type PreRuntime struct { + ConsensusEngineID ConsensusEngineID + Bytes Bytes +} + +type ChangesTrieSignal struct { + IsNewConfiguration bool + AsNewConfiguration Bytes +} + +func (c ChangesTrieSignal) Encode(encoder scale.Encoder) error { + switch { + case c.IsNewConfiguration: + err := encoder.PushByte(0) + if err != nil { + return err + } + err = encoder.Encode(c.AsNewConfiguration) + if err != nil { + return err + } + default: + return fmt.Errorf("no such variant for ChangesTrieSignal") + } + + return nil +} + +func (c *ChangesTrieSignal) Decode(decoder scale.Decoder) error { + tag, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch tag { + case 0: + c.IsNewConfiguration = true + err = decoder.Decode(&c.AsNewConfiguration) + if err != nil { + return err + } + default: + return fmt.Errorf("no such variant for ChangesTrieSignal") + } + + return nil +} + +type ChangesTrieConfiguration struct { + DigestInterval U32 + DigestLevels U32 +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/digest_of.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/digest_of.go new file mode 100644 index 000000000..c1f7d6ad9 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/digest_of.go @@ -0,0 +1,61 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "encoding/json" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/codec" +) + +// DigestOf contains logs +type DigestOf []DigestItem + +// UnmarshalJSON fills u with the JSON encoded byte array given by b +func (d *DigestOf) UnmarshalJSON(bz []byte) error { + var tmp struct { + Logs []string `json:"logs"` + } + if err := json.Unmarshal(bz, &tmp); err != nil { + return err + } + *d = make([]DigestItem, len(tmp.Logs)) + for i, log := range tmp.Logs { + err := codec.DecodeFromHex(log, &(*d)[i]) + if err != nil { + return err + } + } + return nil +} + +// MarshalJSON returns a JSON encoded byte array of u +func (d DigestOf) MarshalJSON() ([]byte, error) { + logs := make([]string, len(d)) + var err error + for i, di := range d { + logs[i], err = codec.EncodeToHex(di) + if err != nil { + return nil, err + } + } + return json.Marshal(struct { + Logs []string `json:"logs"` + }{ + Logs: logs, + }) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/dispatch_result_with_post_info.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/dispatch_result_with_post_info.go new file mode 100644 index 000000000..b5ade7bc3 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/dispatch_result_with_post_info.go @@ -0,0 +1,114 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +// PostDispatchInfo is used in DispatchResultWithPostInfo. +// Weight information that is only available post dispatch. +type PostDispatchInfo struct { + ActualWeight Option[Weight] + PaysFee Pays +} + +func (p *PostDispatchInfo) Decode(decoder scale.Decoder) error { + if err := decoder.Decode(&p.ActualWeight); err != nil { + return err + } + + return decoder.Decode(&p.PaysFee) +} + +func (p PostDispatchInfo) Encode(encoder scale.Encoder) error { + if err := encoder.Encode(p.ActualWeight); err != nil { + return err + } + + return encoder.Encode(p.PaysFee) +} + +// DispatchErrorWithPostInfo is used in DispatchResultWithPostInfo. +type DispatchErrorWithPostInfo struct { + PostInfo PostDispatchInfo + Error DispatchError +} + +func (d *DispatchErrorWithPostInfo) Decode(decoder scale.Decoder) error { + if err := decoder.Decode(&d.PostInfo); err != nil { + return err + } + + return decoder.Decode(&d.Error) +} + +func (d DispatchErrorWithPostInfo) Encode(encoder scale.Encoder) error { + if err := encoder.Encode(d.PostInfo); err != nil { + return err + } + + return encoder.Encode(d.Error) +} + +// DispatchResultWithPostInfo can be returned from dispatch able functions. +type DispatchResultWithPostInfo struct { + IsOk bool + Ok PostDispatchInfo + + IsError bool + Error DispatchErrorWithPostInfo +} + +func (d *DispatchResultWithPostInfo) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + d.IsOk = true + + return decoder.Decode(&d.Ok) + case 1: + d.IsError = true + + return decoder.Decode(&d.Error) + } + + return nil +} + +func (d DispatchResultWithPostInfo) Encode(encoder scale.Encoder) error { + switch { + case d.IsOk: + if err := encoder.PushByte(0); err != nil { + return err + } + + return encoder.Encode(d.Ok) + case d.IsError: + if err := encoder.PushByte(1); err != nil { + return err + } + + return encoder.Encode(d.Error) + } + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/dispute.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/dispute.go new file mode 100644 index 000000000..a43ba9177 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/dispute.go @@ -0,0 +1,87 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +type DisputeLocation struct { + IsLocal bool + + IsRemote bool +} + +func (d *DisputeLocation) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + + if err != nil { + return err + } + + switch b { + case 0: + d.IsLocal = true + case 1: + d.IsRemote = true + } + + return nil +} + +func (d DisputeLocation) Encode(encoder scale.Encoder) error { + switch { + case d.IsLocal: + return encoder.PushByte(0) + case d.IsRemote: + return encoder.PushByte(1) + } + + return nil +} + +type DisputeResult struct { + IsValid bool + + IsInvalid bool +} + +func (d *DisputeResult) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + + if err != nil { + return err + } + + switch b { + case 0: + d.IsValid = true + case 1: + d.IsInvalid = true + } + + return nil +} + +func (d DisputeResult) Encode(encoder scale.Encoder) error { + switch { + case d.IsValid: + return encoder.PushByte(0) + case d.IsInvalid: + return encoder.PushByte(1) + } + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/election_compute.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/election_compute.go new file mode 100644 index 000000000..1fd31f627 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/election_compute.go @@ -0,0 +1,93 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "fmt" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +type OptionElectionCompute struct { + option + value ElectionCompute +} + +func NewOptionElectionCompute(value ElectionCompute) OptionElectionCompute { + return OptionElectionCompute{option{hasValue: true}, value} +} + +func NewOptionElectionComputeEmpty() OptionElectionCompute { + return OptionElectionCompute{option: option{hasValue: false}} +} + +func (o OptionElectionCompute) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionElectionCompute) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionElectionCompute) SetSome(value ElectionCompute) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionElectionCompute) SetNone() { + o.hasValue = false + o.value = ElectionCompute(byte(0)) +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o *OptionElectionCompute) Unwrap() (ok bool, value ElectionCompute) { + return o.hasValue, o.value +} + +type ElectionCompute byte + +func NewElectionCompute(b byte) ElectionCompute { + return ElectionCompute(b) +} + +const ( + // OnChain means that the result was forcefully computed on chain at the end of the session. + OnChain ElectionCompute = 0 + // Signed means that the result was submitted and accepted to the chain via a signed transaction. + Signed ElectionCompute = 1 + // Unsigned means that the result was submitted and accepted to the chain via + // an unsigned transaction (by an authority). + Unsigned ElectionCompute = 2 +) + +func (ec *ElectionCompute) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + vb := ElectionCompute(b) + switch vb { + case OnChain, Signed, Unsigned: + *ec = vb + default: + return fmt.Errorf("unknown ElectionCompute enum: %v", vb) + } + return err +} + +func (ec ElectionCompute) Encode(encoder scale.Encoder) error { + return encoder.PushByte(byte(ec)) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/errors.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/errors.go new file mode 100644 index 000000000..a8e4a9c83 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/errors.go @@ -0,0 +1,291 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +type ModuleError struct { + Index U8 + + Error [4]U8 +} + +func (m *ModuleError) Decode(decoder scale.Decoder) error { + if err := decoder.Decode(&m.Index); err != nil { + return err + } + + return decoder.Decode(&m.Error) +} + +func (m ModuleError) Encode(encoder scale.Encoder) error { + if err := encoder.Encode(m.Index); err != nil { + return err + } + + return encoder.Encode(m.Error) +} + +type TokenError struct { + IsNoFunds bool + + IsWouldDie bool + + IsBelowMinimum bool + + IsCannotCreate bool + + IsUnknownAsset bool + + IsFrozen bool + + IsUnsupported bool +} + +func (t *TokenError) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + + if err != nil { + return err + } + + switch b { + case 0: + t.IsNoFunds = true + case 1: + t.IsWouldDie = true + case 2: + t.IsBelowMinimum = true + case 3: + t.IsCannotCreate = true + case 4: + t.IsUnknownAsset = true + case 5: + t.IsFrozen = true + case 6: + t.IsUnsupported = true + } + + return nil +} + +func (t TokenError) Encode(encoder scale.Encoder) error { + switch { + case t.IsNoFunds: + return encoder.PushByte(0) + case t.IsWouldDie: + return encoder.PushByte(1) + case t.IsBelowMinimum: + return encoder.PushByte(2) + case t.IsCannotCreate: + return encoder.PushByte(3) + case t.IsUnknownAsset: + return encoder.PushByte(4) + case t.IsFrozen: + return encoder.PushByte(5) + case t.IsUnsupported: + return encoder.PushByte(6) + } + + return nil +} + +type ArithmeticError struct { + IsUnderflow bool + + IsOverflow bool + + IsDivisionByZero bool +} + +func (a *ArithmeticError) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + + if err != nil { + return err + } + + switch b { + case 0: + a.IsUnderflow = true + case 1: + a.IsOverflow = true + case 2: + a.IsDivisionByZero = true + } + + return nil +} + +func (a ArithmeticError) Encode(encoder scale.Encoder) error { + switch { + case a.IsUnderflow: + return encoder.PushByte(0) + case a.IsOverflow: + return encoder.PushByte(1) + case a.IsDivisionByZero: + return encoder.PushByte(2) + } + + return nil +} + +type TransactionalError struct { + IsLimitReached bool + + IsNoLayer bool +} + +func (t *TransactionalError) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + + if err != nil { + return err + } + + switch b { + case 0: + t.IsLimitReached = true + case 1: + t.IsNoLayer = true + } + + return nil +} + +func (t TransactionalError) Encode(encoder scale.Encoder) error { + switch { + case t.IsLimitReached: + return encoder.PushByte(0) + case t.IsNoLayer: + return encoder.PushByte(1) + } + + return nil +} + +// DispatchError is an error occurring during extrinsic dispatch +type DispatchError struct { + IsOther bool + // Skipped by codec in substrate + // OtherString string + + IsCannotLookup bool + + IsBadOrigin bool + + IsModule bool + ModuleError ModuleError + + IsConsumerRemaining bool + + IsNoProviders bool + + IsTooManyConsumers bool + + IsToken bool + TokenError TokenError + + IsArithmetic bool + ArithmeticError ArithmeticError + + IsTransactional bool + TransactionalError TransactionalError +} + +func (d *DispatchError) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + d.IsOther = true + case 1: + d.IsCannotLookup = true + case 2: + d.IsBadOrigin = true + case 3: + d.IsModule = true + + return decoder.Decode(&d.ModuleError) + case 4: + d.IsConsumerRemaining = true + case 5: + d.IsNoProviders = true + case 6: + d.IsTooManyConsumers = true + case 7: + d.IsToken = true + + return decoder.Decode(&d.TokenError) + case 8: + d.IsArithmetic = true + + return decoder.Decode(&d.ArithmeticError) + case 9: + d.IsTransactional = true + + return decoder.Decode(&d.TransactionalError) + } + + return nil +} + +func (d DispatchError) Encode(encoder scale.Encoder) error { + switch { + case d.IsOther: + return encoder.PushByte(0) + case d.IsCannotLookup: + return encoder.PushByte(1) + case d.IsBadOrigin: + return encoder.PushByte(2) + case d.IsModule: + if err := encoder.PushByte(3); err != nil { + return err + } + + return encoder.Encode(d.ModuleError) + case d.IsConsumerRemaining: + return encoder.PushByte(4) + case d.IsNoProviders: + return encoder.PushByte(5) + case d.IsTooManyConsumers: + return encoder.PushByte(6) + case d.IsToken: + if err := encoder.PushByte(7); err != nil { + return err + } + + return encoder.Encode(d.TokenError) + case d.IsArithmetic: + if err := encoder.PushByte(8); err != nil { + return err + } + + return encoder.Encode(d.ArithmeticError) + case d.IsTransactional: + if err := encoder.PushByte(9); err != nil { + return err + } + + return encoder.Encode(d.TransactionalError) + } + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/event_record.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/event_record.go new file mode 100644 index 000000000..e33132c0a --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/event_record.go @@ -0,0 +1,646 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "bytes" + "errors" + "fmt" + "io" + "reflect" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + "github.com/ethereum/go-ethereum/log" +) + +// EventRecordsRaw is a raw record for a set of events, represented as the raw bytes. It exists since +// decoding of events can only be done with metadata, so events can't follow the static way of decoding +// other types do. It exposes functions to decode events using metadata and targets. +// Be careful using this in your own structs – it only works as the last value in a struct since it will consume the +// remainder of the encoded data. The reason for this is that it does not contain any length encoding, so it would +// not know where to stop. +// +// Deprecated: EventRecordsRaw relies on static event definition that is no longer maintained, +// please check retriever.EventRetriever. +type EventRecordsRaw []byte + +// Encode implements encoding for Data, which just unwraps the bytes of Data +func (e EventRecordsRaw) Encode(encoder scale.Encoder) error { + return encoder.Write(e) +} + +// Decode implements decoding for Data, which just reads all the remaining bytes into Data +func (e *EventRecordsRaw) Decode(decoder scale.Decoder) error { + for i := 0; true; i++ { + b, err := decoder.ReadOneByte() + if err == io.EOF { + break + } + if err != nil { + return err + } + *e = append((*e)[:i], b) + } + return nil +} + +// EventRecords is a default set of possible event records that can be used as a target for +// `func (e EventRecordsRaw) Decode(...` +// Sources: +// https://github.com/polkadot-js/api/blob/master/packages/api-augment/src/substrate/events.ts +// https://github.com/polkadot-js/api/blob/master/packages/api-augment/src/polkadot/events.ts +// +//nolint:stylecheck,lll,revive +type EventRecords struct { + Auctions_AuctionStarted []EventAuctionsAuctionStarted + Auctions_AuctionClosed []EventAuctionsAuctionClosed + Auctions_Reserved []EventAuctionsReserved + Auctions_Unreserved []EventAuctionsUnreserved + Auctions_ReserveConfiscated []EventAuctionsReserveConfiscated + Auctions_BidAccepted []EventAuctionsBidAccepted + Auctions_WinningOffset []EventAuctionsWinningOffset + + Assets_Created []EventAssetCreated + Assets_Issued []EventAssetIssued + Assets_Transferred []EventAssetTransferred + Assets_Burned []EventAssetBurned + Assets_TeamChanged []EventAssetTeamChanged + Assets_OwnerChanged []EventAssetOwnerChanged + Assets_Frozen []EventAssetFrozen + Assets_Thawed []EventAssetThawed + Assets_AssetFrozen []EventAssetAssetFrozen + Assets_AssetThawed []EventAssetAssetThawed + Assets_Destroyed []EventAssetDestroyed + Assets_ForceCreated []EventAssetForceCreated + Assets_MetadataSet []EventAssetMetadataSet + Assets_MetadataCleared []EventAssetMetadataCleared + Assets_ApprovedTransfer []EventAssetApprovedTransfer + Assets_ApprovalCancelled []EventAssetApprovalCancelled + Assets_TransferredApproved []EventAssetTransferredApproved + Assets_AssetStatusChanged []EventAssetAssetStatusChanged + + BagsList_Rebagged []EventBagsListRebagged + + Balances_BalanceSet []EventBalancesBalanceSet + Balances_Deposit []EventBalancesDeposit + Balances_DustLost []EventBalancesDustLost + Balances_Endowed []EventBalancesEndowed + Balances_Reserved []EventBalancesReserved + Balances_ReserveRepatriated []EventBalancesReserveRepatriated + Balances_Slashed []EventBalancesSlashed + Balances_Transfer []EventBalancesTransfer + Balances_Unreserved []EventBalancesUnreserved + Balances_Withdraw []EventBalancesWithdraw + + Bounties_BountyProposed []EventBountiesBountyProposed + Bounties_BountyRejected []EventBountiesBountyRejected + Bounties_BountyBecameActive []EventBountiesBountyBecameActive + Bounties_BountyAwarded []EventBountiesBountyAwarded + Bounties_BountyClaimed []EventBountiesBountyClaimed + Bounties_BountyCanceled []EventBountiesBountyCanceled + Bounties_BountyExtended []EventBountiesBountyExtended + + ChildBounties_Added []EventChildBountiesAdded + ChildBounties_Awarded []EventChildBountiesAwarded + ChildBounties_Claimed []EventChildBountiesClaimed + ChildBounties_Canceled []EventChildBountiesCanceled + + Claims_Claimed []EventClaimsClaimed + + CollatorSelection_NewInvulnerables []EventCollatorSelectionNewInvulnerables + CollatorSelection_NewDesiredCandidates []EventCollatorSelectionNewDesiredCandidates + CollatorSelection_NewCandidacyBond []EventCollatorSelectionNewCandidacyBond + CollatorSelection_CandidateAdded []EventCollatorSelectionCandidateAdded + CollatorSelection_CandidateRemoved []EventCollatorSelectionCandidateRemoved + + Contracts_CodeRemoved []EventContractsCodeRemoved + Contracts_CodeStored []EventContractsCodeStored + Contracts_ContractCodeUpdated []EventContractsContractCodeUpdated + Contracts_ContractEmitted []EventContractsContractEmitted + Contracts_Instantiated []EventContractsInstantiated + Contracts_Terminated []EventContractsTerminated + + ConvictionVoting_Delegated []EventConvictionVotingDelegated + ConvictionVoting_Undelegated []EventConvictionVotingUndelegated + + Council_Approved []EventCouncilApproved + Council_Closed []EventCouncilClosed + Council_Disapproved []EventCouncilDisapproved + Council_Executed []EventCouncilExecuted + Council_MemberExecuted []EventCouncilMemberExecuted + Council_Proposed []EventCouncilProposed + Council_Voted []EventCouncilVoted + + Crowdloan_Created []EventCrowdloanCreated + Crowdloan_Contributed []EventCrowdloanContributed + Crowdloan_Withdrew []EventCrowdloanWithdrew + Crowdloan_PartiallyRefunded []EventCrowdloanPartiallyRefunded + Crowdloan_AllRefunded []EventCrowdloanAllRefunded + Crowdloan_Dissolved []EventCrowdloanDissolved + Crowdloan_HandleBidResult []EventCrowdloanHandleBidResult + Crowdloan_Edited []EventCrowdloanEdited + Crowdloan_MemoUpdated []EventCrowdloanMemoUpdated + Crowdloan_AddedToNewRaise []EventCrowdloanAddedToNewRaise + + Democracy_Blacklisted []EventDemocracyBlacklisted + Democracy_Cancelled []EventDemocracyCancelled + Democracy_Delegated []EventDemocracyDelegated + Democracy_Executed []EventDemocracyExecuted + Democracy_ExternalTabled []EventDemocracyExternalTabled + Democracy_NotPassed []EventDemocracyNotPassed + Democracy_Passed []EventDemocracyPassed + Democracy_PreimageInvalid []EventDemocracyPreimageInvalid + Democracy_PreimageMissing []EventDemocracyPreimageMissing + Democracy_PreimageNoted []EventDemocracyPreimageNoted + Democracy_PreimageReaped []EventDemocracyPreimageReaped + Democracy_PreimageUsed []EventDemocracyPreimageUsed + Democracy_Proposed []EventDemocracyProposed + Democracy_Seconded []EventDemocracySeconded + Democracy_Started []EventDemocracyStarted + Democracy_Tabled []EventDemocracyTabled + Democracy_Undelegated []EventDemocracyUndelegated + Democracy_Vetoed []EventDemocracyVetoed + Democracy_Voted []EventDemocracyVoted + + ElectionProviderMultiPhase_SolutionStored []EventElectionProviderMultiPhaseSolutionStored + ElectionProviderMultiPhase_ElectionFinalized []EventElectionProviderMultiPhaseElectionFinalized + ElectionProviderMultiPhase_Rewarded []EventElectionProviderMultiPhaseRewarded + ElectionProviderMultiPhase_Slashed []EventElectionProviderMultiPhaseSlashed + ElectionProviderMultiPhase_SignedPhaseStarted []EventElectionProviderMultiPhaseSignedPhaseStarted + ElectionProviderMultiPhase_UnsignedPhaseStarted []EventElectionProviderMultiPhaseUnsignedPhaseStarted + + Elections_CandidateSlashed []EventElectionsCandidateSlashed + Elections_ElectionError []EventElectionsElectionError + Elections_EmptyTerm []EventElectionsEmptyTerm + Elections_MemberKicked []EventElectionsMemberKicked + Elections_NewTerm []EventElectionsNewTerm + Elections_Renounced []EventElectionsRenounced + Elections_SeatHolderSlashed []EventElectionsSeatHolderSlashed + + Gilt_BidPlaced []EventGiltBidPlaced + Gilt_BidRetracted []EventGiltBidRetracted + Gilt_GiltIssued []EventGiltGiltIssued + Gilt_GiltThawed []EventGiltGiltThawed + + Grandpa_NewAuthorities []EventGrandpaNewAuthorities + Grandpa_Paused []EventGrandpaPaused + Grandpa_Resumed []EventGrandpaResumed + + Hrmp_OpenChannelRequested []EventHRMPOpenChannelRequested + Hrmp_OpenChannelCanceled []EventHRMPOpenChannelCanceled + Hrmp_OpenChannelAccepted []EventHRMPOpenChannelAccepted + Hrmp_ChannelClosed []EventHRMPChannelClosed + + Identity_IdentityCleared []EventIdentityCleared + Identity_IdentityKilled []EventIdentityKilled + Identity_IdentitySet []EventIdentitySet + Identity_JudgementGiven []EventIdentityJudgementGiven + Identity_JudgementRequested []EventIdentityJudgementRequested + Identity_JudgementUnrequested []EventIdentityJudgementUnrequested + Identity_RegistrarAdded []EventIdentityRegistrarAdded + Identity_SubIdentityAdded []EventIdentitySubIdentityAdded + Identity_SubIdentityRemoved []EventIdentitySubIdentityRemoved + Identity_SubIdentityRevoked []EventIdentitySubIdentityRevoked + + ImOnline_AllGood []EventImOnlineAllGood + ImOnline_HeartbeatReceived []EventImOnlineHeartbeatReceived + ImOnline_SomeOffline []EventImOnlineSomeOffline + + Indices_IndexAssigned []EventIndicesIndexAssigned + Indices_IndexFreed []EventIndicesIndexFreed + Indices_IndexFrozen []EventIndicesIndexFrozen + + Lottery_LotteryStarted []EventLotteryLotteryStarted + Lottery_CallsUpdated []EventLotteryCallsUpdated + Lottery_Winner []EventLotteryWinner + Lottery_TicketBought []EventLotteryTicketBought + + Multisig_MultisigApproval []EventMultisigApproval + Multisig_MultisigCancelled []EventMultisigCancelled + Multisig_MultisigExecuted []EventMultisigExecuted + Multisig_NewMultisig []EventMultisigNewMultisig + + NftSales_ForSale []EventNftSalesForSale + NftSales_Removed []EventNftSalesRemoved + NftSales_Sold []EventNftSalesSold + + Offences_Offence []EventOffencesOffence + + OrmlAssetRegistry_RegisteredAsset []EventOrmlAssetRegistryRegisteredAsset + OrmlAssetRegistry_UpdatedAsset []EventOrmlAssetRegistryUpdatedAsset + + OrmlTokens_Endowed []EventOrmlTokensEndowed + OrmlTokens_DustLost []EventOrmlTokensDustLost + OrmlTokens_Transfer []EventOrmlTokensTransfer + OrmlTokens_Reserved []EventOrmlTokensReserved + OrmlTokens_Unreserved []EventOrmlTokensUnreserved + OrmlTokens_ReserveRepatriated []EventOrmlTokensReserveRepatriated + OrmlTokens_BalanceSet []EventOrmlTokensBalanceSet + OrmlTokens_TotalIssuanceSet []EventOrmlTokensTotalIssuanceSet + OrmlTokens_Withdrawn []EventOrmlTokensWithdrawn + OrmlTokens_Slashed []EventOrmlTokensSlashed + OrmlTokens_Deposited []EventOrmlTokensDeposited + OrmlTokens_LockSet []EventOrmlTokensLockSet + OrmlTokens_LockRemoved []EventOrmlTokensLockRemoved + OrmlTokens_Locked []EventOrmlTokensLocked + OrmlTokens_Unlocked []EventOrmlTokensUnlocked + + Paras_CurrentCodeUpdated []EventParasCurrentCodeUpdated + Paras_CurrentHeadUpdated []EventParasCurrentHeadUpdated + Paras_CodeUpgradeScheduled []EventParasCodeUpgradeScheduled + Paras_NewHeadNoted []EventParasNewHeadNoted + Paras_ActionQueued []EventParasActionQueued + Paras_PvfCheckStarted []EventParasPvfCheckStarted + Paras_PvfCheckAccepted []EventParasPvfCheckAccepted + Paras_PvfCheckRejected []EventParasPvfCheckRejected + + ParasDisputes_DisputeInitiated []EventParasDisputesDisputeInitiated + ParasDisputes_DisputeConcluded []EventParasDisputesDisputeConcluded + ParasDisputes_DisputeTimedOut []EventParasDisputesDisputeTimedOut + ParasDisputes_Revert []EventParasDisputesRevert + + ParaInclusion_CandidateBacked []EventParaInclusionCandidateBacked + ParaInclusion_CandidateIncluded []EventParaInclusionCandidateIncluded + ParaInclusion_CandidateTimedOut []EventParaInclusionCandidateTimedOut + + ParachainSystem_ValidationFunctionStored []EventParachainSystemValidationFunctionStored + ParachainSystem_ValidationFunctionApplied []EventParachainSystemValidationFunctionApplied + ParachainSystem_ValidationFunctionDiscarded []EventParachainSystemValidationFunctionDiscarded + ParachainSystem_UpgradeAuthorized []EventParachainSystemUpgradeAuthorized + ParachainSystem_DownwardMessagesReceived []EventParachainSystemDownwardMessagesReceived + ParachainSystem_DownwardMessagesProcessed []EventParachainSystemDownwardMessagesProcessed + + Preimage_Cleared []EventPreimageCleared + Preimage_Noted []EventPreimageNoted + Preimage_Requested []EventPreimageRequested + + Proxy_Announced []EventProxyAnnounced + Proxy_PureCreated []EventProxyPureCreated + Proxy_ProxyAdded []EventProxyProxyAdded + Proxy_ProxyExecuted []EventProxyProxyExecuted + Proxy_ProxyRemoved []EventProxyProxyRemoved + + Recovery_AccountRecovered []EventRecoveryAccountRecovered + Recovery_RecoveryClosed []EventRecoveryClosed + Recovery_RecoveryCreated []EventRecoveryCreated + Recovery_RecoveryInitiated []EventRecoveryInitiated + Recovery_RecoveryRemoved []EventRecoveryRemoved + Recovery_RecoveryVouched []EventRecoveryVouched + + Registrar_Registered []EventRegistrarRegistered + Registrar_Deregistered []EventRegistrarDeregistered + Registrar_Reserved []EventRegistrarReserved + + Referenda_Submitted []EventReferendaSubmitted + Referenda_DecisionDepositPlaced []EventReferendaDecisionDepositPlaced + Referenda_DecisionDepositRefunded []EventReferendaDecisionDepositRefunded + Referenda_DepositSlashed []EventReferendaDecisionSlashed + Referenda_DecisionStarted []EventReferendaDecisionStarted + Referenda_ConfirmStarted []EventReferendaConfirmStarted + Referenda_ConfirmAborted []EventReferendaConfirmAborted + Referenda_Confirmed []EventReferendaConfirmed + Referenda_Approved []EventReferendaApproved + Referenda_Rejected []EventReferendaRejected + Referenda_TimedOut []EventReferendaTimedOut + Referenda_Cancelled []EventReferendaCancelled + Referenda_Killed []EventReferendaKilled + + Scheduler_CallLookupFailed []EventSchedulerCallLookupFailed + Scheduler_Canceled []EventSchedulerCanceled + Scheduler_Dispatched []EventSchedulerDispatched + Scheduler_Scheduled []EventSchedulerScheduled + + Session_NewSession []EventSessionNewSession + + Slots_NewLeasePeriod []EventSlotsNewLeasePeriod + Slots_Leased []EventSlotsLeased + + Society_AutoUnbid []EventSocietyAutoUnbid + Society_Bid []EventSocietyBid + Society_CandidateSuspended []EventSocietyCandidateSuspended + Society_Challenged []EventSocietyChallenged + Society_DefenderVote []EventSocietyDefenderVote + Society_Deposit []EventSocietyDeposit + Society_Founded []EventSocietyFounded + Society_Inducted []EventSocietyInducted + Society_MemberSuspended []EventSocietyMemberSuspended + Society_NewMaxMembers []EventSocietyNewMaxMembers + Society_SuspendedMemberJudgement []EventSocietySuspendedMemberJudgement + Society_Unbid []EventSocietyUnbid + Society_Unfounded []EventSocietyUnfounded + Society_Unvouch []EventSocietyUnvouch + Society_Vote []EventSocietyVote + Society_Vouch []EventSocietyVouch + + Staking_Bonded []EventStakingBonded + Staking_Chilled []EventStakingChilled + Staking_EraPaid []EventStakingEraPaid + Staking_Kicked []EventStakingKicked + Staking_OldSlashingReportDiscarded []EventStakingOldSlashingReportDiscarded + Staking_PayoutStarted []EventStakingPayoutStarted + Staking_Rewarded []EventStakingRewarded + Staking_Slashed []EventStakingSlashed + Staking_StakersElected []EventStakingStakersElected + Staking_StakingElectionFailed []EventStakingStakingElectionFailed + Staking_Unbonded []EventStakingUnbonded + Staking_Withdrawn []EventStakingWithdrawn + + StateTrieMigration_Migrated []EventStateTrieMigrationMigrated + StateTrieMigration_Slashed []EventStateTrieMigrationSlashed + StateTrieMigration_AutoMigrationFinished []EventStateTrieMigrationAutoMigrationFinished + StateTrieMigration_Halted []EventStateTrieMigrationHalted + + Sudo_KeyChanged []EventSudoKeyChanged + Sudo_Sudid []EventSudoSudid + Sudo_SudoAsDone []EventSudoAsDone + + System_CodeUpdated []EventSystemCodeUpdated + System_ExtrinsicFailed []EventSystemExtrinsicFailed + System_ExtrinsicSuccess []EventSystemExtrinsicSuccess + System_KilledAccount []EventSystemKilledAccount + System_NewAccount []EventSystemNewAccount + System_Remarked []EventSystemRemarked + + TechnicalCommittee_Approved []EventTechnicalCommitteeApproved + TechnicalCommittee_Closed []EventTechnicalCommitteeClosed + TechnicalCommittee_Disapproved []EventTechnicalCommitteeDisapproved + TechnicalCommittee_Executed []EventTechnicalCommitteeExecuted + TechnicalCommittee_MemberExecuted []EventTechnicalCommitteeMemberExecuted + TechnicalCommittee_Proposed []EventTechnicalCommitteeProposed + TechnicalCommittee_Voted []EventTechnicalCommitteeVoted + + TechnicalMembership_Dummy []EventTechnicalMembershipDummy + TechnicalMembership_KeyChanged []EventTechnicalMembershipKeyChanged + TechnicalMembership_MemberAdded []EventTechnicalMembershipMemberAdded + TechnicalMembership_MemberRemoved []EventTechnicalMembershipMemberRemoved + TechnicalMembership_MembersReset []EventTechnicalMembershipMembersReset + TechnicalMembership_MembersSwapped []EventTechnicalMembershipMembersSwapped + + Tips_NewTip []EventTipsNewTip + Tips_TipClosed []EventTipsTipClosed + Tips_TipClosing []EventTipsTipClosing + Tips_TipRetracted []EventTipsTipRetracted + Tips_TipSlashed []EventTipsTipSlashed + + TransactionStorage_Stored []EventTransactionStorageStored + TransactionStorage_Renewed []EventTransactionStorageRenewed + TransactionStorage_ProofChecked []EventTransactionStorageProofChecked + + TransactionPayment_TransactionFeePaid []EventTransactionPaymentTransactionFeePaid + + Treasury_Proposed []EventTreasuryProposed + Treasury_Spending []EventTreasurySpending + Treasury_Awarded []EventTreasuryAwarded + Treasury_Rejected []EventTreasuryRejected + Treasury_Burnt []EventTreasuryBurnt + Treasury_Rollover []EventTreasuryRollover + Treasury_Deposit []EventTreasuryDeposit + Treasury_SpendApproved []EventTreasurySpendApproved + Treasury_UpdatedInactive []EventTreasuryUpdatedInactive + + Uniques_ApprovalCancelled []EventUniquesApprovalCancelled + Uniques_ApprovedTransfer []EventUniquesApprovedTransfer + Uniques_AssetStatusChanged []EventUniquesAssetStatusChanged + Uniques_AttributeCleared []EventUniquesAttributeCleared + Uniques_AttributeSet []EventUniquesAttributeSet + Uniques_Burned []EventUniquesBurned + Uniques_ClassFrozen []EventUniquesClassFrozen + Uniques_ClassMetadataCleared []EventUniquesClassMetadataCleared + Uniques_ClassMetadataSet []EventUniquesClassMetadataSet + Uniques_ClassThawed []EventUniquesClassThawed + Uniques_Created []EventUniquesCreated + Uniques_Destroyed []EventUniquesDestroyed + Uniques_ForceCreated []EventUniquesForceCreated + Uniques_Frozen []EventUniquesFrozen + Uniques_Issued []EventUniquesIssued + Uniques_MetadataCleared []EventUniquesMetadataCleared + Uniques_MetadataSet []EventUniquesMetadataSet + Uniques_OwnerChanged []EventUniquesOwnerChanged + Uniques_Redeposited []EventUniquesRedeposited + Uniques_TeamChanged []EventUniquesTeamChanged + Uniques_Thawed []EventUniquesThawed + Uniques_Transferred []EventUniquesTransferred + + Ump_InvalidFormat []EventUMPInvalidFormat + Ump_UnsupportedVersion []EventUMPUnsupportedVersion + Ump_ExecutedUpward []EventUMPExecutedUpward + Ump_WeightExhausted []EventUMPWeightExhausted + Ump_UpwardMessagesReceived []EventUMPUpwardMessagesReceived + Ump_OverweightEnqueued []EventUMPOverweightEnqueued + Ump_OverweightServiced []EventUMPOverweightServiced + + Utility_BatchCompleted []EventUtilityBatchCompleted + Utility_BatchInterrupted []EventUtilityBatchInterrupted + Utility_DispatchedAs []EventUtilityBatchInterrupted + Utility_ItemCompleted []EventUtilityItemCompleted + + Vesting_VestingCompleted []EventVestingVestingCompleted + Vesting_VestingUpdated []EventVestingVestingUpdated + + VoterList_Rebagged []EventVoterListRebagged + VoterList_ScoreUpdated []EventVoterListScoreUpdated + + Whitelist_CallWhitelisted []EventWhitelistCallWhitelisted + Whitelist_WhitelistedCallRemoved []EventWhitelistWhitelistedCallRemoved + Whitelist_WhitelistedCallDispatched []EventWhitelistWhitelistedCallRemoved + + XcmPallet_Attempted []EventXcmPalletAttempted + XcmPallet_Sent []EventXcmPalletSent + XcmPallet_UnexpectedResponse []EventXcmPalletUnexpectedResponse + XcmPallet_ResponseReady []EventXcmPalletResponseReady + XcmPallet_Notified []EventXcmPalletNotified + XcmPallet_NotifyOverweight []EventXcmPalletNotifyOverweight + XcmPallet_NotifyDispatchError []EventXcmPalletNotifyDispatchError + XcmPallet_NotifyDecodeFailed []EventXcmPalletNotifyDecodeFailed + XcmPallet_InvalidResponder []EventXcmPalletInvalidResponder + XcmPallet_InvalidResponderVersion []EventXcmPalletInvalidResponderVersion + XcmPallet_ResponseTaken []EventXcmPalletResponseTaken + XcmPallet_AssetsTrapped []EventXcmPalletAssetsTrapped + XcmPallet_VersionChangeNotified []EventXcmPalletVersionChangeNotified + XcmPallet_SupportedVersionChanged []EventXcmPalletSupportedVersionChanged + XcmPallet_NotifyTargetSendFail []EventXcmPalletNotifyTargetSendFail + XcmPallet_NotifyTargetMigrationFail []EventXcmPalletNotifyTargetMigrationFail +} + +// DecodeEventRecords decodes the events records from an EventRecordRaw into a target t using the given Metadata m +// If this method returns an error like `unable to decode Phase for event #x: EOF`, it is likely that you have defined +// a custom event record with a wrong type. For example your custom event record has a field with a length prefixed +// type, such as types.Bytes, where your event in reallity contains a fixed width type, such as a types.U32. +func (e EventRecordsRaw) DecodeEventRecords(m *Metadata, t interface{}) error { //nolint:funlen + log.Debug(fmt.Sprintf("will decode event records from raw hex: %#x", e)) + + // ensure t is a pointer + ttyp := reflect.TypeOf(t) + if ttyp.Kind() != reflect.Ptr { + return errors.New("target must be a pointer, but is " + fmt.Sprint(ttyp)) + } + // ensure t is not a nil pointer + tval := reflect.ValueOf(t) + if tval.IsNil() { + return errors.New("target is a nil pointer") + } + val := tval.Elem() + typ := val.Type() + // ensure val can be set + if !val.CanSet() { + return fmt.Errorf("unsettable value %v", typ) + } + // ensure val points to a struct + if val.Kind() != reflect.Struct { + return fmt.Errorf("target must point to a struct, but is " + fmt.Sprint(typ)) + } + + decoder := scale.NewDecoder(bytes.NewReader(e)) + + // determine number of events + n, err := decoder.DecodeUintCompact() + if err != nil { + return err + } + + log.Debug(fmt.Sprintf("found %v events", n)) + + // iterate over events + for i := uint64(0); i < n.Uint64(); i++ { + log.Debug(fmt.Sprintf("decoding event #%v", i)) + + // decode Phase + phase := Phase{} + err := decoder.Decode(&phase) + if err != nil { + return fmt.Errorf("unable to decode Phase for event #%v: %v", i, err) + } + + // decode EventID + id := EventID{} + err = decoder.Decode(&id) + if err != nil { + return fmt.Errorf("unable to decode EventID for event #%v: %v", i, err) + } + + log.Debug(fmt.Sprintf("event #%v has EventID %v", i, id)) + + // ask metadata for method & event name for event + moduleName, eventName, err := m.FindEventNamesForEventID(id) + // moduleName, eventName, err := "System", "ExtrinsicSuccess", nil + if err != nil { + return fmt.Errorf("unable to find event with EventID %v in metadata for event #%v: %s", id, i, err) + } + + log.Debug(fmt.Sprintf("event #%v is in module %v with event name %v", i, moduleName, eventName)) + + // check whether name for eventID exists in t + field := val.FieldByName(fmt.Sprintf("%v_%v", moduleName, eventName)) + if !field.IsValid() { + return fmt.Errorf("unable to find field %v_%v for event #%v with EventID %v", moduleName, eventName, i, id) + } + + // create a pointer to with the correct type that will hold the decoded event + holder := reflect.New(field.Type().Elem()) + + // ensure first field is for Phase, last field is for Topics + numFields := holder.Elem().NumField() + if numFields < 2 { + return fmt.Errorf("expected event #%v with EventID %v, field %v_%v to have at least 2 fields "+ + "(for Phase and Topics), but has %v fields", i, id, moduleName, eventName, numFields) + } + phaseField := holder.Elem().FieldByIndex([]int{0}) + if phaseField.Type() != reflect.TypeOf(phase) { + return fmt.Errorf("expected the first field of event #%v with EventID %v, field %v_%v to be of type "+ + "types.Phase, but got %v", i, id, moduleName, eventName, phaseField.Type()) + } + topicsField := holder.Elem().FieldByIndex([]int{numFields - 1}) + if topicsField.Type() != reflect.TypeOf([]Hash{}) { + return fmt.Errorf("expected the last field of event #%v with EventID %v, field %v_%v to be of type "+ + "[]types.Hash for Topics, but got %v", i, id, moduleName, eventName, topicsField.Type()) + } + + // set the phase we decoded earlier + phaseField.Set(reflect.ValueOf(phase)) + + // set the remaining fields + for j := 1; j < numFields; j++ { + err = decoder.Decode(holder.Elem().FieldByIndex([]int{j}).Addr().Interface()) + if err != nil { + return fmt.Errorf("unable to decode field %v event #%v with EventID %v, field %v_%v: %v", j, i, id, moduleName, + eventName, err) + } + } + + // add the decoded event to the slice + field.Set(reflect.Append(field, holder.Elem())) + + log.Debug(fmt.Sprintf("decoded event #%v", i)) + } + return nil +} + +// Phase is an enum describing the current phase of the event (applying the extrinsic or finalized) +type Phase struct { + IsApplyExtrinsic bool + AsApplyExtrinsic uint32 + IsFinalization bool + IsInitialization bool +} + +func (p *Phase) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + p.IsApplyExtrinsic = true + err = decoder.Decode(&p.AsApplyExtrinsic) + case 1: + p.IsFinalization = true + case 2: + p.IsInitialization = true + } + + if err != nil { + return err + } + + return nil +} + +func (p Phase) Encode(encoder scale.Encoder) error { + var err1, err2 error + + switch { + case p.IsApplyExtrinsic: + err1 = encoder.PushByte(0) + err2 = encoder.Encode(p.AsApplyExtrinsic) + case p.IsFinalization: + err1 = encoder.PushByte(1) + case p.IsInitialization: + err1 = encoder.PushByte(2) + } + + if err1 != nil { + return err1 + } + if err2 != nil { + return err2 + } + + return nil +} + +type EventID [2]byte diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/events.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/events.go new file mode 100644 index 000000000..9823e41f0 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/events.go @@ -0,0 +1,3422 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "errors" + "fmt" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +// EventClaimsClaimed is emitted when an account claims some DOTs +type EventClaimsClaimed struct { + Phase Phase + Who AccountID + EthereumAddress H160 + Amount U128 + Topics []Hash +} + +// EventBalancesEndowed is emitted when an account is created with some free balance +type EventBalancesEndowed struct { + Phase Phase + Who AccountID + Balance U128 + Topics []Hash +} + +// EventBalancesDustLost is emitted when an account is removed with a balance that is +// non-zero but below ExistentialDeposit, resulting in a loss. +type EventBalancesDustLost struct { + Phase Phase + Who AccountID + Balance U128 + Topics []Hash +} + +// EventBalancesTransfer is emitted when a transfer succeeded (from, to, value) +type EventBalancesTransfer struct { + Phase Phase + From AccountID + To AccountID + Value U128 + Topics []Hash +} + +// EventBalancesBalanceSet is emitted when a balance is set by root +type EventBalancesBalanceSet struct { + Phase Phase + Who AccountID + Free U128 + Reserved U128 + Topics []Hash +} + +// EventBalancesDeposit is emitted when an account receives some free balance +type EventBalancesDeposit struct { + Phase Phase + Who AccountID + Balance U128 + Topics []Hash +} + +// EventBalancesReserved is emitted when some balance was reserved (moved from free to reserved) +type EventBalancesReserved struct { + Phase Phase + Who AccountID + Balance U128 + Topics []Hash +} + +// EventBalancesUnreserved is emitted when some balance was unreserved (moved from reserved to free) +type EventBalancesUnreserved struct { + Phase Phase + Who AccountID + Balance U128 + Topics []Hash +} + +// EventBalancesReserveRepatriated is emitted when some balance was moved from the reserve of the first account to the +// second account. +type EventBalancesReserveRepatriated struct { + Phase Phase + From AccountID + To AccountID + Balance U128 + DestinationStatus BalanceStatus + Topics []Hash +} + +// EventBalancesWithdraw is emitted when some amount was withdrawn from the account (e.g. for transaction fees) +type EventBalancesWithdraw struct { + Phase Phase + Who AccountID + Balance U128 + Topics []Hash +} + +// EventBalancesSlashed is emitted when some amount was removed from the account (e.g. for misbehavior) +type EventBalancesSlashed struct { + Phase Phase + Who AccountID + Balance U128 + Topics []Hash +} + +// EventGrandpaNewAuthorities is emitted when a new authority set has been applied +type EventGrandpaNewAuthorities struct { + Phase Phase + NewAuthorities []struct { + AuthorityID AuthorityID + AuthorityWeight U64 + } + Topics []Hash +} + +// EventGrandpaPaused is emitted when the current authority set has been paused +type EventGrandpaPaused struct { + Phase Phase + Topics []Hash +} + +// EventGrandpaResumed is emitted when the current authority set has been resumed +type EventGrandpaResumed struct { + Phase Phase + Topics []Hash +} + +// EventHRMPOpenChannelRequested is emitted when an open HRMP channel is requested. +type EventHRMPOpenChannelRequested struct { + Phase Phase + Sender ParachainID + Recipient ParachainID + ProposedMaxCapacity U32 + ProposedMaxMessageSize U32 + Topics []Hash +} + +// EventHRMPOpenChannelCanceled is emitted when an HRMP channel request +// sent by the receiver was canceled by either party. +type EventHRMPOpenChannelCanceled struct { + Phase Phase + ByParachain ParachainID + ChannelID HRMPChannelID + Topics []Hash +} + +// EventHRMPOpenChannelAccepted is emitted when an open HRMP channel is accepted. +type EventHRMPOpenChannelAccepted struct { + Phase Phase + Sender ParachainID + Recipient ParachainID + Topics []Hash +} + +// EventHRMPChannelClosed is emitted when an HRMP channel is closed. +type EventHRMPChannelClosed struct { + Phase Phase + ByParachain ParachainID + ChannelID HRMPChannelID + Topics []Hash +} + +// EventImOnlineHeartbeatReceived is emitted when a new heartbeat was received from AuthorityId +type EventImOnlineHeartbeatReceived struct { + Phase Phase + AuthorityID AuthorityID + Topics []Hash +} + +// EventImOnlineAllGood is emitted when at the end of the session, no offence was committed +type EventImOnlineAllGood struct { + Phase Phase + Topics []Hash +} + +// Exposure lists the own and nominated stake of a validator +type Exposure struct { + Total UCompact + Own UCompact + Others []IndividualExposure +} + +// IndividualExposure contains the nominated stake by one specific third party +type IndividualExposure struct { + Who AccountID + Value UCompact +} + +// EventImOnlineSomeOffline is emitted when the end of the session, at least once validator was found to be offline +type EventImOnlineSomeOffline struct { + Phase Phase + IdentificationTuples []struct { + ValidatorID AccountID + FullIdentification Exposure + } + Topics []Hash +} + +// EventIndicesIndexAssigned is emitted when an index is assigned to an AccountID. +type EventIndicesIndexAssigned struct { + Phase Phase + AccountID AccountID + AccountIndex AccountIndex + Topics []Hash +} + +// EventIndicesIndexFreed is emitted when an index is unassigned. +type EventIndicesIndexFreed struct { + Phase Phase + AccountIndex AccountIndex + Topics []Hash +} + +// EventIndicesIndexFrozen is emitted when an index is frozen to its current account ID. +type EventIndicesIndexFrozen struct { + Phase Phase + AccountIndex AccountIndex + AccountID AccountID + Topics []Hash +} + +// EventLotteryLotteryStarted is emitted when a lottery has been started. +type EventLotteryLotteryStarted struct { + Phase Phase + Topics []Hash +} + +// EventLotteryCallsUpdated is emitted when a new set of calls has been set. +type EventLotteryCallsUpdated struct { + Phase Phase + Topics []Hash +} + +// EventLotteryWinner is emitted when a winner has been chosen. +type EventLotteryWinner struct { + Phase Phase + Winner AccountID + LotteryBalance U128 + Topics []Hash +} + +// EventLotteryTicketBought is emitted when a ticket has been bought. +type EventLotteryTicketBought struct { + Phase Phase + Who AccountID + CallIndex LotteryCallIndex + Topics []Hash +} + +// EventOffencesOffence is emitted when there is an offence reported of the given kind happened at the session_index +// and (kind-specific) time slot. This event is not deposited for duplicate slashes +type EventOffencesOffence struct { + Phase Phase + Kind Bytes16 + OpaqueTimeSlot Bytes + Topics []Hash +} + +type EventOrmlTokensEndowed struct { + Phase Phase + CurrencyID CurrencyID + Who AccountID + Amount U128 + Topics []Hash +} + +type EventOrmlTokensDustLost struct { + Phase Phase + CurrencyID CurrencyID + Who AccountID + Amount U128 + Topics []Hash +} + +type EventOrmlTokensTransfer struct { + Phase Phase + CurrencyID CurrencyID + From AccountID + To AccountID + Amount U128 + Topics []Hash +} + +type EventOrmlTokensReserved struct { + Phase Phase + CurrencyID CurrencyID + Who AccountID + Amount U128 + Topics []Hash +} + +type EventOrmlTokensUnreserved struct { + Phase Phase + CurrencyID CurrencyID + Who AccountID + Amount U128 + Topics []Hash +} + +type EventOrmlTokensReserveRepatriated struct { + Phase Phase + CurrencyID CurrencyID + From AccountID + To AccountID + Amount U128 + Status BalanceStatus + Topics []Hash +} + +type EventOrmlTokensBalanceSet struct { + Phase Phase + CurrencyID CurrencyID + Who AccountID + Free U128 + Reserved U128 + Topics []Hash +} + +type EventOrmlTokensTotalIssuanceSet struct { + Phase Phase + CurrencyID CurrencyID + Amount U128 + Topics []Hash +} + +type EventOrmlTokensWithdrawn struct { + Phase Phase + CurrencyID CurrencyID + Who AccountID + Amount U128 + Topics []Hash +} + +type EventOrmlTokensSlashed struct { + Phase Phase + CurrencyID CurrencyID + Who AccountID + FreeAmount U128 + ReservedAmount U128 + Topics []Hash +} + +type EventOrmlTokensDeposited struct { + Phase Phase + CurrencyID CurrencyID + Who AccountID + Amount U128 + Topics []Hash +} + +type EventOrmlTokensLockSet struct { + Phase Phase + LockID [8]U8 + CurrencyID CurrencyID + Who AccountID + Amount U128 + Topics []Hash +} + +type EventOrmlTokensLockRemoved struct { + Phase Phase + LockID [8]U8 + CurrencyID CurrencyID + Who AccountID + Topics []Hash +} + +type EventOrmlTokensLocked struct { + Phase Phase + CurrencyID CurrencyID + Who AccountID + Amount U128 + Topics []Hash +} + +type EventOrmlTokensUnlocked struct { + Phase Phase + CurrencyID CurrencyID + Who AccountID + Amount U128 + Topics []Hash +} + +type EventOrmlAssetRegistryRegisteredAsset struct { + Phase Phase + AssetID CurrencyID + Metadata AssetMetadata + Topics []Hash +} + +type EventOrmlAssetRegistryUpdatedAsset struct { + Phase Phase + AssetID CurrencyID + Metadata AssetMetadata + Topics []Hash +} + +type AssetMetadata struct { + Decimals U32 + Name []U8 + Symbol []U8 + ExistentialBalance U128 + Location Option[VersionedMultiLocation] + Additional CustomMetadata +} + +type CustomMetadata struct { + Transferability CrossChainTransferability + Mintable bool + Permissioned bool + PoolCurrency bool +} + +type CrossChainTransferability struct { + IsNone bool + + IsXcm bool + AsXcm XcmMetadata + + IsConnectors bool + + IsAll bool + AsAll XcmMetadata +} + +func (c *CrossChainTransferability) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + + if err != nil { + return err + } + + switch b { + case 0: + c.IsNone = true + + return nil + case 1: + c.IsXcm = true + + return decoder.Decode(&c.AsXcm) + case 2: + c.IsConnectors = true + + return nil + + case 3: + c.IsAll = true + + return decoder.Decode(&c.AsAll) + default: + return errors.New("unsupported cross chain transferability") + } +} + +func (c CrossChainTransferability) Encode(encoder scale.Encoder) error { + switch { + case c.IsNone: + return encoder.PushByte(0) + case c.IsXcm: + if err := encoder.PushByte(1); err != nil { + return err + } + + return encoder.Encode(c.AsXcm) + case c.IsConnectors: + return encoder.PushByte(2) + case c.IsAll: + if err := encoder.PushByte(3); err != nil { + return err + } + + return encoder.Encode(c.AsAll) + default: + return errors.New("unsupported cross chain transferability") + } +} + +type XcmMetadata struct { + FeePerSecond Option[U128] +} + +// EventParasCurrentCodeUpdated is emitted when the current code has been updated for a Para. +type EventParasCurrentCodeUpdated struct { + Phase Phase + ParachainID ParachainID + Topics []Hash +} + +// EventParasCurrentHeadUpdated is emitted when the current head has been updated for a Para. +type EventParasCurrentHeadUpdated struct { + Phase Phase + ParachainID ParachainID + Topics []Hash +} + +// EventParasCodeUpgradeScheduled is emitted when a code upgrade has been scheduled for a Para. +type EventParasCodeUpgradeScheduled struct { + Phase Phase + ParachainID ParachainID + Topics []Hash +} + +// EventParasNewHeadNoted is emitted when a new head has been noted for a Para. +type EventParasNewHeadNoted struct { + Phase Phase + ParachainID ParachainID + Topics []Hash +} + +// EventParasActionQueued is emitted when a para has been queued to execute pending actions. +type EventParasActionQueued struct { + Phase Phase + ParachainID ParachainID + SessionIndex U32 + Topics []Hash +} + +// EventParasPvfCheckStarted is emitted when the given para either initiated or subscribed to a PVF +// check for the given validation code. +type EventParasPvfCheckStarted struct { + Phase Phase + CodeHash Hash + ParachainID ParachainID + Topics []Hash +} + +// EventParasPvfCheckAccepted is emitted when the given validation code was accepted by the PVF pre-checking vote. +type EventParasPvfCheckAccepted struct { + Phase Phase + CodeHash Hash + ParachainID ParachainID + Topics []Hash +} + +// EventParasPvfCheckRejected is emitted when the given validation code was rejected by the PVF pre-checking vote. +type EventParasPvfCheckRejected struct { + Phase Phase + CodeHash Hash + ParachainID ParachainID + Topics []Hash +} + +// EventParasDisputesDisputeInitiated is emitted when a dispute has been initiated. +type EventParasDisputesDisputeInitiated struct { + Phase Phase + CandidateHash Hash + DisputeLocation DisputeLocation + Topics []Hash +} + +// EventParasDisputesDisputeConcluded is emitted when a dispute has concluded for or against a candidate. +type EventParasDisputesDisputeConcluded struct { + Phase Phase + CandidateHash Hash + DisputeLocation DisputeResult + Topics []Hash +} + +// EventParasDisputesDisputeTimedOut is emitted when a dispute has timed out due to insufficient participation. +type EventParasDisputesDisputeTimedOut struct { + Phase Phase + CandidateHash Hash + Topics []Hash +} + +// EventParasDisputesRevert is emitted when a dispute has concluded with supermajority against a candidate. +// Block authors should no longer build on top of this head and should +// instead revert the block at the given height. This should be the +// number of the child of the last known valid block in the chain. +type EventParasDisputesRevert struct { + Phase Phase + BlockNumber U32 + Topics []Hash +} + +type HeadData []U8 + +type CoreIndex U32 + +type GroupIndex U32 + +// EventParaInclusionCandidateBacked is emitted when a candidate was backed. +type EventParaInclusionCandidateBacked struct { + Phase Phase + CandidateReceipt CandidateReceipt + HeadData HeadData + CoreIndex CoreIndex + GroupIndex GroupIndex + Topics []Hash +} + +// EventParaInclusionCandidateIncluded is emitted when a candidate was included. +type EventParaInclusionCandidateIncluded struct { + Phase Phase + CandidateReceipt CandidateReceipt + HeadData HeadData + CoreIndex CoreIndex + GroupIndex GroupIndex + Topics []Hash +} + +// EventParaInclusionCandidateTimedOut is emitted when a candidate timed out. +type EventParaInclusionCandidateTimedOut struct { + Phase Phase + CandidateReceipt CandidateReceipt + HeadData HeadData + CoreIndex CoreIndex + Topics []Hash +} + +// EventParachainSystemValidationFunctionStored is emitted when the validation function has been scheduled to apply. +type EventParachainSystemValidationFunctionStored struct { + Phase Phase + Topics []Hash +} + +// EventParachainSystemValidationFunctionApplied is emitted when the validation function was applied +// as of the contained relay chain block number. +type EventParachainSystemValidationFunctionApplied struct { + Phase Phase + RelayChainBlockNumber U32 + Topics []Hash +} + +// EventParachainSystemValidationFunctionDiscarded is emitted when the relay-chain aborted the upgrade process. +type EventParachainSystemValidationFunctionDiscarded struct { + Phase Phase + Topics []Hash +} + +// EventParachainSystemUpgradeAuthorized is emitted when an upgrade has been authorized. +type EventParachainSystemUpgradeAuthorized struct { + Phase Phase + Hash Hash + Topics []Hash +} + +// EventParachainSystemDownwardMessagesReceived is emitted when some downward messages +// have been received and will be processed. +type EventParachainSystemDownwardMessagesReceived struct { + Phase Phase + Count U32 + Topics []Hash +} + +// EventParachainSystemDownwardMessagesProcessed is emitted when downward messages +// were processed using the given weight. +type EventParachainSystemDownwardMessagesProcessed struct { + Phase Phase + Weight Weight + ResultMqcHead Hash + Topics []Hash +} + +// EventSessionNewSession is emitted when a new session has happened. Note that the argument is the session index, +// not the block number as the type might suggest +type EventSessionNewSession struct { + Phase Phase + SessionIndex U32 + Topics []Hash +} + +// EventSlotsNewLeasePeriod is emitted when a new `[lease_period]` is beginning. +type EventSlotsNewLeasePeriod struct { + Phase Phase + LeasePeriod U32 + Topics []Hash +} + +type ParachainID U32 + +// EventSlotsLeased is emitted when a para has won the right to a continuous set of lease periods as a parachain. +// First balance is any extra amount reserved on top of the para's existing deposit. +// Second balance is the total amount reserved. +type EventSlotsLeased struct { + Phase Phase + ParachainID ParachainID + Leaser AccountID + PeriodBegin U32 + PeriodCount U32 + ExtraReserved U128 + TotalAmount U128 + Topics []Hash +} + +// EventStakingEraPaid is emitted when the era payout has been set; +type EventStakingEraPaid struct { + Phase Phase + EraIndex U32 + ValidatorPayout U128 + Remainder U128 + Topics []Hash +} + +// EventStakingRewarded is emitted when the staker has been rewarded by this amount. +type EventStakingRewarded struct { + Phase Phase + Stash AccountID + Amount U128 + Topics []Hash +} + +// EventStakingSlashed is emitted when one validator (and its nominators) has been slashed by the given amount +type EventStakingSlashed struct { + Phase Phase + AccountID AccountID + Balance U128 + Topics []Hash +} + +// EventStakingOldSlashingReportDiscarded is emitted when an old slashing report from a prior era was discarded because +// it could not be processed +type EventStakingOldSlashingReportDiscarded struct { + Phase Phase + SessionIndex U32 + Topics []Hash +} + +// EventStakingStakersElected is emitted when a new set of stakers was elected +type EventStakingStakersElected struct { + Phase Phase + Topics []Hash +} + +// EventStakingStakingElectionFailed is emitted when the election failed. No new era is planned. +type EventStakingStakingElectionFailed struct { + Phase Phase + Topics []Hash +} + +// EventStakingSolutionStored is emitted when a new solution for the upcoming election has been stored +type EventStakingSolutionStored struct { + Phase Phase + Compute ElectionCompute + Topics []Hash +} + +// EventStakingBonded is emitted when an account has bonded this amount +type EventStakingBonded struct { + Phase Phase + Stash AccountID + Amount U128 + Topics []Hash +} + +// EventStakingChilled is emitted when an account has stopped participating as either a validator or nominator +type EventStakingChilled struct { + Phase Phase + Stash AccountID + Topics []Hash +} + +// EventStakingKicked is emitted when a nominator has been kicked from a validator. +type EventStakingKicked struct { + Phase Phase + Nominator AccountID + Stash AccountID + Topics []Hash +} + +// EventStakingPayoutStarted is emitted when the stakers' rewards are getting paid +type EventStakingPayoutStarted struct { + Phase Phase + EraIndex U32 + Stash AccountID + Topics []Hash +} + +// EventStakingUnbonded is emitted when an account has unbonded this amount +type EventStakingUnbonded struct { + Phase Phase + Stash AccountID + Amount U128 + Topics []Hash +} + +// EventStakingWithdrawn is emitted when an account has called `withdraw_unbonded` and removed unbonding chunks +// worth `Balance` from the unlocking queue. +type EventStakingWithdrawn struct { + Phase Phase + Stash AccountID + Amount U128 + Topics []Hash +} + +// EventStateTrieMigrationMigrated is emitted when the given number of `(top, child)` keys were migrated respectively, +// with the given `compute`. +type EventStateTrieMigrationMigrated struct { + Phase Phase + Top U32 + Child U32 + Compute MigrationCompute + Topics []Hash +} + +// EventStateTrieMigrationSlashed is emitted when some account got slashed by the given amount. +type EventStateTrieMigrationSlashed struct { + Phase Phase + Who AccountID + Amount U128 + Topics []Hash +} + +// EventStateTrieMigrationAutoMigrationFinished is emitted when the auto migration task has finished. +type EventStateTrieMigrationAutoMigrationFinished struct { + Phase Phase + Topics []Hash +} + +// EventStateTrieMigrationHalted is emitted when the migration got halted. +type EventStateTrieMigrationHalted struct { + Phase Phase + Topics []Hash +} + +// EventSystemExtrinsicSuccessV8 is emitted when an extrinsic completed successfully +// +// Deprecated: EventSystemExtrinsicSuccessV8 exists to allow users to simply implement their own EventRecords struct if +// they are on metadata version 8 or below. Use EventSystemExtrinsicSuccess otherwise +type EventSystemExtrinsicSuccessV8 struct { + Phase Phase + Topics []Hash +} + +// EventSystemExtrinsicSuccess is emitted when an extrinsic completed successfully +type EventSystemExtrinsicSuccess struct { + Phase Phase + DispatchInfo DispatchInfo + Topics []Hash +} + +type Pays struct { + IsYes bool + IsNo bool +} + +func (p *Pays) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + p.IsYes = true + case 1: + p.IsNo = true + } + + return nil +} + +func (p Pays) Encode(encoder scale.Encoder) error { + var err error + if p.IsYes { + err = encoder.PushByte(0) + } else if p.IsNo { + err = encoder.PushByte(1) + } + return err +} + +// DispatchInfo contains a bundle of static information collected from the `#[weight = $x]` attributes. +type DispatchInfo struct { + // Weight of this transaction + Weight Weight + // Class of this transaction + Class DispatchClass + // PaysFee indicates whether this transaction pays fees + PaysFee Pays +} + +func (d *DispatchInfo) Decode(decoder scale.Decoder) error { + if err := decoder.Decode(&d.Weight); err != nil { + return err + } + + if err := decoder.Decode(&d.Class); err != nil { + return err + } + + return decoder.Decode(&d.PaysFee) +} + +// DispatchClass is a generalized group of dispatch types. This is only distinguishing normal, user-triggered +// transactions (`Normal`) and anything beyond which serves a higher purpose to the system (`Operational`). +type DispatchClass struct { + // A normal dispatch + IsNormal bool + // An operational dispatch + IsOperational bool + // A mandatory dispatch + IsMandatory bool +} + +func (d *DispatchClass) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + d.IsNormal = true + case 1: + d.IsOperational = true + case 2: + d.IsMandatory = true + } + + return nil +} + +func (d DispatchClass) Encode(encoder scale.Encoder) error { + switch { + case d.IsNormal: + return encoder.PushByte(0) + case d.IsOperational: + return encoder.PushByte(1) + case d.IsMandatory: + return encoder.PushByte(2) + } + + return nil +} + +// EventSystemExtrinsicFailedV8 is emitted when an extrinsic failed +// +// Deprecated: EventSystemExtrinsicFailedV8 exists to allow users to simply implement their own EventRecords struct if +// they are on metadata version 8 or below. Use EventSystemExtrinsicFailed otherwise +type EventSystemExtrinsicFailedV8 struct { + Phase Phase + DispatchError DispatchError + Topics []Hash +} + +// EventSystemExtrinsicFailed is emitted when an extrinsic failed +type EventSystemExtrinsicFailed struct { + Phase Phase + DispatchError DispatchError + DispatchInfo DispatchInfo + Topics []Hash +} + +// EventSystemCodeUpdated is emitted when the runtime code (`:code`) is updated +type EventSystemCodeUpdated struct { + Phase Phase + Topics []Hash +} + +// EventSystemNewAccount is emitted when a new account was created +type EventSystemNewAccount struct { + Phase Phase + Who AccountID + Topics []Hash +} + +// EventSystemRemarked is emitted when an on-chain remark happened +type EventSystemRemarked struct { + Phase Phase + Who AccountID + Hash Hash + Topics []Hash +} + +// EventSystemKilledAccount is emitted when an account is reaped +type EventSystemKilledAccount struct { + Phase Phase + Who AccountID + Topics []Hash +} + +// EventAssetIssued is emitted when an asset is issued. +type EventAssetIssued struct { + Phase Phase + AssetID U32 + Who AccountID + Balance U128 + Topics []Hash +} + +// EventAssetCreated is emitted when an asset is created. +type EventAssetCreated struct { + Phase Phase + AssetID U32 + Creator AccountID + Owner AccountID + Topics []Hash +} + +// EventAssetTransferred is emitted when an asset is transferred. +type EventAssetTransferred struct { + Phase Phase + AssetID U32 + To AccountID + From AccountID + Balance U128 + Topics []Hash +} + +// EventAssetBurned is emitted when an asset is destroyed. +type EventAssetBurned struct { + Phase Phase + AssetID U32 + Owner AccountID + Balance U128 + Topics []Hash +} + +// EventAssetTeamChanged is emitted when the management team changed. +type EventAssetTeamChanged struct { + Phase Phase + AssetID U32 + Issuer AccountID + Admin AccountID + Freezer AccountID + Topics []Hash +} + +// EventAssetOwnerChanged is emitted when the owner changed. +type EventAssetOwnerChanged struct { + Phase Phase + AssetID U32 + Owner AccountID + Topics []Hash +} + +// EventAssetFrozen is emitted when some account `who` was frozen. +type EventAssetFrozen struct { + Phase Phase + AssetID U32 + Who AccountID + Topics []Hash +} + +// EventAssetThawed is emitted when some account `who` was thawed. +type EventAssetThawed struct { + Phase Phase + AssetID U32 + Who AccountID + Topics []Hash +} + +// EventAssetAssetFrozen is emitted when some asset `asset_id` was frozen. +type EventAssetAssetFrozen struct { + Phase Phase + AssetID U32 + Topics []Hash +} + +// EventAssetAssetThawed is emitted when some asset `asset_id` was thawed. +type EventAssetAssetThawed struct { + Phase Phase + AssetID U32 + Topics []Hash +} + +// EventAssetDestroyed is emitted when an asset class is destroyed. +type EventAssetDestroyed struct { + Phase Phase + AssetID U32 + Topics []Hash +} + +// EventAssetForceCreated is emitted when some asset class was force-created. +type EventAssetForceCreated struct { + Phase Phase + AssetID U32 + Owner AccountID + Topics []Hash +} + +type MetadataSetName []byte +type MetadataSetSymbol []byte + +// EventAssetMetadataSet is emitted when new metadata has been set for an asset. +type EventAssetMetadataSet struct { + Phase Phase + AssetID U32 + Name MetadataSetName + Symbol MetadataSetSymbol + Decimals U8 + IsFrozen bool + Topics []Hash +} + +// EventAssetMetadataCleared is emitted when metadata has been cleared for an asset. +type EventAssetMetadataCleared struct { + Phase Phase + AssetID U32 + Topics []Hash +} + +// EventAssetApprovedTransfer is emitted when (additional) funds have been approved +// for transfer to a destination account. +type EventAssetApprovedTransfer struct { + Phase Phase + AssetID U32 + Source AccountID + Delegate AccountID + Amount U128 + Topics []Hash +} + +// EventAssetApprovalCancelled is emitted when an approval for account `delegate` was cancelled by `owner`. +type EventAssetApprovalCancelled struct { + Phase Phase + AssetID U32 + Owner AccountID + Delegate AccountID + Topics []Hash +} + +// EventAssetTransferredApproved is emitted when an `amount` was transferred in its +// entirety from `owner` to `destination` by the approved `delegate`. +type EventAssetTransferredApproved struct { + Phase Phase + AssetID U32 + Owner AccountID + Delegate AccountID + Destination AccountID + Amount U128 + Topics []Hash +} + +// EventAssetAssetStatusChanged is emitted when an asset has had its attributes changed by the `Force` origin. +type EventAssetAssetStatusChanged struct { + Phase Phase + AssetID U32 + Topics []Hash +} + +// EventAuctionsAuctionStarted is emitted when an auction started. Provides its index and the block number +// where it will begin to close and the first lease period of the quadruplet that is auctioned. +type EventAuctionsAuctionStarted struct { + Phase Phase + AuctionIndex U32 + LeasePeriod U32 + Ending U32 + Topics []Hash +} + +// EventAuctionsAuctionClosed is emitted when an auction ended. All funds become unreserved. +type EventAuctionsAuctionClosed struct { + Phase Phase + AuctionIndex U32 + Topics []Hash +} + +// EventAuctionsReserved is emitted when funds were reserved for a winning bid. +// First balance is the extra amount reserved. Second is the total. +type EventAuctionsReserved struct { + Phase Phase + Bidder AccountID + ExtraReserved U128 + TotalAmount U128 + Topics []Hash +} + +// EventAuctionsUnreserved is emitted when funds were unreserved since bidder is no longer active. +type EventAuctionsUnreserved struct { + Phase Phase + Bidder AccountID + Amount U128 + Topics []Hash +} + +// EventAuctionsReserveConfiscated is emitted when someone attempted to lease the same slot twice for a parachain. +// The amount is held in reserve but no parachain slot has been leased. +type EventAuctionsReserveConfiscated struct { + Phase Phase + ParachainID ParachainID + Leaser AccountID + Amount U128 + Topics []Hash +} + +// EventAuctionsBidAccepted is emitted when a new bid has been accepted as the current winner. +type EventAuctionsBidAccepted struct { + Phase Phase + Who AccountID + ParachainID ParachainID + Amount U128 + FirstSlot U32 + LastSlot U32 + Topics []Hash +} + +// EventAuctionsWinningOffset is emitted when the winning offset was chosen for an auction. +// This will map into the `Winning` storage map. +type EventAuctionsWinningOffset struct { + Phase Phase + AuctionIndex U32 + BlockNumber U32 + Topics []Hash +} + +// EventBagsListRebagged is emitted when an account was moved from one bag to another. +type EventBagsListRebagged struct { + Phase Phase + Who AccountID + From U64 + To U64 + Topics []Hash +} + +// EventDemocracyProposed is emitted when a motion has been proposed by a public account. +type EventDemocracyProposed struct { + Phase Phase + ProposalIndex U32 + Balance U128 + Topics []Hash +} + +// EventDemocracyTabled is emitted when a public proposal has been tabled for referendum vote. +type EventDemocracyTabled struct { + Phase Phase + ProposalIndex U32 + Balance U128 + Accounts []AccountID + Topics []Hash +} + +// EventDemocracyExternalTabled is emitted when an external proposal has been tabled. +type EventDemocracyExternalTabled struct { + Phase Phase + Topics []Hash +} + +// VoteThreshold is a means of determining if a vote is past pass threshold. +type VoteThreshold byte + +const ( + // SuperMajorityApprove require super majority of approvals is needed to pass this vote. + SuperMajorityApprove VoteThreshold = 0 + // SuperMajorityAgainst require super majority of rejects is needed to fail this vote. + SuperMajorityAgainst VoteThreshold = 1 + // SimpleMajority require simple majority of approvals is needed to pass this vote. + SimpleMajority VoteThreshold = 2 +) + +func (v *VoteThreshold) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + vb := VoteThreshold(b) + switch vb { + case SuperMajorityApprove, SuperMajorityAgainst, SimpleMajority: + *v = vb + default: + return fmt.Errorf("unknown VoteThreshold enum: %v", vb) + } + return err +} + +func (v VoteThreshold) Encode(encoder scale.Encoder) error { + return encoder.PushByte(byte(v)) +} + +type DemocracyConviction byte + +const ( + // None 0.1x votes, unlocked + None = 0 + // Locked1x votes, locked for an enactment period following a successful vote. + Locked1x = 1 + // Locked2x votes, locked for 2x enactment periods following a successful vote. + Locked2x = 2 + // Locked3x votes, locked for 4x... + Locked3x = 3 + // Locked4x votes, locked for 8x... + Locked4x = 4 + // Locked5x votes, locked for 16x... + Locked5x = 5 + // Locked6x votes, locked for 32x... + Locked6x = 6 +) + +func (dc *DemocracyConviction) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + vb := DemocracyConviction(b) + switch vb { + case None, Locked1x, Locked2x, Locked3x, Locked4x, Locked5x, Locked6x: + *dc = vb + default: + return fmt.Errorf("unknown DemocracyConviction enum: %v", vb) + } + return err +} + +func (dc DemocracyConviction) Encode(encoder scale.Encoder) error { + return encoder.PushByte(byte(dc)) +} + +type DemocracyVote struct { + Aye bool + Conviction DemocracyConviction +} + +const ( + aye uint8 = 1 << 7 +) + +//nolint:lll +func (d *DemocracyVote) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + + if err != nil { + return err + } + + // As per: + // https://github.com/paritytech/substrate/blob/6a946fc36d68b89599d7ca1ab03803d10c78468c/frame/democracy/src/vote.rs#L44 + + d.Aye = (b & aye) == aye + d.Conviction = DemocracyConviction(b & (aye - 1)) + + return nil +} + +//nolint:lll +func (d DemocracyVote) Encode(encoder scale.Encoder) error { + // As per: + // https://github.com/paritytech/substrate/blob/6a946fc36d68b89599d7ca1ab03803d10c78468c/frame/democracy/src/vote.rs#L37 + + var val uint8 + + if d.Aye { + val = aye + } + + return encoder.PushByte(uint8(d.Conviction) | val) +} + +type VoteAccountVoteAsStandard struct { + Vote DemocracyVote + Balance U128 +} + +func (v *VoteAccountVoteAsStandard) Decode(decoder scale.Decoder) error { + if err := decoder.Decode(&v.Vote); err != nil { + return err + } + + return decoder.Decode(&v.Balance) +} + +func (v VoteAccountVoteAsStandard) Encode(encoder scale.Encoder) error { + if err := encoder.Encode(v.Vote); err != nil { + return err + } + + return encoder.Encode(v.Balance) +} + +type VoteAccountVoteAsSplit struct { + Aye U128 + Nay U128 +} + +type VoteAccountVote struct { + IsStandard bool + AsStandard VoteAccountVoteAsStandard + IsSplit bool + AsSplit VoteAccountVoteAsSplit +} + +func (vv *VoteAccountVote) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + + if err != nil { + return err + } + + switch b { + case 0: + vv.IsStandard = true + + return decoder.Decode(&vv.AsStandard) + case 1: + vv.IsSplit = true + + return decoder.Decode(&vv.AsSplit) + } + + return nil +} + +func (vv VoteAccountVote) Encode(encoder scale.Encoder) error { + switch { + case vv.IsStandard: + if err := encoder.PushByte(0); err != nil { + return err + } + + return encoder.Encode(vv.AsStandard) + case vv.IsSplit: + if err := encoder.PushByte(1); err != nil { + return err + } + + return encoder.Encode(vv.AsSplit) + } + + return nil +} + +// EventDemocracyStarted is emitted when a referendum has begun. +type EventDemocracyStarted struct { + Phase Phase + ReferendumIndex U32 + VoteThreshold VoteThreshold + Topics []Hash +} + +// EventDemocracyPassed is emitted when a proposal has been approved by referendum. +type EventDemocracyPassed struct { + Phase Phase + ReferendumIndex U32 + Topics []Hash +} + +// EventDemocracyNotPassed is emitted when a proposal has been rejected by referendum. +type EventDemocracyNotPassed struct { + Phase Phase + ReferendumIndex U32 + Topics []Hash +} + +// EventDemocracyCancelled is emitted when a referendum has been cancelled. +type EventDemocracyCancelled struct { + Phase Phase + ReferendumIndex U32 + Topics []Hash +} + +// EventDemocracyExecuted is emitted when a proposal has been enacted. +type EventDemocracyExecuted struct { + Phase Phase + ReferendumIndex U32 + Result DispatchResult + Topics []Hash +} + +// EventDemocracyDelegated is emitted when an account has delegated their vote to another account. +type EventDemocracyDelegated struct { + Phase Phase + Who AccountID + Target AccountID + Topics []Hash +} + +// EventDemocracyUndelegated is emitted when an account has cancelled a previous delegation operation. +type EventDemocracyUndelegated struct { + Phase Phase + Target AccountID + Topics []Hash +} + +// EventDemocracyVetoed is emitted when an external proposal has been vetoed. +type EventDemocracyVetoed struct { + Phase Phase + Who AccountID + Hash Hash + BlockNumber U32 + Topics []Hash +} + +// EventDemocracyVoted is emitted when an account has voted in a referendum. +type EventDemocracyVoted struct { + Phase Phase + Who AccountID + ReferendumIndex U32 + Vote VoteAccountVote + Topics []Hash +} + +// EventElectionProviderMultiPhaseSolutionStored is emitted when a solution was stored with the given compute. +// +// If the solution is signed, this means that it hasn't yet been processed. If the +// solution is unsigned, this means that it has also been processed. +// +// The `bool` is `true` when a previous solution was ejected to make room for this one. +type EventElectionProviderMultiPhaseSolutionStored struct { + Phase Phase + ElectionCompute ElectionCompute + PrevEjected bool + Topics []Hash +} + +// EventElectionProviderMultiPhaseElectionFinalized is emitted when the election has been finalized, +// with `Some` of the given computation, or else if the election failed, `None`. +type EventElectionProviderMultiPhaseElectionFinalized struct { + Phase Phase + ElectionCompute OptionElectionCompute + Topics []Hash +} + +// EventElectionProviderMultiPhaseRewarded is emitted when an account has been rewarded for their +// signed submission being finalized. +type EventElectionProviderMultiPhaseRewarded struct { + Phase Phase + Account AccountID + Value U128 + Topics []Hash +} + +// EventElectionProviderMultiPhaseSlashed is emitted when an account has been slashed for +// submitting an invalid signed submission. +type EventElectionProviderMultiPhaseSlashed struct { + Phase Phase + Account AccountID + Value U128 + Topics []Hash +} + +// EventElectionProviderMultiPhaseSignedPhaseStarted is emitted when the signed phase of the given round has started. +type EventElectionProviderMultiPhaseSignedPhaseStarted struct { + Phase Phase + Round U32 + Topics []Hash +} + +// EventElectionProviderMultiPhaseUnsignedPhaseStarted is emitted when the unsigned phase of +// the given round has started. +type EventElectionProviderMultiPhaseUnsignedPhaseStarted struct { + Phase Phase + Round U32 + Topics []Hash +} + +// EventDemocracyPreimageNoted is emitted when a proposal's preimage was noted, and the deposit taken. +type EventDemocracyPreimageNoted struct { + Phase Phase + Hash Hash + AccountID AccountID + Balance U128 + Topics []Hash +} + +// EventDemocracyPreimageUsed is emitted when a proposal preimage was removed and used (the deposit was returned). +type EventDemocracyPreimageUsed struct { + Phase Phase + Hash Hash + AccountID AccountID + Balance U128 + Topics []Hash +} + +// EventDemocracyPreimageInvalid is emitted when a proposal could not be executed because its preimage was invalid. +type EventDemocracyPreimageInvalid struct { + Phase Phase + Hash Hash + ReferendumIndex U32 + Topics []Hash +} + +// EventDemocracyPreimageMissing is emitted when a proposal could not be executed because its preimage was missing. +type EventDemocracyPreimageMissing struct { + Phase Phase + Hash Hash + ReferendumIndex U32 + Topics []Hash +} + +// EventDemocracyPreimageReaped is emitted when a registered preimage was removed +// and the deposit collected by the reaper (last item). +type EventDemocracyPreimageReaped struct { + Phase Phase + Hash Hash + Provider AccountID + Balance U128 + Who AccountID + Topics []Hash +} + +// EventDemocracySeconded is emitted when an account has seconded a proposal. +type EventDemocracySeconded struct { + Phase Phase + AccountID AccountID + Balance U128 + Topics []Hash +} + +// EventDemocracyBlacklisted is emitted when A proposal has been blacklisted permanently +type EventDemocracyBlacklisted struct { + Phase Phase + Hash Hash + Topics []Hash +} + +// EventCouncilProposed is emitted when a motion (given hash) has been proposed (by given account) +// with a threshold (given `MemberCount`). +type EventCouncilProposed struct { + Phase Phase + Who AccountID + ProposalIndex U32 + Proposal Hash + MemberCount U32 + Topics []Hash +} + +// EventCollectiveVote is emitted when a motion (given hash) has been voted on by given account, leaving +// a tally (yes votes and no votes given respectively as `MemberCount`). +type EventCouncilVoted struct { + Phase Phase + Who AccountID + Proposal Hash + Approve bool + YesCount U32 + NoCount U32 + Topics []Hash +} + +// EventCrowdloanCreated is emitted when a new crowdloaning campaign is created. +type EventCrowdloanCreated struct { + Phase Phase + FundIndex U32 + Topics []Hash +} + +// EventCrowdloanContributed is emitted when `who` contributed to a crowd sale. +type EventCrowdloanContributed struct { + Phase Phase + Who AccountID + FundIndex U32 + Amount U128 + Topics []Hash +} + +// EventCrowdloanWithdrew is emitted when the full balance of a contributor was withdrawn. +type EventCrowdloanWithdrew struct { + Phase Phase + Who AccountID + FundIndex U32 + Amount U128 + Topics []Hash +} + +// EventCrowdloanPartiallyRefunded is emitted when the loans in a fund have been partially dissolved, i.e. +// there are some left over child keys that still need to be killed. +type EventCrowdloanPartiallyRefunded struct { + Phase Phase + FundIndex U32 + Topics []Hash +} + +// EventCrowdloanAllRefunded is emitted when all loans in a fund have been refunded. +type EventCrowdloanAllRefunded struct { + Phase Phase + FundIndex U32 + Topics []Hash +} + +// EventCrowdloanDissolved is emitted when the fund is dissolved. +type EventCrowdloanDissolved struct { + Phase Phase + FundIndex U32 + Topics []Hash +} + +// EventCrowdloanHandleBidResult is emitted when trying to submit a new bid to the Slots pallet. +type EventCrowdloanHandleBidResult struct { + Phase Phase + FundIndex U32 + DispatchResult DispatchResult + Topics []Hash +} + +// EventCrowdloanEdited is emitted when the configuration to a crowdloan has been edited. +type EventCrowdloanEdited struct { + Phase Phase + FundIndex U32 + Topics []Hash +} + +type CrowloadMemo []byte + +// EventCrowdloanMemoUpdated is emitted when a memo has been updated. +type EventCrowdloanMemoUpdated struct { + Phase Phase + Who AccountID + FundIndex U32 + Memo CrowloadMemo + Topics []Hash +} + +// EventCrowdloanAddedToNewRaise is emitted when a parachain has been moved to `NewRaise`. +type EventCrowdloanAddedToNewRaise struct { + Phase Phase + FundIndex U32 + Topics []Hash +} + +// EventCouncilApproved is emitted when a motion was approved by the required threshold. +type EventCouncilApproved struct { + Phase Phase + Proposal Hash + Topics []Hash +} + +// EventCouncilDisapproved is emitted when a motion was not approved by the required threshold. +type EventCouncilDisapproved struct { + Phase Phase + Proposal Hash + Topics []Hash +} + +// EventCouncilExecuted is emitted when a motion was executed; `result` is true if returned without error. +type EventCouncilExecuted struct { + Phase Phase + Proposal Hash + Result DispatchResult + Topics []Hash +} + +// EventCouncilMemberExecuted is emitted when a single member did some action; +// `result` is true if returned without error. +type EventCouncilMemberExecuted struct { + Phase Phase + Proposal Hash + Result DispatchResult + Topics []Hash +} + +// EventCouncilClosed is emitted when a proposal was closed after its duration was up. +type EventCouncilClosed struct { + Phase Phase + Proposal Hash + YesCount U32 + NoCount U32 + Topics []Hash +} + +// EventTechnicalCommitteeProposed is emitted when a motion (given hash) has been proposed (by given account) +// with a threshold (given, `MemberCount`) +type EventTechnicalCommitteeProposed struct { + Phase Phase + Account AccountID + ProposalIndex U32 + Proposal Hash + Threshold U32 + Topics []Hash +} + +// EventTechnicalCommitteeVoted is emitted when a motion (given hash) has been voted on by given account, leaving, +// a tally (yes votes and no votes given respectively as `MemberCount`). +type EventTechnicalCommitteeVoted struct { + Phase Phase + Account AccountID + Proposal Hash + Voted bool + YesCount U32 + NoCount U32 + Topics []Hash +} + +// EventTechnicalCommitteeApproved is emitted when a motion was approved by the required threshold. +type EventTechnicalCommitteeApproved struct { + Phase Phase + Proposal Hash + Topics []Hash +} + +// EventTechnicalCommitteeDisapproved is emitted when a motion was not approved by the required threshold. +type EventTechnicalCommitteeDisapproved struct { + Phase Phase + Proposal Hash + Topics []Hash +} + +// EventTechnicalCommitteeExecuted is emitted when a motion was executed; +// result will be `Ok` if it returned without error. +type EventTechnicalCommitteeExecuted struct { + Phase Phase + Proposal Hash + Result DispatchResult + Topics []Hash +} + +// EventTechnicalCommitteeMemberExecuted is emitted when a single member did some action; +// result will be `Ok` if it returned without error +type EventTechnicalCommitteeMemberExecuted struct { + Phase Phase + Proposal Hash + Result DispatchResult + Topics []Hash +} + +// EventTechnicalCommitteeClosed is emitted when A proposal was closed because its threshold was reached +// or after its duration was up +type EventTechnicalCommitteeClosed struct { + Phase Phase + Proposal Hash + YesCount U32 + NoCount U32 + Topics []Hash +} + +// EventTechnicalMembershipMemberAdded is emitted when the given member was added; see the transaction for who +type EventTechnicalMembershipMemberAdded struct { + Phase Phase + Topics []Hash +} + +// EventTechnicalMembershipMemberRemoved is emitted when the given member was removed; see the transaction for who +type EventTechnicalMembershipMemberRemoved struct { + Phase Phase + Topics []Hash +} + +// EventTechnicalMembershipMembersSwapped is emitted when two members were swapped;; see the transaction for who +type EventTechnicalMembershipMembersSwapped struct { + Phase Phase + Topics []Hash +} + +// EventTechnicalMembershipMembersReset is emitted when the membership was reset; +// see the transaction for who the new set is. +type EventTechnicalMembershipMembersReset struct { + Phase Phase + Topics []Hash +} + +// EventTechnicalMembershipKeyChanged is emitted when one of the members' keys changed. +type EventTechnicalMembershipKeyChanged struct { + Phase Phase + Topics []Hash +} + +// EventTechnicalMembershipKeyChanged is emitted when - phantom member, never used. +type EventTechnicalMembershipDummy struct { + Phase Phase + Topics []Hash +} + +// EventElectionsNewTerm is emitted when a new term with new members. +// This indicates that enough candidates existed, not that enough have has been elected. +// The inner value must be examined for this purpose. +type EventElectionsNewTerm struct { + Phase Phase + NewMembers []struct { + Member AccountID + Balance U128 + } + Topics []Hash +} + +// EventElectionsCandidateSlashed is emitted when a candidate was slashed by amount due to failing to obtain a seat +// as member or runner-up. Note that old members and runners-up are also candidates. +type EventElectionsCandidateSlashed struct { + Phase Phase + Who AccountID + Balance U128 + Topics []Hash +} + +// EventElectionsEmptyTerm is emitted when No (or not enough) candidates existed for this round. +type EventElectionsEmptyTerm struct { + Phase Phase + Topics []Hash +} + +// EventElectionsElectionError is emitted when an internal error happened while trying to perform election +type EventElectionsElectionError struct { + Phase Phase + Topics []Hash +} + +// EventElectionsMemberKicked is emitted when a member has been removed. +// This should always be followed by either `NewTerm` or `EmptyTerm`. +type EventElectionsMemberKicked struct { + Phase Phase + Member AccountID + Topics []Hash +} + +// EventElectionsRenounced is emitted when a member has renounced their candidacy. +type EventElectionsRenounced struct { + Phase Phase + Member AccountID + Topics []Hash +} + +// EventElectionsSeatHolderSlashed is emitted when a seat holder was slashed by amount +// by being forcefully removed from the set +type EventElectionsSeatHolderSlashed struct { + Phase Phase + Who AccountID + Balance U128 + Topics []Hash +} + +// EventGiltBidPlaced is emitted when a bid was successfully placed. +type EventGiltBidPlaced struct { + Phase Phase + Who AccountID + Amount U128 + Duration U32 + Topics []Hash +} + +// EventGiltBidRetracted is emitted when a bid was successfully removed (before being accepted as a gilt). +type EventGiltBidRetracted struct { + Phase Phase + Who AccountID + Amount U128 + Duration U32 + Topics []Hash +} + +// EventGiltGiltIssued is emitted when a bid was accepted as a gilt. The balance may not be released until expiry. +type EventGiltGiltIssued struct { + Phase Phase + Index U32 + Expiry U32 + Who AccountID + Amount U128 + Topics []Hash +} + +// EventGiltGiltThawed is emitted when an expired gilt has been thawed. +type EventGiltGiltThawed struct { + Phase Phase + Index U32 + Who AccountID + OriginalAmount U128 + AdditionalAmount U128 + Topics []Hash +} + +// A name was set or reset (which will remove all judgements). +type EventIdentitySet struct { + Phase Phase + Identity AccountID + Topics []Hash +} + +// A name was cleared, and the given balance returned. +type EventIdentityCleared struct { + Phase Phase + Identity AccountID + Balance U128 + Topics []Hash +} + +// A name was removed and the given balance slashed. +type EventIdentityKilled struct { + Phase Phase + Identity AccountID + Balance U128 + Topics []Hash +} + +// A judgement was asked from a registrar. +type EventIdentityJudgementRequested struct { + Phase Phase + Sender AccountID + RegistrarIndex U32 + Topics []Hash +} + +// A judgement request was retracted. +type EventIdentityJudgementUnrequested struct { + Phase Phase + Sender AccountID + RegistrarIndex U32 + Topics []Hash +} + +// A judgement was given by a registrar. +type EventIdentityJudgementGiven struct { + Phase Phase + Target AccountID + RegistrarIndex U32 + Topics []Hash +} + +// A registrar was added. +type EventIdentityRegistrarAdded struct { + Phase Phase + RegistrarIndex U32 + Topics []Hash +} + +// EventIdentitySubIdentityAdded is emitted when a sub-identity was added to an identity and the deposit paid +type EventIdentitySubIdentityAdded struct { + Phase Phase + Sub AccountID + Main AccountID + Deposit U128 + Topics []Hash +} + +// EventIdentitySubIdentityRemoved is emitted when a sub-identity was removed from an identity and the deposit freed +type EventIdentitySubIdentityRemoved struct { + Phase Phase + Sub AccountID + Main AccountID + Deposit U128 + Topics []Hash +} + +// EventIdentitySubIdentityRevoked is emitted when a sub-identity was cleared, and the given deposit repatriated from +// the main identity account to the sub-identity account. +type EventIdentitySubIdentityRevoked struct { + Phase Phase + Sub AccountID + Main AccountID + Deposit U128 + Topics []Hash +} + +// EventSocietyFounded is emitted when the society is founded by the given identity +type EventSocietyFounded struct { + Phase Phase + Founder AccountID + Topics []Hash +} + +// EventSocietyBid is emitted when a membership bid just happened. The given account is the candidate's ID +// and their offer is the second +type EventSocietyBid struct { + Phase Phase + Candidate AccountID + Offer U128 + Topics []Hash +} + +// EventSocietyVouch is emitted when a membership bid just happened by vouching. +// The given account is the candidate's ID and, their offer is the second. The vouching party is the third. +type EventSocietyVouch struct { + Phase Phase + Candidate AccountID + Offer U128 + Vouching AccountID + Topics []Hash +} + +// EventSocietyAutoUnbid is emitted when a [candidate] was dropped (due to an excess of bids in the system) +type EventSocietyAutoUnbid struct { + Phase Phase + Candidate AccountID + Topics []Hash +} + +// EventSocietyUnbid is emitted when a [candidate] was dropped (by their request) +type EventSocietyUnbid struct { + Phase Phase + Candidate AccountID + Topics []Hash +} + +// EventSocietyUnvouch is emitted when a [candidate] was dropped (by request of who vouched for them) +type EventSocietyUnvouch struct { + Phase Phase + Candidate AccountID + Topics []Hash +} + +// EventSocietyInducted is emitted when a group of candidates have been inducted. +// The batch's primary is the first value, the batch in full is the second. +type EventSocietyInducted struct { + Phase Phase + Primary AccountID + Candidates []AccountID + Topics []Hash +} + +// EventSocietySuspendedMemberJudgement is emitted when a suspended member has been judged +type EventSocietySuspendedMemberJudgement struct { + Phase Phase + Who AccountID + Judged bool + Topics []Hash +} + +// EventSocietyCandidateSuspended is emitted when a [candidate] has been suspended +type EventSocietyCandidateSuspended struct { + Phase Phase + Candidate AccountID + Topics []Hash +} + +// EventSocietyMemberSuspended is emitted when a [member] has been suspended +type EventSocietyMemberSuspended struct { + Phase Phase + Member AccountID + Topics []Hash +} + +// EventSocietyChallenged is emitted when a [member] has been challenged +type EventSocietyChallenged struct { + Phase Phase + Member AccountID + Topics []Hash +} + +// EventSocietyVote is emitted when a vote has been placed +type EventSocietyVote struct { + Phase Phase + Candidate AccountID + Voter AccountID + Vote bool + Topics []Hash +} + +// EventSocietyDefenderVote is emitted when a vote has been placed for a defending member +type EventSocietyDefenderVote struct { + Phase Phase + Voter AccountID + Vote bool + Topics []Hash +} + +// EventSocietyNewMaxMembers is emitted when a new [max] member count has been set +type EventSocietyNewMaxMembers struct { + Phase Phase + Max U32 + Topics []Hash +} + +// EventSocietyUnfounded is emitted when society is unfounded +type EventSocietyUnfounded struct { + Phase Phase + Founder AccountID + Topics []Hash +} + +// EventSocietyDeposit is emitted when some funds were deposited into the society account +type EventSocietyDeposit struct { + Phase Phase + Value U128 + Topics []Hash +} + +// EventRecoveryCreated is emitted when a recovery process has been set up for an account +type EventRecoveryCreated struct { + Phase Phase + Who AccountID + Topics []Hash +} + +// EventRecoveryInitiated is emitted when a recovery process has been initiated for account_1 by account_2 +type EventRecoveryInitiated struct { + Phase Phase + Account AccountID + Who AccountID + Topics []Hash +} + +// EventRecoveryVouched is emitted when a recovery process for account_1 by account_2 has been vouched for by account_3 +type EventRecoveryVouched struct { + Phase Phase + Lost AccountID + Rescuer AccountID + Who AccountID + Topics []Hash +} + +// EventRegistrarRegistered is emitted when a parachain is registered. +type EventRegistrarRegistered struct { + Phase Phase + ParachainID ParachainID + Account AccountID + Topics []Hash +} + +// EventRegistrarDeregistered is emitted when a parachain is deregistered. +type EventRegistrarDeregistered struct { + Phase Phase + ParachainID ParachainID + Topics []Hash +} + +// EventRegistrarReserved is emitted when a parachain slot is reserved. +type EventRegistrarReserved struct { + Phase Phase + ParachainID ParachainID + Account AccountID + Topics []Hash +} + +// EventReferendaSubmitted is emitted when a referendum has been submitted. +type EventReferendaSubmitted struct { + Phase Phase + Index U32 + Track U8 + ProposalHash Hash + Topics []Hash +} + +// EventReferendaDecisionDepositPlaced is emitted when the decision deposit has been placed. +type EventReferendaDecisionDepositPlaced struct { + Phase Phase + Index U32 + Who AccountID + Amount U128 + Topics []Hash +} + +// EventReferendaDecisionDepositRefunded is emitted when the decision deposit has been refunded. +type EventReferendaDecisionDepositRefunded struct { + Phase Phase + Index U32 + Who AccountID + Amount U128 + Topics []Hash +} + +// EventReferendaDecisionSlashed is emitted when a deposit has been slashed. +type EventReferendaDecisionSlashed struct { + Phase Phase + Who AccountID + Amount U128 + Topics []Hash +} + +// EventReferendaDecisionStarted is emitted when a referendum has moved into the deciding phase. +type EventReferendaDecisionStarted struct { + Phase Phase + Index U32 + Track U8 + ProposalHash Hash + Tally Tally + Topics []Hash +} + +// EventReferendaConfirmStarted is emitted when a referendum has been started. +type EventReferendaConfirmStarted struct { + Phase Phase + Index U32 + Topics []Hash +} + +// EventReferendaConfirmAborted is emitted when a referendum has been aborted. +type EventReferendaConfirmAborted struct { + Phase Phase + Index U32 + Topics []Hash +} + +// EventReferendaConfirmed is emitted when a referendum has ended its confirmation phase and is ready for approval. +type EventReferendaConfirmed struct { + Phase Phase + Index U32 + Tally Tally + Topics []Hash +} + +// EventReferendaApproved is emitted when a referendum has been approved and its proposal has been scheduled. +type EventReferendaApproved struct { + Phase Phase + Index U32 + Topics []Hash +} + +// EventReferendaRejected is emitted when a proposal has been rejected by referendum. +type EventReferendaRejected struct { + Phase Phase + Index U32 + Tally Tally + Topics []Hash +} + +// EventReferendaTimedOut is emitted when a referendum has been timed out without being decided. +type EventReferendaTimedOut struct { + Phase Phase + Index U32 + Tally Tally + Topics []Hash +} + +// EventReferendaCancelled is emitted when a referendum has been cancelled. +type EventReferendaCancelled struct { + Phase Phase + Index U32 + Tally Tally + Topics []Hash +} + +// EventReferendaKilled is emitted when a referendum has been killed. +type EventReferendaKilled struct { + Phase Phase + Index U32 + Tally Tally + Topics []Hash +} + +// EventRecoveryClosed is emitted when a recovery process for account_1 by account_2 has been closed +type EventRecoveryClosed struct { + Phase Phase + Who AccountID + Rescuer AccountID + Topics []Hash +} + +// EventRecoveryAccountRecovered is emitted when account_1 has been successfully recovered by account_2 +type EventRecoveryAccountRecovered struct { + Phase Phase + Who AccountID + Rescuer AccountID + Topics []Hash +} + +// EventRecoveryRemoved is emitted when a recovery process has been removed for an account +type EventRecoveryRemoved struct { + Phase Phase + Who AccountID + Topics []Hash +} + +// EventVestingVestingUpdated is emitted when the amount vested has been updated. +// This could indicate more funds are available. +// The balance given is the amount which is left unvested (and thus locked) +type EventVestingVestingUpdated struct { + Phase Phase + Account AccountID + Unvested U128 + Topics []Hash +} + +// EventVoterListRebagged is emitted when an account is moved from one bag to another. +type EventVoterListRebagged struct { + Phase Phase + Who AccountID + From U64 + To U64 + Topics []Hash +} + +// EventVoterListScoreUpdated is emitted when the score of an account is updated to the given amount. +type EventVoterListScoreUpdated struct { + Phase Phase + Who AccountID + NewScore U64 + Topics []Hash +} + +// EventWhitelistCallWhitelisted is emitted when a call has been whitelisted. +type EventWhitelistCallWhitelisted struct { + Phase Phase + CallHash Hash + Topics []Hash +} + +// EventWhitelistWhitelistedCallRemoved is emitted when a whitelisted call has been removed. +type EventWhitelistWhitelistedCallRemoved struct { + Phase Phase + CallHash Hash + Topics []Hash +} + +// EventWhitelistWhitelistedCallDispatched is emitted when a whitelisted call has been dispatched. +type EventWhitelistWhitelistedCallDispatched struct { + Phase Phase + CallHash Hash + Result DispatchResult + Topics []Hash +} + +// EventXcmPalletAttempted is emitted when the execution of an XCM message was attempted. +type EventXcmPalletAttempted struct { + Phase Phase + Outcome Outcome + Topics []Hash +} + +// EventXcmPalletSent is emitted when an XCM message was sent. +type EventXcmPalletSent struct { + Phase Phase + Origin MultiLocationV1 + Destination MultiLocationV1 + Message []Instruction + Topics []Hash +} + +// EventXcmPalletUnexpectedResponse is emitted when a query response which does not match a registered query +// is received. +// This may be because a matching query was never registered, it may be because it is a duplicate response, or +// because the query timed out. +type EventXcmPalletUnexpectedResponse struct { + Phase Phase + OriginLocation MultiLocationV1 + QueryID U64 + Topics []Hash +} + +// EventXcmPalletResponseReady is emitted when a query response has been received and is ready for +// taking with `take_response`. There is no registered notification call. +type EventXcmPalletResponseReady struct { + Phase Phase + QueryID U64 + Response Response + Topics []Hash +} + +// EventXcmPalletNotified is emitted when a query response has been received and query is removed. +// The registered notification has been dispatched and executed successfully. +type EventXcmPalletNotified struct { + Phase Phase + QueryID U64 + PalletIndex U8 + CallIndex U8 + Topics []Hash +} + +// EventXcmPalletNotifyOverweight is emitted when a query response has been received and query is removed. +// The registered notification could not be dispatched because the dispatch weight is greater than +// the maximum weight originally budgeted by this runtime for the query result. +type EventXcmPalletNotifyOverweight struct { + Phase Phase + QueryID U64 + PalletIndex U8 + CallIndex U8 + ActualWeight Weight + MaxBudgetedWeight Weight + Topics []Hash +} + +// EventXcmPalletNotifyDispatchError is emitted when a query response has been received and query is removed. +// There was a general error with dispatching the notification call. +type EventXcmPalletNotifyDispatchError struct { + Phase Phase + QueryID U64 + PalletIndex U8 + CallIndex U8 + Topics []Hash +} + +// EventXcmPalletNotifyDecodeFailed is emitted when a query response has been received and query is removed. +// The dispatch was unable to be decoded into a `Call`; this might be due to dispatch function having a signature +// which is not `(origin, QueryId, Response)`. +type EventXcmPalletNotifyDecodeFailed struct { + Phase Phase + QueryID U64 + PalletIndex U8 + CallIndex U8 + Topics []Hash +} + +// EventXcmPalletInvalidResponder is emitted when the expected query response +// has been received but the origin location of the response does not match that expected. +// The query remains registered for a later, valid, response to be received and acted upon. +type EventXcmPalletInvalidResponder struct { + Phase Phase + OriginLocation MultiLocationV1 + QueryID U64 + ExpectedLocation OptionMultiLocationV1 + Topics []Hash +} + +// EventXcmPalletInvalidResponderVersion is emitted when the expected query response +// has been received but the expected origin location placed in storage by this runtime +// previously cannot be decoded. The query remains registered. +// This is unexpected (since a location placed in storage in a previously executing +// runtime should be readable prior to query timeout) and dangerous since the possibly +// valid response will be dropped. Manual governance intervention is probably going to be +// needed. +type EventXcmPalletInvalidResponderVersion struct { + Phase Phase + OriginLocation MultiLocationV1 + QueryID U64 + Topics []Hash +} + +// EventXcmPalletResponseTaken is emitted when the received query response has been read and removed. +type EventXcmPalletResponseTaken struct { + Phase Phase + QueryID U64 + Topics []Hash +} + +// EventXcmPalletAssetsTrapped is emitted when some assets have been placed in an asset trap. +type EventXcmPalletAssetsTrapped struct { + Phase Phase + Hash H256 + Origin MultiLocationV1 + Assets VersionedMultiAssets + Topics []Hash +} + +type XcmVersion U32 + +// EventXcmPalletVersionChangeNotified is emitted when an XCM version change notification +// message has been attempted to be sent. +type EventXcmPalletVersionChangeNotified struct { + Phase Phase + Destination MultiLocationV1 + Result XcmVersion + Topics []Hash +} + +// EventXcmPalletSupportedVersionChanged is emitted when the supported version of a location has been changed. +// This might be through an automatic notification or a manual intervention. +type EventXcmPalletSupportedVersionChanged struct { + Phase Phase + Location MultiLocationV1 + XcmVersion XcmVersion + Topics []Hash +} + +// EventXcmPalletNotifyTargetSendFail is emitted when a given location which had a version change +// subscription was dropped owing to an error sending the notification to it. +type EventXcmPalletNotifyTargetSendFail struct { + Phase Phase + Location MultiLocationV1 + QueryID U64 + XcmError XCMError + Topics []Hash +} + +// EventXcmPalletNotifyTargetMigrationFail is emitted when a given location which had a +// version change subscription was dropped owing to an error migrating the location to our new XCM format. +type EventXcmPalletNotifyTargetMigrationFail struct { + Phase Phase + Location VersionedMultiLocation + QueryID U64 + Topics []Hash +} + +// EventVestingVestingCompleted is emitted when an [account] has become fully vested. No further vesting can happen +type EventVestingVestingCompleted struct { + Phase Phase + Account AccountID + Topics []Hash +} + +// EventSchedulerScheduled is emitted when scheduled some task +type EventSchedulerScheduled struct { + Phase Phase + When U32 + Index U32 + Topics []Hash +} + +// EventSchedulerCanceled is emitted when canceled some task +type EventSchedulerCanceled struct { + Phase Phase + When U32 + Index U32 + Topics []Hash +} + +// EventSchedulerDispatched is emitted when dispatched some task +type EventSchedulerDispatched struct { + Phase Phase + Task TaskAddress + ID OptionBytes + Result DispatchResult + Topics []Hash +} + +type SchedulerLookupError byte + +const ( + // Unknown A call of this hash was not known. + Unknown = 0 + // BadFormat The preimage for this hash was known but could not be decoded into a Call. + BadFormat = 1 +) + +func (sle *SchedulerLookupError) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + vb := SchedulerLookupError(b) + switch vb { + case Unknown, BadFormat: + *sle = vb + default: + return fmt.Errorf("unknown SchedulerLookupError enum: %v", vb) + } + return err +} + +func (sle SchedulerLookupError) Encode(encoder scale.Encoder) error { + return encoder.PushByte(byte(sle)) +} + +// EventSchedulerCallLookupFailed is emitted when the call for the provided hash was not found +// so the task has been aborted. +type EventSchedulerCallLookupFailed struct { + Phase Phase + Task TaskAddress + ID OptionBytes + Error SchedulerLookupError + Topics []Hash +} + +// EventPreimageCleared is emitted when a preimage has been cleared +type EventPreimageCleared struct { + Phase Phase + Hash Hash + Topics []Hash +} + +// EventPreimageNoted is emitted when a preimage has been noted +type EventPreimageNoted struct { + Phase Phase + Hash Hash + Topics []Hash +} + +// EventPreimageRequested is emitted when a preimage has been requested +type EventPreimageRequested struct { + Phase Phase + Hash Hash + Topics []Hash +} + +// EventProxyProxyExecuted is emitted when a proxy was executed correctly, with the given [result] +type EventProxyProxyExecuted struct { + Phase Phase + Result DispatchResult + Topics []Hash +} + +// EventProxyPureCreated is emitted when an anonymous account has been created by new proxy with given, +// disambiguation index and proxy type. +type EventProxyPureCreated struct { + Phase Phase + Pure AccountID + Who AccountID + ProxyType U8 + DisambiguationIndex U16 + Topics []Hash +} + +// EventProxyProxyAdded is emitted when a proxy was added. +type EventProxyProxyAdded struct { + Phase Phase + Delegator AccountID + Delegatee AccountID + ProxyType U8 + Delay U32 + Topics []Hash +} + +// EventProxyProxyRemoved is emitted when a proxy was removed. +type EventProxyProxyRemoved struct { + Phase Phase + Delegator AccountID + Delegatee AccountID + ProxyType U8 + BlockNumber U32 + Topics []Hash +} + +// EventProxyAnnounced is emitted when an announcement was placed to make a call in the future +type EventProxyAnnounced struct { + Phase Phase + Real AccountID + Proxy AccountID + CallHash Hash + Topics []Hash +} + +// EventSudoSudid is emitted when a sudo just took place. +type EventSudoSudid struct { + Phase Phase + Result DispatchResult + Topics []Hash +} + +// EventSudoKeyChanged is emitted when the sudoer just switched identity; the old key is supplied. +type EventSudoKeyChanged struct { + Phase Phase + AccountID AccountID + Topics []Hash +} + +// A sudo just took place. +type EventSudoAsDone struct { + Phase Phase + Done bool + Topics []Hash +} + +// EventTreasuryProposed is emitted when New proposal. +type EventTreasuryProposed struct { + Phase Phase + ProposalIndex U32 + Topics []Hash +} + +// EventTreasurySpending is emitted when we have ended a spend period and will now allocate funds. +type EventTreasurySpending struct { + Phase Phase + BudgetRemaining U128 + Topics []Hash +} + +// EventTreasuryAwarded is emitted when some funds have been allocated. +type EventTreasuryAwarded struct { + Phase Phase + ProposalIndex U32 + Amount U128 + Beneficiary AccountID + Topics []Hash +} + +// EventTreasuryRejected is emitted when s proposal was rejected; funds were slashed. +type EventTreasuryRejected struct { + Phase Phase + ProposalIndex U32 + Amount U128 + Topics []Hash +} + +// EventTreasuryBurnt is emitted when some of our funds have been burnt. +type EventTreasuryBurnt struct { + Phase Phase + Burn U128 + Topics []Hash +} + +// EventTreasuryRollover is emitted when spending has finished; this is the amount that rolls over until next spend. +type EventTreasuryRollover struct { + Phase Phase + BudgetRemaining U128 + Topics []Hash +} + +// EventTreasuryDeposit is emitted when some funds have been deposited. +type EventTreasuryDeposit struct { + Phase Phase + Deposited U128 + Topics []Hash +} + +// EventTreasurySpendApproved is emitted when a spend is approved. +type EventTreasurySpendApproved struct { + Phase Phase + ProposalIndex U32 + Amount U128 + Beneficiary AccountID + Topics []Hash +} + +// EventTreasuryUpdatedInactive is emitted when the inactive funds of the pallet have been updated. +type EventTreasuryUpdatedInactive struct { + Phase Phase + Reactivated U128 + Deactivated U128 + Topics []Hash +} + +// EventTipsNewTip is emitted when a new tip suggestion has been opened. +type EventTipsNewTip struct { + Phase Phase + Hash Hash + Topics []Hash +} + +// EventTipsTipClosing is emitted when a tip suggestion has reached threshold and is closing. +type EventTipsTipClosing struct { + Phase Phase + Hash Hash + Topics []Hash +} + +// EventTipsTipClosed is emitted when a tip suggestion has been closed. +type EventTipsTipClosed struct { + Phase Phase + Hash Hash + AccountID AccountID + Balance U128 + Topics []Hash +} + +// EventTipsTipSlashed is emitted when a tip suggestion has been slashed. +type EventTipsTipSlashed struct { + Phase Phase + Hash Hash + AccountID AccountID + Balance U128 + Topics []Hash +} + +// EventTransactionStorageStored is emitted when data is stored under a specific index. +type EventTransactionStorageStored struct { + Phase Phase + Index U32 + Topics []Hash +} + +// EventTransactionStorageRenewed is emitted when data is renewed under a specific index. +type EventTransactionStorageRenewed struct { + Phase Phase + Index U32 + Topics []Hash +} + +// EventTransactionStorageProofChecked is emitted when storage proof was successfully checked. +type EventTransactionStorageProofChecked struct { + Phase Phase + Topics []Hash +} + +type EventTransactionPaymentTransactionFeePaid struct { + Phase Phase + Who AccountID + ActualFee U128 + Tip U128 + Topics []Hash +} + +// EventTipsTipRetracted is emitted when a tip suggestion has been retracted. +type EventTipsTipRetracted struct { + Phase Phase + Hash Hash + Topics []Hash +} + +type BountyIndex U32 + +// EventBountiesBountyProposed is emitted for a new bounty proposal. +type EventBountiesBountyProposed struct { + Phase Phase + ProposalIndex BountyIndex + Topics []Hash +} + +// EventBountiesBountyRejected is emitted when a bounty proposal was rejected; funds were slashed. +type EventBountiesBountyRejected struct { + Phase Phase + ProposalIndex BountyIndex + Bond U128 + Topics []Hash +} + +// EventBountiesBountyBecameActive is emitted when a bounty proposal is funded and became active +type EventBountiesBountyBecameActive struct { + Phase Phase + Index BountyIndex + Topics []Hash +} + +// EventBountiesBountyAwarded is emitted when a bounty is awarded to a beneficiary +type EventBountiesBountyAwarded struct { + Phase Phase + Index BountyIndex + Beneficiary AccountID + Topics []Hash +} + +// EventBountiesBountyClaimed is emitted when a bounty is claimed by beneficiary +type EventBountiesBountyClaimed struct { + Phase Phase + Index BountyIndex + Payout U128 + Beneficiary AccountID + Topics []Hash +} + +// EventBountiesBountyCanceled is emitted when a bounty is cancelled. +type EventBountiesBountyCanceled struct { + Phase Phase + Index BountyIndex + Topics []Hash +} + +// EventBountiesBountyExtended is emitted when a bounty is extended. +type EventBountiesBountyExtended struct { + Phase Phase + Index BountyIndex + Topics []Hash +} + +// EventChildBountiesAdded is emitted when a child-bounty is added. +type EventChildBountiesAdded struct { + Phase Phase + Index BountyIndex + ChildIndex BountyIndex + Topics []Hash +} + +// EventChildBountiesAwarded is emitted when a child-bounty is awarded to a beneficiary. +type EventChildBountiesAwarded struct { + Phase Phase + Index BountyIndex + ChildIndex BountyIndex + Beneficiary AccountID + Topics []Hash +} + +// EventChildBountiesClaimed is emitted when a child-bounty is claimed by a beneficiary. +type EventChildBountiesClaimed struct { + Phase Phase + Index BountyIndex + ChildIndex BountyIndex + Payout U128 + Beneficiary AccountID + Topics []Hash +} + +// EventChildBountiesCanceled is emitted when a child-bounty is canceled. +type EventChildBountiesCanceled struct { + Phase Phase + Index BountyIndex + ChildIndex BountyIndex + Topics []Hash +} + +// EventUniquesApprovalCancelled is emitted when an approval for a delegate account to transfer the instance of +// an asset class was cancelled by its owner +type EventUniquesApprovalCancelled struct { + Phase Phase + CollectionID U64 + ItemID U128 + Owner AccountID + Delegate AccountID + Topics []Hash +} + +// EventUniquesApprovedTransfer is emitted when an `instance` of an asset `class` has been approved by the `owner` +// for transfer by a `delegate`. +type EventUniquesApprovedTransfer struct { + Phase Phase + CollectionID U64 + ItemID U128 + Owner AccountID + Delegate AccountID + Topics []Hash +} + +// EventUniquesAssetStatusChanged is emitted when an asset `class` has had its attributes changed by the `Force` origin +type EventUniquesAssetStatusChanged struct { + Phase Phase + CollectionID U64 + Topics []Hash +} + +// EventUniquesAttributeCleared is emitted when an attribute metadata has been cleared for an asset class or instance +type EventUniquesAttributeCleared struct { + Phase Phase + CollectionID U64 + MaybeItem Option[U128] + Key Bytes + Topics []Hash +} + +// EventUniquesAttributeSet is emitted when a new attribute metadata has been set for an asset class or instance +type EventUniquesAttributeSet struct { + Phase Phase + CollectionID U64 + MaybeItem Option[U128] + Key Bytes + Value Bytes + Topics []Hash +} + +// EventUniquesBurned is emitted when an asset `instance` was destroyed +type EventUniquesBurned struct { + Phase Phase + CollectionID U64 + ItemID U128 + Owner AccountID + Topics []Hash +} + +// EventUniquesClassFrozen is emitted when some asset `class` was frozen +type EventUniquesClassFrozen struct { + Phase Phase + CollectionID U64 + Topics []Hash +} + +// EventUniquesClassMetadataCleared is emitted when metadata has been cleared for an asset class +type EventUniquesClassMetadataCleared struct { + Phase Phase + CollectionID U64 + Topics []Hash +} + +// EventUniquesClassMetadataSet is emitted when new metadata has been set for an asset class +type EventUniquesClassMetadataSet struct { + Phase Phase + CollectionID U64 + Data Bytes + IsFrozen Bool + Topics []Hash +} + +// EventUniquesClassThawed is emitted when some asset `class` was thawed +type EventUniquesClassThawed struct { + Phase Phase + CollectionID U64 + Topics []Hash +} + +// EventUniquesCreated is emitted when an asset class was created +type EventUniquesCreated struct { + Phase Phase + CollectionID U64 + Creator AccountID + Owner AccountID + Topics []Hash +} + +// EventUniquesDestroyed is emitted when an asset `class` was destroyed +type EventUniquesDestroyed struct { + Phase Phase + CollectionID U64 + Topics []Hash +} + +// EventUniquesForceCreated is emitted when an asset class was force-created +type EventUniquesForceCreated struct { + Phase Phase + CollectionID U64 + Owner AccountID + Topics []Hash +} + +// EventUniquesFrozen is emitted when some asset `instance` was frozen +type EventUniquesFrozen struct { + Phase Phase + CollectionID U64 + ItemID U128 + Topics []Hash +} + +// EventUniquesIssued is emitted when an asset instance was issued +type EventUniquesIssued struct { + Phase Phase + CollectionID U64 + ItemID U128 + Owner AccountID + Topics []Hash +} + +// EventUniquesMetadataCleared is emitted when metadata has been cleared for an asset instance +type EventUniquesMetadataCleared struct { + Phase Phase + CollectionID U64 + ItemID U128 + Topics []Hash +} + +// EventUniquesMetadataSet is emitted when metadata has been set for an asset instance +type EventUniquesMetadataSet struct { + Phase Phase + CollectionID U64 + ItemID U128 + Data Bytes + IsFrozen Bool + Topics []Hash +} + +// EventUniquesOwnerChanged is emitted when the owner changed +type EventUniquesOwnerChanged struct { + Phase Phase + CollectionID U64 + NewOwner AccountID + Topics []Hash +} + +// EventUniquesRedeposited is emitted when metadata has been cleared for an asset instance +type EventUniquesRedeposited struct { + Phase Phase + CollectionID U64 + SuccessfulItems []U128 + Topics []Hash +} + +// EventUniquesTeamChanged is emitted when the management team changed +type EventUniquesTeamChanged struct { + Phase Phase + CollectionID U64 + Issuer AccountID + Admin AccountID + Freezer AccountID + Topics []Hash +} + +// EventUniquesThawed is emitted when some asset instance was thawed +type EventUniquesThawed struct { + Phase Phase + CollectionID U64 + ItemID U128 + Topics []Hash +} + +// EventUniquesTransferred is emitted when some asset instance was transferred +type EventUniquesTransferred struct { + Phase Phase + CollectionID U64 + ItemID U128 + From AccountID + To AccountID + Topics []Hash +} + +// EventUMPInvalidFormat is emitted when the upward message is invalid XCM. +type EventUMPInvalidFormat struct { + Phase Phase + MessageID [32]U8 + Topics []Hash +} + +// EventUMPUnsupportedVersion is emitted when the upward message is unsupported version of XCM. +type EventUMPUnsupportedVersion struct { + Phase Phase + MessageID [32]U8 + Topics []Hash +} + +// EventUMPExecutedUpward is emitted when the upward message executed with the given outcome. +type EventUMPExecutedUpward struct { + Phase Phase + MessageID [32]U8 + Outcome Outcome + Topics []Hash +} + +// EventUMPWeightExhausted is emitted when the weight limit for handling upward messages was reached. +type EventUMPWeightExhausted struct { + Phase Phase + MessageID [32]U8 + Remaining Weight + Required Weight + Topics []Hash +} + +// EventUMPUpwardMessagesReceived is emitted when some upward messages have been received and will be processed. +type EventUMPUpwardMessagesReceived struct { + Phase Phase + ParachainID ParachainID + Count U32 + Size U32 + Topics []Hash +} + +// EventUMPOverweightEnqueued is emitted when the weight budget was exceeded for an individual upward message. +// This message can be later dispatched manually using `service_overweight` dispatchable using +// the assigned `overweight_index`. +type EventUMPOverweightEnqueued struct { + Phase Phase + ParachainID ParachainID + MessageID [32]U8 + OverweightIndex U64 + RequiredWeight Weight + Topics []Hash +} + +// EventUMPOverweightServiced is emitted when the upward message from the +// overweight queue was executed with the given actual weight used. +type EventUMPOverweightServiced struct { + Phase Phase + OverweightIndex U64 + Used Weight + Topics []Hash +} + +// EventContractsInstantiated is emitted when a contract is deployed by address at the specified address +type EventContractsInstantiated struct { + Phase Phase + Deployer AccountID + Contract AccountID + Topics []Hash +} + +// EventContractsTerminated The only way for a contract to be removed and emitting this event is by calling +// `seal_terminate` +type EventContractsTerminated struct { + Phase Phase + Contract AccountID + Beneficiary AccountID + Topics []Hash +} + +// EventConvictionVotingDelegated is emitted when an account has delegated their vote to another account. +type EventConvictionVotingDelegated struct { + Phase Phase + Who AccountID + Target AccountID + Topics []Hash +} + +// EventConvictionVotingUndelegated is emitted when an account has delegated their vote to another account. +type EventConvictionVotingUndelegated struct { + Phase Phase + Who AccountID + Target AccountID + Topics []Hash +} + +// EventContractsContractEmitted is emitted when a custom event emitted by the contract +type EventContractsContractEmitted struct { + Phase Phase + Contract AccountID + Data Bytes + Topics []Hash +} + +// EventContractsContractCodeUpdated is emitted when a contract's code was updated +type EventContractsContractCodeUpdated struct { + Phase Phase + Contract AccountID + NewCodeHash Hash + OldCodeHash Hash + Topics []Hash +} + +type EventCollatorSelectionNewInvulnerables struct { + Phase Phase + NewInvulnerables []AccountID + Topics []Hash +} + +type EventCollatorSelectionNewDesiredCandidates struct { + Phase Phase + NewDesiredCandidates U32 + Topics []Hash +} + +type EventCollatorSelectionNewCandidacyBond struct { + Phase Phase + NewCandidacyBond U128 + Topics []Hash +} + +type EventCollatorSelectionCandidateAdded struct { + Phase Phase + CandidateAdded AccountID + Bond U128 + Topics []Hash +} + +type EventCollatorSelectionCandidateRemoved struct { + Phase Phase + CandidateRemoved AccountID + Topics []Hash +} + +// EventContractsCodeRemoved is emitted when code with the specified hash was removed +type EventContractsCodeRemoved struct { + Phase Phase + CodeHash Hash + Topics []Hash +} + +// EventContractsCodeStored is emitted when code with the specified hash has been stored +type EventContractsCodeStored struct { + Phase Phase + CodeHash Hash + Topics []Hash +} + +// EventContractsScheduleUpdated is triggered when the current [schedule] is updated +type EventContractsScheduleUpdated struct { + Phase Phase + Schedule U32 + Topics []Hash +} + +// EventContractsContractExecution is triggered when an event deposited upon execution of a contract from the account +type EventContractsContractExecution struct { + Phase Phase + Account AccountID + Data Bytes + Topics []Hash +} + +// EventUtilityBatchInterrupted is emitted when a batch of dispatches did not complete fully. +// Index of first failing dispatch given, as well as the error. +type EventUtilityBatchInterrupted struct { + Phase Phase + Index U32 + DispatchError DispatchError + Topics []Hash +} + +// EventUtilityBatchCompleted is emitted when a batch of dispatches completed fully with no error. +type EventUtilityBatchCompleted struct { + Phase Phase + Topics []Hash +} + +// EventUtilityDispatchedAs is emitted when a call was dispatched +type EventUtilityDispatchedAs struct { + Phase Phase + Index U32 + Result DispatchResult + Topics []Hash +} + +// EventUtilityItemCompleted is emitted when a single item within a Batch of dispatches has completed with no error +type EventUtilityItemCompleted struct { + Phase Phase + Topics []Hash +} + +// EventUtilityNewMultisig is emitted when a new multisig operation has begun. +// First param is the account that is approving, second is the multisig account, third is hash of the call. +type EventMultisigNewMultisig struct { + Phase Phase + Who, ID AccountID + CallHash Hash + Topics []Hash +} + +// EventNftSalesForSale is emitted when an NFT is out for sale. +type EventNftSalesForSale struct { + Phase Phase + ClassID U64 + InstanceID U128 + Sale Sale + Topics []Hash +} + +// EventNftSalesRemoved is emitted when an NFT is removed. +type EventNftSalesRemoved struct { + Phase Phase + ClassID U64 + InstanceID U128 + Topics []Hash +} + +// EventNftSalesSold is emitted when an NFT is sold. +type EventNftSalesSold struct { + Phase Phase + ClassID U64 + InstanceID U128 + Sale Sale + Buyer AccountID + Topics []Hash +} + +// TimePoint is a global extrinsic index, formed as the extrinsic index within a block, +// together with that block's height. +type TimePoint struct { + Height U32 + Index U32 +} + +// TaskAddress holds the location of a scheduled task that can be used to remove it +type TaskAddress struct { + When U32 + Index U32 +} + +// EventUtility is emitted when a multisig operation has been approved by someone. First param is the account that is +// approving, third is the multisig account, fourth is hash of the call. +type EventMultisigApproval struct { + Phase Phase + Who AccountID + TimePoint TimePoint + ID AccountID + CallHash Hash + Topics []Hash +} + +// DispatchResult can be returned from dispatchable functions +type DispatchResult struct { + Ok bool + Error DispatchError +} + +func (d *DispatchResult) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + d.Ok = true + return nil + default: + return decoder.Decode(&d.Error) + } +} + +func (d DispatchResult) Encode(encoder scale.Encoder) error { + if d.Ok { + return encoder.PushByte(0) + } + + if err := encoder.PushByte(1); err != nil { + return err + } + + return encoder.Encode(d.Error) +} + +// EventUtility is emitted when a multisig operation has been executed. First param is the account that is +// approving, third is the multisig account, fourth is hash of the call to be executed. +type EventMultisigExecuted struct { + Phase Phase + Who AccountID + TimePoint TimePoint + ID AccountID + CallHash Hash + Result DispatchResult + Topics []Hash +} + +// EventUtility is emitted when a multisig operation has been cancelled. First param is the account that is +// cancelling, third is the multisig account, fourth is hash of the call. +type EventMultisigCancelled struct { + Phase Phase + Who AccountID + TimePoint TimePoint + ID AccountID + CallHash Hash + Topics []Hash +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/execution_result.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/execution_result.go new file mode 100644 index 000000000..565519425 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/execution_result.go @@ -0,0 +1,78 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +type OptionExecutionResult struct { + option + value ExecutionResult +} + +func NewOptionExecutionResult(value ExecutionResult) OptionExecutionResult { + return OptionExecutionResult{option{hasValue: true}, value} +} + +func NewOptionExecutionResultEmpty() OptionExecutionResult { + return OptionExecutionResult{option: option{hasValue: false}} +} + +func (o *OptionExecutionResult) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +func (o OptionExecutionResult) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +// SetSome sets a value +func (o *OptionExecutionResult) SetSome(value ExecutionResult) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionExecutionResult) SetNone() { + o.hasValue = false + o.value = ExecutionResult{} +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o *OptionExecutionResult) Unwrap() (ok bool, value ExecutionResult) { + return o.hasValue, o.value +} + +type ExecutionResult struct { + Outcome U32 + Error XCMError +} + +func (e *ExecutionResult) Decode(decoder scale.Decoder) error { + if err := decoder.Decode(&e.Outcome); err != nil { + return err + } + + return decoder.Decode(&e.Error) +} + +func (e ExecutionResult) Encode(encoder scale.Encoder) error { + if err := encoder.Encode(e.Outcome); err != nil { + return err + } + + return encoder.Encode(e.Error) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic/extensions/check_metadata.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic/extensions/check_metadata.go new file mode 100644 index 000000000..5f1cdf1d1 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic/extensions/check_metadata.go @@ -0,0 +1,40 @@ +package extensions + +import ( + "errors" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +type CheckMetadataMode byte + +var ( + CheckMetadataModeDisabled CheckMetadataMode + CheckMetadataModeEnabled CheckMetadataMode = 1 +) + +func (m CheckMetadataMode) Encode(encoder scale.Encoder) error { + switch m { + case CheckMetadataModeDisabled: + return encoder.PushByte(0) + case CheckMetadataModeEnabled: + return encoder.PushByte(1) + default: + return errors.New("unsupported check metadata mode") + } +} + +type CheckMetadataHash struct { + Hash types.Option[types.H256] +} + +func (c CheckMetadataHash) Encode(encoder *scale.Encoder) error { + if c.Hash.HasValue() { + _, hash := c.Hash.Unwrap() + + return encoder.Encode(hash) + } + + return encoder.PushByte(0) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic/extensions/names.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic/extensions/names.go new file mode 100644 index 000000000..57aa42254 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic/extensions/names.go @@ -0,0 +1,22 @@ +package extensions + +// SignedExtensionName is the type for the signed extension name present in the metadata. +type SignedExtensionName string + +const ( + CheckNonZeroSenderSignedExtension SignedExtensionName = "CheckNonZeroSender" + CheckMortalitySignedExtension SignedExtensionName = "CheckMortality" + CheckEraSignedExtension SignedExtensionName = "CheckEra" + CheckNonceSignedExtension SignedExtensionName = "CheckNonce" + ChargeTransactionPaymentSignedExtension SignedExtensionName = "ChargeTransactionPayment" + ChargeAssetTxPaymentSignedExtension SignedExtensionName = "ChargeAssetTxPayment" + CheckMetadataHashSignedExtension SignedExtensionName = "CheckMetadataHash" + CheckSpecVersionSignedExtension SignedExtensionName = "CheckSpecVersion" + CheckTxVersionSignedExtension SignedExtensionName = "CheckTxVersion" + CheckGenesisSignedExtension SignedExtensionName = "CheckGenesis" + CheckWeightSignedExtension SignedExtensionName = "CheckWeight" + PreBalanceTransferExtensionSignedExtension SignedExtensionName = "PreBalanceTransferExtension" + StorageWeightReclaimSignedExtension SignedExtensionName = "StorageWeightReclaim" + PrevalidateAttestsSignedExtension SignedExtensionName = "PrevalidateAttests" + CheckNetworkMembershipSignedExtension SignedExtensionName = "CheckNetworkMembership" +) diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic/extrinsic.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic/extrinsic.go new file mode 100644 index 000000000..6eb2c33e5 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic/extrinsic.go @@ -0,0 +1,119 @@ +package extrinsic + +import ( + "bytes" + "encoding/json" + "fmt" + "math/big" + + libErr "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/error" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/codec" +) + +const ( + ErrEncodeToHex = libErr.Error("encode to hex") + ErrScaleEncode = libErr.Error("scale encode") + ErrInvalidVersion = libErr.Error("invalid version") + ErrPayloadCreation = libErr.Error("payload creation") + ErrPayloadMutation = libErr.Error("payload mutation") + ErrMultiAddressCreation = libErr.Error("multi address creation") + ErrPayloadSigning = libErr.Error("payload signing") +) + +const ( + BitSigned = 0x80 + BitUnsigned = 0 + + UnmaskVersion = 0x7f + + DefaultVersion = 1 + VersionUnknown = 0 // v0 is unknown + Version1 = 1 + Version2 = 2 + Version3 = 3 + Version4 = 4 +) + +// Extrinsic is an extrinsic type that can be used on chains that +// have a custom signed extension logic. +type Extrinsic struct { + // Version is the encoded version flag (which encodes the raw transaction version + // and signing information in one byte). + Version byte + // Signature is the extrinsic signature. + Signature *Signature + // Method is the call this extrinsic wraps + Method types.Call +} + +// NewExtrinsic creates a new Extrinsic from the provided Call. +func NewExtrinsic(c types.Call) Extrinsic { + return Extrinsic{ + Version: Version4, + Method: c, + } +} + +// MarshalJSON returns a JSON encoded byte array of Extrinsic. +func (e Extrinsic) MarshalJSON() ([]byte, error) { + s, err := codec.EncodeToHex(e) + if err != nil { + return nil, ErrEncodeToHex.Wrap(err) + } + return json.Marshal(s) +} + +// IsSigned returns true if the extrinsic is signed +func (e Extrinsic) IsSigned() bool { + return e.Version&BitSigned == BitSigned +} + +// Type returns the raw transaction version (not flagged with signing information) +func (e Extrinsic) Type() uint8 { + return e.Version & UnmaskVersion +} + +func (e Extrinsic) Encode(encoder scale.Encoder) error { + if e.Type() != Version4 { + return fmt.Errorf("unsupported extrinsic version: %v (isSigned: %v, type: %v)", e.Version, e.IsSigned(), + e.Type()) + } + + var bb = bytes.Buffer{} + tempEnc := scale.NewEncoder(&bb) + + err := tempEnc.Encode(e.Version) + if err != nil { + return err + } + + if e.IsSigned() { + err = tempEnc.Encode(e.Signature) + if err != nil { + return err + } + } + + // encode the method + err = tempEnc.Encode(e.Method) + if err != nil { + return err + } + + // take the temporary buffer to determine length, write that as prefix + eb := bb.Bytes() + err = encoder.EncodeUintCompact(*big.NewInt(0).SetUint64(uint64(len(eb)))) + if err != nil { + return err + } + + // write the actual encoded transaction + err = encoder.Write(eb) + if err != nil { + return err + } + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic/options.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic/options.go new file mode 100644 index 000000000..caffe2ee6 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic/options.go @@ -0,0 +1,70 @@ +package extrinsic + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic/extensions" +) + +// SignedFieldValues is a map that holds a value for a particular SignedFieldName. +type SignedFieldValues map[SignedFieldName]any + +// SigningOption is the type used for providing values to a SignedFieldValues map. +type SigningOption func(vals SignedFieldValues) + +// WithEra returns a SigningOption that is used to add the era and block hash to a Payload. +func WithEra(era types.ExtrinsicEra, blockHash types.Hash) SigningOption { + return func(vals SignedFieldValues) { + vals[EraSignedField] = era + vals[BlockHashSignedField] = blockHash + } +} + +// WithNonce returns a SigningOption that is used to add the nonce to a Payload. +func WithNonce(nonce types.UCompact) SigningOption { + return func(vals SignedFieldValues) { + vals[NonceSignedField] = nonce + } +} + +// WithMetadataMode returns a SigningOption that is used to add the check metadata mode and hash to a Payload. +func WithMetadataMode(mode extensions.CheckMetadataMode, metadataHash extensions.CheckMetadataHash) SigningOption { + return func(vals SignedFieldValues) { + vals[CheckMetadataHashModeSignedField] = mode + vals[CheckMetadataHashSignedField] = metadataHash + } +} + +// WithTip returns a SigningOption that is used to add the tip to a Payload. +func WithTip(tip types.UCompact) SigningOption { + return func(vals SignedFieldValues) { + vals[TipSignedField] = tip + } +} + +// WithAssetID returns a SigningOption that is used to add the asset ID to a Payload. +func WithAssetID(assetID types.Option[types.AssetID]) SigningOption { + return func(vals SignedFieldValues) { + vals[AssetIDSignedField] = assetID + } +} + +// WithSpecVersion returns a SigningOption that is used to add the spec version to a Payload. +func WithSpecVersion(specVersion types.U32) SigningOption { + return func(vals SignedFieldValues) { + vals[SpecVersionSignedField] = specVersion + } +} + +// WithTransactionVersion returns a SigningOption that is used to add the transaction version to a Payload. +func WithTransactionVersion(transactionVersion types.U32) SigningOption { + return func(vals SignedFieldValues) { + vals[TransactionVersionSignedField] = transactionVersion + } +} + +// WithGenesisHash returns a SigningOption that is used to add the genesis hash to a Payload. +func WithGenesisHash(genesisHash types.Hash) SigningOption { + return func(vals SignedFieldValues) { + vals[GenesisHashSignedField] = genesisHash + } +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic/payload.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic/payload.go new file mode 100644 index 000000000..67d20af25 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic/payload.go @@ -0,0 +1,239 @@ +package extrinsic + +import ( + libErr "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/error" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic/extensions" +) + +const ( + ErrCallEncoding = libErr.Error("call encoding") + ErrSignedFieldNotMutated = libErr.Error("signed field not mutated") + ErrPayloadSignedFieldEncoding = libErr.Error("signed field encoding") + ErrSignedExtraFieldNotMutated = libErr.Error("signed extra field not mutated") + ErrSignedExtraFieldEncoding = libErr.Error("signed extra field encoding") + ErrPayloadNil = libErr.Error("payload is nil") + ErrPayloadEncoding = libErr.Error("payload encoding") + ErrSignedExtensionTypeNotDefined = libErr.Error("signed extension type not defined") + ErrSignedExtensionTypeNotSupported = libErr.Error("signed extension type not supported") +) + +// SignedField represents a field used in the Payload. +type SignedField struct { + // Name of the field, this is omitted when the extrinsic is signed. + Name SignedFieldName + + // Value of the field used when the extrinsic is signed. + Value any + + // Mutated is used to keep track of changes done to the field. + Mutated bool +} + +// Payload holds the encoded types.Call and the fields that are used for generating +// the Extrinsic payload and signature. +// +// Notes - the ordering of the SignedFields and SignedExtraFields is the order in which they are provided in +// the metadata. +type Payload struct { + EncodedCall types.BytesBare + SignedFields []*SignedField + SignedExtraFields []*SignedField +} + +// Encode the call bytes and the signed fields in the order that is provided during creation +// from the metadata. +// +// The function also performs an extra check to ensure that all required fields were mutated. +func (p *Payload) Encode(encoder scale.Encoder) error { + if err := encoder.Encode(p.EncodedCall); err != nil { + return ErrCallEncoding.Wrap(err) + } + + for _, signedField := range p.SignedFields { + if !signedField.Mutated { + return ErrSignedFieldNotMutated.WithMsg("signed field '%s'", signedField.Name) + } + + if err := encoder.Encode(signedField.Value); err != nil { + return ErrPayloadSignedFieldEncoding.Wrap(err) + } + } + + for _, signedExtraField := range p.SignedExtraFields { + if !signedExtraField.Mutated { + return ErrSignedExtraFieldNotMutated.WithMsg("signed extra field '%s'", signedExtraField.Name) + } + + if err := encoder.Encode(signedExtraField.Value); err != nil { + return ErrSignedExtraFieldEncoding.Wrap(err) + } + } + + return nil +} + +// MutateSignedFields is mutating the payload's SignedFields and SignedExtraFields +// based on the provided SignedFieldValues. +func (p *Payload) MutateSignedFields(vals SignedFieldValues) error { + if p == nil { + return ErrPayloadNil + } + + for _, signedField := range p.SignedFields { + signedFieldVal, ok := vals[signedField.Name] + + if !ok { + continue + } + + signedField.Value = signedFieldVal + signedField.Mutated = true + } + + for _, signedExtraField := range p.SignedExtraFields { + signedFieldVal, ok := vals[signedExtraField.Name] + + if !ok { + continue + } + + signedExtraField.Value = signedFieldVal + signedExtraField.Mutated = true + } + + return nil +} + +// SignedFieldName is the type used for representing a field name. +type SignedFieldName string + +const ( + EraSignedField SignedFieldName = "era" + BlockHashSignedField SignedFieldName = "block_hash" + NonceSignedField SignedFieldName = "nonce" + TipSignedField SignedFieldName = "tip" + AssetIDSignedField SignedFieldName = "asset_id" + CheckMetadataHashModeSignedField SignedFieldName = "check_metadata_hash_mode" + CheckMetadataHashSignedField SignedFieldName = "check_metadata_hash" + SpecVersionSignedField SignedFieldName = "spec_version" + TransactionVersionSignedField SignedFieldName = "transaction_version" + GenesisHashSignedField SignedFieldName = "genesis_hash" +) + +// PayloadMutatorFn is the type used for mutating the Payload during creation. +type PayloadMutatorFn func(payload *Payload) + +// PayloadMutatorFns is a map that holds a PayloadMutatorFn for each supported signed extension. +var PayloadMutatorFns = map[extensions.SignedExtensionName]PayloadMutatorFn{ + extensions.CheckMortalitySignedExtension: func(payload *Payload) { + payload.SignedFields = append(payload.SignedFields, &SignedField{ + Name: EraSignedField, + Value: &types.ExtrinsicEra{}, + }) + payload.SignedExtraFields = append(payload.SignedExtraFields, &SignedField{ + Name: BlockHashSignedField, + Value: &types.Hash{}, + }) + }, + extensions.CheckEraSignedExtension: func(payload *Payload) { + payload.SignedFields = append(payload.SignedFields, &SignedField{ + Name: EraSignedField, + Value: &types.ExtrinsicEra{}, + }) + payload.SignedExtraFields = append(payload.SignedExtraFields, &SignedField{ + Name: BlockHashSignedField, + Value: &types.Hash{}, + }) + }, + extensions.CheckNonceSignedExtension: func(payload *Payload) { + payload.SignedFields = append(payload.SignedFields, &SignedField{ + Name: NonceSignedField, + Value: types.U32(0), + }) + }, + extensions.ChargeTransactionPaymentSignedExtension: func(payload *Payload) { + payload.SignedFields = append(payload.SignedFields, &SignedField{ + Name: TipSignedField, + Value: types.NewUCompactFromUInt(0), + }) + }, + extensions.ChargeAssetTxPaymentSignedExtension: func(payload *Payload) { + payload.SignedFields = append(payload.SignedFields, &SignedField{ + Name: TipSignedField, + Value: types.NewUCompactFromUInt(0), + }) + payload.SignedFields = append(payload.SignedFields, &SignedField{ + Name: AssetIDSignedField, + Value: types.NewEmptyOption[types.AssetID](), + }) + }, + extensions.CheckMetadataHashSignedExtension: func(payload *Payload) { + payload.SignedFields = append(payload.SignedFields, &SignedField{ + Name: CheckMetadataHashModeSignedField, + Value: extensions.CheckMetadataModeDisabled, + }) + payload.SignedExtraFields = append(payload.SignedExtraFields, &SignedField{ + Name: CheckMetadataHashSignedField, + Value: &extensions.CheckMetadataHash{}, + }) + }, + extensions.CheckSpecVersionSignedExtension: func(payload *Payload) { + payload.SignedExtraFields = append(payload.SignedExtraFields, &SignedField{ + Name: SpecVersionSignedField, + Value: types.U32(0), + }) + }, + extensions.CheckTxVersionSignedExtension: func(payload *Payload) { + payload.SignedExtraFields = append(payload.SignedExtraFields, &SignedField{ + Name: TransactionVersionSignedField, + Value: types.U32(0), + }) + }, + extensions.CheckGenesisSignedExtension: func(payload *Payload) { + payload.SignedExtraFields = append(payload.SignedExtraFields, &SignedField{ + Name: GenesisHashSignedField, + Value: &types.Hash{}, + }) + }, + // There's nothing that we can add in the payload or signature in the following cases, however, these are added to + // ensure that the extension is acknowledged and that the mutator check is passing. + extensions.CheckNonZeroSenderSignedExtension: func(payload *Payload) {}, + extensions.CheckWeightSignedExtension: func(payload *Payload) {}, + extensions.PreBalanceTransferExtensionSignedExtension: func(payload *Payload) {}, + extensions.StorageWeightReclaimSignedExtension: func(payload *Payload) {}, + extensions.PrevalidateAttestsSignedExtension: func(payload *Payload) {}, + extensions.CheckNetworkMembershipSignedExtension: func(payload *Payload) {}, +} + +// createPayload iterates over all signed extensions provided in the metadata and +// attempts to load and use a PayloadMutatorFn for each one. +// +// If a PayloadMutatorFn is not found for a specific signed extension, it means that it is not currently supported. +func createPayload(meta *types.Metadata, encodedCall []byte) (*Payload, error) { + payload := &Payload{ + EncodedCall: encodedCall, + } + + for _, signedExtension := range meta.AsMetadataV14.Extrinsic.SignedExtensions { + signedExtensionType, ok := meta.AsMetadataV14.EfficientLookup[signedExtension.Type.Int64()] + + if !ok { + return nil, ErrSignedExtensionTypeNotDefined.WithMsg("lookup ID - '%d'", signedExtension.Type.Int64()) + } + + signedExtensionName := extensions.SignedExtensionName(signedExtensionType.Path[len(signedExtensionType.Path)-1]) + + payloadMutatorFn, ok := PayloadMutatorFns[signedExtensionName] + + if !ok { + return nil, ErrSignedExtensionTypeNotSupported.WithMsg("signed extension '%s'", signedExtensionName) + } + + payloadMutatorFn(payload) + } + + return payload, nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic/signature.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic/signature.go new file mode 100644 index 000000000..a17c6dbe6 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic/signature.go @@ -0,0 +1,40 @@ +package extrinsic + +import ( + libErr "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/error" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types" +) + +const ( + ErrSignatureFieldEncoding = libErr.Error("signature field encoding failed") +) + +// Signature holds all the relevant fields for an extrinsic signature. +type Signature struct { + Signer types.MultiAddress + Signature types.MultiSignature + SignedFields []*SignedField +} + +// Encode is encoding the Signer, Signature, and SignedFields. +// +// Note - the ordering of the SignedFields is the order in which they are provided in +// the metadata. +func (s Signature) Encode(encoder scale.Encoder) error { + if err := encoder.Encode(s.Signer); err != nil { + return err + } + + if err := encoder.Encode(s.Signature); err != nil { + return err + } + + for _, signedField := range s.SignedFields { + if err := encoder.Encode(signedField.Value); err != nil { + return ErrSignatureFieldEncoding.Wrap(err) + } + } + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic_era.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic_era.go new file mode 100644 index 000000000..3dd39ef66 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic_era.go @@ -0,0 +1,76 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +// ExtrinsicEra indicates either a mortal or immortal extrinsic +type ExtrinsicEra struct { + IsImmortalEra bool + // AsImmortalEra ImmortalEra + IsMortalEra bool + AsMortalEra MortalEra +} + +func (e *ExtrinsicEra) Decode(decoder scale.Decoder) error { + first, err := decoder.ReadOneByte() + if err != nil { + return err + } + + if first == 0 { + e.IsImmortalEra = true + return nil + } + + e.IsMortalEra = true + + second, err := decoder.ReadOneByte() + if err != nil { + return err + } + + e.AsMortalEra = MortalEra{first, second} + + return nil +} + +func (e ExtrinsicEra) Encode(encoder scale.Encoder) error { + if e.IsImmortalEra { + return encoder.PushByte(0) + } + + err := encoder.PushByte(e.AsMortalEra.First) + if err != nil { + return err + } + + err = encoder.PushByte(e.AsMortalEra.Second) + if err != nil { + return err + } + + return nil +} + +// MortalEra for an extrinsic, indicating period and phase +type MortalEra struct { + First byte + Second byte +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic_status.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic_status.go new file mode 100644 index 000000000..3630bc03d --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/extrinsic_status.go @@ -0,0 +1,243 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "encoding/json" + "fmt" + "strings" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +// ExtrinsicStatus is an enum containing the result of an extrinsic submission +type ExtrinsicStatus struct { + IsFuture bool // 00:: Future + IsReady bool // 1:: Ready + IsBroadcast bool // 2:: Broadcast(Vec) + AsBroadcast []Text + IsInBlock bool // 3:: InBlock(BlockHash) + AsInBlock Hash + IsRetracted bool // 4:: Retracted(BlockHash) + AsRetracted Hash + IsFinalityTimeout bool // 5:: FinalityTimeout(BlockHash) + AsFinalityTimeout Hash + IsFinalized bool // 6:: Finalized(BlockHash) + AsFinalized Hash + IsUsurped bool // 7:: Usurped(Hash) + AsUsurped Hash + IsDropped bool // 8:: Dropped + IsInvalid bool // 9:: Invalid +} + +func (e *ExtrinsicStatus) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + + if err != nil { + return err + } + + switch b { + case 0: + e.IsFuture = true + case 1: + e.IsReady = true + case 2: + e.IsBroadcast = true + err = decoder.Decode(&e.AsBroadcast) + case 3: + e.IsInBlock = true + err = decoder.Decode(&e.AsInBlock) + case 4: + e.IsRetracted = true + err = decoder.Decode(&e.AsRetracted) + case 5: + e.IsFinalityTimeout = true + err = decoder.Decode(&e.AsFinalityTimeout) + case 6: + e.IsFinalized = true + err = decoder.Decode(&e.AsFinalized) + case 7: + e.IsUsurped = true + err = decoder.Decode(&e.AsUsurped) + case 8: + e.IsDropped = true + case 9: + e.IsInvalid = true + } + + if err != nil { + return err + } + + return nil +} + +func (e ExtrinsicStatus) Encode(encoder scale.Encoder) error { + var err1, err2 error + switch { + case e.IsFuture: + err1 = encoder.PushByte(0) + case e.IsReady: + err1 = encoder.PushByte(1) + case e.IsBroadcast: + err1 = encoder.PushByte(2) + err2 = encoder.Encode(e.AsBroadcast) + case e.IsInBlock: + err1 = encoder.PushByte(3) + err2 = encoder.Encode(e.AsInBlock) + case e.IsRetracted: + err1 = encoder.PushByte(4) + err2 = encoder.Encode(e.AsRetracted) + case e.IsFinalityTimeout: + err1 = encoder.PushByte(5) + err2 = encoder.Encode(e.AsFinalityTimeout) + case e.IsFinalized: + err1 = encoder.PushByte(6) + err2 = encoder.Encode(e.AsFinalized) + case e.IsUsurped: + err1 = encoder.PushByte(7) + err2 = encoder.Encode(e.AsUsurped) + case e.IsDropped: + err1 = encoder.PushByte(8) + case e.IsInvalid: + err1 = encoder.PushByte(9) + } + + if err1 != nil { + return err1 + } + if err2 != nil { + return err2 + } + + return nil +} + +func (e *ExtrinsicStatus) UnmarshalJSON(b []byte) error { //nolint:funlen + input := strings.TrimSpace(string(b)) + if len(input) >= 2 && input[0] == '"' && input[len(input)-1] == '"' { + input = input[1 : len(input)-1] + } + + switch { + case input == "future": + e.IsFuture = true + return nil + case input == "ready": + e.IsReady = true + return nil + case input == "dropped": + e.IsDropped = true + return nil + case input == "invalid": + e.IsInvalid = true + return nil + } + + // no simple case, decode into helper + var tmp struct { + AsBroadcast []Text `json:"broadcast"` + AsInBlock Hash `json:"inBlock"` + AsRetracted Hash `json:"retracted"` + AsFinalityTimeout Hash `json:"finalityTimeout"` + AsFinalized Hash `json:"finalized"` + AsUsurped Hash `json:"usurped"` + } + if err := json.Unmarshal(b, &tmp); err != nil { + return err + } + + switch { + case strings.HasPrefix(input, "{\"broadcast\""): + e.IsBroadcast = true + e.AsBroadcast = tmp.AsBroadcast + return nil + case strings.HasPrefix(input, "{\"inBlock\""): + e.IsInBlock = true + e.AsInBlock = tmp.AsInBlock + return nil + case strings.HasPrefix(input, "{\"retracted\""): + e.IsRetracted = true + e.AsRetracted = tmp.AsRetracted + return nil + case strings.HasPrefix(input, "{\"finalityTimeout\""): + e.IsFinalityTimeout = true + e.AsFinalityTimeout = tmp.AsFinalityTimeout + return nil + case strings.HasPrefix(input, "{\"finalized\""): + e.IsFinalized = true + e.AsFinalized = tmp.AsFinalized + return nil + case strings.HasPrefix(input, "{\"usurped\""): + e.IsUsurped = true + e.AsUsurped = tmp.AsUsurped + return nil + } + + return fmt.Errorf("unexpected JSON for ExtrinsicStatus, got %v", string(b)) +} + +func (e ExtrinsicStatus) MarshalJSON() ([]byte, error) { + switch { + case e.IsFuture: + return []byte("\"future\""), nil + case e.IsReady: + return []byte("\"ready\""), nil + case e.IsDropped: + return []byte("\"dropped\""), nil + case e.IsInvalid: + return []byte("\"invalid\""), nil + case e.IsBroadcast: + var tmp struct { + AsBroadcast []Text `json:"broadcast"` + } + tmp.AsBroadcast = e.AsBroadcast + return json.Marshal(tmp) + case e.IsInBlock: + var tmp struct { + AsInBlock Hash `json:"inBlock"` + } + tmp.AsInBlock = e.AsInBlock + return json.Marshal(tmp) + case e.IsRetracted: + var tmp struct { + AsRetracted Hash `json:"retracted"` + } + tmp.AsRetracted = e.AsRetracted + return json.Marshal(tmp) + case e.IsFinalityTimeout: + var tmp struct { + AsFinalityTimeout Hash `json:"finalityTimeout"` + } + tmp.AsFinalityTimeout = e.AsFinalityTimeout + return json.Marshal(tmp) + case e.IsFinalized: + var tmp struct { + AsFinalized Hash `json:"finalized"` + } + tmp.AsFinalized = e.AsFinalized + return json.Marshal(tmp) + case e.IsUsurped: + var tmp struct { + AsUsurped Hash `json:"usurped"` + } + tmp.AsUsurped = e.AsUsurped + return json.Marshal(tmp) + } + return nil, fmt.Errorf("cannot marshal ExtrinsicStatus, got %#v", e) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/generic.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/generic.go new file mode 100644 index 000000000..84524c731 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/generic.go @@ -0,0 +1,48 @@ +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +type Option[T any] struct { + hasValue bool + value T +} + +func NewOption[T any](t T) Option[T] { + return Option[T]{hasValue: true, value: t} +} + +func NewEmptyOption[T any]() Option[T] { + return Option[T]{hasValue: false} +} + +func (o *Option[T]) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +func (o Option[T]) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +// SetSome sets a value +func (o *Option[T]) SetSome(value T) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *Option[T]) SetNone() { + o.hasValue = false + + var val T + + o.value = val +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o *Option[T]) Unwrap() (ok bool, value T) { + return o.hasValue, o.value +} + +func (o *Option[T]) HasValue() bool { + return o.hasValue +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/hash.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/hash.go new file mode 100644 index 000000000..eb790c0f7 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/hash.go @@ -0,0 +1,114 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "encoding/json" + "fmt" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/codec" +) + +// H160 is a hash containing 160 bits (20 bytes), typically used in blocks, extrinsics and as a sane default +type H160 [20]byte + +// NewH160 creates a new H160 type +func NewH160(b []byte) H160 { + h := H160{} + copy(h[:], b) + return h +} + +// Hex returns a hex string representation of the value (not of the encoded value) +func (h H160) Hex() string { + return fmt.Sprintf("%#x", h[:]) +} + +// H256 is a hash containing 256 bits (32 bytes), typically used in blocks, extrinsics and as a sane default +type H256 [32]byte + +// NewH256 creates a new H256 type +func NewH256(b []byte) H256 { + h := H256{} + copy(h[:], b) + return h +} + +// Hex returns a hex string representation of the value (not of the encoded value) +func (h H256) Hex() string { + return fmt.Sprintf("%#x", h[:]) +} + +// H512 is a hash containing 512 bits (64 bytes), typically used for signature +type H512 [64]byte + +// NewH512 creates a new H512 type +func NewH512(b []byte) H512 { + h := H512{} + copy(h[:], b) + return h +} + +// Hex returns a hex string representation of the value (not of the encoded value) +func (h H512) Hex() string { + return fmt.Sprintf("%#x", h[:]) +} + +// Hash is the default hash that is used across the system. It is just a thin wrapper around H256 +type Hash H256 + +// NewHash creates a new Hash type +func NewHash(b []byte) Hash { + h := Hash{} + copy(h[:], b) + return h +} + +// NewHashFromHexString creates a new Hash type from a hex string +func NewHashFromHexString(s string) (Hash, error) { + bz, err := codec.HexDecodeString(s) + if err != nil { + return Hash{}, err + } + + if len(bz) != 32 { + return Hash{}, fmt.Errorf("required result to be 32 bytes, but got %v", len(bz)) + } + + return NewHash(bz), nil +} + +// Hex returns a hex string representation of the value (not of the encoded value) +func (h Hash) Hex() string { + return fmt.Sprintf("%#x", h[:]) +} + +// UnmarshalJSON fills h with the JSON encoded byte array given by b +func (h *Hash) UnmarshalJSON(b []byte) error { + var tmp string + err := json.Unmarshal(b, &tmp) + if err != nil { + return err + } + *h, err = NewHashFromHexString(tmp) + return err +} + +// MarshalJSON returns a JSON encoded byte array of h +func (h Hash) MarshalJSON() ([]byte, error) { + return json.Marshal(h.Hex()) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/header.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/header.go new file mode 100644 index 000000000..45dcca5d0 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/header.go @@ -0,0 +1,71 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "encoding/json" + "math/big" + "strconv" + "strings" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +type Header struct { + ParentHash Hash `json:"parentHash"` + Number BlockNumber `json:"number"` + StateRoot Hash `json:"stateRoot"` + ExtrinsicsRoot Hash `json:"extrinsicsRoot"` + Digest Digest `json:"digest"` +} + +type BlockNumber U32 + +// UnmarshalJSON fills BlockNumber with the JSON encoded byte array given by bz +func (b *BlockNumber) UnmarshalJSON(bz []byte) error { + var tmp string + if err := json.Unmarshal(bz, &tmp); err != nil { + return err + } + + s := strings.TrimPrefix(tmp, "0x") + + p, err := strconv.ParseUint(s, 16, 32) + *b = BlockNumber(p) + return err +} + +// MarshalJSON returns a JSON encoded byte array of BlockNumber +func (b BlockNumber) MarshalJSON() ([]byte, error) { + s := strconv.FormatUint(uint64(b), 16) + return json.Marshal(s) +} + +// Encode implements encoding for BlockNumber, which just unwraps the bytes of BlockNumber +func (b BlockNumber) Encode(encoder scale.Encoder) error { + return encoder.EncodeUintCompact(*big.NewInt(0).SetUint64(uint64(b))) +} + +// Decode implements decoding for BlockNumber, which just wraps the bytes in BlockNumber +func (b *BlockNumber) Decode(decoder scale.Decoder) error { + u, err := decoder.DecodeUintCompact() + if err != nil { + return err + } + *b = BlockNumber(u.Uint64()) + return err +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/health.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/health.go new file mode 100644 index 000000000..0edbd97aa --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/health.go @@ -0,0 +1,24 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +// Health contains the status of a node +type Health struct { + Peers U64 + IsSyncing bool + ShouldHavePeers bool +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/hrmp.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/hrmp.go new file mode 100644 index 000000000..e280060e6 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/hrmp.go @@ -0,0 +1,40 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +type HRMPChannelID struct { + Sender U32 + Recipient U32 +} + +func (h *HRMPChannelID) Decode(decoder scale.Decoder) error { + if err := decoder.Decode(&h.Sender); err != nil { + return err + } + + return decoder.Decode(&h.Recipient) +} + +func (h HRMPChannelID) Encode(encoder scale.Encoder) error { + if err := encoder.Encode(h.Sender); err != nil { + return err + } + + return encoder.Encode(h.Recipient) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/int.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/int.go new file mode 100644 index 000000000..0af4823ec --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/int.go @@ -0,0 +1,280 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "encoding/json" + "fmt" + "math/big" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +// I8 is a signed 8-bit integer +type I8 int8 + +// NewI8 creates a new I8 type +func NewI8(i int8) I8 { + return I8(i) +} + +// UnmarshalJSON fills i with the JSON encoded byte array given by b +func (i *I8) UnmarshalJSON(b []byte) error { + var tmp int8 + if err := json.Unmarshal(b, &tmp); err != nil { + return err + } + *i = I8(tmp) + return nil +} + +// MarshalJSON returns a JSON encoded byte array of i +func (i I8) MarshalJSON() ([]byte, error) { + return json.Marshal(int8(i)) +} + +// I16 is a signed 16-bit integer +type I16 int16 + +// NewI16 creates a new I16 type +func NewI16(i int16) I16 { + return I16(i) +} + +// UnmarshalJSON fills i with the JSON encoded byte array given by b +func (i *I16) UnmarshalJSON(b []byte) error { + var tmp int16 + if err := json.Unmarshal(b, &tmp); err != nil { + return err + } + *i = I16(tmp) + return nil +} + +// MarshalJSON returns a JSON encoded byte array of i +func (i I16) MarshalJSON() ([]byte, error) { + return json.Marshal(int16(i)) +} + +// I32 is a signed 32-bit integer +type I32 int32 + +// NewI32 creates a new I32 type +func NewI32(i int32) I32 { + return I32(i) +} + +// UnmarshalJSON fills i with the JSON encoded byte array given by b +func (i *I32) UnmarshalJSON(b []byte) error { + var tmp int32 + if err := json.Unmarshal(b, &tmp); err != nil { + return err + } + *i = I32(tmp) + return nil +} + +// MarshalJSON returns a JSON encoded byte array of i +func (i I32) MarshalJSON() ([]byte, error) { + return json.Marshal(int32(i)) +} + +// I64 is a signed 64-bit integer +type I64 int64 + +// NewI64 creates a new I64 type +func NewI64(i int64) I64 { + return I64(i) +} + +// UnmarshalJSON fills i with the JSON encoded byte array given by b +func (i *I64) UnmarshalJSON(b []byte) error { + var tmp int64 + if err := json.Unmarshal(b, &tmp); err != nil { + return err + } + *i = I64(tmp) + return nil +} + +// MarshalJSON returns a JSON encoded byte array of i +func (i I64) MarshalJSON() ([]byte, error) { + return json.Marshal(int64(i)) +} + +// I128 is a signed 128-bit integer, it is represented as a big.Int in Go. +type I128 struct { + *big.Int +} + +// NewI128 creates a new I128 type +func NewI128(i big.Int) I128 { + return I128{&i} +} + +// Decode implements decoding as per the Scale specification +func (i *I128) Decode(decoder scale.Decoder) error { + bs := make([]byte, 16) + err := decoder.Read(bs) + if err != nil { + return err + } + // reverse bytes, scale uses little-endian encoding, big.int's bytes are expected in big-endian + scale.Reverse(bs) + + b, err := IntBytesToBigInt(bs) + if err != nil { + return err + } + + // deal with zero differently to get a nil representation (this is how big.Int deals with 0) + if b.Sign() == 0 { + *i = I128{big.NewInt(0)} + return nil + } + + *i = I128{b} + return nil +} + +// Encode implements encoding as per the Scale specification +func (i I128) Encode(encoder scale.Encoder) error { + b, err := BigIntToIntBytes(i.Int, 16) + if err != nil { + return err + } + + // reverse bytes, scale uses little-endian encoding, big.int's bytes are expected in big-endian + scale.Reverse(b) + + return encoder.Write(b) +} + +// I256 is a signed 256-bit integer, it is represented as a big.Int in Go. +type I256 struct { + *big.Int +} + +// NewI256 creates a new I256 type +func NewI256(i big.Int) I256 { + return I256{&i} +} + +// Decode implements decoding as per the Scale specification +func (i *I256) Decode(decoder scale.Decoder) error { + bs := make([]byte, 32) + err := decoder.Read(bs) + if err != nil { + return err + } + // reverse bytes, scale uses little-endian encoding, big.int's bytes are expected in big-endian + scale.Reverse(bs) + + b, err := IntBytesToBigInt(bs) + if err != nil { + return err + } + + // deal with zero differently to get a nil representation (this is how big.Int deals with 0) + if b.Sign() == 0 { + *i = I256{big.NewInt(0)} + return nil + } + + *i = I256{b} + return nil +} + +// Encode implements encoding as per the Scale specification +func (i I256) Encode(encoder scale.Encoder) error { + b, err := BigIntToIntBytes(i.Int, 32) + if err != nil { + return err + } + + // reverse bytes, scale uses little-endian encoding, big.int's bytes are expected in big-endian + scale.Reverse(b) + + return encoder.Write(b) +} + +// BigIntToIntBytes encodes the given big.Int to a big endian encoded signed integer byte slice of the given byte +// length, using a two's complement if the big.Int is negative and returning an error if the given big.Int would be +// bigger than the maximum positive (negative) numbers the byte slice of the given length could hold +func BigIntToIntBytes(i *big.Int, bytelen int) ([]byte, error) { + res := make([]byte, bytelen) + + maxNeg := big.NewInt(0).Exp(big.NewInt(2), big.NewInt(int64(bytelen*8-1)), nil) + maxPos := big.NewInt(0).Sub(maxNeg, big.NewInt(1)) + + if i.Sign() >= 0 { + if i.CmpAbs(maxPos) > 0 { + return nil, fmt.Errorf("cannot encode big.Int to []byte: given big.Int exceeds highest positive number "+ + "%v for an int with %v bits", maxPos, bytelen*8) + } + + bs := i.Bytes() + copy(res[len(res)-len(bs):], bs) + return res, nil + } + + // negative, two's complement + + if i.CmpAbs(maxNeg) > 0 { + return nil, fmt.Errorf("cannot encode big.Int to []byte: given big.Int exceeds highest negative number -"+ + "%v for an int with %v bits", maxNeg, bytelen*8) + } + + i = big.NewInt(0).Add(i, big.NewInt(1)) + bs := i.Bytes() + copy(res[len(res)-len(bs):], bs) + + // apply not to every byte + for j, b := range res { + res[j] = ^b + } + + return res, nil +} + +// IntBytesToBigInt decodes the given byte slice containing a big endian encoded signed integer to a big.Int, using a +// two's complement if the most significant bit is 1 +func IntBytesToBigInt(b []byte) (*big.Int, error) { + if len(b) == 0 { + return nil, fmt.Errorf("cannot decode an empty byte slice") + } + + if b[0]&0x80 == 0x00 { + // positive + return big.NewInt(0).SetBytes(b), nil + } + + // negative, two's complement + t := make([]byte, len(b)) + copy(t, b) + + // apply not to every byte + for j, b := range b { + t[j] = ^b + } + + res := big.NewInt(0).SetBytes(t) + res = res.Add(res, big.NewInt(1)) + res = res.Neg(res) + + return res, nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/item_details.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/item_details.go new file mode 100644 index 000000000..ddece78a4 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/item_details.go @@ -0,0 +1,54 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +type ItemDetails struct { + Owner AccountID + Approved OptionAccountID + IsFrozen bool + Deposit U128 +} + +func (i *ItemDetails) Decode(decoder scale.Decoder) error { + if err := decoder.Decode(&i.Owner); err != nil { + return err + } + if err := decoder.Decode(&i.Approved); err != nil { + return err + } + if err := decoder.Decode(&i.IsFrozen); err != nil { + return err + } + + return decoder.Decode(&i.Deposit) +} + +func (i ItemDetails) Encode(encoder scale.Encoder) error { + if err := encoder.Encode(i.Owner); err != nil { + return err + } + if err := encoder.Encode(i.Approved); err != nil { + return err + } + if err := encoder.Encode(i.IsFrozen); err != nil { + return err + } + + return encoder.Encode(i.Deposit) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/item_metadata.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/item_metadata.go new file mode 100644 index 000000000..b5aa89d5f --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/item_metadata.go @@ -0,0 +1,49 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +type ItemMetadata struct { + Deposit U128 + Data Bytes + IsFrozen bool +} + +func (i *ItemMetadata) Decode(decoder scale.Decoder) error { + if err := decoder.Decode(&i.Deposit); err != nil { + return err + } + + if err := decoder.Decode(&i.Data); err != nil { + return err + } + + return decoder.Decode(&i.IsFrozen) +} + +func (i ItemMetadata) Encode(encoder scale.Encoder) error { + if err := encoder.Encode(i.Deposit); err != nil { + return err + } + + if err := encoder.Encode(i.Data); err != nil { + return err + } + + return encoder.Encode(i.IsFrozen) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/junction_v0.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/junction_v0.go new file mode 100644 index 000000000..5ef142f7a --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/junction_v0.go @@ -0,0 +1,192 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +type JunctionV0 struct { + IsParent bool + + IsParachain bool + ParachainID U32 + + IsAccountID32 bool + AccountID32NetworkID NetworkID + AccountID []U8 + + IsAccountIndex64 bool + AccountIndex64NetworkID NetworkID + AccountIndex U64 + + IsAccountKey20 bool + AccountKey20NetworkID NetworkID + AccountKey []U8 + + IsPalletInstance bool + PalletIndex U8 + + IsGeneralIndex bool + GeneralIndex U128 + + IsGeneralKey bool + GeneralKey []U8 + + IsOnlyChild bool + + IsPlurality bool + PluralityID BodyID + PluralityPart BodyPart +} + +func (j *JunctionV0) Decode(decoder scale.Decoder) error { //nolint:funlen + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + j.IsParent = true + case 1: + j.IsParachain = true + + return decoder.Decode(&j.ParachainID) + case 2: + j.IsAccountID32 = true + + if err := decoder.Decode(&j.AccountID32NetworkID); err != nil { + return err + } + + return decoder.Decode(&j.AccountID) + case 3: + j.IsAccountIndex64 = true + + if err := decoder.Decode(&j.AccountIndex64NetworkID); err != nil { + return err + } + + return decoder.Decode(&j.AccountIndex) + case 4: + j.IsAccountKey20 = true + + if err := decoder.Decode(&j.AccountKey20NetworkID); err != nil { + return err + } + + return decoder.Decode(&j.AccountKey) + case 5: + j.IsPalletInstance = true + + return decoder.Decode(&j.PalletIndex) + case 6: + j.IsGeneralIndex = true + + return decoder.Decode(&j.GeneralIndex) + case 7: + j.IsGeneralKey = true + + return decoder.Decode(&j.GeneralKey) + case 8: + j.IsOnlyChild = true + case 9: + j.IsPlurality = true + + if err := decoder.Decode(&j.PluralityID); err != nil { + return err + } + + return decoder.Decode(&j.PluralityPart) + } + + return nil +} + +func (j JunctionV0) Encode(encoder scale.Encoder) error { //nolint:funlen + switch { + case j.IsParent: + return encoder.PushByte(0) + case j.IsParachain: + if err := encoder.PushByte(1); err != nil { + return err + } + + return encoder.Encode(j.ParachainID) + case j.IsAccountID32: + if err := encoder.PushByte(2); err != nil { + return err + } + + if err := encoder.Encode(j.AccountID32NetworkID); err != nil { + return err + } + + return encoder.Encode(j.AccountID) + case j.IsAccountIndex64: + if err := encoder.PushByte(3); err != nil { + return err + } + + if err := encoder.Encode(j.AccountIndex64NetworkID); err != nil { + return err + } + + return encoder.Encode(j.AccountIndex) + case j.IsAccountKey20: + if err := encoder.PushByte(4); err != nil { + return err + } + + if err := encoder.Encode(j.AccountKey20NetworkID); err != nil { + return err + } + + return encoder.Encode(j.AccountKey) + case j.IsPalletInstance: + if err := encoder.PushByte(5); err != nil { + return err + } + + return encoder.Encode(j.PalletIndex) + case j.IsGeneralIndex: + if err := encoder.PushByte(6); err != nil { + return err + } + + return encoder.Encode(j.GeneralIndex) + case j.IsGeneralKey: + if err := encoder.PushByte(7); err != nil { + return err + } + + return encoder.Encode(j.GeneralKey) + case j.IsOnlyChild: + return encoder.PushByte(8) + case j.IsPlurality: + if err := encoder.PushByte(9); err != nil { + return err + } + + if err := encoder.Encode(j.PluralityID); err != nil { + return err + } + + return encoder.Encode(j.PluralityPart) + } + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/junction_v1.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/junction_v1.go new file mode 100644 index 000000000..5132940ed --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/junction_v1.go @@ -0,0 +1,319 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +type JunctionV1 struct { + IsParachain bool + ParachainID UCompact + + IsAccountID32 bool + AccountID32NetworkID NetworkID + AccountID []U8 + + IsAccountIndex64 bool + AccountIndex64NetworkID NetworkID + AccountIndex U64 + + IsAccountKey20 bool + AccountKey20NetworkID NetworkID + AccountKey []U8 + + IsPalletInstance bool + PalletIndex U8 + + IsGeneralIndex bool + GeneralIndex U128 + + IsGeneralKey bool + GeneralKey []U8 + + IsOnlyChild bool + + IsPlurality bool + BodyID BodyID + BodyPart BodyPart +} + +func (j *JunctionV1) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + j.IsParachain = true + + return decoder.Decode(&j.ParachainID) + case 1: + j.IsAccountID32 = true + + if err := decoder.Decode(&j.AccountID32NetworkID); err != nil { + return nil + } + + return decoder.Decode(&j.AccountID) + case 2: + j.IsAccountIndex64 = true + + if err := decoder.Decode(&j.AccountIndex64NetworkID); err != nil { + return nil + } + + return decoder.Decode(&j.AccountIndex) + case 3: + j.IsAccountKey20 = true + + if err := decoder.Decode(&j.AccountKey20NetworkID); err != nil { + return nil + } + + return decoder.Decode(&j.AccountKey) + case 4: + j.IsPalletInstance = true + + return decoder.Decode(&j.PalletIndex) + case 5: + j.IsGeneralIndex = true + + return decoder.Decode(&j.GeneralIndex) + case 6: + j.IsGeneralKey = true + + return decoder.Decode(&j.GeneralKey) + case 7: + j.IsOnlyChild = true + case 8: + j.IsPlurality = true + + if err := decoder.Decode(&j.BodyID); err != nil { + return err + } + + return decoder.Decode(&j.BodyPart) + } + + return nil +} + +func (j JunctionV1) Encode(encoder scale.Encoder) error { //nolint:funlen + switch { + case j.IsParachain: + if err := encoder.PushByte(0); err != nil { + return err + } + + return encoder.Encode(j.ParachainID) + case j.IsAccountID32: + if err := encoder.PushByte(1); err != nil { + return err + } + + if err := encoder.Encode(j.AccountID32NetworkID); err != nil { + return err + } + + return encoder.Encode(j.AccountID) + case j.IsAccountIndex64: + if err := encoder.PushByte(2); err != nil { + return err + } + + if err := encoder.Encode(j.AccountIndex64NetworkID); err != nil { + return err + } + + return encoder.Encode(j.AccountIndex) + case j.IsAccountKey20: + if err := encoder.PushByte(3); err != nil { + return err + } + + if err := encoder.Encode(j.AccountKey20NetworkID); err != nil { + return err + } + + return encoder.Encode(j.AccountKey) + case j.IsPalletInstance: + if err := encoder.PushByte(4); err != nil { + return err + } + + return encoder.Encode(j.PalletIndex) + case j.IsGeneralIndex: + if err := encoder.PushByte(5); err != nil { + return err + } + + return encoder.Encode(j.GeneralIndex) + case j.IsGeneralKey: + if err := encoder.PushByte(6); err != nil { + return err + } + + return encoder.Encode(j.GeneralKey) + case j.IsOnlyChild: + return encoder.PushByte(7) + case j.IsPlurality: + if err := encoder.PushByte(8); err != nil { + return err + } + + if err := encoder.Encode(j.BodyID); err != nil { + return err + } + + return encoder.Encode(j.BodyPart) + } + + return nil +} + +type JunctionsV1 struct { + IsHere bool + + IsX1 bool + X1 JunctionV1 + + IsX2 bool + X2 [2]JunctionV1 + + IsX3 bool + X3 [3]JunctionV1 + + IsX4 bool + X4 [4]JunctionV1 + + IsX5 bool + X5 [5]JunctionV1 + + IsX6 bool + X6 [6]JunctionV1 + + IsX7 bool + X7 [7]JunctionV1 + + IsX8 bool + X8 [8]JunctionV1 +} + +func (j *JunctionsV1) Decode(decoder scale.Decoder) error { //nolint:dupl + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + j.IsHere = true + case 1: + j.IsX1 = true + + return decoder.Decode(&j.X1) + case 2: + j.IsX2 = true + + return decoder.Decode(&j.X2) + case 3: + j.IsX3 = true + + return decoder.Decode(&j.X3) + case 4: + j.IsX4 = true + + return decoder.Decode(&j.X4) + case 5: + j.IsX5 = true + + return decoder.Decode(&j.X5) + case 6: + j.IsX6 = true + + return decoder.Decode(&j.X6) + case 7: + j.IsX7 = true + + return decoder.Decode(&j.X7) + case 8: + j.IsX8 = true + + return decoder.Decode(&j.X8) + } + + return nil +} + +func (j JunctionsV1) Encode(encoder scale.Encoder) error { + switch { + case j.IsHere: + return encoder.PushByte(0) + case j.IsX1: + if err := encoder.PushByte(1); err != nil { + return err + } + + return encoder.Encode(j.X1) + case j.IsX2: + if err := encoder.PushByte(2); err != nil { + return err + } + + return encoder.Encode(j.X2) + case j.IsX3: + if err := encoder.PushByte(3); err != nil { + return err + } + + return encoder.Encode(j.X3) + case j.IsX4: + if err := encoder.PushByte(4); err != nil { + return err + } + + return encoder.Encode(j.X4) + case j.IsX5: + if err := encoder.PushByte(5); err != nil { + return err + } + + return encoder.Encode(j.X5) + case j.IsX6: + if err := encoder.PushByte(6); err != nil { + return err + } + + return encoder.Encode(j.X6) + case j.IsX7: + if err := encoder.PushByte(7); err != nil { + return err + } + + return encoder.Encode(j.X7) + case j.IsX8: + if err := encoder.PushByte(8); err != nil { + return err + } + + return encoder.Encode(j.X8) + } + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/lottery_call_index.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/lottery_call_index.go new file mode 100644 index 000000000..249748255 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/lottery_call_index.go @@ -0,0 +1,52 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +type LotteryCallIndex struct { + PalletIndex U8 + CallIndex U8 +} + +func (m *LotteryCallIndex) Decode(decoder scale.Decoder) error { + err := decoder.Decode(&m.PalletIndex) + if err != nil { + return err + } + + err = decoder.Decode(&m.CallIndex) + if err != nil { + return err + } + + return nil +} + +func (m LotteryCallIndex) Encode(encoder scale.Encoder) error { + err := encoder.Encode(m.PalletIndex) + if err != nil { + return err + } + + err = encoder.Encode(m.CallIndex) + if err != nil { + return err + } + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/metadata.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadata.go new file mode 100644 index 000000000..11a3205a5 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadata.go @@ -0,0 +1,355 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "fmt" + "hash" + "strings" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/xxhash" +) + +const MagicNumber uint32 = 0x6174656d + +// Modelled after https://github.com/paritytech/substrate/blob/v1.0.0rc2/srml/metadata/src/lib.rs + +type Metadata struct { + MagicNumber uint32 + // The version in use + Version uint8 + + // The right metadata version should be used based on the + // version defined above. + + AsMetadataV4 MetadataV4 + AsMetadataV7 MetadataV7 + AsMetadataV8 MetadataV8 + AsMetadataV9 MetadataV9 + AsMetadataV10 MetadataV10 + AsMetadataV11 MetadataV11 + AsMetadataV12 MetadataV12 + AsMetadataV13 MetadataV13 + AsMetadataV14 MetadataV14 +} + +type StorageEntryMetadata interface { + // Check whether the entry is a plain type + IsPlain() bool + // Get the hasher to store the plain type + Hasher() (hash.Hash, error) + + // Check whether the entry is a map type. + // Since v14, a Map is the union of the old Map, DoubleMap, and NMap. + IsMap() bool + // Get the hashers of the map keys. It should contain one hash per key. + Hashers() ([]hash.Hash, error) +} + +func NewMetadataV4() *Metadata { + return &Metadata{Version: 4, AsMetadataV4: MetadataV4{make([]ModuleMetadataV4, 0)}} +} + +func NewMetadataV7() *Metadata { + return &Metadata{Version: 7, AsMetadataV7: MetadataV7{make([]ModuleMetadataV7, 0)}} +} + +func NewMetadataV8() *Metadata { + return &Metadata{Version: 8, AsMetadataV8: MetadataV8{make([]ModuleMetadataV8, 0)}} +} + +func NewMetadataV9() *Metadata { + return &Metadata{Version: 9, AsMetadataV9: MetadataV9{make([]ModuleMetadataV8, 0)}} +} + +func NewMetadataV10() *Metadata { + return &Metadata{Version: 10, AsMetadataV10: MetadataV10{make([]ModuleMetadataV10, 0)}} +} + +func NewMetadataV11() *Metadata { + return &Metadata{ + Version: 11, + AsMetadataV11: MetadataV11{MetadataV10: MetadataV10{Modules: make([]ModuleMetadataV10, 0)}}, + } +} + +func NewMetadataV12() *Metadata { + return &Metadata{ + Version: 12, + AsMetadataV12: MetadataV12{Modules: make([]ModuleMetadataV12, 0)}, + } +} + +func NewMetadataV13() *Metadata { + return &Metadata{ + Version: 13, + AsMetadataV13: MetadataV13{Modules: make([]ModuleMetadataV13, 0)}, + } +} + +func NewMetadataV14() *Metadata { + return &Metadata{ + Version: 14, + AsMetadataV14: MetadataV14{Pallets: make([]PalletMetadataV14, 0)}, + } +} + +func (m *Metadata) Decode(decoder scale.Decoder) error { + err := decoder.Decode(&m.MagicNumber) + if err != nil { + return err + } + if m.MagicNumber != MagicNumber { + return fmt.Errorf("magic number mismatch: expected %#x, found %#x", MagicNumber, m.MagicNumber) + } + + err = decoder.Decode(&m.Version) + if err != nil { + return err + } + + switch m.Version { + case 4: + err = decoder.Decode(&m.AsMetadataV4) + case 7: + err = decoder.Decode(&m.AsMetadataV7) + case 8: + err = decoder.Decode(&m.AsMetadataV8) + case 9: + err = decoder.Decode(&m.AsMetadataV9) + case 10: + err = decoder.Decode(&m.AsMetadataV10) + case 11: + err = decoder.Decode(&m.AsMetadataV11) + case 12: + err = decoder.Decode(&m.AsMetadataV12) + case 13: + err = decoder.Decode(&m.AsMetadataV13) + case 14: + err = decoder.Decode(&m.AsMetadataV14) + default: + return fmt.Errorf("unsupported metadata version %v", m.Version) + } + + return err +} + +func (m Metadata) Encode(encoder scale.Encoder) error { + err := encoder.Encode(m.MagicNumber) + if err != nil { + return err + } + + err = encoder.Encode(m.Version) + if err != nil { + return err + } + + switch m.Version { + case 4: + err = encoder.Encode(m.AsMetadataV4) + case 7: + err = encoder.Encode(m.AsMetadataV7) + case 8: + err = encoder.Encode(m.AsMetadataV8) + case 9: + err = encoder.Encode(m.AsMetadataV9) + case 10: + err = encoder.Encode(m.AsMetadataV10) + case 11: + err = encoder.Encode(m.AsMetadataV11) + case 12: + err = encoder.Encode(m.AsMetadataV12) + case 13: + err = encoder.Encode(m.AsMetadataV13) + case 14: + err = encoder.Encode(m.AsMetadataV14) + default: + return fmt.Errorf("unsupported metadata version %v", m.Version) + } + + return err +} + +type MetadataError struct { + Name string + Value string +} + +const ( + metadataErrorValueSeparator = ", " +) + +func NewMetadataError(variant Si1Variant) *MetadataError { + var docs []string + + for _, doc := range variant.Docs { + docs = append(docs, string(doc)) + } + + return &MetadataError{ + Name: string(variant.Name), + Value: strings.Join(docs, metadataErrorValueSeparator), + } +} + +func (m *Metadata) FindError(moduleIndex U8, errorIndex [4]U8) (*MetadataError, error) { + if m.Version != 14 { + return nil, fmt.Errorf("invalid metadata version %d", m.Version) + } + + return m.AsMetadataV14.FindError(moduleIndex, errorIndex) +} + +func (m *Metadata) FindConstantValue(module string, constantName string) ([]byte, error) { + txtModule := Text(module) + txtConstantName := Text(constantName) + + switch m.Version { + case 4: + return m.AsMetadataV4.FindConstantValue(txtModule, txtConstantName) + case 7: + return m.AsMetadataV7.FindConstantValue(txtModule, txtConstantName) + case 8: + return m.AsMetadataV8.FindConstantValue(txtModule, txtConstantName) + case 9: + return m.AsMetadataV9.FindConstantValue(txtModule, txtConstantName) + case 10: + return m.AsMetadataV10.FindConstantValue(txtModule, txtConstantName) + case 11: + return m.AsMetadataV11.FindConstantValue(txtModule, txtConstantName) + case 12: + return m.AsMetadataV12.FindConstantValue(txtModule, txtConstantName) + case 13: + return m.AsMetadataV13.FindConstantValue(txtModule, txtConstantName) + case 14: + return m.AsMetadataV14.FindConstantValue(txtModule, txtConstantName) + default: + return nil, fmt.Errorf("unsupported metadata version") + } +} + +func (m *Metadata) FindCallIndex(call string) (CallIndex, error) { + switch m.Version { + case 4: + return m.AsMetadataV4.FindCallIndex(call) + case 7: + return m.AsMetadataV7.FindCallIndex(call) + case 8: + return m.AsMetadataV8.FindCallIndex(call) + case 9: + return m.AsMetadataV9.FindCallIndex(call) + case 10: + return m.AsMetadataV10.FindCallIndex(call) + case 11: + return m.AsMetadataV11.FindCallIndex(call) + case 12: + return m.AsMetadataV12.FindCallIndex(call) + case 13: + return m.AsMetadataV13.FindCallIndex(call) + case 14: + return m.AsMetadataV14.FindCallIndex(call) + default: + return CallIndex{}, fmt.Errorf("unsupported metadata version") + } +} + +func (m *Metadata) FindEventNamesForEventID(eventID EventID) (Text, Text, error) { + switch m.Version { + case 4: + return m.AsMetadataV4.FindEventNamesForEventID(eventID) + case 7: + return m.AsMetadataV7.FindEventNamesForEventID(eventID) + case 8: + return m.AsMetadataV8.FindEventNamesForEventID(eventID) + case 9: + return m.AsMetadataV9.FindEventNamesForEventID(eventID) + case 10: + return m.AsMetadataV10.FindEventNamesForEventID(eventID) + case 11: + return m.AsMetadataV11.FindEventNamesForEventID(eventID) + case 12: + return m.AsMetadataV12.FindEventNamesForEventID(eventID) + case 13: + return m.AsMetadataV13.FindEventNamesForEventID(eventID) + case 14: + return m.AsMetadataV14.FindEventNamesForEventID(eventID) + default: + return "", "", fmt.Errorf("unsupported metadata version") + } +} + +func (m *Metadata) FindStorageEntryMetadata(module string, fn string) (StorageEntryMetadata, error) { + switch m.Version { + case 4: + return m.AsMetadataV4.FindStorageEntryMetadata(module, fn) + case 7: + return m.AsMetadataV7.FindStorageEntryMetadata(module, fn) + case 8: + return m.AsMetadataV8.FindStorageEntryMetadata(module, fn) + case 9: + return m.AsMetadataV9.FindStorageEntryMetadata(module, fn) + case 10: + return m.AsMetadataV10.FindStorageEntryMetadata(module, fn) + case 11: + return m.AsMetadataV11.FindStorageEntryMetadata(module, fn) + case 12: + return m.AsMetadataV12.FindStorageEntryMetadata(module, fn) + case 13: + return m.AsMetadataV13.FindStorageEntryMetadata(module, fn) + case 14: + return m.AsMetadataV14.FindStorageEntryMetadata(module, fn) + default: + return nil, fmt.Errorf("unsupported metadata version") + } +} + +func (m *Metadata) ExistsModuleMetadata(module string) bool { + switch m.Version { + case 4: + return m.AsMetadataV4.ExistsModuleMetadata(module) + case 7: + return m.AsMetadataV7.ExistsModuleMetadata(module) + case 8: + return m.AsMetadataV8.ExistsModuleMetadata(module) + case 9: + return m.AsMetadataV9.ExistsModuleMetadata(module) + case 10: + return m.AsMetadataV10.ExistsModuleMetadata(module) + case 11: + return m.AsMetadataV11.ExistsModuleMetadata(module) + case 12: + return m.AsMetadataV12.ExistsModuleMetadata(module) + case 13: + return m.AsMetadataV13.ExistsModuleMetadata(module) + case 14: + return m.AsMetadataV14.ExistsModuleMetadata(module) + default: + return false + } +} + +// Default implementation of Hasher() for a Storage entry +// It fails when called if entry is not a plain type. +func DefaultPlainHasher(entry StorageEntryMetadata) (hash.Hash, error) { + if entry.IsPlain() { + return xxhash.New128(nil), nil + } + + return nil, fmt.Errorf("Hasher() is only to be called on a Plain entry") +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV10.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV10.go new file mode 100644 index 000000000..04d165b8c --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV10.go @@ -0,0 +1,451 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "errors" + "fmt" + "hash" + "strings" + + ghash "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/hash" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/xxhash" +) + +// Modelled after packages/types/src/Metadata/v10/Metadata.ts +type MetadataV10 struct { + Modules []ModuleMetadataV10 +} + +func (m *MetadataV10) Decode(decoder scale.Decoder) error { + err := decoder.Decode(&m.Modules) + if err != nil { + return err + } + return nil +} + +func (m MetadataV10) Encode(encoder scale.Encoder) error { + err := encoder.Encode(m.Modules) + if err != nil { + return err + } + return nil +} + +func (m *MetadataV10) FindCallIndex(call string) (CallIndex, error) { + s := strings.Split(call, ".") + mi := uint8(0) + for _, mod := range m.Modules { + if !mod.HasCalls { + continue + } + if string(mod.Name) != s[0] { + mi++ + continue + } + for ci, f := range mod.Calls { + if string(f.Name) == s[1] { + return CallIndex{mi, uint8(ci)}, nil + } + } + return CallIndex{}, fmt.Errorf("method %v not found within module %v for call %v", s[1], mod.Name, call) + } + return CallIndex{}, fmt.Errorf("module %v not found in metadata for call %v", s[0], call) +} + +func (m *MetadataV10) FindEventNamesForEventID(eventID EventID) (Text, Text, error) { + mi := uint8(0) + for _, mod := range m.Modules { + if !mod.HasEvents { + continue + } + if mi != eventID[0] { + mi++ + continue + } + if int(eventID[1]) >= len(mod.Events) { + return "", "", fmt.Errorf("event index %v for module %v out of range", eventID[1], mod.Name) + } + return mod.Name, mod.Events[eventID[1]].Name, nil + } + return "", "", fmt.Errorf("module index %v out of range", eventID[0]) +} + +func (m *MetadataV10) FindConstantValue(module Text, constant Text) ([]byte, error) { + for _, mod := range m.Modules { + if mod.Name == module { + value, err := mod.FindConstantValue(constant) + if err == nil { + return value, nil + } + } + } + return nil, fmt.Errorf("could not find constant %s.%s", module, constant) +} + +func (m *MetadataV10) FindStorageEntryMetadata(module string, fn string) (StorageEntryMetadata, error) { + for _, mod := range m.Modules { + if !mod.HasStorage { + continue + } + if string(mod.Storage.Prefix) != module { + continue + } + for _, s := range mod.Storage.Items { + if string(s.Name) != fn { + continue + } + return s, nil + } + return nil, fmt.Errorf("storage %v not found within module %v", fn, module) + } + return nil, fmt.Errorf("module %v not found in metadata", module) +} + +func (m *MetadataV10) ExistsModuleMetadata(module string) bool { + for _, mod := range m.Modules { + if string(mod.Name) == module { + return true + } + } + return false +} + +type ModuleMetadataV10 struct { + Name Text + HasStorage bool + Storage StorageMetadataV10 + HasCalls bool + Calls []FunctionMetadataV4 + HasEvents bool + Events []EventMetadataV4 + Constants []ModuleConstantMetadataV6 + Errors []ErrorMetadataV8 +} + +func (m *ModuleMetadataV10) Decode(decoder scale.Decoder) error { + err := decoder.Decode(&m.Name) + if err != nil { + return err + } + + err = decoder.DecodeOption(&m.HasStorage, &m.Storage) + if err != nil { + return err + } + + err = decoder.DecodeOption(&m.HasCalls, &m.Calls) + if err != nil { + return err + } + + err = decoder.DecodeOption(&m.HasEvents, &m.Events) + if err != nil { + return err + } + + err = decoder.Decode(&m.Constants) + if err != nil { + return err + } + + return decoder.Decode(&m.Errors) +} + +func (m ModuleMetadataV10) Encode(encoder scale.Encoder) error { + err := encoder.Encode(m.Name) + if err != nil { + return err + } + + err = encoder.EncodeOption(m.HasStorage, m.Storage) + if err != nil { + return err + } + + err = encoder.EncodeOption(m.HasCalls, m.Calls) + if err != nil { + return err + } + + err = encoder.EncodeOption(m.HasEvents, m.Events) + if err != nil { + return err + } + + err = encoder.Encode(m.Constants) + if err != nil { + return err + } + + return encoder.Encode(m.Errors) +} + +func (m *ModuleMetadataV10) FindConstantValue(constant Text) ([]byte, error) { + for _, cons := range m.Constants { + if cons.Name == constant { + return cons.Value, nil + } + } + return nil, fmt.Errorf("could not find constant %s", constant) +} + +type StorageMetadataV10 struct { + Prefix Text + Items []StorageFunctionMetadataV10 +} + +type StorageFunctionMetadataV10 struct { + Name Text + Modifier StorageFunctionModifierV0 + Type StorageFunctionTypeV10 + Fallback Bytes + Documentation []Text +} + +func (s StorageFunctionMetadataV10) IsPlain() bool { + return s.Type.IsType +} + +func (s StorageFunctionMetadataV10) Hasher() (hash.Hash, error) { + return DefaultPlainHasher(s) +} + +func (s StorageFunctionMetadataV10) IsMap() bool { + return s.Type.IsMap || s.Type.IsDoubleMap +} + +func (s StorageFunctionMetadataV10) Hashers() ([]hash.Hash, error) { + if !s.IsMap() { + return nil, fmt.Errorf("Hashers() is only to be called on Maps") + } + + var hashers = collectHashersV10(s.Type) + hasherFns := make([]hash.Hash, len(hashers)) + for i, hasher := range hashers { + hasherFn, err := hasher.HashFunc() + if err != nil { + return nil, err + } + hasherFns[i] = hasherFn + } + return hasherFns, nil +} + +func collectHashersV10(x StorageFunctionTypeV10) []StorageHasherV10 { + switch { + case x.IsMap: + return []StorageHasherV10{x.AsMap.Hasher} + case x.IsDoubleMap: + return []StorageHasherV10{x.AsDoubleMap.Hasher, x.AsDoubleMap.Key2Hasher} + default: + panic("Unexpexted type") + } +} + +type StorageFunctionTypeV10 struct { + IsType bool + AsType Type // 0 + IsMap bool + AsMap MapTypeV10 // 1 + IsDoubleMap bool + AsDoubleMap DoubleMapTypeV10 // 2 +} + +func (s *StorageFunctionTypeV10) Decode(decoder scale.Decoder) error { + var t uint8 + err := decoder.Decode(&t) + if err != nil { + return err + } + + switch t { + case 0: + s.IsType = true + err = decoder.Decode(&s.AsType) + if err != nil { + return err + } + case 1: + s.IsMap = true + err = decoder.Decode(&s.AsMap) + if err != nil { + return err + } + case 2: + s.IsDoubleMap = true + err = decoder.Decode(&s.AsDoubleMap) + if err != nil { + return err + } + default: + return fmt.Errorf("received unexpected type %v", t) + } + return nil +} + +func (s StorageFunctionTypeV10) Encode(encoder scale.Encoder) error { + switch { + case s.IsType: + err := encoder.PushByte(0) + if err != nil { + return err + } + err = encoder.Encode(s.AsType) + if err != nil { + return err + } + case s.IsMap: + err := encoder.PushByte(1) + if err != nil { + return err + } + err = encoder.Encode(s.AsMap) + if err != nil { + return err + } + case s.IsDoubleMap: + err := encoder.PushByte(2) + if err != nil { + return err + } + err = encoder.Encode(s.AsDoubleMap) + if err != nil { + return err + } + default: + return fmt.Errorf("expected to be either type, map or double map, but none was set: %v", s) + } + return nil +} + +type MapTypeV10 struct { + Hasher StorageHasherV10 + Key Type + Value Type + Linked bool +} + +type DoubleMapTypeV10 struct { + Hasher StorageHasherV10 + Key1 Type + Key2 Type + Value Type + Key2Hasher StorageHasherV10 +} + +type StorageHasherV10 struct { + IsBlake2_128 bool // 0 + IsBlake2_256 bool // 1 + IsBlake2_128Concat bool // 2 + IsTwox128 bool // 3 + IsTwox256 bool // 4 + IsTwox64Concat bool // 5 + IsIdentity bool // 6 +} + +func (s *StorageHasherV10) Decode(decoder scale.Decoder) error { + var t uint8 + err := decoder.Decode(&t) + if err != nil { + return err + } + + switch t { + case 0: + s.IsBlake2_128 = true + case 1: + s.IsBlake2_256 = true + case 2: + s.IsBlake2_128Concat = true + case 3: + s.IsTwox128 = true + case 4: + s.IsTwox256 = true + case 5: + s.IsTwox64Concat = true + case 6: + s.IsIdentity = true + default: + return fmt.Errorf("received unexpected storage hasher type %v", t) + } + return nil +} + +func (s StorageHasherV10) Encode(encoder scale.Encoder) error { + var t uint8 + switch { + case s.IsBlake2_128: + t = 0 + case s.IsBlake2_256: + t = 1 + case s.IsBlake2_128Concat: + t = 2 + case s.IsTwox128: + t = 3 + case s.IsTwox256: + t = 4 + case s.IsTwox64Concat: + t = 5 + case s.IsIdentity: + t = 6 + default: + return fmt.Errorf("expected storage hasher, but none was set: %v", s) + } + return encoder.PushByte(t) +} + +func (s StorageHasherV10) HashFunc() (hash.Hash, error) { + // Blake2_128 + if s.IsBlake2_128 { + return ghash.NewBlake2b128(nil) + } + + // Blake2_256 + if s.IsBlake2_256 { + return ghash.NewBlake2b256(nil) + } + + // Blake2_128Concat + if s.IsBlake2_128Concat { + return ghash.NewBlake2b128Concat(nil) + } + + // Twox128 + if s.IsTwox128 { + return xxhash.New128(nil), nil + } + + // Twox256 + if s.IsTwox256 { + return xxhash.New256(nil), nil + } + + // Twox64Concat + if s.IsTwox64Concat { + return xxhash.New64Concat(nil), nil + } + + // Identity + if s.IsIdentity { + return ghash.NewIdentity(nil), nil + } + + return nil, errors.New("hash function type not yet supported") +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV11.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV11.go new file mode 100644 index 000000000..88a5c7fbf --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV11.go @@ -0,0 +1,65 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +// Modelled after packages/types/src/Metadata/v10/toV11.ts +type MetadataV11 struct { + MetadataV10 + Extrinsic ExtrinsicV11 +} + +// Modelled after packages/types/src/Metadata/v10/toV11.ts +type ExtrinsicV11 struct { + Version uint8 + SignedExtensions []string +} + +func (m *MetadataV11) Decode(decoder scale.Decoder) error { + err := decoder.Decode(&m.MetadataV10) + if err != nil { + return err + } + return decoder.Decode(&m.Extrinsic) +} + +func (m MetadataV11) Encode(encoder scale.Encoder) error { + err := encoder.Encode(m.MetadataV10) + if err != nil { + return err + } + return encoder.Encode(m.Extrinsic) +} + +func (e *ExtrinsicV11) Decode(decoder scale.Decoder) error { + err := decoder.Decode(&e.Version) + if err != nil { + return err + } + + return decoder.Decode(&e.SignedExtensions) +} + +func (e ExtrinsicV11) Encode(encoder scale.Encoder) error { + err := encoder.Encode(e.Version) + if err != nil { + return err + } + + return encoder.Encode(e.SignedExtensions) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV12.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV12.go new file mode 100644 index 000000000..3151e1791 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV12.go @@ -0,0 +1,142 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "fmt" + "strings" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +// Modelled after packages/types/src/Metadata/v11/toV12.ts +type MetadataV12 struct { + Modules []ModuleMetadataV12 + Extrinsic ExtrinsicV11 +} + +func (m *MetadataV12) Decode(decoder scale.Decoder) error { + err := decoder.Decode(&m.Modules) + if err != nil { + return err + } + return decoder.Decode(&m.Extrinsic) +} + +func (m MetadataV12) Encode(encoder scale.Encoder) error { + err := encoder.Encode(m.Modules) + if err != nil { + return err + } + return encoder.Encode(m.Extrinsic) +} + +func (m *MetadataV12) FindCallIndex(call string) (CallIndex, error) { + s := strings.Split(call, ".") + for _, mod := range m.Modules { + if !mod.HasCalls { + continue + } + if string(mod.Name) != s[0] { + continue + } + for ci, f := range mod.Calls { + if string(f.Name) == s[1] { + return CallIndex{mod.Index, uint8(ci)}, nil + } + } + return CallIndex{}, fmt.Errorf("method %v not found within module %v for call %v", s[1], mod.Name, call) + } + return CallIndex{}, fmt.Errorf("module %v not found in metadata for call %v", s[0], call) +} + +func (m *MetadataV12) FindEventNamesForEventID(eventID EventID) (Text, Text, error) { + for _, mod := range m.Modules { + if !mod.HasEvents { + continue + } + if mod.Index != eventID[0] { + continue + } + if int(eventID[1]) >= len(mod.Events) { + return "", "", fmt.Errorf("event index %v for module %v out of range", eventID[1], mod.Name) + } + return mod.Name, mod.Events[eventID[1]].Name, nil + } + return "", "", fmt.Errorf("module index %v out of range", eventID[0]) +} + +func (m *MetadataV12) FindStorageEntryMetadata(module string, fn string) (StorageEntryMetadata, error) { + for _, mod := range m.Modules { + if !mod.HasStorage { + continue + } + if string(mod.Storage.Prefix) != module { + continue + } + for _, s := range mod.Storage.Items { + if string(s.Name) != fn { + continue + } + return s, nil + } + return nil, fmt.Errorf("storage %v not found within module %v", fn, module) + } + return nil, fmt.Errorf("module %v not found in metadata", module) +} + +func (m *MetadataV12) FindConstantValue(module Text, constant Text) ([]byte, error) { + for _, mod := range m.Modules { + if mod.Name == module { + value, err := mod.FindConstantValue(constant) + if err == nil { + return value, nil + } + } + } + return nil, fmt.Errorf("could not find constant %s.%s", module, constant) +} + +func (m *MetadataV12) ExistsModuleMetadata(module string) bool { + for _, mod := range m.Modules { + if string(mod.Name) == module { + return true + } + } + return false +} + +type ModuleMetadataV12 struct { + ModuleMetadataV10 + Index uint8 +} + +func (m *ModuleMetadataV12) Decode(decoder scale.Decoder) error { + err := decoder.Decode(&m.ModuleMetadataV10) + if err != nil { + return err + } + return decoder.Decode(&m.Index) +} + +func (m ModuleMetadataV12) Encode(encoder scale.Encoder) error { + err := encoder.Encode(&m.ModuleMetadataV10) + if err != nil { + return err + } + return encoder.Encode(m.Index) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV13.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV13.go new file mode 100644 index 000000000..b7d05d7da --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV13.go @@ -0,0 +1,365 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "fmt" + "hash" + "strings" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +type MetadataV13 struct { + Modules []ModuleMetadataV13 + Extrinsic ExtrinsicV11 +} + +func (m *MetadataV13) Decode(decoder scale.Decoder) error { + err := decoder.Decode(&m.Modules) + if err != nil { + return err + } + return decoder.Decode(&m.Extrinsic) +} + +func (m MetadataV13) Encode(encoder scale.Encoder) error { + err := encoder.Encode(m.Modules) + if err != nil { + return err + } + return encoder.Encode(m.Extrinsic) +} + +func (m *MetadataV13) FindCallIndex(call string) (CallIndex, error) { + s := strings.Split(call, ".") + for _, mod := range m.Modules { + if !mod.HasCalls { + continue + } + if string(mod.Name) != s[0] { + continue + } + for ci, f := range mod.Calls { + if string(f.Name) == s[1] { + return CallIndex{mod.Index, uint8(ci)}, nil + } + } + return CallIndex{}, fmt.Errorf("method %v not found within module %v for call %v", s[1], mod.Name, call) + } + return CallIndex{}, fmt.Errorf("module %v not found in metadata for call %v", s[0], call) +} + +func (m *MetadataV13) FindEventNamesForEventID(eventID EventID) (Text, Text, error) { + for _, mod := range m.Modules { + if !mod.HasEvents { + continue + } + if mod.Index != eventID[0] { + continue + } + if int(eventID[1]) >= len(mod.Events) { + return "", "", fmt.Errorf("event index %v for module %v out of range", eventID[1], mod.Name) + } + return mod.Name, mod.Events[eventID[1]].Name, nil + } + return "", "", fmt.Errorf("module index %v out of range", eventID[0]) +} + +func (m *MetadataV13) FindStorageEntryMetadata(module string, fn string) (StorageEntryMetadata, error) { + for _, mod := range m.Modules { + if !mod.HasStorage { + continue + } + if string(mod.Storage.Prefix) != module { + continue + } + for _, s := range mod.Storage.Items { + if string(s.Name) != fn { + continue + } + return s, nil + } + return nil, fmt.Errorf("storage %v not found within module %v", fn, module) + } + return nil, fmt.Errorf("module %v not found in metadata", module) +} + +func (m *MetadataV13) FindConstantValue(module Text, constant Text) ([]byte, error) { + for _, mod := range m.Modules { + if mod.Name == module { + value, err := mod.FindConstantValue(constant) + if err == nil { + return value, nil + } + } + } + return nil, fmt.Errorf("could not find constant %s.%s", module, constant) +} + +func (m *MetadataV13) ExistsModuleMetadata(module string) bool { + for _, mod := range m.Modules { + if string(mod.Name) == module { + return true + } + } + return false +} + +type ModuleMetadataV13 struct { + Name Text + HasStorage bool + Storage StorageMetadataV13 + HasCalls bool + Calls []FunctionMetadataV4 + HasEvents bool + Events []EventMetadataV4 + Constants []ModuleConstantMetadataV6 + Errors []ErrorMetadataV8 + Index uint8 +} + +func (m *ModuleMetadataV13) Decode(decoder scale.Decoder) error { + err := decoder.Decode(&m.Name) + if err != nil { + return err + } + + err = decoder.DecodeOption(&m.HasStorage, &m.Storage) + if err != nil { + return err + } + + err = decoder.DecodeOption(&m.HasCalls, &m.Calls) + if err != nil { + return err + } + + err = decoder.DecodeOption(&m.HasEvents, &m.Events) + if err != nil { + return err + } + + err = decoder.Decode(&m.Constants) + if err != nil { + return err + } + + err = decoder.Decode(&m.Errors) + if err != nil { + return err + } + + return decoder.Decode(&m.Index) +} + +func (m ModuleMetadataV13) Encode(encoder scale.Encoder) error { + err := encoder.Encode(m.Name) + if err != nil { + return err + } + + err = encoder.EncodeOption(m.HasStorage, m.Storage) + if err != nil { + return err + } + + err = encoder.EncodeOption(m.HasCalls, m.Calls) + if err != nil { + return err + } + + err = encoder.EncodeOption(m.HasEvents, m.Events) + if err != nil { + return err + } + + err = encoder.Encode(m.Constants) + if err != nil { + return err + } + + err = encoder.Encode(m.Errors) + if err != nil { + return err + } + + return encoder.Encode(m.Index) +} + +func (m *ModuleMetadataV13) FindConstantValue(constant Text) ([]byte, error) { + for _, cons := range m.Constants { + if cons.Name == constant { + return cons.Value, nil + } + } + return nil, fmt.Errorf("could not find constant %s", constant) +} + +type StorageMetadataV13 struct { + Prefix Text + Items []StorageFunctionMetadataV13 +} + +type StorageFunctionMetadataV13 struct { + Name Text + Modifier StorageFunctionModifierV0 + Type StorageFunctionTypeV13 + Fallback Bytes + Documentation []Text +} + +func (s StorageFunctionMetadataV13) IsPlain() bool { + return s.Type.IsType +} + +func (s StorageFunctionMetadataV13) Hasher() (hash.Hash, error) { + return DefaultPlainHasher(s) +} + +func (s StorageFunctionMetadataV13) IsMap() bool { + return s.Type.IsMap || s.Type.IsDoubleMap || s.Type.IsNMap +} + +func (s StorageFunctionMetadataV13) Hashers() ([]hash.Hash, error) { + if !s.IsMap() { + return nil, fmt.Errorf("Hashers() is only to be called on Maps") + } + + var hashers = collectHashersV13(s.Type) + hasherFns := make([]hash.Hash, len(hashers)) + for i, hasher := range hashers { + hasherFn, err := hasher.HashFunc() + if err != nil { + return nil, err + } + hasherFns[i] = hasherFn + } + return hasherFns, nil +} + +func collectHashersV13(x StorageFunctionTypeV13) []StorageHasherV10 { + switch { + case x.IsMap: + return []StorageHasherV10{x.AsMap.Hasher} + case x.IsDoubleMap: + return []StorageHasherV10{x.AsDoubleMap.Hasher, x.AsDoubleMap.Key2Hasher} + case x.IsNMap: + return x.AsNMap.Hashers + default: + panic("Unexpexted type") + } +} + +type StorageFunctionTypeV13 struct { + IsType bool + AsType Type // 0 + IsMap bool + AsMap MapTypeV10 // 1 + IsDoubleMap bool + AsDoubleMap DoubleMapTypeV10 // 2 + IsNMap bool + AsNMap NMapTypeV13 // 3 +} + +func (s *StorageFunctionTypeV13) Decode(decoder scale.Decoder) error { + var t uint8 + err := decoder.Decode(&t) + if err != nil { + return err + } + + switch t { + case 0: + s.IsType = true + err = decoder.Decode(&s.AsType) + if err != nil { + return err + } + case 1: + s.IsMap = true + err = decoder.Decode(&s.AsMap) + if err != nil { + return err + } + case 2: + s.IsDoubleMap = true + err = decoder.Decode(&s.AsDoubleMap) + if err != nil { + return err + } + case 3: + s.IsNMap = true + err = decoder.Decode(&s.AsNMap) + if err != nil { + return err + } + default: + return fmt.Errorf("received unexpected type %v", t) + } + return nil +} + +func (s StorageFunctionTypeV13) Encode(encoder scale.Encoder) error { + switch { + case s.IsType: + err := encoder.PushByte(0) + if err != nil { + return err + } + err = encoder.Encode(s.AsType) + if err != nil { + return err + } + case s.IsMap: + err := encoder.PushByte(1) + if err != nil { + return err + } + err = encoder.Encode(s.AsMap) + if err != nil { + return err + } + case s.IsDoubleMap: + err := encoder.PushByte(2) + if err != nil { + return err + } + err = encoder.Encode(s.AsDoubleMap) + if err != nil { + return err + } + case s.IsNMap: + err := encoder.PushByte(3) + if err != nil { + return err + } + err = encoder.Encode(s.AsNMap) + if err != nil { + return err + } + default: + return fmt.Errorf("expected to be either type, map, double map or nmap but none was set: %v", s) + } + return nil +} + +type NMapTypeV13 struct { + Keys []Type + Hashers []StorageHasherV10 + Value Type +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV14.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV14.go new file mode 100644 index 000000000..d38b7fc83 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV14.go @@ -0,0 +1,430 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "errors" + "fmt" + "hash" + "strings" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +// nolint:lll +// Based on https://github.com/polkadot-js/api/blob/80b581f0df87108c59f71e67d7c5fc5f8c89ec33/packages/types/src/interfaces/metadata/v14.ts +type MetadataV14 struct { + Lookup PortableRegistryV14 + Pallets []PalletMetadataV14 + Extrinsic ExtrinsicV14 + Type Si1LookupTypeID + + // Custom field to help us lookup a type from the registry + // more efficiently. This field is built while decoding and + // it is not to be encoded. + EfficientLookup map[int64]*Si1Type `scale:"-"` +} + +// Decode implementation for MetadataV14 +// Note: We opt for a custom impl build `EfficientLookup` +// on the fly. +func (m *MetadataV14) Decode(decoder scale.Decoder) error { + var err error + err = decoder.Decode(&m.Lookup) + if err != nil { + return err + } + + m.EfficientLookup = m.Lookup.toMap() + + err = decoder.Decode(&m.Pallets) + if err != nil { + return err + } + + err = decoder.Decode(&m.Extrinsic) + if err != nil { + return err + } + + return decoder.Decode(&m.Type) +} + +// Build a map of type id to pointer to the PortableTypeV14 itself. +func (lookup *PortableRegistryV14) toMap() map[int64]*Si1Type { + var efficientLookup = make(map[int64]*Si1Type) + var t PortableTypeV14 + for _, t = range lookup.Types { + // We need to copy t so that the pointer doesn't get + // overwritten by the next assignment. + typ := t + efficientLookup[typ.ID.Int64()] = &typ.Type + } + return efficientLookup +} + +/* Metadata interface functions implementation */ + +func (m *MetadataV14) FindCallIndex(call string) (CallIndex, error) { + s := strings.Split(call, ".") + for _, mod := range m.Pallets { + if !mod.HasCalls { + continue + } + if string(mod.Name) != s[0] { + continue + } + callType := mod.Calls.Type.Int64() + + if typ, ok := m.EfficientLookup[callType]; ok { + if len(typ.Def.Variant.Variants) > 0 { + for _, vars := range typ.Def.Variant.Variants { + if string(vars.Name) == s[1] { + return CallIndex{uint8(mod.Index), uint8(vars.Index)}, nil + } + } + } + } + } + return CallIndex{}, fmt.Errorf("module %v not found in metadata for call %v", s[0], call) +} + +func (m *MetadataV14) FindEventNamesForEventID(eventID EventID) (Text, Text, error) { + for _, mod := range m.Pallets { + if !mod.HasEvents { + continue + } + if mod.Index != NewU8(eventID[0]) { + continue + } + eventType := mod.Events.Type.Int64() + + if typ, ok := m.EfficientLookup[eventType]; ok { + if len(typ.Def.Variant.Variants) > 0 { + for _, vars := range typ.Def.Variant.Variants { + if uint8(vars.Index) == eventID[1] { + return mod.Name, vars.Name, nil + } + } + } + } + } + return "", "", fmt.Errorf("module index %v out of range", eventID[0]) +} + +func (m *MetadataV14) FindStorageEntryMetadata(module string, fn string) (StorageEntryMetadata, error) { + for _, mod := range m.Pallets { + if !mod.HasStorage { + continue + } + if string(mod.Storage.Prefix) != module { + continue + } + for _, s := range mod.Storage.Items { + if string(s.Name) == fn { + return s, nil + } + } + return nil, fmt.Errorf("storage %v not found within module %v", fn, module) + } + return nil, fmt.Errorf("module %v not found in metadata", module) +} + +func (m *MetadataV14) FindError(moduleIndex U8, errorIndex [4]U8) (*MetadataError, error) { + for _, mod := range m.Pallets { + if int(mod.Index) == int(moduleIndex) { + if mod.HasErrors { + errorType := mod.Errors.Type + errType, ok := m.EfficientLookup[errorType.Int64()] + + if !ok { + return nil, errors.New("error type not found") + } + + if !errType.Def.IsVariant { + return nil, errors.New("error type definition is not a variant") + } + + for _, variant := range errType.Def.Variant.Variants { + if variant.Index == errorIndex[0] { + return NewMetadataError(variant), nil + } + } + + return nil, fmt.Errorf("error at index 0x%x not found", errorIndex) + } + + return nil, fmt.Errorf("module %d has no errors", moduleIndex) + } + } + + return nil, fmt.Errorf("could not find error at index %d for module %d", errorIndex, moduleIndex) +} + +func (m *MetadataV14) FindConstantValue(module Text, constant Text) ([]byte, error) { + for _, mod := range m.Pallets { + if mod.Name == module { + value, err := mod.FindConstantValue(constant) + if err == nil { + return value, nil + } + } + } + return nil, fmt.Errorf("could not find constant %s.%s", module, constant) +} + +func (m *MetadataV14) ExistsModuleMetadata(module string) bool { + for _, mod := range m.Pallets { + if string(mod.Name) == module { + return true + } + } + return false +} + +/* Supporting types */ + +type ExtrinsicV14 struct { + Type Si1LookupTypeID + Version U8 + SignedExtensions []SignedExtensionMetadataV14 +} + +type SignedExtensionMetadataV14 struct { + Identifier Text + Type Si1LookupTypeID + AdditionalSigned Si1LookupTypeID +} + +type PortableRegistryV14 struct { + Types []PortableTypeV14 +} + +type PalletMetadataV14 struct { + Name Text + HasStorage bool + Storage StorageMetadataV14 + HasCalls bool + Calls FunctionMetadataV14 + HasEvents bool + Events EventMetadataV14 + Constants []ConstantMetadataV14 + HasErrors bool + Errors ErrorMetadataV14 + Index U8 +} + +type FunctionMetadataV14 struct { + Type Si1LookupTypeID +} + +type EventMetadataV14 struct { + Type Si1LookupTypeID +} + +type ConstantMetadataV14 struct { + Name Text + Type Si1LookupTypeID + Value Bytes + Docs []Text +} + +type ErrorMetadataV14 struct { + Type Si1LookupTypeID +} + +func (m *PalletMetadataV14) Decode(decoder scale.Decoder) error { + err := decoder.Decode(&m.Name) + if err != nil { + return err + } + + err = decoder.DecodeOption(&m.HasStorage, &m.Storage) + if err != nil { + return err + } + + err = decoder.DecodeOption(&m.HasCalls, &m.Calls) + if err != nil { + return err + } + + err = decoder.DecodeOption(&m.HasEvents, &m.Events) + if err != nil { + return err + } + + err = decoder.Decode(&m.Constants) + if err != nil { + return err + } + + err = decoder.DecodeOption(&m.HasErrors, &m.Errors) + if err != nil { + return err + } + + return decoder.Decode(&m.Index) +} + +func (m PalletMetadataV14) Encode(encoder scale.Encoder) error { + err := encoder.Encode(m.Name) + if err != nil { + return err + } + + err = encoder.EncodeOption(m.HasStorage, m.Storage) + if err != nil { + return err + } + + err = encoder.EncodeOption(m.HasCalls, m.Calls) + if err != nil { + return err + } + + err = encoder.EncodeOption(m.HasEvents, m.Events) + if err != nil { + return err + } + + err = encoder.Encode(m.Constants) + if err != nil { + return err + } + + err = encoder.EncodeOption(m.HasErrors, m.Errors) + if err != nil { + return err + } + + return encoder.Encode(m.Index) +} + +func (m *PalletMetadataV14) FindConstantValue(constant Text) ([]byte, error) { + for _, cons := range m.Constants { + if cons.Name == constant { + return cons.Value, nil + } + } + return nil, fmt.Errorf("could not find constant %s", constant) +} + +type StorageMetadataV14 struct { + Prefix Text + Items []StorageEntryMetadataV14 +} + +type StorageEntryMetadataV14 struct { + Name Text + Modifier StorageFunctionModifierV0 + Type StorageEntryTypeV14 + Fallback Bytes + Documentation []Text +} + +type MapTypeV14 struct { + Hashers []StorageHasherV10 + Key Si1LookupTypeID + Value Si1LookupTypeID +} + +func (s StorageEntryMetadataV14) IsPlain() bool { + return s.Type.IsPlainType +} + +func (s StorageEntryMetadataV14) Hasher() (hash.Hash, error) { + return DefaultPlainHasher(s) +} + +func (s StorageEntryMetadataV14) IsMap() bool { + return s.Type.IsMap +} + +func (s StorageEntryMetadataV14) Hashers() ([]hash.Hash, error) { + if !s.IsMap() { + return nil, fmt.Errorf("StorageEntryMetadataV14.Hashers() should be called on a Map entry") + } + + var hashes []hash.Hash + for _, hasher := range s.Type.AsMap.Hashers { + h, err := hasher.HashFunc() + if err != nil { + return nil, err + } + hashes = append(hashes, h) + } + + return hashes, nil +} + +type StorageEntryTypeV14 struct { + IsPlainType bool + AsPlainType Si1LookupTypeID + IsMap bool + AsMap MapTypeV14 +} + +func (s *StorageEntryTypeV14) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + switch b { + case 0: + s.IsPlainType = true + err = decoder.Decode(&s.AsPlainType) + if err != nil { + return err + } + case 1: + s.IsMap = true + err = decoder.Decode(&s.AsMap) + if err != nil { + return err + } + default: + return fmt.Errorf("StorageFunctionTypeV14 does not support this type: %d", b) + } + return nil +} + +func (s StorageEntryTypeV14) Encode(encoder scale.Encoder) error { + switch { + case s.IsPlainType: + err := encoder.PushByte(0) + if err != nil { + return err + } + err = encoder.Encode(s.AsPlainType) + if err != nil { + return err + } + case s.IsMap: + err := encoder.PushByte(1) + if err != nil { + return err + } + err = encoder.Encode(s.AsMap) + if err != nil { + return err + } + default: + return fmt.Errorf("expected to be either plain type or map, but none was set: %v", s) + } + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV14_example.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV14_example.go new file mode 100644 index 000000000..249506499 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV14_example.go @@ -0,0 +1,24 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +const ( + // MetadataV14Data holds the hex encoded metadata taken from the Centrifuge development runtime at block 467559. + + //nolint:lll + MetadataV14Data = "0x6d6574610e2110000c1c73705f636f72651863727970746f2c4163636f756e7449643332000004000401205b75383b2033325d0000040000032000000008000800000503000c08306672616d655f73797374656d2c4163636f756e74496e666f08144e6f6e636501102c4163636f756e74446174610114001401146e6f6e63651001144e6f6e6365000124636f6e73756d657273100120526566436f756e7400012470726f766964657273100120526566436f756e7400012c73756666696369656e7473100120526566436f756e740001106461746114012c4163636f756e74446174610000100000050500140c3c70616c6c65745f62616c616e6365731474797065732c4163636f756e7444617461041c42616c616e63650118001001106672656518011c42616c616e6365000120726573657276656418011c42616c616e636500011866726f7a656e18011c42616c616e6365000114666c6167731c01284578747261466c61677300001800000507001c0c3c70616c6c65745f62616c616e636573147479706573284578747261466c61677300000400180110753132380000200c346672616d655f737570706f7274206469737061746368405065724469737061746368436c6173730404540124000c01186e6f726d616c2401045400012c6f7065726174696f6e616c240104540001246d616e6461746f7279240104540000240c2873705f77656967687473247765696768745f76321857656967687400000801207265665f74696d6528010c75363400012870726f6f665f73697a6528010c7536340000280000062c002c000005060030083c7072696d69746976655f74797065731048323536000004000401205b75383b2033325d000034000002080038102873705f72756e74696d651c67656e65726963186469676573741844696765737400000401106c6f67733c013c5665633c4469676573744974656d3e00003c000002400040102873705f72756e74696d651c67656e6572696318646967657374284469676573744974656d0001142850726552756e74696d650800440144436f6e73656e737573456e67696e654964000034011c5665633c75383e00060024436f6e73656e7375730800440144436f6e73656e737573456e67696e654964000034011c5665633c75383e000400105365616c0800440144436f6e73656e737573456e67696e654964000034011c5665633c75383e000500144f74686572040034011c5665633c75383e0000006452756e74696d65456e7669726f6e6d656e74557064617465640008000044000003040000000800480000024c004c08306672616d655f73797374656d2c4576656e745265636f7264080445015004540130000c011470686173653909011450686173650001146576656e7450010445000118746f70696373290301185665633c543e000050084c646576656c6f706d656e745f72756e74696d653052756e74696d654576656e74000105011853797374656d04005401706672616d655f73797374656d3a3a4576656e743c52756e74696d653e0000003c50617261636861696e53797374656d04007c01bc63756d756c75735f70616c6c65745f70617261636861696e5f73797374656d3a3a4576656e743c52756e74696d653e0001002042616c616e636573040084017c70616c6c65745f62616c616e6365733a3a4576656e743c52756e74696d653e001400485472616e73616374696f6e5061796d656e7404008c01a870616c6c65745f7472616e73616374696f6e5f7061796d656e743a3a4576656e743c52756e74696d653e00150044436f6c6c61746f7253656c656374696f6e04009001a470616c6c65745f636f6c6c61746f725f73656c656374696f6e3a3a4576656e743c52756e74696d653e0047001c53657373696f6e040098015470616c6c65745f73657373696f6e3a3a4576656e74001f00204d756c746973696704009c017c70616c6c65745f6d756c74697369673a3a4576656e743c52756e74696d653e003c001450726f78790400ac017070616c6c65745f70726f78793a3a4576656e743c52756e74696d653e003d001c5574696c6974790400b8015470616c6c65745f7574696c6974793a3a4576656e74003e00245363686564756c65720400bc018070616c6c65745f7363686564756c65723a3a4576656e743c52756e74696d653e003f001c436f756e63696c0400c401fc70616c6c65745f636f6c6c6563746976653a3a4576656e743c52756e74696d652c2070616c6c65745f636f6c6c6563746976653a3a496e7374616e6365313e00400024456c656374696f6e730400c801a470616c6c65745f656c656374696f6e735f70687261676d656e3a3a4576656e743c52756e74696d653e0041002444656d6f63726163790400d4018070616c6c65745f64656d6f63726163793a3a4576656e743c52756e74696d653e004200204964656e746974790400e8017c70616c6c65745f6964656e746974793a3a4576656e743c52756e74696d653e0043001c56657374696e670400f0017870616c6c65745f76657374696e673a3a4576656e743c52756e74696d653e0044002054726561737572790400f4017c70616c6c65745f74726561737572793a3a4576656e743c52756e74696d653e0045001c556e69717565730400f8017870616c6c65745f756e69717565733a3a4576656e743c52756e74696d653e00460020507265696d61676504001501017c70616c6c65745f707265696d6167653a3a4576656e743c52756e74696d653e00480040436f6e76696374696f6e566f74696e670400190101a070616c6c65745f636f6e76696374696f6e5f766f74696e673a3a4576656e743c52756e74696d653e005000245265666572656e646104001d01018070616c6c65745f7265666572656e64613a3a4576656e743c52756e74696d653e0051002457686974656c69737404007d07018070616c6c65745f77686974656c6973743a3a4576656e743c52756e74696d653e00530048546563686e6963616c436f6d6d697474656504008d0701fc70616c6c65745f636f6c6c6563746976653a3a4576656e743c52756e74696d652c2070616c6c65745f636f6c6c6563746976653a3a496e7374616e6365323e00540070546563686e6963616c436f6d6d69747465654d656d626572736869700400910701fc70616c6c65745f6d656d626572736869703a3a4576656e743c52756e74696d652c2070616c6c65745f6d656d626572736869703a3a496e7374616e6365313e005500104665657304009507016c70616c6c65745f666565733a3a4576656e743c52756e74696d653e005a0028506f6f6c53797374656d04009907018870616c6c65745f706f6f6c5f73797374656d3a3a4576656e743c52756e74696d653e005f00144c6f616e730400e507017070616c6c65745f6c6f616e733a3a4576656e743c52756e74696d653e0060002c5065726d697373696f6e730400ed07018870616c6c65745f7065726d697373696f6e733a3a4576656e743c52756e74696d653e00610044436f6c6c61746f72416c6c6f776c6973740400f10701a470616c6c65745f636f6c6c61746f725f616c6c6f776c6973743a3a4576656e743c52756e74696d653e00620018546f6b656e730400f50701a070616c6c65745f726573747269637465645f746f6b656e733a3a4576656e743c52756e74696d653e006300184272696467650400f907017470616c6c65745f6272696467653a3a4576656e743c52756e74696d653e0065003c496e7465726573744163637275616c0400fd07019c70616c6c65745f696e7465726573745f6163637275616c3a3a4576656e743c52756e74696d653e006600204b657973746f726504000108017c70616c6c65745f6b657973746f72653a3a4576656e743c52756e74696d653e0068002c496e766573746d656e747304000508018870616c6c65745f696e766573746d656e74733a3a4576656e743c52756e74696d653e006900504c697175696469747952657761726473426173650400210801e470616c6c65745f726577617264733a3a4576656e743c52756e74696d652c2070616c6c65745f726577617264733a3a496e7374616e6365323e006a00404c6971756964697479526577617264730400250801a070616c6c65745f6c69717569646974795f726577617264733a3a4576656e743c52756e74696d653e006b00384c6971756964697479506f6f6c7304004d08019870616c6c65745f6c69717569646974795f706f6f6c733a3a4576656e743c52756e74696d653e006c0030506f6f6c526567697374727904007108019070616c6c65745f706f6f6c5f72656769737472793a3a4576656e743c52756e74696d653e006d0040426c6f636b52657761726473426173650400790801e470616c6c65745f726577617264733a3a4576656e743c52756e74696d652c2070616c6c65745f726577617264733a3a496e7374616e6365313e006e0030426c6f636b5265776172647304007d08019070616c6c65745f626c6f636b5f726577617264733a3a4576656e743c52756e74696d653e006f00445472616e73666572416c6c6f774c6973740400910801a470616c6c65745f7472616e736665725f616c6c6f776c6973743a3a4576656e743c52756e74696d653e007000544c6971756964697479506f6f6c73476174657761790400950801b870616c6c65745f6c69717569646974795f706f6f6c735f676174657761793a3a4576656e743c52756e74696d653e007300244f72646572426f6f6b04009908018470616c6c65745f6f726465725f626f6f6b3a3a4576656e743c52756e74696d653e00740048466f726569676e496e766573746d656e747304009d0801a870616c6c65745f666f726569676e5f696e766573746d656e74733a3a4576656e743c52756e74696d653e0075003c4f7261636c655072696365466565640400ad08018870616c6c65745f6f7261636c655f666565643a3a4576656e743c52756e74696d653e007600544f7261636c655072696365436f6c6c656374696f6e0400b10801a070616c6c65745f6f7261636c655f636f6c6c656374696f6e3a3a4576656e743c52756e74696d653e00770024416e63686f727356320400b508018470616c6c65745f616e63686f72735f76323a3a4576656e743c52756e74696d653e008200684c6971756964697479506f6f6c734761746577617951756575650400b90801d070616c6c65745f6c69717569646974795f706f6f6c735f676174657761795f71756575653a3a4576656e743c52756e74696d653e0083002458636d7051756575650400c10801a463756d756c75735f70616c6c65745f78636d705f71756575653a3a4576656e743c52756e74696d653e0078002c506f6c6b61646f7458636d0400c508016870616c6c65745f78636d3a3a4576656e743c52756e74696d653e0079002843756d756c757358636d0400cd08018863756d756c75735f70616c6c65745f78636d3a3a4576656e743c52756e74696d653e007a003458636d5472616e736163746f720400d108019470616c6c65745f78636d5f7472616e736163746f723a3a4576656e743c52756e74696d653e007d002c4f726d6c58546f6b656e730400d90801706f726d6c5f78746f6b656e733a3a4576656e743c52756e74696d653e007e00304d65737361676551756575650400dd08019070616c6c65745f6d6573736167655f71756575653a3a4576656e743c52756e74696d653e007f00284f726d6c546f6b656e730400e508016c6f726d6c5f746f6b656e733a3a4576656e743c52756e74696d653e0096002c436861696e4272696467650400e908016c636861696e6272696467653a3a4576656e743c52756e74696d653e009700444f726d6c417373657452656769737472790400ed0801ac6f726d6c5f61737365745f72656769737472793a3a6d6f64756c653a3a4576656e743c52756e74696d653e0098001c4f726d6c58636d0400f10801606f726d6c5f78636d3a3a4576656e743c52756e74696d653e0099000c45564d0400f508016870616c6c65745f65766d3a3a4576656e743c52756e74696d653e00a0001c426173654665650400fd08015870616c6c65745f626173655f6665653a3a4576656e7400a20020457468657265756d04000109015870616c6c65745f657468657265756d3a3a4576656e7400a3006c4c6971756964697479506f6f6c734178656c6172476174657761790400250901a46178656c61725f676174657761795f707265636f6d70696c653a3a4576656e743c52756e74696d653e00a500105375646f04002909016c70616c6c65745f7375646f3a3a4576656e743c52756e74696d653e00c80020506f6f6c4665657304002d09018070616c6c65745f706f6f6c5f666565733a3a4576656e743c52756e74696d653e00fa001c52656d61726b7304003109017870616c6c65745f72656d61726b733a3a4576656e743c52756e74696d653e00fb0020546f6b656e4d757804003509018070616c6c65745f746f6b656e5f6d75783a3a4576656e743c52756e74696d653e00fd0000540c306672616d655f73797374656d1870616c6c6574144576656e7404045400011c4045787472696e7369635375636365737304013464697370617463685f696e666f5801304469737061746368496e666f00000490416e2065787472696e73696320636f6d706c65746564207375636365737366756c6c792e3c45787472696e7369634661696c656408013864697370617463685f6572726f7264013444697370617463684572726f7200013464697370617463685f696e666f5801304469737061746368496e666f00010450416e2065787472696e736963206661696c65642e2c436f64655570646174656400020450603a636f6465602077617320757064617465642e284e65774163636f756e7404011c6163636f756e74000130543a3a4163636f756e7449640003046841206e6577206163636f756e742077617320637265617465642e344b696c6c65644163636f756e7404011c6163636f756e74000130543a3a4163636f756e74496400040458416e206163636f756e7420776173207265617065642e2052656d61726b656408011873656e646572000130543a3a4163636f756e7449640001106861736830011c543a3a48617368000504704f6e206f6e2d636861696e2072656d61726b2068617070656e65642e4455706772616465417574686f72697a6564080124636f64655f6861736830011c543a3a48617368000134636865636b5f76657273696f6e780110626f6f6c00060468416e20757067726164652077617320617574686f72697a65642e04704576656e7420666f72207468652053797374656d2070616c6c65742e580c346672616d655f737570706f7274206469737061746368304469737061746368496e666f00000c0118776569676874240118576569676874000114636c6173735c01344469737061746368436c617373000120706179735f6665656001105061797300005c0c346672616d655f737570706f7274206469737061746368344469737061746368436c61737300010c184e6f726d616c0000002c4f7065726174696f6e616c000100244d616e6461746f727900020000600c346672616d655f737570706f727420646973706174636810506179730001080c596573000000084e6f0001000064082873705f72756e74696d653444697370617463684572726f72000138144f746865720000003043616e6e6f744c6f6f6b7570000100244261644f726967696e000200184d6f64756c65040068012c4d6f64756c654572726f7200030044436f6e73756d657252656d61696e696e670004002c4e6f50726f76696465727300050040546f6f4d616e79436f6e73756d65727300060014546f6b656e04006c0128546f6b656e4572726f720007002841726974686d65746963040070013c41726974686d657469634572726f72000800345472616e73616374696f6e616c04007401485472616e73616374696f6e616c4572726f7200090024457868617573746564000a0028436f7272757074696f6e000b002c556e617661696c61626c65000c0038526f6f744e6f74416c6c6f776564000d000068082873705f72756e74696d652c4d6f64756c654572726f720000080114696e64657808010875380001146572726f7244018c5b75383b204d41585f4d4f44554c455f4552524f525f454e434f4445445f53495a455d00006c082873705f72756e74696d6528546f6b656e4572726f720001284046756e6473556e617661696c61626c65000000304f6e6c7950726f76696465720001003042656c6f774d696e696d756d0002003043616e6e6f7443726561746500030030556e6b6e6f776e41737365740004001846726f7a656e0005002c556e737570706f727465640006004043616e6e6f74437265617465486f6c64000700344e6f74457870656e6461626c650008001c426c6f636b65640009000070083473705f61726974686d657469633c41726974686d657469634572726f7200010c24556e646572666c6f77000000204f766572666c6f77000100384469766973696f6e42795a65726f0002000074082873705f72756e74696d65485472616e73616374696f6e616c4572726f72000108304c696d6974526561636865640000001c4e6f4c61796572000100007800000500007c0c7c63756d756c75735f70616c6c65745f70617261636861696e5f73797374656d1870616c6c6574144576656e740404540001186056616c69646174696f6e46756e6374696f6e53746f726564000004d05468652076616c69646174696f6e2066756e6374696f6e20686173206265656e207363686564756c656420746f206170706c792e6456616c69646174696f6e46756e6374696f6e4170706c69656404015472656c61795f636861696e5f626c6f636b5f6e756d10015452656c6179436861696e426c6f636b4e756d62657200010445015468652076616c69646174696f6e2066756e6374696f6e20776173206170706c696564206173206f662074686520636f6e7461696e65642072656c617920636861696e20626c6f636b206e756d6265722e6c56616c69646174696f6e46756e6374696f6e446973636172646564000204b05468652072656c61792d636861696e2061626f727465642074686520757067726164652070726f636573732e60446f776e776172644d657373616765735265636569766564040114636f756e7410010c7533320003040101536f6d6520646f776e77617264206d657373616765732068617665206265656e20726563656976656420616e642077696c6c2062652070726f6365737365642e64446f776e776172644d6573736167657350726f63657373656408012c7765696768745f75736564240118576569676874000120646d715f6865616430014472656c61795f636861696e3a3a48617368000404e0446f776e77617264206d6573736167657320776572652070726f636573736564207573696e672074686520676976656e207765696768742e445570776172644d65737361676553656e740401306d6573736167655f6861736880013c4f7074696f6e3c58636d486173683e000504b8416e20757077617264206d657373616765207761732073656e7420746f207468652072656c617920636861696e2e047c54686520604576656e746020656e756d206f6620746869732070616c6c65748004184f7074696f6e04045401040108104e6f6e6500000010536f6d650400040000010000840c3c70616c6c65745f62616c616e6365731870616c6c6574144576656e740804540004490001581c456e646f77656408011c6163636f756e74000130543a3a4163636f756e744964000130667265655f62616c616e6365180128543a3a42616c616e6365000004b8416e206163636f756e74207761732063726561746564207769746820736f6d6520667265652062616c616e63652e20447573744c6f737408011c6163636f756e74000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e63650001083d01416e206163636f756e74207761732072656d6f7665642077686f73652062616c616e636520776173206e6f6e2d7a65726f206275742062656c6f77204578697374656e7469616c4465706f7369742c78726573756c74696e6720696e20616e206f75747269676874206c6f73732e205472616e736665720c011066726f6d000130543a3a4163636f756e744964000108746f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e63650002044c5472616e73666572207375636365656465642e2842616c616e636553657408010c77686f000130543a3a4163636f756e74496400011066726565180128543a3a42616c616e636500030468412062616c616e6365207761732073657420627920726f6f742e20526573657276656408010c77686f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e6365000404e0536f6d652062616c616e63652077617320726573657276656420286d6f7665642066726f6d206672656520746f207265736572766564292e28556e726573657276656408010c77686f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e6365000504e8536f6d652062616c616e63652077617320756e726573657276656420286d6f7665642066726f6d20726573657276656420746f2066726565292e4852657365727665526570617472696174656410011066726f6d000130543a3a4163636f756e744964000108746f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e636500014864657374696e6174696f6e5f7374617475738801185374617475730006084d01536f6d652062616c616e636520776173206d6f7665642066726f6d207468652072657365727665206f6620746865206669727374206163636f756e7420746f20746865207365636f6e64206163636f756e742ed846696e616c20617267756d656e7420696e64696361746573207468652064657374696e6174696f6e2062616c616e636520747970652e1c4465706f73697408010c77686f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e6365000704d8536f6d6520616d6f756e7420776173206465706f73697465642028652e672e20666f72207472616e73616374696f6e2066656573292e20576974686472617708010c77686f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e63650008041d01536f6d6520616d6f756e74207761732077697468647261776e2066726f6d20746865206163636f756e742028652e672e20666f72207472616e73616374696f6e2066656573292e1c536c617368656408010c77686f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e63650009040101536f6d6520616d6f756e74207761732072656d6f7665642066726f6d20746865206163636f756e742028652e672e20666f72206d69736265686176696f72292e184d696e74656408010c77686f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e6365000a049c536f6d6520616d6f756e7420776173206d696e74656420696e746f20616e206163636f756e742e184275726e656408010c77686f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e6365000b049c536f6d6520616d6f756e7420776173206275726e65642066726f6d20616e206163636f756e742e2453757370656e64656408010c77686f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e6365000c041501536f6d6520616d6f756e74207761732073757370656e6465642066726f6d20616e206163636f756e74202869742063616e20626520726573746f726564206c61746572292e20526573746f72656408010c77686f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e6365000d04a4536f6d6520616d6f756e742077617320726573746f72656420696e746f20616e206163636f756e742e20557067726164656404010c77686f000130543a3a4163636f756e744964000e0460416e206163636f756e74207761732075706772616465642e18497373756564040118616d6f756e74180128543a3a42616c616e6365000f042d01546f74616c2069737375616e63652077617320696e637265617365642062792060616d6f756e74602c206372656174696e6720612063726564697420746f2062652062616c616e6365642e2452657363696e646564040118616d6f756e74180128543a3a42616c616e63650010042501546f74616c2069737375616e636520776173206465637265617365642062792060616d6f756e74602c206372656174696e672061206465627420746f2062652062616c616e6365642e184c6f636b656408010c77686f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e636500110460536f6d652062616c616e636520776173206c6f636b65642e20556e6c6f636b656408010c77686f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e636500120468536f6d652062616c616e63652077617320756e6c6f636b65642e1846726f7a656e08010c77686f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e636500130460536f6d652062616c616e6365207761732066726f7a656e2e1854686177656408010c77686f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e636500140460536f6d652062616c616e636520776173207468617765642e4c546f74616c49737375616e6365466f7263656408010c6f6c64180128543a3a42616c616e636500010c6e6577180128543a3a42616c616e6365001504ac5468652060546f74616c49737375616e6365602077617320666f72636566756c6c79206368616e6765642e047c54686520604576656e746020656e756d206f6620746869732070616c6c65748814346672616d655f737570706f72741874726169747318746f6b656e73106d6973633442616c616e63655374617475730001081046726565000000205265736572766564000100008c0c6870616c6c65745f7472616e73616374696f6e5f7061796d656e741870616c6c6574144576656e74040454000104485472616e73616374696f6e466565506169640c010c77686f000130543a3a4163636f756e74496400012861637475616c5f66656518013042616c616e63654f663c543e00010c74697018013042616c616e63654f663c543e000008590141207472616e73616374696f6e20666565206061637475616c5f666565602c206f662077686963682060746970602077617320616464656420746f20746865206d696e696d756d20696e636c7573696f6e206665652c5c686173206265656e2070616964206279206077686f602e047c54686520604576656e746020656e756d206f6620746869732070616c6c6574900c6470616c6c65745f636f6c6c61746f725f73656c656374696f6e1870616c6c6574144576656e74040454000128404e6577496e76756c6e657261626c6573040134696e76756c6e657261626c65739401445665633c543a3a4163636f756e7449643e0000046c4e657720496e76756c6e657261626c65732077657265207365742e44496e76756c6e657261626c6541646465640401286163636f756e745f6964000130543a3a4163636f756e7449640001047441206e657720496e76756c6e657261626c65207761732061646465642e4c496e76756c6e657261626c6552656d6f7665640401286163636f756e745f6964000130543a3a4163636f756e74496400020470416e20496e76756c6e657261626c65207761732072656d6f7665642e504e65774465736972656443616e64696461746573040148646573697265645f63616e6469646174657310010c753332000304a4546865206e756d626572206f6620646573697265642063616e6469646174657320776173207365742e404e657743616e646964616379426f6e6404012c626f6e645f616d6f756e7418013042616c616e63654f663c543e0004046c5468652063616e64696461637920626f6e6420776173207365742e3843616e64696461746541646465640801286163636f756e745f6964000130543a3a4163636f756e74496400011c6465706f73697418013042616c616e63654f663c543e0005045c41206e65772063616e646964617465206a6f696e65642e5043616e646964617465426f6e64557064617465640801286163636f756e745f6964000130543a3a4163636f756e74496400011c6465706f73697418013042616c616e63654f663c543e00060470426f6e64206f6620612063616e64696461746520757064617465642e4043616e64696461746552656d6f7665640401286163636f756e745f6964000130543a3a4163636f756e74496400070460412063616e646964617465207761732072656d6f7665642e4443616e6469646174655265706c616365640c010c6f6c64000130543a3a4163636f756e74496400010c6e6577000130543a3a4163636f756e74496400011c6465706f73697418013042616c616e63654f663c543e000804f4416e206163636f756e7420776173207265706c6163656420696e207468652063616e646964617465206c69737420627920616e6f74686572206f6e652e68496e76616c6964496e76756c6e657261626c65536b69707065640401286163636f756e745f6964000130543a3a4163636f756e7449640009085501416e206163636f756e742077617320756e61626c6520746f20626520616464656420746f2074686520496e76756c6e657261626c65732062656361757365207468657920646964206e6f742068617665206b657973c8726567697374657265642e204f7468657220496e76756c6e657261626c6573206d61792068617665206265656e207365742e047c54686520604576656e746020656e756d206f6620746869732070616c6c6574940000020000980c3870616c6c65745f73657373696f6e1870616c6c6574144576656e74000104284e657753657373696f6e04013473657373696f6e5f696e64657810013053657373696f6e496e64657800000839014e65772073657373696f6e206861732068617070656e65642e204e6f746520746861742074686520617267756d656e74206973207468652073657373696f6e20696e6465782c206e6f74207468659c626c6f636b206e756d626572206173207468652074797065206d6967687420737567676573742e047c54686520604576656e746020656e756d206f6620746869732070616c6c65749c0c3c70616c6c65745f6d756c74697369671870616c6c6574144576656e740404540001102c4e65774d756c74697369670c0124617070726f76696e67000130543a3a4163636f756e7449640001206d756c7469736967000130543a3a4163636f756e74496400012463616c6c5f6861736804012043616c6c486173680000048c41206e6577206d756c7469736967206f7065726174696f6e2068617320626567756e2e404d756c7469736967417070726f76616c100124617070726f76696e67000130543a3a4163636f756e74496400012474696d65706f696e74a0017054696d65706f696e743c426c6f636b4e756d626572466f723c543e3e0001206d756c7469736967000130543a3a4163636f756e74496400012463616c6c5f6861736804012043616c6c48617368000104c841206d756c7469736967206f7065726174696f6e20686173206265656e20617070726f76656420627920736f6d656f6e652e404d756c74697369674578656375746564140124617070726f76696e67000130543a3a4163636f756e74496400012474696d65706f696e74a0017054696d65706f696e743c426c6f636b4e756d626572466f723c543e3e0001206d756c7469736967000130543a3a4163636f756e74496400012463616c6c5f6861736804012043616c6c48617368000118726573756c74a401384469737061746368526573756c740002049c41206d756c7469736967206f7065726174696f6e20686173206265656e2065786563757465642e444d756c746973696743616e63656c6c656410012863616e63656c6c696e67000130543a3a4163636f756e74496400012474696d65706f696e74a0017054696d65706f696e743c426c6f636b4e756d626572466f723c543e3e0001206d756c7469736967000130543a3a4163636f756e74496400012463616c6c5f6861736804012043616c6c48617368000304a041206d756c7469736967206f7065726174696f6e20686173206265656e2063616e63656c6c65642e047c54686520604576656e746020656e756d206f6620746869732070616c6c6574a0083c70616c6c65745f6d756c74697369672454696d65706f696e74042c426c6f636b4e756d62657201100008011868656967687410012c426c6f636b4e756d626572000114696e64657810010c7533320000a40418526573756c7408045401a8044501640108084f6b0400a8000000000c4572720400640000010000a80000040000ac0c3070616c6c65745f70726f78791870616c6c6574144576656e740404540001143450726f78794578656375746564040118726573756c74a401384469737061746368526573756c74000004bc412070726f78792077617320657865637574656420636f72726563746c792c20776974682074686520676976656e2e2c507572654372656174656410011070757265000130543a3a4163636f756e74496400010c77686f000130543a3a4163636f756e74496400012870726f78795f74797065b00130543a3a50726f787954797065000150646973616d626967756174696f6e5f696e646578b4010c753136000108dc412070757265206163636f756e7420686173206265656e2063726561746564206279206e65772070726f7879207769746820676976656e90646973616d626967756174696f6e20696e64657820616e642070726f787920747970652e24416e6e6f756e6365640c01107265616c000130543a3a4163636f756e74496400011470726f7879000130543a3a4163636f756e74496400012463616c6c5f6861736830013443616c6c486173684f663c543e000204e0416e20616e6e6f756e63656d656e742077617320706c6163656420746f206d616b6520612063616c6c20696e20746865206675747572652e2850726f7879416464656410012464656c656761746f72000130543a3a4163636f756e74496400012464656c656761746565000130543a3a4163636f756e74496400012870726f78795f74797065b00130543a3a50726f78795479706500011464656c6179100144426c6f636b4e756d626572466f723c543e00030448412070726f7879207761732061646465642e3050726f787952656d6f76656410012464656c656761746f72000130543a3a4163636f756e74496400012464656c656761746565000130543a3a4163636f756e74496400012870726f78795f74797065b00130543a3a50726f78795479706500011464656c6179100144426c6f636b4e756d626572466f723c543e00040450412070726f7879207761732072656d6f7665642e047c54686520604576656e746020656e756d206f6620746869732070616c6c6574b0084c646576656c6f706d656e745f72756e74696d652450726f7879547970650001340c416e790000002c4e6f6e5472616e7366657200010028476f7665726e616e6365000200205f5374616b696e67000300204e6f6e50726f787900040018426f72726f7700050018496e766573740006003c50726f78794d616e6167656d656e74000700484b657973746f72654d616e6167656d656e7400080030506f644f7065726174696f6e0009001c506f6441757468000a00505065726d697373696f6e4d616e6167656d656e74000b00205472616e73666572000c0000b40000050400b80c3870616c6c65745f7574696c6974791870616c6c6574144576656e74000118404261746368496e746572727570746564080114696e64657810010c7533320001146572726f7264013444697370617463684572726f7200000855014261746368206f66206469737061746368657320646964206e6f7420636f6d706c6574652066756c6c792e20496e646578206f66206669727374206661696c696e6720646973706174636820676976656e2c2061734877656c6c20617320746865206572726f722e384261746368436f6d706c65746564000104c84261746368206f66206469737061746368657320636f6d706c657465642066756c6c792077697468206e6f206572726f722e604261746368436f6d706c65746564576974684572726f7273000204b44261746368206f66206469737061746368657320636f6d706c657465642062757420686173206572726f72732e344974656d436f6d706c657465640003041d01412073696e676c65206974656d2077697468696e2061204261746368206f6620646973706174636865732068617320636f6d706c657465642077697468206e6f206572726f722e284974656d4661696c65640401146572726f7264013444697370617463684572726f720004041101412073696e676c65206974656d2077697468696e2061204261746368206f6620646973706174636865732068617320636f6d706c657465642077697468206572726f722e30446973706174636865644173040118726573756c74a401384469737061746368526573756c7400050458412063616c6c2077617320646973706174636865642e047c54686520604576656e746020656e756d206f6620746869732070616c6c6574bc0c4070616c6c65745f7363686564756c65721870616c6c6574144576656e74040454000118245363686564756c65640801107768656e100144426c6f636b4e756d626572466f723c543e000114696e64657810010c753332000004505363686564756c656420736f6d65207461736b2e2043616e63656c65640801107768656e100144426c6f636b4e756d626572466f723c543e000114696e64657810010c7533320001044c43616e63656c656420736f6d65207461736b2e28446973706174636865640c01107461736bc001785461736b416464726573733c426c6f636b4e756d626572466f723c543e3e00010869648001404f7074696f6e3c5461736b4e616d653e000118726573756c74a401384469737061746368526573756c74000204544469737061746368656420736f6d65207461736b2e3c43616c6c556e617661696c61626c650801107461736bc001785461736b416464726573733c426c6f636b4e756d626572466f723c543e3e00010869648001404f7074696f6e3c5461736b4e616d653e00030429015468652063616c6c20666f72207468652070726f7669646564206861736820776173206e6f7420666f756e6420736f20746865207461736b20686173206265656e2061626f727465642e38506572696f6469634661696c65640801107461736bc001785461736b416464726573733c426c6f636b4e756d626572466f723c543e3e00010869648001404f7074696f6e3c5461736b4e616d653e0004043d0154686520676976656e207461736b2077617320756e61626c6520746f2062652072656e657765642073696e636520746865206167656e64612069732066756c6c206174207468617420626c6f636b2e545065726d616e656e746c794f7665727765696768740801107461736bc001785461736b416464726573733c426c6f636b4e756d626572466f723c543e3e00010869648001404f7074696f6e3c5461736b4e616d653e000504f054686520676976656e207461736b2063616e206e657665722062652065786563757465642073696e6365206974206973206f7665727765696768742e04304576656e747320747970652ec000000408101000c40c4470616c6c65745f636f6c6c6563746976651870616c6c6574144576656e7408045400044900011c2050726f706f73656410011c6163636f756e74000130543a3a4163636f756e74496400013870726f706f73616c5f696e64657810013450726f706f73616c496e64657800013470726f706f73616c5f6861736830011c543a3a486173680001247468726573686f6c6410012c4d656d626572436f756e74000008490141206d6f74696f6e2028676976656e20686173682920686173206265656e2070726f706f7365642028627920676976656e206163636f756e742920776974682061207468726573686f6c642028676976656e3c604d656d626572436f756e7460292e14566f74656414011c6163636f756e74000130543a3a4163636f756e74496400013470726f706f73616c5f6861736830011c543a3a48617368000114766f746564780110626f6f6c00010c79657310012c4d656d626572436f756e740001086e6f10012c4d656d626572436f756e74000108050141206d6f74696f6e2028676976656e20686173682920686173206265656e20766f746564206f6e20627920676976656e206163636f756e742c206c656176696e671501612074616c6c79202879657320766f74657320616e64206e6f20766f74657320676976656e20726573706563746976656c7920617320604d656d626572436f756e7460292e20417070726f76656404013470726f706f73616c5f6861736830011c543a3a48617368000204c041206d6f74696f6e2077617320617070726f76656420627920746865207265717569726564207468726573686f6c642e2c446973617070726f76656404013470726f706f73616c5f6861736830011c543a3a48617368000304d041206d6f74696f6e20776173206e6f7420617070726f76656420627920746865207265717569726564207468726573686f6c642e20457865637574656408013470726f706f73616c5f6861736830011c543a3a48617368000118726573756c74a401384469737061746368526573756c74000404210141206d6f74696f6e207761732065786563757465643b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e384d656d626572457865637574656408013470726f706f73616c5f6861736830011c543a3a48617368000118726573756c74a401384469737061746368526573756c740005044901412073696e676c65206d656d6265722064696420736f6d6520616374696f6e3b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e18436c6f7365640c013470726f706f73616c5f6861736830011c543a3a4861736800010c79657310012c4d656d626572436f756e740001086e6f10012c4d656d626572436f756e740006045501412070726f706f73616c2077617320636c6f736564206265636175736520697473207468726573686f6c64207761732072656163686564206f7220616674657220697473206475726174696f6e207761732075702e047c54686520604576656e746020656e756d206f6620746869732070616c6c6574c80c6470616c6c65745f656c656374696f6e735f70687261676d656e1870616c6c6574144576656e7404045400011c1c4e65775465726d04012c6e65775f6d656d62657273cc01ec5665633c283c54206173206672616d655f73797374656d3a3a436f6e6669673e3a3a4163636f756e7449642c2042616c616e63654f663c543e293e000014450141206e6577207465726d2077697468206e65775f6d656d626572732e205468697320696e64696361746573207468617420656e6f7567682063616e64696461746573206578697374656420746f2072756e550174686520656c656374696f6e2c206e6f74207468617420656e6f756768206861766520686173206265656e20656c65637465642e2054686520696e6e65722076616c7565206d757374206265206578616d696e65644501666f72207468697320707572706f73652e204120604e65775465726d285c5b5c5d296020696e64696361746573207468617420736f6d652063616e6469646174657320676f7420746865697220626f6e645501736c617368656420616e64206e6f6e65207765726520656c65637465642c207768696c73742060456d7074795465726d60206d65616e732074686174206e6f2063616e64696461746573206578697374656420746f2c626567696e20776974682e24456d7074795465726d00010831014e6f20286f72206e6f7420656e6f756768292063616e64696461746573206578697374656420666f72207468697320726f756e642e205468697320697320646966666572656e742066726f6dc8604e65775465726d285c5b5c5d29602e2053656520746865206465736372697074696f6e206f6620604e65775465726d602e34456c656374696f6e4572726f72000204e4496e7465726e616c206572726f722068617070656e6564207768696c6520747279696e6720746f20706572666f726d20656c656374696f6e2e304d656d6265724b69636b65640401186d656d6265720001983c54206173206672616d655f73797374656d3a3a436f6e6669673e3a3a4163636f756e744964000308410141206d656d62657220686173206265656e2072656d6f7665642e20546869732073686f756c6420616c7761797320626520666f6c6c6f7765642062792065697468657220604e65775465726d60206f723060456d7074795465726d602e2452656e6f756e63656404012463616e6469646174650001983c54206173206672616d655f73797374656d3a3a436f6e6669673e3a3a4163636f756e74496400040498536f6d656f6e65206861732072656e6f756e6365642074686569722063616e6469646163792e4043616e646964617465536c617368656408012463616e6469646174650001983c54206173206672616d655f73797374656d3a3a436f6e6669673e3a3a4163636f756e744964000118616d6f756e7418013042616c616e63654f663c543e0005103901412063616e6469646174652077617320736c617368656420627920616d6f756e742064756520746f206661696c696e6720746f206f627461696e20612073656174206173206d656d626572206f722872756e6e65722d75702e00e44e6f74652074686174206f6c64206d656d6265727320616e642072756e6e6572732d75702061726520616c736f2063616e646964617465732e4453656174486f6c646572536c617368656408012c736561745f686f6c6465720001983c54206173206672616d655f73797374656d3a3a436f6e6669673e3a3a4163636f756e744964000118616d6f756e7418013042616c616e63654f663c543e000604350141207365617420686f6c6465722077617320736c617368656420627920616d6f756e74206279206265696e6720666f72636566756c6c792072656d6f7665642066726f6d20746865207365742e047c54686520604576656e746020656e756d206f6620746869732070616c6c6574cc000002d000d000000408001800d40c4070616c6c65745f64656d6f63726163791870616c6c6574144576656e740404540001442050726f706f73656408013870726f706f73616c5f696e64657810012450726f70496e64657800011c6465706f73697418013042616c616e63654f663c543e000004bc41206d6f74696f6e20686173206265656e2070726f706f7365642062792061207075626c6963206163636f756e742e185461626c656408013870726f706f73616c5f696e64657810012450726f70496e64657800011c6465706f73697418013042616c616e63654f663c543e000104d841207075626c69632070726f706f73616c20686173206265656e207461626c656420666f72207265666572656e64756d20766f74652e3845787465726e616c5461626c656400020494416e2065787465726e616c2070726f706f73616c20686173206265656e207461626c65642e1c537461727465640801247265665f696e64657810013c5265666572656e64756d496e6465780001247468726573686f6c64d80134566f74655468726573686f6c640003045c41207265666572656e64756d2068617320626567756e2e185061737365640401247265665f696e64657810013c5265666572656e64756d496e646578000404ac412070726f706f73616c20686173206265656e20617070726f766564206279207265666572656e64756d2e244e6f745061737365640401247265665f696e64657810013c5265666572656e64756d496e646578000504ac412070726f706f73616c20686173206265656e2072656a6563746564206279207265666572656e64756d2e2443616e63656c6c65640401247265665f696e64657810013c5265666572656e64756d496e6465780006048041207265666572656e64756d20686173206265656e2063616e63656c6c65642e2444656c65676174656408010c77686f000130543a3a4163636f756e744964000118746172676574000130543a3a4163636f756e744964000704dc416e206163636f756e74206861732064656c65676174656420746865697220766f746520746f20616e6f74686572206163636f756e742e2c556e64656c65676174656404011c6163636f756e74000130543a3a4163636f756e744964000804e4416e206163636f756e74206861732063616e63656c6c656420612070726576696f75732064656c65676174696f6e206f7065726174696f6e2e185665746f65640c010c77686f000130543a3a4163636f756e74496400013470726f706f73616c5f6861736830011c543a3a48617368000114756e74696c100144426c6f636b4e756d626572466f723c543e00090494416e2065787465726e616c2070726f706f73616c20686173206265656e207665746f65642e2c426c61636b6c697374656404013470726f706f73616c5f6861736830011c543a3a48617368000a04c4412070726f706f73616c5f6861736820686173206265656e20626c61636b6c6973746564207065726d616e656e746c792e14566f7465640c0114766f746572000130543a3a4163636f756e7449640001247265665f696e64657810013c5265666572656e64756d496e646578000110766f7465dc01644163636f756e74566f74653c42616c616e63654f663c543e3e000b0490416e206163636f756e742068617320766f74656420696e2061207265666572656e64756d205365636f6e6465640801207365636f6e646572000130543a3a4163636f756e74496400012870726f705f696e64657810012450726f70496e646578000c048c416e206163636f756e742068617320736563636f6e64656420612070726f706f73616c4050726f706f73616c43616e63656c656404012870726f705f696e64657810012450726f70496e646578000d0460412070726f706f73616c20676f742063616e63656c65642e2c4d657461646174615365740801146f776e6572e401344d657461646174614f776e6572043c4d65746164617461206f776e65722e01106861736830011c543a3a486173680438507265696d61676520686173682e0e04d44d6574616461746120666f7220612070726f706f73616c206f722061207265666572656e64756d20686173206265656e207365742e3c4d65746164617461436c65617265640801146f776e6572e401344d657461646174614f776e6572043c4d65746164617461206f776e65722e01106861736830011c543a3a486173680438507265696d61676520686173682e0f04e44d6574616461746120666f7220612070726f706f73616c206f722061207265666572656e64756d20686173206265656e20636c65617265642e4c4d657461646174615472616e736665727265640c0128707265765f6f776e6572e401344d657461646174614f776e6572046050726576696f7573206d65746164617461206f776e65722e01146f776e6572e401344d657461646174614f776e6572044c4e6577206d65746164617461206f776e65722e01106861736830011c543a3a486173680438507265696d61676520686173682e1004ac4d6574616461746120686173206265656e207472616e7366657272656420746f206e6577206f776e65722e047c54686520604576656e746020656e756d206f6620746869732070616c6c6574d80c4070616c6c65745f64656d6f637261637938766f74655f7468726573686f6c6434566f74655468726573686f6c6400010c5053757065724d616a6f72697479417070726f76650000005053757065724d616a6f72697479416761696e73740001003853696d706c654d616a6f7269747900020000dc0c4070616c6c65745f64656d6f637261637910766f74652c4163636f756e74566f7465041c42616c616e636501180108205374616e64617264080110766f7465e00110566f746500011c62616c616e636518011c42616c616e63650000001453706c697408010c61796518011c42616c616e636500010c6e617918011c42616c616e636500010000e00c4070616c6c65745f64656d6f637261637910766f746510566f74650000040008000000e40c4070616c6c65745f64656d6f6372616379147479706573344d657461646174614f776e657200010c2045787465726e616c0000002050726f706f73616c040010012450726f70496e646578000100285265666572656e64756d040010013c5265666572656e64756d496e64657800020000e80c3c70616c6c65745f6964656e746974791870616c6c6574144576656e740404540001442c4964656e7469747953657404010c77686f000130543a3a4163636f756e744964000004ec41206e616d652077617320736574206f72207265736574202877686963682077696c6c2072656d6f766520616c6c206a756467656d656e7473292e3c4964656e74697479436c656172656408010c77686f000130543a3a4163636f756e74496400011c6465706f73697418013042616c616e63654f663c543e000104cc41206e616d652077617320636c65617265642c20616e642074686520676976656e2062616c616e63652072657475726e65642e384964656e746974794b696c6c656408010c77686f000130543a3a4163636f756e74496400011c6465706f73697418013042616c616e63654f663c543e000204c441206e616d65207761732072656d6f76656420616e642074686520676976656e2062616c616e636520736c61736865642e484a756467656d656e7452657175657374656408010c77686f000130543a3a4163636f756e74496400013c7265676973747261725f696e646578100138526567697374726172496e6465780003049c41206a756467656d656e74207761732061736b65642066726f6d2061207265676973747261722e504a756467656d656e74556e72657175657374656408010c77686f000130543a3a4163636f756e74496400013c7265676973747261725f696e646578100138526567697374726172496e6465780004048841206a756467656d656e74207265717565737420776173207265747261637465642e384a756467656d656e74476976656e080118746172676574000130543a3a4163636f756e74496400013c7265676973747261725f696e646578100138526567697374726172496e6465780005049441206a756467656d656e742077617320676976656e2062792061207265676973747261722e38526567697374726172416464656404013c7265676973747261725f696e646578100138526567697374726172496e646578000604584120726567697374726172207761732061646465642e405375624964656e7469747941646465640c010c737562000130543a3a4163636f756e7449640001106d61696e000130543a3a4163636f756e74496400011c6465706f73697418013042616c616e63654f663c543e000704f441207375622d6964656e746974792077617320616464656420746f20616e206964656e7469747920616e6420746865206465706f73697420706169642e485375624964656e7469747952656d6f7665640c010c737562000130543a3a4163636f756e7449640001106d61696e000130543a3a4163636f756e74496400011c6465706f73697418013042616c616e63654f663c543e000804090141207375622d6964656e74697479207761732072656d6f7665642066726f6d20616e206964656e7469747920616e6420746865206465706f7369742066726565642e485375624964656e746974795265766f6b65640c010c737562000130543a3a4163636f756e7449640001106d61696e000130543a3a4163636f756e74496400011c6465706f73697418013042616c616e63654f663c543e000908190141207375622d6964656e746974792077617320636c65617265642c20616e642074686520676976656e206465706f7369742072657061747269617465642066726f6d20746865c86d61696e206964656e74697479206163636f756e7420746f20746865207375622d6964656e74697479206163636f756e742e38417574686f726974794164646564040124617574686f72697479000130543a3a4163636f756e744964000a047c4120757365726e616d6520617574686f72697479207761732061646465642e40417574686f7269747952656d6f766564040124617574686f72697479000130543a3a4163636f756e744964000b04844120757365726e616d6520617574686f72697479207761732072656d6f7665642e2c557365726e616d6553657408010c77686f000130543a3a4163636f756e744964000120757365726e616d65ec012c557365726e616d653c543e000c04744120757365726e616d65207761732073657420666f72206077686f602e38557365726e616d655175657565640c010c77686f000130543a3a4163636f756e744964000120757365726e616d65ec012c557365726e616d653c543e00012865787069726174696f6e100144426c6f636b4e756d626572466f723c543e000d0419014120757365726e616d6520776173207175657565642c20627574206077686f60206d75737420616363657074206974207072696f7220746f206065787069726174696f6e602e48507265617070726f76616c4578706972656404011477686f7365000130543a3a4163636f756e744964000e043901412071756575656420757365726e616d6520706173736564206974732065787069726174696f6e20776974686f7574206265696e6720636c61696d656420616e64207761732072656d6f7665642e485072696d617279557365726e616d6553657408010c77686f000130543a3a4163636f756e744964000120757365726e616d65ec012c557365726e616d653c543e000f0401014120757365726e616d6520776173207365742061732061207072696d61727920616e642063616e206265206c6f6f6b65642075702066726f6d206077686f602e5c44616e676c696e67557365726e616d6552656d6f76656408010c77686f000130543a3a4163636f756e744964000120757365726e616d65ec012c557365726e616d653c543e0010085d01412064616e676c696e6720757365726e616d652028617320696e2c206120757365726e616d6520636f72726573706f6e64696e6720746f20616e206163636f756e742074686174206861732072656d6f766564206974736c6964656e746974792920686173206265656e2072656d6f7665642e047c54686520604576656e746020656e756d206f6620746869732070616c6c6574ec0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401080453000004003401185665633c543e0000f00c3870616c6c65745f76657374696e671870616c6c6574144576656e740404540001083856657374696e675570646174656408011c6163636f756e74000130543a3a4163636f756e744964000120756e76657374656418013042616c616e63654f663c543e000008510154686520616d6f756e742076657374656420686173206265656e20757064617465642e205468697320636f756c6420696e6469636174652061206368616e676520696e2066756e647320617661696c61626c652e25015468652062616c616e636520676976656e2069732074686520616d6f756e74207768696368206973206c65667420756e7665737465642028616e642074687573206c6f636b6564292e4056657374696e67436f6d706c6574656404011c6163636f756e74000130543a3a4163636f756e7449640001049c416e205c5b6163636f756e745c5d20686173206265636f6d652066756c6c79207665737465642e047c54686520604576656e746020656e756d206f6620746869732070616c6c6574f40c3c70616c6c65745f74726561737572791870616c6c6574144576656e740804540004490001382050726f706f73656404013870726f706f73616c5f696e64657810013450726f706f73616c496e646578000004344e65772070726f706f73616c2e205370656e64696e670401406275646765745f72656d61696e696e6718013c42616c616e63654f663c542c20493e000104e45765206861766520656e6465642061207370656e6420706572696f6420616e642077696c6c206e6f7720616c6c6f636174652066756e64732e1c417761726465640c013870726f706f73616c5f696e64657810013450726f706f73616c496e646578000114617761726418013c42616c616e63654f663c542c20493e00011c6163636f756e74000130543a3a4163636f756e7449640002047c536f6d652066756e64732068617665206265656e20616c6c6f63617465642e2052656a656374656408013870726f706f73616c5f696e64657810013450726f706f73616c496e64657800011c736c617368656418013c42616c616e63654f663c542c20493e000304b0412070726f706f73616c207761732072656a65637465643b2066756e6473207765726520736c61736865642e144275726e7404012c6275726e745f66756e647318013c42616c616e63654f663c542c20493e00040488536f6d65206f66206f75722066756e64732068617665206265656e206275726e742e20526f6c6c6f766572040140726f6c6c6f7665725f62616c616e636518013c42616c616e63654f663c542c20493e0005042d015370656e64696e67206861732066696e69736865643b20746869732069732074686520616d6f756e74207468617420726f6c6c73206f76657220756e74696c206e657874207370656e642e1c4465706f73697404011476616c756518013c42616c616e63654f663c542c20493e0006047c536f6d652066756e64732068617665206265656e206465706f73697465642e345370656e64417070726f7665640c013870726f706f73616c5f696e64657810013450726f706f73616c496e646578000118616d6f756e7418013c42616c616e63654f663c542c20493e00012c62656e6566696369617279000130543a3a4163636f756e7449640007049c41206e6577207370656e642070726f706f73616c20686173206265656e20617070726f7665642e3c55706461746564496e61637469766508012c726561637469766174656418013c42616c616e63654f663c542c20493e00012c646561637469766174656418013c42616c616e63654f663c542c20493e000804cc54686520696e6163746976652066756e6473206f66207468652070616c6c65742068617665206265656e20757064617465642e4841737365745370656e64417070726f766564180114696e6465781001285370656e64496e64657800012861737365745f6b696e64a80130543a3a41737365744b696e64000118616d6f756e74180150417373657442616c616e63654f663c542c20493e00012c62656e6566696369617279000138543a3a42656e656669636961727900012876616c69645f66726f6d100144426c6f636b4e756d626572466f723c543e0001246578706972655f6174100144426c6f636b4e756d626572466f723c543e000904b441206e6577206173736574207370656e642070726f706f73616c20686173206265656e20617070726f7665642e4041737365745370656e64566f69646564040114696e6465781001285370656e64496e646578000a0474416e20617070726f766564207370656e642077617320766f696465642e1050616964080114696e6465781001285370656e64496e6465780001287061796d656e745f6964a801643c543a3a5061796d6173746572206173205061793e3a3a4964000b044c41207061796d656e742068617070656e65642e345061796d656e744661696c6564080114696e6465781001285370656e64496e6465780001287061796d656e745f6964a801643c543a3a5061796d6173746572206173205061793e3a3a4964000c049041207061796d656e74206661696c656420616e642063616e20626520726574726965642e385370656e6450726f636573736564040114696e6465781001285370656e64496e646578000d084d0141207370656e64207761732070726f63657373656420616e642072656d6f7665642066726f6d207468652073746f726167652e204974206d696768742068617665206265656e207375636365737366756c6c797070616964206f72206974206d6179206861766520657870697265642e047c54686520604576656e746020656e756d206f6620746869732070616c6c6574f80c3870616c6c65745f756e69717565731870616c6c6574144576656e7408045400044900016c1c437265617465640c0128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e496400011c63726561746f72000130543a3a4163636f756e7449640001146f776e6572000130543a3a4163636f756e7449640000046c412060636f6c6c656374696f6e602077617320637265617465642e30466f72636543726561746564080128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001146f776e6572000130543a3a4163636f756e74496400010484412060636f6c6c656374696f6e602077617320666f7263652d637265617465642e2444657374726f796564040128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e496400020474412060636f6c6c656374696f6e60207761732064657374726f7965642e184973737565640c0128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106974656dfc0124543a3a4974656d49640001146f776e6572000130543a3a4163636f756e74496400030454416e20606974656d6020776173206973737565642e2c5472616e73666572726564100128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106974656dfc0124543a3a4974656d496400011066726f6d000130543a3a4163636f756e744964000108746f000130543a3a4163636f756e74496400040468416e20606974656d6020776173207472616e736665727265642e184275726e65640c0128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106974656dfc0124543a3a4974656d49640001146f776e6572000130543a3a4163636f756e74496400050460416e20606974656d60207761732064657374726f7965642e1846726f7a656e080128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106974656dfc0124543a3a4974656d49640006045c536f6d6520606974656d60207761732066726f7a656e2e18546861776564080128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106974656dfc0124543a3a4974656d49640007045c536f6d6520606974656d6020776173207468617765642e40436f6c6c656374696f6e46726f7a656e040128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e496400080474536f6d652060636f6c6c656374696f6e60207761732066726f7a656e2e40436f6c6c656374696f6e546861776564040128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e496400090474536f6d652060636f6c6c656374696f6e6020776173207468617765642e304f776e65724368616e676564080128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001246e65775f6f776e6572000130543a3a4163636f756e744964000a0448546865206f776e6572206368616e6765642e2c5465616d4368616e676564100128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e4964000118697373756572000130543a3a4163636f756e74496400011461646d696e000130543a3a4163636f756e74496400011c667265657a6572000130543a3a4163636f756e744964000b0470546865206d616e6167656d656e74207465616d206368616e6765642e40417070726f7665645472616e73666572100128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106974656dfc0124543a3a4974656d49640001146f776e6572000130543a3a4163636f756e74496400012064656c6567617465000130543a3a4163636f756e744964000c083101416e20606974656d60206f6620612060636f6c6c656374696f6e6020686173206265656e20617070726f7665642062792074686520606f776e65726020666f72207472616e736665722062793461206064656c6567617465602e44417070726f76616c43616e63656c6c6564100128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106974656dfc0124543a3a4974656d49640001146f776e6572000130543a3a4163636f756e74496400012064656c6567617465000130543a3a4163636f756e744964000d081901416e20617070726f76616c20666f722061206064656c656761746560206163636f756e7420746f207472616e736665722074686520606974656d60206f6620616e206974656da860636f6c6c656374696f6e60207761732063616e63656c6c65642062792069747320606f776e6572602e444974656d5374617475734368616e676564040128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e4964000e041101412060636f6c6c656374696f6e602068617320686164206974732061747472696275746573206368616e676564206279207468652060466f72636560206f726967696e2e54436f6c6c656374696f6e4d657461646174615365740c0128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106461746101010178426f756e6465645665633c75382c20543a3a537472696e674c696d69743e00012469735f66726f7a656e780110626f6f6c000f04b44e6577206d6574616461746120686173206265656e2073657420666f7220612060636f6c6c656374696f6e602e64436f6c6c656374696f6e4d65746164617461436c6561726564040128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e4964001004b44d6574616461746120686173206265656e20636c656172656420666f7220612060636f6c6c656374696f6e602e2c4d65746164617461536574100128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106974656dfc0124543a3a4974656d49640001106461746101010178426f756e6465645665633c75382c20543a3a537472696e674c696d69743e00012469735f66726f7a656e780110626f6f6c001104984e6577206d6574616461746120686173206265656e2073657420666f7220616e206974656d2e3c4d65746164617461436c6561726564080128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106974656dfc0124543a3a4974656d4964001204984d6574616461746120686173206265656e20636c656172656420666f7220616e206974656d2e2c52656465706f7369746564080128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001407375636365737366756c5f6974656d73050101385665633c543a3a4974656d49643e001304984d6574616461746120686173206265656e20636c656172656420666f7220616e206974656d2e30417474726962757465536574100128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001286d617962655f6974656d090101444f7074696f6e3c543a3a4974656d49643e00010c6b65790101016c426f756e6465645665633c75382c20543a3a4b65794c696d69743e00011476616c756501010174426f756e6465645665633c75382c20543a3a56616c75654c696d69743e00140405014e657720617474726962757465206d6574616461746120686173206265656e2073657420666f7220612060636f6c6c656374696f6e60206f7220606974656d602e40417474726962757465436c65617265640c0128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001286d617962655f6974656d090101444f7074696f6e3c543a3a4974656d49643e00010c6b65790101016c426f756e6465645665633c75382c20543a3a4b65794c696d69743e0015040501417474726962757465206d6574616461746120686173206265656e20636c656172656420666f7220612060636f6c6c656374696f6e60206f7220606974656d602e684f776e657273686970416363657074616e63654368616e67656408010c77686f000130543a3a4163636f756e7449640001406d617962655f636f6c6c656374696f6e0d01015c4f7074696f6e3c543a3a436f6c6c656374696f6e49643e001604c04f776e65727368697020616363657074616e636520686173206368616e67656420666f7220616e206163636f756e742e58436f6c6c656374696f6e4d6178537570706c79536574080128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001286d61785f737570706c7910010c753332001704a44d617820737570706c7920686173206265656e2073657420666f72206120636f6c6c656374696f6e2e304974656d5072696365536574100128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106974656dfc0124543a3a4974656d4964000114707269636518013c4974656d50726963653c542c20493e00014477686974656c69737465645f6275796572110101504f7074696f6e3c543a3a4163636f756e7449643e0018048c546865207072696365207761732073657420666f722074686520696e7374616e63652e404974656d507269636552656d6f766564080128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106974656dfc0124543a3a4974656d49640019049c54686520707269636520666f722074686520696e7374616e6365207761732072656d6f7665642e284974656d426f75676874140128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106974656dfc0124543a3a4974656d4964000114707269636518013c4974656d50726963653c542c20493e00011873656c6c6572000130543a3a4163636f756e7449640001146275796572000130543a3a4163636f756e744964001a044c416e206974656d2077617320626f756768742e047c54686520604576656e746020656e756d206f6620746869732070616c6c6574fc0c386366675f7072696d697469766573147479706573184974656d49640000040018011075313238000001010c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401080453000004003401185665633c543e00000501000002fc00090104184f7074696f6e04045401fc0108104e6f6e6500000010536f6d650400fc00000100000d0104184f7074696f6e040454012c0108104e6f6e6500000010536f6d6504002c0000010000110104184f7074696f6e04045401000108104e6f6e6500000010536f6d65040000000001000015010c3c70616c6c65745f707265696d6167651870616c6c6574144576656e7404045400010c144e6f7465640401106861736830011c543a3a48617368000004684120707265696d61676520686173206265656e206e6f7465642e245265717565737465640401106861736830011c543a3a48617368000104784120707265696d61676520686173206265656e207265717565737465642e1c436c65617265640401106861736830011c543a3a486173680002046c4120707265696d616765206861732062656e20636c65617265642e047c54686520604576656e746020656e756d206f6620746869732070616c6c657419010c6070616c6c65745f636f6e76696374696f6e5f766f74696e671870616c6c6574144576656e740804540004490001082444656c6567617465640800000130543a3a4163636f756e7449640000000130543a3a4163636f756e7449640000041d01416e206163636f756e74206861732064656c65676174656420746865697220766f746520746f20616e6f74686572206163636f756e742e205c5b77686f2c207461726765745c5d2c556e64656c6567617465640400000130543a3a4163636f756e744964000104f4416e205c5b6163636f756e745c5d206861732063616e63656c6c656420612070726576696f75732064656c65676174696f6e206f7065726174696f6e2e047c54686520604576656e746020656e756d206f6620746869732070616c6c65741d010c4070616c6c65745f7265666572656e64611870616c6c6574144576656e74080454000449000140245375626d69747465640c0114696e64657810013c5265666572656e64756d496e6465780460496e646578206f6620746865207265666572656e64756d2e0114747261636bb4013c547261636b49644f663c542c20493e04250154686520747261636b2028616e6420627920657874656e73696f6e2070726f706f73616c206469737061746368206f726967696e29206f662074686973207265666572656e64756d2e012070726f706f73616c2101014c426f756e64656443616c6c4f663c542c20493e04805468652070726f706f73616c20666f7220746865207265666572656e64756d2e00048041207265666572656e64756d20686173206265656e207375626d69747465642e544465636973696f6e4465706f736974506c616365640c0114696e64657810013c5265666572656e64756d496e6465780460496e646578206f6620746865207265666572656e64756d2e010c77686f000130543a3a4163636f756e744964048c546865206163636f756e742077686f20706c6163656420746865206465706f7369742e0118616d6f756e7418013c42616c616e63654f663c542c20493e048454686520616d6f756e7420706c6163656420627920746865206163636f756e742e010494546865206465636973696f6e206465706f73697420686173206265656e20706c616365642e5c4465636973696f6e4465706f736974526566756e6465640c0114696e64657810013c5265666572656e64756d496e6465780460496e646578206f6620746865207265666572656e64756d2e010c77686f000130543a3a4163636f756e744964048c546865206163636f756e742077686f20706c6163656420746865206465706f7369742e0118616d6f756e7418013c42616c616e63654f663c542c20493e048454686520616d6f756e7420706c6163656420627920746865206163636f756e742e02049c546865206465636973696f6e206465706f73697420686173206265656e20726566756e6465642e384465706f736974536c617368656408010c77686f000130543a3a4163636f756e744964048c546865206163636f756e742077686f20706c6163656420746865206465706f7369742e0118616d6f756e7418013c42616c616e63654f663c542c20493e048454686520616d6f756e7420706c6163656420627920746865206163636f756e742e03046c41206465706f73697420686173206265656e20736c61736865642e3c4465636973696f6e53746172746564100114696e64657810013c5265666572656e64756d496e6465780460496e646578206f6620746865207265666572656e64756d2e0114747261636bb4013c547261636b49644f663c542c20493e04250154686520747261636b2028616e6420627920657874656e73696f6e2070726f706f73616c206469737061746368206f726967696e29206f662074686973207265666572656e64756d2e012070726f706f73616c2101014c426f756e64656443616c6c4f663c542c20493e04805468652070726f706f73616c20666f7220746865207265666572656e64756d2e011474616c6c7979070120543a3a54616c6c7904b85468652063757272656e742074616c6c79206f6620766f74657320696e2074686973207265666572656e64756d2e0404bc41207265666572656e64756d20686173206d6f76656420696e746f20746865206465636964696e672070686173652e38436f6e6669726d53746172746564040114696e64657810013c5265666572656e64756d496e6465780460496e646578206f6620746865207265666572656e64756d2e050038436f6e6669726d41626f72746564040114696e64657810013c5265666572656e64756d496e6465780460496e646578206f6620746865207265666572656e64756d2e060024436f6e6669726d6564080114696e64657810013c5265666572656e64756d496e6465780460496e646578206f6620746865207265666572656e64756d2e011474616c6c7979070120543a3a54616c6c7904b05468652066696e616c2074616c6c79206f6620766f74657320696e2074686973207265666572656e64756d2e0704210141207265666572656e64756d2068617320656e6465642069747320636f6e6669726d6174696f6e20706861736520616e6420697320726561647920666f7220617070726f76616c2e20417070726f766564040114696e64657810013c5265666572656e64756d496e6465780460496e646578206f6620746865207265666572656e64756d2e08040d0141207265666572656e64756d20686173206265656e20617070726f76656420616e64206974732070726f706f73616c20686173206265656e207363686564756c65642e2052656a6563746564080114696e64657810013c5265666572656e64756d496e6465780460496e646578206f6620746865207265666572656e64756d2e011474616c6c7979070120543a3a54616c6c7904b05468652066696e616c2074616c6c79206f6620766f74657320696e2074686973207265666572656e64756d2e0904ac412070726f706f73616c20686173206265656e2072656a6563746564206279207265666572656e64756d2e2054696d65644f7574080114696e64657810013c5265666572656e64756d496e6465780460496e646578206f6620746865207265666572656e64756d2e011474616c6c7979070120543a3a54616c6c7904b05468652066696e616c2074616c6c79206f6620766f74657320696e2074686973207265666572656e64756d2e0a04d841207265666572656e64756d20686173206265656e2074696d6564206f757420776974686f7574206265696e6720646563696465642e2443616e63656c6c6564080114696e64657810013c5265666572656e64756d496e6465780460496e646578206f6620746865207265666572656e64756d2e011474616c6c7979070120543a3a54616c6c7904b05468652066696e616c2074616c6c79206f6620766f74657320696e2074686973207265666572656e64756d2e0b048041207265666572656e64756d20686173206265656e2063616e63656c6c65642e184b696c6c6564080114696e64657810013c5265666572656e64756d496e6465780460496e646578206f6620746865207265666572656e64756d2e011474616c6c7979070120543a3a54616c6c7904b05468652066696e616c2074616c6c79206f6620766f74657320696e2074686973207265666572656e64756d2e0c047441207265666572656e64756d20686173206265656e206b696c6c65642e645375626d697373696f6e4465706f736974526566756e6465640c0114696e64657810013c5265666572656e64756d496e6465780460496e646578206f6620746865207265666572656e64756d2e010c77686f000130543a3a4163636f756e744964048c546865206163636f756e742077686f20706c6163656420746865206465706f7369742e0118616d6f756e7418013c42616c616e63654f663c542c20493e048454686520616d6f756e7420706c6163656420627920746865206163636f756e742e0d04a4546865207375626d697373696f6e206465706f73697420686173206265656e20726566756e6465642e2c4d65746164617461536574080114696e64657810013c5265666572656e64756d496e6465780460496e646578206f6620746865207265666572656e64756d2e01106861736830011c543a3a486173680438507265696d61676520686173682e0e049c4d6574616461746120666f722061207265666572656e64756d20686173206265656e207365742e3c4d65746164617461436c6561726564080114696e64657810013c5265666572656e64756d496e6465780460496e646578206f6620746865207265666572656e64756d2e01106861736830011c543a3a486173680438507265696d61676520686173682e0f04ac4d6574616461746120666f722061207265666572656e64756d20686173206265656e20636c65617265642e047c54686520604576656e746020656e756d206f6620746869732070616c6c6574210110346672616d655f737570706f72741874726169747324707265696d616765731c426f756e6465640804540125010448017107010c184c656761637904011068617368300124483a3a4f757470757400000018496e6c696e65040075070134426f756e646564496e6c696e65000100184c6f6f6b757008011068617368300124483a3a4f757470757400010c6c656e10010c753332000200002501084c646576656c6f706d656e745f72756e74696d652c52756e74696d6543616c6c0001f01853797374656d0400290101ad0173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c53797374656d2c2052756e74696d653e0000003c50617261636861696e53797374656d0400390101d10173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c50617261636861696e53797374656d2c2052756e74696d653e0001002454696d657374616d700400710101b90173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c54696d657374616d702c2052756e74696d653e0003002042616c616e6365730400750101b50173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c42616c616e6365732c2052756e74696d653e00140044436f6c6c61746f7253656c656374696f6e04008d0101d90173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c436f6c6c61746f7253656c656374696f6e2c2052756e74696d653e0047001c53657373696f6e0400910101b10173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c53657373696f6e2c2052756e74696d653e001f00204d756c74697369670400a10101b50173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c4d756c74697369672c2052756e74696d653e003c001450726f78790400a90101a90173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c50726f78792c2052756e74696d653e003d001c5574696c6974790400b50101b10173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c5574696c6974792c2052756e74696d653e003e00245363686564756c65720400290201b90173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c5363686564756c65722c2052756e74696d653e003f001c436f756e63696c0400310201b10173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c436f756e63696c2c2052756e74696d653e00400024456c656374696f6e730400350201b90173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c456c656374696f6e732c2052756e74696d653e0041002444656d6f637261637904003d0201b90173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c44656d6f63726163792c2052756e74696d653e004200204964656e7469747904004d0201b50173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c4964656e746974792c2052756e74696d653e0043001c56657374696e670400090301b10173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c56657374696e672c2052756e74696d653e0044002054726561737572790400110301b50173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c54726561737572792c2052756e74696d653e0045001c556e69717565730400150301b10173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c556e69717565732c2052756e74696d653e00460020507265696d6167650400250301b50173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c507265696d6167652c2052756e74696d653e00480040436f6e76696374696f6e566f74696e6704002d0301d50173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c436f6e76696374696f6e566f74696e672c2052756e74696d653e005000245265666572656e64610400410301b90173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c5265666572656e64612c2052756e74696d653e0051002457686974656c6973740400490301b90173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c57686974656c6973742c2052756e74696d653e00530048546563686e6963616c436f6d6d697474656504004d0301dd0173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c546563686e6963616c436f6d6d69747465652c2052756e74696d653e00540070546563686e6963616c436f6d6d69747465654d656d626572736869700400510301050273656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c546563686e6963616c436f6d6d69747465654d656d626572736869702c2052756e74696d653e00550010466565730400550301a50173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c466565732c2052756e74696d653e005a0018416e63686f7204005d0301ad0173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c416e63686f722c2052756e74696d653e005b0028506f6f6c53797374656d0400650301bd0173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c506f6f6c53797374656d2c2052756e74696d653e005f00144c6f616e730400750301a90173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c4c6f616e732c2052756e74696d653e0060002c5065726d697373696f6e730400110401c10173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c5065726d697373696f6e732c2052756e74696d653e00610044436f6c6c61746f72416c6c6f776c6973740400250401d90173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c436f6c6c61746f72416c6c6f776c6973742c2052756e74696d653e00620018546f6b656e730400290401ad0173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c546f6b656e732c2052756e74696d653e0063001842726964676504002d0401ad0173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c4272696467652c2052756e74696d653e006500204b657973746f72650400310401b50173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c4b657973746f72652c2052756e74696d653e0068002c496e766573746d656e74730400450401c10173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c496e766573746d656e74732c2052756e74696d653e006900404c69717569646974795265776172647304004d0401d50173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c4c6971756964697479526577617264732c2052756e74696d653e006b00384c6971756964697479506f6f6c730400510401cd0173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c4c6971756964697479506f6f6c732c2052756e74696d653e006c0030506f6f6c52656769737472790400590401c50173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c506f6f6c52656769737472792c2052756e74696d653e006d0030426c6f636b526577617264730400bd0401c50173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c426c6f636b526577617264732c2052756e74696d653e006f00445472616e73666572416c6c6f774c6973740400c10401d90173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c5472616e73666572416c6c6f774c6973742c2052756e74696d653e007000544c6971756964697479506f6f6c73476174657761790400010501e90173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c4c6971756964697479506f6f6c73476174657761792c2052756e74696d653e007300244f72646572426f6f6b04002d0501b90173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c4f72646572426f6f6b2c2052756e74696d653e0074003c4f7261636c655072696365466565640400390501d10173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c4f7261636c655072696365466565642c2052756e74696d653e007600544f7261636c655072696365436f6c6c656374696f6e04003d0501e90173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c4f7261636c655072696365436f6c6c656374696f6e2c2052756e74696d653e00770024416e63686f727356320400510501b90173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c416e63686f727356322c2052756e74696d653e008200684c6971756964697479506f6f6c734761746577617951756575650400550501fd0173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c4c6971756964697479506f6f6c734761746577617951756575652c2052756e74696d653e0083002458636d7051756575650400590501b90173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c58636d7051756575652c2052756e74696d653e0078002c506f6c6b61646f7458636d04005d0501c10173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c506f6c6b61646f7458636d2c2052756e74696d653e0079001c58546f6b656e730400910601b10173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c58546f6b656e732c2052756e74696d653e007c003458636d5472616e736163746f720400a10601c90173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c58636d5472616e736163746f722c2052756e74696d653e007d00304d65737361676551756575650400c90601c50173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c4d65737361676551756575652c2052756e74696d653e007f002c436861696e4272696467650400d10601c10173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c436861696e4272696467652c2052756e74696d653e009700444f726d6c417373657452656769737472790400d50601d90173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c4f726d6c417373657452656769737472792c2052756e74696d653e0098001c4f726d6c58636d0400010701b10173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c4f726d6c58636d2c2052756e74696d653e0099000c45564d0400050701a10173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c45564d2c2052756e74696d653e00a0001c426173654665650400150701b10173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c426173654665652c2052756e74696d653e00a20020457468657265756d04001d0701b50173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c457468657265756d2c2052756e74696d653e00a3006c4c6971756964697479506f6f6c734178656c6172476174657761790400450701010273656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c4c6971756964697479506f6f6c734178656c6172476174657761792c2052756e74696d653e00a500105375646f04004d0701a50173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c5375646f2c2052756e74696d653e00c80020506f6f6c466565730400510701b50173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c506f6f6c466565732c2052756e74696d653e00fa001c52656d61726b730400550701b10173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c52656d61726b732c2052756e74696d653e00fb0020546f6b656e4d757804006d0701b50173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a64697370617463680a3a3a43616c6c61626c6543616c6c466f723c546f6b656e4d75782c2052756e74696d653e00fd000029010c306672616d655f73797374656d1870616c6c65741043616c6c04045400012c1872656d61726b04011872656d61726b34011c5665633c75383e0000045c536565205b6050616c6c65743a3a72656d61726b605d2e387365745f686561705f706167657304011470616765732c010c7536340001047c536565205b6050616c6c65743a3a7365745f686561705f7061676573605d2e207365745f636f6465040110636f646534011c5665633c75383e00020464536565205b6050616c6c65743a3a7365745f636f6465605d2e5c7365745f636f64655f776974686f75745f636865636b73040110636f646534011c5665633c75383e000304a0536565205b6050616c6c65743a3a7365745f636f64655f776974686f75745f636865636b73605d2e2c7365745f73746f726167650401146974656d732d0101345665633c4b657956616c75653e00040470536565205b6050616c6c65743a3a7365745f73746f72616765605d2e306b696c6c5f73746f726167650401106b657973350101205665633c4b65793e00050474536565205b6050616c6c65743a3a6b696c6c5f73746f72616765605d2e2c6b696c6c5f70726566697808011870726566697834010c4b657900011c7375626b65797310010c75333200060470536565205b6050616c6c65743a3a6b696c6c5f707265666978605d2e4472656d61726b5f776974685f6576656e7404011872656d61726b34011c5665633c75383e00070488536565205b6050616c6c65743a3a72656d61726b5f776974685f6576656e74605d2e44617574686f72697a655f75706772616465040124636f64655f6861736830011c543a3a4861736800090488536565205b6050616c6c65743a3a617574686f72697a655f75706772616465605d2e80617574686f72697a655f757067726164655f776974686f75745f636865636b73040124636f64655f6861736830011c543a3a48617368000a04c4536565205b6050616c6c65743a3a617574686f72697a655f757067726164655f776974686f75745f636865636b73605d2e606170706c795f617574686f72697a65645f75706772616465040110636f646534011c5665633c75383e000b04a4536565205b6050616c6c65743a3a6170706c795f617574686f72697a65645f75706772616465605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e2d010000023101003101000004083434003501000002340039010c7c63756d756c75735f70616c6c65745f70617261636861696e5f73797374656d1870616c6c65741043616c6c0404540001104c7365745f76616c69646174696f6e5f64617461040110646174613d01015450617261636861696e496e686572656e744461746100000490536565205b6050616c6c65743a3a7365745f76616c69646174696f6e5f64617461605d2e607375646f5f73656e645f7570776172645f6d65737361676504011c6d6573736167653401345570776172644d657373616765000104a4536565205b6050616c6c65743a3a7375646f5f73656e645f7570776172645f6d657373616765605d2e44617574686f72697a655f75706772616465080124636f64655f6861736830011c543a3a48617368000134636865636b5f76657273696f6e780110626f6f6c00020488536565205b6050616c6c65743a3a617574686f72697a655f75706772616465605d2e60656e6163745f617574686f72697a65645f75706772616465040110636f646534011c5665633c75383e000304a4536565205b6050616c6c65743a3a656e6163745f617574686f72697a65645f75706772616465605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e3d01089463756d756c75735f7072696d6974697665735f70617261636861696e5f696e686572656e745450617261636861696e496e686572656e7444617461000010013c76616c69646174696f6e5f646174614101015c50657273697374656456616c69646174696f6e4461746100014472656c61795f636861696e5f73746174654901015473705f747269653a3a53746f7261676550726f6f66000144646f776e776172645f6d657373616765735101016c5665633c496e626f756e64446f776e776172644d6573736167653e00014c686f72697a6f6e74616c5f6d65737361676573590101a442547265654d61703c5061726149642c205665633c496e626f756e6448726d704d6573736167653e3e000041010c4c706f6c6b61646f745f7072696d6974697665730876365c50657273697374656456616c69646174696f6e446174610804480130044e01100010012c706172656e745f6865616445010120486561644461746100014c72656c61795f706172656e745f6e756d6265721001044e00016472656c61795f706172656e745f73746f726167655f726f6f74300104480001306d61785f706f765f73697a6510010c753332000045010c74706f6c6b61646f745f70617261636861696e5f7072696d697469766573287072696d6974697665732048656164446174610000040034011c5665633c75383e000049010c1c73705f747269653473746f726167655f70726f6f663053746f7261676550726f6f660000040128747269655f6e6f6465734d01014442547265655365743c5665633c75383e3e00004d010420425472656553657404045401340004003501000000510100000255010055010860706f6c6b61646f745f636f72655f7072696d69746976657358496e626f756e64446f776e776172644d657373616765042c426c6f636b4e756d62657201100008011c73656e745f617410012c426c6f636b4e756d62657200010c6d736734013c446f776e776172644d65737361676500005901042042547265654d617008044b015d01045601610100040069010000005d010c74706f6c6b61646f745f70617261636861696e5f7072696d697469766573287072696d6974697665730849640000040010010c7533320000610100000265010065010860706f6c6b61646f745f636f72655f7072696d69746976657348496e626f756e6448726d704d657373616765042c426c6f636b4e756d62657201100008011c73656e745f617410012c426c6f636b4e756d6265720001106461746134015073705f7374643a3a7665633a3a5665633c75383e000069010000026d01006d01000004085d0161010071010c4070616c6c65745f74696d657374616d701870616c6c65741043616c6c0404540001040c73657404010c6e6f77280124543a3a4d6f6d656e7400000450536565205b6050616c6c65743a3a736574605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e75010c3c70616c6c65745f62616c616e6365731870616c6c65741043616c6c080454000449000120507472616e736665725f616c6c6f775f646561746808011064657374790101504163636f756e7449644c6f6f6b75704f663c543e00011476616c756585010128543a3a42616c616e636500000494536565205b6050616c6c65743a3a7472616e736665725f616c6c6f775f6465617468605d2e38666f7263655f7472616e736665720c0118736f75726365790101504163636f756e7449644c6f6f6b75704f663c543e00011064657374790101504163636f756e7449644c6f6f6b75704f663c543e00011476616c756585010128543a3a42616c616e63650002047c536565205b6050616c6c65743a3a666f7263655f7472616e73666572605d2e4c7472616e736665725f6b6565705f616c69766508011064657374790101504163636f756e7449644c6f6f6b75704f663c543e00011476616c756585010128543a3a42616c616e636500030490536565205b6050616c6c65743a3a7472616e736665725f6b6565705f616c697665605d2e307472616e736665725f616c6c08011064657374790101504163636f756e7449644c6f6f6b75704f663c543e0001286b6565705f616c697665780110626f6f6c00040474536565205b6050616c6c65743a3a7472616e736665725f616c6c605d2e3c666f7263655f756e7265736572766508010c77686f790101504163636f756e7449644c6f6f6b75704f663c543e000118616d6f756e74180128543a3a42616c616e636500050480536565205b6050616c6c65743a3a666f7263655f756e72657365727665605d2e40757067726164655f6163636f756e747304010c77686f9401445665633c543a3a4163636f756e7449643e00060484536565205b6050616c6c65743a3a757067726164655f6163636f756e7473605d2e44666f7263655f7365745f62616c616e636508010c77686f790101504163636f756e7449644c6f6f6b75704f663c543e0001206e65775f6672656585010128543a3a42616c616e636500080488536565205b6050616c6c65743a3a666f7263655f7365745f62616c616e6365605d2e6c666f7263655f61646a7573745f746f74616c5f69737375616e6365080124646972656374696f6e8901014c41646a7573746d656e74446972656374696f6e00011464656c746185010128543a3a42616c616e6365000904b0536565205b6050616c6c65743a3a666f7263655f61646a7573745f746f74616c5f69737375616e6365605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e79010c2873705f72756e74696d65306d756c746961646472657373304d756c74694164647265737308244163636f756e7449640100304163636f756e74496e64657801a8011408496404000001244163636f756e74496400000014496e64657804007d0101304163636f756e74496e6465780001000c526177040034011c5665633c75383e0002002441646472657373333204000401205b75383b2033325d000300244164647265737332300400810101205b75383b2032305d000400007d01000006a80081010000031400000008008501000006180089010c3c70616c6c65745f62616c616e6365731474797065734c41646a7573746d656e74446972656374696f6e00010820496e637265617365000000204465637265617365000100008d010c6470616c6c65745f636f6c6c61746f725f73656c656374696f6e1870616c6c65741043616c6c040454000124447365745f696e76756c6e657261626c657304010c6e65779401445665633c543a3a4163636f756e7449643e00000488536565205b6050616c6c65743a3a7365745f696e76756c6e657261626c6573605d2e587365745f646573697265645f63616e6469646174657304010c6d617810010c7533320001049c536565205b6050616c6c65743a3a7365745f646573697265645f63616e64696461746573605d2e487365745f63616e6469646163795f626f6e64040110626f6e6418013042616c616e63654f663c543e0002048c536565205b6050616c6c65743a3a7365745f63616e6469646163795f626f6e64605d2e5472656769737465725f61735f63616e64696461746500030498536565205b6050616c6c65743a3a72656769737465725f61735f63616e646964617465605d2e306c656176655f696e74656e7400040474536565205b6050616c6c65743a3a6c656176655f696e74656e74605d2e406164645f696e76756c6e657261626c6504010c77686f000130543a3a4163636f756e74496400050484536565205b6050616c6c65743a3a6164645f696e76756c6e657261626c65605d2e4c72656d6f76655f696e76756c6e657261626c6504010c77686f000130543a3a4163636f756e74496400060490536565205b6050616c6c65743a3a72656d6f76655f696e76756c6e657261626c65605d2e2c7570646174655f626f6e6404012c6e65775f6465706f73697418013042616c616e63654f663c543e00070470536565205b6050616c6c65743a3a7570646174655f626f6e64605d2e4c74616b655f63616e6469646174655f736c6f7408011c6465706f73697418013042616c616e63654f663c543e000118746172676574000130543a3a4163636f756e74496400080490536565205b6050616c6c65743a3a74616b655f63616e6469646174655f736c6f74605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e91010c3870616c6c65745f73657373696f6e1870616c6c65741043616c6c040454000108207365745f6b6579730801106b6579739501011c543a3a4b65797300011470726f6f6634011c5665633c75383e00000464536565205b6050616c6c65743a3a7365745f6b657973605d2e2870757267655f6b6579730001046c536565205b6050616c6c65743a3a70757267655f6b657973605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e9501084c646576656c6f706d656e745f72756e74696d652c53657373696f6e4b657973000008011061757261990101c43c41757261206173202463726174653a3a426f756e64546f52756e74696d654170705075626c69633e3a3a5075626c6963000134626c6f636b5f72657761726473990101e43c426c6f636b52657761726473206173202463726174653a3a426f756e64546f52756e74696d654170705075626c69633e3a3a5075626c696300009901104473705f636f6e73656e7375735f617572611c737232353531392c6170705f73723235353139185075626c6963000004009d01013c737232353531393a3a5075626c696300009d010c1c73705f636f72651c73723235353139185075626c6963000004000401205b75383b2033325d0000a1010c3c70616c6c65745f6d756c74697369671870616c6c65741043616c6c0404540001105061735f6d756c74695f7468726573686f6c645f310801446f746865725f7369676e61746f726965739401445665633c543a3a4163636f756e7449643e00011063616c6c2501017c426f783c3c5420617320436f6e6669673e3a3a52756e74696d6543616c6c3e00000494536565205b6050616c6c65743a3a61735f6d756c74695f7468726573686f6c645f31605d2e2061735f6d756c74691401247468726573686f6c64b4010c7531360001446f746865725f7369676e61746f726965739401445665633c543a3a4163636f756e7449643e00013c6d617962655f74696d65706f696e74a50101904f7074696f6e3c54696d65706f696e743c426c6f636b4e756d626572466f723c543e3e3e00011063616c6c2501017c426f783c3c5420617320436f6e6669673e3a3a52756e74696d6543616c6c3e0001286d61785f77656967687424011857656967687400010464536565205b6050616c6c65743a3a61735f6d756c7469605d2e40617070726f76655f61735f6d756c74691401247468726573686f6c64b4010c7531360001446f746865725f7369676e61746f726965739401445665633c543a3a4163636f756e7449643e00013c6d617962655f74696d65706f696e74a50101904f7074696f6e3c54696d65706f696e743c426c6f636b4e756d626572466f723c543e3e3e00012463616c6c5f686173680401205b75383b2033325d0001286d61785f77656967687424011857656967687400020484536565205b6050616c6c65743a3a617070726f76655f61735f6d756c7469605d2e3c63616e63656c5f61735f6d756c74691001247468726573686f6c64b4010c7531360001446f746865725f7369676e61746f726965739401445665633c543a3a4163636f756e7449643e00012474696d65706f696e74a0017054696d65706f696e743c426c6f636b4e756d626572466f723c543e3e00012463616c6c5f686173680401205b75383b2033325d00030480536565205b6050616c6c65743a3a63616e63656c5f61735f6d756c7469605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732ea50104184f7074696f6e04045401a00108104e6f6e6500000010536f6d650400a00000010000a9010c3070616c6c65745f70726f78791870616c6c65741043616c6c0404540001281470726f78790c01107265616c790101504163636f756e7449644c6f6f6b75704f663c543e000140666f7263655f70726f78795f74797065ad0101504f7074696f6e3c543a3a50726f7879547970653e00011063616c6c2501017c426f783c3c5420617320436f6e6669673e3a3a52756e74696d6543616c6c3e00000458536565205b6050616c6c65743a3a70726f7879605d2e246164645f70726f78790c012064656c6567617465790101504163636f756e7449644c6f6f6b75704f663c543e00012870726f78795f74797065b00130543a3a50726f78795479706500011464656c6179100144426c6f636b4e756d626572466f723c543e00010468536565205b6050616c6c65743a3a6164645f70726f7879605d2e3072656d6f76655f70726f78790c012064656c6567617465790101504163636f756e7449644c6f6f6b75704f663c543e00012870726f78795f74797065b00130543a3a50726f78795479706500011464656c6179100144426c6f636b4e756d626572466f723c543e00020474536565205b6050616c6c65743a3a72656d6f76655f70726f7879605d2e3872656d6f76655f70726f786965730003047c536565205b6050616c6c65743a3a72656d6f76655f70726f78696573605d2e2c6372656174655f707572650c012870726f78795f74797065b00130543a3a50726f78795479706500011464656c6179100144426c6f636b4e756d626572466f723c543e000114696e646578b4010c75313600040470536565205b6050616c6c65743a3a6372656174655f70757265605d2e246b696c6c5f7075726514011c737061776e6572790101504163636f756e7449644c6f6f6b75704f663c543e00012870726f78795f74797065b00130543a3a50726f787954797065000114696e646578b4010c753136000118686569676874b1010144426c6f636b4e756d626572466f723c543e0001246578745f696e646578b101010c75333200050468536565205b6050616c6c65743a3a6b696c6c5f70757265605d2e20616e6e6f756e63650801107265616c790101504163636f756e7449644c6f6f6b75704f663c543e00012463616c6c5f6861736830013443616c6c486173684f663c543e00060464536565205b6050616c6c65743a3a616e6e6f756e6365605d2e4c72656d6f76655f616e6e6f756e63656d656e740801107265616c790101504163636f756e7449644c6f6f6b75704f663c543e00012463616c6c5f6861736830013443616c6c486173684f663c543e00070490536565205b6050616c6c65743a3a72656d6f76655f616e6e6f756e63656d656e74605d2e4c72656a6563745f616e6e6f756e63656d656e7408012064656c6567617465790101504163636f756e7449644c6f6f6b75704f663c543e00012463616c6c5f6861736830013443616c6c486173684f663c543e00080490536565205b6050616c6c65743a3a72656a6563745f616e6e6f756e63656d656e74605d2e3c70726f78795f616e6e6f756e63656410012064656c6567617465790101504163636f756e7449644c6f6f6b75704f663c543e0001107265616c790101504163636f756e7449644c6f6f6b75704f663c543e000140666f7263655f70726f78795f74797065ad0101504f7074696f6e3c543a3a50726f7879547970653e00011063616c6c2501017c426f783c3c5420617320436f6e6669673e3a3a52756e74696d6543616c6c3e00090480536565205b6050616c6c65743a3a70726f78795f616e6e6f756e636564605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732ead0104184f7074696f6e04045401b00108104e6f6e6500000010536f6d650400b00000010000b1010000061000b5010c3870616c6c65745f7574696c6974791870616c6c65741043616c6c04045400011814626174636804011463616c6c73b901017c5665633c3c5420617320436f6e6669673e3a3a52756e74696d6543616c6c3e00000458536565205b6050616c6c65743a3a6261746368605d2e3461735f64657269766174697665080114696e646578b4010c75313600011063616c6c2501017c426f783c3c5420617320436f6e6669673e3a3a52756e74696d6543616c6c3e00010478536565205b6050616c6c65743a3a61735f64657269766174697665605d2e2462617463685f616c6c04011463616c6c73b901017c5665633c3c5420617320436f6e6669673e3a3a52756e74696d6543616c6c3e00020468536565205b6050616c6c65743a3a62617463685f616c6c605d2e2c64697370617463685f617308012461735f6f726967696ebd010154426f783c543a3a50616c6c6574734f726967696e3e00011063616c6c2501017c426f783c3c5420617320436f6e6669673e3a3a52756e74696d6543616c6c3e00030470536565205b6050616c6c65743a3a64697370617463685f6173605d2e2c666f7263655f626174636804011463616c6c73b901017c5665633c3c5420617320436f6e6669673e3a3a52756e74696d6543616c6c3e00040470536565205b6050616c6c65743a3a666f7263655f6261746368605d2e2c776974685f77656967687408011063616c6c2501017c426f783c3c5420617320436f6e6669673e3a3a52756e74696d6543616c6c3e00011877656967687424011857656967687400050470536565205b6050616c6c65743a3a776974685f776569676874605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732eb901000002250100bd01084c646576656c6f706d656e745f72756e74696d65304f726967696e43616c6c65720001241873797374656d0400c10101746672616d655f73797374656d3a3a4f726967696e3c52756e74696d653e0000001c436f756e63696c0400c50101010170616c6c65745f636f6c6c6563746976653a3a4f726967696e3c52756e74696d652c2070616c6c65745f636f6c6c6563746976653a3a496e7374616e6365313e0040001c4f726967696e730400c901017470616c6c65745f637573746f6d5f6f726967696e733a3a4f726967696e00520048546563686e6963616c436f6d6d69747465650400cd0101010170616c6c65745f636f6c6c6563746976653a3a4f726967696e3c52756e74696d652c2070616c6c65745f636f6c6c6563746976653a3a496e7374616e6365323e005400544c6971756964697479506f6f6c73476174657761790400d101019870616c6c65745f6c69717569646974795f706f6f6c735f676174657761793a3a4f726967696e0073002c506f6c6b61646f7458636d0400d901014870616c6c65745f78636d3a3a4f726967696e0079002843756d756c757358636d04001902016863756d756c75735f70616c6c65745f78636d3a3a4f726967696e007a0020457468657265756d04001d02015c70616c6c65745f657468657265756d3a3a4f726967696e00a30010566f69640400250201410173656c663a3a73705f6170695f68696464656e5f696e636c756465735f636f6e7374727563745f72756e74696d653a3a68696464656e5f696e636c7564653a3a0a5f5f707269766174653a3a566f696400080000c1010c346672616d655f737570706f7274206469737061746368245261774f726967696e04244163636f756e7449640100010c10526f6f74000000185369676e656404000001244163636f756e744964000100104e6f6e6500020000c501084470616c6c65745f636f6c6c656374697665245261774f726967696e08244163636f756e7449640100044900010c1c4d656d62657273080010012c4d656d626572436f756e74000010012c4d656d626572436f756e74000000184d656d62657204000001244163636f756e744964000100205f5068616e746f6d00020000c901143872756e74696d655f636f6d6d6f6e1c6f726967696e730c676f765470616c6c65745f637573746f6d5f6f726967696e73184f726967696e0001144457686974656c697374656443616c6c65720000002454726561737572657200010024506f6f6c41646d696e0002004c5265666572656e64756d43616e63656c6c6572000300405265666572656e64756d4b696c6c657200040000cd01084470616c6c65745f636f6c6c656374697665245261774f726967696e08244163636f756e7449640100044900010c1c4d656d62657273080010012c4d656d626572436f756e74000010012c4d656d626572436f756e74000000184d656d62657204000001244163636f756e744964000100205f5068616e746f6d00020000d1010c7870616c6c65745f6c69717569646974795f706f6f6c735f67617465776179186f726967696e34476174657761794f726967696e00010418446f6d61696e0400d5010134446f6d61696e4164647265737300000000d5010c246366675f747970657338646f6d61696e5f6164647265737334446f6d61696e416464726573730001082843656e7472696675676504000401205b75383b2033325d0000000c45564d08002c012845564d436861696e49640000810101205b75383b2032305d00010000d9010c2870616c6c65745f78636d1870616c6c6574184f726967696e0001080c58636d0400dd0101204c6f636174696f6e00000020526573706f6e73650400dd0101204c6f636174696f6e00010000dd01102c73746167696e675f78636d087634206c6f636174696f6e204c6f636174696f6e000008011c706172656e74730801087538000120696e746572696f72e10101244a756e6374696f6e730000e101102c73746167696e675f78636d087634246a756e6374696f6e73244a756e6374696f6e7300012410486572650000000858310400e50101484172633c5b4a756e6374696f6e3b20315d3e0001000858320400fd0101484172633c5b4a756e6374696f6e3b20325d3e0002000858330400010201484172633c5b4a756e6374696f6e3b20335d3e0003000858340400050201484172633c5b4a756e6374696f6e3b20345d3e0004000858350400090201484172633c5b4a756e6374696f6e3b20355d3e00050008583604000d0201484172633c5b4a756e6374696f6e3b20365d3e0006000858370400110201484172633c5b4a756e6374696f6e3b20375d3e0007000858380400150201484172633c5b4a756e6374696f6e3b20385d3e00080000e50100000301000000e90100e901102c73746167696e675f78636d087634206a756e6374696f6e204a756e6374696f6e0001282450617261636861696e0400b101010c7533320000002c4163636f756e744964333208011c6e6574776f726bed0101444f7074696f6e3c4e6574776f726b49643e00010869640401205b75383b2033325d000100384163636f756e74496e646578363408011c6e6574776f726bed0101444f7074696f6e3c4e6574776f726b49643e000114696e64657828010c753634000200304163636f756e744b6579323008011c6e6574776f726bed0101444f7074696f6e3c4e6574776f726b49643e00010c6b6579810101205b75383b2032305d0003003850616c6c6574496e7374616e6365040008010875380004003047656e6572616c496e646578040085010110753132380005002847656e6572616c4b65790801186c656e6774680801087538000110646174610401205b75383b2033325d000600244f6e6c794368696c6400070024506c7572616c6974790801086964f5010118426f6479496400011070617274f9010120426f6479506172740008003c476c6f62616c436f6e73656e7375730400f10101244e6574776f726b496400090000ed0104184f7074696f6e04045401f1010108104e6f6e6500000010536f6d650400f1010000010000f101102c73746167696e675f78636d087634206a756e6374696f6e244e6574776f726b496400012c24427947656e6573697304000401205b75383b2033325d000000184279466f726b080130626c6f636b5f6e756d6265722c010c753634000128626c6f636b5f686173680401205b75383b2033325d00010020506f6c6b61646f74000200184b7573616d610003001c57657374656e6400040018526f636f636f00050018576f636f636f00060020457468657265756d040120636861696e5f696428010c7536340007002c426974636f696e436f72650008002c426974636f696e4361736800090040506f6c6b61646f7442756c6c6574696e000a0000f501100c78636d087633206a756e6374696f6e18426f6479496400012810556e69740000001c4d6f6e696b6572040044011c5b75383b20345d00010014496e6465780400b101010c7533320002002445786563757469766500030024546563686e6963616c0004002c4c656769736c6174697665000500204a7564696369616c0006001c446566656e73650007003841646d696e697374726174696f6e00080020547265617375727900090000f901100c78636d087633206a756e6374696f6e20426f64795061727400011414566f6963650000001c4d656d62657273040114636f756e74b101010c753332000100204672616374696f6e08010c6e6f6db101010c75333200011464656e6f6db101010c7533320002004441744c6561737450726f706f7274696f6e08010c6e6f6db101010c75333200011464656e6f6db101010c753332000300484d6f72655468616e50726f706f7274696f6e08010c6e6f6db101010c75333200011464656e6f6db101010c75333200040000fd0100000302000000e90100010200000303000000e90100050200000304000000e90100090200000305000000e901000d0200000306000000e90100110200000307000000e90100150200000308000000e9010019020c4863756d756c75735f70616c6c65745f78636d1870616c6c6574184f726967696e0001081452656c6179000000405369626c696e6750617261636861696e04005d010118506172614964000100001d02083c70616c6c65745f657468657265756d245261774f726967696e0001044c457468657265756d5472616e73616374696f6e04002102011048313630000000002102083c7072696d69746976655f7479706573104831363000000400810101205b75383b2032305d00002502081c73705f636f726510566f69640001000029020c4070616c6c65745f7363686564756c65721870616c6c65741043616c6c040454000118207363686564756c651001107768656e100144426c6f636b4e756d626572466f723c543e0001386d617962655f706572696f6469632d0201ac4f7074696f6e3c7363686564756c653a3a506572696f643c426c6f636b4e756d626572466f723c543e3e3e0001207072696f726974790801487363686564756c653a3a5072696f7269747900011063616c6c2501017c426f783c3c5420617320436f6e6669673e3a3a52756e74696d6543616c6c3e00000464536565205b6050616c6c65743a3a7363686564756c65605d2e1863616e63656c0801107768656e100144426c6f636b4e756d626572466f723c543e000114696e64657810010c7533320001045c536565205b6050616c6c65743a3a63616e63656c605d2e387363686564756c655f6e616d656414010869640401205461736b4e616d650001107768656e100144426c6f636b4e756d626572466f723c543e0001386d617962655f706572696f6469632d0201ac4f7074696f6e3c7363686564756c653a3a506572696f643c426c6f636b4e756d626572466f723c543e3e3e0001207072696f726974790801487363686564756c653a3a5072696f7269747900011063616c6c2501017c426f783c3c5420617320436f6e6669673e3a3a52756e74696d6543616c6c3e0002047c536565205b6050616c6c65743a3a7363686564756c655f6e616d6564605d2e3063616e63656c5f6e616d656404010869640401205461736b4e616d6500030474536565205b6050616c6c65743a3a63616e63656c5f6e616d6564605d2e387363686564756c655f61667465721001146166746572100144426c6f636b4e756d626572466f723c543e0001386d617962655f706572696f6469632d0201ac4f7074696f6e3c7363686564756c653a3a506572696f643c426c6f636b4e756d626572466f723c543e3e3e0001207072696f726974790801487363686564756c653a3a5072696f7269747900011063616c6c2501017c426f783c3c5420617320436f6e6669673e3a3a52756e74696d6543616c6c3e0004047c536565205b6050616c6c65743a3a7363686564756c655f6166746572605d2e507363686564756c655f6e616d65645f616674657214010869640401205461736b4e616d650001146166746572100144426c6f636b4e756d626572466f723c543e0001386d617962655f706572696f6469632d0201ac4f7074696f6e3c7363686564756c653a3a506572696f643c426c6f636b4e756d626572466f723c543e3e3e0001207072696f726974790801487363686564756c653a3a5072696f7269747900011063616c6c2501017c426f783c3c5420617320436f6e6669673e3a3a52756e74696d6543616c6c3e00050494536565205b6050616c6c65743a3a7363686564756c655f6e616d65645f6166746572605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e2d0204184f7074696f6e04045401c00108104e6f6e6500000010536f6d650400c0000001000031020c4470616c6c65745f636f6c6c6563746976651870616c6c65741043616c6c0804540004490001182c7365745f6d656d626572730c012c6e65775f6d656d626572739401445665633c543a3a4163636f756e7449643e0001147072696d65110101504f7074696f6e3c543a3a4163636f756e7449643e0001246f6c645f636f756e7410012c4d656d626572436f756e7400000470536565205b6050616c6c65743a3a7365745f6d656d62657273605d2e1c6578656375746508012070726f706f73616c2501017c426f783c3c5420617320436f6e6669673c493e3e3a3a50726f706f73616c3e0001306c656e6774685f626f756e64b101010c75333200010460536565205b6050616c6c65743a3a65786563757465605d2e1c70726f706f73650c01247468726573686f6c64b101012c4d656d626572436f756e7400012070726f706f73616c2501017c426f783c3c5420617320436f6e6669673c493e3e3a3a50726f706f73616c3e0001306c656e6774685f626f756e64b101010c75333200020460536565205b6050616c6c65743a3a70726f706f7365605d2e10766f74650c012070726f706f73616c30011c543a3a48617368000114696e646578b101013450726f706f73616c496e64657800011c617070726f7665780110626f6f6c00030454536565205b6050616c6c65743a3a766f7465605d2e4c646973617070726f76655f70726f706f73616c04013470726f706f73616c5f6861736830011c543a3a4861736800050490536565205b6050616c6c65743a3a646973617070726f76655f70726f706f73616c605d2e14636c6f736510013470726f706f73616c5f6861736830011c543a3a48617368000114696e646578b101013450726f706f73616c496e64657800015470726f706f73616c5f7765696768745f626f756e642401185765696768740001306c656e6774685f626f756e64b101010c75333200060458536565205b6050616c6c65743a3a636c6f7365605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e35020c6470616c6c65745f656c656374696f6e735f70687261676d656e1870616c6c65741043616c6c04045400011810766f7465080114766f7465739401445665633c543a3a4163636f756e7449643e00011476616c75658501013042616c616e63654f663c543e00000454536565205b6050616c6c65743a3a766f7465605d2e3072656d6f76655f766f74657200010474536565205b6050616c6c65743a3a72656d6f76655f766f746572605d2e407375626d69745f63616e64696461637904013c63616e6469646174655f636f756e74b101010c75333200020484536565205b6050616c6c65743a3a7375626d69745f63616e646964616379605d2e4872656e6f756e63655f63616e64696461637904012872656e6f756e63696e673902012852656e6f756e63696e670003048c536565205b6050616c6c65743a3a72656e6f756e63655f63616e646964616379605d2e3472656d6f76655f6d656d6265720c010c77686f790101504163636f756e7449644c6f6f6b75704f663c543e000128736c6173685f626f6e64780110626f6f6c000138726572756e5f656c656374696f6e780110626f6f6c00040478536565205b6050616c6c65743a3a72656d6f76655f6d656d626572605d2e50636c65616e5f646566756e63745f766f746572730801286e756d5f766f7465727310010c75333200012c6e756d5f646566756e637410010c75333200050494536565205b6050616c6c65743a3a636c65616e5f646566756e63745f766f74657273605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e3902086470616c6c65745f656c656374696f6e735f70687261676d656e2852656e6f756e63696e6700010c184d656d6265720000002052756e6e657255700001002443616e6469646174650400b101010c753332000200003d020c4070616c6c65745f64656d6f63726163791870616c6c65741043616c6c04045400014c1c70726f706f736508012070726f706f73616c21010140426f756e64656443616c6c4f663c543e00011476616c75658501013042616c616e63654f663c543e00000460536565205b6050616c6c65743a3a70726f706f7365605d2e187365636f6e6404012070726f706f73616cb101012450726f70496e6465780001045c536565205b6050616c6c65743a3a7365636f6e64605d2e10766f74650801247265665f696e646578b101013c5265666572656e64756d496e646578000110766f7465dc01644163636f756e74566f74653c42616c616e63654f663c543e3e00020454536565205b6050616c6c65743a3a766f7465605d2e40656d657267656e63795f63616e63656c0401247265665f696e64657810013c5265666572656e64756d496e64657800030484536565205b6050616c6c65743a3a656d657267656e63795f63616e63656c605d2e4065787465726e616c5f70726f706f736504012070726f706f73616c21010140426f756e64656443616c6c4f663c543e00040484536565205b6050616c6c65743a3a65787465726e616c5f70726f706f7365605d2e6465787465726e616c5f70726f706f73655f6d616a6f7269747904012070726f706f73616c21010140426f756e64656443616c6c4f663c543e000504a8536565205b6050616c6c65743a3a65787465726e616c5f70726f706f73655f6d616a6f72697479605d2e6065787465726e616c5f70726f706f73655f64656661756c7404012070726f706f73616c21010140426f756e64656443616c6c4f663c543e000604a4536565205b6050616c6c65743a3a65787465726e616c5f70726f706f73655f64656661756c74605d2e28666173745f747261636b0c013470726f706f73616c5f6861736830011c543a3a48617368000134766f74696e675f706572696f64100144426c6f636b4e756d626572466f723c543e00011464656c6179100144426c6f636b4e756d626572466f723c543e0007046c536565205b6050616c6c65743a3a666173745f747261636b605d2e347665746f5f65787465726e616c04013470726f706f73616c5f6861736830011c543a3a4861736800080478536565205b6050616c6c65743a3a7665746f5f65787465726e616c605d2e4463616e63656c5f7265666572656e64756d0401247265665f696e646578b101013c5265666572656e64756d496e64657800090488536565205b6050616c6c65743a3a63616e63656c5f7265666572656e64756d605d2e2064656c65676174650c0108746f790101504163636f756e7449644c6f6f6b75704f663c543e000128636f6e76696374696f6e41020128436f6e76696374696f6e00011c62616c616e636518013042616c616e63654f663c543e000a0464536565205b6050616c6c65743a3a64656c6567617465605d2e28756e64656c6567617465000b046c536565205b6050616c6c65743a3a756e64656c6567617465605d2e58636c6561725f7075626c69635f70726f706f73616c73000c049c536565205b6050616c6c65743a3a636c6561725f7075626c69635f70726f706f73616c73605d2e18756e6c6f636b040118746172676574790101504163636f756e7449644c6f6f6b75704f663c543e000d045c536565205b6050616c6c65743a3a756e6c6f636b605d2e2c72656d6f76655f766f7465040114696e64657810013c5265666572656e64756d496e646578000e0470536565205b6050616c6c65743a3a72656d6f76655f766f7465605d2e4472656d6f76655f6f746865725f766f7465080118746172676574790101504163636f756e7449644c6f6f6b75704f663c543e000114696e64657810013c5265666572656e64756d496e646578000f0488536565205b6050616c6c65743a3a72656d6f76655f6f746865725f766f7465605d2e24626c61636b6c69737408013470726f706f73616c5f6861736830011c543a3a4861736800013c6d617962655f7265665f696e6465784502015c4f7074696f6e3c5265666572656e64756d496e6465783e00100468536565205b6050616c6c65743a3a626c61636b6c697374605d2e3c63616e63656c5f70726f706f73616c04012870726f705f696e646578b101012450726f70496e64657800110480536565205b6050616c6c65743a3a63616e63656c5f70726f706f73616c605d2e307365745f6d657461646174610801146f776e6572e401344d657461646174614f776e65720001286d617962655f686173684902013c4f7074696f6e3c543a3a486173683e00120474536565205b6050616c6c65743a3a7365745f6d65746164617461605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e41020c4070616c6c65745f64656d6f637261637928636f6e76696374696f6e28436f6e76696374696f6e00011c104e6f6e65000000204c6f636b65643178000100204c6f636b65643278000200204c6f636b65643378000300204c6f636b65643478000400204c6f636b65643578000500204c6f636b6564367800060000450204184f7074696f6e04045401100108104e6f6e6500000010536f6d650400100000010000490204184f7074696f6e04045401300108104e6f6e6500000010536f6d6504003000000100004d020c3c70616c6c65745f6964656e746974791870616c6c65741043616c6c040454000158346164645f72656769737472617204011c6163636f756e74790101504163636f756e7449644c6f6f6b75704f663c543e00000478536565205b6050616c6c65743a3a6164645f726567697374726172605d2e307365745f6964656e74697479040110696e666f5102016c426f783c543a3a4964656e74697479496e666f726d6174696f6e3e00010474536565205b6050616c6c65743a3a7365745f6964656e74697479605d2e207365745f7375627304011073756273e10201645665633c28543a3a4163636f756e7449642c2044617461293e00020464536565205b6050616c6c65743a3a7365745f73756273605d2e38636c6561725f6964656e746974790003047c536565205b6050616c6c65743a3a636c6561725f6964656e74697479605d2e44726571756573745f6a756467656d656e740801247265675f696e646578b1010138526567697374726172496e64657800011c6d61785f6665658501013042616c616e63654f663c543e00040488536565205b6050616c6c65743a3a726571756573745f6a756467656d656e74605d2e3863616e63656c5f726571756573740401247265675f696e646578100138526567697374726172496e6465780005047c536565205b6050616c6c65743a3a63616e63656c5f72657175657374605d2e1c7365745f666565080114696e646578b1010138526567697374726172496e64657800010c6665658501013042616c616e63654f663c543e00060460536565205b6050616c6c65743a3a7365745f666565605d2e387365745f6163636f756e745f6964080114696e646578b1010138526567697374726172496e64657800010c6e6577790101504163636f756e7449644c6f6f6b75704f663c543e0007047c536565205b6050616c6c65743a3a7365745f6163636f756e745f6964605d2e287365745f6669656c6473080114696e646578b1010138526567697374726172496e6465780001186669656c64732c0129013c543a3a4964656e74697479496e666f726d6174696f6e206173204964656e74697479496e666f726d6174696f6e50726f76696465723e3a3a0a4669656c64734964656e7469666965720008046c536565205b6050616c6c65743a3a7365745f6669656c6473605d2e4470726f766964655f6a756467656d656e741001247265675f696e646578b1010138526567697374726172496e646578000118746172676574790101504163636f756e7449644c6f6f6b75704f663c543e0001246a756467656d656e74e902015c4a756467656d656e743c42616c616e63654f663c543e3e0001206964656e7469747930011c543a3a4861736800090488536565205b6050616c6c65743a3a70726f766964655f6a756467656d656e74605d2e346b696c6c5f6964656e74697479040118746172676574790101504163636f756e7449644c6f6f6b75704f663c543e000a0478536565205b6050616c6c65743a3a6b696c6c5f6964656e74697479605d2e1c6164645f73756208010c737562790101504163636f756e7449644c6f6f6b75704f663c543e000110646174615d02011044617461000b0460536565205b6050616c6c65743a3a6164645f737562605d2e2872656e616d655f73756208010c737562790101504163636f756e7449644c6f6f6b75704f663c543e000110646174615d02011044617461000c046c536565205b6050616c6c65743a3a72656e616d655f737562605d2e2872656d6f76655f73756204010c737562790101504163636f756e7449644c6f6f6b75704f663c543e000d046c536565205b6050616c6c65743a3a72656d6f76655f737562605d2e20717569745f737562000e0464536565205b6050616c6c65743a3a717569745f737562605d2e586164645f757365726e616d655f617574686f726974790c0124617574686f72697479790101504163636f756e7449644c6f6f6b75704f663c543e00011873756666697834011c5665633c75383e000128616c6c6f636174696f6e10010c753332000f049c536565205b6050616c6c65743a3a6164645f757365726e616d655f617574686f72697479605d2e6472656d6f76655f757365726e616d655f617574686f72697479040124617574686f72697479790101504163636f756e7449644c6f6f6b75704f663c543e001004a8536565205b6050616c6c65743a3a72656d6f76655f757365726e616d655f617574686f72697479605d2e407365745f757365726e616d655f666f720c010c77686f790101504163636f756e7449644c6f6f6b75704f663c543e000120757365726e616d6534011c5665633c75383e0001247369676e6174757265ed0201704f7074696f6e3c543a3a4f6666636861696e5369676e61747572653e00110484536565205b6050616c6c65743a3a7365745f757365726e616d655f666f72605d2e3c6163636570745f757365726e616d65040120757365726e616d65ec012c557365726e616d653c543e00120480536565205b6050616c6c65743a3a6163636570745f757365726e616d65605d2e5c72656d6f76655f657870697265645f617070726f76616c040120757365726e616d65ec012c557365726e616d653c543e001304a0536565205b6050616c6c65743a3a72656d6f76655f657870697265645f617070726f76616c605d2e507365745f7072696d6172795f757365726e616d65040120757365726e616d65ec012c557365726e616d653c543e00140494536565205b6050616c6c65743a3a7365745f7072696d6172795f757365726e616d65605d2e6072656d6f76655f64616e676c696e675f757365726e616d65040120757365726e616d65ec012c557365726e616d653c543e001504a4536565205b6050616c6c65743a3a72656d6f76655f64616e676c696e675f757365726e616d65605d2e04704964656e746974792070616c6c6574206465636c61726174696f6e2e51020c3c70616c6c65745f6964656e74697479186c6567616379304964656e74697479496e666f04284669656c644c696d697400002401286164646974696f6e616c55020190426f756e6465645665633c28446174612c2044617461292c204669656c644c696d69743e00011c646973706c61795d020110446174610001146c6567616c5d0201104461746100010c7765625d0201104461746100011072696f745d02011044617461000114656d61696c5d0201104461746100013c7067705f66696e6765727072696e74dd0201404f7074696f6e3c5b75383b2032305d3e000114696d6167655d0201104461746100011c747769747465725d02011044617461000055020c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e646564566563080454015902045300000400d90201185665633c543e00005902000004085d025d02005d020c3c70616c6c65745f6964656e746974791474797065731044617461000198104e6f6e65000000105261773004006102000001001052617731040065020000020010526177320400690200000300105261773304006d0200000400105261773404004400000500105261773504007102000006001052617736040075020000070010526177370400790200000800105261773804007d020000090010526177390400810200000a001452617731300400850200000b001452617731310400890200000c0014526177313204008d0200000d001452617731330400910200000e001452617731340400950200000f00145261773135040099020000100014526177313604009d02000011001452617731370400a102000012001452617731380400a502000013001452617731390400a9020000140014526177323004008101000015001452617732310400ad02000016001452617732320400b102000017001452617732330400b502000018001452617732340400b902000019001452617732350400bd0200001a001452617732360400c10200001b001452617732370400c50200001c001452617732380400c90200001d001452617732390400cd0200001e001452617733300400d10200001f001452617733310400d50200002000145261773332040004000021002c426c616b6554776f323536040004000022001853686132353604000400002300244b656363616b323536040004000024002c536861546872656532353604000400002500006102000003000000000800650200000301000000080069020000030200000008006d020000030300000008007102000003050000000800750200000306000000080079020000030700000008007d02000003080000000800810200000309000000080085020000030a000000080089020000030b00000008008d020000030c000000080091020000030d000000080095020000030e000000080099020000030f00000008009d02000003100000000800a102000003110000000800a502000003120000000800a902000003130000000800ad02000003150000000800b102000003160000000800b502000003170000000800b902000003180000000800bd02000003190000000800c1020000031a0000000800c5020000031b0000000800c9020000031c0000000800cd020000031d0000000800d1020000031e0000000800d5020000031f0000000800d902000002590200dd0204184f7074696f6e0404540181010108104e6f6e6500000010536f6d65040081010000010000e102000002e50200e50200000408005d0200e9020c3c70616c6c65745f6964656e74697479147479706573244a756467656d656e74041c42616c616e63650118011c1c556e6b6e6f776e0000001c46656550616964040018011c42616c616e636500010028526561736f6e61626c65000200244b6e6f776e476f6f64000300244f75744f6644617465000400284c6f775175616c697479000500244572726f6e656f757300060000ed0204184f7074696f6e04045401f1020108104e6f6e6500000010536f6d650400f1020000010000f102082873705f72756e74696d65384d756c74695369676e617475726500010c1c456432353531390400f5020148656432353531393a3a5369676e61747572650000001c537232353531390400fd020148737232353531393a3a5369676e617475726500010014456364736104000103014065636473613a3a5369676e617475726500020000f5020c1c73705f636f72651c65643235353139245369676e617475726500000400f90201205b75383b2036345d0000f902000003400000000800fd020c1c73705f636f72651c73723235353139245369676e617475726500000400f90201205b75383b2036345d000001030c1c73705f636f7265146563647361245369676e6174757265000004000503017c5b75383b205349474e41545552455f53455249414c495a45445f53495a455d0000050300000341000000080009030c3870616c6c65745f76657374696e671870616c6c65741043616c6c040454000118107665737400000454536565205b6050616c6c65743a3a76657374605d2e28766573745f6f74686572040118746172676574790101504163636f756e7449644c6f6f6b75704f663c543e0001046c536565205b6050616c6c65743a3a766573745f6f74686572605d2e3c7665737465645f7472616e73666572080118746172676574790101504163636f756e7449644c6f6f6b75704f663c543e0001207363686564756c650d0301b056657374696e67496e666f3c42616c616e63654f663c543e2c20426c6f636b4e756d626572466f723c543e3e00020480536565205b6050616c6c65743a3a7665737465645f7472616e73666572605d2e54666f7263655f7665737465645f7472616e736665720c0118736f75726365790101504163636f756e7449644c6f6f6b75704f663c543e000118746172676574790101504163636f756e7449644c6f6f6b75704f663c543e0001207363686564756c650d0301b056657374696e67496e666f3c42616c616e63654f663c543e2c20426c6f636b4e756d626572466f723c543e3e00030498536565205b6050616c6c65743a3a666f7263655f7665737465645f7472616e73666572605d2e3c6d657267655f7363686564756c657308013c7363686564756c65315f696e64657810010c75333200013c7363686564756c65325f696e64657810010c75333200040480536565205b6050616c6c65743a3a6d657267655f7363686564756c6573605d2e74666f7263655f72656d6f76655f76657374696e675f7363686564756c650801187461726765747901018c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f757263650001387363686564756c655f696e64657810010c753332000504b8536565205b6050616c6c65743a3a666f7263655f72656d6f76655f76657374696e675f7363686564756c65605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e0d030c3870616c6c65745f76657374696e673076657374696e675f696e666f2c56657374696e67496e666f081c42616c616e636501182c426c6f636b4e756d6265720110000c01186c6f636b656418011c42616c616e63650001247065725f626c6f636b18011c42616c616e63650001387374617274696e675f626c6f636b10012c426c6f636b4e756d626572000011030c3c70616c6c65745f74726561737572791870616c6c65741043616c6c0804540004490001243470726f706f73655f7370656e6408011476616c75658501013c42616c616e63654f663c542c20493e00012c62656e6566696369617279790101504163636f756e7449644c6f6f6b75704f663c543e00000478536565205b6050616c6c65743a3a70726f706f73655f7370656e64605d2e3c72656a6563745f70726f706f73616c04012c70726f706f73616c5f6964b101013450726f706f73616c496e64657800010480536565205b6050616c6c65743a3a72656a6563745f70726f706f73616c605d2e40617070726f76655f70726f706f73616c04012c70726f706f73616c5f6964b101013450726f706f73616c496e64657800020484536565205b6050616c6c65743a3a617070726f76655f70726f706f73616c605d2e2c7370656e645f6c6f63616c080118616d6f756e748501013c42616c616e63654f663c542c20493e00012c62656e6566696369617279790101504163636f756e7449644c6f6f6b75704f663c543e00030470536565205b6050616c6c65743a3a7370656e645f6c6f63616c605d2e3c72656d6f76655f617070726f76616c04012c70726f706f73616c5f6964b101013450726f706f73616c496e64657800040480536565205b6050616c6c65743a3a72656d6f76655f617070726f76616c605d2e147370656e6410012861737365745f6b696e64a80144426f783c543a3a41737365744b696e643e000118616d6f756e7485010150417373657442616c616e63654f663c542c20493e00012c62656e6566696369617279000178426f783c42656e65666963696172794c6f6f6b75704f663c542c20493e3e00012876616c69645f66726f6d450201644f7074696f6e3c426c6f636b4e756d626572466f723c543e3e00050458536565205b6050616c6c65743a3a7370656e64605d2e187061796f7574040114696e6465781001285370656e64496e6465780006045c536565205b6050616c6c65743a3a7061796f7574605d2e30636865636b5f737461747573040114696e6465781001285370656e64496e64657800070474536565205b6050616c6c65743a3a636865636b5f737461747573605d2e28766f69645f7370656e64040114696e6465781001285370656e64496e6465780008046c536565205b6050616c6c65743a3a766f69645f7370656e64605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e15030c3870616c6c65745f756e69717565731870616c6c65741043616c6c08045400044900016818637265617465080128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e496400011461646d696e790101504163636f756e7449644c6f6f6b75704f663c543e0000045c536565205b6050616c6c65743a3a637265617465605d2e30666f7263655f6372656174650c0128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001146f776e6572790101504163636f756e7449644c6f6f6b75704f663c543e000130667265655f686f6c64696e67780110626f6f6c00010474536565205b6050616c6c65743a3a666f7263655f637265617465605d2e1c64657374726f79080128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e496400011c7769746e6573731903013844657374726f795769746e65737300020460536565205b6050616c6c65743a3a64657374726f79605d2e106d696e740c0128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106974656dfc0124543a3a4974656d49640001146f776e6572790101504163636f756e7449644c6f6f6b75704f663c543e00030454536565205b6050616c6c65743a3a6d696e74605d2e106275726e0c0128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106974656dfc0124543a3a4974656d496400012c636865636b5f6f776e65721d0301704f7074696f6e3c4163636f756e7449644c6f6f6b75704f663c543e3e00040454536565205b6050616c6c65743a3a6275726e605d2e207472616e736665720c0128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106974656dfc0124543a3a4974656d496400011064657374790101504163636f756e7449644c6f6f6b75704f663c543e00050464536565205b6050616c6c65743a3a7472616e73666572605d2e2472656465706f736974080128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001146974656d73050101385665633c543a3a4974656d49643e00060468536565205b6050616c6c65743a3a72656465706f736974605d2e18667265657a65080128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106974656dfc0124543a3a4974656d49640007045c536565205b6050616c6c65743a3a667265657a65605d2e1074686177080128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106974656dfc0124543a3a4974656d496400080454536565205b6050616c6c65743a3a74686177605d2e44667265657a655f636f6c6c656374696f6e040128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e496400090488536565205b6050616c6c65743a3a667265657a655f636f6c6c656374696f6e605d2e3c746861775f636f6c6c656374696f6e040128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e4964000a0480536565205b6050616c6c65743a3a746861775f636f6c6c656374696f6e605d2e487472616e736665725f6f776e657273686970080128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001246e65775f6f776e6572790101504163636f756e7449644c6f6f6b75704f663c543e000b048c536565205b6050616c6c65743a3a7472616e736665725f6f776e657273686970605d2e207365745f7465616d100128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e4964000118697373756572790101504163636f756e7449644c6f6f6b75704f663c543e00011461646d696e790101504163636f756e7449644c6f6f6b75704f663c543e00011c667265657a6572790101504163636f756e7449644c6f6f6b75704f663c543e000c0464536565205b6050616c6c65743a3a7365745f7465616d605d2e40617070726f76655f7472616e736665720c0128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106974656dfc0124543a3a4974656d496400012064656c6567617465790101504163636f756e7449644c6f6f6b75704f663c543e000d0484536565205b6050616c6c65743a3a617070726f76655f7472616e73666572605d2e3c63616e63656c5f617070726f76616c0c0128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106974656dfc0124543a3a4974656d49640001506d617962655f636865636b5f64656c65676174651d0301704f7074696f6e3c4163636f756e7449644c6f6f6b75704f663c543e3e000e0480536565205b6050616c6c65743a3a63616e63656c5f617070726f76616c605d2e44666f7263655f6974656d5f7374617475731c0128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001146f776e6572790101504163636f756e7449644c6f6f6b75704f663c543e000118697373756572790101504163636f756e7449644c6f6f6b75704f663c543e00011461646d696e790101504163636f756e7449644c6f6f6b75704f663c543e00011c667265657a6572790101504163636f756e7449644c6f6f6b75704f663c543e000130667265655f686f6c64696e67780110626f6f6c00012469735f66726f7a656e780110626f6f6c000f0488536565205b6050616c6c65743a3a666f7263655f6974656d5f737461747573605d2e347365745f617474726962757465100128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001286d617962655f6974656d090101444f7074696f6e3c543a3a4974656d49643e00010c6b65790101016c426f756e6465645665633c75382c20543a3a4b65794c696d69743e00011476616c756501010174426f756e6465645665633c75382c20543a3a56616c75654c696d69743e00100478536565205b6050616c6c65743a3a7365745f617474726962757465605d2e3c636c6561725f6174747269627574650c0128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001286d617962655f6974656d090101444f7074696f6e3c543a3a4974656d49643e00010c6b65790101016c426f756e6465645665633c75382c20543a3a4b65794c696d69743e00110480536565205b6050616c6c65743a3a636c6561725f617474726962757465605d2e307365745f6d65746164617461100128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106974656dfc0124543a3a4974656d49640001106461746101010178426f756e6465645665633c75382c20543a3a537472696e674c696d69743e00012469735f66726f7a656e780110626f6f6c00120474536565205b6050616c6c65743a3a7365745f6d65746164617461605d2e38636c6561725f6d65746164617461080128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106974656dfc0124543a3a4974656d49640013047c536565205b6050616c6c65743a3a636c6561725f6d65746164617461605d2e5c7365745f636f6c6c656374696f6e5f6d657461646174610c0128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106461746101010178426f756e6465645665633c75382c20543a3a537472696e674c696d69743e00012469735f66726f7a656e780110626f6f6c001404a0536565205b6050616c6c65743a3a7365745f636f6c6c656374696f6e5f6d65746164617461605d2e64636c6561725f636f6c6c656374696f6e5f6d65746164617461040128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e4964001504a8536565205b6050616c6c65743a3a636c6561725f636f6c6c656374696f6e5f6d65746164617461605d2e507365745f6163636570745f6f776e6572736869700401406d617962655f636f6c6c656374696f6e0d01015c4f7074696f6e3c543a3a436f6c6c656374696f6e49643e00160494536565205b6050616c6c65743a3a7365745f6163636570745f6f776e657273686970605d2e647365745f636f6c6c656374696f6e5f6d61785f737570706c79080128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001286d61785f737570706c7910010c753332001704a8536565205b6050616c6c65743a3a7365745f636f6c6c656374696f6e5f6d61785f737570706c79605d2e247365745f7072696365100128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106974656dfc0124543a3a4974656d496400011470726963652103015c4f7074696f6e3c4974656d50726963653c542c20493e3e00014477686974656c69737465645f62757965721d0301704f7074696f6e3c4163636f756e7449644c6f6f6b75704f663c543e3e00180468536565205b6050616c6c65743a3a7365745f7072696365605d2e206275795f6974656d0c0128636f6c6c656374696f6e2c013c543a3a436f6c6c656374696f6e49640001106974656dfc0124543a3a4974656d49640001246269645f707269636518013c4974656d50726963653c542c20493e00190464536565205b6050616c6c65743a3a6275795f6974656d605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e19030c3870616c6c65745f756e69717565731474797065733844657374726f795769746e65737300000c01146974656d73b101010c7533320001386974656d5f6d6574616461746173b101010c75333200012861747472696275746573b101010c75333200001d0304184f7074696f6e0404540179010108104e6f6e6500000010536f6d65040079010000010000210304184f7074696f6e04045401180108104e6f6e6500000010536f6d65040018000001000025030c3c70616c6c65745f707265696d6167651870616c6c65741043616c6c040454000114346e6f74655f707265696d616765040114627974657334011c5665633c75383e00000478536565205b6050616c6c65743a3a6e6f74655f707265696d616765605d2e3c756e6e6f74655f707265696d6167650401106861736830011c543a3a4861736800010480536565205b6050616c6c65743a3a756e6e6f74655f707265696d616765605d2e40726571756573745f707265696d6167650401106861736830011c543a3a4861736800020484536565205b6050616c6c65743a3a726571756573745f707265696d616765605d2e48756e726571756573745f707265696d6167650401106861736830011c543a3a486173680003048c536565205b6050616c6c65743a3a756e726571756573745f707265696d616765605d2e38656e737572655f75706461746564040118686173686573290301305665633c543a3a486173683e0004047c536565205b6050616c6c65743a3a656e737572655f75706461746564605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e290300000230002d030c6070616c6c65745f636f6e76696374696f6e5f766f74696e671870616c6c65741043616c6c08045400044900011810766f7465080128706f6c6c5f696e646578b1010144506f6c6c496e6465784f663c542c20493e000110766f7465310301704163636f756e74566f74653c42616c616e63654f663c542c20493e3e00000454536565205b6050616c6c65743a3a766f7465605d2e2064656c6567617465100114636c617373b40134436c6173734f663c542c20493e000108746f790101504163636f756e7449644c6f6f6b75704f663c543e000128636f6e76696374696f6e39030128436f6e76696374696f6e00011c62616c616e636518013c42616c616e63654f663c542c20493e00010464536565205b6050616c6c65743a3a64656c6567617465605d2e28756e64656c6567617465040114636c617373b40134436c6173734f663c542c20493e0002046c536565205b6050616c6c65743a3a756e64656c6567617465605d2e18756e6c6f636b080114636c617373b40134436c6173734f663c542c20493e000118746172676574790101504163636f756e7449644c6f6f6b75704f663c543e0003045c536565205b6050616c6c65743a3a756e6c6f636b605d2e2c72656d6f76655f766f7465080114636c6173733d0301544f7074696f6e3c436c6173734f663c542c20493e3e000114696e646578100144506f6c6c496e6465784f663c542c20493e00040470536565205b6050616c6c65743a3a72656d6f76655f766f7465605d2e4472656d6f76655f6f746865725f766f74650c0118746172676574790101504163636f756e7449644c6f6f6b75704f663c543e000114636c617373b40134436c6173734f663c542c20493e000114696e646578100144506f6c6c496e6465784f663c542c20493e00050488536565205b6050616c6c65743a3a72656d6f76655f6f746865725f766f7465605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e31030c6070616c6c65745f636f6e76696374696f6e5f766f74696e6710766f74652c4163636f756e74566f7465041c42616c616e63650118010c205374616e64617264080110766f746535030110566f746500011c62616c616e636518011c42616c616e63650000001453706c697408010c61796518011c42616c616e636500010c6e617918011c42616c616e63650001003053706c69744162737461696e0c010c61796518011c42616c616e636500010c6e617918011c42616c616e636500011c6162737461696e18011c42616c616e63650002000035030c6070616c6c65745f636f6e76696374696f6e5f766f74696e6710766f746510566f7465000004000800000039030c6070616c6c65745f636f6e76696374696f6e5f766f74696e6728636f6e76696374696f6e28436f6e76696374696f6e00011c104e6f6e65000000204c6f636b65643178000100204c6f636b65643278000200204c6f636b65643378000300204c6f636b65643478000400204c6f636b65643578000500204c6f636b65643678000600003d0304184f7074696f6e04045401b40108104e6f6e6500000010536f6d650400b4000001000041030c4070616c6c65745f7265666572656e64611870616c6c65741043616c6c080454000449000124187375626d69740c013c70726f706f73616c5f6f726967696ebd01015c426f783c50616c6c6574734f726967696e4f663c543e3e00012070726f706f73616c2101014c426f756e64656443616c6c4f663c542c20493e000140656e6163746d656e745f6d6f6d656e744503017c446973706174636854696d653c426c6f636b4e756d626572466f723c543e3e0000045c536565205b6050616c6c65743a3a7375626d6974605d2e58706c6163655f6465636973696f6e5f6465706f736974040114696e64657810013c5265666572656e64756d496e6465780001049c536565205b6050616c6c65743a3a706c6163655f6465636973696f6e5f6465706f736974605d2e5c726566756e645f6465636973696f6e5f6465706f736974040114696e64657810013c5265666572656e64756d496e646578000204a0536565205b6050616c6c65743a3a726566756e645f6465636973696f6e5f6465706f736974605d2e1863616e63656c040114696e64657810013c5265666572656e64756d496e6465780003045c536565205b6050616c6c65743a3a63616e63656c605d2e106b696c6c040114696e64657810013c5265666572656e64756d496e64657800040454536565205b6050616c6c65743a3a6b696c6c605d2e406e756467655f7265666572656e64756d040114696e64657810013c5265666572656e64756d496e64657800050484536565205b6050616c6c65743a3a6e756467655f7265666572656e64756d605d2e486f6e655f66657765725f6465636964696e67040114747261636bb4013c547261636b49644f663c542c20493e0006048c536565205b6050616c6c65743a3a6f6e655f66657765725f6465636964696e67605d2e64726566756e645f7375626d697373696f6e5f6465706f736974040114696e64657810013c5265666572656e64756d496e646578000704a8536565205b6050616c6c65743a3a726566756e645f7375626d697373696f6e5f6465706f736974605d2e307365745f6d65746164617461080114696e64657810013c5265666572656e64756d496e6465780001286d617962655f686173684902013c4f7074696f6e3c543a3a486173683e00080474536565205b6050616c6c65743a3a7365745f6d65746164617461605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e450310346672616d655f737570706f727418747261697473207363686564756c6530446973706174636854696d65042c426c6f636b4e756d62657201100108084174040010012c426c6f636b4e756d626572000000144166746572040010012c426c6f636b4e756d6265720001000049030c4070616c6c65745f77686974656c6973741870616c6c65741043616c6c0404540001103877686974656c6973745f63616c6c04012463616c6c5f6861736830011c543a3a486173680000047c536565205b6050616c6c65743a3a77686974656c6973745f63616c6c605d2e5c72656d6f76655f77686974656c69737465645f63616c6c04012463616c6c5f6861736830011c543a3a48617368000104a0536565205b6050616c6c65743a3a72656d6f76655f77686974656c69737465645f63616c6c605d2e6464697370617463685f77686974656c69737465645f63616c6c0c012463616c6c5f6861736830011c543a3a4861736800014063616c6c5f656e636f6465645f6c656e10010c75333200014c63616c6c5f7765696768745f7769746e657373240118576569676874000204a8536565205b6050616c6c65743a3a64697370617463685f77686974656c69737465645f63616c6c605d2e9c64697370617463685f77686974656c69737465645f63616c6c5f776974685f707265696d61676504011063616c6c2501017c426f783c3c5420617320436f6e6669673e3a3a52756e74696d6543616c6c3e000304e0536565205b6050616c6c65743a3a64697370617463685f77686974656c69737465645f63616c6c5f776974685f707265696d616765605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e4d030c4470616c6c65745f636f6c6c6563746976651870616c6c65741043616c6c0804540004490001182c7365745f6d656d626572730c012c6e65775f6d656d626572739401445665633c543a3a4163636f756e7449643e0001147072696d65110101504f7074696f6e3c543a3a4163636f756e7449643e0001246f6c645f636f756e7410012c4d656d626572436f756e7400000470536565205b6050616c6c65743a3a7365745f6d656d62657273605d2e1c6578656375746508012070726f706f73616c2501017c426f783c3c5420617320436f6e6669673c493e3e3a3a50726f706f73616c3e0001306c656e6774685f626f756e64b101010c75333200010460536565205b6050616c6c65743a3a65786563757465605d2e1c70726f706f73650c01247468726573686f6c64b101012c4d656d626572436f756e7400012070726f706f73616c2501017c426f783c3c5420617320436f6e6669673c493e3e3a3a50726f706f73616c3e0001306c656e6774685f626f756e64b101010c75333200020460536565205b6050616c6c65743a3a70726f706f7365605d2e10766f74650c012070726f706f73616c30011c543a3a48617368000114696e646578b101013450726f706f73616c496e64657800011c617070726f7665780110626f6f6c00030454536565205b6050616c6c65743a3a766f7465605d2e4c646973617070726f76655f70726f706f73616c04013470726f706f73616c5f6861736830011c543a3a4861736800050490536565205b6050616c6c65743a3a646973617070726f76655f70726f706f73616c605d2e14636c6f736510013470726f706f73616c5f6861736830011c543a3a48617368000114696e646578b101013450726f706f73616c496e64657800015470726f706f73616c5f7765696768745f626f756e642401185765696768740001306c656e6774685f626f756e64b101010c75333200060458536565205b6050616c6c65743a3a636c6f7365605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e51030c4470616c6c65745f6d656d626572736869701870616c6c65741043616c6c08045400044900011c286164645f6d656d62657204010c77686f790101504163636f756e7449644c6f6f6b75704f663c543e0000046c536565205b6050616c6c65743a3a6164645f6d656d626572605d2e3472656d6f76655f6d656d62657204010c77686f790101504163636f756e7449644c6f6f6b75704f663c543e00010478536565205b6050616c6c65743a3a72656d6f76655f6d656d626572605d2e2c737761705f6d656d62657208011872656d6f7665790101504163636f756e7449644c6f6f6b75704f663c543e00010c616464790101504163636f756e7449644c6f6f6b75704f663c543e00020470536565205b6050616c6c65743a3a737761705f6d656d626572605d2e3472657365745f6d656d6265727304011c6d656d626572739401445665633c543a3a4163636f756e7449643e00030478536565205b6050616c6c65743a3a72657365745f6d656d62657273605d2e286368616e67655f6b657904010c6e6577790101504163636f756e7449644c6f6f6b75704f663c543e0004046c536565205b6050616c6c65743a3a6368616e67655f6b6579605d2e247365745f7072696d6504010c77686f790101504163636f756e7449644c6f6f6b75704f663c543e00050468536565205b6050616c6c65743a3a7365745f7072696d65605d2e2c636c6561725f7072696d6500060470536565205b6050616c6c65743a3a636c6561725f7072696d65605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e55030c2c70616c6c65745f666565731870616c6c65741043616c6c0404540001041c7365745f66656508010c6b657959030124543a3a4665654b657900010c66656518013042616c616e63654f663c543e00000460536565205b6050616c6c65743a3a7365745f666565605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e59030c246366675f7479706573206665655f6b657973184665654b657900011834416e63686f7273436f6d6d697400000040416e63686f7273507265436f6d6d6974000100504272696467654e61746976655472616e73666572000200484e667450726f6f6656616c69646174696f6e00030044416c6c6f77616e63654372656174696f6e000400584f72646572426f6f6b4f726465724372656174696f6e000500005d030c3870616c6c65745f616e63686f72731870616c6c65741043616c6c040454000110287072655f636f6d6d6974080124616e63686f725f696430011c543a3a486173680001307369676e696e675f726f6f7430011c543a3a486173680000046c536565205b6050616c6c65743a3a7072655f636f6d6d6974605d2e18636f6d6d6974100148616e63686f725f69645f707265696d61676530011c543a3a48617368000120646f635f726f6f7430011c543a3a4861736800011470726f6f6630011c543a3a4861736800014473746f7265645f756e74696c5f646174652c0124543a3a4d6f6d656e740001045c536565205b6050616c6c65743a3a636f6d6d6974605d2e4465766963745f7072655f636f6d6d697473040128616e63686f725f696473610301e4426f756e6465645665633c543a3a486173682c20436f6e73745533323c45564943545f5052455f434f4d4d49545f4c4953545f53495a453e3e00020488536565205b6050616c6c65743a3a65766963745f7072655f636f6d6d697473605d2e3465766963745f616e63686f727300030478536565205b6050616c6c65743a3a65766963745f616e63686f7273605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e61030c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e6465645665630804540130045300000400290301185665633c543e000065030c4870616c6c65745f706f6f6c5f73797374656d1870616c6c65741043616c6c0404540001103c7365745f6d61785f7265736572766508011c706f6f6c5f69642c0124543a3a506f6f6c496400012c6d61785f72657365727665180128543a3a42616c616e636500000480536565205b6050616c6c65743a3a7365745f6d61785f72657365727665605d2e2c636c6f73655f65706f636804011c706f6f6c5f69642c0124543a3a506f6f6c496400010470536565205b6050616c6c65743a3a636c6f73655f65706f6368605d2e3c7375626d69745f736f6c7574696f6e08011c706f6f6c5f69642c0124543a3a506f6f6c4964000120736f6c7574696f6e690301505665633c5472616e636865536f6c7574696f6e3e00020480536565205b6050616c6c65743a3a7375626d69745f736f6c7574696f6e605d2e34657865637574655f65706f636804011c706f6f6c5f69642c0124543a3a506f6f6c496400030478536565205b6050616c6c65743a3a657865637574655f65706f6368605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e69030000026d03006d030c4870616c6c65745f706f6f6c5f73797374656d207472616e636865733c5472616e636865536f6c7574696f6e0000080148696e766573745f66756c66696c6c6d656e747103012c5065727175696e74696c6c00014872656465656d5f66756c66696c6c6d656e747103012c5065727175696e74696c6c000071030c3473705f61726974686d65746963287065725f7468696e67732c5065727175696e74696c6c000004002c010c753634000075030c3070616c6c65745f6c6f616e731870616c6c65741043616c6c04045400013c1863726561746508011c706f6f6c5f69642c0124543a3a506f6f6c4964000110696e666f7903012c4c6f616e496e666f3c543e0000045c536565205b6050616c6c65743a3a637265617465605d2e18626f72726f770c011c706f6f6c5f69642c0124543a3a506f6f6c496400011c6c6f616e5f69642c0124543a3a4c6f616e4964000118616d6f756e74d90301445072696e636970616c496e7075743c543e0001045c536565205b6050616c6c65743a3a626f72726f77605d2e1472657061790c011c706f6f6c5f69642c0124543a3a506f6f6c496400011c6c6f616e5f69642c0124543a3a4c6f616e4964000118616d6f756e74e1030138526570616964496e7075743c543e00020458536565205b6050616c6c65743a3a7265706179605d2e2477726974655f6f666608011c706f6f6c5f69642c0124543a3a506f6f6c496400011c6c6f616e5f69642c0124543a3a4c6f616e496400030468536565205b6050616c6c65743a3a77726974655f6f6666605d2e3c61646d696e5f77726974655f6f666610011c706f6f6c5f69642c0124543a3a506f6f6c496400011c6c6f616e5f69642c0124543a3a4c6f616e496400012870657263656e746167659503011c543a3a5261746500011c70656e616c74799503011c543a3a5261746500040480536565205b6050616c6c65743a3a61646d696e5f77726974655f6f6666605d2e5470726f706f73655f6c6f616e5f6d75746174696f6e0c011c706f6f6c5f69642c0124543a3a506f6f6c496400011c6c6f616e5f69642c0124543a3a4c6f616e49640001206d75746174696f6ee50301544c6f616e4d75746174696f6e3c543a3a526174653e00050498536565205b6050616c6c65743a3a70726f706f73655f6c6f616e5f6d75746174696f6e605d2e4c6170706c795f6c6f616e5f6d75746174696f6e08011c706f6f6c5f69642c0124543a3a506f6f6c49640001246368616e67655f696430011c543a3a4861736800060490536565205b6050616c6c65743a3a6170706c795f6c6f616e5f6d75746174696f6e605d2e14636c6f736508011c706f6f6c5f69642c0124543a3a506f6f6c496400011c6c6f616e5f69642c0124543a3a4c6f616e496400070458536565205b6050616c6c65743a3a636c6f7365605d2e6070726f706f73655f77726974655f6f66665f706f6c69637908011c706f6f6c5f69642c0124543a3a506f6f6c4964000118706f6c696379ed0301ec426f756e6465645665633c57726974654f666652756c653c543a3a526174653e2c20543a3a4d617857726974654f6666506f6c69637953697a653e000804a4536565205b6050616c6c65743a3a70726f706f73655f77726974655f6f66665f706f6c696379605d2e586170706c795f77726974655f6f66665f706f6c69637908011c706f6f6c5f69642c0124543a3a506f6f6c49640001246368616e67655f696430011c543a3a486173680009049c536565205b6050616c6c65743a3a6170706c795f77726974655f6f66665f706f6c696379605d2e687570646174655f706f7274666f6c696f5f76616c756174696f6e04011c706f6f6c5f69642c0124543a3a506f6f6c4964000a04ac536565205b6050616c6c65743a3a7570646174655f706f7274666f6c696f5f76616c756174696f6e605d2e5470726f706f73655f7472616e736665725f6465627414011c706f6f6c5f69642c0124543a3a506f6f6c496400013066726f6d5f6c6f616e5f69642c0124543a3a4c6f616e4964000128746f5f6c6f616e5f69642c0124543a3a4c6f616e49640001347265706169645f616d6f756e74e1030138526570616964496e7075743c543e000134626f72726f775f616d6f756e74d90301445072696e636970616c496e7075743c543e000b0498536565205b6050616c6c65743a3a70726f706f73655f7472616e736665725f64656274605d2e4c6170706c795f7472616e736665725f6465627408011c706f6f6c5f69642c0124543a3a506f6f6c49640001246368616e67655f696430011c543a3a48617368000c0490536565205b6050616c6c65743a3a6170706c795f7472616e736665725f64656274605d2e34696e6372656173655f646562740c011c706f6f6c5f69642c0124543a3a506f6f6c496400011c6c6f616e5f69642c0124543a3a4c6f616e4964000118616d6f756e74d90301445072696e636970616c496e7075743c543e000d0478536565205b6050616c6c65743a3a696e6372656173655f64656274605d2e3464656372656173655f646562740c011c706f6f6c5f69642c0124543a3a506f6f6c496400011c6c6f616e5f69642c0124543a3a4c6f616e4964000118616d6f756e74e1030138526570616964496e7075743c543e000e0478536565205b6050616c6c65743a3a64656372656173655f64656274605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e7903103070616c6c65745f6c6f616e7320656e746974696573146c6f616e73204c6f616e496e666f04045400001401207363686564756c657d03014452657061796d656e745363686564756c65000128636f6c6c61746572616c8d03012841737365744f663c543e000134696e7465726573745f7261746591030154496e746572657374526174653c543a3a526174653e00011c70726963696e679d03012850726963696e673c543e0001307265737472696374696f6e73cd0301404c6f616e5265737472696374696f6e7300007d03103070616c6c65745f6c6f616e731474797065732063617368666c6f774452657061796d656e745363686564756c6500000c01206d61747572697479810301204d61747572697479000144696e7465726573745f7061796d656e747385030140496e7465726573745061796d656e74730001447061795f646f776e5f7363686564756c658903013c506179446f776e5363686564756c6500008103103070616c6c65745f6c6f616e731474797065732063617368666c6f77204d61747572697479000108144669786564080110646174652c011c5365636f6e6473000124657874656e73696f6e2c011c5365636f6e6473000000104e6f6e65000100008503103070616c6c65745f6c6f616e731474797065732063617368666c6f7740496e7465726573745061796d656e7473000104384f6e636541744d61747572697479000000008903103070616c6c65745f6c6f616e731474797065732063617368666c6f773c506179446f776e5363686564756c65000104104e6f6e65000000008d03000004082cfc0091030c286366675f74726169747320696e74657265737430496e746572657374526174650410526174650195030104144669786564080134726174655f7065725f79656172950301105261746500012c636f6d706f756e64696e679903014c436f6d706f756e64696e675363686564756c650000000095030c246366675f74797065732c66697865645f706f696e74244669786564553132380000040018011075313238000099030c286366675f74726169747320696e7465726573744c436f6d706f756e64696e675363686564756c65000104205365636f6e646c79000000009d03103070616c6c65745f6c6f616e7320656e7469746965731c70726963696e671c50726963696e6704045400010820496e7465726e616c0400a1030170696e7465726e616c3a3a496e7465726e616c50726963696e673c543e0000002045787465726e616c0400b103017065787465726e616c3a3a45787465726e616c50726963696e673c543e00010000a103143070616c6c65745f6c6f616e7320656e7469746965731c70726963696e6720696e7465726e616c3c496e7465726e616c50726963696e6704045400000c0140636f6c6c61746572616c5f76616c7565180128543a3a42616c616e636500014076616c756174696f6e5f6d6574686f64a503016056616c756174696f6e4d6574686f643c543a3a526174653e0001446d61785f626f72726f775f616d6f756e74ad0301604d6178426f72726f77416d6f756e743c543a3a526174653e0000a503103070616c6c65745f6c6f616e731474797065732476616c756174696f6e3c56616c756174696f6e4d6574686f64041052617465019503010c48446973636f756e74656443617368466c6f770400a9030160446973636f756e74656443617368466c6f773c526174653e0000003c4f75747374616e64696e6744656274000100104361736800020000a903103070616c6c65745f6c6f616e731474797065732476616c756174696f6e48446973636f756e74656443617368466c6f77041052617465019503000c015870726f626162696c6974795f6f665f64656661756c7495030110526174650001486c6f73735f676976656e5f64656661756c749503011052617465000134646973636f756e745f7261746591030148496e746572657374526174653c526174653e0000ad03143070616c6c65745f6c6f616e7320656e7469746965731c70726963696e6720696e7465726e616c3c4d6178426f72726f77416d6f756e740410526174650195030108445570546f546f74616c426f72726f776564040130616476616e63655f7261746595030110526174650000004c5570546f4f75747374616e64696e6744656274040130616476616e63655f72617465950301105261746500010000b103143070616c6c65745f6c6f616e7320656e7469746965731c70726963696e672065787465726e616c3c45787465726e616c50726963696e67040454000014012070726963655f6964b5030128543a3a507269636549640001446d61785f626f72726f775f616d6f756e74c50301704d6178426f72726f77416d6f756e743c543a3a5175616e746974793e0001206e6f74696f6e616c180128543a3a42616c616e636500014c6d61785f70726963655f766172696174696f6e9503011c543a3a5261746500014c776974685f6c696e6561725f70726963696e67780110626f6f6c0000b5030c246366675f74797065731c6f7261636c6573244f7261636c654b657900010c104973696e04008d0201104973696e0000003c436f6e76657273696f6e526174696f0800b903012843757272656e637949640000b903012843757272656e6379496400010028506f6f6c4c6f616e496408002c0118506f6f6c496400002c01184c6f616e496400020000b9030c246366675f747970657318746f6b656e732843757272656e63794964000118184e61746976650000001c5472616e63686508002c0118506f6f6c496400009d0201245472616e6368654964000100104155534400030030466f726569676e41737365740400100138466f726569676e417373657449640004001c5374616b696e670400bd03013c5374616b696e6743757272656e6379000500284c6f63616c41737365740400c10301304c6f63616c4173736574496400060000bd030c246366675f747970657318746f6b656e733c5374616b696e6743757272656e637900010430426c6f636b5265776172647300000000c1030c246366675f747970657318746f6b656e73304c6f63616c417373657449640000040010010c7533320000c503143070616c6c65745f6c6f616e7320656e7469746965731c70726963696e672065787465726e616c3c4d6178426f72726f77416d6f756e7404205175616e7469747901c90301081c4e6f4c696d6974000000205175616e746974790400c90301205175616e7469747900010000c9030c246366675f74797065732c66697865645f706f696e742446697865645531323800000400180110753132380000cd030c3070616c6c65745f6c6f616e73147479706573404c6f616e5265737472696374696f6e73000008011c626f72726f7773d1030148426f72726f775265737472696374696f6e7300012872657061796d656e7473d503014452657061795265737472696374696f6e730000d1030c3070616c6c65745f6c6f616e7314747970657348426f72726f775265737472696374696f6e7300010c344e6f745772697474656e4f66660000002046756c6c4f6e63650001004c4f7261636c655072696365526571756972656400020000d5030c3070616c6c65745f6c6f616e731474797065734452657061795265737472696374696f6e73000108104e6f6e650000001046756c6c00010000d903103070616c6c65745f6c6f616e7320656e74697469657314696e707574385072696e636970616c496e70757404045400010820496e7465726e616c0400180128543a3a42616c616e63650000002045787465726e616c0400dd03014445787465726e616c416d6f756e743c543e00010000dd03143070616c6c65745f6c6f616e7320656e7469746965731c70726963696e672065787465726e616c3845787465726e616c416d6f756e7404045400000801207175616e74697479c903012c543a3a5175616e74697479000140736574746c656d656e745f7072696365180128543a3a42616c616e63650000e103103070616c6c65745f6c6f616e7320656e74697469657314696e7075742c526570616964496e70757404045400000c01247072696e636970616cd90301445072696e636970616c496e7075743c543e000120696e746572657374180128543a3a42616c616e636500012c756e7363686564756c6564180128543a3a42616c616e63650000e503103070616c6c65745f6c6f616e7320656e7469746965731c6368616e676573304c6f616e4d75746174696f6e0410526174650195030118204d617475726974790400810301204d61747572697479000000444d61747572697479457874656e73696f6e04002c011c5365636f6e647300010030496e74657265737452617465040091030148496e746572657374526174653c526174653e00020040496e7465726573745061796d656e7473040085030140496e7465726573745061796d656e74730003003c506179446f776e5363686564756c6504008903013c506179446f776e5363686564756c6500040020496e7465726e616c0400e9030158496e7465726e616c4d75746174696f6e3c526174653e00050000e903103070616c6c65745f6c6f616e7320656e7469746965731c6368616e67657340496e7465726e616c4d75746174696f6e04105261746501950301103c56616c756174696f6e4d6574686f640400a503015456616c756174696f6e4d6574686f643c526174653e0000005050726f626162696c6974794f6644656661756c7404009503011052617465000100404c6f7373476976656e44656661756c740400950301105261746500020030446973636f756e7452617465040091030148496e746572657374526174653c526174653e00030000ed030c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401f1030453000004000d0401185665633c543e0000f103103070616c6c65745f6c6f616e7314747970657318706f6c6963793057726974654f666652756c65041052617465019503000801207472696767657273f50301cc426f756e64656442547265655365743c556e6971756557726974654f6666547269676765722c205472696767657253697a653e0001187374617475730904015057726974654f66665374617475733c526174653e0000f5030c4c626f756e6465645f636f6c6c656374696f6e7344626f756e6465645f62747265655f7365743c426f756e646564425472656553657408045401f9030453000004000104012c42547265655365743c543e0000f903103070616c6c65745f6c6f616e7314747970657318706f6c69637954556e6971756557726974654f66665472696767657200000400fd03013c57726974654f6666547269676765720000fd03103070616c6c65745f6c6f616e7314747970657318706f6c6963793c57726974654f666654726967676572000108405072696e636970616c4f76657264756504002c011c5365636f6e64730000003450726963654f7574646174656404002c011c5365636f6e64730001000001040420425472656553657404045401f90300040005040000000504000002f903000904103070616c6c65745f6c6f616e7314747970657318706f6c6963793857726974654f66665374617475730410526174650195030008012870657263656e74616765950301105261746500011c70656e616c7479950301105261746500000d04000002f1030011040c4870616c6c65745f7065726d697373696f6e731870616c6c65741043616c6c0404540001100c616464100124776974685f726f6c651504011c543a3a526f6c65000108746f000130543a3a4163636f756e74496400011473636f706521040120543a3a53636f7065000110726f6c651504011c543a3a526f6c6500000450536565205b6050616c6c65743a3a616464605d2e1872656d6f7665100124776974685f726f6c651504011c543a3a526f6c6500011066726f6d000130543a3a4163636f756e74496400011473636f706521040120543a3a53636f7065000110726f6c651504011c543a3a526f6c650001045c536565205b6050616c6c65743a3a72656d6f7665605d2e14707572676504011473636f706521040120543a3a53636f706500020458536565205b6050616c6c65743a3a7075726765605d2e2c61646d696e5f707572676508011066726f6d000130543a3a4163636f756e74496400011473636f706521040120543a3a53636f706500030470536565205b6050616c6c65743a3a61646d696e5f7075726765605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e15040c246366675f74797065732c7065726d697373696f6e7310526f6c6504245472616e6368654964019d02010820506f6f6c526f6c6504001904014c506f6f6c526f6c653c5472616e63686549643e000000605065726d697373696f6e656443757272656e6379526f6c6504001d0401605065726d697373696f6e656443757272656e6379526f6c650001000019040c246366675f74797065732c7065726d697373696f6e7320506f6f6c526f6c6504245472616e6368654964019d02012424506f6f6c41646d696e00000020426f72726f7765720001003050726963696e6741646d696e000200384c697175696469747941646d696e00030034496e766573746f7241646d696e000400244c6f616e41646d696e0005003c5472616e636865496e766573746f7208009d0201245472616e636865496400002c011c5365636f6e647300060034504f44526561644163636573730007005446726f7a656e5472616e636865496e766573746f7204009d0201245472616e6368654964000800001d040c246366675f74797065732c7065726d697373696f6e73605065726d697373696f6e656443757272656e6379526f6c6500010c18486f6c64657204002c011c5365636f6e64730000001c4d616e61676572000100184973737565720002000021040c246366675f74797065732c7065726d697373696f6e733c5065726d697373696f6e53636f70650818506f6f6c4964012c2843757272656e6379496401b903010810506f6f6c04002c0118506f6f6c49640000002043757272656e63790400b903012843757272656e637949640001000025040c6470616c6c65745f636f6c6c61746f725f616c6c6f776c6973741870616c6c65741043616c6c0404540001080c61646404012c636f6c6c61746f725f6964000138543a3a56616c696461746f72496400000450536565205b6050616c6c65743a3a616464605d2e1872656d6f766504012c636f6c6c61746f725f6964000138543a3a56616c696461746f7249640001045c536565205b6050616c6c65743a3a72656d6f7665605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e29040c6070616c6c65745f726573747269637465645f746f6b656e731870616c6c65741043616c6c040454000114207472616e736665720c0110646573747901018c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636500012c63757272656e63795f6964b9030134543a3a43757272656e63794964000118616d6f756e7485010128543a3a42616c616e636500000464536565205b6050616c6c65743a3a7472616e73666572605d2e307472616e736665725f616c6c0c0110646573747901018c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636500012c63757272656e63795f6964b9030134543a3a43757272656e637949640001286b6565705f616c697665780110626f6f6c00010474536565205b6050616c6c65743a3a7472616e736665725f616c6c605d2e4c7472616e736665725f6b6565705f616c6976650c0110646573747901018c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636500012c63757272656e63795f6964b9030134543a3a43757272656e63794964000118616d6f756e7485010128543a3a42616c616e636500020490536565205b6050616c6c65743a3a7472616e736665725f6b6565705f616c697665605d2e38666f7263655f7472616e73666572100118736f757263657901018c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f75726365000110646573747901018c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636500012c63757272656e63795f6964b9030134543a3a43757272656e63794964000118616d6f756e7485010128543a3a42616c616e63650003047c536565205b6050616c6c65743a3a666f7263655f7472616e73666572605d2e2c7365745f62616c616e636510010c77686f7901018c3c543a3a4c6f6f6b7570206173205374617469634c6f6f6b75703e3a3a536f7572636500012c63757272656e63795f6964b9030134543a3a43757272656e637949640001206e65775f6672656585010128543a3a42616c616e63650001306e65775f726573657276656485010128543a3a42616c616e636500040470536565205b6050616c6c65743a3a7365745f62616c616e6365605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e2d040c3470616c6c65745f6272696467651870616c6c65741043616c6c04045400010c3c7472616e736665725f6e61746976650c0118616d6f756e7418013042616c616e63654f663c543e000124726563697069656e7434011c5665633c75383e00011c646573745f696408011c436861696e496400000480536565205b6050616c6c65743a3a7472616e736665725f6e6174697665605d2e207472616e736665720c0108746f0001983c54206173206672616d655f73797374656d3a3a436f6e6669673e3a3a4163636f756e744964000118616d6f756e7418013042616c616e63654f663c543e000110725f69640401285265736f75726365496400010464536565205b6050616c6c65743a3a7472616e73666572605d2e1872656d61726b080110686173683001843c54206173206672616d655f73797374656d3a3a436f6e6669673e3a3a48617368000110725f69640401285265736f7572636549640002045c536565205b6050616c6c65743a3a72656d61726b605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e31040c3c70616c6c65745f6b657973746f72651870616c6c65741043616c6c04045400010c206164645f6b6579730401106b657973350401505665633c4164644b65793c543a3a486173683e3e00000464536565205b6050616c6c65743a3a6164645f6b657973605d2e2c7265766f6b655f6b6579730801106b657973290301305665633c543a3a486173683e00012c6b65795f707572706f73653d0401284b6579507572706f736500010470536565205b6050616c6c65743a3a7265766f6b655f6b657973605d2e2c7365745f6465706f73697404012c6e65775f6465706f736974180128543a3a42616c616e636500020470536565205b6050616c6c65743a3a7365745f6465706f736974605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e35040000023904003904083c70616c6c65745f6b657973746f7265184164644b65790410486173680130000c010c6b65793001104861736800011c707572706f73653d0401284b6579507572706f73650001206b65795f747970654104011c4b65795479706500003d04083c70616c6c65745f6b657973746f7265284b6579507572706f736500010830503250446973636f7665727900000048503250446f63756d656e745369676e696e67000100004104083c70616c6c65745f6b657973746f72651c4b6579547970650001081445434453410000001445444453410001000045040c4870616c6c65745f696e766573746d656e74731870616c6c65741043616c6c0404540001184c7570646174655f696e766573745f6f72646572080134696e766573746d656e745f69644904013c543a3a496e766573746d656e744964000118616d6f756e74180124543a3a416d6f756e7400000490536565205b6050616c6c65743a3a7570646174655f696e766573745f6f72646572605d2e4c7570646174655f72656465656d5f6f72646572080134696e766573746d656e745f69644904013c543a3a496e766573746d656e744964000118616d6f756e74180124543a3a416d6f756e7400010490536565205b6050616c6c65743a3a7570646174655f72656465656d5f6f72646572605d2e4c636f6c6c6563745f696e766573746d656e7473040134696e766573746d656e745f69644904013c543a3a496e766573746d656e74496400020490536565205b6050616c6c65743a3a636f6c6c6563745f696e766573746d656e7473605d2e4c636f6c6c6563745f726564656d7074696f6e73040134696e766573746d656e745f69644904013c543a3a496e766573746d656e74496400030490536565205b6050616c6c65743a3a636f6c6c6563745f726564656d7074696f6e73605d2e5c636f6c6c6563745f696e766573746d656e74735f666f7208010c77686f000130543a3a4163636f756e744964000134696e766573746d656e745f69644904013c543a3a496e766573746d656e744964000404a0536565205b6050616c6c65743a3a636f6c6c6563745f696e766573746d656e74735f666f72605d2e5c636f6c6c6563745f726564656d7074696f6e735f666f7208010c77686f000130543a3a4163636f756e744964000134696e766573746d656e745f69644904013c543a3a496e766573746d656e744964000504a0536565205b6050616c6c65743a3a636f6c6c6563745f726564656d7074696f6e735f666f72605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e4904000004082c9d02004d040c6070616c6c65745f6c69717569646974795f726577617264731870616c6c65741043616c6c04045400011c147374616b6508012c63757272656e63795f6964b9030134543a3a43757272656e63794964000118616d6f756e74180128543a3a42616c616e636500000458536565205b6050616c6c65743a3a7374616b65605d2e1c756e7374616b6508012c63757272656e63795f6964b9030134543a3a43757272656e63794964000118616d6f756e74180128543a3a42616c616e636500010460536565205b6050616c6c65743a3a756e7374616b65605d2e30636c61696d5f72657761726404012c63757272656e63795f6964b9030134543a3a43757272656e6379496400020474536565205b6050616c6c65743a3a636c61696d5f726577617264605d2e587365745f64697374726962757465645f72657761726404011c62616c616e6365180128543a3a42616c616e63650003049c536565205b6050616c6c65743a3a7365745f64697374726962757465645f726577617264605d2e487365745f65706f63685f6475726174696f6e0401206475726174696f6e2c012c4d6f6d656e744f663c543e0004048c536565205b6050616c6c65743a3a7365745f65706f63685f6475726174696f6e605d2e407365745f67726f75705f77656967687408012067726f75705f6964100128543a3a47726f757049640001187765696768742c0124543a3a57656967687400050484536565205b6050616c6c65743a3a7365745f67726f75705f776569676874605d2e487365745f63757272656e63795f67726f757008012c63757272656e63795f6964b9030134543a3a43757272656e6379496400012067726f75705f6964100128543a3a47726f757049640006048c536565205b6050616c6c65743a3a7365745f63757272656e63795f67726f7570605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e51040c5870616c6c65745f6c69717569646974795f706f6f6c731870616c6c65741043616c6c04045400013c206164645f706f6f6c08011c706f6f6c5f69642c0124543a3a506f6f6c4964000118646f6d61696e55040118446f6d61696e00020464536565205b6050616c6c65743a3a6164645f706f6f6c605d2e2c6164645f7472616e6368650c011c706f6f6c5f69642c0124543a3a506f6f6c49640001287472616e6368655f69649d020130543a3a5472616e6368654964000118646f6d61696e55040118446f6d61696e00030470536565205b6050616c6c65743a3a6164645f7472616e636865605d2e487570646174655f746f6b656e5f707269636510011c706f6f6c5f69642c0124543a3a506f6f6c49640001287472616e6368655f69649d020130543a3a5472616e636865496400012c63757272656e63795f6964b9030134543a3a43757272656e6379496400012c64657374696e6174696f6e55040118446f6d61696e0004048c536565205b6050616c6c65743a3a7570646174655f746f6b656e5f7072696365605d2e347570646174655f6d656d62657210011c706f6f6c5f69642c0124543a3a506f6f6c49640001287472616e6368655f69649d020130543a3a5472616e6368654964000138646f6d61696e5f61646472657373d5010134446f6d61696e4164647265737300012c76616c69645f756e74696c2c011c5365636f6e647300050478536565205b6050616c6c65743a3a7570646174655f6d656d626572605d2e5c7472616e736665725f7472616e6368655f746f6b656e7310011c706f6f6c5f69642c0124543a3a506f6f6c49640001287472616e6368655f69649d020130543a3a5472616e6368654964000138646f6d61696e5f61646472657373d5010134446f6d61696e41646472657373000118616d6f756e74180128543a3a42616c616e6365000604a0536565205b6050616c6c65743a3a7472616e736665725f7472616e6368655f746f6b656e73605d2e207472616e736665720c012c63757272656e63795f6964b9030134543a3a43757272656e637949640001207265636569766572d5010134446f6d61696e41646472657373000118616d6f756e74180128543a3a42616c616e636500070464536565205b6050616c6c65743a3a7472616e73666572605d2e306164645f63757272656e637904012c63757272656e63795f6964b9030134543a3a43757272656e6379496400080474536565205b6050616c6c65743a3a6164645f63757272656e6379605d2e64616c6c6f775f696e766573746d656e745f63757272656e637908011c706f6f6c5f69642c0124543a3a506f6f6c496400012c63757272656e63795f6964b9030134543a3a43757272656e63794964000904a8536565205b6050616c6c65743a3a616c6c6f775f696e766573746d656e745f63757272656e6379605d2e407363686564756c655f7570677261646508013065766d5f636861696e5f69642c012845564d436861696e4964000120636f6e7472616374810101205b75383b2032305d000a0484536565205b6050616c6c65743a3a7363686564756c655f75706772616465605d2e3863616e63656c5f7570677261646508013065766d5f636861696e5f69642c012845564d436861696e4964000120636f6e7472616374810101205b75383b2032305d000b047c536565205b6050616c6c65743a3a63616e63656c5f75706772616465605d2e747570646174655f7472616e6368655f746f6b656e5f6d657461646174610c011c706f6f6c5f69642c0124543a3a506f6f6c49640001287472616e6368655f69649d020130543a3a5472616e6368654964000118646f6d61696e55040118446f6d61696e000c04b8536565205b6050616c6c65743a3a7570646174655f7472616e6368655f746f6b656e5f6d65746164617461605d2e70646973616c6c6f775f696e766573746d656e745f63757272656e637908011c706f6f6c5f69642c0124543a3a506f6f6c496400012c63757272656e63795f6964b9030134543a3a43757272656e63794964000d04b4536565205b6050616c6c65743a3a646973616c6c6f775f696e766573746d656e745f63757272656e6379605d2e3c667265657a655f696e766573746f720c011c706f6f6c5f69642c0124543a3a506f6f6c49640001287472616e6368655f69649d020130543a3a5472616e6368654964000138646f6d61696e5f61646472657373d5010134446f6d61696e41646472657373000e0480536565205b6050616c6c65743a3a667265657a655f696e766573746f72605d2e44756e667265657a655f696e766573746f720c011c706f6f6c5f69642c0124543a3a506f6f6c49640001287472616e6368655f69649d020130543a3a5472616e6368654964000138646f6d61696e5f61646472657373d5010134446f6d61696e41646472657373000f0488536565205b6050616c6c65743a3a756e667265657a655f696e766573746f72605d2e4c7570646174655f7472616e6368655f686f6f6b10011c706f6f6c5f69642c0124543a3a506f6f6c49640001287472616e6368655f69649d020130543a3a5472616e6368654964000118646f6d61696e55040118446f6d61696e000110686f6f6b810101205b75383b2032305d00100490536565205b6050616c6c65743a3a7570646174655f7472616e6368655f686f6f6b605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e55040c246366675f747970657338646f6d61696e5f6164647265737318446f6d61696e0001082843656e747269667567650000000c45564d04002c012845564d436861696e49640001000059040c5070616c6c65745f706f6f6c5f72656769737472791870616c6c65741043616c6c04045400011020726567697374657220011461646d696e000130543a3a4163636f756e74496400011c706f6f6c5f69642c0124543a3a506f6f6c49640001387472616e6368655f696e707574735d0401585665633c5472616e636865496e7075744f663c543e3e00012063757272656e6379b9030134543a3a43757272656e6379496400012c6d61785f72657365727665180128543a3a42616c616e63650001206d657461646174617504013c4f7074696f6e3c5665633c75383e3e00014077726974655f6f66665f706f6c696379ed03012c506f6c6963794f663c543e000124706f6f6c5f66656573790401585665633c506f6f6c466565496e7075744f663c543e3e00000464536565205b6050616c6c65743a3a7265676973746572605d2e1875706461746508011c706f6f6c5f69642c0124543a3a506f6f6c496400011c6368616e67657395040140506f6f6c4368616e6765734f663c543e0001045c536565205b6050616c6c65743a3a757064617465605d2e38657865637574655f75706461746504011c706f6f6c5f69642c0124543a3a506f6f6c49640002047c536565205b6050616c6c65743a3a657865637574655f757064617465605d2e307365745f6d6574616461746108011c706f6f6c5f69642c0124543a3a506f6f6c49640001206d6574616461746134011c5665633c75383e00030474536565205b6050616c6c65743a3a7365745f6d65746164617461605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e5d0400000261040061040c4870616c6c65745f706f6f6c5f73797374656d207472616e63686573305472616e636865496e7075740810526174650195032c537472696e674c696d6974016504000c01307472616e6368655f74797065690401445472616e636865547970653c526174653e00012473656e696f72697479450201444f7074696f6e3c53656e696f726974793e0001206d657461646174616d0401705472616e6368654d657461646174613c537472696e674c696d69743e000065040c246366675f747970657318746f6b656e73404173736574537472696e674c696d69740000000069040c4870616c6c65745f706f6f6c5f73797374656d207472616e636865732c5472616e63686554797065041052617465019503010820526573696475616c0000002c4e6f6e526573696475616c080154696e7465726573745f726174655f7065725f736563950301105261746500013c6d696e5f7269736b5f6275666665727103012c5065727175696e74696c6c000100006d040c246366675f747970657314706f6f6c733c5472616e6368654d65746164617461042c537472696e674c696d697401650400080128746f6b656e5f6e616d657104016c426f756e6465645665633c75382c20537472696e674c696d69743e000130746f6b656e5f73796d626f6c7104016c426f756e6465645665633c75382c20537472696e674c696d69743e000071040c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401080453000004003401185665633c543e0000750404184f7074696f6e04045401340108104e6f6e6500000010536f6d65040034000001000079040000027d04007d0400000408810485040081040c286366675f7472616974730c66656534506f6f6c4665654275636b65740001040c546f700000000085040c246366675f747970657314706f6f6c732c506f6f6c466565496e666f0c244163636f756e74496401001c42616c616e636501181052617465019503000c012c64657374696e6174696f6e0001244163636f756e744964000118656469746f7289040160506f6f6c466565456469746f723c4163636f756e7449643e0001206665655f747970658d040168506f6f6c466565547970653c42616c616e63652c20526174653e000089040c246366675f747970657314706f6f6c7334506f6f6c466565456469746f7204244163636f756e7449640100010810526f6f740000001c4163636f756e7404000001244163636f756e744964000100008d040c246366675f747970657314706f6f6c732c506f6f6c46656554797065081c42616c616e63650118105261746501950301081446697865640401146c696d697491040170506f6f6c466565416d6f756e743c42616c616e63652c20526174653e0000002c436861726765645570546f0401146c696d697491040170506f6f6c466565416d6f756e743c42616c616e63652c20526174653e0001000091040c246366675f747970657314706f6f6c7334506f6f6c466565416d6f756e74081c42616c616e63650118105261746501950301086453686172654f66506f7274666f6c696f56616c756174696f6e040095030110526174650000003c416d6f756e745065725365636f6e64040018011c42616c616e63650001000095040c4870616c6c65745f706f6f6c5f73797374656d28706f6f6c5f74797065732c506f6f6c4368616e6765730c10526174650195032c537472696e674c696d69740165042c4d61785472616e63686573019904001001207472616e636865739d0401d04368616e67653c426f756e6465645665633c5472616e6368655570646174653c526174653e2c204d61785472616e636865733e3e0001407472616e6368655f6d65746164617461ad0401f44368616e67653c426f756e6465645665633c5472616e6368654d657461646174613c537472696e674c696d69743e2c204d61785472616e636865733e3e0001386d696e5f65706f63685f74696d65b904013c4368616e67653c5365636f6e64733e00012c6d61785f6e61765f616765b904013c4368616e67653c5365636f6e64733e00009904084c646576656c6f706d656e745f72756e74696d652c4d61785472616e63686573000000009d04082c6f726d6c5f747261697473184368616e6765041456616c756501a1040108204e6f4368616e6765000000204e657756616c75650400a104011456616c756500010000a1040c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401a504045300000400a90401185665633c543e0000a5040c4870616c6c65745f706f6f6c5f73797374656d207472616e63686573345472616e636865557064617465041052617465019503000801307472616e6368655f74797065690401445472616e636865547970653c526174653e00012473656e696f72697479450201444f7074696f6e3c53656e696f726974793e0000a904000002a50400ad04082c6f726d6c5f747261697473184368616e6765041456616c756501b1040108204e6f4368616e6765000000204e657756616c75650400b104011456616c756500010000b1040c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e646564566563080454016d04045300000400b50401185665633c543e0000b5040000026d0400b904082c6f726d6c5f747261697473184368616e6765041456616c7565012c0108204e6f4368616e6765000000204e657756616c756504002c011456616c756500010000bd040c5070616c6c65745f626c6f636b5f726577617264731870616c6c65741043616c6c04045400010c30636c61696d5f7265776172640401286163636f756e745f6964000130543a3a4163636f756e74496400000474536565205b6050616c6c65743a3a636c61696d5f726577617264605d2e7c7365745f636f6c6c61746f725f7265776172645f7065725f73657373696f6e04016c636f6c6c61746f725f7265776172645f7065725f73657373696f6e180128543a3a42616c616e6365000104c0536565205b6050616c6c65743a3a7365745f636f6c6c61746f725f7265776172645f7065725f73657373696f6e605d2e887365745f616e6e75616c5f74726561737572795f696e666c6174696f6e5f7261746504015c74726561737572795f696e666c6174696f6e5f726174659503011c543a3a52617465000204cc536565205b6050616c6c65743a3a7365745f616e6e75616c5f74726561737572795f696e666c6174696f6e5f72617465605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732ec1040c6470616c6c65745f7472616e736665725f616c6c6f776c6973741870616c6c65741043616c6c04045400011c586164645f7472616e736665725f616c6c6f77616e636508012c63757272656e63795f6964c5040134543a3a43757272656e637949640001207265636569766572c904012c543a3a4c6f636174696f6e0000049c536565205b6050616c6c65743a3a6164645f7472616e736665725f616c6c6f77616e6365605d2e6472656d6f76655f7472616e736665725f616c6c6f77616e636508012c63757272656e63795f6964c5040134543a3a43757272656e637949640001207265636569766572c904012c543a3a4c6f636174696f6e000104a8536565205b6050616c6c65743a3a72656d6f76655f7472616e736665725f616c6c6f77616e6365605d2e6070757267655f7472616e736665725f616c6c6f77616e636508012c63757272656e63795f6964c5040134543a3a43757272656e637949640001207265636569766572c904012c543a3a4c6f636174696f6e000204a4536565205b6050616c6c65743a3a70757267655f7472616e736665725f616c6c6f77616e6365605d2e4c6164645f616c6c6f77616e63655f64656c617908012c63757272656e63795f6964c5040134543a3a43757272656e6379496400011464656c6179100144426c6f636b4e756d626572466f723c543e00030490536565205b6050616c6c65743a3a6164645f616c6c6f77616e63655f64656c6179605d2e587570646174655f616c6c6f77616e63655f64656c617908012c63757272656e63795f6964c5040134543a3a43757272656e6379496400011464656c6179100144426c6f636b4e756d626572466f723c543e0004049c536565205b6050616c6c65743a3a7570646174655f616c6c6f77616e63655f64656c6179605d2eb4746f67676c655f616c6c6f77616e63655f64656c61795f6f6e63655f6675747572655f6d6f6469666961626c6504012c63757272656e63795f6964c5040134543a3a43757272656e63794964000504f8536565205b6050616c6c65743a3a746f67676c655f616c6c6f77616e63655f64656c61795f6f6e63655f6675747572655f6d6f6469666961626c65605d2e5470757267655f616c6c6f77616e63655f64656c617904012c63757272656e63795f6964c5040134543a3a43757272656e6379496400060498536565205b6050616c6c65743a3a70757267655f616c6c6f77616e63655f64656c6179605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732ec5040c246366675f747970657318746f6b656e733846696c74657243757272656e63790001080c416c6c0000002053706563696669630400b903012843757272656e6379496400010000c9040c246366675f7479706573246c6f636174696f6e7368526573747269637465645472616e736665724c6f636174696f6e00010c144c6f63616c04000001244163636f756e7449640000000c58636d0400cd040158426f783c56657273696f6e65644c6f636174696f6e3e0001001c416464726573730400d5010134446f6d61696e4164647265737300020000cd04080c78636d4456657273696f6e65644c6f636174696f6e00010c0856320400d104014476323a3a4d756c74694c6f636174696f6e0001000856330400ed04014476333a3a4d756c74694c6f636174696f6e0003000856340400dd01013076343a3a4c6f636174696f6e00040000d104100c78636d087632346d756c74696c6f636174696f6e344d756c74694c6f636174696f6e000008011c706172656e74730801087538000120696e746572696f72d50401244a756e6374696f6e730000d504100c78636d087632346d756c74696c6f636174696f6e244a756e6374696f6e7300012410486572650000000858310400d90401204a756e6374696f6e0001000858320800d90401204a756e6374696f6e0000d90401204a756e6374696f6e0002000858330c00d90401204a756e6374696f6e0000d90401204a756e6374696f6e0000d90401204a756e6374696f6e0003000858341000d90401204a756e6374696f6e0000d90401204a756e6374696f6e0000d90401204a756e6374696f6e0000d90401204a756e6374696f6e0004000858351400d90401204a756e6374696f6e0000d90401204a756e6374696f6e0000d90401204a756e6374696f6e0000d90401204a756e6374696f6e0000d90401204a756e6374696f6e0005000858361800d90401204a756e6374696f6e0000d90401204a756e6374696f6e0000d90401204a756e6374696f6e0000d90401204a756e6374696f6e0000d90401204a756e6374696f6e0000d90401204a756e6374696f6e0006000858371c00d90401204a756e6374696f6e0000d90401204a756e6374696f6e0000d90401204a756e6374696f6e0000d90401204a756e6374696f6e0000d90401204a756e6374696f6e0000d90401204a756e6374696f6e0000d90401204a756e6374696f6e0007000858382000d90401204a756e6374696f6e0000d90401204a756e6374696f6e0000d90401204a756e6374696f6e0000d90401204a756e6374696f6e0000d90401204a756e6374696f6e0000d90401204a756e6374696f6e0000d90401204a756e6374696f6e0000d90401204a756e6374696f6e00080000d904100c78636d087632206a756e6374696f6e204a756e6374696f6e0001242450617261636861696e0400b101010c7533320000002c4163636f756e744964333208011c6e6574776f726bdd0401244e6574776f726b496400010869640401205b75383b2033325d000100384163636f756e74496e646578363408011c6e6574776f726bdd0401244e6574776f726b4964000114696e64657828010c753634000200304163636f756e744b6579323008011c6e6574776f726bdd0401244e6574776f726b496400010c6b6579810101205b75383b2032305d0003003850616c6c6574496e7374616e6365040008010875380004003047656e6572616c496e646578040085010110753132380005002847656e6572616c4b65790400e10401805765616b426f756e6465645665633c75382c20436f6e73745533323c33323e3e000600244f6e6c794368696c6400070024506c7572616c6974790801086964e5040118426f6479496400011070617274e9040120426f64795061727400080000dd040c0c78636d087632244e6574776f726b49640001100c416e79000000144e616d65640400e10401805765616b426f756e6465645665633c75382c20436f6e73745533323c33323e3e00010020506f6c6b61646f74000200184b7573616d6100030000e1040c4c626f756e6465645f636f6c6c656374696f6e73407765616b5f626f756e6465645f766563385765616b426f756e64656456656308045401080453000004003401185665633c543e0000e5040c0c78636d08763218426f6479496400012810556e6974000000144e616d65640400e10401805765616b426f756e6465645665633c75382c20436f6e73745533323c33323e3e00010014496e6465780400b101010c7533320002002445786563757469766500030024546563686e6963616c0004002c4c656769736c6174697665000500204a7564696369616c0006001c446566656e73650007003841646d696e697374726174696f6e00080020547265617375727900090000e9040c0c78636d08763220426f64795061727400011414566f6963650000001c4d656d62657273040114636f756e74b101010c753332000100204672616374696f6e08010c6e6f6db101010c75333200011464656e6f6db101010c7533320002004441744c6561737450726f706f7274696f6e08010c6e6f6db101010c75333200011464656e6f6db101010c753332000300484d6f72655468616e50726f706f7274696f6e08010c6e6f6db101010c75333200011464656e6f6db101010c75333200040000ed04102c73746167696e675f78636d087633346d756c74696c6f636174696f6e344d756c74694c6f636174696f6e000008011c706172656e74730801087538000120696e746572696f72f10401244a756e6374696f6e730000f104100c78636d087633246a756e6374696f6e73244a756e6374696f6e7300012410486572650000000858310400f50401204a756e6374696f6e0001000858320800f50401204a756e6374696f6e0000f50401204a756e6374696f6e0002000858330c00f50401204a756e6374696f6e0000f50401204a756e6374696f6e0000f50401204a756e6374696f6e0003000858341000f50401204a756e6374696f6e0000f50401204a756e6374696f6e0000f50401204a756e6374696f6e0000f50401204a756e6374696f6e0004000858351400f50401204a756e6374696f6e0000f50401204a756e6374696f6e0000f50401204a756e6374696f6e0000f50401204a756e6374696f6e0000f50401204a756e6374696f6e0005000858361800f50401204a756e6374696f6e0000f50401204a756e6374696f6e0000f50401204a756e6374696f6e0000f50401204a756e6374696f6e0000f50401204a756e6374696f6e0000f50401204a756e6374696f6e0006000858371c00f50401204a756e6374696f6e0000f50401204a756e6374696f6e0000f50401204a756e6374696f6e0000f50401204a756e6374696f6e0000f50401204a756e6374696f6e0000f50401204a756e6374696f6e0000f50401204a756e6374696f6e0007000858382000f50401204a756e6374696f6e0000f50401204a756e6374696f6e0000f50401204a756e6374696f6e0000f50401204a756e6374696f6e0000f50401204a756e6374696f6e0000f50401204a756e6374696f6e0000f50401204a756e6374696f6e0000f50401204a756e6374696f6e00080000f504100c78636d087633206a756e6374696f6e204a756e6374696f6e0001282450617261636861696e0400b101010c7533320000002c4163636f756e744964333208011c6e6574776f726bf90401444f7074696f6e3c4e6574776f726b49643e00010869640401205b75383b2033325d000100384163636f756e74496e646578363408011c6e6574776f726bf90401444f7074696f6e3c4e6574776f726b49643e000114696e64657828010c753634000200304163636f756e744b6579323008011c6e6574776f726bf90401444f7074696f6e3c4e6574776f726b49643e00010c6b6579810101205b75383b2032305d0003003850616c6c6574496e7374616e6365040008010875380004003047656e6572616c496e646578040085010110753132380005002847656e6572616c4b65790801186c656e6774680801087538000110646174610401205b75383b2033325d000600244f6e6c794368696c6400070024506c7572616c6974790801086964f5010118426f6479496400011070617274f9010120426f6479506172740008003c476c6f62616c436f6e73656e7375730400fd0401244e6574776f726b496400090000f90404184f7074696f6e04045401fd040108104e6f6e6500000010536f6d650400fd040000010000fd04100c78636d087633206a756e6374696f6e244e6574776f726b496400012c24427947656e6573697304000401205b75383b2033325d000000184279466f726b080130626c6f636b5f6e756d6265722c010c753634000128626c6f636b5f686173680401205b75383b2033325d00010020506f6c6b61646f74000200184b7573616d610003001c57657374656e6400040018526f636f636f00050018576f636f636f00060020457468657265756d040120636861696e5f696428010c7536340007002c426974636f696e436f72650008002c426974636f696e4361736800090040506f6c6b61646f7442756c6c6574696e000a000001050c7870616c6c65745f6c69717569646974795f706f6f6c735f676174657761791870616c6c65741043616c6c04045400011c447365745f646f6d61696e5f726f75746572080118646f6d61696e55040118446f6d61696e000118726f7574657205050124543a3a526f7574657200000488536565205b6050616c6c65743a3a7365745f646f6d61696e5f726f75746572605d2e306164645f696e7374616e6365040120696e7374616e6365d5010134446f6d61696e4164647265737300010474536565205b6050616c6c65743a3a6164645f696e7374616e6365605d2e3c72656d6f76655f696e7374616e6365040120696e7374616e6365d5010134446f6d61696e4164647265737300020480536565205b6050616c6c65743a3a72656d6f76655f696e7374616e6365605d2e3c726563656976655f6d65737361676504010c6d7367290501a4426f756e6465645665633c75382c20543a3a4d6178496e636f6d696e674d65737361676553697a653e00050480536565205b6050616c6c65743a3a726563656976655f6d657373616765605d2e5c7365745f646f6d61696e5f686f6f6b5f61646472657373080118646f6d61696e55040118446f6d61696e000130686f6f6b5f61646472657373810101205b75383b2032305d000804a0536565205b6050616c6c65743a3a7365745f646f6d61696e5f686f6f6b5f61646472657373605d2e4c73746172745f62617463685f6d65737361676504012c64657374696e6174696f6e55040118446f6d61696e00090490536565205b6050616c6c65743a3a73746172745f62617463685f6d657373616765605d2e44656e645f62617463685f6d65737361676504012c64657374696e6174696f6e55040118446f6d61696e000a0488536565205b6050616c6c65743a3a656e645f62617463685f6d657373616765605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e0505087c6c69717569646974795f706f6f6c735f676174657761795f726f757465727330446f6d61696e526f757465720404540109050104244178656c617245564d04000d0501484178656c617245564d526f757465723c543e000000000905084c646576656c6f706d656e745f72756e74696d651c52756e74696d65000000000d05107c6c69717569646974795f706f6f6c735f676174657761795f726f75746572731c726f7574657273286178656c61725f65766d3c4178656c617245564d526f75746572040454010905000c0118726f757465721105013045564d526f757465723c543e00012465766d5f636861696e250501cc426f756e6465645665633c75382c20436f6e73745533323c4d41585f4158454c41525f45564d5f434841494e5f53495a453e3e0001806c69717569646974795f706f6f6c735f636f6e74726163745f61646472657373210201104831363000001105087c6c69717569646974795f706f6f6c735f676174657761795f726f75746572732445564d526f757465720404540109050004012865766d5f646f6d61696e1505012445564d446f6d61696e00001505087c6c69717569646974795f706f6f6c735f676174657761795f726f75746572732445564d446f6d61696e00000c015c7461726765745f636f6e74726163745f6164647265737321020110483136300001507461726765745f636f6e74726163745f68617368300110483235360001286665655f76616c7565731905012446656556616c75657300001905087c6c69717569646974795f706f6f6c735f676174657761795f726f75746572732446656556616c75657300000c011476616c75651d050110553235360001246761735f70726963651d050110553235360001246761735f6c696d69741d0501105532353600001d05083c7072696d69746976655f7479706573105532353600000400210501205b7536343b20345d00002105000003040000002c0025050c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401080453000004003401185665633c543e000029050c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401080453000004003401185665633c543e00002d050c4470616c6c65745f6f726465725f626f6f6b1870616c6c65741043616c6c0404540001142c706c6163655f6f7264657210012c63757272656e63795f696eb9030134543a3a43757272656e6379496400013063757272656e63795f6f7574b9030134543a3a43757272656e63794964000128616d6f756e745f6f7574180134543a3a42616c616e63654f7574000114726174696f310501504f72646572526174696f3c543a3a526174696f3e00000470536565205b6050616c6c65743a3a706c6163655f6f72646572605d2e307570646174655f6f726465720c01206f726465725f69642c013c543a3a4f7264657249644e6f6e6365000128616d6f756e745f6f7574180134543a3a42616c616e63654f7574000114726174696f310501504f72646572526174696f3c543a3a526174696f3e00010474536565205b6050616c6c65743a3a7570646174655f6f72646572605d2e3063616e63656c5f6f726465720401206f726465725f69642c013c543a3a4f7264657249644e6f6e636500020474536565205b6050616c6c65743a3a63616e63656c5f6f72646572605d2e2866696c6c5f6f726465720801206f726465725f69642c013c543a3a4f7264657249644e6f6e6365000128616d6f756e745f6f7574180134543a3a42616c616e63654f75740003046c536565205b6050616c6c65743a3a66696c6c5f6f72646572605d2e447365745f6d61726b65745f6665656465720401246665656465725f69643505012c543a3a466565646572496400040488536565205b6050616c6c65743a3a7365745f6d61726b65745f666565646572605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e31050c286366675f747261697473147377617073284f72646572526174696f0414526174696f01c9030108184d61726b657400000018437573746f6d0400c9030114526174696f0001000035050c3872756e74696d655f636f6d6d6f6e186f7261636c651846656564657204044f00000400bd0101404f3a3a50616c6c6574734f726967696e000039050c4870616c6c65745f6f7261636c655f666565641870616c6c65741043616c6c040454000104106665656408010c6b6579b5030130543a3a4f7261636c654b657900011476616c7565c9030138543a3a4f7261636c6556616c756500000454536565205b6050616c6c65743a3a66656564605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e3d050c6070616c6c65745f6f7261636c655f636f6c6c656374696f6e1870616c6c65741043616c6c04045400010c7870726f706f73655f7570646174655f636f6c6c656374696f6e5f696e666f080134636f6c6c656374696f6e5f69642c013c543a3a436f6c6c656374696f6e4964000110696e666f4105016074797065733a3a436f6c6c656374696f6e496e666f3c543e000004bc536565205b6050616c6c65743a3a70726f706f73655f7570646174655f636f6c6c656374696f6e5f696e666f605d2e706170706c795f7570646174655f636f6c6c656374696f6e5f696e666f080134636f6c6c656374696f6e5f69642c013c543a3a436f6c6c656374696f6e49640001246368616e67655f696430011c543a3a48617368000104b4536565205b6050616c6c65743a3a6170706c795f7570646174655f636f6c6c656374696f6e5f696e666f605d2e447570646174655f636f6c6c656374696f6e040134636f6c6c656374696f6e5f69642c013c543a3a436f6c6c656374696f6e496400020488536565205b6050616c6c65743a3a7570646174655f636f6c6c656374696f6e605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e41050c6070616c6c65745f6f7261636c655f636f6c6c656374696f6e14747970657338436f6c6c656374696f6e496e666f04045400000c013876616c75655f6c69666574696d650d0101504f7074696f6e3c543a3a54696d657374616d703e00012c6d696e5f6665656465727310010c75333200011c66656564657273450501c4426f756e64656442547265655365743c543a3a46656564657249642c20543a3a4d6178466565646572735065724b65793e000045050c4c626f756e6465645f636f6c6c656374696f6e7344626f756e6465645f62747265655f7365743c426f756e64656442547265655365740804540135050453000004004905012c42547265655365743c543e00004905042042547265655365740404540135050004004d050000004d0500000235050051050c4470616c6c65745f616e63686f72735f76321870616c6c65741043616c6c04045400010c287365745f616e63686f720c012c646f63756d656e745f696418011075313238000140646f63756d656e745f76657273696f6e2c010c7536340001106861736830011c543a3a486173680000046c536565205b6050616c6c65743a3a7365745f616e63686f72605d2e3472656d6f76655f616e63686f7208012c646f63756d656e745f696418011075313238000140646f63756d656e745f76657273696f6e2c010c75363400010478536565205b6050616c6c65743a3a72656d6f76655f616e63686f72605d2e447365745f6465706f7369745f76616c756504012c6e65775f6465706f736974180128543a3a42616c616e636500020488536565205b6050616c6c65743a3a7365745f6465706f7369745f76616c7565605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e55050c9070616c6c65745f6c69717569646974795f706f6f6c735f676174657761795f71756575651870616c6c65741043616c6c0404540001083c70726f636573735f6d6573736167650401146e6f6e63652c013c543a3a4d6573736167654e6f6e636500000480536565205b6050616c6c65743a3a70726f636573735f6d657373616765605d2e5870726f636573735f6661696c65645f6d6573736167650401146e6f6e63652c013c543a3a4d6573736167654e6f6e63650001049c536565205b6050616c6c65743a3a70726f636573735f6661696c65645f6d657373616765605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e59050c6463756d756c75735f70616c6c65745f78636d705f71756575651870616c6c65741043616c6c0404540001145473757370656e645f78636d5f657865637574696f6e00010498536565205b6050616c6c65743a3a73757370656e645f78636d5f657865637574696f6e605d2e50726573756d655f78636d5f657865637574696f6e00020494536565205b6050616c6c65743a3a726573756d655f78636d5f657865637574696f6e605d2e607570646174655f73757370656e645f7468726573686f6c6404010c6e657710010c753332000304a4536565205b6050616c6c65743a3a7570646174655f73757370656e645f7468726573686f6c64605d2e547570646174655f64726f705f7468726573686f6c6404010c6e657710010c75333200040498536565205b6050616c6c65743a3a7570646174655f64726f705f7468726573686f6c64605d2e5c7570646174655f726573756d655f7468726573686f6c6404010c6e657710010c753332000504a0536565205b6050616c6c65743a3a7570646174655f726573756d655f7468726573686f6c64605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e5d050c2870616c6c65745f78636d1870616c6c65741043616c6c0404540001301073656e6408011064657374cd040158426f783c56657273696f6e65644c6f636174696f6e3e00011c6d65737361676561050154426f783c56657273696f6e656458636d3c28293e3e00000454536565205b6050616c6c65743a3a73656e64605d2e3c74656c65706f72745f61737365747310011064657374cd040158426f783c56657273696f6e65644c6f636174696f6e3e00012c62656e6566696369617279cd040158426f783c56657273696f6e65644c6f636174696f6e3e00011861737365747361060150426f783c56657273696f6e65644173736574733e0001386665655f61737365745f6974656d10010c75333200010480536565205b6050616c6c65743a3a74656c65706f72745f617373657473605d2e5c726573657276655f7472616e736665725f61737365747310011064657374cd040158426f783c56657273696f6e65644c6f636174696f6e3e00012c62656e6566696369617279cd040158426f783c56657273696f6e65644c6f636174696f6e3e00011861737365747361060150426f783c56657273696f6e65644173736574733e0001386665655f61737365745f6974656d10010c753332000204a0536565205b6050616c6c65743a3a726573657276655f7472616e736665725f617373657473605d2e1c6578656375746508011c6d657373616765650601b4426f783c56657273696f6e656458636d3c3c5420617320436f6e6669673e3a3a52756e74696d6543616c6c3e3e0001286d61785f77656967687424011857656967687400030460536565205b6050616c6c65743a3a65786563757465605d2e44666f7263655f78636d5f76657273696f6e0801206c6f636174696f6edd010134426f783c4c6f636174696f6e3e00011c76657273696f6e10012858636d56657273696f6e00040488536565205b6050616c6c65743a3a666f7263655f78636d5f76657273696f6e605d2e64666f7263655f64656661756c745f78636d5f76657273696f6e0401446d617962655f78636d5f76657273696f6e450201484f7074696f6e3c58636d56657273696f6e3e000504a8536565205b6050616c6c65743a3a666f7263655f64656661756c745f78636d5f76657273696f6e605d2e78666f7263655f7375627363726962655f76657273696f6e5f6e6f746966790401206c6f636174696f6ecd040158426f783c56657273696f6e65644c6f636174696f6e3e000604bc536565205b6050616c6c65743a3a666f7263655f7375627363726962655f76657273696f6e5f6e6f74696679605d2e80666f7263655f756e7375627363726962655f76657273696f6e5f6e6f746966790401206c6f636174696f6ecd040158426f783c56657273696f6e65644c6f636174696f6e3e000704c4536565205b6050616c6c65743a3a666f7263655f756e7375627363726962655f76657273696f6e5f6e6f74696679605d2e7c6c696d697465645f726573657276655f7472616e736665725f61737365747314011064657374cd040158426f783c56657273696f6e65644c6f636174696f6e3e00012c62656e6566696369617279cd040158426f783c56657273696f6e65644c6f636174696f6e3e00011861737365747361060150426f783c56657273696f6e65644173736574733e0001386665655f61737365745f6974656d10010c7533320001307765696768745f6c696d69741106012c5765696768744c696d6974000804c0536565205b6050616c6c65743a3a6c696d697465645f726573657276655f7472616e736665725f617373657473605d2e5c6c696d697465645f74656c65706f72745f61737365747314011064657374cd040158426f783c56657273696f6e65644c6f636174696f6e3e00012c62656e6566696369617279cd040158426f783c56657273696f6e65644c6f636174696f6e3e00011861737365747361060150426f783c56657273696f6e65644173736574733e0001386665655f61737365745f6974656d10010c7533320001307765696768745f6c696d69741106012c5765696768744c696d6974000904a0536565205b6050616c6c65743a3a6c696d697465645f74656c65706f72745f617373657473605d2e40666f7263655f73757370656e73696f6e04012473757370656e646564780110626f6f6c000a0484536565205b6050616c6c65743a3a666f7263655f73757370656e73696f6e605d2e3c7472616e736665725f61737365747314011064657374cd040158426f783c56657273696f6e65644c6f636174696f6e3e00012c62656e6566696369617279cd040158426f783c56657273696f6e65644c6f636174696f6e3e00011861737365747361060150426f783c56657273696f6e65644173736574733e0001386665655f61737365745f6974656d10010c7533320001307765696768745f6c696d69741106012c5765696768744c696d6974000b0480536565205b6050616c6c65743a3a7472616e736665725f617373657473605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e6105080c78636d3056657273696f6e656458636d042c52756e74696d6543616c6c00010c08563204006505015076323a3a58636d3c52756e74696d6543616c6c3e0002000856330400b105015076333a3a58636d3c52756e74696d6543616c6c3e00030008563404001506015076343a3a58636d3c52756e74696d6543616c6c3e0004000065050c0c78636d0876320c58636d042c52756e74696d6543616c6c00000400690501745665633c496e737472756374696f6e3c52756e74696d6543616c6c3e3e000069050000026d05006d050c0c78636d0876322c496e737472756374696f6e042c52756e74696d6543616c6c000170345769746864726177417373657404007105012c4d756c7469417373657473000000545265736572766541737365744465706f736974656404007105012c4d756c7469417373657473000100585265636569766554656c65706f72746564417373657404007105012c4d756c7469417373657473000200345175657279526573706f6e73650c012071756572795f696428011c51756572794964000120726573706f6e736589050120526573706f6e73650001286d61785f77656967687428010c753634000300345472616e7366657241737365740801186173736574737105012c4d756c746941737365747300012c62656e6566696369617279d10401344d756c74694c6f636174696f6e000400505472616e736665725265736572766541737365740c01186173736574737105012c4d756c746941737365747300011064657374d10401344d756c74694c6f636174696f6e00010c78636d6505011c58636d3c28293e000500205472616e736163740c012c6f726967696e5f74797065990501284f726967696e4b696e64000158726571756972655f7765696768745f61745f6d6f737428010c75363400011063616c6c9d050168446f75626c65456e636f6465643c52756e74696d6543616c6c3e0006006448726d704e65774368616e6e656c4f70656e526571756573740c011873656e646572b101010c7533320001406d61785f6d6573736167655f73697a65b101010c7533320001306d61785f6361706163697479b101010c7533320007004c48726d704368616e6e656c4163636570746564040124726563697069656e74b101010c7533320008004848726d704368616e6e656c436c6f73696e670c0124696e69746961746f72b101010c75333200011873656e646572b101010c753332000124726563697069656e74b101010c7533320009002c436c6561724f726967696e000a003444657363656e644f726967696e0400d5040154496e746572696f724d756c74694c6f636174696f6e000b002c5265706f72744572726f720c012071756572795f696428011c5175657279496400011064657374d10401344d756c74694c6f636174696f6e00014c6d61785f726573706f6e73655f77656967687428010c753634000c00304465706f73697441737365740c0118617373657473a10501404d756c7469417373657446696c7465720001286d61785f617373657473b101010c75333200012c62656e6566696369617279d10401344d756c74694c6f636174696f6e000d004c4465706f736974526573657276654173736574100118617373657473a10501404d756c7469417373657446696c7465720001286d61785f617373657473b101010c75333200011064657374d10401344d756c74694c6f636174696f6e00010c78636d6505011c58636d3c28293e000e003445786368616e6765417373657408011067697665a10501404d756c7469417373657446696c74657200011c726563656976657105012c4d756c7469417373657473000f005c496e6974696174655265736572766557697468647261770c0118617373657473a10501404d756c7469417373657446696c74657200011c72657365727665d10401344d756c74694c6f636174696f6e00010c78636d6505011c58636d3c28293e00100040496e69746961746554656c65706f72740c0118617373657473a10501404d756c7469417373657446696c74657200011064657374d10401344d756c74694c6f636174696f6e00010c78636d6505011c58636d3c28293e001100305175657279486f6c64696e6710012071756572795f696428011c5175657279496400011064657374d10401344d756c74694c6f636174696f6e000118617373657473a10501404d756c7469417373657446696c74657200014c6d61785f726573706f6e73655f77656967687428010c75363400120030427579457865637574696f6e08011066656573790501284d756c746941737365740001307765696768745f6c696d6974ad05012c5765696768744c696d697400130034526566756e64537572706c75730014003c5365744572726f7248616e646c657204006505014058636d3c52756e74696d6543616c6c3e0015002c536574417070656e64697804006505014058636d3c52756e74696d6543616c6c3e00160028436c6561724572726f7200170028436c61696d41737365740801186173736574737105012c4d756c74694173736574730001187469636b6574d10401344d756c74694c6f636174696f6e0018001054726170040028010c7536340019004053756273637269626556657273696f6e08012071756572795f696428011c5175657279496400014c6d61785f726573706f6e73655f77656967687428010c753634001a0048556e73756273637269626556657273696f6e001b00007105100c78636d087632286d756c746961737365742c4d756c7469417373657473000004007505013c5665633c4d756c746941737365743e000075050000027905007905100c78636d087632286d756c74696173736574284d756c74694173736574000008010869647d05011c4173736574496400010c66756e8105012c46756e676962696c69747900007d05100c78636d087632286d756c746961737365741c4173736574496400010820436f6e63726574650400d10401344d756c74694c6f636174696f6e000000204162737472616374040034011c5665633c75383e000100008105100c78636d087632286d756c746961737365742c46756e676962696c6974790001082046756e6769626c65040085010110753132380000002c4e6f6e46756e6769626c650400850501344173736574496e7374616e6365000100008505100c78636d087632286d756c74696173736574344173736574496e7374616e636500011c24556e646566696e656400000014496e6465780400850101107531323800010018417272617934040044011c5b75383b20345d0002001841727261793804007d02011c5b75383b20385d0003001c4172726179313604009d0201205b75383b2031365d0004001c4172726179333204000401205b75383b2033325d00050010426c6f62040034011c5665633c75383e0006000089050c0c78636d08763220526573706f6e7365000110104e756c6c0000001841737365747304007105012c4d756c74694173736574730001003c457865637574696f6e526573756c7404008d0501504f7074696f6e3c287533322c204572726f72293e0002001c56657273696f6e040010013873757065723a3a56657273696f6e000300008d0504184f7074696f6e0404540191050108104e6f6e6500000010536f6d65040091050000010000910500000408109505009505100c78636d08763218747261697473144572726f72000168204f766572666c6f7700000034556e696d706c656d656e74656400010060556e74727573746564526573657276654c6f636174696f6e00020064556e7472757374656454656c65706f72744c6f636174696f6e000300444d756c74694c6f636174696f6e46756c6c000400684d756c74694c6f636174696f6e4e6f74496e7665727469626c65000500244261644f726967696e0006003c496e76616c69644c6f636174696f6e0007003441737365744e6f74466f756e64000800544661696c6564546f5472616e7361637441737365740009003c4e6f74576974686472617761626c65000a00484c6f636174696f6e43616e6e6f74486f6c64000b0054457863656564734d61784d65737361676553697a65000c005844657374696e6174696f6e556e737570706f72746564000d00245472616e73706f7274000e0028556e726f757461626c65000f0030556e6b6e6f776e436c61696d001000384661696c6564546f4465636f6465001100404d6178576569676874496e76616c6964001200384e6f74486f6c64696e674665657300130030546f6f457870656e73697665001400105472617004002c010c7536340015004c556e68616e646c656458636d56657273696f6e001600485765696768744c696d69745265616368656404002c01185765696768740017001c426172726965720018004c5765696768744e6f74436f6d70757461626c650019000099050c0c78636d087632284f726967696e4b696e64000110184e617469766500000040536f7665726569676e4163636f756e74000100245375706572757365720002000c58636d000300009d050c0c78636d38646f75626c655f656e636f64656434446f75626c65456e636f646564040454000004011c656e636f64656434011c5665633c75383e0000a105100c78636d087632286d756c74696173736574404d756c7469417373657446696c74657200010820446566696e69746504007105012c4d756c74694173736574730000001057696c640400a505013857696c644d756c7469417373657400010000a505100c78636d087632286d756c746961737365743857696c644d756c746941737365740001080c416c6c00000014416c6c4f6608010869647d05011c4173736574496400010c66756ea905013c57696c6446756e676962696c69747900010000a905100c78636d087632286d756c746961737365743c57696c6446756e676962696c6974790001082046756e6769626c650000002c4e6f6e46756e6769626c6500010000ad050c0c78636d0876322c5765696768744c696d697400010824556e6c696d697465640000001c4c696d69746564040028010c75363400010000b1050c0c78636d0876330c58636d041043616c6c00000400b50501585665633c496e737472756374696f6e3c43616c6c3e3e0000b505000002b90500b9050c0c78636d0876332c496e737472756374696f6e041043616c6c0001c034576974686472617741737365740400bd05012c4d756c7469417373657473000000545265736572766541737365744465706f73697465640400bd05012c4d756c7469417373657473000100585265636569766554656c65706f7274656441737365740400bd05012c4d756c7469417373657473000200345175657279526573706f6e736510012071756572795f696428011c51756572794964000120726573706f6e7365d5050120526573706f6e73650001286d61785f77656967687424011857656967687400011c71756572696572fd0501544f7074696f6e3c4d756c74694c6f636174696f6e3e000300345472616e736665724173736574080118617373657473bd05012c4d756c746941737365747300012c62656e6566696369617279ed0401344d756c74694c6f636174696f6e000400505472616e736665725265736572766541737365740c0118617373657473bd05012c4d756c746941737365747300011064657374ed0401344d756c74694c6f636174696f6e00010c78636db105011c58636d3c28293e000500205472616e736163740c012c6f726967696e5f6b696e64990501284f726967696e4b696e64000158726571756972655f7765696768745f61745f6d6f737424011857656967687400011063616c6c9d05014c446f75626c65456e636f6465643c43616c6c3e0006006448726d704e65774368616e6e656c4f70656e526571756573740c011873656e646572b101010c7533320001406d61785f6d6573736167655f73697a65b101010c7533320001306d61785f6361706163697479b101010c7533320007004c48726d704368616e6e656c4163636570746564040124726563697069656e74b101010c7533320008004848726d704368616e6e656c436c6f73696e670c0124696e69746961746f72b101010c75333200011873656e646572b101010c753332000124726563697069656e74b101010c7533320009002c436c6561724f726967696e000a003444657363656e644f726967696e0400f1040154496e746572696f724d756c74694c6f636174696f6e000b002c5265706f72744572726f720400010601445175657279526573706f6e7365496e666f000c00304465706f7369744173736574080118617373657473050601404d756c7469417373657446696c74657200012c62656e6566696369617279ed0401344d756c74694c6f636174696f6e000d004c4465706f7369745265736572766541737365740c0118617373657473050601404d756c7469417373657446696c74657200011064657374ed0401344d756c74694c6f636174696f6e00010c78636db105011c58636d3c28293e000e003445786368616e676541737365740c011067697665050601404d756c7469417373657446696c74657200011077616e74bd05012c4d756c746941737365747300011c6d6178696d616c780110626f6f6c000f005c496e6974696174655265736572766557697468647261770c0118617373657473050601404d756c7469417373657446696c74657200011c72657365727665ed0401344d756c74694c6f636174696f6e00010c78636db105011c58636d3c28293e00100040496e69746961746554656c65706f72740c0118617373657473050601404d756c7469417373657446696c74657200011064657374ed0401344d756c74694c6f636174696f6e00010c78636db105011c58636d3c28293e001100345265706f7274486f6c64696e67080134726573706f6e73655f696e666f010601445175657279526573706f6e7365496e666f000118617373657473050601404d756c7469417373657446696c74657200120030427579457865637574696f6e08011066656573c50501284d756c746941737365740001307765696768745f6c696d69741106012c5765696768744c696d697400130034526566756e64537572706c75730014003c5365744572726f7248616e646c65720400b105012458636d3c43616c6c3e0015002c536574417070656e6469780400b105012458636d3c43616c6c3e00160028436c6561724572726f7200170028436c61696d4173736574080118617373657473bd05012c4d756c74694173736574730001187469636b6574ed0401344d756c74694c6f636174696f6e0018001054726170040028010c7536340019004053756273637269626556657273696f6e08012071756572795f696428011c5175657279496400014c6d61785f726573706f6e73655f776569676874240118576569676874001a0048556e73756273637269626556657273696f6e001b00244275726e41737365740400bd05012c4d756c7469417373657473001c002c45787065637441737365740400bd05012c4d756c7469417373657473001d00304578706563744f726967696e0400fd0501544f7074696f6e3c4d756c74694c6f636174696f6e3e001e002c4578706563744572726f720400d90501504f7074696f6e3c287533322c204572726f72293e001f00504578706563745472616e736163745374617475730400f50501384d617962654572726f72436f64650020002c517565727950616c6c657408012c6d6f64756c655f6e616d6534011c5665633c75383e000134726573706f6e73655f696e666f010601445175657279526573706f6e7365496e666f0021003045787065637450616c6c6574140114696e646578b101010c7533320001106e616d6534011c5665633c75383e00012c6d6f64756c655f6e616d6534011c5665633c75383e00012c63726174655f6d616a6f72b101010c75333200013c6d696e5f63726174655f6d696e6f72b101010c753332002200505265706f72745472616e736163745374617475730400010601445175657279526573706f6e7365496e666f0023004c436c6561725472616e736163745374617475730024003c556e6976657273616c4f726967696e0400f50401204a756e6374696f6e002500344578706f72744d6573736167650c011c6e6574776f726bfd0401244e6574776f726b496400012c64657374696e6174696f6ef1040154496e746572696f724d756c74694c6f636174696f6e00010c78636db105011c58636d3c28293e002600244c6f636b41737365740801146173736574c50501284d756c74694173736574000120756e6c6f636b6572ed0401344d756c74694c6f636174696f6e0027002c556e6c6f636b41737365740801146173736574c50501284d756c74694173736574000118746172676574ed0401344d756c74694c6f636174696f6e002800384e6f7465556e6c6f636b61626c650801146173736574c50501284d756c746941737365740001146f776e6572ed0401344d756c74694c6f636174696f6e0029003452657175657374556e6c6f636b0801146173736574c50501284d756c746941737365740001186c6f636b6572ed0401344d756c74694c6f636174696f6e002a002c536574466565734d6f64650401306a69745f7769746864726177780110626f6f6c002b0020536574546f70696304000401205b75383b2033325d002c0028436c656172546f706963002d002c416c6961734f726967696e0400ed0401344d756c74694c6f636174696f6e002e003c556e70616964457865637574696f6e0801307765696768745f6c696d69741106012c5765696768744c696d6974000130636865636b5f6f726967696efd0501544f7074696f6e3c4d756c74694c6f636174696f6e3e002f0000bd05100c78636d087633286d756c746961737365742c4d756c746941737365747300000400c105013c5665633c4d756c746941737365743e0000c105000002c50500c505100c78636d087633286d756c74696173736574284d756c7469417373657400000801086964c905011c4173736574496400010c66756ecd05012c46756e676962696c6974790000c905100c78636d087633286d756c746961737365741c4173736574496400010820436f6e63726574650400ed0401344d756c74694c6f636174696f6e00000020416273747261637404000401205b75383b2033325d00010000cd05100c78636d087633286d756c746961737365742c46756e676962696c6974790001082046756e6769626c65040085010110753132380000002c4e6f6e46756e6769626c650400d10501344173736574496e7374616e636500010000d105100c78636d087633286d756c74696173736574344173736574496e7374616e636500011824556e646566696e656400000014496e6465780400850101107531323800010018417272617934040044011c5b75383b20345d0002001841727261793804007d02011c5b75383b20385d0003001c4172726179313604009d0201205b75383b2031365d0004001c4172726179333204000401205b75383b2033325d00050000d5050c0c78636d08763320526573706f6e7365000118104e756c6c000000184173736574730400bd05012c4d756c74694173736574730001003c457865637574696f6e526573756c740400d90501504f7074696f6e3c287533322c204572726f72293e0002001c56657273696f6e040010013873757065723a3a56657273696f6e0003002c50616c6c657473496e666f0400e5050198426f756e6465645665633c50616c6c6574496e666f2c204d617850616c6c657473496e666f3e000400384469737061746368526573756c740400f50501384d617962654572726f72436f646500050000d90504184f7074696f6e04045401dd050108104e6f6e6500000010536f6d650400dd050000010000dd050000040810e10500e105100c78636d08763318747261697473144572726f720001a0204f766572666c6f7700000034556e696d706c656d656e74656400010060556e74727573746564526573657276654c6f636174696f6e00020064556e7472757374656454656c65706f72744c6f636174696f6e000300304c6f636174696f6e46756c6c000400544c6f636174696f6e4e6f74496e7665727469626c65000500244261644f726967696e0006003c496e76616c69644c6f636174696f6e0007003441737365744e6f74466f756e64000800544661696c6564546f5472616e7361637441737365740009003c4e6f74576974686472617761626c65000a00484c6f636174696f6e43616e6e6f74486f6c64000b0054457863656564734d61784d65737361676553697a65000c005844657374696e6174696f6e556e737570706f72746564000d00245472616e73706f7274000e0028556e726f757461626c65000f0030556e6b6e6f776e436c61696d001000384661696c6564546f4465636f6465001100404d6178576569676874496e76616c6964001200384e6f74486f6c64696e674665657300130030546f6f457870656e73697665001400105472617004002c010c753634001500404578706563746174696f6e46616c73650016003850616c6c65744e6f74466f756e64001700304e616d654d69736d617463680018004c56657273696f6e496e636f6d70617469626c6500190050486f6c64696e67576f756c644f766572666c6f77001a002c4578706f72744572726f72001b00385265616e63686f724661696c6564001c00184e6f4465616c001d0028466565734e6f744d6574001e00244c6f636b4572726f72001f00304e6f5065726d697373696f6e00200028556e616e63686f726564002100384e6f744465706f73697461626c650022004c556e68616e646c656458636d56657273696f6e002300485765696768744c696d69745265616368656404002401185765696768740024001c426172726965720025004c5765696768744e6f74436f6d70757461626c650026004445786365656473537461636b4c696d697400270000e5050c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401e905045300000400f10501185665633c543e0000e9050c0c78636d0876332850616c6c6574496e666f0000180114696e646578b101010c7533320001106e616d65ed050180426f756e6465645665633c75382c204d617850616c6c65744e616d654c656e3e00012c6d6f64756c655f6e616d65ed050180426f756e6465645665633c75382c204d617850616c6c65744e616d654c656e3e0001146d616a6f72b101010c7533320001146d696e6f72b101010c7533320001147061746368b101010c7533320000ed050c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401080453000004003401185665633c543e0000f105000002e90500f5050c0c78636d087633384d617962654572726f72436f646500010c1c53756363657373000000144572726f720400f905018c426f756e6465645665633c75382c204d617844697370617463684572726f724c656e3e000100385472756e63617465644572726f720400f905018c426f756e6465645665633c75382c204d617844697370617463684572726f724c656e3e00020000f9050c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401080453000004003401185665633c543e0000fd0504184f7074696f6e04045401ed040108104e6f6e6500000010536f6d650400ed04000001000001060c0c78636d087633445175657279526573706f6e7365496e666f00000c012c64657374696e6174696f6eed0401344d756c74694c6f636174696f6e00012071756572795f696428011c517565727949640001286d61785f77656967687424011857656967687400000506100c78636d087633286d756c74696173736574404d756c7469417373657446696c74657200010820446566696e6974650400bd05012c4d756c74694173736574730000001057696c6404000906013857696c644d756c74694173736574000100000906100c78636d087633286d756c746961737365743857696c644d756c746941737365740001100c416c6c00000014416c6c4f660801086964c905011c4173736574496400010c66756e0d06013c57696c6446756e676962696c69747900010028416c6c436f756e7465640400b101010c75333200020030416c6c4f66436f756e7465640c01086964c905011c4173736574496400010c66756e0d06013c57696c6446756e676962696c697479000114636f756e74b101010c753332000300000d06100c78636d087633286d756c746961737365743c57696c6446756e676962696c6974790001082046756e6769626c650000002c4e6f6e46756e6769626c650001000011060c0c78636d0876332c5765696768744c696d697400010824556e6c696d697465640000001c4c696d6974656404002401185765696768740001000015060c2c73746167696e675f78636d0876340c58636d041043616c6c00000400190601585665633c496e737472756374696f6e3c43616c6c3e3e000019060000021d06001d060c2c73746167696e675f78636d0876342c496e737472756374696f6e041043616c6c0001c03457697468647261774173736574040021060118417373657473000000545265736572766541737365744465706f7369746564040021060118417373657473000100585265636569766554656c65706f727465644173736574040021060118417373657473000200345175657279526573706f6e736510012071756572795f696428011c51756572794964000120726573706f6e736539060120526573706f6e73650001286d61785f77656967687424011857656967687400011c717565726965724d0601404f7074696f6e3c4c6f636174696f6e3e000300345472616e7366657241737365740801186173736574732106011841737365747300012c62656e6566696369617279dd0101204c6f636174696f6e000400505472616e736665725265736572766541737365740c01186173736574732106011841737365747300011064657374dd0101204c6f636174696f6e00010c78636d1506011c58636d3c28293e000500205472616e736163740c012c6f726967696e5f6b696e64990501284f726967696e4b696e64000158726571756972655f7765696768745f61745f6d6f737424011857656967687400011063616c6c9d05014c446f75626c65456e636f6465643c43616c6c3e0006006448726d704e65774368616e6e656c4f70656e526571756573740c011873656e646572b101010c7533320001406d61785f6d6573736167655f73697a65b101010c7533320001306d61785f6361706163697479b101010c7533320007004c48726d704368616e6e656c4163636570746564040124726563697069656e74b101010c7533320008004848726d704368616e6e656c436c6f73696e670c0124696e69746961746f72b101010c75333200011873656e646572b101010c753332000124726563697069656e74b101010c7533320009002c436c6561724f726967696e000a003444657363656e644f726967696e0400e1010140496e746572696f724c6f636174696f6e000b002c5265706f72744572726f720400510601445175657279526573706f6e7365496e666f000c00304465706f73697441737365740801186173736574735506012c417373657446696c74657200012c62656e6566696369617279dd0101204c6f636174696f6e000d004c4465706f7369745265736572766541737365740c01186173736574735506012c417373657446696c74657200011064657374dd0101204c6f636174696f6e00010c78636d1506011c58636d3c28293e000e003445786368616e676541737365740c0110676976655506012c417373657446696c74657200011077616e742106011841737365747300011c6d6178696d616c780110626f6f6c000f005c496e6974696174655265736572766557697468647261770c01186173736574735506012c417373657446696c74657200011c72657365727665dd0101204c6f636174696f6e00010c78636d1506011c58636d3c28293e00100040496e69746961746554656c65706f72740c01186173736574735506012c417373657446696c74657200011064657374dd0101204c6f636174696f6e00010c78636d1506011c58636d3c28293e001100345265706f7274486f6c64696e67080134726573706f6e73655f696e666f510601445175657279526573706f6e7365496e666f0001186173736574735506012c417373657446696c74657200120030427579457865637574696f6e080110666565732906011441737365740001307765696768745f6c696d69741106012c5765696768744c696d697400130034526566756e64537572706c75730014003c5365744572726f7248616e646c657204001506012458636d3c43616c6c3e0015002c536574417070656e64697804001506012458636d3c43616c6c3e00160028436c6561724572726f7200170028436c61696d4173736574080118617373657473210601184173736574730001187469636b6574dd0101204c6f636174696f6e0018001054726170040028010c7536340019004053756273637269626556657273696f6e08012071756572795f696428011c5175657279496400014c6d61785f726573706f6e73655f776569676874240118576569676874001a0048556e73756273637269626556657273696f6e001b00244275726e4173736574040021060118417373657473001c002c4578706563744173736574040021060118417373657473001d00304578706563744f726967696e04004d0601404f7074696f6e3c4c6f636174696f6e3e001e002c4578706563744572726f720400d90501504f7074696f6e3c287533322c204572726f72293e001f00504578706563745472616e736163745374617475730400f50501384d617962654572726f72436f64650020002c517565727950616c6c657408012c6d6f64756c655f6e616d6534011c5665633c75383e000134726573706f6e73655f696e666f510601445175657279526573706f6e7365496e666f0021003045787065637450616c6c6574140114696e646578b101010c7533320001106e616d6534011c5665633c75383e00012c6d6f64756c655f6e616d6534011c5665633c75383e00012c63726174655f6d616a6f72b101010c75333200013c6d696e5f63726174655f6d696e6f72b101010c753332002200505265706f72745472616e736163745374617475730400510601445175657279526573706f6e7365496e666f0023004c436c6561725472616e736163745374617475730024003c556e6976657273616c4f726967696e0400e90101204a756e6374696f6e002500344578706f72744d6573736167650c011c6e6574776f726bf10101244e6574776f726b496400012c64657374696e6174696f6ee1010140496e746572696f724c6f636174696f6e00010c78636d1506011c58636d3c28293e002600244c6f636b41737365740801146173736574290601144173736574000120756e6c6f636b6572dd0101204c6f636174696f6e0027002c556e6c6f636b41737365740801146173736574290601144173736574000118746172676574dd0101204c6f636174696f6e002800384e6f7465556e6c6f636b61626c6508011461737365742906011441737365740001146f776e6572dd0101204c6f636174696f6e0029003452657175657374556e6c6f636b08011461737365742906011441737365740001186c6f636b6572dd0101204c6f636174696f6e002a002c536574466565734d6f64650401306a69745f7769746864726177780110626f6f6c002b0020536574546f70696304000401205b75383b2033325d002c0028436c656172546f706963002d002c416c6961734f726967696e0400dd0101204c6f636174696f6e002e003c556e70616964457865637574696f6e0801307765696768745f6c696d69741106012c5765696768744c696d6974000130636865636b5f6f726967696e4d0601404f7074696f6e3c4c6f636174696f6e3e002f00002106102c73746167696e675f78636d0876341461737365741841737365747300000400250601285665633c41737365743e000025060000022906002906102c73746167696e675f78636d087634146173736574144173736574000008010869642d06011c4173736574496400010c66756e3106012c46756e676962696c69747900002d06102c73746167696e675f78636d0876341461737365741c4173736574496400000400dd0101204c6f636174696f6e00003106102c73746167696e675f78636d0876341461737365742c46756e676962696c6974790001082046756e6769626c65040085010110753132380000002c4e6f6e46756e6769626c650400350601344173736574496e7374616e6365000100003506102c73746167696e675f78636d087634146173736574344173736574496e7374616e636500011824556e646566696e656400000014496e6465780400850101107531323800010018417272617934040044011c5b75383b20345d0002001841727261793804007d02011c5b75383b20385d0003001c4172726179313604009d0201205b75383b2031365d0004001c4172726179333204000401205b75383b2033325d0005000039060c2c73746167696e675f78636d08763420526573706f6e7365000118104e756c6c000000184173736574730400210601184173736574730001003c457865637574696f6e526573756c740400d90501504f7074696f6e3c287533322c204572726f72293e0002001c56657273696f6e040010013873757065723a3a56657273696f6e0003002c50616c6c657473496e666f04003d060198426f756e6465645665633c50616c6c6574496e666f2c204d617850616c6c657473496e666f3e000400384469737061746368526573756c740400f50501384d617962654572726f72436f6465000500003d060c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e646564566563080454014106045300000400490601185665633c543e000041060c2c73746167696e675f78636d0876342850616c6c6574496e666f0000180114696e646578b101010c7533320001106e616d6545060180426f756e6465645665633c75382c204d617850616c6c65744e616d654c656e3e00012c6d6f64756c655f6e616d6545060180426f756e6465645665633c75382c204d617850616c6c65744e616d654c656e3e0001146d616a6f72b101010c7533320001146d696e6f72b101010c7533320001147061746368b101010c753332000045060c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401080453000004003401185665633c543e000049060000024106004d0604184f7074696f6e04045401dd010108104e6f6e6500000010536f6d650400dd01000001000051060c2c73746167696e675f78636d087634445175657279526573706f6e7365496e666f00000c012c64657374696e6174696f6edd0101204c6f636174696f6e00012071756572795f696428011c517565727949640001286d61785f77656967687424011857656967687400005506102c73746167696e675f78636d0876341461737365742c417373657446696c74657200010820446566696e6974650400210601184173736574730000001057696c6404005906012457696c644173736574000100005906102c73746167696e675f78636d0876341461737365742457696c6441737365740001100c416c6c00000014416c6c4f6608010869642d06011c4173736574496400010c66756e5d06013c57696c6446756e676962696c69747900010028416c6c436f756e7465640400b101010c75333200020030416c6c4f66436f756e7465640c010869642d06011c4173736574496400010c66756e5d06013c57696c6446756e676962696c697479000114636f756e74b101010c753332000300005d06102c73746167696e675f78636d0876341461737365743c57696c6446756e676962696c6974790001082046756e6769626c650000002c4e6f6e46756e6769626c65000100006106080c78636d3c56657273696f6e656441737365747300010c08563204007105013c76323a3a4d756c74694173736574730001000856330400bd05013c76333a3a4d756c746941737365747300030008563404002106012876343a3a417373657473000400006506080c78636d3056657273696f6e656458636d042c52756e74696d6543616c6c00010c08563204006906015076323a3a58636d3c52756e74696d6543616c6c3e00020008563304007906015076333a3a58636d3c52756e74696d6543616c6c3e00030008563404008506015076343a3a58636d3c52756e74696d6543616c6c3e0004000069060c0c78636d0876320c58636d042c52756e74696d6543616c6c000004006d0601745665633c496e737472756374696f6e3c52756e74696d6543616c6c3e3e00006d0600000271060071060c0c78636d0876322c496e737472756374696f6e042c52756e74696d6543616c6c000170345769746864726177417373657404007105012c4d756c7469417373657473000000545265736572766541737365744465706f736974656404007105012c4d756c7469417373657473000100585265636569766554656c65706f72746564417373657404007105012c4d756c7469417373657473000200345175657279526573706f6e73650c012071756572795f696428011c51756572794964000120726573706f6e736589050120526573706f6e73650001286d61785f77656967687428010c753634000300345472616e7366657241737365740801186173736574737105012c4d756c746941737365747300012c62656e6566696369617279d10401344d756c74694c6f636174696f6e000400505472616e736665725265736572766541737365740c01186173736574737105012c4d756c746941737365747300011064657374d10401344d756c74694c6f636174696f6e00010c78636d6505011c58636d3c28293e000500205472616e736163740c012c6f726967696e5f74797065990501284f726967696e4b696e64000158726571756972655f7765696768745f61745f6d6f737428010c75363400011063616c6c75060168446f75626c65456e636f6465643c52756e74696d6543616c6c3e0006006448726d704e65774368616e6e656c4f70656e526571756573740c011873656e646572b101010c7533320001406d61785f6d6573736167655f73697a65b101010c7533320001306d61785f6361706163697479b101010c7533320007004c48726d704368616e6e656c4163636570746564040124726563697069656e74b101010c7533320008004848726d704368616e6e656c436c6f73696e670c0124696e69746961746f72b101010c75333200011873656e646572b101010c753332000124726563697069656e74b101010c7533320009002c436c6561724f726967696e000a003444657363656e644f726967696e0400d5040154496e746572696f724d756c74694c6f636174696f6e000b002c5265706f72744572726f720c012071756572795f696428011c5175657279496400011064657374d10401344d756c74694c6f636174696f6e00014c6d61785f726573706f6e73655f77656967687428010c753634000c00304465706f73697441737365740c0118617373657473a10501404d756c7469417373657446696c7465720001286d61785f617373657473b101010c75333200012c62656e6566696369617279d10401344d756c74694c6f636174696f6e000d004c4465706f736974526573657276654173736574100118617373657473a10501404d756c7469417373657446696c7465720001286d61785f617373657473b101010c75333200011064657374d10401344d756c74694c6f636174696f6e00010c78636d6505011c58636d3c28293e000e003445786368616e6765417373657408011067697665a10501404d756c7469417373657446696c74657200011c726563656976657105012c4d756c7469417373657473000f005c496e6974696174655265736572766557697468647261770c0118617373657473a10501404d756c7469417373657446696c74657200011c72657365727665d10401344d756c74694c6f636174696f6e00010c78636d6505011c58636d3c28293e00100040496e69746961746554656c65706f72740c0118617373657473a10501404d756c7469417373657446696c74657200011064657374d10401344d756c74694c6f636174696f6e00010c78636d6505011c58636d3c28293e001100305175657279486f6c64696e6710012071756572795f696428011c5175657279496400011064657374d10401344d756c74694c6f636174696f6e000118617373657473a10501404d756c7469417373657446696c74657200014c6d61785f726573706f6e73655f77656967687428010c75363400120030427579457865637574696f6e08011066656573790501284d756c746941737365740001307765696768745f6c696d6974ad05012c5765696768744c696d697400130034526566756e64537572706c75730014003c5365744572726f7248616e646c657204006906014058636d3c52756e74696d6543616c6c3e0015002c536574417070656e64697804006906014058636d3c52756e74696d6543616c6c3e00160028436c6561724572726f7200170028436c61696d41737365740801186173736574737105012c4d756c74694173736574730001187469636b6574d10401344d756c74694c6f636174696f6e0018001054726170040028010c7536340019004053756273637269626556657273696f6e08012071756572795f696428011c5175657279496400014c6d61785f726573706f6e73655f77656967687428010c753634001a0048556e73756273637269626556657273696f6e001b000075060c0c78636d38646f75626c655f656e636f64656434446f75626c65456e636f646564040454000004011c656e636f64656434011c5665633c75383e000079060c0c78636d0876330c58636d041043616c6c000004007d0601585665633c496e737472756374696f6e3c43616c6c3e3e00007d0600000281060081060c0c78636d0876332c496e737472756374696f6e041043616c6c0001c034576974686472617741737365740400bd05012c4d756c7469417373657473000000545265736572766541737365744465706f73697465640400bd05012c4d756c7469417373657473000100585265636569766554656c65706f7274656441737365740400bd05012c4d756c7469417373657473000200345175657279526573706f6e736510012071756572795f696428011c51756572794964000120726573706f6e7365d5050120526573706f6e73650001286d61785f77656967687424011857656967687400011c71756572696572fd0501544f7074696f6e3c4d756c74694c6f636174696f6e3e000300345472616e736665724173736574080118617373657473bd05012c4d756c746941737365747300012c62656e6566696369617279ed0401344d756c74694c6f636174696f6e000400505472616e736665725265736572766541737365740c0118617373657473bd05012c4d756c746941737365747300011064657374ed0401344d756c74694c6f636174696f6e00010c78636db105011c58636d3c28293e000500205472616e736163740c012c6f726967696e5f6b696e64990501284f726967696e4b696e64000158726571756972655f7765696768745f61745f6d6f737424011857656967687400011063616c6c7506014c446f75626c65456e636f6465643c43616c6c3e0006006448726d704e65774368616e6e656c4f70656e526571756573740c011873656e646572b101010c7533320001406d61785f6d6573736167655f73697a65b101010c7533320001306d61785f6361706163697479b101010c7533320007004c48726d704368616e6e656c4163636570746564040124726563697069656e74b101010c7533320008004848726d704368616e6e656c436c6f73696e670c0124696e69746961746f72b101010c75333200011873656e646572b101010c753332000124726563697069656e74b101010c7533320009002c436c6561724f726967696e000a003444657363656e644f726967696e0400f1040154496e746572696f724d756c74694c6f636174696f6e000b002c5265706f72744572726f720400010601445175657279526573706f6e7365496e666f000c00304465706f7369744173736574080118617373657473050601404d756c7469417373657446696c74657200012c62656e6566696369617279ed0401344d756c74694c6f636174696f6e000d004c4465706f7369745265736572766541737365740c0118617373657473050601404d756c7469417373657446696c74657200011064657374ed0401344d756c74694c6f636174696f6e00010c78636db105011c58636d3c28293e000e003445786368616e676541737365740c011067697665050601404d756c7469417373657446696c74657200011077616e74bd05012c4d756c746941737365747300011c6d6178696d616c780110626f6f6c000f005c496e6974696174655265736572766557697468647261770c0118617373657473050601404d756c7469417373657446696c74657200011c72657365727665ed0401344d756c74694c6f636174696f6e00010c78636db105011c58636d3c28293e00100040496e69746961746554656c65706f72740c0118617373657473050601404d756c7469417373657446696c74657200011064657374ed0401344d756c74694c6f636174696f6e00010c78636db105011c58636d3c28293e001100345265706f7274486f6c64696e67080134726573706f6e73655f696e666f010601445175657279526573706f6e7365496e666f000118617373657473050601404d756c7469417373657446696c74657200120030427579457865637574696f6e08011066656573c50501284d756c746941737365740001307765696768745f6c696d69741106012c5765696768744c696d697400130034526566756e64537572706c75730014003c5365744572726f7248616e646c657204007906012458636d3c43616c6c3e0015002c536574417070656e64697804007906012458636d3c43616c6c3e00160028436c6561724572726f7200170028436c61696d4173736574080118617373657473bd05012c4d756c74694173736574730001187469636b6574ed0401344d756c74694c6f636174696f6e0018001054726170040028010c7536340019004053756273637269626556657273696f6e08012071756572795f696428011c5175657279496400014c6d61785f726573706f6e73655f776569676874240118576569676874001a0048556e73756273637269626556657273696f6e001b00244275726e41737365740400bd05012c4d756c7469417373657473001c002c45787065637441737365740400bd05012c4d756c7469417373657473001d00304578706563744f726967696e0400fd0501544f7074696f6e3c4d756c74694c6f636174696f6e3e001e002c4578706563744572726f720400d90501504f7074696f6e3c287533322c204572726f72293e001f00504578706563745472616e736163745374617475730400f50501384d617962654572726f72436f64650020002c517565727950616c6c657408012c6d6f64756c655f6e616d6534011c5665633c75383e000134726573706f6e73655f696e666f010601445175657279526573706f6e7365496e666f0021003045787065637450616c6c6574140114696e646578b101010c7533320001106e616d6534011c5665633c75383e00012c6d6f64756c655f6e616d6534011c5665633c75383e00012c63726174655f6d616a6f72b101010c75333200013c6d696e5f63726174655f6d696e6f72b101010c753332002200505265706f72745472616e736163745374617475730400010601445175657279526573706f6e7365496e666f0023004c436c6561725472616e736163745374617475730024003c556e6976657273616c4f726967696e0400f50401204a756e6374696f6e002500344578706f72744d6573736167650c011c6e6574776f726bfd0401244e6574776f726b496400012c64657374696e6174696f6ef1040154496e746572696f724d756c74694c6f636174696f6e00010c78636db105011c58636d3c28293e002600244c6f636b41737365740801146173736574c50501284d756c74694173736574000120756e6c6f636b6572ed0401344d756c74694c6f636174696f6e0027002c556e6c6f636b41737365740801146173736574c50501284d756c74694173736574000118746172676574ed0401344d756c74694c6f636174696f6e002800384e6f7465556e6c6f636b61626c650801146173736574c50501284d756c746941737365740001146f776e6572ed0401344d756c74694c6f636174696f6e0029003452657175657374556e6c6f636b0801146173736574c50501284d756c746941737365740001186c6f636b6572ed0401344d756c74694c6f636174696f6e002a002c536574466565734d6f64650401306a69745f7769746864726177780110626f6f6c002b0020536574546f70696304000401205b75383b2033325d002c0028436c656172546f706963002d002c416c6961734f726967696e0400ed0401344d756c74694c6f636174696f6e002e003c556e70616964457865637574696f6e0801307765696768745f6c696d69741106012c5765696768744c696d6974000130636865636b5f6f726967696efd0501544f7074696f6e3c4d756c74694c6f636174696f6e3e002f000085060c2c73746167696e675f78636d0876340c58636d041043616c6c00000400890601585665633c496e737472756374696f6e3c43616c6c3e3e000089060000028d06008d060c2c73746167696e675f78636d0876342c496e737472756374696f6e041043616c6c0001c03457697468647261774173736574040021060118417373657473000000545265736572766541737365744465706f7369746564040021060118417373657473000100585265636569766554656c65706f727465644173736574040021060118417373657473000200345175657279526573706f6e736510012071756572795f696428011c51756572794964000120726573706f6e736539060120526573706f6e73650001286d61785f77656967687424011857656967687400011c717565726965724d0601404f7074696f6e3c4c6f636174696f6e3e000300345472616e7366657241737365740801186173736574732106011841737365747300012c62656e6566696369617279dd0101204c6f636174696f6e000400505472616e736665725265736572766541737365740c01186173736574732106011841737365747300011064657374dd0101204c6f636174696f6e00010c78636d1506011c58636d3c28293e000500205472616e736163740c012c6f726967696e5f6b696e64990501284f726967696e4b696e64000158726571756972655f7765696768745f61745f6d6f737424011857656967687400011063616c6c7506014c446f75626c65456e636f6465643c43616c6c3e0006006448726d704e65774368616e6e656c4f70656e526571756573740c011873656e646572b101010c7533320001406d61785f6d6573736167655f73697a65b101010c7533320001306d61785f6361706163697479b101010c7533320007004c48726d704368616e6e656c4163636570746564040124726563697069656e74b101010c7533320008004848726d704368616e6e656c436c6f73696e670c0124696e69746961746f72b101010c75333200011873656e646572b101010c753332000124726563697069656e74b101010c7533320009002c436c6561724f726967696e000a003444657363656e644f726967696e0400e1010140496e746572696f724c6f636174696f6e000b002c5265706f72744572726f720400510601445175657279526573706f6e7365496e666f000c00304465706f73697441737365740801186173736574735506012c417373657446696c74657200012c62656e6566696369617279dd0101204c6f636174696f6e000d004c4465706f7369745265736572766541737365740c01186173736574735506012c417373657446696c74657200011064657374dd0101204c6f636174696f6e00010c78636d1506011c58636d3c28293e000e003445786368616e676541737365740c0110676976655506012c417373657446696c74657200011077616e742106011841737365747300011c6d6178696d616c780110626f6f6c000f005c496e6974696174655265736572766557697468647261770c01186173736574735506012c417373657446696c74657200011c72657365727665dd0101204c6f636174696f6e00010c78636d1506011c58636d3c28293e00100040496e69746961746554656c65706f72740c01186173736574735506012c417373657446696c74657200011064657374dd0101204c6f636174696f6e00010c78636d1506011c58636d3c28293e001100345265706f7274486f6c64696e67080134726573706f6e73655f696e666f510601445175657279526573706f6e7365496e666f0001186173736574735506012c417373657446696c74657200120030427579457865637574696f6e080110666565732906011441737365740001307765696768745f6c696d69741106012c5765696768744c696d697400130034526566756e64537572706c75730014003c5365744572726f7248616e646c657204008506012458636d3c43616c6c3e0015002c536574417070656e64697804008506012458636d3c43616c6c3e00160028436c6561724572726f7200170028436c61696d4173736574080118617373657473210601184173736574730001187469636b6574dd0101204c6f636174696f6e0018001054726170040028010c7536340019004053756273637269626556657273696f6e08012071756572795f696428011c5175657279496400014c6d61785f726573706f6e73655f776569676874240118576569676874001a0048556e73756273637269626556657273696f6e001b00244275726e4173736574040021060118417373657473001c002c4578706563744173736574040021060118417373657473001d00304578706563744f726967696e04004d0601404f7074696f6e3c4c6f636174696f6e3e001e002c4578706563744572726f720400d90501504f7074696f6e3c287533322c204572726f72293e001f00504578706563745472616e736163745374617475730400f50501384d617962654572726f72436f64650020002c517565727950616c6c657408012c6d6f64756c655f6e616d6534011c5665633c75383e000134726573706f6e73655f696e666f510601445175657279526573706f6e7365496e666f0021003045787065637450616c6c6574140114696e646578b101010c7533320001106e616d6534011c5665633c75383e00012c6d6f64756c655f6e616d6534011c5665633c75383e00012c63726174655f6d616a6f72b101010c75333200013c6d696e5f63726174655f6d696e6f72b101010c753332002200505265706f72745472616e736163745374617475730400510601445175657279526573706f6e7365496e666f0023004c436c6561725472616e736163745374617475730024003c556e6976657273616c4f726967696e0400e90101204a756e6374696f6e002500344578706f72744d6573736167650c011c6e6574776f726bf10101244e6574776f726b496400012c64657374696e6174696f6ee1010140496e746572696f724c6f636174696f6e00010c78636d1506011c58636d3c28293e002600244c6f636b41737365740801146173736574290601144173736574000120756e6c6f636b6572dd0101204c6f636174696f6e0027002c556e6c6f636b41737365740801146173736574290601144173736574000118746172676574dd0101204c6f636174696f6e002800384e6f7465556e6c6f636b61626c6508011461737365742906011441737365740001146f776e6572dd0101204c6f636174696f6e0029003452657175657374556e6c6f636b08011461737365742906011441737365740001186c6f636b6572dd0101204c6f636174696f6e002a002c536574466565734d6f64650401306a69745f7769746864726177780110626f6f6c002b0020536574546f70696304000401205b75383b2033325d002c0028436c656172546f706963002d002c416c6961734f726967696e0400dd0101204c6f636174696f6e002e003c556e70616964457865637574696f6e0801307765696768745f6c696d69741106012c5765696768744c696d6974000130636865636b5f6f726967696e4d0601404f7074696f6e3c4c6f636174696f6e3e002f000091060c6470616c6c65745f726573747269637465645f78746f6b656e731870616c6c65741043616c6c040454000118207472616e7366657210012c63757272656e63795f6964b9030134543a3a43757272656e63794964000118616d6f756e74180128543a3a42616c616e636500011064657374cd040158426f783c56657273696f6e65644c6f636174696f6e3e000144646573745f7765696768745f6c696d69741106012c5765696768744c696d697400000464536565205b6050616c6c65743a3a7472616e73666572605d2e4c7472616e736665725f6d756c746961737365740c011461737365749506014c426f783c56657273696f6e656441737365743e00011064657374cd040158426f783c56657273696f6e65644c6f636174696f6e3e000144646573745f7765696768745f6c696d69741106012c5765696768744c696d697400010490536565205b6050616c6c65743a3a7472616e736665725f6d756c74696173736574605d2e447472616e736665725f776974685f66656514012c63757272656e63795f6964b9030134543a3a43757272656e63794964000118616d6f756e74180128543a3a42616c616e636500010c666565180128543a3a42616c616e636500011064657374cd040158426f783c56657273696f6e65644c6f636174696f6e3e000144646573745f7765696768745f6c696d69741106012c5765696768744c696d697400020488536565205b6050616c6c65743a3a7472616e736665725f776974685f666565605d2e707472616e736665725f6d756c746961737365745f776974685f66656510011461737365749506014c426f783c56657273696f6e656441737365743e00010c6665659506014c426f783c56657273696f6e656441737365743e00011064657374cd040158426f783c56657273696f6e65644c6f636174696f6e3e000144646573745f7765696768745f6c696d69741106012c5765696768744c696d6974000304b4536565205b6050616c6c65743a3a7472616e736665725f6d756c746961737365745f776974685f666565605d2e607472616e736665725f6d756c746963757272656e6369657310012863757272656e63696573990601805665633c28543a3a43757272656e637949642c20543a3a42616c616e6365293e0001206665655f6974656d10010c75333200011064657374cd040158426f783c56657273696f6e65644c6f636174696f6e3e000144646573745f7765696768745f6c696d69741106012c5765696768744c696d6974000404a4536565205b6050616c6c65743a3a7472616e736665725f6d756c746963757272656e63696573605d2e507472616e736665725f6d756c746961737365747310011861737365747361060150426f783c56657273696f6e65644173736574733e0001206665655f6974656d10010c75333200011064657374cd040158426f783c56657273696f6e65644c6f636174696f6e3e000144646573745f7765696768745f6c696d69741106012c5765696768744c696d697400050494536565205b6050616c6c65743a3a7472616e736665725f6d756c7469617373657473605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e9506080c78636d3856657273696f6e6564417373657400010c08563204007905013876323a3a4d756c746941737365740001000856330400c505013876333a3a4d756c7469417373657400030008563404002906012476343a3a41737365740004000099060000029d06009d0600000408b9031800a1060c5470616c6c65745f78636d5f7472616e736163746f721870616c6c65741043616c6c04045400012820726567697374657208010c77686f000130543a3a4163636f756e744964000114696e646578b4010c75313600000464536565205b6050616c6c65743a3a7265676973746572605d2e2864657265676973746572040114696e646578b4010c7531360001046c536565205b6050616c6c65743a3a64657265676973746572605d2e6c7472616e736163745f7468726f7567685f6465726976617469766518011064657374a5060134543a3a5472616e736163746f72000114696e646578b4010c75313600010c666565a906018043757272656e63795061796d656e743c43757272656e637949644f663c543e3e000128696e6e65725f63616c6c34011c5665633c75383e00012c7765696768745f696e666fb106013c5472616e7361637457656967687473000118726566756e64780110626f6f6c000204b0536565205b6050616c6c65743a3a7472616e736163745f7468726f7567685f64657269766174697665605d2e687472616e736163745f7468726f7567685f736f7665726569676e1c011064657374cd040158426f783c56657273696f6e65644c6f636174696f6e3e0001246665655f7061796572110101504f7074696f6e3c543a3a4163636f756e7449643e00010c666565a906018043757272656e63795061796d656e743c43757272656e637949644f663c543e3e00011063616c6c34011c5665633c75383e00012c6f726967696e5f6b696e64990501284f726967696e4b696e6400012c7765696768745f696e666fb106013c5472616e7361637457656967687473000118726566756e64780110626f6f6c000304ac536565205b6050616c6c65743a3a7472616e736163745f7468726f7567685f736f7665726569676e605d2e447365745f7472616e736163745f696e666f1001206c6f636174696f6ecd040158426f783c56657273696f6e65644c6f636174696f6e3e0001547472616e736163745f65787472615f7765696768742401185765696768740001286d61785f7765696768742401185765696768740001707472616e736163745f65787472615f7765696768745f7369676e6564b90601384f7074696f6e3c5765696768743e00040488536565205b6050616c6c65743a3a7365745f7472616e736163745f696e666f605d2e5072656d6f76655f7472616e736163745f696e666f0401206c6f636174696f6ecd040158426f783c56657273696f6e65644c6f636174696f6e3e00050494536565205b6050616c6c65743a3a72656d6f76655f7472616e736163745f696e666f605d2e5c7472616e736163745f7468726f7567685f7369676e656414011064657374cd040158426f783c56657273696f6e65644c6f636174696f6e3e00010c666565a906018043757272656e63795061796d656e743c43757272656e637949644f663c543e3e00011063616c6c34011c5665633c75383e00012c7765696768745f696e666fb106013c5472616e7361637457656967687473000118726566756e64780110626f6f6c000604a0536565205b6050616c6c65743a3a7472616e736163745f7468726f7567685f7369676e6564605d2e487365745f6665655f7065725f7365636f6e6408013861737365745f6c6f636174696f6ecd040158426f783c56657273696f6e65644c6f636174696f6e3e0001386665655f7065725f7365636f6e64180110753132380007048c536565205b6050616c6c65743a3a7365745f6665655f7065725f7365636f6e64605d2e5472656d6f76655f6665655f7065725f7365636f6e6404013861737365745f6c6f636174696f6ecd040158426f783c56657273696f6e65644c6f636174696f6e3e00080498536565205b6050616c6c65743a3a72656d6f76655f6665655f7065725f7365636f6e64605d2e2c68726d705f6d616e6167650c0118616374696f6ebd06013448726d704f7065726174696f6e00010c666565a906018043757272656e63795061796d656e743c43757272656e637949644f663c543e3e00012c7765696768745f696e666fb106013c5472616e736163745765696768747300090470536565205b6050616c6c65743a3a68726d705f6d616e616765605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732ea5060c3872756e74696d655f636f6d6d6f6e3878636d5f7472616e736163746f72384e756c6c5472616e736163746f7200000000a9060c5470616c6c65745f78636d5f7472616e736163746f721870616c6c65743c43757272656e63795061796d656e74042843757272656e6379496401b9030008012063757272656e6379ad06015043757272656e63793c43757272656e637949643e0001286665655f616d6f756e74210301304f7074696f6e3c753132383e0000ad060c5470616c6c65745f78636d5f7472616e736163746f721870616c6c65742043757272656e6379042843757272656e6379496401b903010830417343757272656e637949640400b903012843757272656e637949640000003c41734d756c74694c6f636174696f6e0400cd040158426f783c56657273696f6e65644c6f636174696f6e3e00010000b1060c5470616c6c65745f78636d5f7472616e736163746f721870616c6c65743c5472616e736163745765696768747300000801807472616e736163745f72657175697265645f7765696768745f61745f6d6f73742401185765696768740001386f766572616c6c5f776569676874b506014c4f7074696f6e3c5765696768744c696d69743e0000b50604184f7074696f6e0404540111060108104e6f6e6500000010536f6d65040011060000010000b90604184f7074696f6e04045401240108104e6f6e6500000010536f6d650400240000010000bd060c5470616c6c65745f78636d5f7472616e736163746f721870616c6c65743448726d704f7065726174696f6e00011020496e69744f70656e0400c106013848726d70496e6974506172616d730000001841636365707404011c706172615f69645d01011850617261496400010014436c6f73650400c506013448726d704368616e6e656c49640002001843616e63656c0801286368616e6e656c5f6964c506013448726d704368616e6e656c49640001346f70656e5f726571756573747310010c75333200030000c1060c5470616c6c65745f78636d5f7472616e736163746f721870616c6c65743848726d70496e6974506172616d7300000c011c706172615f69645d01011850617261496400015470726f706f7365645f6d61785f636170616369747910010c75333200016470726f706f7365645f6d61785f6d6573736167655f73697a6510010c7533320000c5060c74706f6c6b61646f745f70617261636861696e5f7072696d697469766573287072696d6974697665733448726d704368616e6e656c4964000008011873656e6465725d0101084964000124726563697069656e745d01010849640000c9060c5070616c6c65745f6d6573736167655f71756575651870616c6c65741043616c6c04045400010824726561705f706167650801386d6573736167655f6f726967696ecd0601484d6573736167654f726967696e4f663c543e000128706167655f696e64657810012450616765496e64657800000468536565205b6050616c6c65743a3a726561705f70616765605d2e48657865637574655f6f7665727765696768741001386d6573736167655f6f726967696ecd0601484d6573736167654f726967696e4f663c543e0001107061676510012450616765496e646578000114696e64657810011c543a3a53697a650001307765696768745f6c696d69742401185765696768740001048c536565205b6050616c6c65743a3a657865637574655f6f766572776569676874605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732ecd06085c63756d756c75735f7072696d6974697665735f636f7265584167677265676174654d6573736167654f726967696e00010c104865726500000018506172656e740001001c5369626c696e6704005d01011850617261496400020000d1060c2c636861696e6272696467651870616c6c65741043616c6c040454000124347365745f7468726573686f6c640401247468726573686f6c6410010c75333200000478536565205b6050616c6c65743a3a7365745f7468726573686f6c64605d2e307365745f7265736f7572636508010869640401285265736f7572636549640001186d6574686f6434011c5665633c75383e00010474536565205b6050616c6c65743a3a7365745f7265736f75726365605d2e3c72656d6f76655f7265736f7572636504010869640401285265736f75726365496400020480536565205b6050616c6c65743a3a72656d6f76655f7265736f75726365605d2e3c77686974656c6973745f636861696e040108696408011c436861696e496400030480536565205b6050616c6c65743a3a77686974656c6973745f636861696e605d2e2c6164645f72656c6179657204010476000130543a3a4163636f756e74496400040470536565205b6050616c6c65743a3a6164645f72656c61796572605d2e3872656d6f76655f72656c617965720401286163636f756e745f6964000130543a3a4163636f756e7449640005047c536565205b6050616c6c65743a3a72656d6f76655f72656c61796572605d2e5061636b6e6f776c656467655f70726f706f73616c1001146e6f6e63652c01304465706f7369744e6f6e63650001187372635f696408011c436861696e4964000110725f69640401285265736f75726365496400011063616c6c25010170426f783c3c5420617320436f6e6669673e3a3a50726f706f73616c3e00060494536565205b6050616c6c65743a3a61636b6e6f776c656467655f70726f706f73616c605d2e3c72656a6563745f70726f706f73616c1001146e6f6e63652c01304465706f7369744e6f6e63650001187372635f696408011c436861696e4964000110725f69640401285265736f75726365496400011063616c6c25010170426f783c3c5420617320436f6e6669673e3a3a50726f706f73616c3e00070480536565205b6050616c6c65743a3a72656a6563745f70726f706f73616c605d2e3c6576616c5f766f74655f73746174650c01146e6f6e63652c01304465706f7369744e6f6e63650001187372635f696408011c436861696e496400012070726f706f73616c25010170426f783c3c5420617320436f6e6669673e3a3a50726f706f73616c3e00080480536565205b6050616c6c65743a3a6576616c5f766f74655f7374617465605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732ed5060c4c6f726d6c5f61737365745f7265676973747279186d6f64756c651043616c6c0404540001083872656769737465725f61737365740801206d65746164617461d90601f041737365744d657461646174613c543a3a42616c616e63652c20543a3a437573746f6d4d657461646174612c20543a3a537472696e674c696d69743e00012061737365745f6964f10601484f7074696f6e3c543a3a417373657449643e0000047c536565205b6050616c6c65743a3a72656769737465725f6173736574605d2e307570646174655f61737365741c012061737365745f6964b9030128543a3a41737365744964000120646563696d616c734502012c4f7074696f6e3c7533323e0001106e616d65f50601984f7074696f6e3c426f756e6465645665633c75382c20543a3a537472696e674c696d69743e3e00011873796d626f6cf50601984f7074696f6e3c426f756e6465645665633c75382c20543a3a537472696e674c696d69743e3e00014c6578697374656e7469616c5f6465706f736974210301484f7074696f6e3c543a3a42616c616e63653e0001206c6f636174696f6ef90601844f7074696f6e3c4f7074696f6e3c56657273696f6e65644c6f636174696f6e3e3e0001286164646974696f6e616cfd0601644f7074696f6e3c543a3a437573746f6d4d657461646174613e00010474536565205b6050616c6c65743a3a7570646174655f6173736574605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732ed9060c2c6f726d6c5f7472616974733861737365745f72656769737472793441737365744d657461646174610c1c42616c616e6365011838437573746f6d4d6574616461746101dd062c537472696e674c696d69740000180120646563696d616c7310010c7533320001106e616d657104016c426f756e6465645665633c75382c20537472696e674c696d69743e00011873796d626f6c7104016c426f756e6465645665633c75382c20537472696e674c696d69743e00014c6578697374656e7469616c5f6465706f73697418011c42616c616e63650001206c6f636174696f6eed0601644f7074696f6e3c56657273696f6e65644c6f636174696f6e3e0001286164646974696f6e616cdd060138437573746f6d4d657461646174610000dd060c246366675f747970657318746f6b656e7338437573746f6d4d65746164617461000014013c7472616e736665726162696c697479e106016443726f7373436861696e5472616e736665726162696c6974790001206d696e7461626c65780110626f6f6c0001307065726d697373696f6e6564780110626f6f6c000134706f6f6c5f63757272656e6379780110626f6f6c0001506c6f63616c5f726570726573656e746174696f6ee90601504f7074696f6e3c4c6f63616c417373657449643e0000e1060c246366675f747970657318746f6b656e736443726f7373436861696e5472616e736665726162696c69747900010c104e6f6e650000000c58636d0400e506012c58636d4d65746164617461000100384c6971756964697479506f6f6c7300020000e5060c246366675f74797065730c78636d2c58636d4d6574616461746100000401386665655f7065725f7365636f6e642103013c4f7074696f6e3c42616c616e63653e0000e90604184f7074696f6e04045401c1030108104e6f6e6500000010536f6d650400c1030000010000ed0604184f7074696f6e04045401cd040108104e6f6e6500000010536f6d650400cd040000010000f10604184f7074696f6e04045401b9030108104e6f6e6500000010536f6d650400b9030000010000f50604184f7074696f6e0404540171040108104e6f6e6500000010536f6d65040071040000010000f90604184f7074696f6e04045401ed060108104e6f6e6500000010536f6d650400ed060000010000fd0604184f7074696f6e04045401dd060108104e6f6e6500000010536f6d650400dd06000001000001070c206f726d6c5f78636d186d6f64756c651043616c6c0404540001044473656e645f61735f736f7665726569676e08011064657374cd040158426f783c56657273696f6e65644c6f636174696f6e3e00011c6d65737361676561050154426f783c56657273696f6e656458636d3c28293e3e00000488536565205b6050616c6c65743a3a73656e645f61735f736f7665726569676e605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e05070c2870616c6c65745f65766d1870616c6c65741043616c6c04045400011020776974686472617708011c61646472657373210201104831363000011476616c756518013042616c616e63654f663c543e00000464536565205b6050616c6c65743a3a7769746864726177605d2e1063616c6c240118736f7572636521020110483136300001187461726765742102011048313630000114696e70757434011c5665633c75383e00011476616c75651d050110553235360001246761735f6c696d69742c010c75363400013c6d61785f6665655f7065725f6761731d050110553235360001606d61785f7072696f726974795f6665655f7065725f676173090701304f7074696f6e3c553235363e0001146e6f6e6365090701304f7074696f6e3c553235363e00012c6163636573735f6c6973740d0701585665633c28483136302c205665633c483235363e293e00010454536565205b6050616c6c65743a3a63616c6c605d2e18637265617465200118736f757263652102011048313630000110696e697434011c5665633c75383e00011476616c75651d050110553235360001246761735f6c696d69742c010c75363400013c6d61785f6665655f7065725f6761731d050110553235360001606d61785f7072696f726974795f6665655f7065725f676173090701304f7074696f6e3c553235363e0001146e6f6e6365090701304f7074696f6e3c553235363e00012c6163636573735f6c6973740d0701585665633c28483136302c205665633c483235363e293e0002045c536565205b6050616c6c65743a3a637265617465605d2e1c63726561746532240118736f757263652102011048313630000110696e697434011c5665633c75383e00011073616c743001104832353600011476616c75651d050110553235360001246761735f6c696d69742c010c75363400013c6d61785f6665655f7065725f6761731d050110553235360001606d61785f7072696f726974795f6665655f7065725f676173090701304f7074696f6e3c553235363e0001146e6f6e6365090701304f7074696f6e3c553235363e00012c6163636573735f6c6973740d0701585665633c28483136302c205665633c483235363e293e00030460536565205b6050616c6c65743a3a63726561746532605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e090704184f7074696f6e040454011d050108104e6f6e6500000010536f6d6504001d0500000100000d07000002110700110700000408210229030015070c3c70616c6c65745f626173655f6665651870616c6c65741043616c6c040454000108507365745f626173655f6665655f7065725f67617304010c6665651d0501105532353600000494536565205b6050616c6c65743a3a7365745f626173655f6665655f7065725f676173605d2e387365745f656c6173746963697479040128656c61737469636974791907011c5065726d696c6c0001047c536565205b6050616c6c65743a3a7365745f656c6173746963697479605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e19070c3473705f61726974686d65746963287065725f7468696e67731c5065726d696c6c0000040010010c75333200001d070c3c70616c6c65745f657468657265756d1870616c6c65741043616c6c040454000104207472616e7361637404012c7472616e73616374696f6e2107012c5472616e73616374696f6e00000464536565205b6050616c6c65743a3a7472616e73616374605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e21070c20657468657265756d2c7472616e73616374696f6e345472616e73616374696f6e563200010c184c65676163790400250701444c65676163795472616e73616374696f6e0000001c45495032393330040035070148454950323933305472616e73616374696f6e0001001c45495031353539040041070148454950313535395472616e73616374696f6e0002000025070c20657468657265756d2c7472616e73616374696f6e444c65676163795472616e73616374696f6e00001c01146e6f6e63651d050110553235360001246761735f70726963651d050110553235360001246761735f6c696d69741d05011055323536000118616374696f6e290701445472616e73616374696f6e416374696f6e00011476616c75651d05011055323536000114696e70757434011442797465730001247369676e61747572652d0701505472616e73616374696f6e5369676e6174757265000029070c20657468657265756d2c7472616e73616374696f6e445472616e73616374696f6e416374696f6e0001081043616c6c0400210201104831363000000018437265617465000100002d070c20657468657265756d2c7472616e73616374696f6e505472616e73616374696f6e5369676e617475726500000c010476310701545472616e73616374696f6e5265636f76657279496400010472300110483235360001047330011048323536000031070c20657468657265756d2c7472616e73616374696f6e545472616e73616374696f6e5265636f766572794964000004002c010c753634000035070c20657468657265756d2c7472616e73616374696f6e48454950323933305472616e73616374696f6e00002c0120636861696e5f69642c010c7536340001146e6f6e63651d050110553235360001246761735f70726963651d050110553235360001246761735f6c696d69741d05011055323536000118616374696f6e290701445472616e73616374696f6e416374696f6e00011476616c75651d05011055323536000114696e707574340114427974657300012c6163636573735f6c697374390701284163636573734c6973740001306f64645f795f706172697479780110626f6f6c00010472300110483235360001047330011048323536000039070000023d07003d070c20657468657265756d2c7472616e73616374696f6e384163636573734c6973744974656d000008011c616464726573732102011c4164647265737300013073746f726167655f6b657973290301245665633c483235363e000041070c20657468657265756d2c7472616e73616374696f6e48454950313535395472616e73616374696f6e0000300120636861696e5f69642c010c7536340001146e6f6e63651d050110553235360001606d61785f7072696f726974795f6665655f7065725f6761731d0501105532353600013c6d61785f6665655f7065725f6761731d050110553235360001246761735f6c696d69741d05011055323536000118616374696f6e290701445472616e73616374696f6e416374696f6e00011476616c75651d05011055323536000114696e707574340114427974657300012c6163636573735f6c697374390701284163636573734c6973740001306f64645f795f706172697479780110626f6f6c00010472300110483235360001047330011048323536000045070c646178656c61725f676174657761795f707265636f6d70696c651870616c6c65741043616c6c0404540001082c7365745f6761746577617904011c61646472657373210201104831363000000470536565205b6050616c6c65743a3a7365745f67617465776179605d2e347365745f636f6e76657274657208011c69645f6861736830011048323536000124636f6e7665727465724907013c536f75726365436f6e76657274657200010478536565205b6050616c6c65743a3a7365745f636f6e766572746572605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e490708646178656c61725f676174657761795f707265636f6d70696c653c536f75726365436f6e7665727465720000040118646f6d61696e55040118446f6d61696e00004d070c2c70616c6c65745f7375646f1870616c6c65741043616c6c040454000114107375646f04011063616c6c2501017c426f783c3c5420617320436f6e6669673e3a3a52756e74696d6543616c6c3e00000454536565205b6050616c6c65743a3a7375646f605d2e547375646f5f756e636865636b65645f77656967687408011063616c6c2501017c426f783c3c5420617320436f6e6669673e3a3a52756e74696d6543616c6c3e00011877656967687424011857656967687400010498536565205b6050616c6c65743a3a7375646f5f756e636865636b65645f776569676874605d2e1c7365745f6b657904010c6e6577790101504163636f756e7449644c6f6f6b75704f663c543e00020460536565205b6050616c6c65743a3a7365745f6b6579605d2e1c7375646f5f617308010c77686f790101504163636f756e7449644c6f6f6b75704f663c543e00011063616c6c2501017c426f783c3c5420617320436f6e6669673e3a3a52756e74696d6543616c6c3e00030460536565205b6050616c6c65743a3a7375646f5f6173605d2e2872656d6f76655f6b65790004046c536565205b6050616c6c65743a3a72656d6f76655f6b6579605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e51070c4070616c6c65745f706f6f6c5f666565731870616c6c65741043616c6c0404540001183c70726f706f73655f6e65775f6665650c011c706f6f6c5f69642c0124543a3a506f6f6c49640001186275636b657481040134506f6f6c4665654275636b657400010c66656585040140506f6f6c466565496e666f4f663c543e00000480536565205b6050616c6c65743a3a70726f706f73655f6e65775f666565605d2e346170706c795f6e65775f66656508011c706f6f6c5f69642c0124543a3a506f6f6c49640001246368616e67655f696430011c543a3a4861736800010478536565205b6050616c6c65743a3a6170706c795f6e65775f666565605d2e2872656d6f76655f6665650401186665655f69642c0120543a3a46656549640002046c536565205b6050616c6c65743a3a72656d6f76655f666565605d2e286368617267655f6665650801186665655f69642c0120543a3a4665654964000118616d6f756e74180128543a3a42616c616e63650003046c536565205b6050616c6c65743a3a6368617267655f666565605d2e30756e6368617267655f6665650801186665655f69642c0120543a3a4665654964000118616d6f756e74180128543a3a42616c616e636500040474536565205b6050616c6c65743a3a756e6368617267655f666565605d2e687570646174655f706f7274666f6c696f5f76616c756174696f6e04011c706f6f6c5f69642c0124543a3a506f6f6c4964000504ac536565205b6050616c6c65743a3a7570646174655f706f7274666f6c696f5f76616c756174696f6e605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e55070c3870616c6c65745f72656d61726b731870616c6c65741043616c6c0404540001041872656d61726b08011c72656d61726b73590701ac426f756e6465645665633c543a3a52656d61726b2c20543a3a4d617852656d61726b7350657243616c6c3e00011063616c6c2501017c426f783c3c5420617320436f6e6669673e3a3a52756e74696d6543616c6c3e0000045c536565205b6050616c6c65743a3a72656d61726b605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e59070c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e646564566563080454015d07045300000400690701185665633c543e00005d070c3872756e74696d655f636f6d6d6f6e1c72656d61726b731852656d61726b00010c204970667348617368040061070178426f756e6465645665633c75382c2049706673486173684c656e6774683e000000144e616d6564040065070178426f756e6465645665633c75382c204d61784e616d656452656d61726b3e000100104c6f616e08002c0118506f6f6c496400002c01184c6f616e49640002000061070c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401080453000004003401185665633c543e000065070c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401080453000004003401185665633c543e000069070000025d07006d070c4070616c6c65745f746f6b656e5f6d75781870616c6c65741043616c6c04045400010c1c6465706f73697408013063757272656e63795f6f7574b9030134543a3a43757272656e63794964000128616d6f756e745f6f7574180134543a3a42616c616e63654f757400000460536565205b6050616c6c65743a3a6465706f736974605d2e106275726e08013063757272656e63795f6f7574b9030134543a3a43757272656e63794964000128616d6f756e745f6f7574180134543a3a42616c616e63654f757400010454536565205b6050616c6c65743a3a6275726e605d2e286d617463685f737761700801206f726465725f69642c0128543a3a4f726465724964000118616d6f756e74180134543a3a42616c616e63654f75740002046c536565205b6050616c6c65743a3a6d617463685f73776170605d2e040d01436f6e7461696e7320612076617269616e742070657220646973706174636861626c652065787472696e736963207468617420746869732070616c6c6574206861732e71070c2873705f72756e74696d65187472616974732c426c616b6554776f3235360000000075070c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401080453000004003401185665633c543e000079070c6070616c6c65745f636f6e76696374696f6e5f766f74696e671474797065731454616c6c790814566f746573011814546f74616c00000c011061796573180114566f7465730001106e617973180114566f74657300011c737570706f7274180114566f74657300007d070c4070616c6c65745f77686974656c6973741870616c6c6574144576656e7404045400010c3c43616c6c57686974656c697374656404012463616c6c5f6861736830011c543a3a486173680000005857686974656c697374656443616c6c52656d6f76656404012463616c6c5f6861736830011c543a3a486173680001006457686974656c697374656443616c6c4469737061746368656408012463616c6c5f6861736830011c543a3a48617368000118726573756c74810701684469737061746368526573756c7457697468506f7374496e666f000200047c54686520604576656e746020656e756d206f6620746869732070616c6c657481070418526573756c7408045401850704450189070108084f6b04008507000000000c45727204008907000001000085070c346672616d655f737570706f727420646973706174636840506f73744469737061746368496e666f000008013461637475616c5f776569676874b90601384f7074696f6e3c5765696768743e000120706179735f6665656001105061797300008907082873705f72756e74696d656444697370617463684572726f7257697468506f7374496e666f0410496e666f01850700080124706f73745f696e666f85070110496e666f0001146572726f7264013444697370617463684572726f7200008d070c4470616c6c65745f636f6c6c6563746976651870616c6c6574144576656e7408045400044900011c2050726f706f73656410011c6163636f756e74000130543a3a4163636f756e74496400013870726f706f73616c5f696e64657810013450726f706f73616c496e64657800013470726f706f73616c5f6861736830011c543a3a486173680001247468726573686f6c6410012c4d656d626572436f756e74000008490141206d6f74696f6e2028676976656e20686173682920686173206265656e2070726f706f7365642028627920676976656e206163636f756e742920776974682061207468726573686f6c642028676976656e3c604d656d626572436f756e7460292e14566f74656414011c6163636f756e74000130543a3a4163636f756e74496400013470726f706f73616c5f6861736830011c543a3a48617368000114766f746564780110626f6f6c00010c79657310012c4d656d626572436f756e740001086e6f10012c4d656d626572436f756e74000108050141206d6f74696f6e2028676976656e20686173682920686173206265656e20766f746564206f6e20627920676976656e206163636f756e742c206c656176696e671501612074616c6c79202879657320766f74657320616e64206e6f20766f74657320676976656e20726573706563746976656c7920617320604d656d626572436f756e7460292e20417070726f76656404013470726f706f73616c5f6861736830011c543a3a48617368000204c041206d6f74696f6e2077617320617070726f76656420627920746865207265717569726564207468726573686f6c642e2c446973617070726f76656404013470726f706f73616c5f6861736830011c543a3a48617368000304d041206d6f74696f6e20776173206e6f7420617070726f76656420627920746865207265717569726564207468726573686f6c642e20457865637574656408013470726f706f73616c5f6861736830011c543a3a48617368000118726573756c74a401384469737061746368526573756c74000404210141206d6f74696f6e207761732065786563757465643b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e384d656d626572457865637574656408013470726f706f73616c5f6861736830011c543a3a48617368000118726573756c74a401384469737061746368526573756c740005044901412073696e676c65206d656d6265722064696420736f6d6520616374696f6e3b20726573756c742077696c6c20626520604f6b602069662069742072657475726e656420776974686f7574206572726f722e18436c6f7365640c013470726f706f73616c5f6861736830011c543a3a4861736800010c79657310012c4d656d626572436f756e740001086e6f10012c4d656d626572436f756e740006045501412070726f706f73616c2077617320636c6f736564206265636175736520697473207468726573686f6c64207761732072656163686564206f7220616674657220697473206475726174696f6e207761732075702e047c54686520604576656e746020656e756d206f6620746869732070616c6c657491070c4470616c6c65745f6d656d626572736869701870616c6c6574144576656e740804540004490001182c4d656d6265724164646564000004e054686520676976656e206d656d626572207761732061646465643b2073656520746865207472616e73616374696f6e20666f722077686f2e344d656d62657252656d6f766564000104e854686520676976656e206d656d626572207761732072656d6f7665643b2073656520746865207472616e73616374696f6e20666f722077686f2e384d656d6265727353776170706564000204d854776f206d656d62657273207765726520737761707065643b2073656520746865207472616e73616374696f6e20666f722077686f2e304d656d6265727352657365740003041501546865206d656d62657273686970207761732072657365743b2073656520746865207472616e73616374696f6e20666f722077686f20746865206e6577207365742069732e284b65794368616e676564000404844f6e65206f6620746865206d656d6265727327206b657973206368616e6765642e1444756d6d790005046c5068616e746f6d206d656d6265722c206e6576657220757365642e047c54686520604576656e746020656e756d206f6620746869732070616c6c657495070c2c70616c6c65745f666565731870616c6c6574144576656e74040454000110284665654368616e67656408010c6b657959030124543a3a4665654b657900010c66656518013042616c616e63654f663c543e0000002c466565546f417574686f7208011066726f6d000130543a3a4163636f756e74496400011c62616c616e636518013042616c616e63654f663c543e00010024466565546f4275726e08011066726f6d000130543a3a4163636f756e74496400011c62616c616e636518013042616c616e63654f663c543e00020034466565546f547265617375727908011066726f6d000130543a3a4163636f756e74496400011c62616c616e636518013042616c616e63654f663c543e000300047c54686520604576656e746020656e756d206f6620746869732070616c6c657499070c4870616c6c65745f706f6f6c5f73797374656d1870616c6c6574144576656e7404045400012828526562616c616e63656404011c706f6f6c5f69642c0124543a3a506f6f6c496400000474546865207472616e63686573207765726520726562616c616e6365642e344d61785265736572766553657404011c706f6f6c5f69642c0124543a3a506f6f6c496400010470546865206d617820726573657276652077617320757064617465642e2c45706f6368436c6f73656408011c706f6f6c5f69642c0124543a3a506f6f6c496400012065706f63685f6964100128543a3a45706f6368496400020450416e2065706f63682077617320636c6f7365642e44536f6c7574696f6e5375626d69747465640c011c706f6f6c5f69642c0124543a3a506f6f6c496400012065706f63685f6964100128543a3a45706f63684964000120736f6c7574696f6e9d0701a445706f6368536f6c7574696f6e3c543a3a42616c616e63652c20543a3a4d61785472616e636865733e00030458416e2065706f6368207761732065786563757465642e3445706f6368457865637574656408011c706f6f6c5f69642c0124543a3a506f6f6c496400012065706f63685f6964100128543a3a45706f6368496400040458416e2065706f6368207761732065786563757465642e1c4372656174656410011461646d696e000130543a3a4163636f756e7449640001246465706f7369746f72000130543a3a4163636f756e74496400011c706f6f6c5f69642c0124543a3a506f6f6c496400011c657373656e6365c5070140506f6f6c457373656e63654f663c543e0005044c4120706f6f6c2077617320637265617465642e1c557064617465640c010869642c0124543a3a506f6f6c496400010c6f6c64c5070140506f6f6c457373656e63654f663c543e00010c6e6577c5070140506f6f6c457373656e63654f663c543e0006044c4120706f6f6c2077617320757064617465642e3850726f706f7365644368616e67650c011c706f6f6c5f69642c0124543a3a506f6f6c49640001246368616e67655f696430011c543a3a486173680001186368616e6765d1070140543a3a52756e74696d654368616e67650007045841206368616e6765207761732070726f706f7365642e3852656c65617365644368616e67650c011c706f6f6c5f69642c0124543a3a506f6f6c49640001246368616e67655f696430011c543a3a486173680001186368616e6765d1070140543a3a52756e74696d654368616e67650008045441206368616e6765207761732072656c6561736564504e6567617469766542616c616e6365536865657410011c706f6f6c5f69642c0124543a3a506f6f6c496400011c6e61765f61756d180128543a3a42616c616e63650001206e61765f66656573180128543a3a42616c616e636500011c72657365727665180128543a3a42616c616e63650009080d0154686520506f6f6c466565734e41562065786365656473207468652073756d206f66207468652041554d20616e642074686520746f74616c2072657365727665206f662074686520706f6f6c047c54686520604576656e746020656e756d206f6620746869732070616c6c65749d070c4870616c6c65745f706f6f6c5f73797374656d20736f6c7574696f6e3445706f6368536f6c7574696f6e081c42616c616e636501182c4d61785472616e6368657301990401081c4865616c7468790400a10701944865616c746879536f6c7574696f6e3c42616c616e63652c204d61785472616e636865733e00000024556e6865616c7468790400a907019c556e6865616c746879536f6c7574696f6e3c42616c616e63652c204d61785472616e636865733e00010000a1070c4870616c6c65745f706f6f6c5f73797374656d20736f6c7574696f6e3c4865616c746879536f6c7574696f6e081c42616c616e636501182c4d61785472616e6368657301990400080120736f6c7574696f6ea50701a0426f756e6465645665633c5472616e636865536f6c7574696f6e2c204d61785472616e636865733e00011473636f726518011c42616c616e63650000a5070c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e646564566563080454016d03045300000400690301185665633c543e0000a9070c4870616c6c65745f706f6f6c5f73797374656d20736f6c7574696f6e44556e6865616c746879536f6c7574696f6e081c42616c616e636501182c4d61785472616e63686573019904001001147374617465ad07019c426f756e6465645665633c556e6865616c74687953746174652c204d61785472616e636865733e000120736f6c7574696f6ea50701a0426f756e6465645665633c5472616e636865536f6c7574696f6e2c204d61785472616e636865733e0001787269736b5f6275666665725f696d70726f76656d656e745f73636f726573b90701a04f7074696f6e3c426f756e6465645665633c42616c616e63652c204d61785472616e636865733e3e000164726573657276655f696d70726f76656d656e745f73636f72652103013c4f7074696f6e3c42616c616e63653e0000ad070c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401b107045300000400b50701185665633c543e0000b1070c4870616c6c65745f706f6f6c5f73797374656d20736f6c7574696f6e38556e6865616c7468795374617465000108484d61785265736572766556696f6c61746564000000544d696e5269736b42756666657256696f6c6174656400010000b507000002b10700b90704184f7074696f6e04045401bd070108104e6f6e6500000010536f6d650400bd070000010000bd070c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e6465645665630804540118045300000400c10701185665633c543e0000c1070000021800c5070c4870616c6c65745f706f6f6c5f73797374656d28706f6f6c5f74797065732c506f6f6c457373656e6365142843757272656e6379496401b9031c42616c616e636501183c5472616e63686543757272656e637901490410526174650195032c537472696e674c696d69740165040014012063757272656e6379b903012843757272656e6379496400012c6d61785f7265736572766518011c42616c616e636500012c6d61785f6e61765f6167652c011c5365636f6e64730001386d696e5f65706f63685f74696d652c011c5365636f6e64730001207472616e63686573c90701dc5665633c5472616e636865457373656e63653c5472616e63686543757272656e63792c20526174652c20537472696e674c696d69743e3e0000c907000002cd0700cd070c4870616c6c65745f706f6f6c5f73797374656d207472616e63686573385472616e636865457373656e63650c3c5472616e63686543757272656e637901490410526174650195032c537472696e674c696d6974016504000c012063757272656e63794904013c5472616e63686543757272656e63790001087479690401445472616e636865547970653c526174653e0001206d657461646174616d0401705472616e6368654d657461646174613c537472696e674c696d69743e0000d1070c3872756e74696d655f636f6d6d6f6e1c6368616e6765733452756e74696d654368616e67650804540109051c4f7074696f6e7301d5070110144c6f616e730400d90701384c6f616e734368616e67653c543e000000404f7261636c65436f6c6c656374696f6e0400dd0701644f7261636c65436f6c6c656374696f6e4368616e67653c543e0001001c506f6f6c4665650400e1070144506f6f6c466565734368616e67653c543e000200305f556e726561636861626c6500030000d5070c3872756e74696d655f636f6d6d6f6e1c6368616e676573244661737444656c617900000000d907103070616c6c65745f6c6f616e7320656e7469746965731c6368616e676573184368616e676504045400010c104c6f616e08002c0124543a3a4c6f616e49640000e50301544c6f616e4d75746174696f6e3c543a3a526174653e00000018506f6c6963790400ed0301ec426f756e6465645665633c57726974654f666652756c653c543a3a526174653e2c20543a3a4d617857726974654f6666506f6c69637953697a653e000100305472616e736665724465627410002c0124543a3a4c6f616e496400002c0124543a3a4c6f616e49640000e1030138526570616964496e7075743c543e0000d90301445072696e636970616c496e7075743c543e00020000dd070c6070616c6c65745f6f7261636c655f636f6c6c656374696f6e147479706573184368616e676504045400010438436f6c6c656374696f6e496e666f040041050144436f6c6c656374696f6e496e666f3c543e00000000e1070c4070616c6c65745f706f6f6c5f66656573147479706573184368616e676504045400010424417070656e644665650c002c0120543a3a4665654964000081040134506f6f6c4665654275636b6574000085040140506f6f6c466565496e666f4f663c543e00000000e5070c3070616c6c65745f6c6f616e731870616c6c6574144576656e7404045400012c1c437265617465640c011c706f6f6c5f69642c0124543a3a506f6f6c496400011c6c6f616e5f69642c0124543a3a4c6f616e49640001246c6f616e5f696e666f7903012c4c6f616e496e666f3c543e0000044841206c6f616e20776173206372656174656420426f72726f7765640c011c706f6f6c5f69642c0124543a3a506f6f6c496400011c6c6f616e5f69642c0124543a3a4c6f616e4964000118616d6f756e74d90301445072696e636970616c496e7075743c543e00010484416e20616d6f756e742077617320626f72726f77656420666f722061206c6f616e185265706169640c011c706f6f6c5f69642c0124543a3a506f6f6c496400011c6c6f616e5f69642c0124543a3a4c6f616e4964000118616d6f756e74e1030138526570616964496e7075743c543e0002047c416e20616d6f756e74207761732072657061696420666f722061206c6f616e285772697474656e4f66660c011c706f6f6c5f69642c0124543a3a506f6f6c496400011c6c6f616e5f69642c0124543a3a4c6f616e49640001187374617475730904015c57726974654f66665374617475733c543a3a526174653e0003045841206c6f616e20776173207772697474656e206f66661c4d7574617465640c011c706f6f6c5f69642c0124543a3a506f6f6c496400011c6c6f616e5f69642c0124543a3a4c6f616e49640001206d75746174696f6ee50301544c6f616e4d75746174696f6e3c543a3a526174653e00040468416e20616374697665206c6f616e20776173206d75746174656418436c6f7365640c011c706f6f6c5f69642c0124543a3a506f6f6c496400011c6c6f616e5f69642c0124543a3a4c6f616e4964000128636f6c6c61746572616c8d03012841737365744f663c543e0005044441206c6f616e2077617320636c6f73656464506f7274666f6c696f56616c756174696f6e557064617465640c011c706f6f6c5f69642c0124543a3a506f6f6c496400012476616c756174696f6e180128543a3a42616c616e636500012c7570646174655f74797065e9070170506f7274666f6c696f56616c756174696f6e55706461746554797065000604bc54686520706f7274666f6c696f2076616c756174696f6e20666f72206120706f6f6c2077617320757064617465642e5457726974654f6666506f6c6963795570646174656408011c706f6f6c5f69642c0124543a3a506f6f6c4964000118706f6c696379ed0301ec426f756e6465645665633c57726974654f666652756c653c543a3a526174653e2c20543a3a4d617857726974654f6666506f6c69637953697a653e000704b0546865207772697465206f666620706f6c69637920666f72206120706f6f6c2077617320757064617465642e3c446562745472616e7366657272656414011c706f6f6c5f69642c0124543a3a506f6f6c496400013066726f6d5f6c6f616e5f69642c0124543a3a4c6f616e4964000128746f5f6c6f616e5f69642c0124543a3a4c6f616e49640001347265706169645f616d6f756e74e1030138526570616964496e7075743c543e000134626f72726f775f616d6f756e74d90301445072696e636970616c496e7075743c543e000804984465627420686173206265656e207472616e736665726564206265747765656e206c6f616e733444656274496e637265617365640c011c706f6f6c5f69642c0124543a3a506f6f6c496400011c6c6f616e5f69642c0124543a3a4c6f616e4964000118616d6f756e74d90301445072696e636970616c496e7075743c543e0009048444656274206f662061206c6f616e20686173206265656e20696e6372656173656434446562744465637265617365640c011c706f6f6c5f69642c0124543a3a506f6f6c496400011c6c6f616e5f69642c0124543a3a4c6f616e4964000118616d6f756e74e1030138526570616964496e7075743c543e000a048444656274206f662061206c6f616e20686173206265656e20646563726561736564047c54686520604576656e746020656e756d206f6620746869732070616c6c6574e9070c246366675f747970657324706f7274666f6c696f70506f7274666f6c696f56616c756174696f6e557064617465547970650001081445786163740000001c496e657861637400010000ed070c4870616c6c65745f7065726d697373696f6e731870616c6c6574144576656e7404045400010c1441646465640c0108746f000130543a3a4163636f756e74496400011473636f706521040120543a3a53636f7065000110726f6c651504011c543a3a526f6c650000001c52656d6f7665640c011066726f6d000130543a3a4163636f756e74496400011473636f706521040120543a3a53636f7065000110726f6c651504011c543a3a526f6c650001001850757267656408011066726f6d000130543a3a4163636f756e74496400011473636f706521040120543a3a53636f7065000200047c54686520604576656e746020656e756d206f6620746869732070616c6c6574f1070c6470616c6c65745f636f6c6c61746f725f616c6c6f776c6973741870616c6c6574144576656e7404045400010834436f6c6c61746f72416464656404012c636f6c6c61746f725f6964000138543a3a56616c696461746f724964000004a84120636f6c6c61746f7220686173206265656e20616464656420746f2074686520616c6c6f776c6973743c436f6c6c61746f7252656d6f76656404012c636f6c6c61746f725f6964000138543a3a56616c696461746f724964000104b84120636f6c6c61746f7220686173206265656e2072656d6f7665642066726f6d2074686520616c6c6f776c697374047c54686520604576656e746020656e756d206f6620746869732070616c6c6574f5070c6070616c6c65745f726573747269637465645f746f6b656e731870616c6c6574144576656e74040454000108205472616e7366657210012c63757272656e63795f6964b9030134543a3a43757272656e6379496400011066726f6d000130543a3a4163636f756e744964000108746f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e63650000044c5472616e73666572207375636365656465642e2842616c616e636553657410012c63757272656e63795f6964b9030134543a3a43757272656e6379496400010c77686f000130543a3a4163636f756e74496400011066726565180128543a3a42616c616e63650001207265736572766564180128543a3a42616c616e636500010468412062616c616e6365207761732073657420627920726f6f742e047c54686520604576656e746020656e756d206f6620746869732070616c6c6574f9070c3470616c6c65745f6272696467651870616c6c6574144576656e740404540001041852656d61726b08003001843c54206173206672616d655f73797374656d3a3a436f6e6669673e3a3a4861736800000401285265736f757263654964000000047c54686520604576656e746020656e756d206f6620746869732070616c6c6574fd070c5c70616c6c65745f696e7465726573745f6163637275616c1870616c6c6574144576656e74040454000100047c54686520604576656e746020656e756d206f6620746869732070616c6c657401080c3c70616c6c65745f6b657973746f72651870616c6c6574144576656e7404045400010c204b657941646465641001146f776e6572000130543a3a4163636f756e74496400010c6b657930011c543a3a4861736800011c707572706f73653d0401284b6579507572706f73650001206b65795f747970654104011c4b6579547970650000044041206b6579207761732061646465642e284b65795265766f6b65640c01146f776e6572000130543a3a4163636f756e74496400010c6b657930011c543a3a48617368000130626c6f636b5f6e756d626572100144426c6f636b4e756d626572466f723c543e0001044841206b657920776173207265766f6b65642e284465706f73697453657404012c6e65775f6465706f736974180128543a3a42616c616e63650002044841206465706f73697420776173207365742e047c54686520604576656e746020656e756d206f6620746869732070616c6c657405080c4870616c6c65745f696e766573746d656e74731870616c6c6574144576656e7404045400013054496e766573744f7264657273436f6c6c6563746564140134696e766573746d656e745f69644904013c543a3a496e766573746d656e74496400010c77686f000130543a3a4163636f756e74496400014070726f6365737365645f6f7264657273090801305665633c4f7264657249643e000128636f6c6c656374696f6e0d08016c496e76657374436f6c6c656374696f6e3c543a3a416d6f756e743e00011c6f7574636f6d6511080138436f6c6c6563744f7574636f6d650000088046756c66696c6c6564206f7264657273207765726520636f6c6c65637465642e09015b696e766573746d656e745f69642c2077686f2c20636f6c6c65637465645f6f72646572732c20436f6c6c656374696f6e2c20436f6c6c6563744f7574636f6d655d5452656465656d4f7264657273436f6c6c6563746564140134696e766573746d656e745f69644904013c543a3a496e766573746d656e74496400010c77686f000130543a3a4163636f756e74496400014070726f6365737365645f6f7264657273090801305665633c4f7264657249643e000128636f6c6c656374696f6e1508016c52656465656d436f6c6c656374696f6e3c543a3a416d6f756e743e00011c6f7574636f6d6511080138436f6c6c6563744f7574636f6d650001088046756c66696c6c6564206f7264657273207765726520636f6c6c65637465642e09015b696e766573746d656e745f69642c2077686f2c20636f6c6c65637465645f6f72646572732c20436f6c6c656374696f6e2c20436f6c6c6563744f7574636f6d655d48496e766573744f7264657255706461746564100134696e766573746d656e745f69644904013c543a3a496e766573746d656e7449640001307375626d69747465645f61742c011c4f72646572496400010c77686f000130543a3a4163636f756e744964000118616d6f756e74180124543a3a416d6f756e740002040d01416e20696e76657374206f726465722077617320757064617465642e205b696e766573746d656e745f69642c206f726465725f69642c2077686f2c20616d6f756e745d4852656465656d4f7264657255706461746564100134696e766573746d656e745f69644904013c543a3a496e766573746d656e7449640001307375626d69747465645f61742c011c4f72646572496400010c77686f000130543a3a4163636f756e744964000118616d6f756e74180124543a3a416d6f756e740003040d01416e20696e76657374206f726465722077617320757064617465642e205b696e766573746d656e745f69642c206f726465725f69642c2077686f2c20616d6f756e745d4c496e766573744f7264657273436c65617265640c0134696e766573746d656e745f69644904013c543a3a496e766573746d656e7449640001206f726465725f69642c011c4f72646572496400012c66756c66696c6c6d656e741908019446756c66696c6c6d656e745769746850726963653c543a3a42616c616e6365526174696f3e0004080d01546f74616c4f7264657273206f6620696e766573746d656e747320776572652066756c66696c6c6564205b696e766573746d656e745f69642c206f726465725f69642c5446756c66696c6c6d656e745769746850726963655d4c52656465656d4f7264657273436c65617265640c0134696e766573746d656e745f69644904013c543a3a496e766573746d656e7449640001206f726465725f69642c011c4f72646572496400012c66756c66696c6c6d656e741908019446756c66696c6c6d656e745769746850726963653c543a3a42616c616e6365526174696f3e0005080d01546f74616c4f7264657273206f6620726564656d7074696f6e7320776572652066756c66696c6c6564205b696e766573746d656e745f69642c206f726465725f69642c5446756c66696c6c6d656e745769746850726963655d60496e766573744f7264657273496e50726f63657373696e670c0134696e766573746d656e745f69644904013c543a3a496e766573746d656e7449640001206f726465725f69642c011c4f72646572496400012c746f74616c5f6f726465721d080154546f74616c4f726465723c543a3a416d6f756e743e0006080901546f74616c4f7264657273206f6620696e766573746d656e74732061726520696e2070726f63657373696e67207374617465205b696e766573746d656e745f69642c546f726465725f69642c20546f74616c4f726465725d6052656465656d4f7264657273496e50726f63657373696e670c0134696e766573746d656e745f69644904013c543a3a496e766573746d656e7449640001206f726465725f69642c011c4f72646572496400012c746f74616c5f6f726465721d080154546f74616c4f726465723c543a3a416d6f756e743e000708f8546f74616c4f7264657273206f6620726564656d7074696f6e7320696e2070726f63657373696e67207374617465205b696e766573746d656e745f69642c546f726465725f69642c20546f74616c4f726465725d90496e76657374436f6c6c6563746564576974686f7574416374697665506f736974696f6e08010c77686f000130543a3a4163636f756e744964000134696e766573746d656e745f69644904013c543a3a496e766573746d656e7449640008080d015369676e616c732074686174206120636f6c6c656374206f6620696e766573746d656e74732063616c6c20776173207375636365737366756c2062757420746865726598776173206e6f206f72646572206f662061207573657220746f20636f6c6c6563742066726f6d9052656465656d436f6c6c6563746564576974686f7574416374697665506f736974696f6e08010c77686f000130543a3a4163636f756e744964000134696e766573746d656e745f69644904013c543a3a496e766573746d656e7449640009080d015369676e616c732074686174206120636f6c6c656374206f6620726564656d7074696f6e732063616c6c20776173207375636365737366756c2062757420746865726598776173206e6f206f72646572206f662061207573657220746f20636f6c6c6563742066726f6d8c496e76657374436f6c6c6563746564466f724e6f6e436c65617265644f72646572496408010c77686f000130543a3a4163636f756e744964000134696e766573746d656e745f69644904013c543a3a496e766573746d656e744964000a0811014120636f6c6c6563742063616c6c20666f722074686520696e766573746d656e74732068617070656e65642c20627574207468652063757272656e74204f726465724964486973206e6f742079657420636c65617265648c52656465656d436f6c6c6563746564466f724e6f6e436c65617265644f72646572496408010c77686f000130543a3a4163636f756e744964000134696e766573746d656e745f69644904013c543a3a496e766573746d656e744964000b0811014120636f6c6c6563742063616c6c20666f722074686520726564656d7074696f6e732068617070656e65642c20627574207468652063757272656e74204f726465724964486973206e6f742079657420636c6561726564047c54686520604576656e746020656e756d206f6620746869732070616c6c657409080000022c000d080c246366675f74797065732c696e766573746d656e747340496e76657374436f6c6c656374696f6e041c42616c616e63650118000801607061796f75745f696e766573746d656e745f696e7665737418011c42616c616e636500016c72656d61696e696e675f696e766573746d656e745f696e7665737418011c42616c616e636500001108084870616c6c65745f696e766573746d656e747338436f6c6c6563744f7574636f6d650001083846756c6c79436f6c6c6563746564000000485061727469616c6c79436f6c6c65637465640001000015080c246366675f74797065732c696e766573746d656e74734052656465656d436f6c6c656374696f6e041c42616c616e63650118000801607061796f75745f696e766573746d656e745f72656465656d18011c42616c616e636500016c72656d61696e696e675f696e766573746d656e745f72656465656d18011c42616c616e6365000019080c246366675f7479706573186f72646572735046756c66696c6c6d656e74576974685072696365043042616c616e6365526174696f01c903000801246f665f616d6f756e747103012c5065727175696e74696c6c0001147072696365c903013042616c616e6365526174696f00001d080c246366675f7479706573186f726465727328546f74616c4f72646572041c42616c616e6365011800040118616d6f756e7418011c42616c616e6365000021080c3870616c6c65745f726577617264731870616c6c6574144576656e740804540004490001143447726f7570526577617264656408012067726f75705f6964100128543a3a47726f75704964000118616d6f756e7418013c42616c616e63654f663c542c20493e000000385374616b654465706f736974656410012067726f75705f6964100128543a3a47726f7570496400012c63757272656e63795f6964b9030134543a3a43757272656e637949640001286163636f756e745f6964000130543a3a4163636f756e744964000118616d6f756e7418013c42616c616e63654f663c542c20493e000100385374616b6557697468647261776e10012067726f75705f6964100128543a3a47726f7570496400012c63757272656e63795f6964b9030134543a3a43757272656e637949640001286163636f756e745f6964000130543a3a4163636f756e744964000118616d6f756e7418013c42616c616e63654f663c542c20493e00020034526577617264436c61696d656410012067726f75705f6964100128543a3a47726f7570496400012c63757272656e63795f6964b9030134543a3a43757272656e637949640001286163636f756e745f6964000130543a3a4163636f756e744964000118616d6f756e7418013c42616c616e63654f663c542c20493e0003004043757272656e637941747461636865640c012c63757272656e63795f6964b9030134543a3a43757272656e6379496400011066726f6d450201484f7074696f6e3c543a3a47726f757049643e000108746f100128543a3a47726f75704964000400047c54686520604576656e746020656e756d206f6620746869732070616c6c657425080c6070616c6c65745f6c69717569646974795f726577617264731870616c6c6574144576656e74040454000104204e657745706f63680c011c656e64735f6f6e2c012c4d6f6d656e744f663c543e000118726577617264180128543a3a42616c616e63650001306c6173745f6368616e6765732908013c45706f63684368616e6765733c543e000000047c54686520604576656e746020656e756d206f6620746869732070616c6c65742908086070616c6c65745f6c69717569646974795f726577617264733045706f63684368616e67657304045400001001206475726174696f6e0d01014c4f7074696f6e3c4d6f6d656e744f663c543e3e000118726577617264210301484f7074696f6e3c543a3a42616c616e63653e00011c776569676874732d0801f4426f756e64656442547265654d61703c543a3a47726f757049642c20543a3a5765696768742c20543a3a4d61784368616e67657350657245706f63683e00012863757272656e636965733d08010501426f756e64656442547265654d61703c543a3a43757272656e637949642c20543a3a47726f757049642c20543a3a4d61784368616e67657350657245706f63683e00002d080c4c626f756e6465645f636f6c6c656374696f6e7344626f756e6465645f62747265655f6d61703c426f756e64656442547265654d61700c044b01100456012c0453000004003108013842547265654d61703c4b2c20563e00003108042042547265654d617008044b01100456012c00040035080000003508000002390800390800000408102c003d080c4c626f756e6465645f636f6c6c656374696f6e7344626f756e6465645f62747265655f6d61703c426f756e64656442547265654d61700c044b01b903045601100453000004004108013842547265654d61703c4b2c20563e00004108042042547265654d617008044b01b9030456011000040045080000004508000002490800490800000408b90310004d080c5870616c6c65745f6c69717569646974795f706f6f6c731870616c6c6574144576656e740404540001043c496e636f6d696e674d65737361676508011873656e646572d5010134446f6d61696e4164647265737300011c6d6573736167655108011c4d65737361676500000868416e20696e636f6d696e67204c50206d6573736167652077617384646574656374656420616e6420697320667572746865722070726f636573736564047c54686520604576656e746020656e756d206f6620746869732070616c6c657451080c5870616c6c65745f6c69717569646974795f706f6f6c731c6d6573736167651c4d65737361676504304261746368436f6e74656e7401550801741c496e76616c6964000000304d65737361676550726f6f66040110686173680401205b75383b2033325d0001005c496e6974696174654d6573736167655265636f76657279080110686173680401205b75383b2033325d00011c6164647265737304011c4164647265737300020058446973707574654d6573736167655265636f7665727908011c6d6573736167650401205b75383b2033325d000118726f757465720401205b75383b2033325d0003001442617463680400550801304261746368436f6e74656e740004003c5363686564756c6555706772616465040120636f6e7472616374810101205b75383b2032305d0005003443616e63656c55706772616465040120636f6e7472616374810101205b75383b2032305d000600345265636f766572417373657473100120636f6e747261637404011c41646472657373000114617373657404011c41646472657373000124726563697069656e7404011c41646472657373000118616d6f756e741d050110553235360007006055706461746543656e74726966756765476173507269636504011470726963651801107531323800080020416464417373657408012063757272656e63791801107531323800012c65766d5f61646472657373810101205b75383b2032305d0009001c416464506f6f6c04011c706f6f6c5f69642c010c753634000a00284164645472616e63686518011c706f6f6c5f69642c010c7536340001287472616e6368655f69649d0201245472616e6368654964000128746f6b656e5f6e616d65650801545b75383b20544f4b454e5f4e414d455f53495a455d000130746f6b656e5f73796d626f6c04015c5b75383b20544f4b454e5f53594d424f4c5f53495a455d000120646563696d616c730801087538000110686f6f6b04011c41646472657373000b0028416c6c6f77417373657408011c706f6f6c5f69642c010c75363400012063757272656e637918011075313238000c0034446973616c6c6f77417373657408011c706f6f6c5f69642c010c75363400012063757272656e637918011075313238000d00485570646174655472616e636865507269636514011c706f6f6c5f69642c010c7536340001287472616e6368655f69649d0201245472616e636865496400012063757272656e63791801107531323800011470726963651801107531323800012c636f6d70757465645f61742c011c5365636f6e6473000e00545570646174655472616e6368654d6574616461746110011c706f6f6c5f69642c010c7536340001287472616e6368655f69649d0201245472616e6368654964000128746f6b656e5f6e616d65650801545b75383b20544f4b454e5f4e414d455f53495a455d000130746f6b656e5f73796d626f6c04015c5b75383b20544f4b454e5f53594d424f4c5f53495a455d000f00445570646174655472616e636865486f6f6b0c011c706f6f6c5f69642c010c7536340001287472616e6368655f69649d0201245472616e6368654964000110686f6f6b04011c41646472657373001000385472616e736665724173736574730c012063757272656e637918011075313238000120726563656976657204011c41646472657373000118616d6f756e7418011075313238001100545472616e736665725472616e636865546f6b656e7314011c706f6f6c5f69642c010c7536340001287472616e6368655f69649d0201245472616e6368654964000118646f6d61696e6908014853657269616c697a61626c65446f6d61696e000120726563656976657204011c41646472657373000118616d6f756e7418011075313238001200445570646174655265737472696374696f6e0c011c706f6f6c5f69642c010c7536340001287472616e6368655f69649d0201245472616e63686549640001187570646174656d0801605570646174655265737472696374696f6e4d657373616765001300384465706f7369745265717565737414011c706f6f6c5f69642c010c7536340001287472616e6368655f69649d0201245472616e6368654964000120696e766573746f7204011c4164647265737300012063757272656e637918011075313238000118616d6f756e74180110753132380014003452656465656d5265717565737414011c706f6f6c5f69642c010c7536340001287472616e6368655f69649d0201245472616e6368654964000120696e766573746f7204011c4164647265737300012063757272656e637918011075313238000118616d6f756e74180110753132380015005c46756c66696c6c65644465706f7369745265717565737418011c706f6f6c5f69642c010c7536340001287472616e6368655f69649d0201245472616e6368654964000120696e766573746f7204011c4164647265737300012063757272656e63791801107531323800013c63757272656e63795f7061796f7574180110753132380001547472616e6368655f746f6b656e735f7061796f7574180110753132380016005846756c66696c6c656452656465656d5265717565737418011c706f6f6c5f69642c010c7536340001287472616e6368655f69649d0201245472616e6368654964000120696e766573746f7204011c4164647265737300012063757272656e63791801107531323800013c63757272656e63795f7061796f7574180110753132380001547472616e6368655f746f6b656e735f7061796f7574180110753132380017005043616e63656c4465706f7369745265717565737410011c706f6f6c5f69642c010c7536340001287472616e6368655f69649d0201245472616e6368654964000120696e766573746f7204011c4164647265737300012063757272656e6379180110753132380018004c43616e63656c52656465656d5265717565737410011c706f6f6c5f69642c010c7536340001287472616e6368655f69649d0201245472616e6368654964000120696e766573746f7204011c4164647265737300012063757272656e6379180110753132380019007446756c66696c6c656443616e63656c4465706f7369745265717565737418011c706f6f6c5f69642c010c7536340001287472616e6368655f69649d0201245472616e6368654964000120696e766573746f7204011c4164647265737300012063757272656e63791801107531323800013c63757272656e63795f7061796f75741801107531323800015c66756c66696c6c65645f696e766573745f616d6f756e7418011075313238001a007046756c66696c6c656443616e63656c52656465656d5265717565737414011c706f6f6c5f69642c010c7536340001287472616e6368655f69649d0201245472616e6368654964000120696e766573746f7204011c4164647265737300012063757272656e6379180110753132380001547472616e6368655f746f6b656e735f7061796f757418011075313238001b00505472696767657252656465656d5265717565737414011c706f6f6c5f69642c010c7536340001287472616e6368655f69649d0201245472616e6368654964000120696e766573746f7204011c4164647265737300012063757272656e637918011075313238000118616d6f756e7418011075313238001c000055080c5870616c6c65745f6c69717569646974795f706f6f6c731c6d6573736167653442617463684d6573736167657300000400590801e0426f756e6465645665633c4e6f42617463684d6573736167652c20436f6e73745533323c4d41585f42415443485f4d455353414745533e3e000059080c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e646564566563080454015d08045300000400610801185665633c543e00005d080c5870616c6c65745f6c69717569646974795f706f6f6c731c6d657373616765384e6f42617463684d657373616765000004005108011c4d657373616765000061080000025d0800650800000380000000080069080c5870616c6c65745f6c69717569646974795f706f6f6c731c6d6573736167654853657269616c697a61626c65446f6d61696e00000800080108753800002c010c75363400006d080c5870616c6c65745f6c69717569646974795f706f6f6c731c6d657373616765605570646174655265737472696374696f6e4d6573736167650001101c496e76616c6964000000305570646174654d656d6265720801186d656d62657204011c4164647265737300012c76616c69645f756e74696c2c011c5365636f6e647300010018467265657a6504011c6164647265737304011c4164647265737300020020556e667265657a6504011c6164647265737304011c416464726573730003000071080c5070616c6c65745f706f6f6c5f72656769737472791870616c6c6574144576656e74040454000114285265676973746572656404011c706f6f6c5f69642c0124543a3a506f6f6c4964000004584120706f6f6c2077617320726567697374657265642e405570646174655265676973746572656404011c706f6f6c5f69642c0124543a3a506f6f6c4964000104744120706f6f6c207570646174652077617320726567697374657265642e38557064617465457865637574656404011c706f6f6c5f69642c0124543a3a506f6f6c49640002046c4120706f6f6c20757064617465207761732065786563757465642e3055706461746553746f72656404011c706f6f6c5f69642c0124543a3a506f6f6c4964000304b44120706f6f6c20757064617465207761732073746f72656420666f72206c6174657220657865637574696f6e2e2c4d6574616461746153657408011c706f6f6c5f69642c0124543a3a506f6f6c49640001206d6574616461746175080188426f756e6465645665633c75382c20543a3a4d617853697a654d657461646174613e00040458506f6f6c206d6574616461746120776173207365742e047c54686520604576656e746020656e756d206f6620746869732070616c6c657475080c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401080453000004003401185665633c543e000079080c3870616c6c65745f726577617264731870616c6c6574144576656e740804540004490001143447726f7570526577617264656408012067726f75705f6964100128543a3a47726f75704964000118616d6f756e7418013c42616c616e63654f663c542c20493e000000385374616b654465706f736974656410012067726f75705f6964100128543a3a47726f7570496400012c63757272656e63795f6964b9030134543a3a43757272656e637949640001286163636f756e745f6964000130543a3a4163636f756e744964000118616d6f756e7418013c42616c616e63654f663c542c20493e000100385374616b6557697468647261776e10012067726f75705f6964100128543a3a47726f7570496400012c63757272656e63795f6964b9030134543a3a43757272656e637949640001286163636f756e745f6964000130543a3a4163636f756e744964000118616d6f756e7418013c42616c616e63654f663c542c20493e00020034526577617264436c61696d656410012067726f75705f6964100128543a3a47726f7570496400012c63757272656e63795f6964b9030134543a3a43757272656e637949640001286163636f756e745f6964000130543a3a4163636f756e744964000118616d6f756e7418013c42616c616e63654f663c542c20493e0003004043757272656e637941747461636865640c012c63757272656e63795f6964b9030134543a3a43757272656e6379496400011066726f6d450201484f7074696f6e3c543a3a47726f757049643e000108746f100128543a3a47726f75704964000400047c54686520604576656e746020656e756d206f6620746869732070616c6c65747d080c5070616c6c65745f626c6f636b5f726577617264731870616c6c6574144576656e74040454000108284e657753657373696f6e0c013c636f6c6c61746f725f726577617264180128543a3a42616c616e636500015c74726561737572795f696e666c6174696f6e5f726174659503011c543a3a526174650001306c6173745f6368616e6765738108014453657373696f6e4368616e6765733c543e0000006053657373696f6e416476616e63656d656e744661696c65640401146572726f7264013444697370617463684572726f72000100047c54686520604576656e746020656e756d206f6620746869732070616c6c65748108085070616c6c65745f626c6f636b5f726577617264733853657373696f6e4368616e6765730404540000140124636f6c6c61746f727385080148436f6c6c61746f724368616e6765733c543e000138636f6c6c61746f725f636f756e744502012c4f7074696f6e3c7533323e00013c636f6c6c61746f725f726577617264210301484f7074696f6e3c543a3a42616c616e63653e00015c74726561737572795f696e666c6174696f6e5f726174658d08013c4f7074696f6e3c543a3a526174653e00012c6c6173745f7570646174652c011c5365636f6e647300008508085070616c6c65745f626c6f636b5f726577617264733c436f6c6c61746f724368616e676573040454000008010c696e63890801a4426f756e6465645665633c543a3a4163636f756e7449642c20543a3a4d6178436f6c6c61746f72733e00010c6f7574890801a4426f756e6465645665633c543a3a4163636f756e7449642c20543a3a4d6178436f6c6c61746f72733e000089080c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401000453000004009401185665633c543e00008d0804184f7074696f6e0404540195030108104e6f6e6500000010536f6d6504009503000001000091080c6470616c6c65745f7472616e736665725f616c6c6f776c6973741870616c6c6574144576656e7404045400011c605472616e73666572416c6c6f77616e63654372656174656414014473656e6465725f6163636f756e745f6964000130543a3a4163636f756e74496400012c63757272656e63795f6964c5040134543a3a43757272656e637949640001207265636569766572c904012c543a3a4c6f636174696f6e000128616c6c6f7765645f6174100144426c6f636b4e756d626572466f723c543e000128626c6f636b65645f6174100144426c6f636b4e756d626572466f723c543e000004d44576656e7420666f72207375636365737366756c206372656174696f6e206f662061207472616e7366657220616c6c6f77616e6365605472616e73666572416c6c6f77616e636552656d6f76656414014473656e6465725f6163636f756e745f6964000130543a3a4163636f756e74496400012c63757272656e63795f6964c5040134543a3a43757272656e637949640001207265636569766572c904012c543a3a4c6f636174696f6e000128616c6c6f7765645f6174100144426c6f636b4e756d626572466f723c543e000128626c6f636b65645f6174100144426c6f636b4e756d626572466f723c543e000104e04576656e7420666f72207375636365737366756c2072656d6f76616c206f66207472616e7366657220616c6c6f77616e6365207065726d735c5472616e73666572416c6c6f77616e63655075726765640c014473656e6465725f6163636f756e745f6964000130543a3a4163636f756e74496400012c63757272656e63795f6964c5040134543a3a43757272656e637949640001207265636569766572c904012c543a3a4c6f636174696f6e000204e04576656e7420666f72207375636365737366756c2072656d6f76616c206f66207472616e7366657220616c6c6f77616e6365207065726d73645472616e73666572416c6c6f77616e636544656c61794164640c014473656e6465725f6163636f756e745f6964000130543a3a4163636f756e74496400012c63757272656e63795f6964c5040134543a3a43757272656e6379496400011464656c6179100144426c6f636b4e756d626572466f723c543e000304884576656e7420666f7220416c6c6f77616e63652064656c6179206372656174696f6e705472616e73666572416c6c6f77616e636544656c61795570646174650c014473656e6465725f6163636f756e745f6964000130543a3a4163636f756e74496400012c63757272656e63795f6964c5040134543a3a43757272656e6379496400011464656c6179100144426c6f636b4e756d626572466f723c543e000404804576656e7420666f7220416c6c6f77616e63652064656c617920757064617465b0546f67676c655472616e73666572416c6c6f77616e636544656c61794675747572654d6f6469666961626c650c014473656e6465725f6163636f756e745f6964000130543a3a4163636f756e74496400012c63757272656e63795f6964c5040134543a3a43757272656e637949640001546d6f6469666961626c655f6f6e63655f6166746572450201644f7074696f6e3c426c6f636b4e756d626572466f723c543e3e000504d44576656e7420666f7220416c6c6f77616e63652064656c617920667574757265206d6f64696669636174696f6e20616c6c6f7765646c5472616e73666572416c6c6f77616e636544656c6179507572676508014473656e6465725f6163636f756e745f6964000130543a3a4163636f756e74496400012c63757272656e63795f6964c5040134543a3a43757272656e63794964000604844576656e7420666f7220416c6c6f77616e63652064656c61792072656d6f76616c047c54686520604576656e746020656e756d206f6620746869732070616c6c657495080c7870616c6c65745f6c69717569646974795f706f6f6c735f676174657761791870616c6c6574144576656e740404540001103c446f6d61696e526f75746572536574080118646f6d61696e55040118446f6d61696e000118726f7574657205050124543a3a526f757465720000049854686520726f7574657220666f72206120676976656e20646f6d61696e20776173207365742e34496e7374616e63654164646564040120696e7374616e6365d5010134446f6d61696e4164647265737300010488416e20696e7374616e63652077617320616464656420746f206120646f6d61696e2e3c496e7374616e636552656d6f766564040120696e7374616e6365d5010134446f6d61696e4164647265737300020498416e20696e7374616e6365207761732072656d6f7665642066726f6d206120646f6d61696e2e50446f6d61696e486f6f6b41646472657373536574080118646f6d61696e55040118446f6d61696e000130686f6f6b5f61646472657373810101205b75383b2032305d000304cc54686520646f6d61696e20686f6f6b20616464726573732077617320696e697469616c697a6564206f7220757064617465642e047c54686520604576656e746020656e756d206f6620746869732070616c6c657499080c4470616c6c65745f6f726465725f626f6f6b1870616c6c6574144576656e74040454000114304f72646572437265617465641c01206f726465725f69642c013c543a3a4f7264657249644e6f6e636500013c63726561746f725f6163636f756e74000130543a3a4163636f756e74496400012c63757272656e63795f696eb9030134543a3a43757272656e6379496400013063757272656e63795f6f7574b9030134543a3a43757272656e63794964000128616d6f756e745f6f7574180134543a3a42616c616e63654f75740001686d696e5f66756c66696c6c6d656e745f616d6f756e745f6f7574180134543a3a42616c616e63654f7574000114726174696f310501504f72646572526174696f3c543a3a526174696f3e0000049c4576656e7420656d6974746564207768656e20616e206f7264657220697320637265617465642e384f7264657243616e63656c6c656408011c6163636f756e74000130543a3a4163636f756e7449640001206f726465725f69642c013c543a3a4f7264657249644e6f6e6365000104a44576656e7420656d6974746564207768656e20616e206f726465722069732063616e63656c6c65642e304f72646572557064617465641401206f726465725f69642c013c543a3a4f7264657249644e6f6e636500011c6163636f756e74000130543a3a4163636f756e744964000128616d6f756e745f6f7574180134543a3a42616c616e63654f7574000114726174696f310501504f72646572526174696f3c543a3a526174696f3e0001686d696e5f66756c66696c6c6d656e745f616d6f756e745f6f7574180134543a3a42616c616e63654f75740002049c4576656e7420656d6974746564207768656e20616e206f7264657220697320757064617465642e404f7264657246756c66696c6c6d656e742001206f726465725f69642c013c543a3a4f7264657249644e6f6e636500013c706c6163696e675f6163636f756e74000130543a3a4163636f756e74496400014866756c66696c6c696e675f6163636f756e74000130543a3a4163636f756e74496400014c7061727469616c5f66756c66696c6c6d656e74780110626f6f6c00014866756c66696c6c6d656e745f616d6f756e74180134543a3a42616c616e63654f757400012c63757272656e63795f696eb9030134543a3a43757272656e6379496400013063757272656e63795f6f7574b9030134543a3a43757272656e63794964000114726174696fc9030120543a3a526174696f000310a44576656e7420656d6974746564207768656e20616e206f726465722069732066756c66696c6c65642ebc43616e20626520666f7220656974686572207061727469616c206f7220746f74616c2066756c66696c6c6d656e742e0501436f6e7461696e7320616d6f756e742066756c66696c6c65642c20616e6420776865746865722066756c66696c6c6d656e7420776173207061727469616c206f721466756c6c2e344665656465724368616e6765640401246665656465725f69643505012c543a3a4665656465724964000404cc4576656e7420656d6974746564207768656e20612076616c69642074726164696e6720706169722069732072656d6f7665642e047c54686520604576656e746020656e756d206f6620746869732070616c6c65749d080c6870616c6c65745f666f726569676e5f696e766573746d656e74731870616c6c6574144576656e7404045400010c5053776170437265617465644f72557064617465640c010c77686f000130543a3a4163636f756e74496400011c737761705f6964a10801245377617049643c543e00011073776170a9080124537761704f663c543e000000385377617046756c6c66696c6c656414010c77686f000130543a3a4163636f756e74496400011c737761705f6964a10801245377617049643c543e00012472656d61696e696e67a9080124537761704f663c543e000128737761707065645f696e180138543a3a5377617042616c616e636500012c737761707065645f6f7574180138543a3a5377617042616c616e6365000100345377617043616e63656c6c65640c010c77686f000130543a3a4163636f756e74496400011c737761705f6964a10801245377617049643c543e00011073776170a9080124537761704f663c543e000200047c54686520604576656e746020656e756d206f6620746869732070616c6c6574a108000004084904a50800a508086870616c6c65745f666f726569676e5f696e766573746d656e747318416374696f6e00010828496e766573746d656e7400000028526564656d7074696f6e00010000a9080c286366675f74726169747314737761707310537761700818416d6f756e7401182043757272656e637901b903000c012c63757272656e63795f696eb903012043757272656e637900013063757272656e63795f6f7574b903012043757272656e6379000128616d6f756e745f6f7574180118416d6f756e740000ad080c4870616c6c65745f6f7261636c655f666565641870616c6c6574144576656e740404540001040c4665640c0118666565646572bd0101244665656465723c543e00010c6b6579b5030130543a3a4f7261636c654b657900011476616c7565c9030138543a3a4f7261636c6556616c7565000000047c54686520604576656e746020656e756d206f6620746869732070616c6c6574b1080c6070616c6c65745f6f7261636c655f636f6c6c656374696f6e1870616c6c6574144576656e740404540001102041646465644b6579080134636f6c6c656374696f6e5f69642c013c543a3a436f6c6c656374696f6e496400010c6b6579b5030130543a3a4f7261636c654b65790000002852656d6f7665644b6579080134636f6c6c656374696f6e5f69642c013c543a3a436f6c6c656374696f6e496400010c6b6579b5030130543a3a4f7261636c654b65790001005455706461746564436f6c6c656374696f6e496e666f080134636f6c6c656374696f6e5f69642c013c543a3a436f6c6c656374696f6e496400013c636f6c6c656374696f6e5f696e666f4105016074797065733a3a436f6c6c656374696f6e496e666f3c543e0002004455706461746564436f6c6c656374696f6e080134636f6c6c656374696f6e5f69642c013c543a3a436f6c6c656374696f6e49640001306b6579735f7570646174656410010c753332000300047c54686520604576656e746020656e756d206f6620746869732070616c6c6574b5080c4470616c6c65745f616e63686f72735f76321870616c6c6574144576656e7404045400010c2c416e63686f7241646465641401286163636f756e745f6964000130543a3a4163636f756e74496400012c646f63756d656e745f696418011075313238000140646f63756d656e745f76657273696f6e2c010c7536340001106861736830011c543a3a4861736800011c6465706f736974180128543a3a42616c616e636500000450416e20616e63686f72207761732061646465642e34416e63686f7252656d6f7665641401286163636f756e745f6964000130543a3a4163636f756e74496400012c646f63756d656e745f696418011075313238000140646f63756d656e745f76657273696f6e2c010c7536340001106861736830011c543a3a4861736800011c6465706f736974180128543a3a42616c616e636500010458416e20616e63686f72207761732072656d6f7665642e284465706f73697453657404012c6e65775f6465706f736974180128543a3a42616c616e63650002044841206465706f73697420776173207365742e047c54686520604576656e746020656e756d206f6620746869732070616c6c6574b9080c9070616c6c65745f6c69717569646974795f706f6f6c735f676174657761795f71756575651870616c6c6574144576656e7404045400010c404d6573736167655375626d69747465640801146e6f6e63652c013c543a3a4d6573736167654e6f6e636500011c6d657373616765bd080128543a3a4d6573736167650000046041206d65737361676520776173207375626d69747465642e5c4d657373616765457865637574696f6e537563636573730801146e6f6e63652c013c543a3a4d6573736167654e6f6e636500011c6d657373616765bd080128543a3a4d657373616765000104684d65737361676520657865637574696f6e20737563636573732e5c4d657373616765457865637574696f6e4661696c7572650c01146e6f6e63652c013c543a3a4d6573736167654e6f6e636500011c6d657373616765bd080128543a3a4d6573736167650001146572726f7264013444697370617463684572726f72000204684d65737361676520657865637574696f6e206661696c7572652e047c54686520604576656e746020656e756d206f6620746869732070616c6c6574bd080c7870616c6c65745f6c69717569646974795f706f6f6c735f676174657761791c6d65737361676538476174657761794d65737361676508244163636f756e74496401001c4d65737361676501510801081c496e626f756e64080138646f6d61696e5f61646472657373d5010134446f6d61696e4164647265737300011c6d6573736167655108011c4d657373616765000000204f7574626f756e640c011873656e6465720001244163636f756e74496400012c64657374696e6174696f6e55040118446f6d61696e00011c6d6573736167655108011c4d65737361676500010000c1080c6463756d756c75735f70616c6c65745f78636d705f71756575651870616c6c6574144576656e740404540001043c58636d704d65737361676553656e740401306d6573736167655f6861736804011c58636d48617368000004c0416e2048524d50206d657373616765207761732073656e7420746f2061207369626c696e672070617261636861696e2e047c54686520604576656e746020656e756d206f6620746869732070616c6c6574c5080c2870616c6c65745f78636d1870616c6c6574144576656e7404045400016024417474656d7074656404011c6f7574636f6d65c908015078636d3a3a6c61746573743a3a4f7574636f6d65000004a8457865637574696f6e206f6620616e2058434d206d6573736167652077617320617474656d707465642e1053656e741001186f726967696edd0101204c6f636174696f6e00012c64657374696e6174696f6edd0101204c6f636174696f6e00011c6d6573736167651506011c58636d3c28293e0001286d6573736167655f696404011c58636d486173680001045c412058434d206d657373616765207761732073656e742e48556e6578706563746564526573706f6e73650801186f726967696edd0101204c6f636174696f6e00012071756572795f69642c011c5175657279496400020c5901517565727920726573706f6e736520726563656976656420776869636820646f6573206e6f74206d61746368206120726567697374657265642071756572792e2054686973206d61792062652062656361757365206155016d61746368696e6720717565727920776173206e6576657220726567697374657265642c206974206d617920626520626563617573652069742069732061206475706c696361746520726573706f6e73652c206f727062656361757365207468652071756572792074696d6564206f75742e34526573706f6e7365526561647908012071756572795f69642c011c51756572794964000120726573706f6e736539060120526573706f6e73650003085d01517565727920726573706f6e736520686173206265656e20726563656976656420616e6420697320726561647920666f722074616b696e672077697468206074616b655f726573706f6e7365602e205468657265206973806e6f2072656769737465726564206e6f74696669636174696f6e2063616c6c2e204e6f7469666965640c012071756572795f69642c011c5175657279496400013070616c6c65745f696e646578080108753800012863616c6c5f696e64657808010875380004085901517565727920726573706f6e736520686173206265656e20726563656976656420616e642071756572792069732072656d6f7665642e205468652072656769737465726564206e6f74696669636174696f6e20686173a86265656e206469737061746368656420616e64206578656375746564207375636365737366756c6c792e404e6f746966794f76657277656967687414012071756572795f69642c011c5175657279496400013070616c6c65745f696e646578080108753800012863616c6c5f696e646578080108753800013461637475616c5f77656967687424011857656967687400014c6d61785f62756467657465645f77656967687424011857656967687400050c4901517565727920726573706f6e736520686173206265656e20726563656976656420616e642071756572792069732072656d6f7665642e205468652072656769737465726564206e6f74696669636174696f6e5901636f756c64206e6f742062652064697370617463686564206265636175736520746865206469737061746368207765696768742069732067726561746572207468616e20746865206d6178696d756d20776569676874e46f726967696e616c6c7920627564676574656420627920746869732072756e74696d6520666f722074686520717565727920726573756c742e4c4e6f7469667944697370617463684572726f720c012071756572795f69642c011c5175657279496400013070616c6c65745f696e646578080108753800012863616c6c5f696e64657808010875380006085501517565727920726573706f6e736520686173206265656e20726563656976656420616e642071756572792069732072656d6f7665642e2054686572652077617320612067656e6572616c206572726f722077697468886469737061746368696e6720746865206e6f74696669636174696f6e2063616c6c2e484e6f746966794465636f64654661696c65640c012071756572795f69642c011c5175657279496400013070616c6c65745f696e646578080108753800012863616c6c5f696e646578080108753800070c5101517565727920726573706f6e736520686173206265656e20726563656976656420616e642071756572792069732072656d6f7665642e205468652064697370617463682077617320756e61626c6520746f20626559016465636f64656420696e746f2061206043616c6c603b2074686973206d696768742062652064756520746f2064697370617463682066756e6374696f6e20686176696e672061207369676e6174757265207768696368946973206e6f742060286f726967696e2c20517565727949642c20526573706f6e736529602e40496e76616c6964526573706f6e6465720c01186f726967696edd0101204c6f636174696f6e00012071756572795f69642c011c5175657279496400014465787065637465645f6c6f636174696f6e4d0601404f7074696f6e3c4c6f636174696f6e3e00080c5901457870656374656420717565727920726573706f6e736520686173206265656e2072656365697665642062757420746865206f726967696e206c6f636174696f6e206f662074686520726573706f6e736520646f657355016e6f74206d6174636820746861742065787065637465642e205468652071756572792072656d61696e73207265676973746572656420666f722061206c617465722c2076616c69642c20726573706f6e736520746f6c626520726563656976656420616e642061637465642075706f6e2e5c496e76616c6964526573706f6e64657256657273696f6e0801186f726967696edd0101204c6f636174696f6e00012071756572795f69642c011c5175657279496400091c5101457870656374656420717565727920726573706f6e736520686173206265656e2072656365697665642062757420746865206578706563746564206f726967696e206c6f636174696f6e20706c6163656420696e4d0173746f7261676520627920746869732072756e74696d652070726576696f75736c792063616e6e6f74206265206465636f6465642e205468652071756572792072656d61696e7320726567697374657265642e0041015468697320697320756e6578706563746564202873696e63652061206c6f636174696f6e20706c6163656420696e2073746f7261676520696e20612070726576696f75736c7920657865637574696e674d0172756e74696d652073686f756c64206265207265616461626c65207072696f7220746f2071756572792074696d656f75742920616e642064616e6765726f75732073696e63652074686520706f737369626c79590176616c696420726573706f6e73652077696c6c2062652064726f707065642e204d616e75616c20676f7665726e616e636520696e74657276656e74696f6e2069732070726f6261626c7920676f696e6720746f2062651c6e65656465642e34526573706f6e736554616b656e04012071756572795f69642c011c51756572794964000a04c8526563656976656420717565727920726573706f6e736520686173206265656e207265616420616e642072656d6f7665642e34417373657473547261707065640c011068617368300110483235360001186f726967696edd0101204c6f636174696f6e0001186173736574736106013c56657273696f6e6564417373657473000b04b8536f6d65206173736574732068617665206265656e20706c6163656420696e20616e20617373657420747261702e5456657273696f6e4368616e67654e6f74696669656410012c64657374696e6174696f6edd0101204c6f636174696f6e000118726573756c7410012858636d56657273696f6e000110636f7374210601184173736574730001286d6573736167655f696404011c58636d48617368000c0c2501416e2058434d2076657273696f6e206368616e6765206e6f74696669636174696f6e206d65737361676520686173206265656e20617474656d7074656420746f2062652073656e742e00e054686520636f7374206f662073656e64696e672069742028626f726e652062792074686520636861696e2920697320696e636c756465642e5c537570706f7274656456657273696f6e4368616e6765640801206c6f636174696f6edd0101204c6f636174696f6e00011c76657273696f6e10012858636d56657273696f6e000d08390154686520737570706f727465642076657273696f6e206f662061206c6f636174696f6e20686173206265656e206368616e6765642e2054686973206d69676874206265207468726f75676820616ec06175746f6d61746963206e6f74696669636174696f6e206f722061206d616e75616c20696e74657276656e74696f6e2e504e6f7469667954617267657453656e644661696c0c01206c6f636174696f6edd0101204c6f636174696f6e00012071756572795f69642c011c517565727949640001146572726f72e105012058636d4572726f72000e0859014120676976656e206c6f636174696f6e2077686963682068616420612076657273696f6e206368616e676520737562736372697074696f6e207761732064726f70706564206f77696e6720746f20616e206572726f727c73656e64696e6720746865206e6f74696669636174696f6e20746f2069742e644e6f746966795461726765744d6967726174696f6e4661696c0801206c6f636174696f6ecd04014456657273696f6e65644c6f636174696f6e00012071756572795f69642c011c51756572794964000f0859014120676976656e206c6f636174696f6e2077686963682068616420612076657273696f6e206368616e676520737562736372697074696f6e207761732064726f70706564206f77696e6720746f20616e206572726f72b46d6967726174696e6720746865206c6f636174696f6e20746f206f7572206e65772058434d20666f726d61742e54496e76616c69645175657269657256657273696f6e0801186f726967696edd0101204c6f636174696f6e00012071756572795f69642c011c5175657279496400101c5501457870656374656420717565727920726573706f6e736520686173206265656e20726563656976656420627574207468652065787065637465642071756572696572206c6f636174696f6e20706c6163656420696e4d0173746f7261676520627920746869732072756e74696d652070726576696f75736c792063616e6e6f74206265206465636f6465642e205468652071756572792072656d61696e7320726567697374657265642e0041015468697320697320756e6578706563746564202873696e63652061206c6f636174696f6e20706c6163656420696e2073746f7261676520696e20612070726576696f75736c7920657865637574696e674d0172756e74696d652073686f756c64206265207265616461626c65207072696f7220746f2071756572792074696d656f75742920616e642064616e6765726f75732073696e63652074686520706f737369626c79590176616c696420726573706f6e73652077696c6c2062652064726f707065642e204d616e75616c20676f7665726e616e636520696e74657276656e74696f6e2069732070726f6261626c7920676f696e6720746f2062651c6e65656465642e38496e76616c6964517565726965721001186f726967696edd0101204c6f636174696f6e00012071756572795f69642c011c5175657279496400014065787065637465645f71756572696572dd0101204c6f636174696f6e0001506d617962655f61637475616c5f717565726965724d0601404f7074696f6e3c4c6f636174696f6e3e00110c5d01457870656374656420717565727920726573706f6e736520686173206265656e20726563656976656420627574207468652071756572696572206c6f636174696f6e206f662074686520726573706f6e736520646f657351016e6f74206d61746368207468652065787065637465642e205468652071756572792072656d61696e73207265676973746572656420666f722061206c617465722c2076616c69642c20726573706f6e736520746f6c626520726563656976656420616e642061637465642075706f6e2e5056657273696f6e4e6f74696679537461727465640c012c64657374696e6174696f6edd0101204c6f636174696f6e000110636f7374210601184173736574730001286d6573736167655f696404011c58636d486173680012085901412072656d6f746520686173207265717565737465642058434d2076657273696f6e206368616e6765206e6f74696669636174696f6e2066726f6d20757320616e64207765206861766520686f6e6f7265642069742e1d01412076657273696f6e20696e666f726d6174696f6e206d6573736167652069732073656e7420746f207468656d20616e642069747320636f737420697320696e636c756465642e5856657273696f6e4e6f746966795265717565737465640c012c64657374696e6174696f6edd0101204c6f636174696f6e000110636f7374210601184173736574730001286d6573736167655f696404011c58636d486173680013043d015765206861766520726571756573746564207468617420612072656d6f746520636861696e2073656e642075732058434d2076657273696f6e206368616e6765206e6f74696669636174696f6e732e6056657273696f6e4e6f74696679556e7265717565737465640c012c64657374696e6174696f6edd0101204c6f636174696f6e000110636f7374210601184173736574730001286d6573736167655f696404011c58636d4861736800140825015765206861766520726571756573746564207468617420612072656d6f746520636861696e2073746f70732073656e64696e672075732058434d2076657273696f6e206368616e6765386e6f74696669636174696f6e732e204665657350616964080118706179696e67dd0101204c6f636174696f6e0001106665657321060118417373657473001504310146656573207765726520706169642066726f6d2061206c6f636174696f6e20666f7220616e206f7065726174696f6e20286f6674656e20666f72207573696e67206053656e6458636d60292e34417373657473436c61696d65640c011068617368300110483235360001186f726967696edd0101204c6f636174696f6e0001186173736574736106013c56657273696f6e6564417373657473001604c0536f6d65206173736574732068617665206265656e20636c61696d65642066726f6d20616e20617373657420747261706056657273696f6e4d6967726174696f6e46696e697368656404011c76657273696f6e10012858636d56657273696f6e00170484412058434d2076657273696f6e206d6967726174696f6e2066696e69736865642e047c54686520604576656e746020656e756d206f6620746869732070616c6c6574c908102c73746167696e675f78636d087634187472616974731c4f7574636f6d6500010c20436f6d706c6574650401107573656424011857656967687400000028496e636f6d706c657465080110757365642401185765696768740001146572726f72e10501144572726f72000100144572726f720401146572726f72e10501144572726f7200020000cd080c4863756d756c75735f70616c6c65745f78636d1870616c6c6574144576656e7404045400010c34496e76616c6964466f726d617404000401205b75383b2033325d00000880446f776e77617264206d65737361676520697320696e76616c69642058434d2e205c5b206964205c5d48556e737570706f7274656456657273696f6e04000401205b75383b2033325d000108bc446f776e77617264206d65737361676520697320756e737570706f727465642076657273696f6e206f662058434d2e205c5b206964205c5d404578656375746564446f776e7761726408000401205b75383b2033325d0000c908011c4f7574636f6d65000208c4446f776e77617264206d65737361676520657865637574656420776974682074686520676976656e206f7574636f6d652e445c5b2069642c206f7574636f6d65205c5d047c54686520604576656e746020656e756d206f6620746869732070616c6c6574d1080c5470616c6c65745f78636d5f7472616e736163746f721870616c6c6574144576656e7404045400012c505472616e736163746564446572697661746976651001286163636f756e745f6964000130543a3a4163636f756e74496400011064657374dd0101204c6f636174696f6e00011063616c6c34011c5665633c75383e000114696e646578b4010c75313600000439015472616e7361637465642074686520696e6e65722063616c6c207468726f75676820612064657269766174697665206163636f756e7420696e20612064657374696e6174696f6e20636861696e2e4c5472616e736163746564536f7665726569676e0c01246665655f7061796572110101504f7074696f6e3c543a3a4163636f756e7449643e00011064657374dd0101204c6f636174696f6e00011063616c6c34011c5665633c75383e00010425015472616e736163746564207468652063616c6c207468726f7567682074686520736f7665726569676e206163636f756e7420696e20612064657374696e6174696f6e20636861696e2e405472616e7361637465645369676e65640c01246665655f7061796572000130543a3a4163636f756e74496400011064657374dd0101204c6f636174696f6e00011063616c6c34011c5665633c75383e00020411015472616e736163746564207468652063616c6c207468726f7567682061207369676e6564206163636f756e7420696e20612064657374696e6174696f6e20636861696e2e5052656769737465726564446572697661746976650801286163636f756e745f6964000130543a3a4163636f756e744964000114696e646578b4010c753136000304c0526567697374657265642061206465726976617469766520696e64657820666f7220616e206163636f756e742069642e5844655265676973746572656444657269766174697665040114696e646578b4010c753136000400385472616e736163744661696c65640401146572726f72e105012058636d4572726f720005043c5472616e73616374206661696c65644c5472616e73616374496e666f4368616e6765640801206c6f636174696f6edd0101204c6f636174696f6e00012c72656d6f74655f696e666fd508017c52656d6f74655472616e73616374496e666f576974684d61785765696768740006049c4368616e67656420746865207472616e7361637420696e666f206f662061206c6f636174696f6e4c5472616e73616374496e666f52656d6f7665640401206c6f636174696f6edd0101204c6f636174696f6e0007049c52656d6f76656420746865207472616e7361637420696e666f206f662061206c6f636174696f6e5c446573744665655065725365636f6e644368616e6765640801206c6f636174696f6edd0101204c6f636174696f6e0001386665655f7065725f7365636f6e64180110753132380008045c53657420646573742066656520706572207365636f6e645c446573744665655065725365636f6e6452656d6f7665640401206c6f636174696f6edd0101204c6f636174696f6e0009046852656d6f766520646573742066656520706572207365636f6e644848726d704d616e6167656d656e7453656e74040118616374696f6ebd06013448726d704f7065726174696f6e000a048c48524d50206d616e61676520616374696f6e2073756363657366756c6c792073656e74047c54686520604576656e746020656e756d206f6620746869732070616c6c6574d5080c5470616c6c65745f78636d5f7472616e736163746f721870616c6c65747c52656d6f74655472616e73616374496e666f576974684d617857656967687400000c01547472616e736163745f65787472615f7765696768742401185765696768740001286d61785f7765696768742401185765696768740001707472616e736163745f65787472615f7765696768745f7369676e6564b90601384f7074696f6e3c5765696768743e0000d9080c306f726d6c5f78746f6b656e73186d6f64756c65144576656e74040454000104445472616e7366657272656441737365747310011873656e646572000130543a3a4163636f756e7449640001186173736574732106011841737365747300010c66656529060114417373657400011064657374dd0101204c6f636174696f6e000004745472616e7366657272656420604173736574602077697468206665652e047c54686520604576656e746020656e756d206f6620746869732070616c6c6574dd080c5070616c6c65745f6d6573736167655f71756575651870616c6c6574144576656e740404540001104050726f63657373696e674661696c65640c010869643001104832353604945468652060626c616b65325f323536602068617368206f6620746865206d6573736167652e01186f726967696ecd0601484d6573736167654f726967696e4f663c543e0464546865207175657565206f6620746865206d6573736167652e01146572726f72e108014c50726f636573734d6573736167654572726f721060546865206572726f722074686174206f636375727265642e00490154686973206572726f7220697320707265747479206f70617175652e204d6f72652066696e652d677261696e6564206572726f7273206e65656420746f20626520656d6974746564206173206576656e74736862792074686520604d65737361676550726f636573736f72602e000455014d657373616765206469736361726465642064756520746f20616e206572726f7220696e2074686520604d65737361676550726f636573736f72602028757375616c6c79206120666f726d6174206572726f72292e2450726f63657373656410010869643001104832353604945468652060626c616b65325f323536602068617368206f6620746865206d6573736167652e01186f726967696ecd0601484d6573736167654f726967696e4f663c543e0464546865207175657565206f6620746865206d6573736167652e012c7765696768745f7573656424011857656967687404c0486f77206d7563682077656967687420776173207573656420746f2070726f6365737320746865206d6573736167652e011c73756363657373780110626f6f6c18885768657468657220746865206d657373616765207761732070726f6365737365642e0049014e6f74652074686174207468697320646f6573206e6f74206d65616e20746861742074686520756e6465726c79696e6720604d65737361676550726f636573736f72602077617320696e7465726e616c6c7935017375636365737366756c2e204974202a736f6c656c792a206d65616e73207468617420746865204d512070616c6c65742077696c6c2074726561742074686973206173206120737563636573734d01636f6e646974696f6e20616e64206469736361726420746865206d6573736167652e20416e7920696e7465726e616c206572726f72206e6565647320746f20626520656d6974746564206173206576656e74736862792074686520604d65737361676550726f636573736f72602e0104544d6573736167652069732070726f6365737365642e484f766572776569676874456e71756575656410010869640401205b75383b2033325d04945468652060626c616b65325f323536602068617368206f6620746865206d6573736167652e01186f726967696ecd0601484d6573736167654f726967696e4f663c543e0464546865207175657565206f6620746865206d6573736167652e0128706167655f696e64657810012450616765496e64657804605468652070616765206f6620746865206d6573736167652e01346d6573736167655f696e64657810011c543a3a53697a6504a454686520696e646578206f6620746865206d6573736167652077697468696e2074686520706167652e02048c4d65737361676520706c6163656420696e206f7665727765696768742071756575652e28506167655265617065640801186f726967696ecd0601484d6573736167654f726967696e4f663c543e0458546865207175657565206f662074686520706167652e0114696e64657810012450616765496e646578045854686520696e646578206f662074686520706167652e03045454686973207061676520776173207265617065642e047c54686520604576656e746020656e756d206f6620746869732070616c6c6574e10810346672616d655f737570706f727418747261697473206d657373616765734c50726f636573734d6573736167654572726f7200011424426164466f726d61740000001c436f72727570740001002c556e737570706f72746564000200284f7665727765696768740400240118576569676874000300145969656c6400040000e5080c2c6f726d6c5f746f6b656e73186d6f64756c65144576656e740404540001441c456e646f7765640c012c63757272656e63795f6964b9030134543a3a43757272656e6379496400010c77686f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e6365000004b8416e206163636f756e74207761732063726561746564207769746820736f6d6520667265652062616c616e63652e20447573744c6f73740c012c63757272656e63795f6964b9030134543a3a43757272656e6379496400010c77686f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e6365000108ec416e206163636f756e74207761732072656d6f7665642077686f73652062616c616e636520776173206e6f6e2d7a65726f206275742062656c6f77c84578697374656e7469616c4465706f7369742c20726573756c74696e6720696e20616e206f75747269676874206c6f73732e205472616e7366657210012c63757272656e63795f6964b9030134543a3a43757272656e6379496400011066726f6d000130543a3a4163636f756e744964000108746f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e63650002044c5472616e73666572207375636365656465642e2052657365727665640c012c63757272656e63795f6964b9030134543a3a43757272656e6379496400010c77686f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e6365000304e0536f6d652062616c616e63652077617320726573657276656420286d6f7665642066726f6d206672656520746f207265736572766564292e28556e72657365727665640c012c63757272656e63795f6964b9030134543a3a43757272656e6379496400010c77686f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e6365000404e8536f6d652062616c616e63652077617320756e726573657276656420286d6f7665642066726f6d20726573657276656420746f2066726565292e4852657365727665526570617472696174656414012c63757272656e63795f6964b9030134543a3a43757272656e6379496400011066726f6d000130543a3a4163636f756e744964000108746f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e636500011873746174757388013442616c616e6365537461747573000508f4536f6d652072657365727665642062616c616e63652077617320726570617472696174656420286d6f7665642066726f6d20726573657276656420746f44616e6f74686572206163636f756e74292e2842616c616e636553657410012c63757272656e63795f6964b9030134543a3a43757272656e6379496400010c77686f000130543a3a4163636f756e74496400011066726565180128543a3a42616c616e63650001207265736572766564180128543a3a42616c616e636500060468412062616c616e6365207761732073657420627920726f6f742e40546f74616c49737375616e636553657408012c63757272656e63795f6964b9030134543a3a43757272656e63794964000118616d6f756e74180128543a3a42616c616e6365000704b854686520746f74616c2069737375616e6365206f6620616e2063757272656e637920686173206265656e207365742457697468647261776e0c012c63757272656e63795f6964b9030134543a3a43757272656e6379496400010c77686f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e6365000804ec536f6d652062616c616e63657320776572652077697468647261776e2028652e672e2070617920666f72207472616e73616374696f6e20666565291c536c617368656410012c63757272656e63795f6964b9030134543a3a43757272656e6379496400010c77686f000130543a3a4163636f756e74496400012c667265655f616d6f756e74180128543a3a42616c616e636500013c72657365727665645f616d6f756e74180128543a3a42616c616e6365000904d4536f6d652062616c616e636573207765726520736c61736865642028652e672e2064756520746f206d69732d6265686176696f7229244465706f73697465640c012c63757272656e63795f6964b9030134543a3a43757272656e6379496400010c77686f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e6365000a04984465706f736974656420736f6d652062616c616e636520696e746f20616e206163636f756e741c4c6f636b53657410011c6c6f636b5f69647d0201384c6f636b4964656e74696669657200012c63757272656e63795f6964b9030134543a3a43757272656e6379496400010c77686f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e6365000b0454536f6d652066756e647320617265206c6f636b65642c4c6f636b52656d6f7665640c011c6c6f636b5f69647d0201384c6f636b4964656e74696669657200012c63757272656e63795f6964b9030134543a3a43757272656e6379496400010c77686f000130543a3a4163636f756e744964000c047c536f6d65206c6f636b65642066756e6473207765726520756e6c6f636b6564184c6f636b65640c012c63757272656e63795f6964b9030134543a3a43757272656e6379496400010c77686f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e6365000d0474536f6d6520667265652062616c616e636520776173206c6f636b65642e20556e6c6f636b65640c012c63757272656e63795f6964b9030134543a3a43757272656e6379496400010c77686f000130543a3a4163636f756e744964000118616d6f756e74180128543a3a42616c616e6365000e0478536f6d65206c6f636b65642062616c616e6365207761732066726565642e1849737375656408012c63757272656e63795f6964b9030134543a3a43757272656e63794964000118616d6f756e74180128543a3a42616c616e6365000f002452657363696e64656408012c63757272656e63795f6964b9030134543a3a43757272656e63794964000118616d6f756e74180128543a3a42616c616e6365001000047c54686520604576656e746020656e756d206f6620746869732070616c6c6574e9080c2c636861696e6272696467651870616c6c6574144576656e740404540001345c52656c617965725468726573686f6c644368616e676564040010010c753332000004a8566f7465207468726573686f6c6420686173206368616e67656420286e65775f7468726573686f6c642940436861696e57686974656c6973746564040008011c436861696e4964000104b0436861696e206e6f7720617661696c61626c6520666f72207472616e73666572732028636861696e5f6964293052656c6179657241646465640400000130543a3a4163636f756e7449640002045052656c6179657220616464656420746f207365743852656c6179657252656d6f7665640400000130543a3a4163636f756e7449640003046052656c617965722072656d6f7665642066726f6d207365744046756e6769626c655472616e73666572140008011c436861696e496400002c01304465706f7369744e6f6e636500000401285265736f75726365496400001d05011055323536000034011c5665633c75383e000404990146756e676c69626c655472616e7366657220697320666f722072656c6179696e672066756e6769626c65732028646573745f69642c206e6f6e63652c207265736f757263655f69642c20616d6f756e742c20726563697069656e742c206d65746164617461294c4e6f6e46756e6769626c655472616e73666572180008011c436861696e496400002c01304465706f7369744e6f6e636500000401285265736f757263654964000034011c5665633c75383e000034011c5665633c75383e000034011c5665633c75383e00050495014e6f6e46756e6769626c655472616e7366657220697320666f722072656c6179696e67204e4654532028646573745f69642c206e6f6e63652c207265736f757263655f69642c20746f6b656e5f69642c20726563697069656e742c206d65746164617461293c47656e657269635472616e73666572100008011c436861696e496400002c01304465706f7369744e6f6e636500000401285265736f757263654964000034011c5665633c75383e000604550147656e657269635472616e7366657220697320666f7220612067656e657269632064617461207061796c6f61642028646573745f69642c206e6f6e63652c207265736f757263655f69642c206d65746164617461291c566f7465466f720c0008011c436861696e496400002c01304465706f7369744e6f6e63650000000130543a3a4163636f756e74496400070490566f7465207375626d697474656420696e206661766f7572206f662070726f706f73616c2c566f7465416761696e73740c0008011c436861696e496400002c01304465706f7369744e6f6e63650000000130543a3a4163636f756e74496400080478566f74207375626d697474656420616761696e73742070726f706f73616c4050726f706f73616c417070726f766564080008011c436861696e496400002c01304465706f7369744e6f6e636500090480566f74696e67207375636365737366756c20666f7220612070726f706f73616c4050726f706f73616c52656a6563746564080008011c436861696e496400002c01304465706f7369744e6f6e6365000a0468566f74696e672072656a656374656420612070726f706f73616c4450726f706f73616c537563636565646564080008011c436861696e496400002c01304465706f7369744e6f6e6365000b046c457865637574696f6e206f662063616c6c207375636365656465643850726f706f73616c4661696c6564080008011c436861696e496400002c01304465706f7369744e6f6e6365000c0460457865637574696f6e206f662063616c6c206661696c6564047c54686520604576656e746020656e756d206f6620746869732070616c6c6574ed080c4c6f726d6c5f61737365745f7265676973747279186d6f64756c65144576656e740404540001083c52656769737465726564417373657408012061737365745f6964b9030128543a3a417373657449640001206d65746164617461d90601f041737365744d657461646174613c543a3a42616c616e63652c20543a3a437573746f6d4d657461646174612c20543a3a537472696e674c696d69743e0000003055706461746564417373657408012061737365745f6964b9030128543a3a417373657449640001206d65746164617461d90601f041737365744d657461646174613c543a3a42616c616e63652c20543a3a437573746f6d4d657461646174612c20543a3a537472696e674c696d69743e000100047c54686520604576656e746020656e756d206f6620746869732070616c6c6574f1080c206f726d6c5f78636d186d6f64756c65144576656e740404540001041053656e74080108746fdd0101204c6f636174696f6e00011c6d6573736167651506011c58636d3c28293e0000048458434d206d6573736167652073656e742e205c5b746f2c206d6573736167655c5d047c54686520604576656e746020656e756d206f6620746869732070616c6c6574f5080c2870616c6c65745f65766d1870616c6c6574144576656e740404540001140c4c6f6704010c6c6f67f908010c4c6f670000047c457468657265756d206576656e74732066726f6d20636f6e7472616374732e1c4372656174656404011c616464726573732102011048313630000104b44120636f6e747261637420686173206265656e206372656174656420617420676976656e20616464726573732e34437265617465644661696c656404011c61646472657373210201104831363000020405014120636f6e74726163742077617320617474656d7074656420746f20626520637265617465642c206275742074686520657865637574696f6e206661696c65642e20457865637574656404011c616464726573732102011048313630000304f84120636f6e747261637420686173206265656e206578656375746564207375636365737366756c6c79207769746820737461746573206170706c6965642e3845786563757465644661696c656404011c61646472657373210201104831363000040465014120636f6e747261637420686173206265656e2065786563757465642077697468206572726f72732e20537461746573206172652072657665727465642077697468206f6e6c79206761732066656573206170706c6965642e047c54686520604576656e746020656e756d206f6620746869732070616c6c6574f9080c20657468657265756d0c6c6f670c4c6f6700000c011c616464726573732102011048313630000118746f70696373290301245665633c483235363e0001106461746134011442797465730000fd080c3c70616c6c65745f626173655f6665651870616c6c6574144576656e7400010c404e65774261736546656550657247617304010c6665651d050110553235360000003c426173654665654f766572666c6f77000100344e6577456c6173746963697479040128656c61737469636974791907011c5065726d696c6c000200047c54686520604576656e746020656e756d206f6620746869732070616c6c657401090c3c70616c6c65745f657468657265756d1870616c6c6574144576656e7400010420457865637574656414011066726f6d2102011048313630000108746f21020110483136300001407472616e73616374696f6e5f686173683001104832353600012c657869745f726561736f6e0509012845786974526561736f6e00012865787472615f6461746134011c5665633c75383e000004c8416e20657468657265756d207472616e73616374696f6e20776173207375636365737366756c6c792065786563757465642e047c54686520604576656e746020656e756d206f6620746869732070616c6c657405090c2065766d5f636f7265146572726f722845786974526561736f6e0001101c5375636365656404000909012c4578697453756363656564000000144572726f7204000d090124457869744572726f720001001852657665727404001d0901284578697452657665727400020014466174616c04002109012445786974466174616c0003000009090c2065766d5f636f7265146572726f722c457869745375636365656400010c1c53746f707065640000002052657475726e6564000100205375696369646564000200000d090c2065766d5f636f7265146572726f7224457869744572726f7200014038537461636b556e646572666c6f7700000034537461636b4f766572666c6f770001002c496e76616c69644a756d7000020030496e76616c696452616e67650003004444657369676e61746564496e76616c69640004002c43616c6c546f6f446565700005003c437265617465436f6c6c6973696f6e0006004c437265617465436f6e74726163744c696d69740007002c496e76616c6964436f64650400110901184f70636f6465000f002c4f75744f664f6666736574000800204f75744f66476173000900244f75744f6646756e64000a002c5043556e646572666c6f77000b002c437265617465456d707479000c00144f74686572040015090144436f773c277374617469632c207374723e000d00204d61784e6f6e6365000e000011090c2065766d5f636f7265186f70636f6465184f70636f646500000400080108753800001509040c436f770404540119090004001909000000190900000502001d090c2065766d5f636f7265146572726f7228457869745265766572740001042052657665727465640000000021090c2065766d5f636f7265146572726f722445786974466174616c000110304e6f74537570706f7274656400000048556e68616e646c6564496e746572727570740001004043616c6c4572726f724173466174616c04000d090124457869744572726f72000200144f74686572040015090144436f773c277374617469632c207374723e0003000025090c646178656c61725f676174657761795f707265636f6d70696c651870616c6c6574144576656e74040454000108284761746577617953657404011c61646472657373210201104831363000000030436f6e76657274657253657408011c69645f6861736830011048323536000124636f6e7665727465724907013c536f75726365436f6e766572746572000100047c54686520604576656e746020656e756d206f6620746869732070616c6c657429090c2c70616c6c65745f7375646f1870616c6c6574144576656e7404045400011014537564696404012c7375646f5f726573756c74a401384469737061746368526573756c7404b454686520726573756c74206f66207468652063616c6c206d61646520627920746865207375646f20757365722e00047041207375646f2063616c6c206a75737420746f6f6b20706c6163652e284b65794368616e67656408010c6f6c64110101504f7074696f6e3c543a3a4163636f756e7449643e04b4546865206f6c64207375646f206b657920286966206f6e65207761732070726576696f75736c7920736574292e010c6e6577000130543a3a4163636f756e7449640488546865206e6577207375646f206b657920286966206f6e652077617320736574292e010478546865207375646f206b657920686173206265656e20757064617465642e284b657952656d6f76656400020480546865206b657920776173207065726d616e656e746c792072656d6f7665642e285375646f4173446f6e6504012c7375646f5f726573756c74a401384469737061746368526573756c7404b454686520726573756c74206f66207468652063616c6c206d61646520627920746865207375646f20757365722e0304c841205b7375646f5f61735d2850616c6c65743a3a7375646f5f6173292063616c6c206a75737420746f6f6b20706c6163652e047c54686520604576656e746020656e756d206f6620746869732070616c6c65742d090c4070616c6c65745f706f6f6c5f666565731870616c6c6574144576656e740404540001202050726f706f73656410011c706f6f6c5f69642c0124543a3a506f6f6c49640001186665655f69642c0120543a3a46656549640001186275636b657481040134506f6f6c4665654275636b657400010c66656585040140506f6f6c466565496e666f4f663c543e0000047041206e657720706f6f6c20666565207761732070726f706f7365642e14416464656410011c706f6f6c5f69642c0124543a3a506f6f6c49640001186275636b657481040134506f6f6c4665654275636b65740001186665655f69642c0120543a3a466565496400010c66656585040140506f6f6c466565496e666f4f663c543e000104d8412070726576696f75736c792070726f706f73656420616e6420617070726f76656420706f6f6c20666565207761732061646465642e1c52656d6f7665640c011c706f6f6c5f69642c0124543a3a506f6f6c49640001186275636b657481040134506f6f6c4665654275636b65740001186665655f69642c0120543a3a46656549640002045c4120706f6f6c20666565207761732072656d6f7665642e1c4368617267656410011c706f6f6c5f69642c0124543a3a506f6f6c49640001186665655f69642c0120543a3a4665654964000118616d6f756e74180128543a3a42616c616e636500011c70656e64696e67180128543a3a42616c616e63650003045c4120706f6f6c206665652077617320636861726765642e24556e6368617267656410011c706f6f6c5f69642c0124543a3a506f6f6c49640001186665655f69642c0120543a3a4665654964000118616d6f756e74180128543a3a42616c616e636500011c70656e64696e67180128543a3a42616c616e6365000404644120706f6f6c206665652077617320756e636861726765642e105061696410011c706f6f6c5f69642c0124543a3a506f6f6c49640001186665655f69642c0120543a3a4665654964000118616d6f756e74180128543a3a42616c616e636500012c64657374696e6174696f6e000130543a3a4163636f756e744964000504504120706f6f6c206665652077617320706169642e1c4163637275656410011c706f6f6c5f69642c0124543a3a506f6f6c49640001186665655f69642c0120543a3a466565496400011c70656e64696e67180128543a3a42616c616e636500013064697362757273656d656e74180128543a3a42616c616e6365000604604120666978656420706f6f6c20666565206163637275656464506f7274666f6c696f56616c756174696f6e557064617465640c011c706f6f6c5f69642c0124543a3a506f6f6c496400012476616c756174696f6e180128543a3a42616c616e636500012c7570646174655f74797065e9070170506f7274666f6c696f56616c756174696f6e55706461746554797065000704bc54686520706f7274666f6c696f2076616c756174696f6e20666f72206120706f6f6c2077617320757064617465642e047c54686520604576656e746020656e756d206f6620746869732070616c6c657431090c3870616c6c65745f72656d61726b731870616c6c6574144576656e740404540001041852656d61726b08011c72656d61726b73590701ac426f756e6465645665633c543a3a52656d61726b2c20543a3a4d617852656d61726b7350657243616c6c3e00011063616c6c250101683c5420617320436f6e6669673e3a3a52756e74696d6543616c6c00000448412072656d61726b20776173206d6164652e047c54686520604576656e746020656e756d206f6620746869732070616c6c657435090c4070616c6c65745f746f6b656e5f6d75781870616c6c6574144576656e7404045400010c244465706f736974656410010c77686f000130543a3a4163636f756e74496400013063757272656e63795f6f7574b9030134543a3a43757272656e6379496400012c63757272656e63795f696eb9030134543a3a43757272656e63794964000118616d6f756e74180134543a3a42616c616e63654f7574000000184275726e656410010c77686f000130543a3a4163636f756e74496400013063757272656e63795f6f7574b9030134543a3a43757272656e6379496400012c63757272656e63795f696eb9030134543a3a43757272656e63794964000118616d6f756e74180134543a3a42616c616e63654f75740001002c537761704d61746368656408010869642c0128543a3a4f726465724964000118616d6f756e74180134543a3a42616c616e63654f7574000200047c54686520604576656e746020656e756d206f6620746869732070616c6c6574390908306672616d655f73797374656d14506861736500010c384170706c7945787472696e736963040010010c7533320000003046696e616c697a6174696f6e00010038496e697469616c697a6174696f6e000200003d09000002c000410908306672616d655f73797374656d584c61737452756e74696d6555706772616465496e666f0000080130737065635f76657273696f6eb101014c636f6465633a3a436f6d706163743c7533323e000124737065635f6e616d651909016473705f72756e74696d653a3a52756e74696d65537472696e670000450908306672616d655f73797374656d60436f646555706772616465417574686f72697a6174696f6e0404540000080124636f64655f6861736830011c543a3a48617368000134636865636b5f76657273696f6e780110626f6f6c000049090c306672616d655f73797374656d186c696d69747330426c6f636b5765696768747300000c0128626173655f626c6f636b2401185765696768740001246d61785f626c6f636b2401185765696768740001247065725f636c6173734d0901845065724469737061746368436c6173733c57656967687473506572436c6173733e00004d090c346672616d655f737570706f7274206469737061746368405065724469737061746368436c617373040454015109000c01186e6f726d616c510901045400012c6f7065726174696f6e616c51090104540001246d616e6461746f72795109010454000051090c306672616d655f73797374656d186c696d6974733c57656967687473506572436c6173730000100138626173655f65787472696e7369632401185765696768740001346d61785f65787472696e736963b90601384f7074696f6e3c5765696768743e0001246d61785f746f74616cb90601384f7074696f6e3c5765696768743e0001207265736572766564b90601384f7074696f6e3c5765696768743e000055090c306672616d655f73797374656d186c696d6974732c426c6f636b4c656e677468000004010c6d6178590901545065724469737061746368436c6173733c7533323e000059090c346672616d655f737570706f7274206469737061746368405065724469737061746368436c6173730404540110000c01186e6f726d616c1001045400012c6f7065726174696f6e616c100104540001246d616e6461746f72791001045400005d09082873705f776569676874733c52756e74696d6544625765696768740000080110726561642c010c75363400011477726974652c010c75363400006109082873705f76657273696f6e3852756e74696d6556657273696f6e0000200124737065635f6e616d651909013452756e74696d65537472696e67000124696d706c5f6e616d651909013452756e74696d65537472696e67000144617574686f72696e675f76657273696f6e10010c753332000130737065635f76657273696f6e10010c753332000130696d706c5f76657273696f6e10010c753332000110617069736509011c4170697356656300014c7472616e73616374696f6e5f76657273696f6e10010c75333200013473746174655f76657273696f6e080108753800006509040c436f77040454016909000400690900000069090000026d09006d09000004087d02100071090c306672616d655f73797374656d1870616c6c6574144572726f720404540001203c496e76616c6964537065634e616d650000081101546865206e616d65206f662073706563696669636174696f6e20646f6573206e6f74206d61746368206265747765656e207468652063757272656e742072756e74696d6550616e6420746865206e65772072756e74696d652e685370656356657273696f6e4e65656473546f496e63726561736500010841015468652073706563696669636174696f6e2076657273696f6e206973206e6f7420616c6c6f77656420746f206465637265617365206265747765656e207468652063757272656e742072756e74696d6550616e6420746865206e65772072756e74696d652e744661696c6564546f4578747261637452756e74696d6556657273696f6e00020cec4661696c656420746f2065787472616374207468652072756e74696d652076657273696f6e2066726f6d20746865206e65772072756e74696d652e0009014569746865722063616c6c696e672060436f72655f76657273696f6e60206f72206465636f64696e67206052756e74696d6556657273696f6e60206661696c65642e4c4e6f6e44656661756c74436f6d706f73697465000304fc537569636964652063616c6c6564207768656e20746865206163636f756e7420686173206e6f6e2d64656661756c7420636f6d706f7369746520646174612e3c4e6f6e5a65726f526566436f756e74000404350154686572652069732061206e6f6e2d7a65726f207265666572656e636520636f756e742070726576656e74696e6720746865206163636f756e742066726f6d206265696e67207075726765642e3043616c6c46696c7465726564000504d0546865206f726967696e2066696c7465722070726576656e74207468652063616c6c20746f20626520646973706174636865642e444e6f7468696e67417574686f72697a6564000604584e6f207570677261646520617574686f72697a65642e30556e617574686f72697a656400070494546865207375626d697474656420636f6465206973206e6f7420617574686f72697a65642e046c4572726f7220666f72207468652053797374656d2070616c6c6574750900000279090079090c7c63756d756c75735f70616c6c65745f70617261636861696e5f73797374656d48756e696e636c756465645f7365676d656e7420416e636573746f720404480130000c0138757365645f62616e6477696474687d0901345573656442616e647769647468000138706172615f686561645f68617368490201244f7074696f6e3c483e000160636f6e73756d65645f676f5f61686561645f7369676e616c9109018c4f7074696f6e3c72656c61795f636861696e3a3a55706772616465476f41686561643e00007d090c7c63756d756c75735f70616c6c65745f70617261636861696e5f73797374656d48756e696e636c756465645f7365676d656e74345573656442616e64776964746800000c0134756d705f6d73675f636f756e7410010c75333200013c756d705f746f74616c5f627974657310010c75333200013468726d705f6f7574676f696e678109018c42547265654d61703c5061726149642c2048726d704368616e6e656c5570646174653e00008109042042547265654d617008044b015d010456018509000400890900000085090c7c63756d756c75735f70616c6c65745f70617261636861696e5f73797374656d48756e696e636c756465645f7365676d656e744448726d704368616e6e656c55706461746500000801246d73675f636f756e7410010c75333200012c746f74616c5f627974657310010c753332000089090000028d09008d09000004085d01850900910904184f7074696f6e0404540195090108104e6f6e6500000010536f6d6504009509000001000095090c4c706f6c6b61646f745f7072696d6974697665730876363855706772616465476f41686561640001081441626f72740000001c476f41686561640001000099090c7c63756d756c75735f70616c6c65745f70617261636861696e5f73797374656d48756e696e636c756465645f7365676d656e74385365676d656e74547261636b65720404480130000c0138757365645f62616e6477696474687d0901345573656442616e64776964746800013868726d705f77617465726d61726b450201804f7074696f6e3c72656c61795f636861696e3a3a426c6f636b4e756d6265723e000160636f6e73756d65645f676f5f61686561645f7369676e616c9109018c4f7074696f6e3c72656c61795f636861696e3a3a55706772616465476f41686561643e00009d0904184f7074696f6e04045401a1090108104e6f6e6500000010536f6d650400a1090000010000a1090c4c706f6c6b61646f745f7072696d69746976657308763648557067726164655265737472696374696f6e0001041c50726573656e7400000000a5090c7c63756d756c75735f70616c6c65745f70617261636861696e5f73797374656d5072656c61795f73746174655f736e617073686f74584d6573736167696e675374617465536e617073686f740000100130646d715f6d71635f6865616430014472656c61795f636861696e3a3a4861736800019c72656c61795f64697370617463685f71756575655f72656d61696e696e675f6361706163697479a909018c52656c61794469737061746368517565756552656d61696e696e674361706163697479000140696e67726573735f6368616e6e656c73ad0901885665633c285061726149642c20416272696467656448726d704368616e6e656c293e00013c6567726573735f6368616e6e656c73ad0901885665633c285061726149642c20416272696467656448726d704368616e6e656c293e0000a9090c7c63756d756c75735f70616c6c65745f70617261636861696e5f73797374656d5072656c61795f73746174655f736e617073686f748c52656c61794469737061746368517565756552656d61696e696e674361706163697479000008013c72656d61696e696e675f636f756e7410010c75333200013872656d61696e696e675f73697a6510010c7533320000ad09000002b10900b109000004085d01b50900b5090c4c706f6c6b61646f745f7072696d6974697665730876364c416272696467656448726d704368616e6e656c00001801306d61785f636170616369747910010c7533320001386d61785f746f74616c5f73697a6510010c7533320001406d61785f6d6573736167655f73697a6510010c7533320001246d73675f636f756e7410010c753332000128746f74616c5f73697a6510010c7533320001206d71635f68656164490201304f7074696f6e3c486173683e0000b9090c4c706f6c6b61646f745f7072696d697469766573087636644162726964676564486f7374436f6e66696775726174696f6e00002801346d61785f636f64655f73697a6510010c7533320001486d61785f686561645f646174615f73697a6510010c7533320001586d61785f7570776172645f71756575655f636f756e7410010c7533320001546d61785f7570776172645f71756575655f73697a6510010c75333200015c6d61785f7570776172645f6d6573736167655f73697a6510010c7533320001906d61785f7570776172645f6d6573736167655f6e756d5f7065725f63616e64696461746510010c75333200018868726d705f6d61785f6d6573736167655f6e756d5f7065725f63616e64696461746510010c75333200016c76616c69646174696f6e5f757067726164655f636f6f6c646f776e10012c426c6f636b4e756d62657200016076616c69646174696f6e5f757067726164655f64656c617910012c426c6f636b4e756d6265720001506173796e635f6261636b696e675f706172616d73bd0901484173796e634261636b696e67506172616d730000bd09104c706f6c6b61646f745f7072696d697469766573087636346173796e635f6261636b696e67484173796e634261636b696e67506172616d73000008014c6d61785f63616e6469646174655f646570746810010c753332000150616c6c6f7765645f616e6365737472795f6c656e10010c7533320000c109089463756d756c75735f7072696d6974697665735f70617261636861696e5f696e686572656e74444d6573736167655175657565436861696e0000040030012452656c6179486173680000c509042042547265654d617008044b015d01045601c109000400c909000000c909000002cd0900cd09000004085d01c10900d109000002d50900d5090860706f6c6b61646f745f636f72655f7072696d6974697665734c4f7574626f756e6448726d704d65737361676504084964015d0100080124726563697069656e745d01010849640001106461746134015073705f7374643a3a7665633a3a5665633c75383e0000d9090c3473705f61726974686d657469632c66697865645f706f696e742446697865645531323800000400180110753132380000dd090c7c63756d756c75735f70616c6c65745f70617261636861696e5f73797374656d1870616c6c6574144572726f720404540001204c4f7665726c617070696e6755706772616465730000041901417474656d707420746f20757067726164652076616c69646174696f6e2066756e6374696f6e207768696c65206578697374696e6720757067726164652070656e64696e672e5050726f686962697465644279506f6c6b61646f740001044d01506f6c6b61646f742063757272656e746c792070726f68696269747320746869732070617261636861696e2066726f6d20757067726164696e67206974732076616c69646174696f6e2066756e6374696f6e2e18546f6f426967000208450154686520737570706c6965642076616c69646174696f6e2066756e6374696f6e2068617320636f6d70696c656420696e746f206120626c6f62206c6172676572207468616e20506f6c6b61646f742069733c77696c6c696e6720746f2072756e2e6856616c69646174696f6e446174614e6f74417661696c61626c650003041d0154686520696e686572656e7420776869636820737570706c696573207468652076616c69646174696f6e206461746120646964206e6f742072756e207468697320626c6f636b2e74486f7374436f6e66696775726174696f6e4e6f74417661696c61626c65000404290154686520696e686572656e7420776869636820737570706c6965732074686520686f737420636f6e66696775726174696f6e20646964206e6f742072756e207468697320626c6f636b2e304e6f745363686564756c6564000504d84e6f2076616c69646174696f6e2066756e6374696f6e20757067726164652069732063757272656e746c79207363686564756c65642e444e6f7468696e67417574686f72697a6564000604904e6f20636f6465207570677261646520686173206265656e20617574686f72697a65642e30556e617574686f72697a6564000704bc54686520676976656e20636f6465207570677261646520686173206e6f74206265656e20617574686f72697a65642e048054686520604572726f726020656e756d206f6620746869732070616c6c65742ee1090c4c626f756e6465645f636f6c6c656374696f6e73407765616b5f626f756e6465645f766563385765616b426f756e64656456656308045401e509045300000400ed0901185665633c543e0000e5090c3c70616c6c65745f62616c616e6365731474797065732c42616c616e63654c6f636b041c42616c616e63650118000c010869647d0201384c6f636b4964656e746966696572000118616d6f756e7418011c42616c616e636500011c726561736f6e73e909011c526561736f6e730000e9090c3c70616c6c65745f62616c616e6365731474797065731c526561736f6e7300010c0c466565000000104d6973630001000c416c6c00020000ed09000002e50900f1090c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401f509045300000400f90901185665633c543e0000f5090c3c70616c6c65745f62616c616e6365731474797065732c52657365727665446174610844526573657276654964656e746966696572017d021c42616c616e636501180008010869647d020144526573657276654964656e746966696572000118616d6f756e7418011c42616c616e63650000f909000002f50900fd090c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401010a045300000400150a01185665633c543e0000010a0c3c70616c6c65745f62616c616e636573147479706573204964416d6f756e740808496401050a1c42616c616e63650118000801086964050a01084964000118616d6f756e7418011c42616c616e63650000050a084c646576656c6f706d656e745f72756e74696d654452756e74696d65486f6c64526561736f6e00010c20507265696d6167650400090a016c70616c6c65745f707265696d6167653a3a486f6c64526561736f6e00480018546f6b656e7304000d0a019070616c6c65745f726573747269637465645f746f6b656e733a3a486f6c64526561736f6e006300445472616e73666572416c6c6f774c6973740400110a019470616c6c65745f7472616e736665725f616c6c6f776c6973743a3a486f6c64526561736f6e00700000090a0c3c70616c6c65745f707265696d6167651870616c6c657428486f6c64526561736f6e00010420507265696d616765000000000d0a0c6070616c6c65745f726573747269637465645f746f6b656e731870616c6c657428486f6c64526561736f6e0001042c4e6174697665496e64657800000000110a0c6470616c6c65745f7472616e736665725f616c6c6f776c6973741870616c6c657428486f6c64526561736f6e000104445472616e73666572416c6c6f77616e636500000000150a000002010a00190a0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e646564566563080454011d0a045300000400210a01185665633c543e00001d0a0c3c70616c6c65745f62616c616e636573147479706573204964416d6f756e740808496401a81c42616c616e63650118000801086964a801084964000118616d6f756e7418011c42616c616e63650000210a0000021d0a00250a0c3c70616c6c65745f62616c616e6365731870616c6c6574144572726f720804540004490001303856657374696e6742616c616e63650000049c56657374696e672062616c616e636520746f6f206869676820746f2073656e642076616c75652e544c69717569646974795265737472696374696f6e73000104c84163636f756e74206c6971756964697479207265737472696374696f6e732070726576656e74207769746864726177616c2e4c496e73756666696369656e7442616c616e63650002047842616c616e636520746f6f206c6f7720746f2073656e642076616c75652e484578697374656e7469616c4465706f736974000304ec56616c756520746f6f206c6f7720746f20637265617465206163636f756e742064756520746f206578697374656e7469616c206465706f7369742e34457870656e646162696c697479000404905472616e736665722f7061796d656e7420776f756c64206b696c6c206163636f756e742e5c4578697374696e6756657374696e675363686564756c65000504cc412076657374696e67207363686564756c6520616c72656164792065786973747320666f722074686973206163636f756e742e2c446561644163636f756e740006048c42656e6566696369617279206163636f756e74206d757374207072652d65786973742e3c546f6f4d616e795265736572766573000704b84e756d626572206f66206e616d65642072657365727665732065786365656420604d61785265736572766573602e30546f6f4d616e79486f6c6473000804f84e756d626572206f6620686f6c647320657863656564206056617269616e74436f756e744f663c543a3a52756e74696d65486f6c64526561736f6e3e602e38546f6f4d616e79467265657a6573000904984e756d626572206f6620667265657a65732065786365656420604d6178467265657a6573602e4c49737375616e63654465616374697661746564000a0401015468652069737375616e63652063616e6e6f74206265206d6f6469666965642073696e636520697420697320616c72656164792064656163746976617465642e2444656c74615a65726f000b04645468652064656c74612063616e6e6f74206265207a65726f2e048054686520604572726f726020656e756d206f6620746869732070616c6c65742e290a086870616c6c65745f7472616e73616374696f6e5f7061796d656e742052656c6561736573000108245631416e6369656e74000000085632000100002d0a0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401000453000004009401185665633c543e0000310a0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401350a045300000400390a01185665633c543e0000350a0c6470616c6c65745f636f6c6c61746f725f73656c656374696f6e1870616c6c65743443616e646964617465496e666f08244163636f756e74496401001c42616c616e636501180008010c77686f0001244163636f756e74496400011c6465706f73697418011c42616c616e63650000390a000002350a003d0a0c6470616c6c65745f636f6c6c61746f725f73656c656374696f6e1870616c6c6574144572726f7204045400014444546f6f4d616e7943616e646964617465730000048c5468652070616c6c65742068617320746f6f206d616e792063616e646964617465732e5c546f6f466577456c696769626c65436f6c6c61746f7273000104ac4c656176696e6720776f756c6420726573756c7420696e20746f6f206665772063616e646964617465732e40416c726561647943616e6469646174650002047c4163636f756e7420697320616c726561647920612063616e6469646174652e304e6f7443616e6469646174650003046c4163636f756e74206973206e6f7420612063616e6469646174652e50546f6f4d616e79496e76756c6e657261626c65730004048454686572652061726520746f6f206d616e7920496e76756c6e657261626c65732e4c416c7265616479496e76756c6e657261626c650005048c4163636f756e7420697320616c726561647920616e20496e76756c6e657261626c652e3c4e6f74496e76756c6e657261626c650006047c4163636f756e74206973206e6f7420616e20496e76756c6e657261626c652e5c4e6f4173736f63696174656456616c696461746f7249640007049c4163636f756e7420686173206e6f206173736f6369617465642076616c696461746f722049442e5856616c696461746f724e6f74526567697374657265640008048c56616c696461746f72204944206973206e6f742079657420726567697374657265642e6c496e73657274546f43616e6469646174654c6973744661696c65640009049c436f756c64206e6f7420696e7365727420696e207468652063616e646964617465206c6973742e7452656d6f766546726f6d43616e6469646174654c6973744661696c6564000a04a4436f756c64206e6f742072656d6f76652066726f6d207468652063616e646964617465206c6973742e344465706f736974546f6f4c6f77000b04f44e6577206465706f73697420616d6f756e7420776f756c642062652062656c6f7720746865206d696e696d756d2063616e64696461637920626f6e642e6455706461746543616e6469646174654c6973744661696c6564000c0490436f756c64206e6f7420757064617465207468652063616e646964617465206c6973742e40496e73756666696369656e74426f6e64000d0429014465706f73697420616d6f756e7420697320746f6f206c6f7720746f2074616b652074686520746172676574277320736c6f7420696e207468652063616e646964617465206c6973742e5054617267657449734e6f7443616e646964617465000e042d0154686520746172676574206163636f756e7420746f206265207265706c6163656420696e207468652063616e646964617465206c697374206973206e6f7420612063616e6469646174652e404964656e746963616c4465706f736974000f040d015468652075706461746564206465706f73697420616d6f756e7420697320657175616c20746f2074686520616d6f756e7420616c72656164792072657365727665642e40496e76616c6964556e726573657276650010043d0143616e6e6f74206c6f7765722063616e64696461637920626f6e64207768696c65206f6363757079696e6720612066757475726520636f6c6c61746f7220736c6f7420696e20746865206c6973742e048054686520604572726f726020656e756d206f6620746869732070616c6c65742e410a000002450a00450a0000040800950100490a00000210004d0a00000408510a3400510a0c1c73705f636f72651863727970746f244b65795479706549640000040044011c5b75383b20345d0000550a0c3870616c6c65745f73657373696f6e1870616c6c6574144572726f7204045400011430496e76616c696450726f6f6600000460496e76616c6964206f776e6572736869702070726f6f662e5c4e6f4173736f63696174656456616c696461746f7249640001049c4e6f206173736f6369617465642076616c696461746f7220494420666f72206163636f756e742e344475706c6963617465644b65790002046452656769737465726564206475706c6963617465206b65792e184e6f4b657973000304a44e6f206b65797320617265206173736f63696174656420776974682074686973206163636f756e742e244e6f4163636f756e7400040419014b65792073657474696e67206163636f756e74206973206e6f74206c6976652c20736f206974277320696d706f737369626c6520746f206173736f6369617465206b6579732e04744572726f7220666f72207468652073657373696f6e2070616c6c65742e590a0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e6465645665630804540199010453000004005d0a01185665633c543e00005d0a000002990100610a084873705f636f6e73656e7375735f736c6f747310536c6f74000004002c010c7536340000650a00000408610a1000690a000004080004006d0a083c70616c6c65745f6d756c7469736967204d756c7469736967102c426c6f636b4e756d62657201101c42616c616e63650118244163636f756e7449640100304d6178417070726f76616c7300001001107768656ea0015854696d65706f696e743c426c6f636b4e756d6265723e00011c6465706f73697418011c42616c616e63650001246465706f7369746f720001244163636f756e744964000124617070726f76616c73710a018c426f756e6465645665633c4163636f756e7449642c204d6178417070726f76616c733e0000710a0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401000453000004009401185665633c543e0000750a0c3c70616c6c65745f6d756c74697369671870616c6c6574144572726f72040454000138404d696e696d756d5468726573686f6c640000047c5468726573686f6c64206d7573742062652032206f7220677265617465722e3c416c7265616479417070726f766564000104ac43616c6c20697320616c726561647920617070726f7665642062792074686973207369676e61746f72792e444e6f417070726f76616c734e65656465640002049c43616c6c20646f65736e2774206e65656420616e7920286d6f72652920617070726f76616c732e44546f6f4665775369676e61746f72696573000304a854686572652061726520746f6f20666577207369676e61746f7269657320696e20746865206c6973742e48546f6f4d616e795369676e61746f72696573000404ac54686572652061726520746f6f206d616e79207369676e61746f7269657320696e20746865206c6973742e545369676e61746f726965734f75744f664f726465720005040d01546865207369676e61746f7269657320776572652070726f7669646564206f7574206f66206f726465723b20746865792073686f756c64206265206f7264657265642e4c53656e646572496e5369676e61746f726965730006040d015468652073656e6465722077617320636f6e7461696e656420696e20746865206f74686572207369676e61746f726965733b2069742073686f756c646e27742062652e204e6f74466f756e64000704dc4d756c7469736967206f7065726174696f6e206e6f7420666f756e64207768656e20617474656d7074696e6720746f2063616e63656c2e204e6f744f776e65720008042d014f6e6c7920746865206163636f756e742074686174206f726967696e616c6c79206372656174656420746865206d756c74697369672069732061626c6520746f2063616e63656c2069742e2c4e6f54696d65706f696e740009041d014e6f2074696d65706f696e742077617320676976656e2c2079657420746865206d756c7469736967206f7065726174696f6e20697320616c726561647920756e6465727761792e3857726f6e6754696d65706f696e74000a042d014120646966666572656e742074696d65706f696e742077617320676976656e20746f20746865206d756c7469736967206f7065726174696f6e207468617420697320756e6465727761792e4c556e657870656374656454696d65706f696e74000b04f4412074696d65706f696e742077617320676976656e2c20796574206e6f206d756c7469736967206f7065726174696f6e20697320756e6465727761792e3c4d6178576569676874546f6f4c6f77000c04d0546865206d6178696d756d2077656967687420696e666f726d6174696f6e2070726f76696465642077617320746f6f206c6f772e34416c726561647953746f726564000d04a0546865206461746120746f2062652073746f72656420697320616c72656164792073746f7265642e048054686520604572726f726020656e756d206f6620746869732070616c6c65742e790a000004087d0a18007d0a0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401810a045300000400850a01185665633c543e0000810a083070616c6c65745f70726f78793c50726f7879446566696e6974696f6e0c244163636f756e74496401002450726f78795479706501b02c426c6f636b4e756d6265720110000c012064656c65676174650001244163636f756e74496400012870726f78795f74797065b0012450726f78795479706500011464656c617910012c426c6f636b4e756d6265720000850a000002810a00890a000004088d0a18008d0a0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401910a045300000400950a01185665633c543e0000910a083070616c6c65745f70726f787930416e6e6f756e63656d656e740c244163636f756e7449640100104861736801302c426c6f636b4e756d6265720110000c01107265616c0001244163636f756e74496400012463616c6c5f686173683001104861736800011868656967687410012c426c6f636b4e756d6265720000950a000002910a00990a0c3070616c6c65745f70726f78791870616c6c6574144572726f720404540001201c546f6f4d616e79000004210154686572652061726520746f6f206d616e792070726f786965732072656769737465726564206f7220746f6f206d616e7920616e6e6f756e63656d656e74732070656e64696e672e204e6f74466f756e640001047450726f787920726567697374726174696f6e206e6f7420666f756e642e204e6f7450726f7879000204cc53656e646572206973206e6f7420612070726f7879206f6620746865206163636f756e7420746f2062652070726f786965642e2c556e70726f787961626c650003042101412063616c6c20776869636820697320696e636f6d70617469626c652077697468207468652070726f7879207479706527732066696c7465722077617320617474656d707465642e244475706c69636174650004046c4163636f756e7420697320616c726561647920612070726f78792e304e6f5065726d697373696f6e000504150143616c6c206d6179206e6f74206265206d6164652062792070726f78792062656361757365206974206d617920657363616c617465206974732070726976696c656765732e2c556e616e6e6f756e636564000604d0416e6e6f756e63656d656e742c206966206d61646520617420616c6c2c20776173206d61646520746f6f20726563656e746c792e2c4e6f53656c6650726f78790007046443616e6e6f74206164642073656c662061732070726f78792e048054686520604572726f726020656e756d206f6620746869732070616c6c65742e9d0a0c3870616c6c65745f7574696c6974791870616c6c6574144572726f7204045400010430546f6f4d616e7943616c6c730000045c546f6f206d616e792063616c6c7320626174636865642e048054686520604572726f726020656e756d206f6620746869732070616c6c65742ea10a0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401a50a045300000400ad0a01185665633c543e0000a50a04184f7074696f6e04045401a90a0108104e6f6e6500000010536f6d650400a90a0000010000a90a084070616c6c65745f7363686564756c6572245363686564756c656414104e616d6501041043616c6c0121012c426c6f636b4e756d62657201103450616c6c6574734f726967696e01bd01244163636f756e7449640100001401206d617962655f69648001304f7074696f6e3c4e616d653e0001207072696f726974790801487363686564756c653a3a5072696f7269747900011063616c6c2101011043616c6c0001386d617962655f706572696f6469632d0201944f7074696f6e3c7363686564756c653a3a506572696f643c426c6f636b4e756d6265723e3e0001186f726967696ebd01013450616c6c6574734f726967696e0000ad0a000002a50a00b10a0c4070616c6c65745f7363686564756c65721870616c6c6574144572726f72040454000114404661696c6564546f5363686564756c65000004644661696c656420746f207363686564756c6520612063616c6c204e6f74466f756e640001047c43616e6e6f742066696e6420746865207363686564756c65642063616c6c2e5c546172676574426c6f636b4e756d626572496e50617374000204a4476976656e2074617267657420626c6f636b206e756d62657220697320696e2074686520706173742e4852657363686564756c654e6f4368616e6765000304f052657363686564756c65206661696c6564206265636175736520697420646f6573206e6f74206368616e6765207363686564756c65642074696d652e144e616d6564000404d0417474656d707420746f207573652061206e6f6e2d6e616d65642066756e6374696f6e206f6e2061206e616d6564207461736b2e048054686520604572726f726020656e756d206f6620746869732070616c6c65742eb50a0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e6465645665630804540130045300000400290301185665633c543e0000b90a084470616c6c65745f636f6c6c65637469766514566f74657308244163636f756e74496401002c426c6f636b4e756d626572011000140114696e64657810013450726f706f73616c496e6465780001247468726573686f6c6410012c4d656d626572436f756e74000110617965739401385665633c4163636f756e7449643e0001106e6179739401385665633c4163636f756e7449643e00010c656e6410012c426c6f636b4e756d6265720000bd0a0c4470616c6c65745f636f6c6c6563746976651870616c6c6574144572726f7208045400044900012c244e6f744d656d6265720000045c4163636f756e74206973206e6f742061206d656d626572444475706c696361746550726f706f73616c0001047c4475706c69636174652070726f706f73616c73206e6f7420616c6c6f7765643c50726f706f73616c4d697373696e670002044c50726f706f73616c206d7573742065786973742857726f6e67496e646578000304404d69736d61746368656420696e646578344475706c6963617465566f7465000404584475706c696361746520766f74652069676e6f72656448416c7265616479496e697469616c697a6564000504804d656d626572732061726520616c726561647920696e697469616c697a65642120546f6f4561726c79000604010154686520636c6f73652063616c6c20776173206d61646520746f6f206561726c792c206265666f72652074686520656e64206f662074686520766f74696e672e40546f6f4d616e7950726f706f73616c73000704fc54686572652063616e206f6e6c792062652061206d6178696d756d206f6620604d617850726f706f73616c7360206163746976652070726f706f73616c732e4c57726f6e6750726f706f73616c576569676874000804d054686520676976656e2077656967687420626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e4c57726f6e6750726f706f73616c4c656e677468000904d054686520676976656e206c656e67746820626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e545072696d654163636f756e744e6f744d656d626572000a04745072696d65206163636f756e74206973206e6f742061206d656d626572048054686520604572726f726020656e756d206f6620746869732070616c6c65742ec10a000002c50a00c50a086470616c6c65745f656c656374696f6e735f70687261676d656e2853656174486f6c64657208244163636f756e74496401001c42616c616e63650118000c010c77686f0001244163636f756e7449640001147374616b6518011c42616c616e636500011c6465706f73697418011c42616c616e63650000c90a086470616c6c65745f656c656374696f6e735f70687261676d656e14566f74657208244163636f756e74496401001c42616c616e63650118000c0114766f7465739401385665633c4163636f756e7449643e0001147374616b6518011c42616c616e636500011c6465706f73697418011c42616c616e63650000cd0a0c6470616c6c65745f656c656374696f6e735f70687261676d656e1870616c6c6574144572726f7204045400014430556e61626c65546f566f7465000004c043616e6e6f7420766f7465207768656e206e6f2063616e64696461746573206f72206d656d626572732065786973742e1c4e6f566f746573000104944d75737420766f746520666f72206174206c65617374206f6e652063616e6469646174652e30546f6f4d616e79566f7465730002048443616e6e6f7420766f7465206d6f7265207468616e2063616e646964617465732e504d6178696d756d566f74657345786365656465640003049843616e6e6f7420766f7465206d6f7265207468616e206d6178696d756d20616c6c6f7765642e284c6f7742616c616e6365000404c443616e6e6f7420766f74652077697468207374616b65206c657373207468616e206d696e696d756d2062616c616e63652e3c556e61626c65546f506179426f6e6400050478566f7465722063616e206e6f742070617920766f74696e6720626f6e642e2c4d7573744265566f746572000604404d757374206265206120766f7465722e4c4475706c69636174656443616e646964617465000704804475706c6963617465642063616e646964617465207375626d697373696f6e2e44546f6f4d616e7943616e6469646174657300080498546f6f206d616e792063616e646964617465732068617665206265656e20637265617465642e304d656d6265725375626d6974000904884d656d6265722063616e6e6f742072652d7375626d69742063616e6469646163792e3852756e6e657255705375626d6974000a048852756e6e65722063616e6e6f742072652d7375626d69742063616e6469646163792e68496e73756666696369656e7443616e64696461746546756e6473000b049443616e64696461746520646f6573206e6f74206861766520656e6f7567682066756e64732e244e6f744d656d626572000c04344e6f742061206d656d6265722e48496e76616c69645769746e65737344617461000d04e05468652070726f766964656420636f756e74206f66206e756d626572206f662063616e6469646174657320697320696e636f72726563742e40496e76616c6964566f7465436f756e74000e04cc5468652070726f766964656420636f756e74206f66206e756d626572206f6620766f74657320697320696e636f72726563742e44496e76616c696452656e6f756e63696e67000f04fc5468652072656e6f756e63696e67206f726967696e2070726573656e74656420612077726f6e67206052656e6f756e63696e676020706172616d657465722e48496e76616c69645265706c6163656d656e74001004fc50726564696374696f6e20726567617264696e67207265706c6163656d656e74206166746572206d656d6265722072656d6f76616c2069732077726f6e672e048054686520604572726f726020656e756d206f6620746869732070616c6c65742ed10a0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401d50a045300000400d90a01185665633c543e0000d50a0000040c1021010000d90a000002d50a00dd0a00000408e10a1800e10a0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401000453000004009401185665633c543e0000e50a0c4070616c6c65745f64656d6f6372616379147479706573385265666572656e64756d496e666f0c2c426c6f636b4e756d62657201102050726f706f73616c0121011c42616c616e6365011801081c4f6e676f696e670400e90a01c05265666572656e64756d5374617475733c426c6f636b4e756d6265722c2050726f706f73616c2c2042616c616e63653e0000002046696e6973686564080120617070726f766564780110626f6f6c00010c656e6410012c426c6f636b4e756d62657200010000e90a0c4070616c6c65745f64656d6f6372616379147479706573405265666572656e64756d5374617475730c2c426c6f636b4e756d62657201102050726f706f73616c0121011c42616c616e636501180014010c656e6410012c426c6f636b4e756d62657200012070726f706f73616c2101012050726f706f73616c0001247468726573686f6c64d80134566f74655468726573686f6c6400011464656c617910012c426c6f636b4e756d62657200011474616c6c79ed0a013854616c6c793c42616c616e63653e0000ed0a0c4070616c6c65745f64656d6f63726163791474797065731454616c6c79041c42616c616e63650118000c01106179657318011c42616c616e63650001106e61797318011c42616c616e636500011c7475726e6f757418011c42616c616e63650000f10a0c4070616c6c65745f64656d6f637261637910766f746518566f74696e67101c42616c616e63650118244163636f756e74496401002c426c6f636b4e756d6265720110204d6178566f746573000108184469726563740c0114766f746573f50a01f4426f756e6465645665633c285265666572656e64756d496e6465782c204163636f756e74566f74653c42616c616e63653e292c204d6178566f7465733e00012c64656c65676174696f6e73010b015044656c65676174696f6e733c42616c616e63653e0001147072696f72050b017c5072696f724c6f636b3c426c6f636b4e756d6265722c2042616c616e63653e0000002844656c65676174696e6714011c62616c616e636518011c42616c616e63650001187461726765740001244163636f756e744964000128636f6e76696374696f6e41020128436f6e76696374696f6e00012c64656c65676174696f6e73010b015044656c65676174696f6e733c42616c616e63653e0001147072696f72050b017c5072696f724c6f636b3c426c6f636b4e756d6265722c2042616c616e63653e00010000f50a0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401f90a045300000400fd0a01185665633c543e0000f90a0000040810dc00fd0a000002f90a00010b0c4070616c6c65745f64656d6f63726163791474797065732c44656c65676174696f6e73041c42616c616e6365011800080114766f74657318011c42616c616e636500011c6361706974616c18011c42616c616e63650000050b0c4070616c6c65745f64656d6f637261637910766f7465245072696f724c6f636b082c426c6f636b4e756d62657201101c42616c616e6365011800080010012c426c6f636b4e756d626572000018011c42616c616e63650000090b000004082101d8000d0b0000040810e10a00110b0c4070616c6c65745f64656d6f63726163791870616c6c6574144572726f720404540001602056616c75654c6f770000043456616c756520746f6f206c6f773c50726f706f73616c4d697373696e670001045c50726f706f73616c20646f6573206e6f742065786973743c416c726561647943616e63656c65640002049443616e6e6f742063616e63656c207468652073616d652070726f706f73616c207477696365444475706c696361746550726f706f73616c0003045450726f706f73616c20616c7265616479206d6164654c50726f706f73616c426c61636b6c69737465640004046850726f706f73616c207374696c6c20626c61636b6c6973746564444e6f7453696d706c654d616a6f72697479000504a84e6578742065787465726e616c2070726f706f73616c206e6f742073696d706c65206d616a6f726974792c496e76616c69644861736800060430496e76616c69642068617368284e6f50726f706f73616c000704504e6f2065787465726e616c2070726f706f73616c34416c72656164795665746f6564000804984964656e74697479206d6179206e6f74207665746f20612070726f706f73616c207477696365445265666572656e64756d496e76616c696400090484566f746520676976656e20666f7220696e76616c6964207265666572656e64756d2c4e6f6e6557616974696e67000a04504e6f2070726f706f73616c732077616974696e67204e6f74566f746572000b04c454686520676976656e206163636f756e7420646964206e6f7420766f7465206f6e20746865207265666572656e64756d2e304e6f5065726d697373696f6e000c04c8546865206163746f7220686173206e6f207065726d697373696f6e20746f20636f6e647563742074686520616374696f6e2e44416c726561647944656c65676174696e67000d0488546865206163636f756e7420697320616c72656164792064656c65676174696e672e44496e73756666696369656e7446756e6473000e04fc546f6f206869676820612062616c616e6365207761732070726f7669646564207468617420746865206163636f756e742063616e6e6f74206166666f72642e344e6f7444656c65676174696e67000f04a0546865206163636f756e74206973206e6f742063757272656e746c792064656c65676174696e672e28566f74657345786973740010085501546865206163636f756e742063757272656e746c792068617320766f74657320617474616368656420746f20697420616e6420746865206f7065726174696f6e2063616e6e6f74207375636365656420756e74696ce87468657365206172652072656d6f7665642c20656974686572207468726f7567682060756e766f746560206f722060726561705f766f7465602e44496e7374616e744e6f74416c6c6f776564001104d854686520696e7374616e74207265666572656e64756d206f726967696e2069732063757272656e746c7920646973616c6c6f7765642e204e6f6e73656e73650012049444656c65676174696f6e20746f206f6e6573656c66206d616b6573206e6f2073656e73652e3c57726f6e675570706572426f756e6400130450496e76616c696420757070657220626f756e642e3c4d6178566f74657352656163686564001404804d6178696d756d206e756d626572206f6620766f74657320726561636865642e1c546f6f4d616e79001504804d6178696d756d206e756d626572206f66206974656d7320726561636865642e3c566f74696e67506572696f644c6f7700160454566f74696e6720706572696f6420746f6f206c6f7740507265696d6167654e6f7445786973740017047054686520707265696d61676520646f6573206e6f742065786973742e048054686520604572726f726020656e756d206f6620746869732070616c6c65742e150b00000408190b290b00190b0c3c70616c6c65745f6964656e7469747914747970657330526567697374726174696f6e0c1c42616c616e63650118344d61784a756467656d656e747300304964656e74697479496e666f015102000c01286a756467656d656e74731d0b01fc426f756e6465645665633c28526567697374726172496e6465782c204a756467656d656e743c42616c616e63653e292c204d61784a756467656d656e74733e00011c6465706f73697418011c42616c616e6365000110696e666f510201304964656e74697479496e666f00001d0b0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401210b045300000400250b01185665633c543e0000210b0000040810e90200250b000002210b00290b04184f7074696f6e04045401ec0108104e6f6e6500000010536f6d650400ec00000100002d0b0000040818310b00310b0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401000453000004009401185665633c543e0000350b0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401390b045300000400410b01185665633c543e0000390b04184f7074696f6e040454013d0b0108104e6f6e6500000010536f6d6504003d0b00000100003d0b0c3c70616c6c65745f6964656e7469747914747970657334526567697374726172496e666f0c1c42616c616e63650118244163636f756e74496401001c49644669656c64012c000c011c6163636f756e740001244163636f756e74496400010c66656518011c42616c616e63650001186669656c64732c011c49644669656c640000410b000002390b00450b0c3c70616c6c65745f6964656e746974791474797065734c417574686f7269747950726f70657274696573041853756666697801490b00080118737566666978490b0118537566666978000128616c6c6f636174696f6e100128416c6c6f636174696f6e0000490b0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401080453000004003401185665633c543e00004d0b00000408001000510b0c3c70616c6c65745f6964656e746974791870616c6c6574144572726f7204045400016848546f6f4d616e795375624163636f756e74730000045c546f6f206d616e7920737562732d6163636f756e74732e204e6f74466f756e64000104504163636f756e742069736e277420666f756e642e204e6f744e616d6564000204504163636f756e742069736e2774206e616d65642e28456d707479496e64657800030430456d70747920696e6465782e284665654368616e6765640004043c466565206973206368616e6765642e284e6f4964656e74697479000504484e6f206964656e7469747920666f756e642e3c537469636b794a756467656d656e7400060444537469636b79206a756467656d656e742e384a756467656d656e74476976656e000704404a756467656d656e7420676976656e2e40496e76616c69644a756467656d656e7400080448496e76616c6964206a756467656d656e742e30496e76616c6964496e6465780009045454686520696e64657820697320696e76616c69642e34496e76616c6964546172676574000a04585468652074617267657420697320696e76616c69642e44546f6f4d616e7952656769737472617273000b04e84d6178696d756d20616d6f756e74206f66207265676973747261727320726561636865642e2043616e6e6f742061646420616e79206d6f72652e38416c7265616479436c61696d6564000c04704163636f756e7420494420697320616c7265616479206e616d65642e184e6f74537562000d047053656e646572206973206e6f742061207375622d6163636f756e742e204e6f744f776e6564000e04885375622d6163636f756e742069736e2774206f776e65642062792073656e6465722e744a756467656d656e74466f72446966666572656e744964656e74697479000f04d05468652070726f7669646564206a756467656d656e742077617320666f72206120646966666572656e74206964656e746974792e584a756467656d656e745061796d656e744661696c6564001004f84572726f722074686174206f6363757273207768656e20746865726520697320616e20697373756520706179696e6720666f72206a756467656d656e742e34496e76616c6964537566666978001104805468652070726f76696465642073756666697820697320746f6f206c6f6e672e504e6f74557365726e616d65417574686f72697479001204e05468652073656e64657220646f6573206e6f742068617665207065726d697373696f6e20746f206973737565206120757365726e616d652e304e6f416c6c6f636174696f6e001304c454686520617574686f726974792063616e6e6f7420616c6c6f6361746520616e79206d6f726520757365726e616d65732e40496e76616c69645369676e6174757265001404a8546865207369676e6174757265206f6e206120757365726e616d6520776173206e6f742076616c69642e4452657175697265735369676e6174757265001504090153657474696e67207468697320757365726e616d652072657175697265732061207369676e61747572652c20627574206e6f6e65207761732070726f76696465642e3c496e76616c6964557365726e616d65001604b054686520757365726e616d6520646f6573206e6f74206d6565742074686520726571756972656d656e74732e34557365726e616d6554616b656e0017047854686520757365726e616d6520697320616c72656164792074616b656e2e284e6f557365726e616d65001804985468652072657175657374656420757365726e616d6520646f6573206e6f742065786973742e284e6f74457870697265640019042d0154686520757365726e616d652063616e6e6f7420626520666f72636566756c6c792072656d6f76656420626563617573652069742063616e207374696c6c2062652061636365707465642e048054686520604572726f726020656e756d206f6620746869732070616c6c65742e550b0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e646564566563080454010d03045300000400590b01185665633c543e0000590b0000020d03005d0b083870616c6c65745f76657374696e672052656c656173657300010808563000000008563100010000610b0c3870616c6c65745f76657374696e671870616c6c6574144572726f72040454000114284e6f7456657374696e6700000484546865206163636f756e7420676976656e206973206e6f742076657374696e672e5441744d617856657374696e675363686564756c65730001082501546865206163636f756e7420616c72656164792068617320604d617856657374696e675363686564756c65736020636f756e74206f66207363686564756c657320616e642074687573510163616e6e6f742061646420616e6f74686572206f6e652e20436f6e7369646572206d657267696e67206578697374696e67207363686564756c657320696e206f7264657220746f2061646420616e6f746865722e24416d6f756e744c6f770002040501416d6f756e74206265696e67207472616e7366657272656420697320746f6f206c6f7720746f2063726561746520612076657374696e67207363686564756c652e605363686564756c65496e6465784f75744f66426f756e6473000304d0416e20696e64657820776173206f7574206f6620626f756e6473206f66207468652076657374696e67207363686564756c65732e54496e76616c69645363686564756c65506172616d730004040d014661696c656420746f206372656174652061206e6577207363686564756c65206265636175736520736f6d6520706172616d657465722077617320696e76616c69642e04744572726f7220666f72207468652076657374696e672070616c6c65742e650b083c70616c6c65745f74726561737572792050726f706f73616c08244163636f756e74496401001c42616c616e636501180010012070726f706f7365720001244163636f756e74496400011476616c756518011c42616c616e636500012c62656e65666963696172790001244163636f756e744964000110626f6e6418011c42616c616e63650000690b0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e6465645665630804540110045300000400490a01185665633c543e00006d0b083c70616c6c65745f74726561737572792c5370656e64537461747573142441737365744b696e6401a830417373657442616c616e636501182c42656e656669636961727901002c426c6f636b4e756d6265720110245061796d656e74496401a80018012861737365745f6b696e64a8012441737365744b696e64000118616d6f756e74180130417373657442616c616e636500012c62656e656669636961727900012c42656e656669636961727900012876616c69645f66726f6d10012c426c6f636b4e756d6265720001246578706972655f617410012c426c6f636b4e756d626572000118737461747573710b015c5061796d656e7453746174653c5061796d656e7449643e0000710b083c70616c6c65745f7472656173757279305061796d656e7453746174650408496401a8010c1c50656e64696e6700000024417474656d707465640401086964a801084964000100184661696c656400020000750b08346672616d655f737570706f72742050616c6c65744964000004007d02011c5b75383b20385d0000790b0c3c70616c6c65745f74726561737572791870616c6c6574144572726f7208045400044900013070496e73756666696369656e7450726f706f7365727342616c616e63650000047850726f706f73657227732062616c616e636520697320746f6f206c6f772e30496e76616c6964496e646578000104ac4e6f2070726f706f73616c2c20626f756e7479206f72207370656e64206174207468617420696e6465782e40546f6f4d616e79417070726f76616c7300020480546f6f206d616e7920617070726f76616c7320696e207468652071756575652e58496e73756666696369656e745065726d697373696f6e0003084501546865207370656e64206f726967696e2069732076616c6964206275742074686520616d6f756e7420697420697320616c6c6f77656420746f207370656e64206973206c6f776572207468616e207468654c616d6f756e7420746f206265207370656e742e4c50726f706f73616c4e6f74417070726f7665640004047c50726f706f73616c20686173206e6f74206265656e20617070726f7665642e584661696c6564546f436f6e7665727442616c616e636500050451015468652062616c616e6365206f6620746865206173736574206b696e64206973206e6f7420636f6e7665727469626c6520746f207468652062616c616e6365206f6620746865206e61746976652061737365742e305370656e6445787069726564000604b0546865207370656e6420686173206578706972656420616e642063616e6e6f7420626520636c61696d65642e2c4561726c795061796f7574000704a4546865207370656e64206973206e6f742079657420656c696769626c6520666f72207061796f75742e40416c7265616479417474656d707465640008049c546865207061796d656e742068617320616c7265616479206265656e20617474656d707465642e2c5061796f75744572726f72000904cc54686572652077617320736f6d65206973737565207769746820746865206d656368616e69736d206f66207061796d656e742e304e6f74417474656d70746564000a04a4546865207061796f757420776173206e6f742079657420617474656d707465642f636c61696d65642e30496e636f6e636c7573697665000b04c4546865207061796d656e7420686173206e656974686572206661696c6564206e6f7220737563636565646564207965742e04784572726f7220666f72207468652074726561737572792070616c6c65742e7d0b0c3870616c6c65745f756e697175657314747970657344436f6c6c656374696f6e44657461696c7308244163636f756e7449640100384465706f73697442616c616e63650118002801146f776e65720001244163636f756e7449640001186973737565720001244163636f756e74496400011461646d696e0001244163636f756e74496400011c667265657a65720001244163636f756e744964000134746f74616c5f6465706f7369741801384465706f73697442616c616e6365000130667265655f686f6c64696e67780110626f6f6c0001146974656d7310010c7533320001386974656d5f6d657461646174617310010c7533320001286174747269627574657310010c75333200012469735f66726f7a656e780110626f6f6c0000810b0000040c002cfc00850b00000408002c00890b0c3870616c6c65745f756e69717565731474797065732c4974656d44657461696c7308244163636f756e7449640100384465706f73697442616c616e63650118001001146f776e65720001244163636f756e744964000120617070726f766564110101444f7074696f6e3c4163636f756e7449643e00012469735f66726f7a656e780110626f6f6c00011c6465706f7369741801384465706f73697442616c616e636500008d0b0c3870616c6c65745f756e697175657314747970657348436f6c6c656374696f6e4d6574616461746108384465706f73697442616c616e636501182c537472696e674c696d697400000c011c6465706f7369741801384465706f73697442616c616e6365000110646174610101016c426f756e6465645665633c75382c20537472696e674c696d69743e00012469735f66726f7a656e780110626f6f6c0000910b0c3870616c6c65745f756e6971756573147479706573304974656d4d6574616461746108384465706f73697442616c616e636501182c537472696e674c696d697400000c011c6465706f7369741801384465706f73697442616c616e6365000110646174610101016c426f756e6465645665633c75382c20537472696e674c696d69743e00012469735f66726f7a656e780110626f6f6c0000950b0000040c2c0901010100990b00000408010118009d0b0000040818110100a10b0c3870616c6c65745f756e69717565731870616c6c6574144572726f72080454000449000148304e6f5065726d697373696f6e000004e8546865207369676e696e67206163636f756e7420686173206e6f207065726d697373696f6e20746f20646f20746865206f7065726174696f6e2e44556e6b6e6f776e436f6c6c656374696f6e0001047454686520676976656e206974656d20494420697320756e6b6e6f776e2e34416c7265616479457869737473000204b8546865206974656d2049442068617320616c7265616479206265656e207573656420666f7220616e206974656d2e2857726f6e674f776e6572000304e8546865206f776e6572207475726e6564206f757420746f20626520646966666572656e7420746f2077686174207761732065787065637465642e284261645769746e6573730004046c496e76616c6964207769746e657373206461746120676976656e2e14496e55736500050474546865206974656d20494420697320616c72656164792074616b656e2e1846726f7a656e00060484546865206974656d206f7220636f6c6c656374696f6e2069732066726f7a656e2e3457726f6e6744656c6567617465000704f45468652064656c6567617465207475726e6564206f757420746f20626520646966666572656e7420746f2077686174207761732065787065637465642e284e6f44656c6567617465000804785468657265206973206e6f2064656c656761746520617070726f7665642e28556e617070726f766564000904c44e6f20617070726f76616c20657869737473207468617420776f756c6420616c6c6f7720746865207472616e736665722e28556e6163636570746564000a042501546865206e616d6564206f776e657220686173206e6f74207369676e6564206f776e657273686970206f662074686520636f6c6c656374696f6e2069732061636365707461626c652e184c6f636b6564000b044c546865206974656d206973206c6f636b65642e404d6178537570706c7952656163686564000c046c416c6c206974656d732068617665206265656e206d696e7465642e4c4d6178537570706c79416c7265616479536574000d0490546865206d617820737570706c792068617320616c7265616479206265656e207365742e444d6178537570706c79546f6f536d616c6c000e0441015468652070726f7669646564206d617820737570706c79206973206c65737320746f2074686520616d6f756e74206f66206974656d73206120636f6c6c656374696f6e20616c7265616479206861732e2c556e6b6e6f776e4974656d000f047454686520676976656e206974656d20494420697320756e6b6e6f776e2e284e6f74466f7253616c65001004544974656d206973206e6f7420666f722073616c652e24426964546f6f4c6f77001104705468652070726f76696465642062696420697320746f6f206c6f772e048054686520604572726f726020656e756d206f6620746869732070616c6c65742ea50b083c70616c6c65745f707265696d616765404f6c645265717565737453746174757308244163636f756e74496401001c42616c616e6365011801082c556e72657175657374656408011c6465706f736974d00150284163636f756e7449642c2042616c616e63652900010c6c656e10010c753332000000245265717565737465640c011c6465706f736974a90b01704f7074696f6e3c284163636f756e7449642c2042616c616e6365293e000114636f756e7410010c75333200010c6c656e4502012c4f7074696f6e3c7533323e00010000a90b04184f7074696f6e04045401d00108104e6f6e6500000010536f6d650400d00000010000ad0b083c70616c6c65745f707265696d616765345265717565737453746174757308244163636f756e7449640100185469636b657401b10b01082c556e7265717565737465640801187469636b6574b50b014c284163636f756e7449642c205469636b65742900010c6c656e10010c753332000000245265717565737465640c01306d617962655f7469636b6574b90b016c4f7074696f6e3c284163636f756e7449642c205469636b6574293e000114636f756e7410010c7533320001246d617962655f6c656e4502012c4f7074696f6e3c7533323e00010000b10b14346672616d655f737570706f72741874726169747318746f6b656e732066756e6769626c6544486f6c64436f6e73696465726174696f6e10044100044600045200044400000400180128463a3a42616c616e63650000b50b0000040800b10b00b90b04184f7074696f6e04045401b50b0108104e6f6e6500000010536f6d650400b50b0000010000bd0b00000408301000c10b0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401080453000004003401185665633c543e0000c50b0c3c70616c6c65745f707265696d6167651870616c6c6574144572726f7204045400012018546f6f426967000004a0507265696d61676520697320746f6f206c6172676520746f2073746f7265206f6e2d636861696e2e30416c72656164794e6f746564000104a4507265696d6167652068617320616c7265616479206265656e206e6f746564206f6e2d636861696e2e344e6f74417574686f72697a6564000204c85468652075736572206973206e6f7420617574686f72697a656420746f20706572666f726d207468697320616374696f6e2e204e6f744e6f746564000304fc54686520707265696d6167652063616e6e6f742062652072656d6f7665642073696e636520697420686173206e6f7420796574206265656e206e6f7465642e2452657175657374656400040409014120707265696d616765206d6179206e6f742062652072656d6f766564207768656e20746865726520617265206f75747374616e64696e672072657175657374732e304e6f745265717565737465640005042d0154686520707265696d61676520726571756573742063616e6e6f742062652072656d6f7665642073696e6365206e6f206f75747374616e64696e672072657175657374732065786973742e1c546f6f4d616e7900060455014d6f7265207468616e20604d41585f484153485f555047524144455f42554c4b5f434f554e54602068617368657320776572652072657175657374656420746f206265207570677261646564206174206f6e63652e18546f6f466577000704e4546f6f206665772068617368657320776572652072657175657374656420746f2062652075706772616465642028692e652e207a65726f292e048054686520604572726f726020656e756d206f6620746869732070616c6c65742ec90b0000040800b400cd0b0c6070616c6c65745f636f6e76696374696f6e5f766f74696e6710766f746518566f74696e67141c42616c616e63650118244163636f756e74496401002c426c6f636b4e756d626572011024506f6c6c496e6465780110204d6178566f7465730001081c43617374696e670400d10b01c843617374696e673c42616c616e63652c20426c6f636b4e756d6265722c20506f6c6c496e6465782c204d6178566f7465733e0000002844656c65676174696e670400e90b01ac44656c65676174696e673c42616c616e63652c204163636f756e7449642c20426c6f636b4e756d6265723e00010000d10b0c6070616c6c65745f636f6e76696374696f6e5f766f74696e6710766f74651c43617374696e67101c42616c616e636501182c426c6f636b4e756d626572011024506f6c6c496e6465780110204d6178566f74657300000c0114766f746573d50b01dc426f756e6465645665633c28506f6c6c496e6465782c204163636f756e74566f74653c42616c616e63653e292c204d6178566f7465733e00012c64656c65676174696f6e73e10b015044656c65676174696f6e733c42616c616e63653e0001147072696f72e50b017c5072696f724c6f636b3c426c6f636b4e756d6265722c2042616c616e63653e0000d50b0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401d90b045300000400dd0b01185665633c543e0000d90b0000040810310300dd0b000002d90b00e10b0c6070616c6c65745f636f6e76696374696f6e5f766f74696e671474797065732c44656c65676174696f6e73041c42616c616e6365011800080114766f74657318011c42616c616e636500011c6361706974616c18011c42616c616e63650000e50b0c6070616c6c65745f636f6e76696374696f6e5f766f74696e6710766f7465245072696f724c6f636b082c426c6f636b4e756d62657201101c42616c616e6365011800080010012c426c6f636b4e756d626572000018011c42616c616e63650000e90b0c6070616c6c65745f636f6e76696374696f6e5f766f74696e6710766f74652844656c65676174696e670c1c42616c616e63650118244163636f756e74496401002c426c6f636b4e756d62657201100014011c62616c616e636518011c42616c616e63650001187461726765740001244163636f756e744964000128636f6e76696374696f6e39030128436f6e76696374696f6e00012c64656c65676174696f6e73e10b015044656c65676174696f6e733c42616c616e63653e0001147072696f72e50b017c5072696f724c6f636b3c426c6f636b4e756d6265722c2042616c616e63653e0000ed0b0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401f10b045300000400f50b01185665633c543e0000f10b00000408b41800f50b000002f10b00f90b0c6070616c6c65745f636f6e76696374696f6e5f766f74696e671870616c6c6574144572726f72080454000449000130284e6f744f6e676f696e6700000450506f6c6c206973206e6f74206f6e676f696e672e204e6f74566f746572000104ac54686520676976656e206163636f756e7420646964206e6f7420766f7465206f6e2074686520706f6c6c2e304e6f5065726d697373696f6e000204c8546865206163746f7220686173206e6f207065726d697373696f6e20746f20636f6e647563742074686520616374696f6e2e3c4e6f5065726d697373696f6e5965740003045901546865206163746f7220686173206e6f207065726d697373696f6e20746f20636f6e647563742074686520616374696f6e207269676874206e6f77206275742077696c6c20646f20696e20746865206675747572652e44416c726561647944656c65676174696e6700040488546865206163636f756e7420697320616c72656164792064656c65676174696e672e34416c7265616479566f74696e670005085501546865206163636f756e742063757272656e746c792068617320766f74657320617474616368656420746f20697420616e6420746865206f7065726174696f6e2063616e6e6f74207375636365656420756e74696ce87468657365206172652072656d6f7665642c20656974686572207468726f7567682060756e766f746560206f722060726561705f766f7465602e44496e73756666696369656e7446756e6473000604fc546f6f206869676820612062616c616e6365207761732070726f7669646564207468617420746865206163636f756e742063616e6e6f74206166666f72642e344e6f7444656c65676174696e67000704a0546865206163636f756e74206973206e6f742063757272656e746c792064656c65676174696e672e204e6f6e73656e73650008049444656c65676174696f6e20746f206f6e6573656c66206d616b6573206e6f2073656e73652e3c4d6178566f74657352656163686564000904804d6178696d756d206e756d626572206f6620766f74657320726561636865642e2c436c6173734e6565646564000a04390154686520636c617373206d75737420626520737570706c6965642073696e6365206974206973206e6f7420656173696c792064657465726d696e61626c652066726f6d207468652073746174652e20426164436c617373000b048454686520636c61737320494420737570706c69656420697320696e76616c69642e048054686520604572726f726020656e756d206f6620746869732070616c6c65742efd0b0c4070616c6c65745f7265666572656e6461147479706573385265666572656e64756d496e666f201c547261636b496401b43452756e74696d654f726967696e01bd01184d6f6d656e7401101043616c6c0121011c42616c616e636501181454616c6c79017907244163636f756e74496401003c5363686564756c654164647265737301c001181c4f6e676f696e670400010c018d015265666572656e64756d5374617475733c547261636b49642c2052756e74696d654f726967696e2c204d6f6d656e742c2043616c6c2c2042616c616e63652c2054616c6c792c0a4163636f756e7449642c205363686564756c65416464726573732c3e00000020417070726f7665640c001001184d6f6d656e740000090c018c4f7074696f6e3c4465706f7369743c4163636f756e7449642c2042616c616e63653e3e0000090c018c4f7074696f6e3c4465706f7369743c4163636f756e7449642c2042616c616e63653e3e0001002052656a65637465640c001001184d6f6d656e740000090c018c4f7074696f6e3c4465706f7369743c4163636f756e7449642c2042616c616e63653e3e0000090c018c4f7074696f6e3c4465706f7369743c4163636f756e7449642c2042616c616e63653e3e0002002443616e63656c6c65640c001001184d6f6d656e740000090c018c4f7074696f6e3c4465706f7369743c4163636f756e7449642c2042616c616e63653e3e0000090c018c4f7074696f6e3c4465706f7369743c4163636f756e7449642c2042616c616e63653e3e0003002054696d65644f75740c001001184d6f6d656e740000090c018c4f7074696f6e3c4465706f7369743c4163636f756e7449642c2042616c616e63653e3e0000090c018c4f7074696f6e3c4465706f7369743c4163636f756e7449642c2042616c616e63653e3e000400184b696c6c656404001001184d6f6d656e7400050000010c0c4070616c6c65745f7265666572656e6461147479706573405265666572656e64756d537461747573201c547261636b496401b43452756e74696d654f726967696e01bd01184d6f6d656e7401101043616c6c0121011c42616c616e636501181454616c6c79017907244163636f756e74496401003c5363686564756c654164647265737301c0002c0114747261636bb4011c547261636b49640001186f726967696ebd01013452756e74696d654f726967696e00012070726f706f73616c2101011043616c6c000124656e6163746d656e7445030150446973706174636854696d653c4d6f6d656e743e0001247375626d69747465641001184d6f6d656e740001487375626d697373696f6e5f6465706f736974050c016c4465706f7369743c4163636f756e7449642c2042616c616e63653e0001406465636973696f6e5f6465706f736974090c018c4f7074696f6e3c4465706f7369743c4163636f756e7449642c2042616c616e63653e3e0001206465636964696e670d0c01784f7074696f6e3c4465636964696e675374617475733c4d6f6d656e743e3e00011474616c6c797907011454616c6c79000120696e5f7175657565780110626f6f6c000114616c61726d150c01844f7074696f6e3c284d6f6d656e742c205363686564756c6541646472657373293e0000050c0c4070616c6c65745f7265666572656e64611474797065731c4465706f73697408244163636f756e74496401001c42616c616e636501180008010c77686f0001244163636f756e744964000118616d6f756e7418011c42616c616e63650000090c04184f7074696f6e04045401050c0108104e6f6e6500000010536f6d650400050c00000100000d0c04184f7074696f6e04045401110c0108104e6f6e6500000010536f6d650400110c0000010000110c0c4070616c6c65745f7265666572656e6461147479706573384465636964696e67537461747573042c426c6f636b4e756d62657201100008011473696e636510012c426c6f636b4e756d626572000128636f6e6669726d696e674502014c4f7074696f6e3c426c6f636b4e756d6265723e0000150c04184f7074696f6e04045401190c0108104e6f6e6500000010536f6d650400190c0000010000190c0000040810c0001d0c0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401210c045300000400250c01185665633c543e0000210c00000408101800250c000002210c00290c0000022d0c002d0c00000408b4310c00310c0c4070616c6c65745f7265666572656e646114747970657324547261636b496e666f081c42616c616e63650118184d6f6d656e740110002401106e616d65190901302627737461746963207374720001306d61785f6465636964696e6710010c7533320001406465636973696f6e5f6465706f73697418011c42616c616e6365000138707265706172655f706572696f641001184d6f6d656e7400013c6465636973696f6e5f706572696f641001184d6f6d656e74000138636f6e6669726d5f706572696f641001184d6f6d656e740001506d696e5f656e6163746d656e745f706572696f641001184d6f6d656e740001306d696e5f617070726f76616c350c0114437572766500012c6d696e5f737570706f7274350c011443757276650000350c0c4070616c6c65745f7265666572656e646114747970657314437572766500010c404c696e65617244656372656173696e670c01186c656e677468390c011c50657262696c6c000114666c6f6f72390c011c50657262696c6c0001106365696c390c011c50657262696c6c000000445374657070656444656372656173696e67100114626567696e390c011c50657262696c6c00010c656e64390c011c50657262696c6c00011073746570390c011c50657262696c6c000118706572696f64390c011c50657262696c6c000100285265636970726f63616c0c0118666163746f723d0c01204669786564493634000120785f6f66667365743d0c01204669786564493634000120795f6f66667365743d0c0120466978656449363400020000390c0c3473705f61726974686d65746963287065725f7468696e67731c50657262696c6c0000040010010c75333200003d0c0c3473705f61726974686d657469632c66697865645f706f696e7420466978656449363400000400410c010c6936340000410c0000050c00450c0c4070616c6c65745f7265666572656e64611870616c6c6574144572726f72080454000449000134284e6f744f6e676f696e67000004685265666572656e64756d206973206e6f74206f6e676f696e672e284861734465706f736974000104b85265666572656e64756d2773206465636973696f6e206465706f73697420697320616c726561647920706169642e20426164547261636b0002049c54686520747261636b206964656e74696669657220676976656e2077617320696e76616c69642e1046756c6c000304310154686572652061726520616c726561647920612066756c6c20636f6d706c656d656e74206f66207265666572656e646120696e2070726f677265737320666f72207468697320747261636b2e285175657565456d70747900040480546865207175657565206f662074686520747261636b20697320656d7074792e344261645265666572656e64756d000504e4546865207265666572656e64756d20696e6465782070726f766964656420697320696e76616c696420696e207468697320636f6e746578742e2c4e6f7468696e67546f446f000604ac546865726520776173206e6f7468696e6720746f20646f20696e2074686520616476616e63656d656e742e1c4e6f547261636b000704a04e6f20747261636b2065786973747320666f72207468652070726f706f73616c206f726967696e2e28556e66696e69736865640008040101416e79206465706f7369742063616e6e6f7420626520726566756e64656420756e74696c20616674657220746865206465636973696f6e206973206f7665722e304e6f5065726d697373696f6e000904a8546865206465706f73697420726566756e646572206973206e6f7420746865206465706f7369746f722e244e6f4465706f736974000a04cc546865206465706f7369742063616e6e6f7420626520726566756e6465642073696e6365206e6f6e6520776173206d6164652e24426164537461747573000b04d0546865207265666572656e64756d2073746174757320697320696e76616c696420666f722074686973206f7065726174696f6e2e40507265696d6167654e6f744578697374000c047054686520707265696d61676520646f6573206e6f742065786973742e048054686520604572726f726020656e756d206f6620746869732070616c6c65742e490c0c4070616c6c65745f77686974656c6973741870616c6c6574144572726f720404540001144c556e617661696c61626c65507265496d616765000004c854686520707265696d616765206f66207468652063616c6c206861736820636f756c64206e6f74206265206c6f616465642e3c556e6465636f6461626c6543616c6c000104785468652063616c6c20636f756c64206e6f74206265206465636f6465642e60496e76616c696443616c6c5765696768745769746e657373000204ec54686520776569676874206f6620746865206465636f6465642063616c6c2077617320686967686572207468616e20746865207769746e6573732e5043616c6c49734e6f7457686974656c6973746564000304745468652063616c6c20776173206e6f742077686974656c69737465642e5843616c6c416c726561647957686974656c6973746564000404a05468652063616c6c2077617320616c72656164792077686974656c69737465643b204e6f2d4f702e048054686520604572726f726020656e756d206f6620746869732070616c6c65742e4d0c0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e6465645665630804540130045300000400290301185665633c543e0000510c0c4470616c6c65745f636f6c6c6563746976651870616c6c6574144572726f7208045400044900012c244e6f744d656d6265720000045c4163636f756e74206973206e6f742061206d656d626572444475706c696361746550726f706f73616c0001047c4475706c69636174652070726f706f73616c73206e6f7420616c6c6f7765643c50726f706f73616c4d697373696e670002044c50726f706f73616c206d7573742065786973742857726f6e67496e646578000304404d69736d61746368656420696e646578344475706c6963617465566f7465000404584475706c696361746520766f74652069676e6f72656448416c7265616479496e697469616c697a6564000504804d656d626572732061726520616c726561647920696e697469616c697a65642120546f6f4561726c79000604010154686520636c6f73652063616c6c20776173206d61646520746f6f206561726c792c206265666f72652074686520656e64206f662074686520766f74696e672e40546f6f4d616e7950726f706f73616c73000704fc54686572652063616e206f6e6c792062652061206d6178696d756d206f6620604d617850726f706f73616c7360206163746976652070726f706f73616c732e4c57726f6e6750726f706f73616c576569676874000804d054686520676976656e2077656967687420626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e4c57726f6e6750726f706f73616c4c656e677468000904d054686520676976656e206c656e67746820626f756e6420666f72207468652070726f706f73616c2077617320746f6f206c6f772e545072696d654163636f756e744e6f744d656d626572000a04745072696d65206163636f756e74206973206e6f742061206d656d626572048054686520604572726f726020656e756d206f6620746869732070616c6c65742e550c0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401000453000004009401185665633c543e0000590c0c4470616c6c65745f6d656d626572736869701870616c6c6574144572726f7208045400044900010c34416c72656164794d656d62657200000444416c72656164792061206d656d6265722e244e6f744d656d626572000104344e6f742061206d656d6265722e38546f6f4d616e794d656d6265727300020444546f6f206d616e79206d656d626572732e048054686520604572726f726020656e756d206f6620746869732070616c6c65742e5d0c083870616c6c65745f616e63686f727334507265436f6d6d6974446174611010486173680130244163636f756e74496401002c426c6f636b4e756d62657201101c42616c616e63650118001001307369676e696e675f726f6f74300110486173680001206964656e746974790001244163636f756e74496400014065787069726174696f6e5f626c6f636b10012c426c6f636b4e756d62657200011c6465706f73697418011c42616c616e63650000610c0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401080453000004003401185665633c543e0000650c0c3870616c6c65745f616e63686f72731870616c6c6574144572726f720404540001204c416e63686f72416c726561647945786973747300000490416e63686f72207769746820616e63686f725f696420616c72656164792065786973747354416e63686f7253746f726544617465496e50617374000104a8416e63686f722073746f72652064617465206d75737420626520696e206e6f77206f722066757475726570416e63686f7253746f72654461746541626f76654d61784c696d6974000204d8416e63686f722073746f72652064617465206d757374206e6f74206265206d6f7265207468616e206d61782073746f7265206461746558507265436f6d6d6974416c7265616479457869737473000304645072652d636f6d6d697420616c7265616479206578697374734c4e6f744f776e65724f66507265436f6d6d69740004049453656e646572206973206e6f7420746865206f776e6572206f662070726520636f6d6d697454496e76616c6964507265436f6d6d697450726f6f6600050460496e76616c69642070726520636f6d6d69742070726f6f66484576696374696f6e44617465546f6f426967000604904576696374696f6e206461746520746f6f2062696720666f7220636f6e76657273696f6e684661696c6564546f436f6e7665727445706f6368546f44617973000704944661696c656420746f20636f6e766572742065706f636820696e204d5320746f2064617973048054686520604572726f726020656e756d206f6620746869732070616c6c65742e690c0c4870616c6c65745f706f6f6c5f73797374656d28706f6f6c5f74797065732c506f6f6c44657461696c73242843757272656e6379496401b9033c5472616e63686543757272656e63790149041c45706f6368496401101c42616c616e63650118105261746501950318576569676874016d0c245472616e6368654964019d0218506f6f6c4964012c2c4d61785472616e636865730199040018012063757272656e6379b903012843757272656e637949640001207472616e63686573710c0141015472616e636865733c42616c616e63652c20526174652c205765696768742c205472616e63686543757272656e63792c205472616e63686549642c20506f6f6c49642c0a4d61785472616e636865733e000128706172616d65746572738d0c0138506f6f6c506172616d6574657273000118737461747573910c0128506f6f6c53746174757300011465706f6368950c014c45706f636853746174653c45706f636849643e00011c72657365727665990c015c5265736572766544657461696c733c42616c616e63653e00006d0c0c386366675f7072696d697469766573147479706573345472616e63686557656967687400000400180110753132380000710c0c4870616c6c65745f706f6f6c5f73797374656d207472616e63686573205472616e636865731c1c42616c616e63650118105261746501950318576569676874016d0c3c5472616e63686543757272656e6379014904245472616e6368654964019d0218506f6f6c4964012c2c4d61785472616e63686573019904000c01207472616e63686573750c012501426f756e6465645665633c5472616e6368653c42616c616e63652c20526174652c205765696768742c205472616e63686543757272656e63793e2c204d61785472616e636865730a3e00010c696473810c0188426f756e6465645665633c5472616e63686549642c204d61785472616e636865733e00011073616c74890c014c5472616e63686553616c743c506f6f6c49643e0000750c0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401790c0453000004007d0c01185665633c543e0000790c0c4870616c6c65745f706f6f6c5f73797374656d207472616e636865731c5472616e636865101c42616c616e63650118105261746501950318576569676874016d0c2843757272656e63794964014904002001307472616e6368655f74797065690401445472616e636865547970653c526174653e00012473656e696f7269747910012453656e696f7269747900012063757272656e63794904012843757272656e637949640001106465627418011c42616c616e636500011c7265736572766518011c42616c616e63650001106c6f737318011c42616c616e6365000114726174696f7103012c5065727175696e74696c6c0001546c6173745f757064617465645f696e7465726573742c011c5365636f6e647300007d0c000002790c00810c0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e646564566563080454019d02045300000400850c01185665633c543e0000850c0000029d0200890c000004082c2c008d0c0c4870616c6c65745f706f6f6c5f73797374656d28706f6f6c5f747970657338506f6f6c506172616d657465727300000801386d696e5f65706f63685f74696d652c011c5365636f6e647300012c6d61785f6e61765f6167652c011c5365636f6e64730000910c0c4870616c6c65745f706f6f6c5f73797374656d28706f6f6c5f747970657328506f6f6c537461747573000104104f70656e00000000950c0c246366675f74797065731465706f63682845706f63685374617465041c45706f636849640110000c011c63757272656e7410011c45706f6368496400012c6c6173745f636c6f7365642c011c5365636f6e64730001346c6173745f657865637574656410011c45706f636849640000990c0c4870616c6c65745f706f6f6c5f73797374656d28706f6f6c5f7479706573385265736572766544657461696c73041c42616c616e63650118000c010c6d617818011c42616c616e6365000114746f74616c18011c42616c616e6365000124617661696c61626c6518011c42616c616e636500009d0c0c4870616c6c65745f706f6f6c5f73797374656d28706f6f6c5f7479706573585363686564756c656455706461746544657461696c730c10526174650195032c537472696e674c696d69740165042c4d61785472616e636865730199040008011c6368616e676573950401ac506f6f6c4368616e6765733c526174652c20537472696e674c696d69742c204d61785472616e636865733e0001307375626d69747465645f61742c011c5365636f6e64730000a10c0c4870616c6c65745f706f6f6c5f73797374656d20736f6c7574696f6e4845706f6368457865637574696f6e496e666f1c1c42616c616e636501183042616c616e6365526174696f01c9031c45706f63684964011018576569676874016d0c2c426c6f636b4e756d62657201103c5472616e63686543757272656e63790149042c4d61785472616e636865730199040014011465706f636810011c45706f6368496400010c6e6176a50c01304e61763c42616c616e63653e0001207472616e63686573a90c014d0145706f6368457865637574696f6e5472616e636865733c42616c616e63652c2042616c616e6365526174696f2c205765696768742c205472616e63686543757272656e63792c0a4d61785472616e636865733e00013c626573745f7375626d697373696f6eb90c01ac4f7074696f6e3c45706f6368536f6c7574696f6e3c42616c616e63652c204d61785472616e636865733e3e0001506368616c6c656e67655f706572696f645f656e644502014c4f7074696f6e3c426c6f636b4e756d6265723e0000a50c0c4870616c6c65745f706f6f6c5f73797374656d20736f6c7574696f6e0c4e6176041c42616c616e636501180008011c6e61765f61756d18011c42616c616e63650001206e61765f6665657318011c42616c616e63650000a90c0c4870616c6c65745f706f6f6c5f73797374656d207472616e636865735845706f6368457865637574696f6e5472616e63686573141c42616c616e636501183042616c616e6365526174696f01c90318576569676874016d0c3c5472616e63686543757272656e63790149042c4d61785472616e63686573019904000401207472616e63686573ad0c017d01426f756e6465645665633c45706f6368457865637574696f6e5472616e6368653c42616c616e63652c2042616c616e6365526174696f2c205765696768742c0a5472616e63686543757272656e63793e2c204d61785472616e636865732c3e0000ad0c0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401b10c045300000400b50c01185665633c543e0000b10c0c4870616c6c65745f706f6f6c5f73797374656d207472616e636865735445706f6368457865637574696f6e5472616e636865101c42616c616e636501183042616c616e6365526174696f01c90318576569676874016d0c3c5472616e63686543757272656e6379014904001c012063757272656e63794904013c5472616e63686543757272656e6379000118737570706c7918011c42616c616e63650001147072696365c903013042616c616e6365526174696f000118696e7665737418011c42616c616e636500011872656465656d18011c42616c616e636500013c6d696e5f7269736b5f6275666665727103012c5065727175696e74696c6c00012473656e696f7269747910012453656e696f726974790000b50c000002b10c00b90c04184f7074696f6e040454019d070108104e6f6e6500000010536f6d6504009d070000010000bd0c0c4870616c6c65745f706f6f6c5f73797374656d28706f6f6c5f74797065733c506f6f6c4465706f736974496e666f08244163636f756e74496401001c42616c616e63650118000801246465706f7369746f720001244163636f756e74496400011c6465706f73697418011c42616c616e63650000c10c000004082c3000c50c104870616c6c65745f706f6f6c5f73797374656d28706f6f6c5f74797065731c6368616e6765733c4e6f746564506f6f6c4368616e676504384368616e676550726f706f73616c01d107000801387375626d69747465645f74696d652c011c5365636f6e64730001186368616e6765d10701384368616e676550726f706f73616c0000c90c0c4870616c6c65745f706f6f6c5f73797374656d1870616c6c6574144572726f7204045400018c24506f6f6c496e557365000004944120706f6f6c2077697468207468697320494420697320616c726561647920696e2075736550496e76616c69644a756e696f725472616e636865000104cc417474656d7074656420746f20637265617465206120706f6f6c20776974686f75742061206a756e696f72207472616e6368655c496e76616c69645472616e636865537472756374757265000208b4417474656d7074656420746f206372656174652061207472616e63686520737472756374757265207768657265a82a206e6f6e2d64656372656173696e6720696e746572657374207261746520706572207472616e636865284e6f53756368506f6f6c000304d4417474656d7074656420616e206f7065726174696f6e206f6e206120706f6f6c20776869636820646f6573206e6f74206578697374604d696e45706f636854696d654861734e6f7450617373656400040494417474656d7074656420746f20636c6f736520616e2065706f636820746f6f206561726c79644368616c6c656e676554696d654861734e6f745061737365640005049c417474656d7074656420746f206578656375746520616e2065706f636820746f6f206561726c7948496e5375626d697373696f6e506572696f64000604e443616e6e6f742062652063616c6c6564207768696c652074686520706f6f6c20697320696e2061207375626d697373696f6e20706572696f64244e4156546f6f4f6c64000704cc417474656d7074656420746f20636c6f736520616e2065706f6368207769746820616e206f7574206f662064617465204e4156245472616e6368654964000804b841205472616e6368652049442063616e6e6f7420626520636f6e76657274656420746f20616e20616464726573732057697065644f7574000904dc436c6f73696e67207468652065706f6368206e6f7720776f756c642077697065206f757420746865206a756e696f72207472616e6368653c496e76616c6964536f6c7574696f6e000a04a05468652070726f766964656420736f6c7574696f6e206973206e6f7420612076616c6964206f6e65544e6f74496e5375626d697373696f6e506572696f64000b04f4417474656d7074656420746f20736f6c7665206120706f6f6c207768696368206973206e6f7420696e2061207375626d697373696f6e20706572696f6450496e73756666696369656e7443757272656e6379000c04d4496e73756666696369656e742063757272656e637920617661696c61626c6520666f722064657369726564206f7065726174696f6e485269736b42756666657256696f6c61746564000d04745269736b204275666665722076616c69646174696f6e206661696c6564144e6f4e4156000e0464546865204e415620776173206e6f7420617661696c61626c654c45706f63684e6f744578656375746564596574000f04c445706f6368206e6565647320746f206265206578656375746564206265666f726520796f752063616e20636f6c6c6563746443616e6e6f744164644f7252656d6f76655472616e63686573001004ac416464696e6720262072656d6f76696e67207472616e63686573206973206e6f7420737570706f727465645c496e76616c69645472616e63686553656e696f7269747900110c7c496e76616c6964207472616e6368652073656e696f726974792076616c7565b82a2073656e696f72697479204d55535420626520736d616c6c6572206e756d626572206f66207472616e63686573802a204d55535420626520696e6372656173696e6720706572207472616e63686550496e76616c69645472616e636865557064617465001208c05072652d726571756972656d656e747320666f722061205472616e63686555706461746520617265206e6f74206d6574fc666f72206578616d706c653a205472616e636865206368616e67656420627574206e6f7420697473206d65746164617461206f7220766963652076657273616c4d65746164617461466f7243757272656e63794e6f74466f756e64001304a04e6f206d6574616461746120666f722074686520676976656e2063757272656e637920666f756e645c5472616e636865546f6b656e4e616d65546f6f4c6f6e67001404d454686520676976656e207472616e63686520746f6b656e206e616d65206578636565647320746865206c656e677468206c696d6974605472616e63686553796d626f6c4e616d65546f6f4c6f6e67001504d854686520676976656e207472616e6368652073796d626f6c206e616d65206578636565647320746865206c656e677468206c696d69747c4661696c6564546f52656769737465725472616e6368654d65746164617461001604d45265676973746572696e6720746865206d6574616461746120666f722061207472616e63686520746872657720616e206572726f72744661696c6564546f5570646174655472616e6368654d65746164617461001704c85570646174696e6720746865206d6574616461746120666f722061207472616e63686520746872657720616e206572726f7240496e76616c69645472616e6368654964001804e8496e76616c6964205472616e6368654964207061737365642e20496e206d6f7374206361736573206f75742d6f662d626f756e6420696e6465783c546f6f4d616e795472616e63686573001904e454686520726571756573746564207472616e63686520636f6e66696775726174696f6e2068617320746f6f206d616e79207472616e63686573504e6f744e6577426573745375626d697373696f6e001a04a05375626d697474656420736f6c7574696f6e206973206e6f7420616e20696d70726f76656d656e744c4e6f536f6c7574696f6e417661696c61626c65001b04bc4e6f20736f6c7574696f6e2068617320796574206265656e2070726f766964656420666f72207468652065706f636868506f6f6c506172616d65746572426f756e6456696f6c61746564001c04ec4f6e65206f66207468652072756e74696d652d6c6576656c20706f6f6c20706172616d6574657220626f756e6473207761732076696f6c61746564444e6f5363686564756c6564557064617465001d048c4e6f2075706461746520666f722074686520706f6f6c206973207363686564756c6564645363686564756c656454696d654861734e6f74506173736564001e04bc5363686564756c65642074696d6520666f7220746869732075706461746520697320696e20746865206675747572657c557064617465507265726571756573697465734e6f7446756c66696c6c6564001f04785570646174652063616e6e6f742062652066756c66696c6c6564207965743c496e76616c696443757272656e6379002004e84120757365722068617320747269656420746f20637265617465206120706f6f6c207769746820616e20696e76616c69642063757272656e6379384368616e67654e6f74466f756e64002104f45468652065787465726e616c206368616e676520776173206e6f7420666f756e6420666f722074686520737065636966696564204368616e676549642e384368616e67654e6f74526561647900220409015468652065787465726e616c206368616e67652077617320666f756e6420666f72206973206e6f742072656164792079657420746f2062652072656c65617365642e048054686520604572726f726020656e756d206f6620746869732070616c6c65742ecd0c103070616c6c65745f6c6f616e7320656e746974696573146c6f616e732c437265617465644c6f616e0404540000080110696e666f7903012c4c6f616e496e666f3c543e000120626f72726f776572000130543a3a4163636f756e7449640000d10c0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401d50c045300000400f10c01185665633c543e0000d50c000004082cd90c00d90c103070616c6c65745f6c6f616e7320656e746974696573146c6f616e73284163746976654c6f616e04045400002801207363686564756c657d03014452657061796d656e745363686564756c65000128636f6c6c61746572616c8d03012841737365744f663c543e0001307265737472696374696f6e73cd0301404c6f616e5265737472696374696f6e73000120626f72726f776572000130543a3a4163636f756e74496400015077726974655f6f66665f70657263656e746167659503011c543a3a526174650001406f726967696e6174696f6e5f646174652c011c5365636f6e647300011c70726963696e67dd0c014041637469766550726963696e673c543e000138746f74616c5f626f72726f776564180128543a3a42616c616e6365000130746f74616c5f726570616964ed0c0160526570616964416d6f756e743c543a3a42616c616e63653e00017072657061796d656e74735f6f6e5f7363686564756c655f756e74696c2c011c5365636f6e64730000dd0c103070616c6c65745f6c6f616e7320656e7469746965731c70726963696e673441637469766550726963696e6704045400010820496e7465726e616c0400e10c0188696e7465726e616c3a3a496e7465726e616c41637469766550726963696e673c543e0000002045787465726e616c0400e90c018865787465726e616c3a3a45787465726e616c41637469766550726963696e673c543e00010000e10c143070616c6c65745f6c6f616e7320656e7469746965731c70726963696e6720696e7465726e616c54496e7465726e616c41637469766550726963696e670404540000080110696e666fa1030148496e7465726e616c50726963696e673c543e000120696e746572657374e50c0154416374697665496e746572657374526174653c543e0000e50c103070616c6c65745f6c6f616e7320656e74697469657320696e74657265737448416374697665496e7465726573745261746504045400000c0134696e7465726573745f7261746591030154496e746572657374526174653c543a3a526174653e0001386e6f726d616c697a65645f616363180128543a3a42616c616e636500011c70656e616c74799503011c543a3a526174650000e90c143070616c6c65745f6c6f616e7320656e7469746965731c70726963696e672065787465726e616c5445787465726e616c41637469766550726963696e670404540000140110696e666fb103014845787465726e616c50726963696e673c543e0001506f75747374616e64696e675f7175616e74697479c903012c543a3a5175616e74697479000120696e746572657374e50c0154416374697665496e746572657374526174653c543e00015c6c61746573745f736574746c656d656e745f7072696365180128543a3a42616c616e6365000160736574746c656d656e745f70726963655f757064617465642c011c5365636f6e64730000ed0c0c3070616c6c65745f6c6f616e7314747970657330526570616964416d6f756e74041c42616c616e63650118000c01247072696e636970616c18011c42616c616e6365000120696e74657265737418011c42616c616e636500012c756e7363686564756c656418011c42616c616e63650000f10c000002d50c00f50c103070616c6c65745f6c6f616e7320656e746974696573146c6f616e7328436c6f7365644c6f616e0404540000100124636c6f7365645f6174100144426c6f636b4e756d626572466f723c543e000110696e666f7903012c4c6f616e496e666f3c543e000138746f74616c5f626f72726f776564180128543a3a42616c616e6365000130746f74616c5f726570616964ed0c0160526570616964416d6f756e743c543a3a42616c616e63653e0000f90c0c246366675f747970657324706f7274666f6c696f48506f7274666f6c696f56616c756174696f6e0c1c42616c616e6365011818456c656d4964012c204d6178456c656d7300000c011476616c756518011c42616c616e63650001306c6173745f757064617465642c011c5365636f6e647300011876616c756573fd0c019c426f756e6465645665633c28456c656d49642c2042616c616e6365292c204d6178456c656d733e0000fd0c0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401010d045300000400050d01185665633c543e0000010d000004082c1800050d000002010d00090d0c3070616c6c65745f6c6f616e731870616c6c6574144572726f7204045400015030506f6f6c4e6f74466f756e6400000474456d697473207768656e20706f6f6c20646f65736e27742065786973745c4c6f616e4e6f744163746976654f724e6f74466f756e64000104d4456d697473207768656e206c6f616e20646f65736e2774206578697374206f722069742773206e6f7420616374697665207965742e4c4e6f56616c696457726974654f666652756c650002080d01456d697473207768656e20612077726974652d6f66662072756c65206973206e6f7420666f756e6420696e206120706f6c69637920666f72206120737065636966696311016c6f616e2e2049742068617070656e73207768656e207468657265206973206e6f20706f6c696379206f7220746865206c6f616e206973206e6f74206f7665726475652e404e46544f776e65724e6f74466f756e6400030494456d697473207768656e20746865204e4654206f776e6572206973206e6f7420666f756e642c4e6f744e46544f776e6572000404d4456d697473207768656e204e4654206f776e657220646f65736e2774206d6174636820746865206578706563746564206f776e65723c4e6f744c6f616e426f72726f7765720005040101456d697473207768656e20746865206170706c6963616e74206163636f756e74206973206e6f742074686520626f72726f776572206f6620746865206c6f616e544d61784163746976654c6f616e7352656163686564000604d4456d697473207768656e20746865206d6178206e756d626572206f6620616374697665206c6f616e73207761732072656163686564384e6f4c6f616e4368616e67654964000704b8546865204368616e676520496420646f6573206e6f742062656c6f6e6720746f2061206c6f616e206368616e676544556e72656c617465644368616e676549640008040d01546865204368616e676520496420657869737473206275742069742773206e6f742072656c6561746564207769746820746865206578706563746564206368616e67655c4d69736d61746368656450726963696e674d6574686f64000904f8456d697473207768656e207468652070726963696e67206d6574686f64206973206e6f7420636f6d70617469626c6520776974682074686520696e7075747c536574746c656d656e74507269636545786365656473566172696174696f6e000a040101456d697473207768656e20736574746c656d656e7420707269636520697320657863656564732074686520636f6e6669677572656420766172696174696f6e2e3c4372656174654c6f616e4572726f7204000d0d013c4372656174654c6f616e4572726f72000b040d01456d697473207768656e20746865206c6f616e20697320696e636f72726563746c792073706563696669656420616e642063616e206e6f7420626520637265617465643c426f72726f774c6f616e4572726f720400110d013c426f72726f774c6f616e4572726f72000c04b0456d697473207768656e20746865206c6f616e2063616e206e6f7420626520626f72726f7765642066726f6d3852657061794c6f616e4572726f720400150d013852657061794c6f616e4572726f72000d04a8456d697473207768656e20746865206c6f616e2063616e206e6f74206265207265706169642066726f6d3c5772697474656e4f66664572726f720400190d013c5772697474656e4f66664572726f72000e04a8456d697473207768656e20746865206c6f616e2063616e206e6f74206265207772697474656e206f666638436c6f73654c6f616e4572726f7204001d0d0138436c6f73654c6f616e4572726f72000f0494456d697473207768656e20746865206c6f616e2063616e206e6f7420626520636c6f736564344d75746174696f6e4572726f720400210d01344d75746174696f6e4572726f7200100498456d697473207768656e20746865206c6f616e2063616e206e6f74206265206d757461746564585472616e7366657244656274546f53616d654c6f616e001104b8456d697473207768656e2064656274206973207472616e73666572656420746f207468652073616d65206c6f616e705472616e7366657244656274416d6f756e744d69736d6174636865640012040901456d697473207768656e2064656274206973207472616e736665726564207769746820646966666572656e74207265706169642f626f72726f7720616d6f756e7473904d61747572697479446174654e6565646564466f7256616c756174696f6e4d6574686f6400130cfc456d697473207768656e20746865206c6f616e20686173206e6f206d617475726974792064617465207365742c20627574207468652076616c756174696f6ee06d6574686f64206e65656473206f6e652e204d616b696e672076616c756174696f6e20616e64206d617475726974792073657474696e677334696e636f6d70617469626c652e048054686520604572726f726020656e756d206f6620746869732070616c6c65742e0d0d0c3070616c6c65745f6c6f616e731474797065733c4372656174654c6f616e4572726f7200011058496e76616c696456616c756174696f6e4d6574686f6400000060496e76616c696452657061796d656e745363686564756c6500010060496e76616c6964426f72726f775265737472696374696f6e0002005c496e76616c696452657061795265737472696374696f6e00030000110d0c3070616c6c65745f6c6f616e731474797065733c426f72726f774c6f616e4572726f72000110444d6178416d6f756e7445786365656465640000002c5265737472696374696f6e000100484d6174757269747944617465506173736564000200385061796d656e744f76657264756500030000150d0c3070616c6c65745f6c6f616e731474797065733852657061794c6f616e4572726f720001082c5265737472696374696f6e000000684d61785072696e636970616c416d6f756e74457863656564656400010000190d0c3070616c6c65745f6c6f616e731474797065733c5772697474656e4f66664572726f72000104384c6573735468616e506f6c696379000000001d0d0c3070616c6c65745f6c6f616e7314747970657338436c6f73654c6f616e4572726f72000104384e6f7446756c6c7952657061696400000000210d0c3070616c6c65745f6c6f616e73147479706573344d75746174696f6e4572726f7200010c68446973636f756e74656443617368466c6f7745787065637465640000005c496e7465726e616c50726963696e6745787065637465640001005c4d61747572697479457874656e646564546f6f4d75636800020000250d0000040800210400290d0c246366675f74797065732c7065726d697373696f6e733c5065726d697373696f6e526f6c6573100c4e6f7701a8204d696e44656c6179012d0d245472616e6368654964019d022c4d61785472616e6368657301990400100128706f6f6c5f61646d696e310d0138506f6f6c41646d696e526f6c657300013863757272656e63795f61646d696e350d014843757272656e637941646d696e526f6c65730001647065726d697373696f6e65645f61737365745f686f6c646572390d01a85065726d697373696f6e656443757272656e6379486f6c646572733c4e6f772c204d696e44656c61793e0001407472616e6368655f696e766573746f72450d01dc5472616e636865496e766573746f72733c4e6f772c204d696e44656c61792c205472616e63686549642c204d61785472616e636865733e00002d0d084c646576656c6f706d656e745f72756e74696d65204d696e44656c617900000000310d0c246366675f74797065732c7065726d697373696f6e7338506f6f6c41646d696e526f6c657300000401106269747310010c7533320000350d0c246366675f74797065732c7065726d697373696f6e734843757272656e637941646d696e526f6c657300000401106269747310010c7533320000390d0c246366675f74797065732c7065726d697373696f6e736c5065726d697373696f6e656443757272656e6379486f6c64657273080c4e6f7701a8204d696e44656c6179012d0d00040110696e666f3d0d01984f7074696f6e3c5065726d697373696f6e656443757272656e6379486f6c646572496e666f3e00003d0d04184f7074696f6e04045401410d0108104e6f6e6500000010536f6d650400410d0000010000410d0c246366675f74797065732c7065726d697373696f6e73785065726d697373696f6e656443757272656e6379486f6c646572496e666f00000401447065726d697373696f6e65645f74696c6c2c011c5365636f6e64730000450d0c246366675f74797065732c7065726d697373696f6e73405472616e636865496e766573746f7273100c4e6f7701a8204d696e44656c6179012d0d245472616e6368654964019d022c4d61785472616e6368657301990400040110696e666f490d01dc426f756e6465645665633c5472616e636865496e766573746f72496e666f3c5472616e63686549643e2c204d61785472616e636865733e0000490d0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e646564566563080454014d0d045300000400510d01185665633c543e00004d0d0c246366675f74797065732c7065726d697373696f6e734c5472616e636865496e766573746f72496e666f04245472616e6368654964019d02000c01287472616e6368655f69649d0201245472616e63686549640001447065726d697373696f6e65645f74696c6c2c011c5365636f6e647300012469735f66726f7a656e780110626f6f6c0000510d0000024d0d00550d0c4870616c6c65745f7065726d697373696f6e731870616c6c6574144572726f7204045400011840526f6c65416c7265616479476976656e00000030526f6c654e6f74476976656e0001001c4e6f526f6c6573000200204e6f456469746f720003003c57726f6e67506172616d657465727300040030546f6f4d616e79526f6c6573000500048054686520604572726f726020656e756d206f6620746869732070616c6c65742e590d0c6470616c6c65745f636f6c6c61746f725f616c6c6f776c6973741870616c6c6574144572726f7204045400010c58436f6c6c61746f72416c7265616479416c6c6f776564000004d454686520636f6c6c61746f722068617320616c7265616479206265656e20616464656420746f2074686520616c6c6f776c6973742e40436f6c6c61746f724e6f745265616479000108e454686520636f6c6c61746f72206973206e6f742072656164792079657420666f6c6c6f77696e6720746f2074686520756e6465726c79696e676860543a3a56616c696461746f72526567697374726174696f6e6048436f6c6c61746f724e6f7450726573656e74000204cc5468652070726f766964656420636f6c6c61746f7220776173206e6f7420666f756e6420696e207468652073746f726167652e048054686520604572726f726020656e756d206f6620746869732070616c6c65742e5d0d0c6070616c6c65745f726573747269637465645f746f6b656e731870616c6c6574144572726f720404540001044c507265436f6e646974696f6e734e6f744d6574000000048054686520604572726f726020656e756d206f6620746869732070616c6c65742e610d0c3470616c6c65745f6272696467651870616c6c6574144572726f720404540001043c496e76616c69645472616e7366657200000440496e76616c6964207472616e73666572048054686520604572726f726020656e756d206f6620746869732070616c6c65742e650d0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401690d0453000004006d0d01185665633c543e0000690d085c70616c6c65745f696e7465726573745f6163637275616c2c5261746544657461696c73041052617465019503000c0154696e7465726573745f726174655f7065725f7365639503011052617465000140616363756d756c617465645f72617465950301105261746500013c7265666572656e63655f636f756e7410010c75333200006d0d000002690d00710d0c5c70616c6c65745f696e7465726573745f6163637275616c1870616c6c6574144572726f72040454000114544465627443616c63756c6174696f6e4661696c656400000498456d697473207768656e2074686520646562742063616c63756c6174696f6e206661696c6564504465627441646a7573746d656e744661696c656400010494456d697473207768656e2074686520646562742061646a7573746d656e74206661696c6564284e6f5375636852617465000204a4456d697473207768656e2074686520696e746572657374207261746520776173206e6f7420757365642c496e76616c696452617465000304bc456d697473207768656e20612072617465206973206e6f742077697468696e207468652076616c69642072616e676530546f6f4d616e795261746573000404f0456d697473207768656e20616464696e672061206e6577207261746520776f756c6420657863656564207468652073746f72616765206c696d697473048054686520604572726f726020656e756d206f6620746869732070616c6c65742e750d0000040800790d00790d00000408303d04007d0d083c70616c6c65745f6b657973746f72650c4b6579082c426c6f636b4e756d62657201101c42616c616e636501180010011c707572706f73653d0401284b6579507572706f73650001206b65795f747970654104011c4b6579547970650001287265766f6b65645f61744502014c4f7074696f6e3c426c6f636b4e756d6265723e00011c6465706f73697418011c42616c616e63650000810d00000408003d0400850d0c3c70616c6c65745f6b657973746f72651870616c6c6574144572726f72040454000114184e6f4b657973000004584e6f206b65797320776572652070726f76696465642e2c546f6f4d616e794b657973000104a04d6f7265207468616e20543a3a4d61784b657973206b65797320776572652070726f76696465642e404b6579416c72656164794578697374730002045c546865206b657920616c7265616479206578697374732e2c4b65794e6f74466f756e6400030484546865206b657920776173206e6f7420666f756e6420696e2073746f726167652e444b6579416c72656164795265766f6b656400040470546865206b65792077617320616c7265616479207265766f6b65642e048054686520604572726f726020656e756d206f6620746869732070616c6c65742e890d00000408004904008d0d0c246366675f7479706573186f7264657273144f72646572081c42616c616e636501181c4f726465724964012c00080118616d6f756e7418011c42616c616e63650001307375626d69747465645f61742c011c4f7264657249640000910d0000040849042c00950d0c4870616c6c65745f696e766573746d656e74731870616c6c6574144572726f720404540001283c4f726465724e6f74436c6561726564000008fc546865206f7264657220686173206e6f74206265656e206d61726b656420617320636c65617265642e20497427732065697468657220616374697665206f7234696e2070726f63657373696e67404f726465725374696c6c41637469766500010ce4546865206f726465722061207573657220747269656420746f20636f6c6c65637420666f72206973207374696c6c2061637469766520616e64e06e6565647320746f2062652070757420696e2070726f63657373696e6720616e64207468656e20626520636c6561726564206265666f7265546120636f6c6c65637420697320706f737369626c6544556e6b6e6f776e496e766573746d656e74000204d0496e766573746d656e744d616e6167657220646f6573206e6f74206b6e6f772074686520676976656e20696e766573746d656e743c436f6c6c6563745265717569726564000308bc54686520757365722068617320746f206d616e7920756e636f6c6c6563746564206f72646572732e204265666f7265d87375626d697474696e67206e6577206f72646572732c206120636f6c6c656374206f662074686f73652069732072657175697265642e505a65726f507269636564496e766573746d656e74000408e0412066756c66696c6c6d656e742068617070656e6564207769746820616e20696e766573746d656e74207072696365206f66207a65726f2e6c546865206f726465722077696c6c20626520646973636172646564504f726465724e6f74496e50726f63657373696e67000504d84f72646572206973207374696c6c2061637469766520616e642063616e206e6f742062652070726f6365737365642066757274686572444f72646572496e50726f63657373696e67000608d04f72646572206973206e6f742079657420636c656172656420616e64206d7573742062652070726f6365737365642066697273749c6265666f72652072657175657374696e67206e6577206f726465727320697320616c6c6f776564284e6f4e65774f726465720007048c557064617465206f66206f7264657220776173206e6f742061206e6577206f726465724c4e6f416374697665496e766573744f72646572000804f855736572206861732063757272656e746c79206e6f20696e76657374206f72646572732061637469766520616e642063616e206e6f7420636f6c6c6563744c4e6f41637469766552656465656d4f72646572000904f855736572206861732063757272656e746c79206e6f2072656465656d206f72646572732061637469766520616e642063616e206e6f7420636f6c6c656374048054686520604572726f726020656e756d206f6620746869732070616c6c65742e990d0000040845029d0d009d0d103870616c6c65745f72657761726473246d656368616e69736d0c6761702043757272656e63790404540109050008012c746f74616c5f7374616b65180128543a3a42616c616e636500012c7270745f6368616e676573a10d01b0426f756e6465645665633c543a3a526174652c20543a3a4d617843757272656e63794d6f76656d656e74733e0000a10d0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401a50d045300000400ad0d01185665633c543e0000a50d0c3473705f61726974686d657469632c66697865645f706f696e742446697865644931323800000400a90d0110693132380000a90d0000050d00ad0d000002a50d00b10d103870616c6c65745f72657761726473246d656368616e69736d0c6761701447726f75700404540109050010012c746f74616c5f7374616b65180128543a3a42616c616e636500014c70656e64696e675f746f74616c5f7374616b65180128543a3a42616c616e636500010c727074a50d011c543a3a5261746500013c646973747269627574696f6e5f6964100144543a3a446973747269627574696f6e49640000b50d0000040800b90300b90d103870616c6c65745f72657761726473246d656368616e69736d0c6761701c4163636f756e74040454010905001401147374616b65180128543a3a42616c616e63650001307265776172645f74616c6c79a90d012c543a3a4942616c616e636500013470656e64696e675f7374616b65180128543a3a42616c616e636500013c646973747269627574696f6e5f6964100144543a3a446973747269627574696f6e49640001586c6173745f63757272656e63795f6d6f76656d656e74b4010c7531360000bd0d0c3870616c6c65745f726577617264731870616c6c6574144572726f7208045400044900010c5043757272656e6379576974686f757447726f75700000004c43757272656e6379496e53616d6547726f75700001006c43757272656e63794d61784d6f76656d656e747352656163686564000200048054686520604572726f726020656e756d206f6620746869732070616c6c65742ec10d086070616c6c65745f6c69717569646974795f726577617264732445706f63684461746104045400000c01206475726174696f6e2c012c4d6f6d656e744f663c543e000118726577617264180128543a3a42616c616e636500011c77656967687473c50d01d0426f756e64656442547265654d61703c543a3a47726f757049642c20543a3a5765696768742c20543a3a4d617847726f7570733e0000c50d0c4c626f756e6465645f636f6c6c656374696f6e7344626f756e6465645f62747265655f6d61703c426f756e64656442547265654d61700c044b01100456012c0453000004003108013842547265654d61703c4b2c20563e0000c90d0c6070616c6c65745f6c69717569646974795f726577617264731870616c6c6574144572726f72040454000104644d61784368616e67657350657245706f63685265616368656400000811014c696d6974206f66206d61782063616c6c7320776974682073616d6520696420746f205b6050616c6c65743a3a7365745f67726f75705f7765696768742829605d206f72a45b6050616c6c65743a3a7365745f63757272656e63795f67726f75702829605d20726561636865642e048054686520604572726f726020656e756d206f6620746869732070616c6c65742ecd0d0c5870616c6c65745f6c69717569646974795f706f6f6c731870616c6c6574144572726f720404540001543441737365744e6f74466f756e6400000c11014661696c656420746f206d61702074686520617373657420746f2074686520636f72726573706f6e64696e67204c6971756964697479506f6f6c73272047656e6572616cc8496e64657820726570726573656e746174696f6e20616e6420746875732063616e6e6f74206265207573656420617320616e50696e766573746d656e742063757272656e63792e7041737365744d657461646174614e6f74506f6f6c43757272656e6379000108f4546865206d65746164617461206f662074686520676976656e20617373657420646f6573206e6f74206465636c617265206974206173206120706f6f6cf863757272656e637920616e6420746875732069742063616e6e6f74206265207573656420617320616e20696e766573746d656e742063757272656e63792e8841737365744e6f744c6971756964697479506f6f6c735472616e7366657261626c650002080d01546865206d65746164617461206f662074686520676976656e20617373657420646f6573206e6f74206465636c617265206974206173207472616e7366657261626c6550766961204c6971756964697479506f6f6c73272e8841737365744e6f744c6971756964697479506f6f6c7357726170706564546f6b656e000308d4546865206173736574206973206e6f7420612061207772617070656420746f6b656e20616e6420746875732063616e6e6f74206265807472616e7366657272656420766961206c697175696469747920706f6f6c732e30506f6f6c4e6f74466f756e64000404684120706f6f6c20636f756c64206e6f7420626520666f756e642e3c5472616e6368654e6f74466f756e640005047441207472616e63686520636f756c64206e6f7420626520666f756e642e5c5472616e6368654d657461646174614e6f74466f756e64000604bc436f756c64206e6f742066696e6420746865206d65746164617461206f662061207472616e63686520746f6b656e2e4c4d697373696e675472616e636865507269636500070c984661696c656420746f2066657463682061207472616e63686520746f6b656e2070726963652ed4546869732063616e206f6363757220696620605472616e6368654e6f74466f756e6460206f72206966206566666563746976656c79c074686520707269636520666f722074686973207472616e63686520686173206e6f7420796574206265656e207365742e54496e76616c69645472616e73666572416d6f756e74000804845472616e7366657220616d6f756e74206d757374206265206e6f6e2d7a65726f2e3442616c616e6365546f6f4c6f77000904cc53656e646572732062616c616e636520697320696e73756666696369656e7420666f72207472616e7366657220616d6f756e7450556e617574686f72697a65645472616e73666572000a04e841207472616e7366657220746f2061206e6f6e2d77686974656c69737465642064657374696e6174696f6e2077617320617474656d707465642e58496e76616c6964496e636f6d696e674d657373616765000b04944661696c656420746f206465636f646520616e20696e636f6d696e67206d6573736167652e34496e76616c6964446f6d61696e000c04885468652064657374696e6174696f6e20646f6d61696e20697320696e76616c69642e78496e76616c69645472616e636865496e766573746f7256616c6964697479000d04705468652076616c696469747920697320696e2074686520706173742e5c496e76616c69645472616e7366657243757272656e6379000e0405015468652063757272656e6379206973206e6f7420616c6c6f77656420746f206265207472616e7366657272656420766961204c6971756964697479506f6f6c732e7c496e766573746f72446f6d61696e416464726573734e6f74414d656d626572000f080501546865206163636f756e7420646572697665642066726f6d20746865205b446f6d61696e5d20616e64205b446f6d61696e416464726573735d20686173206e6f74986265656e2077686974656c69737465642061732061205472616e636865496e766573746f722e6c496e766573746f72446f6d61696e4164647265737346726f7a656e0010080d01546865206163636f756e7420646572697665642066726f6d20746865205b446f6d61696e5d20616e64205b446f6d61696e416464726573735d2069732066726f7a656eb4616e642063616e6e6f74207472616e73666572207472616e63686520746f6b656e73207468657265666f72652e78496e766573746f72446f6d61696e416464726573734e6f7446726f7a656e0011080101546865206163636f756e7420646572697665642066726f6d20746865205b446f6d61696e5d20616e64205b446f6d61696e416464726573735d206973206e6f74a066726f7a656e20616e642063616e6e6f7420626520756e66726f7a656e207468657265666f72652e304e6f74506f6f6c41646d696e001204c44f6e6c792074686520506f6f6c41646d696e2063616e2065786563757465206120676976656e206f7065726174696f6e2e64446f6d61696e486f6f6b416464726573734e6f74466f756e64001304ac54686520646f6d61696e20686f6f6b206164647265737320636f756c64206e6f7420626520666f756e642e5c556e737570706f7274656442617463684d6573736167650014080101546869732070616c6c657420646f6573206e6f742065787065637420746f20726563656976652064697265636c74792061206261746368206d6573736167652cfc696e73746561642069742065787065637473207365766572616c2063616c6c7320746f206974207769746820646966666572656e74206d657373616765732e048054686520604572726f726020656e756d206f6620746869732070616c6c65742ed10d0c246366675f747970657314706f6f6c7330506f6f6c4d6574616461746104204d65746153697a6501d50d000401206d6574616461746175080160426f756e6465645665633c75382c204d65746153697a653e0000d50d084c646576656c6f706d656e745f72756e74696d653c4d617853697a654d6574616461746100000000d90d0c246366675f747970657314706f6f6c7358506f6f6c526567697374726174696f6e537461747573000108285265676973746572656400000030556e7265676973746572656400010000dd0d0c5070616c6c65745f706f6f6c5f72656769737472791870616c6c6574144572726f720404540001182c4261644d657461646174610000045c496e76616c6964206d657461646174612070617373656454506f6f6c416c726561647952656769737465726564000104ec4120506f6f6c20776974682074686520676976656e2049442077617320616c7265616479207265676973746572656420696e2074686520706173746c4d65746164617461466f7243757272656e63794e6f74466f756e64000204a04e6f206d6574616461746120666f722074686520676976656e2063757272656e637920666f756e64484e6f53756368506f6f6c4d65746164617461000304984e6f204d6574616461746120666f756e6420666f722074686520676976656e20506f6f6c49645c5472616e636865546f6b656e4e616d65546f6f4c6f6e67000404d454686520676976656e207472616e63686520746f6b656e206e616d65206578636565647320746865206c656e677468206c696d6974605472616e63686553796d626f6c4e616d65546f6f4c6f6e67000504d854686520676976656e207472616e6368652073796d626f6c206e616d65206578636565647320746865206c656e677468206c696d6974048054686520604572726f726020656e756d206f6620746869732070616c6c65742ee10d000004084502e50d00e50d103870616c6c65745f72657761726473246d656368616e69736d10626173652043757272656e63790c1c42616c616e63650118105261746501a50d304d61784d6f76656d656e747301e90d0008012c746f74616c5f7374616b6518011c42616c616e636500012c7270745f6368616e676573ed0d0178426f756e6465645665633c526174652c204d61784d6f76656d656e74733e0000e90d0c3872756e74696d655f636f6d6d6f6e1c726577617264735853696e676c6543757272656e63794d6f76656d656e7400000000ed0d0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401a50d045300000400ad0d01185665633c543e0000f10d103870616c6c65745f72657761726473246d656368616e69736d10626173651447726f7570081c42616c616e63650118105261746501a50d0008012c746f74616c5f7374616b6518011c42616c616e636500010c727074a50d0110526174650000f50d103870616c6c65745f72657761726473246d656368616e69736d10626173651c4163636f756e74081c42616c616e63650118204942616c616e636501a90d000c01147374616b6518011c42616c616e63650001307265776172645f74616c6c79a90d01204942616c616e63650001586c6173745f63757272656e63795f6d6f76656d656e74b4010c7531360000f90d0c3870616c6c65745f726577617264731870616c6c6574144572726f7208045400044900010c5043757272656e6379576974686f757447726f75700000004c43757272656e6379496e53616d6547726f75700001006c43757272656e63794d61784d6f76656d656e747352656163686564000200048054686520604572726f726020656e756d206f6620746869732070616c6c65742efd0d085070616c6c65745f626c6f636b5f726577617264732c53657373696f6e44617461040454000010013c636f6c6c61746f725f726577617264180128543a3a42616c616e6365000138636f6c6c61746f725f636f756e7410010c75333200015c74726561737572795f696e666c6174696f6e5f726174659503011c543a3a5261746500012c6c6173745f7570646174652c011c5365636f6e64730000010e0c5070616c6c65745f626c6f636b5f726577617264731870616c6c6574144572726f72040454000100048054686520604572726f726020656e756d206f6620746869732070616c6c65742e050e0000040800c50400090e0c6470616c6c65745f7472616e736665725f616c6c6f776c6973741870616c6c657444416c6c6f77616e63654d65746164617461042c426c6f636b4e756d6265720110000c013c616c6c6f77616e63655f636f756e742c010c75363400013463757272656e745f64656c61794502014c4f7074696f6e3c426c6f636b4e756d6265723e0001546f6e63655f6d6f6469666961626c655f61667465724502014c4f7074696f6e3c426c6f636b4e756d6265723e00000d0e0000040c00c504c90400110e0c6470616c6c65745f7472616e736665725f616c6c6f776c6973741870616c6c657440416c6c6f77616e636544657461696c73042c426c6f636b4e756d626572011000080128616c6c6f7765645f617410012c426c6f636b4e756d626572000128626c6f636b65645f617410012c426c6f636b4e756d6265720000150e0c6470616c6c65745f7472616e736665725f616c6c6f776c6973741870616c6c6574144572726f720404540001203c4e6f416c6c6f77616e636573536574000008ec416e206f7065726174696f6e20657870656374696e67206f6e65206f72206d6f726520616c6c6f77616e63657320666f7220612073656e64696e67a04163636f756e742f43757272656e6379207365742c207768657265206e6f6e652070726573656e74484475706c6963617465416c6c6f77616e6365000108ec417474656d7074656420746f2063726561746520616c6c6f77616e636520666f72206578697374696e672053656e64696e67204163636f756e742c8843757272656e63792c20616e6420526563656976657220636f6d62696e6174696f6e4c4e6f4d61746368696e67416c6c6f77616e6365000204ac4e6f206d61746368696e6720616c6c6f77616e636520666f72204c6f636174696f6e2f43757272656e63793c4e6f4d61746368696e6744656c61790003080d014e6f206d61746368696e672064656c617920666f72207468652073656e64696e67206163636f756e7420616e642063757272656e637920636f6d62696e6174696f6e2e8843616e6e6f742064656c6574652061206e6f6e2d6578697374616e7420656e747279384475706c696361746544656c61790004045044656c617920616c7265616479206578697374734444656c6179556e6d6f6469666961626c65000508090144656c617920686173206e6f74206265656e2073657420746f206d6f6469666965642c206f722064656c6179206174207768696368206d6f64696669636174696f6e88686173206265656e2073657420686173206e6f74206265656e20726561636865642e58416c6c6f77616e63654861734e6f74457870697265640006048c417474656d7074656420746f20636c6561722061637469766520616c6c6f77616e6365644e6f416c6c6f77616e6365466f7244657374696e6174696f6e000708e45472616e736665722066726f6d2073656e64696e67206163636f756e7420616e642063757272656e6379206e6f7420616c6c6f77656420746f2c64657374696e6174696f6e048054686520604572726f726020656e756d206f6620746869732070616c6c65742e190e143870616c6c65745f72657761726473246d656368616e69736d0c6761701870616c6c6574144572726f72040454000104705472794d6f76656d656e74416674657250656e64696e675374617465000000048054686520604572726f726020656e756d206f6620746869732070616c6c65742e1d0e000004085504d50100210e0000040800550400250e0c7870616c6c65745f6c69717569646974795f706f6f6c735f676174657761791870616c6c6574144572726f7204045400012440526f75746572496e69744661696c656400000474526f7574657220696e697469616c697a6174696f6e206661696c65642e50496e76616c69644d6573736167654f726967696e000104d4546865206f726967696e206f6620746865206d65737361676520746f2062652070726f63657373656420697320696e76616c69642e48446f6d61696e4e6f74537570706f727465640002047054686520646f6d61696e206973206e6f7420737570706f727465642e50496e7374616e6365416c72656164794164646564000304a4496e7374616e63652077617320616c726561647920616464656420746f2074686520646f6d61696e2e484d6178446f6d61696e496e7374616e636573000404d44d6178696d756d206e756d626572206f6620696e7374616e63657320666f72206120646f6d61696e2077617320726561636865642e3c556e6b6e6f776e496e7374616e636500050444556e6b6e6f776e20696e7374616e63652e38526f757465724e6f74466f756e6400060444526f75746572206e6f7420666f756e642e704d6573736167655061636b696e67416c7265616479537461727465640007080d01456d6974746564207768656e20796f752063616c6c206073746172745f62617463685f6d657373616765732829602062757420746861742077617320616c72656164790d0163616c6c65642e20596f752073686f756c642066696e616c697a6520746865206d65737361676520776974682060656e645f62617463685f6d65737361676573282960604d6573736167655061636b696e674e6f74537461727465640008080901456d6974746564207768656e20796f752063616e2060656e645f62617463685f6d6573736167652829602062757420746865207061636b696e672070726f63657373ac776173206e6f742073746172746564206279206073746172745f62617463685f6d6573736167652829602e048054686520604572726f726020656e756d206f6620746869732070616c6c65742e290e0c4470616c6c65745f6f726465725f626f6f6b1870616c6c6574144f7264657204045400002001206f726465725f69642c013c543a3a4f7264657249644e6f6e636500013c706c6163696e675f6163636f756e74000130543a3a4163636f756e74496400012c63757272656e63795f696eb9030134543a3a43757272656e6379496400013063757272656e63795f6f7574b9030134543a3a43757272656e63794964000124616d6f756e745f696e180130543a3a42616c616e6365496e000128616d6f756e745f6f7574180134543a3a42616c616e63654f7574000148616d6f756e745f6f75745f696e697469616c180134543a3a42616c616e63654f7574000114726174696f310501504f72646572526174696f3c543a3a526174696f3e00002d0e0c4470616c6c65745f6f726465725f626f6f6b1870616c6c6574144572726f720404540001203c53616d6543757272656e63794964730000080d014572726f72207768656e206f7264657220697320706c6163656420617474656d7074696e6720746f2065786368616e67652063757272656e63696573206f66207468652873616d6520747970652e6442656c6f774d696e46756c66696c6c6d656e74416d6f756e74000104f04572726f72207768656e20616e206163636f756e742063616e6e6f742072657365727665206f72207472616e736665722074686520616d6f756e742e44496e76616c696443757272656e6379496400020801014572726f72207768656e20616e206f7264657220697320706c61636564207769746820612063757272656e63792074686174206973206e6f7420696e20746865406041737365745265676973747279602e344f726465724e6f74466f756e6400030809014572726f72207768656e20616e206f7065726174696f6e20697320617474656d70746564206f6e20616e206f726465722069642074686174206973206e6f7420696e2073746f726167652e30556e617574686f7269736564000408f44572726f72207768656e2061207573657220617474656d70747320616e20616374696f6e206f6e20616e206f72646572207468657920617265206e6f740501617574686f726973656420746f20706572666f726d2c20737563682061732063616e63656c6c696e6720616e6f74686572206163636f756e7473206f726465722e5446756c66696c6c416d6f756e74546f6f4c61726765000508f84572726f72207768656e207468652070726f766964656420616d6f756e7420746f2066756c66696c6c20697320746f6f206c6172676520666f7220746865186f726465722e504d61726b65744665656465724e6f74466f756e64000604d05468657265206973206e6f74206665656465722073657420666f72206d61726b657420636f6e76657273696f6e20726174696f734c4d61726b6574526174696f4e6f74466f756e64000704e445787065637465642061206d61726b657420726174696f20666f722074686520676976656e2070616972206f662063757272656e636965732e048054686520604572726f726020656e756d206f6620746869732070616c6c65742e310e0c6870616c6c65745f666f726569676e5f696e766573746d656e747320656e74697469657338496e766573746d656e74496e666f0404540000100140666f726569676e5f63757272656e6379b9030134543a3a43757272656e63794964000138666f726569676e5f616d6f756e74180144543a3a466f726569676e42616c616e636500017c64656372656173655f737761707065645f666f726569676e5f616d6f756e74180144543a3a466f726569676e42616c616e63650001206f726465725f69640d0101484f7074696f6e3c543a3a4f7264657249643e0000350e0c6870616c6c65745f666f726569676e5f696e766573746d656e747320656e74697469657338526564656d7074696f6e496e666f0404540000100140666f726569676e5f63757272656e6379b9030134543a3a43757272656e63794964000138737761707065645f616d6f756e74180144543a3a466f726569676e42616c616e6365000160636f6c6c65637465645f7472616e6368655f746f6b656e73180144543a3a5472616e63686542616c616e63650001206f726465725f69640d0101484f7074696f6e3c543a3a4f7264657249643e0000390e0000040800a108003d0e0c6870616c6c65745f666f726569676e5f696e766573746d656e74731870616c6c6574144572726f7204045400011030496e666f4e6f74466f756e64000004ac4661696c656420746f207265747269657665207468652060466f726569676e496e76657374496e666f602e30506f6f6c4e6f74466f756e64000104c84661696c656420746f2072657472696576652074686520706f6f6c20666f722074686520676976656e20706f6f6c2069642e644d69736d617463686564466f726569676e43757272656e63790002100901416e20616374696f6e20666f72206120646966666572656e7420666f726569676e2063757272656e63792069732063757272656e746c7920696e2070726f63657373d0666f72207468652073616d6520706f6f6c2063757272656e63792c206163636f756e742c20616e6420696e766573746d656e742e11015468652063757272656e637420666f726569676e20616374696f6e73206d7573742062652066696e6973686564206265666f7265207374617274696e6720776974682061cc646966666572656e7420666f726569676e2063757272656e637920696e766573746d656e74202f20726564656d7074696f6e2e5843616e63656c6c6174696f6e496e50726f6772657373000308f0412063616e63656c20616374696f6e20697320696e2070726f677265737320616e64206974206e6565647320746f2066696e697368206265666f726540696e6372656173696e6720616761696e048054686520604572726f726020656e756d206f6620746869732070616c6c65742e410e00000408bd01b50300450e00000408c9032c00490e0c6070616c6c65745f6f7261636c655f636f6c6c656374696f6e14747970657340436163686564436f6c6c656374696f6e04045400000c011c636f6e74656e744d0e012101426f756e64656442547265654d61703c543a3a4f7261636c654b65792c204f7261636c6556616c7565506169723c543e2c20543a3a0a4d6178436f6c6c656374696f6e53697a653e0001546f6c6465725f76616c75655f74696d657374616d702c0130543a3a54696d657374616d700001306c6173745f757064617465642c0130543a3a54696d657374616d7000004d0e0c4c626f756e6465645f636f6c6c656374696f6e7344626f756e6465645f62747265655f6d61703c426f756e64656442547265654d61700c044b01b503045601510e045300000400550e013842547265654d61703c4b2c20563e0000510e00000408182c00550e042042547265654d617008044b01b503045601510e000400590e000000590e0000025d0e005d0e00000408b503510e00610e000004082cb50300650e0c6070616c6c65745f6f7261636c655f636f6c6c656374696f6e1870616c6c6574144572726f7204045400011c2849734e6f7441646d696e000004f4546865206163636f756e742077686f20747269676765722074686520616374696f6e206973206e6f74206120636f6c6c656374696f6e2061646d696e2e484b65794e6f74496e436f6c6c656374696f6e00010484546865206b6579206973206e6f7420696e2074686520636f6c6c656374696f6e2e404b65794e6f745265676973746572656400020464546865206b6579206973206e6f742072656769737465726564444d6178436f6c6c656374696f6e53697a650003045c436f6c6c656374696f6e2073697a652072656163686564684e6f4f7261636c65436f6c6c656374696f6e4368616e676549640004040101546865206368616e676520696420646f6573206e6f7420636f72726573706f6e6420746f20616e206f7261636c6520636f6c6c656374696f6e206368616e67654c4f7261636c6556616c75654f75746461746564000504cc546865206f7261636c652076616c756520686173207061737365642074686520636f6c6c656374696f6e206d6178206167652e404e6f74456e6f75676846656564657273000604b454686520616d6f756e74206f66206665656465727320666f722061206b6579206973206e6f7420656e6f756768048054686520604572726f726020656e756d206f6620746869732070616c6c65742e690e084470616c6c65745f616e63686f72735f763218416e63686f7204045400001401286163636f756e745f6964000130543a3a4163636f756e74496400012c646f63756d656e745f6964180128446f63756d656e744964000140646f63756d656e745f76657273696f6e2c013c446f63756d656e7456657273696f6e0001106861736830011c543a3a4861736800011c6465706f736974180128543a3a42616c616e636500006d0e0000040800510e00710e0c4470616c6c65745f616e63686f72735f76321870616c6c6574144572726f720404540001104c416e63686f72416c72656164794578697374730000046854686520616e63686f7220616c7265616479206578697374732e6c506572736f6e616c416e63686f72416c72656164794578697374730001048c54686520706572736f6e616c20616e63686f7220616c7265616479206578697374732e38416e63686f724e6f74466f756e640002049054686520616e63686f7220776173206e6f7420666f756e6420696e2073746f726167652e58506572736f6e616c416e63686f724e6f74466f756e64000304b454686520706572736f6e616c20616e63686f7220776173206e6f7420666f756e6420696e2073746f726167652e048054686520604572726f726020656e756d206f6620746869732070616c6c65742e750e00000408bd086400790e0c9070616c6c65745f6c69717569646974795f706f6f6c735f676174657761795f71756575651870616c6c6574144572726f720404540001043c4d6573736167654e6f74466f756e64000004484d657373616765206e6f7420666f756e642e048054686520604572726f726020656e756d206f6620746869732070616c6c65742e7d0e0c4c626f756e6465645f636f6c6c656374696f6e7344626f756e6465645f62747265655f7365743c426f756e6465644254726565536574080454015d01045300000400810e012c42547265655365743c543e0000810e04204254726565536574040454015d01000400850e000000850e0000025d0100890e0000028d0e008d0e086463756d756c75735f70616c6c65745f78636d705f7175657565584f7574626f756e644368616e6e656c44657461696c730000140124726563697069656e745d0101185061726149640001147374617465910e01344f7574626f756e6453746174650001347369676e616c735f6578697374780110626f6f6c00012c66697273745f696e646578b4010c7531360001286c6173745f696e646578b4010c7531360000910e086463756d756c75735f70616c6c65745f78636d705f7175657565344f7574626f756e645374617465000108084f6b0000002453757370656e64656400010000950e000004085d01b400990e086463756d756c75735f70616c6c65745f78636d705f71756575653c5175657565436f6e6669674461746100000c014473757370656e645f7468726573686f6c6410010c75333200013864726f705f7468726573686f6c6410010c753332000140726573756d655f7468726573686f6c6410010c75333200009d0e0c6463756d756c75735f70616c6c65745f78636d705f71756575651870616c6c6574144572726f7204045400010c384261645175657565436f6e666967000004110153657474696e672074686520717565756520636f6e666967206661696c65642073696e6365206f6e65206f66206974732076616c7565732077617320696e76616c69642e40416c726561647953757370656e6465640001048c54686520657865637574696f6e20697320616c72656164792073757370656e6465642e38416c7265616479526573756d65640002048454686520657865637574696f6e20697320616c726561647920726573756d65642e048054686520604572726f726020656e756d206f6620746869732070616c6c65742ea10e0c2870616c6c65745f78636d1870616c6c65742c5175657279537461747573042c426c6f636b4e756d6265720110010c1c50656e64696e67100124726573706f6e646572cd04014456657273696f6e65644c6f636174696f6e00014c6d617962655f6d617463685f71756572696572ed0601644f7074696f6e3c56657273696f6e65644c6f636174696f6e3e0001306d617962655f6e6f74696679a50e01404f7074696f6e3c2875382c207538293e00011c74696d656f757410012c426c6f636b4e756d6265720000003c56657273696f6e4e6f7469666965720801186f726967696ecd04014456657273696f6e65644c6f636174696f6e00012469735f616374697665780110626f6f6c000100145265616479080120726573706f6e7365ad0e014456657273696f6e6564526573706f6e7365000108617410012c426c6f636b4e756d62657200020000a50e04184f7074696f6e04045401a90e0108104e6f6e6500000010536f6d650400a90e0000010000a90e00000408080800ad0e080c78636d4456657273696f6e6564526573706f6e736500010c08563204008905013076323a3a526573706f6e73650002000856330400d505013076333a3a526573706f6e736500030008563404003906013076343a3a526573706f6e736500040000b10e0000040810cd0400b50e0000040c2c241000b90e0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401bd0e045300000400c10e01185665633c543e0000bd0e00000408cd041000c10e000002bd0e00c50e0c2870616c6c65745f78636d1870616c6c65745456657273696f6e4d6967726174696f6e53746167650001105c4d696772617465537570706f7274656456657273696f6e0000005c4d69677261746556657273696f6e4e6f74696669657273000100504e6f7469667943757272656e745461726765747304007504013c4f7074696f6e3c5665633c75383e3e000200684d696772617465416e644e6f746966794f6c645461726765747300030000c90e0000040c1000cd0e00cd0e080c78636d4056657273696f6e6564417373657449640001080856330400c905012c76333a3a4173736574496400030008563404002d06012c76343a3a4173736574496400040000d10e0c2870616c6c65745f78636d1870616c6c65746852656d6f74654c6f636b656446756e6769626c655265636f72640848436f6e73756d65724964656e74696669657201a8304d6178436f6e73756d6572730000100118616d6f756e74180110753132380001146f776e6572cd04014456657273696f6e65644c6f636174696f6e0001186c6f636b6572cd04014456657273696f6e65644c6f636174696f6e000124636f6e73756d657273d50e01d0426f756e6465645665633c28436f6e73756d65724964656e7469666965722c2075313238292c204d6178436f6e73756d6572733e0000d50e0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401d90e045300000400dd0e01185665633c543e0000d90e00000408a81800dd0e000002d90e00e10e0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401e50e045300000400e90e01185665633c543e0000e50e0000040818cd0400e90e000002e50e00ed0e0c2870616c6c65745f78636d1870616c6c6574144572726f720404540001642c556e726561636861626c650000085d0154686520646573697265642064657374696e6174696f6e2077617320756e726561636861626c652c2067656e6572616c6c7920626563617573652074686572652069732061206e6f20776179206f6620726f7574696e6718746f2069742e2c53656e644661696c757265000108410154686572652077617320736f6d65206f746865722069737375652028692e652e206e6f7420746f20646f207769746820726f7574696e672920696e2073656e64696e6720746865206d6573736167652ec8506572686170732061206c61636b206f6620737061636520666f7220627566666572696e6720746865206d6573736167652e2046696c74657265640002049c546865206d65737361676520657865637574696f6e206661696c73207468652066696c7465722e48556e776569676861626c654d657373616765000304b4546865206d65737361676527732077656967687420636f756c64206e6f742062652064657465726d696e65642e6044657374696e6174696f6e4e6f74496e7665727469626c65000404dc5468652064657374696e6174696f6e20604c6f636174696f6e602070726f76696465642063616e6e6f7420626520696e7665727465642e14456d707479000504805468652061737365747320746f2062652073656e742061726520656d7074792e3843616e6e6f745265616e63686f720006043501436f756c64206e6f742072652d616e63686f72207468652061737365747320746f206465636c61726520746865206665657320666f72207468652064657374696e6174696f6e20636861696e2e34546f6f4d616e79417373657473000704c4546f6f206d616e79206173736574732068617665206265656e20617474656d7074656420666f72207472616e736665722e34496e76616c69644f726967696e000804784f726967696e20697320696e76616c696420666f722073656e64696e672e2842616456657273696f6e00090421015468652076657273696f6e206f6620746865206056657273696f6e6564602076616c75652075736564206973206e6f742061626c6520746f20626520696e7465727072657465642e2c4261644c6f636174696f6e000a08410154686520676976656e206c6f636174696f6e20636f756c64206e6f7420626520757365642028652e672e20626563617573652069742063616e6e6f742062652065787072657373656420696e2074686560646573697265642076657273696f6e206f662058434d292e384e6f537562736372697074696f6e000b04bc546865207265666572656e63656420737562736372697074696f6e20636f756c64206e6f7420626520666f756e642e44416c726561647953756273637269626564000c041101546865206c6f636174696f6e20697320696e76616c69642073696e636520697420616c726561647920686173206120737562736372697074696f6e2066726f6d2075732e5843616e6e6f74436865636b4f757454656c65706f7274000d042901436f756c64206e6f7420636865636b2d6f7574207468652061737365747320666f722074656c65706f72746174696f6e20746f207468652064657374696e6174696f6e20636861696e2e284c6f7742616c616e6365000e044101546865206f776e657220646f6573206e6f74206f776e2028616c6c29206f662074686520617373657420746861742074686579207769736820746f20646f20746865206f7065726174696f6e206f6e2e30546f6f4d616e794c6f636b73000f04c0546865206173736574206f776e65722068617320746f6f206d616e79206c6f636b73206f6e207468652061737365742e4c4163636f756e744e6f74536f7665726569676e001004310154686520676976656e206163636f756e74206973206e6f7420616e206964656e7469666961626c6520736f7665726569676e206163636f756e7420666f7220616e79206c6f636174696f6e2e28466565734e6f744d65740011042901546865206f7065726174696f6e207265717569726564206665657320746f20626520706169642077686963682074686520696e69746961746f7220636f756c64206e6f74206d6565742e304c6f636b4e6f74466f756e64001204f4412072656d6f7465206c6f636b20776974682074686520636f72726573706f6e64696e67206461746120636f756c64206e6f7420626520666f756e642e14496e557365001304490154686520756e6c6f636b206f7065726174696f6e2063616e6e6f742073756363656564206265636175736520746865726520617265207374696c6c20636f6e73756d657273206f6620746865206c6f636b2e5c496e76616c696441737365744e6f74436f6e63726574650014046c496e76616c6964206e6f6e2d636f6e63726574652061737365742e68496e76616c69644173736574556e6b6e6f776e52657365727665001504f0496e76616c69642061737365742c207265736572766520636861696e20636f756c64206e6f742062652064657465726d696e656420666f722069742e78496e76616c69644173736574556e737570706f72746564526573657276650016044501496e76616c69642061737365742c20646f206e6f7420737570706f72742072656d6f7465206173736574207265736572766573207769746820646966666572656e7420666565732072657365727665732e3c546f6f4d616e7952657365727665730017044901546f6f206d616e7920617373657473207769746820646966666572656e742072657365727665206c6f636174696f6e732068617665206265656e20617474656d7074656420666f72207472616e736665722e604c6f63616c457865637574696f6e496e636f6d706c6574650018047c4c6f63616c2058434d20657865637574696f6e20696e636f6d706c6574652e048054686520604572726f726020656e756d206f6620746869732070616c6c65742ef10e0c6470616c6c65745f726573747269637465645f78746f6b656e731870616c6c6574144572726f720404540001042842616456657273696f6e000000048054686520604572726f726020656e756d206f6620746869732070616c6c65742ef50e0c5470616c6c65745f78636d5f7472616e736163746f723472656c61795f696e64696365734452656c6179436861696e496e6469636573000048011c7374616b696e67080108753800011c7574696c697479080108753800011068726d700801087538000110626f6e640801087538000128626f6e645f65787472610801087538000118756e626f6e64080108753800014477697468647261775f756e626f6e646564080108753800012076616c696461746508010875380001206e6f6d696e61746508010875380001146368696c6c08010875380001247365745f706179656508010875380001387365745f636f6e74726f6c6c657208010875380001187265626f6e64080108753800013461735f646572697661746976650801087538000144696e69745f6f70656e5f6368616e6e656c080108753800014c6163636570745f6f70656e5f6368616e6e656c0801087538000134636c6f73655f6368616e6e656c080108753800014c63616e63656c5f6f70656e5f7265717565737408010875380000f90e0c5470616c6c65745f78636d5f7472616e736163746f721870616c6c6574144572726f7204045400016c4c496e646578416c7265616479436c61696d656400000038556e636c61696d6564496e646578000100204e6f744f776e657200020048556e776569676861626c654d6573736167650003003843616e6e6f745265616e63686f720004004441737365744861734e6f526573657276650005002c496e76616c696444657374000600544e6f7443726f7373436861696e5472616e7366657200070078417373657449734e6f7452657365727665496e44657374696e6174696f6e0008006044657374696e6174696f6e4e6f74496e7665727469626c650009003c4572726f7244656c69766572696e67000a008c44697370617463685765696768744269676765725468616e546f74616c576569676874000b00385765696768744f766572666c6f77000c0038416d6f756e744f766572666c6f77000d00505472616e736163746f72496e666f4e6f74536574000e00844e6f7443726f7373436861696e5472616e7366657261626c6543757272656e6379000f003c58636d457865637574654572726f720010002842616456657273696f6e001100604d61785765696768745472616e736163745265616368656400120054556e61626c65546f57697468647261774173736574001300484665655065725365636f6e644e6f74536574001400985369676e65645472616e736163744e6f74416c6c6f776564466f7244657374696e6174696f6e001500744661696c65644d756c74694c6f636174696f6e546f4a756e6374696f6e0016006448726d7048616e646c65724e6f74496d706c656d656e74656400170038546f6f4d756368466565557365640018003c4572726f7256616c69646174696e6700190088526566756e644e6f74537570706f72746564576974685472616e73616374496e666f001a00040d01416e206572726f7220746861742063616e206f63637572207768696c6520657865637574696e6720746865206d617070696e672070616c6c65742773206c6f6769632efd0e0c306f726d6c5f78746f6b656e73186d6f64756c65144572726f7204045400014c4441737365744861734e6f5265736572766500000478417373657420686173206e6f2072657365727665206c6f636174696f6e2e544e6f7443726f7373436861696e5472616e73666572000104644e6f742063726f73732d636861696e207472616e736665722e2c496e76616c69644465737400020474496e76616c6964207472616e736665722064657374696e6174696f6e2e844e6f7443726f7373436861696e5472616e7366657261626c6543757272656e6379000304a443757272656e6379206973206e6f742063726f73732d636861696e207472616e7366657261626c652e48556e776569676861626c654d657373616765000404b4546865206d65737361676527732077656967687420636f756c64206e6f742062652064657465726d696e65642e4858636d457865637574696f6e4661696c65640005045458434d20657865637574696f6e206661696c65642e3843616e6e6f745265616e63686f72000608e8436f756c64206e6f742072652d616e63686f72207468652061737365747320746f206465636c61726520746865206665657320666f72207468654864657374696e6174696f6e20636861696e2e3c496e76616c6964416e636573747279000704c4436f756c64206e6f742067657420616e636573747279206f662061737365742072657365727665206c6f636174696f6e2e30496e76616c696441737365740008045454686520417373657420697320696e76616c69642e6044657374696e6174696f6e4e6f74496e7665727469626c65000904dc5468652064657374696e6174696f6e20604c6f636174696f6e602070726f76696465642063616e6e6f7420626520696e7665727465642e2842616456657273696f6e000a08ec5468652076657273696f6e206f6620746865206056657273696f6e6564602076616c75652075736564206973206e6f742061626c6520746f20626530696e7465727072657465642e7444697374696e637452657365727665466f724173736574416e64466565000b08fc57652074726965642073656e64696e672064697374696e637420617373657420616e6420666565206275742074686579206861766520646966666572656e743c7265736572766520636861696e732e1c5a65726f466565000c044054686520666565206973207a65726f2e285a65726f416d6f756e74000d0494546865207472616e73666572696e6720617373657420616d6f756e74206973207a65726f2e58546f6f4d616e794173736574734265696e6753656e74000e04d0546865206e756d626572206f662061737365747320746f2062652073656e74206973206f76657220746865206d6178696d756d2e544173736574496e6465784e6f6e4578697374656e74000f04d85468652073706563696669656420696e64657820646f6573206e6f7420657869737420696e206120417373657473207374727563742e304665654e6f74456e6f75676800100448466565206973206e6f7420656e6f7567682e504e6f74537570706f727465644c6f636174696f6e001104584e6f7420737570706f72746564204c6f636174696f6e4c4d696e58636d4665654e6f74446566696e6564001204d44d696e58636d466565206e6f74207265676973746572656420666f72206365727461696e2072657365727665206c6f636174696f6e048054686520604572726f726020656e756d206f6620746869732070616c6c65742e010f085070616c6c65745f6d6573736167655f717565756524426f6f6b537461746504344d6573736167654f726967696e01cd0600180114626567696e10012450616765496e64657800010c656e6410012450616765496e646578000114636f756e7410012450616765496e64657800014072656164795f6e65696768626f757273050f01844f7074696f6e3c4e65696768626f7572733c4d6573736167654f726967696e3e3e0001346d6573736167655f636f756e742c010c75363400011073697a652c010c7536340000050f04184f7074696f6e04045401090f0108104e6f6e6500000010536f6d650400090f0000010000090f085070616c6c65745f6d6573736167655f7175657565284e65696768626f75727304344d6573736167654f726967696e01cd060008011070726576cd0601344d6573736167654f726967696e0001106e657874cd0601344d6573736167654f726967696e00000d0f00000408cd061000110f085070616c6c65745f6d6573736167655f71756575651050616765081053697a650110204865617053697a65000018012472656d61696e696e6710011053697a6500013872656d61696e696e675f73697a6510011053697a6500012c66697273745f696e64657810011053697a65000114666972737410011053697a650001106c61737410011053697a6500011068656170150f019c426f756e6465645665633c75382c20496e746f5533323c4865617053697a652c2053697a653e3e0000150f0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401080453000004003401185665633c543e0000190f0c5070616c6c65745f6d6573736167655f71756575651870616c6c6574144572726f720404540001242c4e6f745265617061626c65000008490150616765206973206e6f74207265617061626c65206265636175736520697420686173206974656d732072656d61696e696e6720746f2062652070726f63657373656420616e64206973206e6f74206f6c641c656e6f7567682e184e6f50616765000104845061676520746f2062652072656170656420646f6573206e6f742065786973742e244e6f4d657373616765000204a8546865207265666572656e636564206d65737361676520636f756c64206e6f7420626520666f756e642e40416c726561647950726f6365737365640003040101546865206d6573736167652077617320616c72656164792070726f63657373656420616e642063616e6e6f742062652070726f63657373656420616761696e2e18517565756564000404ac546865206d6573736167652069732071756575656420666f722066757475726520657865637574696f6e2e48496e73756666696369656e74576569676874000504190154686572652069732074656d706f726172696c79206e6f7420656e6f7567682077656967687420746f20636f6e74696e756520736572766963696e67206d657373616765732e6054656d706f726172696c79556e70726f6365737361626c65000610a854686973206d6573736167652069732074656d706f726172696c7920756e70726f6365737361626c652e00590153756368206572726f7273206172652065787065637465642c20627574206e6f742067756172616e746565642c20746f207265736f6c7665207468656d73656c766573206576656e7475616c6c79207468726f756768247265747279696e672e2c517565756550617573656400070cec5468652071756575652069732070617573656420616e64206e6f206d6573736167652063616e2062652065786563757465642066726f6d2069742e001d01546869732063616e206368616e676520617420616e792074696d6520616e64206d6179207265736f6c766520696e20746865206675747572652062792072652d747279696e672e4c526563757273697665446973616c6c6f7765640008043101416e6f746865722063616c6c20697320696e2070726f677265737320616e64206e6565647320746f2066696e697368206265666f726520746869732063616c6c2063616e2068617070656e2e048054686520604572726f726020656e756d206f6620746869732070616c6c65742e1d0f0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401210f045300000400250f01185665633c543e0000210f082c6f726d6c5f746f6b656e732c42616c616e63654c6f636b041c42616c616e636501180008010869647d0201384c6f636b4964656e746966696572000118616d6f756e7418011c42616c616e63650000250f000002210f00290f082c6f726d6c5f746f6b656e732c4163636f756e7444617461041c42616c616e63650118000c01106672656518011c42616c616e6365000120726573657276656418011c42616c616e636500011866726f7a656e18011c42616c616e636500002d0f0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401310f045300000400350f01185665633c543e0000310f082c6f726d6c5f746f6b656e732c52657365727665446174610844526573657276654964656e746966696572017d021c42616c616e636501180008010869647d020144526573657276654964656e746966696572000118616d6f756e7418011c42616c616e63650000350f000002310f00390f0c2c6f726d6c5f746f6b656e73186d6f64756c65144572726f720404540001203442616c616e6365546f6f4c6f77000004585468652062616c616e636520697320746f6f206c6f775c416d6f756e74496e746f42616c616e63654661696c65640001049c43616e6e6f7420636f6e7665727420416d6f756e7420696e746f2042616c616e63652074797065544c69717569646974795265737472696374696f6e73000204d04661696c65642062656361757365206c6971756964697479207265737472696374696f6e732064756520746f206c6f636b696e67404d61784c6f636b734578636565646564000304b44661696c6564206265636175736520746865206d6178696d756d206c6f636b7320776173206578636565646564244b656570416c6976650004048c5472616e736665722f7061796d656e7420776f756c64206b696c6c206163636f756e74484578697374656e7469616c4465706f736974000504e856616c756520746f6f206c6f7720746f20637265617465206163636f756e742064756520746f206578697374656e7469616c206465706f7369742c446561644163636f756e740006048842656e6566696369617279206163636f756e74206d757374207072652d65786973743c546f6f4d616e795265736572766573000700048054686520604572726f726020656e756d206f6620746869732070616c6c65742e3d0f0000040808410f00410f000004082c250100450f0c2c636861696e6272696467651474797065733450726f706f73616c566f74657308244163636f756e74496401002c426c6f636b4e756d626572011000100124766f7465735f666f729401385665633c4163636f756e7449643e000134766f7465735f616761696e73749401385665633c4163636f756e7449643e000118737461747573490f013850726f706f73616c53746174757300011865787069727910012c426c6f636b4e756d6265720000490f0c2c636861696e6272696467651474797065733850726f706f73616c53746174757300010c24496e6974696174656400000020417070726f7665640001002052656a6563746564000200004d0f0c2c636861696e6272696467651870616c6c6574144572726f7204045400013c3c5468726573686f6c644e6f745365740000046452656c61796572207468726573686f6c64206e6f742073657438496e76616c6964436861696e49640001047850726f766964656420636861696e204964206973206e6f742076616c696440496e76616c69645468726573686f6c640002047452656c61796572207468726573686f6c642063616e6e6f7420626520304c436861696e4e6f7457686974656c6973746564000304b4496e746572616374696f6e732077697468207468697320636861696e206973206e6f74207065726d69747465645c436861696e416c726561647957686974656c697374656400040478436861696e2068617320616c7265616479206265656e20656e61626c6564505265736f75726365446f65734e6f744578697374000504b45265736f757263652049442070726f76696465642069736e2774206d617070656420746f20616e797468696e675052656c61796572416c72656164794578697374730006045852656c6179657220616c726561647920696e207365743852656c61796572496e76616c69640007048c50726f7669646564206163636f756e744964206973206e6f7420612072656c61796572344d757374426552656c61796572000804c450726f746563746564206f7065726174696f6e2c206d75737420626520706572666f726d65642062792072656c617965724c52656c61796572416c7265616479566f746564000904e452656c617965722068617320616c7265616479207375626d697474656420736f6d6520766f746520666f7220746869732070726f706f73616c5450726f706f73616c416c7265616479457869737473000a04ec412070726f706f73616c207769746820746865736520706172616d65746572732068617320616c7265616479206265656e207375626d69747465645050726f706f73616c446f65734e6f744578697374000b04844e6f2070726f706f73616c2077697468207468652049442077617320666f756e644c50726f706f73616c4e6f74436f6d706c657465000c04a843616e6e6f7420636f6d706c6574652070726f706f73616c2c206e65656473206d6f726520766f7465735c50726f706f73616c416c7265616479436f6d706c657465000d049c50726f706f73616c2068617320656974686572206661696c6564206f72207375636365656465643c50726f706f73616c45787069726564000e04984c69666574696d65206f662070726f706f73616c20686173206265656e206578636565646564048054686520604572726f726020656e756d206f6620746869732070616c6c65742e510f0c4c6f726d6c5f61737365745f7265676973747279186d6f64756c65144572726f720404540001183441737365744e6f74466f756e6400000450417373657420776173206e6f7420666f756e642e2842616456657273696f6e000108f45468652076657273696f6e206f6620746865206056657273696f6e65644c6f636174696f6e602076616c75652075736564206973206e6f742061626c6548746f20626520696e7465727072657465642e38496e76616c6964417373657449640002046054686520617373657420696420697320696e76616c69642e4c436f6e666c696374696e674c6f636174696f6e000304d8416e6f746865722061737365742077617320616c726561647920726567697374657220776974682074686973206c6f636174696f6e2e48436f6e666c696374696e6741737365744964000404d8416e6f746865722061737365742077617320616c7265616479207265676973746572207769746820746869732061737365742069642e48496e76616c69644173736574537472696e670005046c4e616d65206f722073796d626f6c20697320746f6f206c6f6e672e048054686520604572726f726020656e756d206f6620746869732070616c6c65742e550f0c206f726d6c5f78636d186d6f64756c65144572726f7204045400010c2c556e726561636861626c650000080d01546865206d65737361676520616e642064657374696e6174696f6e20636f6d62696e6174696f6e20776173206e6f74207265636f676e697a6564206173206265696e6728726561636861626c652e2c53656e644661696c7572650001080501546865206d65737361676520616e642064657374696e6174696f6e20776173207265636f676e697a6564206173206265696e6720726561636861626c652062757494746865206f7065726174696f6e20636f756c64206e6f7420626520636f6d706c657465642e2842616456657273696f6e000208ec5468652076657273696f6e206f6620746865206056657273696f6e6564602076616c75652075736564206973206e6f742061626c6520746f20626530696e7465727072657465642e048054686520604572726f726020656e756d206f6620746869732070616c6c65742e590f082870616c6c65745f65766d30436f64654d65746164617461000008011073697a652c010c753634000110686173683001104832353600005d0f0000040821023000610f0c2870616c6c65745f65766d1870616c6c6574144572726f720404540001382842616c616e63654c6f77000004904e6f7420656e6f7567682062616c616e636520746f20706572666f726d20616374696f6e2c4665654f766572666c6f770001048043616c63756c6174696e6720746f74616c20666565206f766572666c6f7765643c5061796d656e744f766572666c6f770002049043616c63756c6174696e6720746f74616c207061796d656e74206f766572666c6f7765643857697468647261774661696c65640003044c576974686472617720666565206661696c6564384761735072696365546f6f4c6f770004045447617320707269636520697320746f6f206c6f772e30496e76616c69644e6f6e6365000504404e6f6e636520697320696e76616c6964384761734c696d6974546f6f4c6f7700060454476173206c696d697420697320746f6f206c6f772e3c4761734c696d6974546f6f4869676800070458476173206c696d697420697320746f6f20686967682e38496e76616c6964436861696e49640008046054686520636861696e20696420697320696e76616c69642e40496e76616c69645369676e617475726500090464746865207369676e617475726520697320696e76616c69642e285265656e7472616e6379000a043845564d207265656e7472616e6379685472616e73616374696f6e4d757374436f6d6546726f6d454f41000b04244549502d333630372c48496e76616c69645472616e73616374696f6e000c044c496e76616c6964205472616e73616374696f6e24556e646566696e6564000d0440556e646566696e6564206572726f722e048054686520604572726f726020656e756d206f6620746869732070616c6c65742e650f000002690f00690f0000040c21076d0f810f006d0f081866705f727063445472616e73616374696f6e53746174757300001c01407472616e73616374696f6e5f68617368300110483235360001447472616e73616374696f6e5f696e64657810010c75333200011066726f6d2102011048313630000108746f710f01304f7074696f6e3c483136303e000140636f6e74726163745f61646472657373710f01304f7074696f6e3c483136303e0001106c6f6773750f01205665633c4c6f673e0001286c6f67735f626c6f6f6d790f0114426c6f6f6d0000710f04184f7074696f6e0404540121020108104e6f6e6500000010536f6d65040021020000010000750f000002f90800790f0820657468626c6f6f6d14426c6f6f6d000004007d0f01405b75383b20424c4f4f4d5f53495a455d00007d0f000003000100000800810f0c20657468657265756d1c726563656970742452656365697074563300010c184c65676163790400850f014445495036353852656365697074446174610000001c454950323933300400850f01484549503239333052656365697074446174610001001c454950313535390400850f014845495031353539526563656970744461746100020000850f0c20657468657265756d1c72656365697074444549503635385265636569707444617461000010012c7374617475735f636f64650801087538000120757365645f6761731d050110553235360001286c6f67735f626c6f6f6d790f0114426c6f6f6d0001106c6f6773750f01205665633c4c6f673e0000890f0c20657468657265756d14626c6f636b14426c6f636b040454012107000c01186865616465728d0f01184865616465720001307472616e73616374696f6e73950f01185665633c543e0001186f6d6d657273990f012c5665633c4865616465723e00008d0f0c20657468657265756d186865616465721848656164657200003c012c706172656e745f686173683001104832353600012c6f6d6d6572735f686173683001104832353600012c62656e6566696369617279210201104831363000012873746174655f726f6f74300110483235360001447472616e73616374696f6e735f726f6f743001104832353600013472656365697074735f726f6f74300110483235360001286c6f67735f626c6f6f6d790f0114426c6f6f6d000128646966666963756c74791d050110553235360001186e756d6265721d050110553235360001246761735f6c696d69741d050110553235360001206761735f757365641d0501105532353600012474696d657374616d702c010c75363400012865787472615f6461746134011442797465730001206d69785f68617368300110483235360001146e6f6e6365910f010c4836340000910f0c38657468657265756d5f747970657310686173680c483634000004007d02011c5b75383b20385d0000950f000002210700990f0000028d0f009d0f000002810f00a10f0000026d0f00a50f0c3c70616c6c65745f657468657265756d1870616c6c6574144572726f7204045400010840496e76616c69645369676e6174757265000004545369676e617475726520697320696e76616c69642e305072654c6f67457869737473000104d85072652d6c6f672069732070726573656e742c207468657265666f7265207472616e73616374206973206e6f7420616c6c6f7765642e048054686520604572726f726020656e756d206f6620746869732070616c6c65742ea90f0c6c70616c6c65745f657468657265756d5f7472616e73616374696f6e1870616c6c6574144572726f720404540001044845766d457865637574696f6e4661696c6564000000048054686520604572726f726020656e756d206f6620746869732070616c6c65742ead0f0c646178656c61725f676174657761795f707265636f6d70696c651870616c6c6574144572726f72040454000108504e6f436f6e766572746572466f72536f75726365000004110154686520676976656e20646f6d61696e206973206e6f742079657420616c6c6f776c69737465642c2061732077652068617665206e6f20636f6e76657274657220796574744163636f756e7442797465734d69736d61746368466f72446f6d61696e00010805014120676976656e20646f6d61696e2065787065637473206120676976656e2073747275637475726520666f72206163636f756e7420627974657320616e642069744c776173206e6f7420676976656e20686572652e048054686520604572726f726020656e756d206f6620746869732070616c6c65742eb10f0c2c70616c6c65745f7375646f1870616c6c6574144572726f720404540001042c526571756972655375646f0000048053656e646572206d75737420626520746865205375646f206163636f756e742e04684572726f7220666f7220746865205375646f2070616c6c65742eb50f000004082c810400b90f0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e646564566563080454012c045300000400090801185665633c543e0000bd0f0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401c10f045300000400cd0f01185665633c543e0000c10f0c246366675f747970657314706f6f6c731c506f6f6c4665650c244163636f756e7449640100144665654964012c28466565416d6f756e747301c50f0010012c64657374696e6174696f6e0001244163636f756e744964000118656469746f7289040160506f6f6c466565456469746f723c4163636f756e7449643e00011c616d6f756e7473c50f0128466565416d6f756e747300010869642c011446656549640000c50f0c246366675f747970657314706f6f6c7338506f6f6c466565416d6f756e7473081c42616c616e636501181052617465019503001001206665655f747970658d040168506f6f6c466565547970653c42616c616e63652c20526174653e00011c70656e64696e6718011c42616c616e636500013064697362757273656d656e7418011c42616c616e636500011c70617961626c65c90f016450617961626c65466565416d6f756e743c42616c616e63653e0000c90f0c246366675f747970657314706f6f6c734050617961626c65466565416d6f756e74041c42616c616e63650118010828416c6c50656e64696e67000000105570546f040018011c42616c616e636500010000cd0f000002c10f00d10f0c246366675f747970657324706f7274666f6c696f48506f7274666f6c696f56616c756174696f6e0c1c42616c616e6365011818456c656d4964012c204d6178456c656d7300000c011476616c756518011c42616c616e63650001306c6173745f757064617465642c011c5365636f6e647300011876616c756573d50f019c426f756e6465645665633c28456c656d49642c2042616c616e6365292c204d6178456c656d733e0000d50f0c4c626f756e6465645f636f6c6c656374696f6e732c626f756e6465645f76656328426f756e64656456656308045401010d045300000400050d01185665633c543e0000d90f0c4070616c6c65745f706f6f6c5f666565731870616c6c6574144572726f7204045400012c484665654964416c7265616479457869737473000004bc417474656d7074656420746f2061646420612066656520696420776869636820616c7265616479206578697374732e2c4665654e6f74466f756e6400010464412066656520636f756c64206e6f7420626520666f756e642e30506f6f6c4e6f74466f756e64000204684120706f6f6c20636f756c64206e6f7420626520666f756e642e304e6f74506f6f6c41646d696e000304c44f6e6c792074686520506f6f6c41646d696e2063616e2065786563757465206120676976656e206f7065726174696f6e2e504d6178506f6f6c466565735065724275636b6574000404c854686520706f6f6c206275636b657420686173207265616368656420746865206d6178696d756d20666565732073697a652e4c4368616e676549644e6f74506f6f6c46656573000504d0546865206368616e676520696420646f6573206e6f742062656c6f6e6720746f206120706f6f6c2066656573206368616e67652e48556e617574686f72697a6564436861726765000604bc546865206665652063616e206f6e6c792062652063686172676564206279207468652064657374696e6174696f6e2e40556e617574686f72697a656445646974000704d0546865206665652063616e206f6e6c7920626520656469746564206f722072656d6f7665642062792074686520656469746f722e3c43616e6e6f74426543686172676564000804bc417474656d7074656420746f20636861726765206120666565206f6620756e63686172676561626c6520747970652e384e6f7468696e674368617267656400090490417474656d7074656420746f206368617267652077697468207a65726f20616d6f756e74404e6f7468696e67556e63686172676564000a0498417474656d7074656420746f20756e6368617267652077697468207a65726f20616d6f756e74048054686520604572726f726020656e756d206f6620746869732070616c6c65742edd0f0c3870616c6c65745f72656d61726b731870616c6c6574144572726f72040454000104244e6f52656d61726b73000004644e6f2072656d61726b7320776572652070726f76696465642e048054686520604572726f726020656e756d206f6620746869732070616c6c65742ee10f0c4070616c6c65745f746f6b656e5f6d75781870616c6c6574144572726f72040454000118404d657461646174614e6f74466f756e640000049c54686520676976656e2063757272656e637920686173206e6f206d65746164617461207365742e544e6f4c6f63616c526570726573656e746174696f6e0001080d0154686520676976656e2063757272656e637920686173206e6f206c6f63616c20726570726573656e746174696f6e20616e642063616e2068656e6365206e6f74206265b06465706f736974656420746f20726563656976652061206c6f63616c20726570726573656e746174696f6e2e30537761704e6f74466f756e64000204745377617020636f756c64206e6f7420626520666f756e64206279206964404e6f744964656e746963616c5377617000030409014d61746368696e67206f726465727320646f6573206f6e6c7920776f726b2069662074686572652069732061206f6e652d746f2d6f6e6520636f6e76657273696f6e54496e76616c69645377617043757272656e63696573000408f454686973206d65616e7320746865207377617020697320656974686572206e6f742061206c6f63616c20746f2076617269616e74206f72206e6f7420615476617269616e7420746f206c6f63616c20737761703c446563696d616c4d69736d617463680005080d0156617269616e7420616e64206c6f63616c20726570726573656e746174696f6e2068617665206d69736d61746368696e6720646563696d616c7320696e207468656972d86d657461646174612e204120636f6e76657273696f6e206265747765656e207468652074776f206973206e6f7420706f737369626c65048054686520604572726f726020656e756d206f6620746869732070616c6c65742ee50f0c4466705f73656c665f636f6e7461696e65644c756e636865636b65645f65787472696e73696348556e636865636b656445787472696e736963101c416464726573730179011043616c6c012501245369676e617475726501f10214457874726101e90f0004001d1001250173705f72756e74696d653a3a67656e657269633a3a556e636865636b656445787472696e7369633c416464726573732c2043616c6c2c205369676e61747572652c2045787472610a3e0000e90f00000428ed0ff10ff50ff90ffd0f051009100d101110191000ed0f10306672616d655f73797374656d28657874656e73696f6e7354636865636b5f6e6f6e5f7a65726f5f73656e64657248436865636b4e6f6e5a65726f53656e64657204045400000000f10f10306672616d655f73797374656d28657874656e73696f6e7348636865636b5f737065635f76657273696f6e40436865636b5370656356657273696f6e04045400000000f50f10306672616d655f73797374656d28657874656e73696f6e7340636865636b5f74785f76657273696f6e38436865636b547856657273696f6e04045400000000f90f10306672616d655f73797374656d28657874656e73696f6e7334636865636b5f67656e6573697330436865636b47656e6573697304045400000000fd0f10306672616d655f73797374656d28657874656e73696f6e733c636865636b5f6d6f7274616c69747938436865636b4d6f7274616c697479040454000004000110010c45726100000110102873705f72756e74696d651c67656e657269630c6572610c4572610001010420496d6d6f7274616c0000001c4d6f7274616c31040008000001001c4d6f7274616c32040008000002001c4d6f7274616c33040008000003001c4d6f7274616c34040008000004001c4d6f7274616c35040008000005001c4d6f7274616c36040008000006001c4d6f7274616c37040008000007001c4d6f7274616c38040008000008001c4d6f7274616c3904000800000900204d6f7274616c313004000800000a00204d6f7274616c313104000800000b00204d6f7274616c313204000800000c00204d6f7274616c313304000800000d00204d6f7274616c313404000800000e00204d6f7274616c313504000800000f00204d6f7274616c313604000800001000204d6f7274616c313704000800001100204d6f7274616c313804000800001200204d6f7274616c313904000800001300204d6f7274616c323004000800001400204d6f7274616c323104000800001500204d6f7274616c323204000800001600204d6f7274616c323304000800001700204d6f7274616c323404000800001800204d6f7274616c323504000800001900204d6f7274616c323604000800001a00204d6f7274616c323704000800001b00204d6f7274616c323804000800001c00204d6f7274616c323904000800001d00204d6f7274616c333004000800001e00204d6f7274616c333104000800001f00204d6f7274616c333204000800002000204d6f7274616c333304000800002100204d6f7274616c333404000800002200204d6f7274616c333504000800002300204d6f7274616c333604000800002400204d6f7274616c333704000800002500204d6f7274616c333804000800002600204d6f7274616c333904000800002700204d6f7274616c343004000800002800204d6f7274616c343104000800002900204d6f7274616c343204000800002a00204d6f7274616c343304000800002b00204d6f7274616c343404000800002c00204d6f7274616c343504000800002d00204d6f7274616c343604000800002e00204d6f7274616c343704000800002f00204d6f7274616c343804000800003000204d6f7274616c343904000800003100204d6f7274616c353004000800003200204d6f7274616c353104000800003300204d6f7274616c353204000800003400204d6f7274616c353304000800003500204d6f7274616c353404000800003600204d6f7274616c353504000800003700204d6f7274616c353604000800003800204d6f7274616c353704000800003900204d6f7274616c353804000800003a00204d6f7274616c353904000800003b00204d6f7274616c363004000800003c00204d6f7274616c363104000800003d00204d6f7274616c363204000800003e00204d6f7274616c363304000800003f00204d6f7274616c363404000800004000204d6f7274616c363504000800004100204d6f7274616c363604000800004200204d6f7274616c363704000800004300204d6f7274616c363804000800004400204d6f7274616c363904000800004500204d6f7274616c373004000800004600204d6f7274616c373104000800004700204d6f7274616c373204000800004800204d6f7274616c373304000800004900204d6f7274616c373404000800004a00204d6f7274616c373504000800004b00204d6f7274616c373604000800004c00204d6f7274616c373704000800004d00204d6f7274616c373804000800004e00204d6f7274616c373904000800004f00204d6f7274616c383004000800005000204d6f7274616c383104000800005100204d6f7274616c383204000800005200204d6f7274616c383304000800005300204d6f7274616c383404000800005400204d6f7274616c383504000800005500204d6f7274616c383604000800005600204d6f7274616c383704000800005700204d6f7274616c383804000800005800204d6f7274616c383904000800005900204d6f7274616c393004000800005a00204d6f7274616c393104000800005b00204d6f7274616c393204000800005c00204d6f7274616c393304000800005d00204d6f7274616c393404000800005e00204d6f7274616c393504000800005f00204d6f7274616c393604000800006000204d6f7274616c393704000800006100204d6f7274616c393804000800006200204d6f7274616c393904000800006300244d6f7274616c31303004000800006400244d6f7274616c31303104000800006500244d6f7274616c31303204000800006600244d6f7274616c31303304000800006700244d6f7274616c31303404000800006800244d6f7274616c31303504000800006900244d6f7274616c31303604000800006a00244d6f7274616c31303704000800006b00244d6f7274616c31303804000800006c00244d6f7274616c31303904000800006d00244d6f7274616c31313004000800006e00244d6f7274616c31313104000800006f00244d6f7274616c31313204000800007000244d6f7274616c31313304000800007100244d6f7274616c31313404000800007200244d6f7274616c31313504000800007300244d6f7274616c31313604000800007400244d6f7274616c31313704000800007500244d6f7274616c31313804000800007600244d6f7274616c31313904000800007700244d6f7274616c31323004000800007800244d6f7274616c31323104000800007900244d6f7274616c31323204000800007a00244d6f7274616c31323304000800007b00244d6f7274616c31323404000800007c00244d6f7274616c31323504000800007d00244d6f7274616c31323604000800007e00244d6f7274616c31323704000800007f00244d6f7274616c31323804000800008000244d6f7274616c31323904000800008100244d6f7274616c31333004000800008200244d6f7274616c31333104000800008300244d6f7274616c31333204000800008400244d6f7274616c31333304000800008500244d6f7274616c31333404000800008600244d6f7274616c31333504000800008700244d6f7274616c31333604000800008800244d6f7274616c31333704000800008900244d6f7274616c31333804000800008a00244d6f7274616c31333904000800008b00244d6f7274616c31343004000800008c00244d6f7274616c31343104000800008d00244d6f7274616c31343204000800008e00244d6f7274616c31343304000800008f00244d6f7274616c31343404000800009000244d6f7274616c31343504000800009100244d6f7274616c31343604000800009200244d6f7274616c31343704000800009300244d6f7274616c31343804000800009400244d6f7274616c31343904000800009500244d6f7274616c31353004000800009600244d6f7274616c31353104000800009700244d6f7274616c31353204000800009800244d6f7274616c31353304000800009900244d6f7274616c31353404000800009a00244d6f7274616c31353504000800009b00244d6f7274616c31353604000800009c00244d6f7274616c31353704000800009d00244d6f7274616c31353804000800009e00244d6f7274616c31353904000800009f00244d6f7274616c3136300400080000a000244d6f7274616c3136310400080000a100244d6f7274616c3136320400080000a200244d6f7274616c3136330400080000a300244d6f7274616c3136340400080000a400244d6f7274616c3136350400080000a500244d6f7274616c3136360400080000a600244d6f7274616c3136370400080000a700244d6f7274616c3136380400080000a800244d6f7274616c3136390400080000a900244d6f7274616c3137300400080000aa00244d6f7274616c3137310400080000ab00244d6f7274616c3137320400080000ac00244d6f7274616c3137330400080000ad00244d6f7274616c3137340400080000ae00244d6f7274616c3137350400080000af00244d6f7274616c3137360400080000b000244d6f7274616c3137370400080000b100244d6f7274616c3137380400080000b200244d6f7274616c3137390400080000b300244d6f7274616c3138300400080000b400244d6f7274616c3138310400080000b500244d6f7274616c3138320400080000b600244d6f7274616c3138330400080000b700244d6f7274616c3138340400080000b800244d6f7274616c3138350400080000b900244d6f7274616c3138360400080000ba00244d6f7274616c3138370400080000bb00244d6f7274616c3138380400080000bc00244d6f7274616c3138390400080000bd00244d6f7274616c3139300400080000be00244d6f7274616c3139310400080000bf00244d6f7274616c3139320400080000c000244d6f7274616c3139330400080000c100244d6f7274616c3139340400080000c200244d6f7274616c3139350400080000c300244d6f7274616c3139360400080000c400244d6f7274616c3139370400080000c500244d6f7274616c3139380400080000c600244d6f7274616c3139390400080000c700244d6f7274616c3230300400080000c800244d6f7274616c3230310400080000c900244d6f7274616c3230320400080000ca00244d6f7274616c3230330400080000cb00244d6f7274616c3230340400080000cc00244d6f7274616c3230350400080000cd00244d6f7274616c3230360400080000ce00244d6f7274616c3230370400080000cf00244d6f7274616c3230380400080000d000244d6f7274616c3230390400080000d100244d6f7274616c3231300400080000d200244d6f7274616c3231310400080000d300244d6f7274616c3231320400080000d400244d6f7274616c3231330400080000d500244d6f7274616c3231340400080000d600244d6f7274616c3231350400080000d700244d6f7274616c3231360400080000d800244d6f7274616c3231370400080000d900244d6f7274616c3231380400080000da00244d6f7274616c3231390400080000db00244d6f7274616c3232300400080000dc00244d6f7274616c3232310400080000dd00244d6f7274616c3232320400080000de00244d6f7274616c3232330400080000df00244d6f7274616c3232340400080000e000244d6f7274616c3232350400080000e100244d6f7274616c3232360400080000e200244d6f7274616c3232370400080000e300244d6f7274616c3232380400080000e400244d6f7274616c3232390400080000e500244d6f7274616c3233300400080000e600244d6f7274616c3233310400080000e700244d6f7274616c3233320400080000e800244d6f7274616c3233330400080000e900244d6f7274616c3233340400080000ea00244d6f7274616c3233350400080000eb00244d6f7274616c3233360400080000ec00244d6f7274616c3233370400080000ed00244d6f7274616c3233380400080000ee00244d6f7274616c3233390400080000ef00244d6f7274616c3234300400080000f000244d6f7274616c3234310400080000f100244d6f7274616c3234320400080000f200244d6f7274616c3234330400080000f300244d6f7274616c3234340400080000f400244d6f7274616c3234350400080000f500244d6f7274616c3234360400080000f600244d6f7274616c3234370400080000f700244d6f7274616c3234380400080000f800244d6f7274616c3234390400080000f900244d6f7274616c3235300400080000fa00244d6f7274616c3235310400080000fb00244d6f7274616c3235320400080000fc00244d6f7274616c3235330400080000fd00244d6f7274616c3235340400080000fe00244d6f7274616c3235350400080000ff0000051010306672616d655f73797374656d28657874656e73696f6e732c636865636b5f6e6f6e636528436865636b4e6f6e636504045400000400b1010120543a3a4e6f6e63650000091010306672616d655f73797374656d28657874656e73696f6e7330636865636b5f7765696768742c436865636b576569676874040454000000000d10086870616c6c65745f7472616e73616374696f6e5f7061796d656e74604368617267655472616e73616374696f6e5061796d656e74040454000004008501013042616c616e63654f663c543e0000111008746672616d655f6d657461646174615f686173685f657874656e73696f6e44436865636b4d657461646174614861736804045400000401106d6f6465151001104d6f64650000151008746672616d655f6d657461646174615f686173685f657874656e73696f6e104d6f64650001082044697361626c65640000001c456e61626c65640001000019100c3872756e74696d655f636f6d6d6f6e3c7472616e736665725f66696c7465726c50726542616c616e63655472616e73666572457874656e73696f6e040454000000001d10102873705f72756e74696d651c67656e657269634c756e636865636b65645f65787472696e73696348556e636865636b656445787472696e736963101c416464726573730179011043616c6c012501245369676e617475726501f10214457874726101e90f000400340000002d011853797374656d011853797374656d441c4163636f756e7401010402000c4101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008004e8205468652066756c6c206163636f756e7420696e666f726d6174696f6e20666f72206120706172746963756c6172206163636f756e742049442e3845787472696e736963436f756e74000010040004b820546f74616c2065787472696e7369637320636f756e7420666f72207468652063757272656e7420626c6f636b2e2c426c6f636b576569676874010020180000000000000488205468652063757272656e742077656967687420666f722074686520626c6f636b2e40416c6c45787472696e736963734c656e000010040004410120546f74616c206c656e6774682028696e2062797465732920666f7220616c6c2065787472696e736963732070757420746f6765746865722c20666f72207468652063757272656e7420626c6f636b2e24426c6f636b486173680101040510308000000000000000000000000000000000000000000000000000000000000000000498204d6170206f6620626c6f636b206e756d6265727320746f20626c6f636b206861736865732e3445787472696e736963446174610101040510340400043d012045787472696e73696373206461746120666f72207468652063757272656e7420626c6f636b20286d61707320616e2065787472696e736963277320696e64657820746f206974732064617461292e184e756d6265720100101000000000040901205468652063757272656e7420626c6f636b206e756d626572206265696e672070726f6365737365642e205365742062792060657865637574655f626c6f636b602e28506172656e744861736801003080000000000000000000000000000000000000000000000000000000000000000004702048617368206f66207468652070726576696f757320626c6f636b2e18446967657374010038040004f020446967657374206f66207468652063757272656e7420626c6f636b2c20616c736f2070617274206f662074686520626c6f636b206865616465722e184576656e747301004804001ca0204576656e7473206465706f736974656420666f72207468652063757272656e7420626c6f636b2e001d01204e4f54453a20546865206974656d20697320756e626f756e6420616e642073686f756c64207468657265666f7265206e657665722062652072656164206f6e20636861696e2ed020497420636f756c64206f746865727769736520696e666c6174652074686520506f562073697a65206f66206120626c6f636b2e002d01204576656e747320686176652061206c6172676520696e2d6d656d6f72792073697a652e20426f7820746865206576656e747320746f206e6f7420676f206f75742d6f662d6d656d6f7279fc206a75737420696e206361736520736f6d656f6e65207374696c6c207265616473207468656d2066726f6d2077697468696e207468652072756e74696d652e284576656e74436f756e74010010100000000004b820546865206e756d626572206f66206576656e747320696e2074686520604576656e74733c543e60206c6973742e2c4576656e74546f7069637301010402303d090400282501204d617070696e67206265747765656e206120746f7069632028726570726573656e74656420627920543a3a486173682920616e64206120766563746f72206f6620696e646578657394206f66206576656e747320696e2074686520603c4576656e74733c543e3e60206c6973742e00510120416c6c20746f70696320766563746f727320686176652064657465726d696e69737469632073746f72616765206c6f636174696f6e7320646570656e64696e67206f6e2074686520746f7069632e2054686973450120616c6c6f7773206c696768742d636c69656e747320746f206c6576657261676520746865206368616e67657320747269652073746f7261676520747261636b696e67206d656368616e69736d20616e64e420696e2063617365206f66206368616e67657320666574636820746865206c697374206f66206576656e7473206f6620696e7465726573742e005901205468652076616c756520686173207468652074797065206028426c6f636b4e756d626572466f723c543e2c204576656e74496e646578296020626563617573652069662077652075736564206f6e6c79206a7573744d012074686520604576656e74496e64657860207468656e20696e20636173652069662074686520746f70696320686173207468652073616d6520636f6e74656e7473206f6e20746865206e65787420626c6f636b0101206e6f206e6f74696669636174696f6e2077696c6c20626520747269676765726564207468757320746865206576656e74206d69676874206265206c6f73742e484c61737452756e74696d65557067726164650000410904000455012053746f726573207468652060737065635f76657273696f6e6020616e642060737065635f6e616d6560206f66207768656e20746865206c6173742072756e74696d6520757067726164652068617070656e65642e545570677261646564546f553332526566436f756e740100780400044d012054727565206966207765206861766520757067726164656420736f207468617420607479706520526566436f756e74602069732060753332602e2046616c7365202864656661756c7429206966206e6f742e605570677261646564546f547269706c65526566436f756e740100780400085d012054727565206966207765206861766520757067726164656420736f2074686174204163636f756e74496e666f20636f6e7461696e73207468726565207479706573206f662060526566436f756e74602e2046616c736548202864656661756c7429206966206e6f742e38457865637574696f6e506861736500003909040004882054686520657865637574696f6e207068617365206f662074686520626c6f636b2e44417574686f72697a65645570677261646500004509040004b82060536f6d6560206966206120636f6465207570677261646520686173206265656e20617574686f72697a65642e01290101541830426c6f636b5765696768747349096d01025b1f5d00070088526a7402004001c2a0a91d000107d0c33576510200e000010700e6bd4f570200f000010000c2a0a91d000107d065ca906e0200300101070088526a7402004001010700a2941a1d02005000c2a0a91d0000000004d020426c6f636b20262065787472696e7369637320776569676874733a20626173652076616c75657320616e64206c696d6974732e2c426c6f636b4c656e67746855093000003c00000050000000500004a820546865206d6178696d756d206c656e677468206f66206120626c6f636b2028696e206279746573292e38426c6f636b48617368436f756e74101000100000045501204d6178696d756d206e756d626572206f6620626c6f636b206e756d62657220746f20626c6f636b2068617368206d617070696e677320746f206b65657020286f6c64657374207072756e6564206669727374292e2044625765696768745d094040787d010000000000e1f505000000000409012054686520776569676874206f662072756e74696d65206461746162617365206f7065726174696f6e73207468652072756e74696d652063616e20696e766f6b652e1c56657273696f6e6109c1044063656e747269667567652d646576656c4063656e747269667567652d646576656c010000007a0500000100000054df6acb689907609b0400000037e397fc7c91f5e40200000040fe3ad401f8959a06000000d2bc9897eed08f1503000000f78b278be53f454c02000000ab3c0572291feb8b01000000dd718d5cc53262d401000000bc9d89904f5b923f0100000037c8bb1350a9a2a804000000ea93e3f16f3d696202000000c937d79c92c4e872010000009ce8a204acbb1235010000008f5c2d0094ecd0470100000022b97323b9e853da03000000639021f9c79c4897010000009c62715b4dcff733010000006575ae9c9f645c5001000000a03b94ae2668f24301000000582211f65bb14b8905000000e65b00e46cedd0aa02000000fbc577b9d747efd60100000002000000000484204765742074686520636861696e27732063757272656e742076657273696f6e2e2853533538507265666978b408880014a8205468652064657369676e61746564205353353820707265666978206f66207468697320636861696e2e0039012054686973207265706c6163657320746865202273733538466f726d6174222070726f7065727479206465636c6172656420696e2074686520636861696e20737065632e20526561736f6e20697331012074686174207468652072756e74696d652073686f756c64206b6e6f772061626f7574207468652070726566697820696e206f7264657220746f206d616b6520757365206f662069742061737020616e206964656e746966696572206f662074686520636861696e2e017109003c50617261636861696e53797374656d013c50617261636861696e53797374656d6044556e696e636c756465645365676d656e74010075090400184901204c617465737420696e636c7564656420626c6f636b2064657363656e64616e7473207468652072756e74696d652061636365707465642e20496e206f7468657220776f7264732c20746865736520617265610120616e636573746f7273206f66207468652063757272656e746c7920657865637574696e6720626c6f636b2077686963682068617665206e6f74206265656e20696e636c7564656420696e20746865206f627365727665644c2072656c61792d636861696e2073746174652e00750120546865207365676d656e74206c656e677468206973206c696d69746564206279207468652063617061636974792072657475726e65642066726f6d20746865205b60436f6e73656e737573486f6f6b605d20636f6e666967757265643c20696e207468652070616c6c65742e6c41676772656761746564556e696e636c756465645365676d656e740000990904000c69012053746f72616765206669656c642074686174206b6565707320747261636b206f662062616e64776964746820757365642062792074686520756e696e636c75646564207365676d656e7420616c6f6e672077697468207468652d01206c61746573742048524d502077617465726d61726b2e205573656420666f72206c696d6974696e672074686520616363657074616e6365206f66206e657720626c6f636b73207769746890207265737065637420746f2072656c617920636861696e20636f6e73747261696e74732e5450656e64696e6756616c69646174696f6e436f6465010034040018590120496e2063617365206f662061207363686564756c656420757067726164652c20746869732073746f72616765206669656c6420636f6e7461696e73207468652076616c69646174696f6e20636f646520746f20626524206170706c6965642e003d0120417320736f6f6e206173207468652072656c617920636861696e2067697665732075732074686520676f2d6168656164207369676e616c2c2077652077696c6c206f7665727772697465207468657101205b603a636f6465605d5b73705f636f72653a3a73746f726167653a3a77656c6c5f6b6e6f776e5f6b6579733a3a434f44455d2077686963682077696c6c20726573756c7420746865206e65787420626c6f636b2070726f636573730901207769746820746865206e65772076616c69646174696f6e20636f64652e205468697320636f6e636c756465732074686520757067726164652070726f636573732e444e657756616c69646174696f6e436f64650000340400145d012056616c69646174696f6e20636f6465207468617420697320736574206279207468652070617261636861696e20616e6420697320746f20626520636f6d6d756e69636174656420746f20636f6c6c61746f7220616e647820636f6e73657175656e746c79207468652072656c61792d636861696e2e00650120546869732077696c6c20626520636c656172656420696e20606f6e5f696e697469616c697a6560206f662065616368206e657720626c6f636b206966206e6f206f746865722070616c6c657420616c7265616479207365742c207468652076616c75652e3856616c69646174696f6e446174610000410104000cd020546865205b6050657273697374656456616c69646174696f6e44617461605d2073657420666f72207468697320626c6f636b2e2d0120546869732076616c756520697320657870656374656420746f20626520736574206f6e6c79206f6e63652070657220626c6f636b20616e642069742773206e657665722073746f7265643420696e2074686520747269652e5044696453657456616c69646174696f6e436f6465010078040004e02057657265207468652076616c69646174696f6e20646174612073657420746f206e6f74696679207468652072656c617920636861696e3f644c61737452656c6179436861696e426c6f636b4e756d62657201001010000000000c1d01205468652072656c617920636861696e20626c6f636b206e756d626572206173736f636961746564207769746820746865206c6173742070617261636861696e20626c6f636b2e00882054686973206973207570646174656420696e20606f6e5f66696e616c697a65602e60557067726164655265737472696374696f6e5369676e616c01009d0904001c750120416e206f7074696f6e20776869636820696e64696361746573206966207468652072656c61792d636861696e20726573747269637473207369676e616c6c696e6720612076616c69646174696f6e20636f646520757067726164652e610120496e206f7468657220776f7264732c20696620746869732069732060536f6d656020616e64205b604e657756616c69646174696f6e436f6465605d2069732060536f6d6560207468656e207468652070726f64756365646c2063616e6469646174652077696c6c20626520696e76616c69642e00710120546869732073746f72616765206974656d2069732061206d6972726f72206f662074686520636f72726573706f6e64696e672076616c756520666f72207468652063757272656e742070617261636861696e2066726f6d207468656d012072656c61792d636861696e2e20546869732076616c756520697320657068656d6572616c207768696368206d65616e7320697420646f65736e277420686974207468652073746f726167652e20546869732076616c756520697360207365742061667465722074686520696e686572656e742e3855706772616465476f416865616401009109040014dc204f7074696f6e616c207570677261646520676f2d6168656164207369676e616c2066726f6d207468652072656c61792d636861696e2e00710120546869732073746f72616765206974656d2069732061206d6972726f72206f662074686520636f72726573706f6e64696e672076616c756520666f72207468652063757272656e742070617261636861696e2066726f6d207468656d012072656c61792d636861696e2e20546869732076616c756520697320657068656d6572616c207768696368206d65616e7320697420646f65736e277420686974207468652073746f726167652e20546869732076616c756520697360207365742061667465722074686520696e686572656e742e3c52656c6179537461746550726f6f6600004901040018c4205468652073746174652070726f6f6620666f7220746865206c6173742072656c617920706172656e7420626c6f636b2e006d012054686973206669656c64206973206d65616e7420746f2062652075706461746564206561636820626c6f636b2077697468207468652076616c69646174696f6e206461746120696e686572656e742e205468657265666f72652c4d01206265666f72652070726f63657373696e67206f662074686520696e686572656e742c20652e672e20696e20606f6e5f696e697469616c697a656020746869732064617461206d6179206265207374616c652e00ac2054686973206461746120697320616c736f20616273656e742066726f6d207468652067656e657369732e5852656c6576616e744d6573736167696e6753746174650000a50904001c65012054686520736e617073686f74206f6620736f6d652073746174652072656c6174656420746f206d6573736167696e672072656c6576616e7420746f207468652063757272656e742070617261636861696e2061732070657248207468652072656c617920706172656e742e006d012054686973206669656c64206973206d65616e7420746f2062652075706461746564206561636820626c6f636b2077697468207468652076616c69646174696f6e206461746120696e686572656e742e205468657265666f72652c4d01206265666f72652070726f63657373696e67206f662074686520696e686572656e742c20652e672e20696e20606f6e5f696e697469616c697a656020746869732064617461206d6179206265207374616c652e00ac2054686973206461746120697320616c736f20616273656e742066726f6d207468652067656e657369732e44486f7374436f6e66696775726174696f6e0000b9090400182901205468652070617261636861696e20686f737420636f6e66696775726174696f6e207468617420776173206f627461696e65642066726f6d207468652072656c617920706172656e742e006d012054686973206669656c64206973206d65616e7420746f2062652075706461746564206561636820626c6f636b2077697468207468652076616c69646174696f6e206461746120696e686572656e742e205468657265666f72652c4d01206265666f72652070726f63657373696e67206f662074686520696e686572656e742c20652e672e20696e20606f6e5f696e697469616c697a656020746869732064617461206d6179206265207374616c652e00ac2054686973206461746120697320616c736f20616273656e742066726f6d207468652067656e657369732e384c617374446d714d7163486561640100c10980000000000000000000000000000000000000000000000000000000000000000010f420546865206c61737420646f776e77617264206d65737361676520717565756520636861696e20686561642077652068617665206f627365727665642e00650120546869732076616c7565206973206c6f61646564206265666f726520616e642073617665642061667465722070726f63657373696e6720696e626f756e6420646f776e77617264206d65737361676573206361727269656460206279207468652073797374656d20696e686572656e742e404c61737448726d704d716348656164730100c509040010490120546865206d65737361676520717565756520636861696e2068656164732077652068617665206f62736572766564207065722065616368206368616e6e656c20696e636f6d696e67206368616e6e656c2e00650120546869732076616c7565206973206c6f61646564206265666f726520616e642073617665642061667465722070726f63657373696e6720696e626f756e6420646f776e77617264206d65737361676573206361727269656460206279207468652073797374656d20696e686572656e742e6450726f636573736564446f776e776172644d6573736167657301001010000000000cc8204e756d626572206f6620646f776e77617264206d657373616765732070726f63657373656420696e206120626c6f636b2e00ec20546869732077696c6c20626520636c656172656420696e20606f6e5f696e697469616c697a6560206f662065616368206e657720626c6f636b2e3448726d7057617465726d61726b01001010000000000ca02048524d502077617465726d61726b2074686174207761732073657420696e206120626c6f636b2e00ec20546869732077696c6c20626520636c656172656420696e20606f6e5f696e697469616c697a6560206f662065616368206e657720626c6f636b2e5048726d704f7574626f756e644d657373616765730100d10904000ca42048524d50206d65737361676573207468617420776572652073656e7420696e206120626c6f636b2e00ec20546869732077696c6c20626520636c656172656420696e20606f6e5f696e697469616c697a6560206f662065616368206e657720626c6f636b2e385570776172644d657373616765730100350104000cac20557077617264206d65737361676573207468617420776572652073656e7420696e206120626c6f636b2e00ec20546869732077696c6c20626520636c656172656420696e20606f6e5f696e697469616c697a6560206f662065616368206e657720626c6f636b2e5450656e64696e675570776172644d6573736167657301003501040004310120557077617264206d65737361676573207468617420617265207374696c6c2070656e64696e6720616e64206e6f74207965742073656e6420746f207468652072656c617920636861696e2e5c55707761726444656c6976657279466565466163746f720100d90940000064a7b3b6e00d000000000000000004e42054686520666163746f7220746f206d756c7469706c792074686520626173652064656c69766572792066656520627920666f7220554d502e84416e6e6f756e63656448726d704d6573736167657350657243616e646964617465010010100000000008650120546865206e756d626572206f662048524d50206d65737361676573207765206f6273657276656420696e20606f6e5f696e697469616c697a656020616e64207468757320757365642074686174206e756d62657220666f72f020616e6e6f756e63696e672074686520776569676874206f6620606f6e5f696e697469616c697a656020616e6420606f6e5f66696e616c697a65602e68526573657276656458636d705765696768744f766572726964650000240400085d01205468652077656967687420776520726573657276652061742074686520626567696e6e696e67206f662074686520626c6f636b20666f722070726f63657373696e672058434d50206d657373616765732e2054686973b8206f76657272696465732074686520616d6f756e742073657420696e2074686520436f6e6669672074726169742e645265736572766564446d705765696768744f766572726964650000240400085901205468652077656967687420776520726573657276652061742074686520626567696e6e696e67206f662074686520626c6f636b20666f722070726f63657373696e6720444d50206d657373616765732e2054686973b8206f76657272696465732074686520616d6f756e742073657420696e2074686520436f6e6669672074726169742e60437573746f6d56616c69646174696f6e486561644461746100003404000c2901204120637573746f6d2068656164206461746120746861742073686f756c642062652072657475726e656420617320726573756c74206f66206076616c69646174655f626c6f636b602e00110120536565206050616c6c65743a3a7365745f637573746f6d5f76616c69646174696f6e5f686561645f646174616020666f72206d6f726520696e666f726d6174696f6e2e013901017c0001dd09012454696d657374616d70012454696d657374616d70080c4e6f7701002c20000000000000000004a0205468652063757272656e742074696d6520666f72207468652063757272656e7420626c6f636b2e24446964557064617465010078040010d82057686574686572207468652074696d657374616d7020686173206265656e207570646174656420696e207468697320626c6f636b2e00550120546869732076616c7565206973207570646174656420746f206074727565602075706f6e207375636365737366756c207375626d697373696f6e206f6620612074696d657374616d702062792061206e6f64652e4501204974206973207468656e20636865636b65642061742074686520656e64206f66206561636820626c6f636b20657865637574696f6e20696e2074686520606f6e5f66696e616c697a656020686f6f6b2e0171010004344d696e696d756d506572696f642c207017000000000000188c20546865206d696e696d756d20706572696f64206265747765656e20626c6f636b732e004d012042652061776172652074686174207468697320697320646966666572656e7420746f20746865202a65787065637465642a20706572696f6420746861742074686520626c6f636b2070726f64756374696f6e4901206170706172617475732070726f76696465732e20596f75722063686f73656e20636f6e73656e7375732073797374656d2077696c6c2067656e6572616c6c7920776f726b2077697468207468697320746f61012064657465726d696e6520612073656e7369626c6520626c6f636b2074696d652e20466f72206578616d706c652c20696e2074686520417572612070616c6c65742069742077696c6c20626520646f75626c6520746869737020706572696f64206f6e2064656661756c742073657474696e67732e00033450617261636861696e496e666f013450617261636861696e496e666f042c50617261636861696e496401005d0110640000000000000000042042616c616e636573012042616c616e6365731c34546f74616c49737375616e6365010018400000000000000000000000000000000004982054686520746f74616c20756e6974732069737375656420696e207468652073797374656d2e40496e61637469766549737375616e636501001840000000000000000000000000000000000409012054686520746f74616c20756e697473206f66206f75747374616e64696e672064656163746976617465642062616c616e636520696e207468652073797374656d2e1c4163636f756e74010104020014010100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080600901205468652042616c616e6365732070616c6c6574206578616d706c65206f662073746f72696e67207468652062616c616e6365206f6620616e206163636f756e742e00282023204578616d706c650034206060606e6f636f6d70696c65b02020696d706c2070616c6c65745f62616c616e6365733a3a436f6e66696720666f722052756e74696d65207b19022020202074797065204163636f756e7453746f7265203d2053746f726167654d61705368696d3c53656c663a3a4163636f756e743c52756e74696d653e2c206672616d655f73797374656d3a3a50726f76696465723c52756e74696d653e2c204163636f756e7449642c2053656c663a3a4163636f756e74446174613c42616c616e63653e3e0c20207d102060606000150120596f752063616e20616c736f2073746f7265207468652062616c616e6365206f6620616e206163636f756e7420696e20746865206053797374656d602070616c6c65742e00282023204578616d706c650034206060606e6f636f6d70696c65b02020696d706c2070616c6c65745f62616c616e6365733a3a436f6e66696720666f722052756e74696d65207b7420202074797065204163636f756e7453746f7265203d2053797374656d0c20207d102060606000510120427574207468697320636f6d657320776974682074726164656f6666732c2073746f72696e67206163636f756e742062616c616e63657320696e207468652073797374656d2070616c6c65742073746f7265736d0120606672616d655f73797374656d60206461746120616c6f6e677369646520746865206163636f756e74206461746120636f6e747261727920746f2073746f72696e67206163636f756e742062616c616e63657320696e207468652901206042616c616e636573602070616c6c65742c20776869636820757365732061206053746f726167654d61706020746f2073746f72652062616c616e6365732064617461206f6e6c792e4101204e4f54453a2054686973206973206f6e6c79207573656420696e207468652063617365207468617420746869732070616c6c6574206973207573656420746f2073746f72652062616c616e6365732e144c6f636b730101040200e109040008b820416e79206c6971756964697479206c6f636b73206f6e20736f6d65206163636f756e742062616c616e6365732e2501204e4f54453a2053686f756c64206f6e6c79206265206163636573736564207768656e2073657474696e672c206368616e67696e6720616e642066726565696e672061206c6f636b2e2052657365727665730101040200f109040004a4204e616d6564207265736572766573206f6e20736f6d65206163636f756e742062616c616e6365732e14486f6c64730101040200fd090400046c20486f6c6473206f6e206163636f756e742062616c616e6365732e1c467265657a65730101040200190a0400048820467265657a65206c6f636b73206f6e206163636f756e742062616c616e6365732e017501018410484578697374656e7469616c4465706f73697418400010a5d4e8000000000000000000000020410120546865206d696e696d756d20616d6f756e7420726571756972656420746f206b65657020616e206163636f756e74206f70656e2e204d5553542042452047524541544552205448414e205a45524f2100590120496620796f75202a7265616c6c792a206e65656420697420746f206265207a65726f2c20796f752063616e20656e61626c652074686520666561747572652060696e7365637572655f7a65726f5f65646020666f72610120746869732070616c6c65742e20486f77657665722c20796f7520646f20736f20617420796f7572206f776e207269736b3a20746869732077696c6c206f70656e2075702061206d616a6f7220446f5320766563746f722e590120496e206361736520796f752068617665206d756c7469706c6520736f7572636573206f662070726f7669646572207265666572656e6365732c20796f75206d617920616c736f2067657420756e65787065637465648c206265686176696f757220696620796f7520736574207468697320746f207a65726f2e00f020426f74746f6d206c696e653a20446f20796f757273656c662061206661766f757220616e64206d616b65206974206174206c65617374206f6e6521204d61784c6f636b7310103200000008f420546865206d6178696d756d206e756d626572206f66206c6f636b7320746861742073686f756c64206578697374206f6e20616e206163636f756e742edc204e6f74207374726963746c7920656e666f726365642c20627574207573656420666f722077656967687420657374696d6174696f6e2e2c4d61785265736572766573101032000000040d0120546865206d6178696d756d206e756d626572206f66206e616d656420726573657276657320746861742063616e206578697374206f6e20616e206163636f756e742e284d6178467265657a657310100a00000004610120546865206d6178696d756d206e756d626572206f6620696e646976696475616c20667265657a65206c6f636b7320746861742063616e206578697374206f6e20616e206163636f756e7420617420616e792074696d652e01250a14485472616e73616374696f6e5061796d656e7401485472616e73616374696f6e5061796d656e7408444e6578744665654d756c7469706c6965720100d90940000064a7b3b6e00d0000000000000000003853746f7261676556657273696f6e0100290a04000000018c04604f7065726174696f6e616c4665654d756c7469706c696572080405545901204120666565206d756c7469706c69657220666f7220604f7065726174696f6e616c602065787472696e7369637320746f20636f6d7075746520227669727475616c207469702220746f20626f6f73742074686569722c20607072696f726974796000510120546869732076616c7565206973206d756c7469706c69656420627920746865206066696e616c5f6665656020746f206f627461696e206120227669727475616c20746970222074686174206973206c61746572f420616464656420746f20612074697020636f6d706f6e656e7420696e20726567756c617220607072696f72697479602063616c63756c6174696f6e732e4d01204974206d65616e732074686174206120604e6f726d616c60207472616e73616374696f6e2063616e2066726f6e742d72756e20612073696d696c61726c792d73697a656420604f7065726174696f6e616c6041012065787472696e736963202877697468206e6f20746970292c20627920696e636c7564696e672061207469702076616c75652067726561746572207468616e20746865207669727475616c207469702e003c20606060727573742c69676e6f726540202f2f20466f7220604e6f726d616c608c206c6574207072696f72697479203d207072696f726974795f63616c6328746970293b0054202f2f20466f7220604f7065726174696f6e616c601101206c6574207669727475616c5f746970203d2028696e636c7573696f6e5f666565202b2074697029202a204f7065726174696f6e616c4665654d756c7469706c6965723bc4206c6574207072696f72697479203d207072696f726974795f63616c6328746970202b207669727475616c5f746970293b1020606060005101204e6f746520746861742073696e636520776520757365206066696e616c5f6665656020746865206d756c7469706c696572206170706c69657320616c736f20746f2074686520726567756c61722060746970605d012073656e74207769746820746865207472616e73616374696f6e2e20536f2c206e6f74206f6e6c7920646f657320746865207472616e73616374696f6e206765742061207072696f726974792062756d702062617365646101206f6e207468652060696e636c7573696f6e5f666565602c2062757420776520616c736f20616d706c6966792074686520696d70616374206f662074697073206170706c69656420746f20604f7065726174696f6e616c6038207472616e73616374696f6e732e001544436f6c6c61746f7253656c656374696f6e0144436f6c6c61746f7253656c656374696f6e1434496e76756c6e657261626c657301002d0a04000411012054686520696e76756c6e657261626c652c207065726d697373696f6e656420636f6c6c61746f72732e2054686973206c697374206d75737420626520736f727465642e3443616e6469646174654c6973740100310a0400146901205468652028636f6d6d756e6974792c206c696d697465642920636f6c6c6174696f6e2063616e646964617465732e206043616e646964617465736020616e642060496e76756c6e657261626c6573602073686f756c6420626550206d757475616c6c79206578636c75736976652e0075012054686973206c69737420697320736f7274656420696e20617363656e64696e67206f72646572206279206465706f73697420616e64207768656e20746865206465706f736974732061726520657175616c2c20746865206c65617374a020726563656e746c79207570646174656420697320636f6e7369646572656420677265617465722e444c617374417574686f726564426c6f636b01010405001010000000000484204c61737420626c6f636b20617574686f72656420627920636f6c6c61746f722e444465736972656443616e6469646174657301001010000000000c782044657369726564206e756d626572206f662063616e646964617465732e00750120546869732073686f756c6420696465616c6c7920616c77617973206265206c657373207468616e205b60436f6e6669673a3a4d617843616e64696461746573605d20666f72207765696768747320746f20626520636f72726563742e3443616e646964616379426f6e6401001840000000000000000000000000000000000cb820466978656420616d6f756e7420746f206465706f73697420746f206265636f6d65206120636f6c6c61746f722e004101205768656e206120636f6c6c61746f722063616c6c7320606c656176655f696e74656e7460207468657920696d6d6564696174656c79207265636569766520746865206465706f736974206261636b2e018d01019000013d0a4728417574686f72736869700128417574686f72736869700418417574686f720000000400046420417574686f72206f662063757272656e7420626c6f636b2e000000001e1c53657373696f6e011c53657373696f6e1c2856616c696461746f72730100940400047c205468652063757272656e7420736574206f662076616c696461746f72732e3043757272656e74496e646578010010100000000004782043757272656e7420696e646578206f66207468652073657373696f6e2e345175657565644368616e676564010078040008390120547275652069662074686520756e6465726c79696e672065636f6e6f6d6963206964656e746974696573206f7220776569676874696e6720626568696e64207468652076616c696461746f7273a420686173206368616e67656420696e20746865207175657565642076616c696461746f72207365742e285175657565644b6579730100410a0400083d012054686520717565756564206b65797320666f7220746865206e6578742073657373696f6e2e205768656e20746865206e6578742073657373696f6e20626567696e732c207468657365206b657973e02077696c6c206265207573656420746f2064657465726d696e65207468652076616c696461746f7227732073657373696f6e206b6579732e4844697361626c656456616c696461746f72730100490a0400148020496e6469636573206f662064697361626c65642076616c696461746f72732e003d01205468652076656320697320616c77617973206b65707420736f7274656420736f20746861742077652063616e2066696e642077686574686572206120676976656e2076616c696461746f722069733d012064697361626c6564207573696e672062696e617279207365617263682e204974206765747320636c6561726564207768656e20606f6e5f73657373696f6e5f656e64696e67602072657475726e73642061206e657720736574206f66206964656e7469746965732e204e6578744b657973000104050095010400049c20546865206e6578742073657373696f6e206b65797320666f7220612076616c696461746f722e204b65794f776e6572000104054d0a00040004090120546865206f776e6572206f662061206b65792e20546865206b65792069732074686520604b657954797065496460202b2074686520656e636f646564206b65792e01910101980001550a1f1041757261011041757261082c417574686f7269746965730100590a0400046c205468652063757272656e7420617574686f72697479207365742e2c43757272656e74536c6f740100610a2000000000000000000c80205468652063757272656e7420736c6f74206f66207468697320626c6f636b2e009420546869732077696c6c2062652073657420696e20606f6e5f696e697469616c697a65602e00000000201c41757261457874011c41757261457874082c417574686f7269746965730100590a040014942053657276657320617320636163686520666f722074686520617574686f7269746965732e0071012054686520617574686f72697469657320696e204175526120617265206f7665727772697474656e20696e20606f6e5f696e697469616c697a6560207768656e2077652073776974636820746f2061206e65772073657373696f6e2c5d0120627574207765207265717569726520746865206f6c6420617574686f72697469657320746f2076657269667920746865207365616c207768656e2076616c69646174696e67206120506f562e20546869732077696c6c0d0120616c77617973206265207570646174656420746f20746865206c6174657374204175526120617574686f72697469657320696e20606f6e5f66696e616c697a65602e20536c6f74496e666f0000650a04000cd82043757272656e7420736c6f742070616972656420776974682061206e756d626572206f6620617574686f72656420626c6f636b732e00982055706461746564206f6e206561636820626c6f636b20696e697469616c697a6174696f6e2e0000000021204d756c746973696701204d756c746973696704244d756c7469736967730001080502690a6d0a040004942054686520736574206f66206f70656e206d756c7469736967206f7065726174696f6e732e01a101019c0c2c4465706f73697442617365184000009e1869d02904000000000000000018590120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72206372656174696e672061206d756c746973696720657865637574696f6e206f7220746f842073746f726520612064697370617463682063616c6c20666f72206c617465722e00010120546869732069732068656c6420666f7220616e206164646974696f6e616c2073746f72616765206974656d2077686f73652076616c75652073697a652069733101206034202b2073697a656f662828426c6f636b4e756d6265722c2042616c616e63652c204163636f756e74496429296020627974657320616e642077686f7365206b65792073697a652069738020603332202b2073697a656f66284163636f756e74496429602062797465732e344465706f736974466163746f7218400000c52ebca2b10000000000000000000c55012054686520616d6f756e74206f662063757272656e6379206e65656465642070657220756e6974207468726573686f6c64207768656e206372656174696e672061206d756c746973696720657865637574696f6e2e00250120546869732069732068656c6420666f7220616464696e67203332206279746573206d6f726520696e746f2061207072652d6578697374696e672073746f726167652076616c75652e384d61785369676e61746f7269657310106400000004ec20546865206d6178696d756d20616d6f756e74206f66207369676e61746f7269657320616c6c6f77656420696e20746865206d756c74697369672e01750a3c1450726f7879011450726f7879081c50726f786965730101040500790a4400000000000000000000000000000000000845012054686520736574206f66206163636f756e742070726f786965732e204d61707320746865206163636f756e74207768696368206861732064656c65676174656420746f20746865206163636f756e7473210120776869636820617265206265696e672064656c65676174656420746f2c20746f67657468657220776974682074686520616d6f756e742068656c64206f6e206465706f7369742e34416e6e6f756e63656d656e74730101040500890a44000000000000000000000000000000000004ac2054686520616e6e6f756e63656d656e7473206d616465206279207468652070726f787920286b6579292e01a90101ac184050726f78794465706f73697442617365184000009e1869d02904000000000000000010110120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72206372656174696e6720612070726f78792e00010120546869732069732068656c6420666f7220616e206164646974696f6e616c2073746f72616765206974656d2077686f73652076616c75652073697a652069732501206073697a656f662842616c616e6365296020627974657320616e642077686f7365206b65792073697a65206973206073697a656f66284163636f756e74496429602062797465732e4850726f78794465706f736974466163746f7218400000c52ebca2b100000000000000000014bc2054686520616d6f756e74206f662063757272656e6379206e6565646564207065722070726f78792061646465642e00350120546869732069732068656c6420666f7220616464696e6720333220627974657320706c757320616e20696e7374616e6365206f66206050726f78795479706560206d6f726520696e746f20616101207072652d6578697374696e672073746f726167652076616c75652e20546875732c207768656e20636f6e6669677572696e67206050726f78794465706f736974466163746f7260206f6e652073686f756c642074616b65f420696e746f206163636f756e7420603332202b2070726f78795f747970652e656e636f646528292e6c656e282960206279746573206f6620646174612e284d617850726f7869657310102000000004f020546865206d6178696d756d20616d6f756e74206f662070726f7869657320616c6c6f77656420666f7220612073696e676c65206163636f756e742e284d617850656e64696e6710102000000004450120546865206d6178696d756d20616d6f756e74206f662074696d652d64656c6179656420616e6e6f756e63656d656e747320746861742061726520616c6c6f77656420746f2062652070656e64696e672e5c416e6e6f756e63656d656e744465706f73697442617365184000007f80a935be08000000000000000010310120546865206261736520616d6f756e74206f662063757272656e6379206e656564656420746f207265736572766520666f72206372656174696e6720616e20616e6e6f756e63656d656e742e00490120546869732069732068656c64207768656e2061206e65772073746f72616765206974656d20686f6c64696e672061206042616c616e636560206973206372656174656420287479706963616c6c7920313620206279746573292e64416e6e6f756e63656d656e744465706f736974466163746f72184000008cde04bff436000000000000000010d42054686520616d6f756e74206f662063757272656e6379206e65656465642070657220616e6e6f756e63656d656e74206d6164652e00590120546869732069732068656c6420666f7220616464696e6720616e20604163636f756e744964602c2060486173686020616e642060426c6f636b4e756d6265726020287479706963616c6c79203638206279746573298c20696e746f2061207072652d6578697374696e672073746f726167652076616c75652e01990a3d1c5574696c6974790001b50101b8044c626174636865645f63616c6c735f6c696d69741010aa2a000004a820546865206c696d6974206f6e20746865206e756d626572206f6620626174636865642063616c6c732e019d0a3e245363686564756c657201245363686564756c65720c3c496e636f6d706c65746553696e6365000010040000184167656e64610101040510a10a0400044d01204974656d7320746f2062652065786563757465642c20696e64657865642062792074686520626c6f636b206e756d626572207468617420746865792073686f756c64206265206578656375746564206f6e2e184c6f6f6b75700001040504c0040010f8204c6f6f6b75702066726f6d2061206e616d6520746f2074686520626c6f636b206e756d62657220616e6420696e646578206f6620746865207461736b2e00590120466f72207633202d3e207634207468652070726576696f75736c7920756e626f756e646564206964656e7469746965732061726520426c616b65322d3235362068617368656420746f20666f726d2074686520763430206964656e7469746965732e01290201bc08344d6178696d756d57656967687424280700a0db215d0200000104290120546865206d6178696d756d207765696768742074686174206d6179206265207363686564756c65642070657220626c6f636b20666f7220616e7920646973706174636861626c65732e504d61785363686564756c6564506572426c6f636b101032000000141d0120546865206d6178696d756d206e756d626572206f66207363686564756c65642063616c6c7320696e2074686520717565756520666f7220612073696e676c6520626c6f636b2e0018204e4f54453a5101202b20446570656e64656e742070616c6c657473272062656e63686d61726b73206d696768742072657175697265206120686967686572206c696d697420666f72207468652073657474696e672e205365742061c420686967686572206c696d697420756e646572206072756e74696d652d62656e63686d61726b736020666561747572652e01b10a3f1c436f756e63696c011c436f756e63696c182450726f706f73616c730100b50a040004902054686520686173686573206f6620746865206163746976652070726f706f73616c732e2850726f706f73616c4f6600010406302501040004cc2041637475616c2070726f706f73616c20666f72206120676976656e20686173682c20696620697427732063757272656e742e18566f74696e670001040630b90a040004b420566f746573206f6e206120676976656e2070726f706f73616c2c206966206974206973206f6e676f696e672e3450726f706f73616c436f756e74010010100000000004482050726f706f73616c7320736f206661722e1c4d656d626572730100940400043901205468652063757272656e74206d656d62657273206f662074686520636f6c6c6563746976652e20546869732069732073746f72656420736f7274656420286a7573742062792076616c7565292e145072696d65000000040004650120546865207072696d65206d656d62657220746861742068656c70732064657465726d696e65207468652064656661756c7420766f7465206265686176696f7220696e2063617365206f6620616273656e746174696f6e732e01310201c404444d617850726f706f73616c576569676874242807004429353a0200a00004250120546865206d6178696d756d20776569676874206f6620612064697370617463682063616c6c20746861742063616e2062652070726f706f73656420616e642065786563757465642e01bd0a4024456c656374696f6e730124456c656374696f6e73141c4d656d626572730100c10a04000c74205468652063757272656e7420656c6563746564206d656d626572732e00b820496e76617269616e743a20416c7761797320736f72746564206261736564206f6e206163636f756e742069642e2452756e6e65727355700100c10a04001084205468652063757272656e742072657365727665642072756e6e6572732d75702e00590120496e76617269616e743a20416c7761797320736f72746564206261736564206f6e2072616e6b2028776f72736520746f2062657374292e2055706f6e2072656d6f76616c206f662061206d656d6265722c20746865bc206c6173742028692e652e205f626573745f292072756e6e65722d75702077696c6c206265207265706c616365642e2843616e646964617465730100cc0400185901205468652070726573656e742063616e646964617465206c6973742e20412063757272656e74206d656d626572206f722072756e6e65722d75702063616e206e6576657220656e746572207468697320766563746f72d020616e6420697320616c7761797320696d706c696369746c7920617373756d656420746f20626520612063616e6469646174652e007c205365636f6e6420656c656d656e7420697320746865206465706f7369742e00b820496e76617269616e743a20416c7761797320736f72746564206261736564206f6e206163636f756e742069642e38456c656374696f6e526f756e647301001010000000000441012054686520746f74616c206e756d626572206f6620766f746520726f756e6473207468617420686176652068617070656e65642c206578636c7564696e6720746865207570636f6d696e67206f6e652e18566f74696e670101040500c90a840000000000000000000000000000000000000000000000000000000000000000000cb820566f74657320616e64206c6f636b6564207374616b65206f66206120706172746963756c617220766f7465722e00c42054574f582d4e4f54453a205341464520617320604163636f756e7449646020697320612063727970746f20686173682e01350201c8282050616c6c657449647d0220706872656c65637404d0204964656e74696669657220666f722074686520656c656374696f6e732d70687261676d656e2070616c6c65742773206c6f636b3443616e646964616379426f6e6418400000a0dec5adc935360000000000000004050120486f77206d7563682073686f756c64206265206c6f636b656420757020696e206f7264657220746f207375626d6974206f6e6527732063616e6469646163792e38566f74696e67426f6e644261736518400000b2d3595bf006000000000000000010942042617365206465706f736974206173736f636961746564207769746820766f74696e672e00550120546869732073686f756c642062652073656e7369626c79206869676820746f2065636f6e6f6d6963616c6c7920656e73757265207468652070616c6c65742063616e6e6f742062652061747461636b656420627994206372656174696e67206120676967616e746963206e756d626572206f6620766f7465732e40566f74696e67426f6e64466163746f7218400000b2d3595bf00600000000000000000411012054686520616d6f756e74206f6620626f6e642074686174206e65656420746f206265206c6f636b656420666f72206561636820766f746520283332206279746573292e38446573697265644d656d626572731010070000000470204e756d626572206f66206d656d6265727320746f20656c6563742e404465736972656452756e6e65727355701010030000000478204e756d626572206f662072756e6e6572735f757020746f206b6565702e305465726d4475726174696f6e1010e0c400000c510120486f77206c6f6e6720656163682073656174206973206b6570742e205468697320646566696e657320746865206e65787420626c6f636b206e756d62657220617420776869636820616e20656c656374696f6e5d0120726f756e642077696c6c2068617070656e2e2049662073657420746f207a65726f2c206e6f20656c656374696f6e732061726520657665722074726967676572656420616e6420746865206d6f64756c652077696c6c5020626520696e2070617373697665206d6f64652e344d617843616e6469646174657310101400000018e420546865206d6178696d756d206e756d626572206f662063616e6469646174657320696e20612070687261676d656e20656c656374696f6e2e005d01205761726e696e673a205468697320696d7061637473207468652073697a65206f662074686520656c656374696f6e2077686963682069732072756e206f6e636861696e2e2043686f736520776973656c792c20616e64010120636f6e736964657220686f772069742077696c6c20696d706163742060543a3a576569676874496e666f3a3a656c656374696f6e5f70687261676d656e602e003101205768656e2074686973206c696d69742069732072656163686564206e6f206d6f72652063616e646964617465732061726520616363657074656420696e2074686520656c656374696f6e2e244d6178566f7465727310106400000018f820546865206d6178696d756d206e756d626572206f6620766f7465727320746f20616c6c6f7720696e20612070687261676d656e20656c656374696f6e2e005d01205761726e696e673a205468697320696d7061637473207468652073697a65206f662074686520656c656374696f6e2077686963682069732072756e206f6e636861696e2e2043686f736520776973656c792c20616e64010120636f6e736964657220686f772069742077696c6c20696d706163742060543a3a576569676874496e666f3a3a656c656374696f6e5f70687261676d656e602e00d8205768656e20746865206c696d6974206973207265616368656420746865206e657720766f74657273206172652069676e6f7265642e404d6178566f746573506572566f7465721010050000001090204d6178696d756d206e756d62657273206f6620766f7465732070657220766f7465722e005d01205761726e696e673a205468697320696d7061637473207468652073697a65206f662074686520656c656374696f6e2077686963682069732072756e206f6e636861696e2e2043686f736520776973656c792c20616e64010120636f6e736964657220686f772069742077696c6c20696d706163742060543a3a576569676874496e666f3a3a656c656374696f6e5f70687261676d656e602e01cd0a412444656d6f6372616379012444656d6f6372616379303c5075626c696350726f70436f756e74010010100000000004f420546865206e756d626572206f6620287075626c6963292070726f706f73616c7320746861742068617665206265656e206d61646520736f206661722e2c5075626c696350726f70730100d10a040004050120546865207075626c69632070726f706f73616c732e20556e736f727465642e20546865207365636f6e64206974656d206973207468652070726f706f73616c2e244465706f7369744f660001040510dd0a04000c842054686f73652077686f2068617665206c6f636b65642061206465706f7369742e00d82054574f582d4e4f54453a20536166652c20617320696e6372656173696e6720696e7465676572206b6579732061726520736166652e3c5265666572656e64756d436f756e74010010100000000004310120546865206e6578742066726565207265666572656e64756d20696e6465782c20616b6120746865206e756d626572206f66207265666572656e6461207374617274656420736f206661722e344c6f77657374556e62616b6564010010100000000008250120546865206c6f77657374207265666572656e64756d20696e64657820726570726573656e74696e6720616e20756e62616b6564207265666572656e64756d2e20457175616c20746fdc20605265666572656e64756d436f756e74602069662074686572652069736e2774206120756e62616b6564207265666572656e64756d2e405265666572656e64756d496e666f4f660001040510e50a04000cb420496e666f726d6174696f6e20636f6e6365726e696e6720616e7920676976656e207265666572656e64756d2e0009012054574f582d4e4f54453a205341464520617320696e646578657320617265206e6f7420756e64657220616e2061747461636b6572e280997320636f6e74726f6c2e20566f74696e674f660101040500f10ad8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000105d0120416c6c20766f74657320666f72206120706172746963756c617220766f7465722e2057652073746f7265207468652062616c616e636520666f7220746865206e756d626572206f6620766f74657320746861742077655d012068617665207265636f726465642e20546865207365636f6e64206974656d2069732074686520746f74616c20616d6f756e74206f662064656c65676174696f6e732c20746861742077696c6c2062652061646465642e00e82054574f582d4e4f54453a205341464520617320604163636f756e7449646073206172652063727970746f2068617368657320616e797761792e544c6173745461626c656457617345787465726e616c0100780400085901205472756520696620746865206c617374207265666572656e64756d207461626c656420776173207375626d69747465642065787465726e616c6c792e2046616c7365206966206974207761732061207075626c6963282070726f706f73616c2e304e65787445787465726e616c0000090b040010590120546865207265666572656e64756d20746f206265207461626c6564207768656e6576657220697420776f756c642062652076616c696420746f207461626c6520616e2065787465726e616c2070726f706f73616c2e550120546869732068617070656e73207768656e2061207265666572656e64756d206e6565647320746f206265207461626c656420616e64206f6e65206f662074776f20636f6e646974696f6e7320617265206d65743aa4202d20604c6173745461626c656457617345787465726e616c60206973206066616c7365603b206f7268202d20605075626c696350726f70736020697320656d7074792e24426c61636b6c69737400010406300d0b04000851012041207265636f7264206f662077686f207665746f656420776861742e204d6170732070726f706f73616c206861736820746f206120706f737369626c65206578697374656e7420626c6f636b206e756d626572e82028756e74696c207768656e206974206d6179206e6f742062652072657375626d69747465642920616e642077686f207665746f65642069742e3443616e63656c6c6174696f6e730101040630780400042901205265636f7264206f6620616c6c2070726f706f73616c7320746861742068617665206265656e207375626a65637420746f20656d657267656e63792063616e63656c6c6174696f6e2e284d657461646174614f6600010402e430040018ec2047656e6572616c20696e666f726d6174696f6e20636f6e6365726e696e6720616e792070726f706f73616c206f72207265666572656e64756d2e490120546865206048617368602072656665727320746f2074686520707265696d616765206f66207468652060507265696d61676573602070726f76696465722077686963682063616e2062652061204a534f4e882064756d70206f7220495046532068617368206f662061204a534f4e2066696c652e00750120436f6e73696465722061206761726261676520636f6c6c656374696f6e20666f722061206d65746164617461206f662066696e6973686564207265666572656e64756d7320746f2060756e7265717565737460202872656d6f76652944206c6172676520707265696d616765732e013d0201d4303c456e6163746d656e74506572696f64101000e1000014e82054686520706572696f64206265747765656e20612070726f706f73616c206265696e6720617070726f76656420616e6420656e61637465642e0031012049742073686f756c642067656e6572616c6c792062652061206c6974746c65206d6f7265207468616e2074686520756e7374616b6520706572696f6420746f20656e737572652074686174510120766f74696e67207374616b657273206861766520616e206f70706f7274756e69747920746f2072656d6f7665207468656d73656c7665732066726f6d207468652073797374656d20696e207468652063617365b4207768657265207468657920617265206f6e20746865206c6f73696e672073696465206f66206120766f74652e304c61756e6368506572696f641010e0c4000004e420486f77206f6674656e2028696e20626c6f636b7329206e6577207075626c6963207265666572656e646120617265206c61756e636865642e30566f74696e67506572696f641010e0c4000004b820486f77206f6674656e2028696e20626c6f636b732920746f20636865636b20666f72206e657720766f7465732e44566f74654c6f636b696e67506572696f64101000e10000109020546865206d696e696d756d20706572696f64206f6620766f7465206c6f636b696e672e0065012049742073686f756c64206265206e6f2073686f72746572207468616e20656e6163746d656e7420706572696f6420746f20656e73757265207468617420696e207468652063617365206f6620616e20617070726f76616c2c49012074686f7365207375636365737366756c20766f7465727320617265206c6f636b656420696e746f2074686520636f6e73657175656e636573207468617420746865697220766f74657320656e7461696c2e384d696e696d756d4465706f73697418400000e8890423c78a000000000000000004350120546865206d696e696d756d20616d6f756e7420746f20626520757365642061732061206465706f73697420666f722061207075626c6963207265666572656e64756d2070726f706f73616c2e38496e7374616e74416c6c6f7765647804000c550120496e64696361746f7220666f72207768657468657220616e20656d657267656e6379206f726967696e206973206576656e20616c6c6f77656420746f2068617070656e2e20536f6d6520636861696e73206d617961012077616e7420746f207365742074686973207065726d616e656e746c7920746f206066616c7365602c206f7468657273206d61792077616e7420746f20636f6e646974696f6e206974206f6e207468696e67732073756368a020617320616e207570677261646520686176696e672068617070656e656420726563656e746c792e5446617374547261636b566f74696e67506572696f6410108403000004ec204d696e696d756d20766f74696e6720706572696f6420616c6c6f77656420666f72206120666173742d747261636b207265666572656e64756d2e34436f6f6c6f6666506572696f641010e0c4000004610120506572696f6420696e20626c6f636b7320776865726520616e2065787465726e616c2070726f706f73616c206d6179206e6f742062652072652d7375626d6974746564206166746572206265696e67207665746f65642e204d6178566f74657310106400000010b020546865206d6178696d756d206e756d626572206f6620766f74657320666f7220616e206163636f756e742e00d420416c736f207573656420746f20636f6d70757465207765696768742c20616e206f7665726c79206269672076616c75652063616e1501206c65616420746f2065787472696e7369632077697468207665727920626967207765696768743a20736565206064656c65676174656020666f7220696e7374616e63652e304d617850726f706f73616c73101064000000040d0120546865206d6178696d756d206e756d626572206f66207075626c69632070726f706f73616c7320746861742063616e20657869737420617420616e792074696d652e2c4d61784465706f73697473101064000000041d0120546865206d6178696d756d206e756d626572206f66206465706f736974732061207075626c69632070726f706f73616c206d6179206861766520617420616e792074696d652e384d6178426c61636b6c697374656410106400000004d820546865206d6178696d756d206e756d626572206f66206974656d732077686963682063616e20626520626c61636b6c69737465642e01110b42204964656e7469747901204964656e746974791c284964656e746974794f660001040500150b040010690120496e666f726d6174696f6e20746861742069732070657274696e656e7420746f206964656e746966792074686520656e7469747920626568696e6420616e206163636f756e742e204669727374206974656d20697320746865e020726567697374726174696f6e2c207365636f6e6420697320746865206163636f756e742773207072696d61727920757365726e616d652e00c02054574f582d4e4f54453a204f4b20e2809520604163636f756e7449646020697320612073656375726520686173682e1c53757065724f660001040200e5020400086101205468652073757065722d6964656e74697479206f6620616e20616c7465726e6174697665202273756222206964656e7469747920746f676574686572207769746820697473206e616d652c2077697468696e2074686174510120636f6e746578742e20496620746865206163636f756e74206973206e6f7420736f6d65206f74686572206163636f756e742773207375622d6964656e746974792c207468656e206a75737420604e6f6e65602e18537562734f6601010405002d0b44000000000000000000000000000000000014b820416c7465726e6174697665202273756222206964656e746974696573206f662074686973206163636f756e742e001d0120546865206669727374206974656d20697320746865206465706f7369742c20746865207365636f6e64206973206120766563746f72206f6620746865206163636f756e74732e00c02054574f582d4e4f54453a204f4b20e2809520604163636f756e7449646020697320612073656375726520686173682e28526567697374726172730100350b0400104d012054686520736574206f6620726567697374726172732e204e6f7420657870656374656420746f206765742076657279206269672061732063616e206f6e6c79206265206164646564207468726f7567682061a8207370656369616c206f726967696e20286c696b656c79206120636f756e63696c206d6f74696f6e292e0029012054686520696e64657820696e746f20746869732063616e206265206361737420746f2060526567697374726172496e6465786020746f2067657420612076616c69642076616c75652e4c557365726e616d65417574686f7269746965730001040500450b040004f42041206d6170206f6620746865206163636f756e74732077686f2061726520617574686f72697a656420746f206772616e7420757365726e616d65732e444163636f756e744f66557365726e616d6500010402ec000400146d012052657665727365206c6f6f6b75702066726f6d2060757365726e616d656020746f2074686520604163636f756e7449646020746861742068617320726567697374657265642069742e205468652076616c75652073686f756c6465012062652061206b657920696e2074686520604964656e746974794f6660206d61702c20627574206974206d6179206e6f742069662074686520757365722068617320636c6561726564207468656972206964656e746974792e006901204d756c7469706c6520757365726e616d6573206d6179206d617020746f207468652073616d6520604163636f756e744964602c2062757420604964656e746974794f66602077696c6c206f6e6c79206d617020746f206f6e6548207072696d61727920757365726e616d652e4050656e64696e67557365726e616d657300010402ec4d0b0400186d0120557365726e616d6573207468617420616e20617574686f7269747920686173206772616e7465642c20627574207468617420746865206163636f756e7420636f6e74726f6c6c657220686173206e6f7420636f6e6669726d65647101207468617420746865792077616e742069742e2055736564207072696d6172696c7920696e2063617365732077686572652074686520604163636f756e744964602063616e6e6f742070726f766964652061207369676e61747572655d012062656361757365207468657920617265206120707572652070726f78792c206d756c74697369672c206574632e20496e206f7264657220746f20636f6e6669726d2069742c20746865792073686f756c642063616c6c6c205b6043616c6c3a3a6163636570745f757365726e616d65605d2e001d01204669727374207475706c65206974656d20697320746865206163636f756e7420616e64207365636f6e642069732074686520616363657074616e636520646561646c696e652e014d0201e8203042617369634465706f7369741840000010632d5ec76b050000000000000004d82054686520616d6f756e742068656c64206f6e206465706f73697420666f7220612072656769737465726564206964656e746974792e2c427974654465706f73697418400000869eae29d5000000000000000000041d012054686520616d6f756e742068656c64206f6e206465706f7369742070657220656e636f646564206279746520666f7220612072656769737465726564206964656e746974792e445375624163636f756e744465706f73697418400000d01309468e1501000000000000000c65012054686520616d6f756e742068656c64206f6e206465706f73697420666f7220612072656769737465726564207375626163636f756e742e20546869732073686f756c64206163636f756e7420666f7220746865206661637465012074686174206f6e652073746f72616765206974656d27732076616c75652077696c6c20696e637265617365206279207468652073697a65206f6620616e206163636f756e742049442c20616e642074686572652077696c6c350120626520616e6f746865722074726965206974656d2077686f73652076616c7565206973207468652073697a65206f6620616e206163636f756e7420494420706c75732033322062797465732e384d61785375624163636f756e7473101064000000040d0120546865206d6178696d756d206e756d626572206f66207375622d6163636f756e747320616c6c6f77656420706572206964656e746966696564206163636f756e742e344d617852656769737472617273101014000000085101204d61786d696d756d206e756d626572206f66207265676973747261727320616c6c6f77656420696e207468652073797374656d2e204e656564656420746f20626f756e642074686520636f6d706c65786974797c206f662c20652e672e2c207570646174696e67206a756467656d656e74732e6450656e64696e67557365726e616d6545787069726174696f6e1010e0c4000004150120546865206e756d626572206f6620626c6f636b732077697468696e207768696368206120757365726e616d65206772616e74206d7573742062652061636365707465642e3c4d61785375666669784c656e677468101007000000048020546865206d6178696d756d206c656e677468206f662061207375666669782e444d6178557365726e616d654c656e67746810102000000004610120546865206d6178696d756d206c656e677468206f66206120757365726e616d652c20696e636c7564696e67206974732073756666697820616e6420616e792073797374656d2d61646465642064656c696d69746572732e01510b431c56657374696e67011c56657374696e67081c56657374696e670001040200550b040004d820496e666f726d6174696f6e20726567617264696e67207468652076657374696e67206f66206120676976656e206163636f756e742e3853746f7261676556657273696f6e01005d0b04000c7c2053746f726167652076657273696f6e206f66207468652070616c6c65742e003101204e6577206e6574776f726b732073746172742077697468206c61746573742076657273696f6e2c2061732064657465726d696e6564206279207468652067656e65736973206275696c642e01090301f008444d696e5665737465645472616e7366657218400000e8890423c78a000000000000000004e820546865206d696e696d756d20616d6f756e74207472616e7366657272656420746f2063616c6c20607665737465645f7472616e73666572602e4c4d617856657374696e675363686564756c657310101c0000000001610b4420547265617375727901205472656173757279183450726f706f73616c436f756e74010010100000000004a4204e756d626572206f662070726f706f73616c7320746861742068617665206265656e206d6164652e2450726f706f73616c730001040510650b0400047c2050726f706f73616c7320746861742068617665206265656e206d6164652e2c4465616374697661746564010018400000000000000000000000000000000004f02054686520616d6f756e7420776869636820686173206265656e207265706f7274656420617320696e61637469766520746f2043757272656e63792e24417070726f76616c730100690b040004f82050726f706f73616c20696e646963657320746861742068617665206265656e20617070726f76656420627574206e6f742079657420617761726465642e285370656e64436f756e74010010100000000004a42054686520636f756e74206f66207370656e647320746861742068617665206265656e206d6164652e185370656e647300010405106d0b040004d0205370656e647320746861742068617665206265656e20617070726f76656420616e64206265696e672070726f6365737365642e01110301f4203050726f706f73616c426f6e6419071050c30000085501204672616374696f6e206f6620612070726f706f73616c27732076616c756520746861742073686f756c6420626520626f6e64656420696e206f7264657220746f20706c616365207468652070726f706f73616c2e110120416e2061636365707465642070726f706f73616c2067657473207468657365206261636b2e20412072656a65637465642070726f706f73616c20646f6573206e6f742e4c50726f706f73616c426f6e644d696e696d756d1840000010632d5ec76b0500000000000000044901204d696e696d756d20616d6f756e74206f662066756e647320746861742073686f756c6420626520706c6163656420696e2061206465706f73697420666f72206d616b696e6720612070726f706f73616c2e4c50726f706f73616c426f6e644d6178696d756d21034401000050efe2d6e41a1b00000000000000044901204d6178696d756d20616d6f756e74206f662066756e647320746861742073686f756c6420626520706c6163656420696e2061206465706f73697420666f72206d616b696e6720612070726f706f73616c2e2c5370656e64506572696f641010c04b0300048820506572696f64206265747765656e2073756363657373697665207370656e64732e104275726e190710102700000411012050657263656e74616765206f662073706172652066756e64732028696620616e7929207468617420617265206275726e7420706572207370656e6420706572696f642e2050616c6c65744964750b2070792f74727372790419012054686520747265617375727927732070616c6c65742069642c207573656420666f72206465726976696e672069747320736f7665726569676e206163636f756e742049442e304d6178417070726f76616c731010640000000c150120546865206d6178696d756d206e756d626572206f6620617070726f76616c7320746861742063616e207761697420696e20746865207370656e64696e672071756575652e004d01204e4f54453a205468697320706172616d6574657220697320616c736f20757365642077697468696e2074686520426f756e746965732050616c6c657420657874656e73696f6e20696620656e61626c65642e305061796f7574506572696f641010c04b03000419012054686520706572696f6420647572696e6720776869636820616e20617070726f766564207472656173757279207370656e642068617320746f20626520636c61696d65642e01790b451c556e6971756573011c556e69717565732814436c617373000104022c7d0b040004642044657461696c73206f66206120636f6c6c656374696f6e2e4c4f776e657273686970416363657074616e636500010402002c04000429012054686520636f6c6c656374696f6e2c20696620616e792c206f6620776869636820616e206163636f756e742069732077696c6c696e6720746f2074616b65206f776e6572736869702e1c4163636f756e7400010c020202810ba8040008590120546865206974656d732068656c6420627920616e7920676976656e206163636f756e743b20736574206f757420746869732077617920736f2074686174206974656d73206f776e656420627920612073696e676c656c206163636f756e742063616e20626520656e756d6572617465642e30436c6173734163636f756e740001080202850ba804000869012054686520636f6c6c656374696f6e73206f776e656420627920616e7920676976656e206163636f756e743b20736574206f757420746869732077617920736f207468617420636f6c6c656374696f6e73206f776e65642062799020612073696e676c65206163636f756e742063616e20626520656e756d6572617465642e14417373657400010802028d03890b040004d020546865206974656d7320696e206578697374656e636520616e64207468656972206f776e6572736869702064657461696c732e3c436c6173734d657461646174614f66000104022c8d0b04000468204d65746164617461206f66206120636f6c6c656374696f6e2e48496e7374616e63654d657461646174614f6600010802028d03910b04000454204d65746164617461206f6620616e206974656d2e2441747472696275746500010c020202950b990b040004702041747472696275746573206f66206120636f6c6c656374696f6e2e2c4974656d50726963654f6600010802028d039d0b04000470205072696365206f6620616e20617373657420696e7374616e63652e4c436f6c6c656374696f6e4d6178537570706c79000104022c10040004f0204b6565707320747261636b206f6620746865206e756d626572206f66206974656d73206120636f6c6c656374696f6e206d6967687420686176652e01150301f82044436f6c6c656374696f6e4465706f7369741840000064a7b3b6e00d00000000000000000401012054686520626173696320616d6f756e74206f662066756e64732074686174206d75737420626520726573657276656420666f7220636f6c6c656374696f6e2e2c4974656d4465706f736974184000008a5d78456301000000000000000004f42054686520626173696320616d6f756e74206f662066756e64732074686174206d75737420626520726573657276656420666f7220616e206974656d2e4c4d657461646174614465706f73697442617365184000008a5d784563010000000000000000044d012054686520626173696320616d6f756e74206f662066756e64732074686174206d757374206265207265736572766564207768656e20616464696e67206d6574616461746120746f20796f7572206974656d2e504174747269627574654465706f73697442617365184000008a5d7845630100000000000000000455012054686520626173696320616d6f756e74206f662066756e64732074686174206d757374206265207265736572766564207768656e20616464696e6720616e2061747472696275746520746f20616e206974656d2e384465706f7369745065724279746518400000c16ff2862300000000000000000008590120546865206164646974696f6e616c2066756e64732074686174206d75737420626520726573657276656420666f7220746865206e756d626572206f662062797465732073746f726520696e206d657461646174612cc02065697468657220226e6f726d616c22206d65746164617461206f7220617474726962757465206d657461646174612e2c537472696e674c696d697410100001000004b020546865206d6178696d756d206c656e677468206f6620646174612073746f726564206f6e2d636861696e2e204b65794c696d697410100001000004a020546865206d6178696d756d206c656e677468206f6620616e20617474726962757465206b65792e2856616c75654c696d697410100001000004a820546865206d6178696d756d206c656e677468206f6620616e206174747269627574652076616c75652e01a10b4620507265696d6167650120507265696d6167650c24537461747573466f720001040630a50b0400049020546865207265717565737420737461747573206f66206120676976656e20686173682e4052657175657374537461747573466f720001040630ad0b0400049020546865207265717565737420737461747573206f66206120676976656e20686173682e2c507265696d616765466f7200010406bd0bc10b0400000125030115010001c50b4840436f6e76696374696f6e566f74696e670140436f6e76696374696f6e566f74696e670824566f74696e67466f720101080505c90bcd0bd800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008750120416c6c20766f74696e6720666f72206120706172746963756c617220766f74657220696e206120706172746963756c617220766f74696e6720636c6173732e2057652073746f7265207468652062616c616e636520666f72207468659c206e756d626572206f6620766f74657320746861742077652068617665207265636f726465642e34436c6173734c6f636b73466f720101040500ed0b04000c69012054686520766f74696e6720636c617373657320776869636820686176652061206e6f6e2d7a65726f206c6f636b20726571756972656d656e7420616e6420746865206c6f636b20616d6f756e747320776869636820746865796d0120726571756972652e205468652061637475616c20616d6f756e74206c6f636b6564206f6e20626568616c66206f6620746869732070616c6c65742073686f756c6420616c7761797320626520746865206d6178696d756d206f662c2074686973206c6973742e012d0301190108204d6178566f74657310100002000010f020546865206d6178696d756d206e756d626572206f6620636f6e63757272656e7420766f74657320616e206163636f756e74206d617920686176652e00550120416c736f207573656420746f20636f6d70757465207765696768742c20616e206f7665726c79206c617267652076616c75652063616e206c65616420746f2065787472696e736963732077697468206c61726765c02077656967687420657374696d6174696f6e3a20736565206064656c65676174656020666f7220696e7374616e63652e44566f74654c6f636b696e67506572696f64101000e10000109020546865206d696e696d756d20706572696f64206f6620766f7465206c6f636b696e672e0065012049742073686f756c64206265206e6f2073686f72746572207468616e20656e6163746d656e7420706572696f6420746f20656e73757265207468617420696e207468652063617365206f6620616e20617070726f76616c2c49012074686f7365207375636365737366756c20766f7465727320617265206c6f636b656420696e746f2074686520636f6e73657175656e636573207468617420746865697220766f74657320656e7461696c2e01f90b50245265666572656e646101245265666572656e6461143c5265666572656e64756d436f756e74010010100000000004310120546865206e6578742066726565207265666572656e64756d20696e6465782c20616b6120746865206e756d626572206f66207265666572656e6461207374617274656420736f206661722e445265666572656e64756d496e666f466f720001040210fd0b040004b420496e666f726d6174696f6e20636f6e6365726e696e6720616e7920676976656e207265666572656e64756d2e28547261636b517565756501010405b41d0c0400105d012054686520736f72746564206c697374206f66207265666572656e646120726561647920746f206265206465636964656420627574206e6f7420796574206265696e6720646563696465642c206f7264657265642062797c20636f6e76696374696f6e2d776569676874656420617070726f76616c732e00410120546869732073686f756c6420626520656d70747920696620604465636964696e67436f756e7460206973206c657373207468616e2060547261636b496e666f3a3a6d61785f6465636964696e67602e344465636964696e67436f756e7401010405b410100000000004c420546865206e756d626572206f66207265666572656e6461206265696e6720646563696465642063757272656e746c792e284d657461646174614f66000104021030040018050120546865206d6574616461746120697320612067656e6572616c20696e666f726d6174696f6e20636f6e6365726e696e6720746865207265666572656e64756d2e490120546865206048617368602072656665727320746f2074686520707265696d616765206f66207468652060507265696d61676573602070726f76696465722077686963682063616e2062652061204a534f4e882064756d70206f7220495046532068617368206f662061204a534f4e2066696c652e00750120436f6e73696465722061206761726261676520636f6c6c656374696f6e20666f722061206d65746164617461206f662066696e6973686564207265666572656e64756d7320746f2060756e7265717565737460202872656d6f76652944206c6172676520707265696d616765732e014103011d0114445375626d697373696f6e4465706f73697418400000e8890423c78a000000000000000004350120546865206d696e696d756d20616d6f756e7420746f20626520757365642061732061206465706f73697420666f722061207075626c6963207265666572656e64756d2070726f706f73616c2e244d617851756575656410106400000004e4204d6178696d756d2073697a65206f6620746865207265666572656e64756d20717565756520666f7220612073696e676c6520747261636b2e44556e6465636964696e6754696d656f757410104600000008550120546865206e756d626572206f6620626c6f636b73206166746572207375626d697373696f6e20746861742061207265666572656e64756d206d75737420626567696e206265696e6720646563696465642062792ee4204f6e63652074686973207061737365732c207468656e20616e796f6e65206d61792063616e63656c20746865207265666572656e64756d2e34416c61726d496e74657276616c1010010000000c5d01205175616e74697a6174696f6e206c6576656c20666f7220746865207265666572656e64756d2077616b657570207363686564756c65722e204120686967686572206e756d6265722077696c6c20726573756c7420696e5d012066657765722073746f726167652072656164732f777269746573206e656564656420666f7220736d616c6c657220766f746572732c2062757420616c736f20726573756c7420696e2064656c61797320746f207468655501206175746f6d61746963207265666572656e64756d20737461747573206368616e6765732e204578706c6963697420736572766963696e6720696e737472756374696f6e732061726520756e61666665637465642e18547261636b73290c450818000010726f6f7402000000000080e3e0a35708873f000000000000050000000500000005000000050000000000ca9a3b0065cd1d00ca9a3b02d7c0770000000000eddf77000000000020750f000000000001004877686974656c69737465645f63616c6c6572140000000000a0dec5adc9353600000000000000050000000500000005000000050000000000ca9a3b0065cd1d00ca9a3b0295c8010000000000229103000000000026beffffffffffff0a0028706f6f6c5f61646d696e050000000000a0dec5adc9353600000000000000050000000500000005000000050000000000ca9a3b0027b92900ca9a3b02dae35a0000000000f7c8b50000000000f6340000000000000b002474726561737572657202000000000040b2bac9e0191e02000000000000050000000500000005000000050000000000ca9a3b0027b92900ca9a3b0037eb3735809698000065cd1d1400507265666572656e64756d5f63616e63656c6c6572140000000000407ba5f06381960a000000000000050000000500000005000000050000000000ca9a3b0027b92900ca9a3b02dae35a0000000000f7c8b50000000000f6340000000000001500447265666572656e64756d5f6b696c6c6572140000000000e038f8e815c2e10f000000000000050000000500000005000000050000000000ca9a3b0027b92900ca9a3b02dae35a0000000000f7c8b50000000000f63400000000000004e020496e666f726d6174696f6e20636f6e6365726e696e672074686520646966666572656e74207265666572656e64756d20747261636b732e01450c512457686974656c697374012457686974656c697374043c57686974656c697374656443616c6c0001040530a8040000014903017d070001490c5348546563686e6963616c436f6d6d69747465650148546563686e6963616c436f6d6d6974746565182450726f706f73616c7301004d0c040004902054686520686173686573206f6620746865206163746976652070726f706f73616c732e2850726f706f73616c4f6600010406302501040004cc2041637475616c2070726f706f73616c20666f72206120676976656e20686173682c20696620697427732063757272656e742e18566f74696e670001040630b90a040004b420566f746573206f6e206120676976656e2070726f706f73616c2c206966206974206973206f6e676f696e672e3450726f706f73616c436f756e74010010100000000004482050726f706f73616c7320736f206661722e1c4d656d626572730100940400043901205468652063757272656e74206d656d62657273206f662074686520636f6c6c6563746976652e20546869732069732073746f72656420736f7274656420286a7573742062792076616c7565292e145072696d65000000040004650120546865207072696d65206d656d62657220746861742068656c70732064657465726d696e65207468652064656661756c7420766f7465206265686176696f7220696e2063617365206f6620616273656e746174696f6e732e014d03018d0704444d617850726f706f73616c576569676874242807004429353a0200a00004250120546865206d6178696d756d20776569676874206f6620612064697370617463682063616c6c20746861742063616e2062652070726f706f73656420616e642065786563757465642e01510c5470546563686e6963616c436f6d6d69747465654d656d626572736869700170546563686e6963616c436f6d6d69747465654d656d62657273686970081c4d656d626572730100550c040004c8205468652063757272656e74206d656d626572736869702c2073746f72656420617320616e206f726465726564205665632e145072696d65000000040004a4205468652063757272656e74207072696d65206d656d6265722c206966206f6e65206578697374732e0151030191070001590c551046656573011046656573042c46656542616c616e6365730101040159031840000064a7b3b6e00d000000000000000004e82053746f72657320746865206665652062616c616e636573206173736f636961746564207769746820612048617368206964656e74696669657201550301950700005a18416e63686f720118416e63686f721c28507265436f6d6d69747300010401305d0c040008250120507265436f6d6d6974732073746f726520746865206d6170206f6620616e63686f7220496420746f20746865207072652d636f6d6d69742c2077686963682069732061206c6f636b98206f6e20616e20616e63686f7220696420746f20626520636f6d6d6974746564206c6174657240416e63686f7245766963744461746573000104013010040004c4204d617020746f2066696e6420746865206576696374696f6e206461746520676976656e20616e20616e63686f7220696434416e63686f72496e6465786573000104012c3004000478204d617020746f2066696e6420616e63686f72494420627920696e646578444c6174657374416e63686f72496e64657800002c040004b4204c617465737420616e63686f72656420696e64657820746861742077617320726563656e746c792075736564604c617465737445766963746564416e63686f72496e64657800002c04000c2501204c6174657374206576696374656420616e63686f7220696e6465782e205468697320776f756c64206b65657020747261636b206f6620746865206c61746573742065766963746564210120616e63686f7220696e64657820736f20746861742077652063616e207374617274207468652072656d6f76616c206f6620416e63686f724576696374446174657320696e64657819012066726f6d207468617420696e646578206f6e77617264732e20476f696e672066726f6d20416e63686f72496e6465786573203d3e20416e63686f7245766963744461746573444c6174657374457669637465644461746500001004000c0d01205468697320697320746f206b65657020747261636b206f66207468652064617465207768656e2061206368696c642074726965206f6620616e63686f72732077617319012065766963746564206c6173742e20497420697320746f20657669637420686973746f72696320616e63686f722064617461206368696c6420747269657320696620746865799020776572656e2774206576696374656420696e20612074696d656c79206d616e6e65722e4845766963746564416e63686f72526f6f74730001040110610c04001009012053746f7261676520666f72206576696374656420616e63686f72206368696c64207472696520726f6f74732e20416e63686f72732077697468206120676976656e1901206578706972792f6576696374696f6e2064617465206172652073746f726564206f6e2d636861696e20696e20612073696e676c65206368696c6420747269652e20546869732501206368696c6420747269652069732072656d6f766564206166746572207468652065787069727920646174652068617320706173736564207768696c652069747320726f6f7420697309012073746f726564207065726d616e656e746c7920666f722070726f76696e6720616e206578697374656e6365206f6620616e206576696374656420616e63686f722e015d03000001650c5b28506f6f6c53797374656d0128506f6f6c53797374656d1810506f6f6c000104022c690c0400003c5363686564756c6564557064617465000104022c9d0c0400003845706f6368457865637574696f6e000104022ca10c040000384163636f756e744465706f7369740101040200184000000000000000000000000000000000002c506f6f6c4465706f736974000104022cbd0c0400002c4e6f7465644368616e67650001080202c10cc50c040000016503019907302050616c6c65744964750b20726f632f706f6f6c002c50616c6c6574496e64657808045f0801012054686520696d6d757461626c6520696e646578206f6620746869732070616c6c6574207768656e20696e7374616e7469617465642077697468696e207468659c20636f6e74657874206f6620612072756e74696d6520776865726520697420697320757365642e344368616c6c656e676554696d6510100a000000043c204368616c6c656e67652074696d654c44656661756c744d696e45706f636854696d652c200000000000000000046020506f6f6c20706172616d657465722064656661756c74734044656661756c744d61784e41564167652c203c0000000000000000584d696e45706f636854696d654c6f776572426f756e642c200000000000000000045820506f6f6c20706172616d6574657220626f756e6473584d696e45706f636854696d655570706572426f756e642c20008d270000000000004c4d61784e41564167655570706572426f756e642c20100e00000000000000384d696e55706461746544656c61792c200100000000000000045420506f6f6c207570646174652073657474696e67732c537472696e674c696d6974101080000000002c4d61785472616e63686573101005000000045c204d6178206e756d626572206f66205472616e636865732c506f6f6c4465706f7369741840000010632d5ec76b050000000000000004c82054686520616d6f756e742074686174206d75737420626520726573657276656420746f20637265617465206120706f6f6c01c90c5f144c6f616e7301144c6f616e7318284c6173744c6f616e4964010104022c2c200000000000000000049020436f6e7461696e7320746865206c617374206c6f616e2069642067656e6572617465642c437265617465644c6f616e0001080202890ccd0c04000409012053746f7261676520666f72206c6f616e73207468617420686173206265656e20637265617465642062757420617265206e6f74207374696c6c206163746976652e2c4163746976654c6f616e73010104022cd10c040010682053746f7261676520666f7220616374697665206c6f616e732ef42054686520696e6465786174696f6e206f6620746869732073746f7261676520646966666572732066726f6d2060437265617465644c6f616e60206f7219012060436c6f7365644c6f616e60206265636175736520686572652077652074727920746f206d696e696d697a652074686520697465726174696f6e207370656564206f7665727020616c6c20616374697665206c6f616e7320696e206120706f6f6c2e28436c6f7365644c6f616e0001080202890cf50c04000c682053746f7261676520666f7220636c6f736564206c6f616e732eac204e6f206d75746174696f6e732061726520657870656374656420696e20746869732073746f726167652ebc204c6f616e73206172652073746f726564206865726520666f7220686973746f726963616c20707572706f7365732e3857726974654f6666506f6c696379010104022ced03040004a82053746f726573207772697465206f666620706f6c696379207573656420696e206561636820706f6f6c48506f7274666f6c696f56616c756174696f6e010104022cf90c6400000000000000000000000000000000a8d7cd66000000000004dc2053746f7265732074686520706f7274666f6c696f2076616c756174696f6e206173736f63696174656420746f206561636820706f6f6c01750301e50708544d61784163746976654c6f616e73506572506f6f6c1010e80300000494204d6178206e756d626572206f6620616374697665206c6f616e732070657220706f6f6c2e544d617857726974654f6666506f6c69637953697a6510100a00000004a4204d6178206e756d626572206f662077726974652d6f66662067726f7570732070657220706f6f6c2e01090d602c5065726d697373696f6e73012c5065726d697373696f6e7308285065726d697373696f6e0001080202250d290d0400003c5065726d697373696f6e436f756e740001040221041004000001110401ed0704404d6178526f6c657350657253636f70651010e80300000001550d6144436f6c6c61746f72416c6c6f776c6973740144436f6c6c61746f72416c6c6f776c6973740424416c6c6f776c6973740001040100a8040008682054686520636f6c6c61746f72277320616c6c6f776c6973742e1d01204e6f74653a20576520696d706c656d656e74206974206173206120636c6f73652d656e6f75676820486173685365743a204d61703c56616c696461746f7249642c2028293e2e01250401f1070001590d6218546f6b656e730001290401f50700015d0d6318427269646765011842726964676500012d0401f907083842726964676550616c6c65744964750b2063686e62726467650c4c2050616c6c6574206964656e7469666965722e00a420546865206d6f64756c65206964656e746966696572206d6179206265206f662074686520666f726d344e6174697665546f6b656e4964048000000000000000000000000000000009e974040e705c10fb4de576d6cc2619010001610d653c496e7465726573744163637275616c013c496e7465726573744163637275616c081452617465730100650d0400002c4c6173745570646174656401002c200000000000000000000001fd070001710d66204b657973746f726501204b657973746f72650c104b6579730001080202750d7d0d04000480204b6579732074686174206172652063757272656e746c792073746f7265642e404c6173744b65794279507572706f73650001080202810d30040004c42053746f72616765207573656420666f722072657472696576696e67206c617374206b657920627920707572706f73652e284b65794465706f73697401001840000010632d5ec76b05000000000000000405012053746f726573207468652063757272656e74206465706f73697420746861742077696c6c2062652074616b656e207768656e20736176696e672061206b65792e013104010108041c4d61784b65797310100a00000004d0204d6178696d756d206e756d626572206f66206b65797320746861742063616e20626520616464656420617420612074696d652e01850d682c496e766573746d656e7473012c496e766573746d656e74732834496e766573744f7264657249640101040249042c200000000000000000003452656465656d4f7264657249640101040249042c2000000000000000000030496e766573744f72646572730001080202890d8d0d0400003052656465656d4f72646572730001080202890d8d0d04000048416374697665496e766573744f72646572730101040249041d084000000000000000000000000000000000004841637469766552656465656d4f72646572730101040249041d0840000000000000000000000000000000000060496e50726f63657373696e67496e766573744f72646572730001040249041d0804000060496e50726f63657373696e6752656465656d4f72646572730001040249041d080400004c436c6561726564496e766573744f72646572730001080205910d19080400004c436c656172656452656465656d4f72646572730001080205910d190804000001450401050804584d61784f75747374616e64696e67436f6c6c6563747310100a00000008d82054686520626f756e64206f6e20686f77206d616e792066756c66696c6c6564206f726465727320776520636163686520756e74696c80207468652075736572206e6565647320746f20636f6c6c656374207468656d2e01950d69504c6971756964697479526577617264734261736501504c697175696469747952657761726473426173650c2043757272656e637901010402b903990d48000000000000000000000000000000000000001447726f75700101040210b10dd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000305374616b654163636f756e740101080202b50db90dd80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012108042050616c6c65744964750b206366672f626c72770c1501204964656e746966696572206f6620746869732070616c6c6574207573656420617320616e206163636f756e742077686572652073746f7265732074686520726577617264f02074686174206973206e6f7420636c61696d65642e205768656e20796f752064697374726962757465207265776172642c2074686520616d6f756e745c20646973747269627574656420676f657320686572652e01bd0d6a404c69717569646974795265776172647301404c6971756964697479526577617264730c28456e644f6645706f636801002c20000000000000000004f020436f6e7461696e73207468652074696d657374616d70207768656e207468652063757272656e742065706f63682069732066696e616c697a65642e3c41637469766545706f6368446174610100c10d6460ea000000000000000000000000000000000000000000000004982044617461206173736f63696174656420746f207468652063757272656e742065706f63682e404e65787445706f63684368616e67657301002908100000000008ec2050656e64696e672075706461746520646174612075736564207768656e207468652063757272656e742065706f63682066696e616c697a65732eac204f6e63652069742773207573656420666f7220746865207570646174652c20697427732072657365742e014d040125080c244d617847726f7570731010140000000c80204d61782067726f757073207573656420627920746869732070616c6c65742ef42049662074686973206c696d697420697320726561636865642c207468652065786365656465642067726f7570732061726520656974686572206e6f746420636f6d707574656420616e64206e6f742073746f7265642e484d61784368616e67657350657245706f63681010320000000c1501204d6178206e756d626572206f66206368616e676573206f66207468652073616d65207479706520656e71756575656420746f206170706c7920696e20746865206e657874e42065706f63682e204d61782063616c6c7320746f205b6050616c6c65743a3a7365745f67726f75705f7765696768742829605d206f7220746fcc205b6050616c6c65743a3a7365745f63757272656e63795f67726f75702829605d2077697468207468652073616d652069642e50496e697469616c45706f63684475726174696f6e2c2060ea0000000000000c6020496e697469616c2065706f6368206475726174696f6e2e9820546869732076616c75652063616e2062652075706461746564206c61746572207573696e678c205b6050616c6c65743a3a7365745f65706f63685f6475726174696f6e2829605d602e01c90d6b384c6971756964697479506f6f6c7301384c6971756964697479506f6f6c7300015104014d08085447656e6572616c43757272656e63795072656669788d0230b64fd1c3a60c260188389850040101205468652070726566697820666f722063757272656e636965732061646465642076696120746865204c6971756964697479506f6f6c7320666561747572652e3c54726561737572794163636f756e7400806d6f646c70792f7472737279000000000000000000000000000000000000000018f420546865207479706520666f7220706179696e6720746865207472616e73616374696f6e206665657320666f7220746865206469737061746368206f66b4206046756c66696c6c65642a6020616e6420605363686564756c655570677261646560206d657373616765732e00f4204e4f54453a205765206e65656420746f206d616b65207375726520746f20636f6c6c6563742074686520617070726f70726961746520616d6f756e74f4206265666f726568616e642061732070617274206f6620726563656976696e672074686520636f72726573706f6e64696e6720696e766573746d656e7424206d6573736167652e01cd0d6c30506f6f6c52656769737472790130506f6f6c52656769737472790830506f6f6c4d65746164617461000104022cd10d04000014506f6f6c73000104022cd90d040000015904017108082c4d61785472616e63686573101005000000045c204d6178206e756d626572206f66205472616e636865733c4d617853697a654d6574616461746110102e0000000454204d61782073697a65206f66204d6574616461746101dd0d6d40426c6f636b52657761726473426173650140426c6f636b52657761726473426173650c2043757272656e637901010402b903e10d48000000000000000000000000000000000000001447726f75700101040210f10d80000000000000000000000000000000000000000000000000000000000000000000305374616b654163636f756e740101080202b50df50d88000000000000000000000000000000000000000000000000000000000000000000000000017908042050616c6c65744964750b206366672f626c72770c1501204964656e746966696572206f6620746869732070616c6c6574207573656420617320616e206163636f756e742077686572652073746f7265732074686520726577617264f02074686174206973206e6f7420636c61696d65642e205768656e20796f752064697374726962757465207265776172642c2074686520616d6f756e745c20646973747269627574656420676f657320686572652e01f90d6e30426c6f636b526577617264730130426c6f636b52657761726473084441637469766553657373696f6e446174610100fd0db0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004a02044617461206173736f63696174656420746f207468652063757272656e742073657373696f6e2e484e65787453657373696f6e4368616e67657301008108340000000000000000000000000008f42050656e64696e672075706461746520646174612075736564207768656e207468652063757272656e742073657373696f6e2066696e616c697a65732eac204f6e63652069742773207573656420666f7220746865207570646174652c20697427732072657365742e01bd04017d08103c5374616b6543757272656e63794964b90308050008050120546865206964656e746966696572206f6620746865206172746966696369616c20626c6f636b20726577617264732063757272656e637920776869636820697384206d696e74656420616e64206275726e656420666f7220636f6c6c61746f72732e2c5374616b65416d6f756e741840000064a7b3b6e00d00000000000000000811012054686520616d6f756e74206f6620746865206172746966696369616c20626c6f636b20726577617264732063757272656e6379207768696368206973206d696e7465646820616e64206275726e656420666f7220636f6c6c61746f72732e305374616b6547726f75704964101001000000049820546865206964656e746966696572206f662074686520636f6c6c61746f722067726f75702e304d6178436f6c6c61746f72731010200000000001010e6f445472616e73666572416c6c6f774c69737401445472616e73666572416c6c6f774c69737408844163636f756e7443757272656e63795472616e73666572436f756e7444656c61790001080505050e090e04005811012053746f72616765206974656d20636f6e7461696e696e67206e756d626572206f6620616c6c6f77616e636573207365742c2064656c617920666f722073656e64696e671d01206163636f756e742f63757272656e63792c20616e6420626c6f636b206e756d6265722064656c6179206973206d6f6469666961626c652061742e20436f6e7461696e7320616ef420696e7374616e6365206f6620416c6c6f77616e63654d65746164617461207769746820616c6c6f77616e636520636f756e742061732060753634602c0d012063757272656e745f64656c617920617320604f7074696f6e3c426c6f636b4e756d626572466f723c543e3e602c20616e64206d6f6469666961626c655f61742061731d0120604f7074696f6e3c426c6f636b4e756d626572466f723c543e3e602e20496620612064656c6179206973207365742c20627574206e6f20616c6c6f77616e63657320686176652501206265656e20637265617465642c2060616c6c6f77616e63655f636f756e74602077696c6c2062652073657420746f206030602e204120646f75626c65206d617020697320757365640d012068657265206173207765206e65656420746f206b6e6f7720776865746865722074686572652069732061207265737472696374696f6e2073657420666f72207468650501206163636f756e7420616e642063757272656e637920696e207468652063617365207768657265207468657265206973206e6f20616c6c6f77616e636520666f7225012064657374696e6174696f6e206c6f636174696f6e2e205573696e6720616e2053746f726167654e4d617020776f756c64206e6f7420616c6c6f7720757320746f206c6f6f6b20757019012077686574686572207468657265207761732061207265737472696374696f6e20666f72207468652073656e64696e67206163636f756e7420616e642063757272656e63792c3020676976656e20746861743a2501202d20776527726520636865636b696e672077686574686572207468657265277320616e20616c6c6f77616e63652073706563696669656420666f72207468652072656365697665722c2020206c6f636174696f6e21012020202d20776520776f756c64206f6e6c792066696e6420776865746865722061207265737472696374696f6e207761732073657420666f7220746865206163636f756e7420696e4820202020207468697320636173652069663a250120202020202d20616e20616c6c6f77616e6365207761732073706563696669656420666f722074686520726563656976696e67206c6f636174696f6e2c20776869636820776f756c64a82020202020202072656e64657220626c6f636b6564207265737472696374696f6e73207573656c6573730101202d20776520776f756c64206f7468657277697365206e65656420746f2073746f7265206120766563206f66206c6f636174696f6e732c207768696368206973f820202070726f626c656d6174696320676976656e20746861742074686572652069736e2774206120736574206c696d6974206f6e207265636569766572731d012049662061207472616e73666572207265737472696374696f6e20697320696e20706c6163652c207468656e2061207365636f6e64206c6f6f6b757020697320646f6e65206f6e0901204163636f756e7443757272656e6379416c6c6f77616e63657320746f2073656520696620746865726520697320616e20616c6c6f77616e636520666f72207468652501207265636569766572205468697320616c6c6f777320757320746f206b6565702073746f72616765206d61702076616c7320746f206b6e6f776e2f626f756e6465642073697a65732e804163636f756e7443757272656e63795472616e73666572416c6c6f77616e636500010c0505020d0e110e04000819012053746f72616765206974656d20666f7220616c6c6f77616e6365732073706563696669656420666f7220612073656e64696e67206163636f756e742c2063757272656e637970207479706520616e6420726563656976696e67206c6f636174696f6e01c1040191080001150e70484761705265776172644d656368616e69736d01484761705265776172644d656368616e69736d0828527074486973746f72790001040210a50d040000484c617374446973747269627574696f6e496401001010000000000000000001190e72544c6971756964697479506f6f6c734761746577617901544c6971756964697479506f6f6c73476174657761791034446f6d61696e526f7574657273000104025504050504000c702053746f7261676520666f7220646f6d61696e20726f75746572732e008820546869732063616e206f6e6c792062652073657420627920616e2061646d696e2e24416c6c6f776c69737400010802021d0ea80400100d012053746f72616765207468617420636f6e7461696e732061206c696d69746564206e756d626572206f662077686974656c697374656420696e7374616e636573206f66c8206465706c6f796564206c697175696469747920706f6f6c7320666f72206120706172746963756c617220646f6d61696e2e009c20546869732063616e206f6e6c79206265206d6f64696669656420627920616e2061646d696e2e44446f6d61696e486f6f6b41646472657373000104025504810104001425012053746f7265732074686520686f6f6b2061646472657373206f66206120646f6d61696e20726571756972656420666f7220706172746963756c6172204c50206d657373616765732e0060204c69666574696d653a20496e646566696e6974656c792e00c4204e4f54453a204d757374206f6e6c79206265206368616e676561626c6520766961206041646d696e4f726967696e602e345061636b65644d65737361676500010402210e510804000cd42053746f7265732061206261746368206d6573736167652c206e6f742072656164792079657420746f20626520656e71756575652e1901204c69666574696d652068616e646c6564206279206073746172745f62617463685f6d65737361676528296020616e642060656e645f62617463685f6d657373616765282960302065787472696e736963732e01010501950808584d6178496e636f6d696e674d65737361676553697a651010000400000494204d6178696d756d2073697a65206f6620616e20696e636f6d696e67206d6573736167652e1853656e64657200807369626cd007000000000000000000000000000000000000000007d045564d0008e8205468652073656e646572206163636f756e7420746861742077696c6c206265207573656420696e20746865204f7574626f756e6451756575654020696d706c656d656e746174696f6e2e01250e73244f72646572426f6f6b01244f72646572426f6f6b10184f7264657273000104052c290e08010304cc204d6170206f66204f726465727320746f206c6f6f6b207570206f7264657273206279207468656972206f726465722069642e28557365724f72646572730001080505850ba80801030c90204d6170206f66206f726465727320666f72206120706172746963756c61722075736572d4205573656420746f207175657279206f726465727320666f72206120706172746963756c61722075736572207573696e672074686584206163636f756e74206964206f6620746865207573657220617320707265666978444f7264657249644e6f6e636553746f726501002c20000000000000000014982053746f726573204f7264657249644e6f6e636520666f72206f726465727320706c616365641d0120476976656e2074686174204f7264657249644e6f6e636520697320746f20656e73757265207468617420616c6c206f72646572732068617665206120756e697175652049442c21012077652063616e20757365206a757374206f6e65204f7264657249644e6f6e63652c207768696368206d65616e732074686174207765206f6e6c792068617665206f6e652076616c090120696e2073746f726167652c20616e6420776520646f6e2774206861766520746f20696e73657274206e6577206d61702076616c7565732075706f6e2061206e657784206163636f756e742f63757272656e6379206f72646572206372656174696f6e2e384d61726b65744665656465724964000035050801060419012053746f72657320746865206d61726b657420666565646572206964207573656420746f207365742077697468206d61726b657420636f6e76657273696f6e20726174696f73012d0501990808684d696e46756c66696c6c6d656e74416d6f756e744e617469766518400000e8890423c78a000000000000000014cc205468652064656661756c74206d696e696d756d2066756c66696c6c6d656e7420616d6f756e7420666f72206f72646572732e000d01204e4f54453a2054686520616d6f756e7420697320657870656374656420746f2062652064656e6f6d696e6174656420696e206e61746976652063757272656e63792e0901205768656e206170706c79696e6720746f20612073776170206f726465722c2069742077696c6c2062652072652d64656e6f6d696e6174656420696e746f2074686544207461726765742063757272656e63792e384e6174697665446563696d616c7310101200000000012d0e7448466f726569676e496e766573746d656e74730148466f726569676e496e766573746d656e74730c54466f726569676e496e766573746d656e74496e666f0001080202890d310e04000cfc20436f6e7461696e732074686520696e666f726d6174696f6e2061626f75742074686520666f726569676e20696e766573746d656e742070726f636573732e0501205468652073746f72616765206973206b696c6c6564206f6e63652074686520696e766573746d656e742069732066756c6c7920636f6c6c65637465642c206f722c206465637265617365642e54466f726569676e526564656d7074696f6e496e666f0001080202890d350e04000cfc20436f6e7461696e732074686520696e666f726d6174696f6e2061626f75742074686520666f726569676e20726564656d7074696f6e2070726f636573732e0501205468652073746f72616765206973206b696c6c6564206f6e63652074686520726564656d7074696f6e2069732066756c6c7920636f6c6c656374656420616e646c2066756c6c792073776170706564206f72206465637265617365643c4f726465724964546f537761704964000104022c390e0400080101204d617073206120604f7264657249646020746f2069747320636f72726573706f6e64696e6720604163636f756e7449646020616e642060537761704964602eec205468652073746f72616765206973206b696c6c6564207768656e207468652073776170206f72646572206e6f206c6f6e6765722065786973747300019d0800013d0e753c4f7261636c65507269636546656564013c4f7261636c65507269636546656564042446656456616c7565730001080202410e450e040004a82053746f726520616c6c206f7261636c652076616c75657320696e64657865642062792066656564657201390501ad08000076544f7261636c655072696365436f6c6c656374696f6e01544f7261636c655072696365436f6c6c656374696f6e1028436f6c6c656374696f6e010104022c490e44004068129491010000406812949101000004a82053746f726520616c6c206f7261636c652076616c75657320696e646578656420627920666565646572104b6579730101080202610e10100000000008d42053746f726520746865206b65797320746861742061726520726567697374656420666f72207468697320636f6c6c656374696f6e2101204f6e6c79206b657973207265676973746572656420696e20746869732073746f72652063616e206265207573656420746f206372656174652074686520636f6c6c656374696f6e38436f6c6c656374696f6e496e666f010104022c41051800000000000004a82053746f726520616c6c206f7261636c652076616c75657320696e64657865642062792066656564657248436f6c6c656374696f6e4b6579436f756e74010104022c10100000000004a82053746f726520616c6c206f7261636c652076616c75657320696e646578656420627920666565646572013d0501b10808444d6178436f6c6c656374696f6e53697a651010640000000478204d61782073697a65206f662061206461746120636f6c6c656374696f6e404d6178466565646572735065724b65791010050000000468204d6178206e756d626572206f6620636f6c6c656374696f6e7301650e7724416e63686f727356320124416e63686f727356320c1c416e63686f727300010401510e690e040004782053746f7261676520666f7220646f63756d656e7420616e63686f72732e3c506572736f6e616c416e63686f727300010801016d0ea8040004d42053746f7261676520666f7220646f63756d656e7420616e63686f727320737065636966696320746f20616e206163636f756e742e34416e63686f724465706f73697401001840000010632d5ec76b05000000000000000419012053746f726573207468652063757272656e74206465706f73697420746861742077696c6c2062652074616b656e207768656e2073746f72696e6720616e20616e63686f722e01510501b5080001710e82684c6971756964697479506f6f6c7347617465776179517565756501684c6971756964697479506f6f6c734761746577617951756575650c444d6573736167654e6f6e636553746f726501002c20000000000000000000304d6573736167655175657565000104022cbd080400041d012053746f7261676520666f72206d6573736167657320746861742077696c6c2062652070726f63657373656420647572696e672074686520606f6e5f69646c656020686f6f6b2e484661696c65644d6573736167655175657565000104022c750e040004d02053746f7261676520666f72206d657373616765732074686174206661696c656420647572696e672070726f63657373696e672e01550501b9080001790e832458636d705175657565012458636d7051756575651c50496e626f756e6458636d7053757370656e64656401007d0e0400200d01205468652073757370656e64656420696e626f756e642058434d50206368616e6e656c732e20416c6c206f746865727320617265206e6f742073757370656e6465642e00710120546869732069732061206053746f7261676556616c75656020696e7374656164206f662061206053746f726167654d6170602073696e636520776520657870656374206d756c7469706c652072656164732070657220626c6f636b690120746f20646966666572656e74206b65797320776974682061206f6e652062797465207061796c6f61642e205468652061636365737320746f2060426f756e6465644254726565536574602077696c6c2062652063616368656415012077697468696e2074686520626c6f636b20616e64207468657265666f7265206f6e6c7920696e636c75646564206f6e636520696e207468652070726f6f662073697a652e006501204e4f54453a2054686520506f562062656e63686d61726b696e672063616e6e6f74206b6e6f77207468697320616e642077696c6c206f7665722d657374696d6174652c20627574207468652061637475616c2070726f6f66442077696c6c20626520736d616c6c65722e484f7574626f756e6458636d705374617475730100890e0400185d0120546865206e6f6e2d656d7074792058434d50206368616e6e656c7320696e206f72646572206f66206265636f6d696e67206e6f6e2d656d7074792c20616e642074686520696e646578206f6620746865206669727374510120616e64206c617374206f7574626f756e64206d6573736167652e204966207468652074776f20696e64696365732061726520657175616c2c207468656e20697420696e6469636174657320616e20656d707479590120717565756520616e64207468657265206d7573742062652061206e6f6e2d604f6b6020604f7574626f756e64537461747573602e20576520617373756d65207175657565732067726f77206e6f20677265617465725901207468616e203635353335206974656d732e20517565756520696e646963657320666f72206e6f726d616c206d6573736167657320626567696e206174206f6e653b207a65726f20697320726573657276656420696e11012063617365206f6620746865206e65656420746f2073656e64206120686967682d7072696f72697479207369676e616c206d657373616765207468697320626c6f636b2e09012054686520626f6f6c20697320747275652069662074686572652069732061207369676e616c206d6573736167652077616974696e6720746f2062652073656e742e504f7574626f756e6458636d704d657373616765730101080205950e34040004bc20546865206d65737361676573206f7574626f756e6420696e206120676976656e2058434d50206368616e6e656c2e385369676e616c4d65737361676573010104025d0134040004a020416e79207369676e616c206d657373616765732077616974696e6720746f2062652073656e742e2c5175657565436f6e6669670100990e302000000030000000080000000415012054686520636f6e66696775726174696f6e20776869636820636f6e74726f6c73207468652064796e616d696373206f6620746865206f7574626f756e642071756575652e38517565756553757370656e64656401007804000441012057686574686572206f72206e6f74207468652058434d502071756575652069732073757370656e6465642066726f6d20657865637574696e6720696e636f6d696e672058434d73206f72206e6f742e4444656c6976657279466565466163746f72010104055d01d90940000064a7b3b6e00d000000000000000004c42054686520666163746f7220746f206d756c7469706c792074686520626173652064656c6976657279206665652062792e01590501c108044c4d6178496e626f756e6453757370656e6465641010e803000014490120546865206d6178696d756d206e756d626572206f6620696e626f756e642058434d50206368616e6e656c7320746861742063616e2062652073757370656e6465642073696d756c74616e656f75736c792e005d0120416e792066757274686572206368616e6e656c2073757370656e73696f6e732077696c6c206661696c20616e64206d65737361676573206d6179206765742064726f7070656420776974686f757420667572746865724501206e6f746963652e2043686f6f73696e67206120686967682076616c756520283130303029206973206f6b61793b207468652074726164652d6f666620746861742069732064657363726962656420696ed8205b60496e626f756e6458636d7053757370656e646564605d207374696c6c206170706c6965732061742074686174207363616c652e019d0e782c506f6c6b61646f7458636d012c506f6c6b61646f7458636d30305175657279436f756e74657201002c200000000000000000048820546865206c617465737420617661696c61626c6520717565727920696e6465782e1c51756572696573000104022ca10e0400045420546865206f6e676f696e6720717565726965732e28417373657454726170730101040630101000000000106820546865206578697374696e672061737365742074726170732e006101204b65792069732074686520626c616b6532203235362068617368206f6620286f726967696e2c2076657273696f6e65642060417373657473602920706169722e2056616c756520697320746865206e756d626572206f661d012074696d65732074686973207061697220686173206265656e20747261707065642028757375616c6c79206a75737420312069662069742065786973747320617420616c6c292e385361666558636d56657273696f6e00001004000861012044656661756c742076657273696f6e20746f20656e636f64652058434d207768656e206c61746573742076657273696f6e206f662064657374696e6174696f6e20697320756e6b6e6f776e2e20496620604e6f6e65602c3d01207468656e207468652064657374696e6174696f6e732077686f73652058434d2076657273696f6e20697320756e6b6e6f776e2061726520636f6e7369646572656420756e726561636861626c652e40537570706f7274656456657273696f6e0001080502b10e10040004f020546865204c61746573742076657273696f6e732074686174207765206b6e6f7720766172696f7573206c6f636174696f6e7320737570706f72742e4056657273696f6e4e6f746966696572730001080502b10e2c040004050120416c6c206c6f636174696f6e7320746861742077652068617665207265717565737465642076657273696f6e206e6f74696669636174696f6e732066726f6d2e5056657273696f6e4e6f74696679546172676574730001080502b10eb50e04000871012054686520746172676574206c6f636174696f6e73207468617420617265207375627363726962656420746f206f75722076657273696f6e206368616e6765732c2061732077656c6c20617320746865206d6f737420726563656e7494206f66206f75722076657273696f6e7320776520696e666f726d6564207468656d206f662e5456657273696f6e446973636f7665727951756575650100b90e04000c65012044657374696e6174696f6e732077686f7365206c61746573742058434d2076657273696f6e20776520776f756c64206c696b6520746f206b6e6f772e204475706c696361746573206e6f7420616c6c6f7765642c20616e6471012074686520607533326020636f756e74657220697320746865206e756d626572206f662074696d6573207468617420612073656e6420746f207468652064657374696e6174696f6e20686173206265656e20617474656d707465642c8c20776869636820697320757365642061732061207072696f726974697a6174696f6e2e4043757272656e744d6967726174696f6e0000c50e0400049c205468652063757272656e74206d6967726174696f6e27732073746167652c20696620616e792e5452656d6f74654c6f636b656446756e6769626c657300010c050202c90ed10e040004f02046756e6769626c6520617373657473207768696368207765206b6e6f7720617265206c6f636b6564206f6e20612072656d6f746520636861696e2e3c4c6f636b656446756e6769626c65730001040200e10e040004e02046756e6769626c6520617373657473207768696368207765206b6e6f7720617265206c6f636b6564206f6e207468697320636861696e2e5458636d457865637574696f6e53757370656e646564010078040004b420476c6f62616c2073757370656e73696f6e207374617465206f66207468652058434d206578656375746f722e015d0501c5080001ed0e792843756d756c757358636d000001cd0800007a1c58546f6b656e7300019106000001f10e7c3458636d5472616e736163746f72013458636d5472616e736163746f721038496e646578546f4163636f756e7400010402b40004000c45012053696e636520776520617265207573696e672070616c6c65742d7574696c69747920666f72206163636f756e742064657269766174696f6e20287468726f75676820417344657269766174697665292c6d01207765206e65656420746f2070726f7669646520616e20696e64657820666f7220746865206163636f756e742064657269766174696f6e2e20546869732073746f72616765206974656d2073746f7265732074686520696e64657879012061737369676e656420666f72206120676976656e206c6f63616c206163636f756e742e20546865736520696e64696365732061726520757361626c65206173206465726976617469766520696e207468652072656c617920636861696e6c5472616e73616374496e666f576974685765696768744c696d697400010402dd01d50804000c59012053746f72657320746865207472616e7361637420696e666f206f662061204c6f636174696f6e2e205468697320646566696e657320686f77206d75636820657874726120776569676874207765206e65656420746f6d0120616464207768656e2077652077616e7420746f207472616e7361637420696e207468652064657374696e6174696f6e20636861696e20616e64206d6178696d756d20616d6f756e74206f662077656967687420616c6c6f77656464206279207468652064657374696e6174696f6e20636861696e7044657374696e6174696f6e41737365744665655065725365636f6e6400010405dd01180400085d012053746f726573207468652066656520706572207365636f6e6420666f7220616e20617373657420696e20697473207265736572766520636861696e2e205468697320616c6c6f777320757320746f20636f6e766572744c2066726f6d2077656967687420746f206665653052656c6179496e64696365730100f50e4800000000000000000000000000000000000004a82053746f7265732074686520696e6469636573206f662072656c617920636861696e2070616c6c65747301a10601d108083053656c664c6f636174696f6edd0114010100411f04542053656c6620636861696e206c6f636174696f6e2e344261736558636d57656967687424140284d717000c00f0205468652061637475616c2077656967687420666f7220616e2058434d206d6573736167652069732060543a3a4261736558636d576569676874202b6c20543a3a576569676865723a3a77656967687428266d736729602e01f90e7d2c4f726d6c58546f6b656e73000001d908083053656c664c6f636174696f6edd0114010100411f04542053656c6620636861696e206c6f636174696f6e2e344261736558636d57656967687424140284d71700104420426173652058434d207765696768742e00f8205468652061637475616c6c792077656967687420666f7220616e2058434d206d6573736167652069732060543a3a4261736558636d576569676874202b6c20543a3a576569676865723a3a77656967687428266d736729602e01fd0e7e304d657373616765517565756501304d65737361676551756575650c30426f6f6b5374617465466f7201010405cd06010f74000000000000000000000000000000000000000000000000000000000004cc2054686520696e646578206f662074686520666972737420616e64206c61737420286e6f6e2d656d707479292070616765732e2c53657276696365486561640000cd06040004bc20546865206f726967696e2061742077686963682077652073686f756c6420626567696e20736572766963696e672e14506167657300010805050d0f110f0400048820546865206d6170206f66207061676520696e646963657320746f2070616765732e01c90601dd080c204865617053697a65101000000100143d01205468652073697a65206f662074686520706167653b207468697320696d706c69657320746865206d6178696d756d206d6573736167652073697a652077686963682063616e2062652073656e742e005901204120676f6f642076616c756520646570656e6473206f6e20746865206578706563746564206d6573736167652073697a65732c20746865697220776569676874732c207468652077656967687420746861742069735d0120617661696c61626c6520666f722070726f63657373696e67207468656d20616e6420746865206d6178696d616c206e6565646564206d6573736167652073697a652e20546865206d6178696d616c206d65737361676511012073697a6520697320736c696768746c79206c6f776572207468616e207468697320617320646566696e6564206279205b604d61784d6573736167654c656e4f66605d2e204d61785374616c651010080000000c5d0120546865206d6178696d756d206e756d626572206f66207374616c652070616765732028692e652e206f66206f766572776569676874206d657373616765732920616c6c6f776564206265666f72652063756c6c696e6751012063616e2068617070656e2e204f6e636520746865726520617265206d6f7265207374616c65207061676573207468616e20746869732c207468656e20686973746f726963616c207061676573206d6179206265fc2064726f707065642c206576656e206966207468657920636f6e7461696e20756e70726f636573736564206f766572776569676874206d657373616765732e3453657276696365576569676874b9062c01070016d0be28020070001441012054686520616d6f756e74206f66207765696768742028696620616e79292077686963682073686f756c642062652070726f766964656420746f20746865206d65737361676520717565756520666f726820736572766963696e6720656e717565756564206974656d732e00fc2054686973206d6179206265206c65676974696d6174656c7920604e6f6e656020696e207468652063617365207468617420796f752077696c6c2063616c6ca82060536572766963655175657565733a3a736572766963655f71756575657360206d616e75616c6c792e01190f7f284f726d6c546f6b656e7301284f726d6c546f6b656e731034546f74616c49737375616e636501010405b90318400000000000000000000000000000000004902054686520746f74616c2069737375616e6365206f66206120746f6b656e20747970652e144c6f636b730101080205b50d1d0f040008d820416e79206c6971756964697479206c6f636b73206f66206120746f6b656e207479706520756e64657220616e206163636f756e742e2501204e4f54453a2053686f756c64206f6e6c79206265206163636573736564207768656e2073657474696e672c206368616e67696e6720616e642066726565696e672061206c6f636b2e204163636f756e74730101080205b50d290fc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018b8205468652062616c616e6365206f66206120746f6b656e207479706520756e64657220616e206163636f756e742e00fc204e4f54453a2049662074686520746f74616c2069732065766572207a65726f2c206465637265617365206163636f756e7420726566206163636f756e742e001901204e4f54453a2054686973206973206f6e6c79207573656420696e20746865206361736520746861742074686973206d6f64756c65206973207573656420746f2073746f7265282062616c616e6365732e2052657365727665730101080205b50d2d0f040004a4204e616d6564207265736572766573206f6e20736f6d65206163636f756e742062616c616e6365732e0001e50808204d61784c6f636b73101032000000002c4d61785265736572766573101032000000040d0120546865206d6178696d756d206e756d626572206f66206e616d656420726573657276657320746861742063616e206578697374206f6e20616e206163636f756e742e01390f962c436861696e427269646765012c436861696e427269646765182c436861696e4e6f6e63657300010401082c040004fc20416c6c2077686974656c697374656420636861696e7320616e642074686569722072657370656374697665207472616e73616374696f6e20636f756e74735052656c61796572566f74655468726573686f6c64010010100100000004cc204e756d626572206f6620766f74657320726571756972656420666f7220612070726f706f73616c20746f20657865637574652052656c61796572730101040100780400046c20547261636b732063757272656e742072656c61796572207365743052656c61796572436f756e7401001010000000000468204e756d626572206f662072656c617965727320696e2073657414566f74657300010801013d0f450f0400085420416c6c206b6e6f776e2070726f706f73616c732e2d0120546865206b6579206973207468652068617368206f66207468652063616c6c20616e6420746865206465706f7369742049442c20746f20656e73757265206974277320756e697175652e245265736f75726365730001040104340400041901205574696c697a6564206279207468652062726964676520736f66747761726520746f206d6170207265736f757263652049447320746f2061637475616c206d6574686f647301d10601e908101c436861696e4964080401087c20546865206964656e74696669657220666f72207468697320636861696e2e6d012054686973206d75737420626520756e6971756520616e64206d757374206e6f7420636f6c6c6964652077697468206578697374696e67204944732077697468696e206120736574206f66206272696467656420636861696e732e2050616c6c65744964750b2063686e627264676510410120436f6e7374616e7420636f6e66696775726174696f6e20706172616d6574657220746f2073746f726520746865206d6f64756c65206964656e74696669657220666f72207468652070616c6c65742e00390120546865206d6f64756c65206964656e746966696572206d6179206265206f662074686520666f726d2060606050616c6c65744964282a622263686e6272646765222960606020616e6420736574a901207573696e6720746865205b60706172616d657465725f7479706573605d2868747470733a2f2f7375627374726174652e6465762f646f63732f656e2f6b6e6f776c65646765626173652f72756e74696d652f6d6163726f7323706172616d657465725f7479706573294050726f706f73616c4c69666574696d651010f4010000005052656c61796572566f74655468726573686f6c64101001000000040502205479706520666f722073657474696e6720696e697469616c206e756d626572206f6620766f74657320726571756972656420666f7220612070726f706f73616c20746f2062652065786563757465642028736565205b52656c61796572566f74655468726573686f6c645d20696e2073746f726167652073656374696f6e292e014d0f97444f726d6c4173736574526567697374727901444f726d6c417373657452656769737472790c204d6574616461746100010405b903d906040004bc20546865206d65746164617461206f6620616e2061737365742c20696e64657865642062792061737365742069642e444c6f636174696f6e546f4173736574496400010405ed04b903040008f0204d6170732061206c6f636174696f6e20746f20616e206173736574206964202d2075736566756c207768656e2070726f63657373696e672078636d28206d657373616765732e2c4c617374417373657449640100b9030400040d0120546865206c6173742070726f636573736564206173736574206964202d2075736564207768656e2061737369676e696e6720612073657175656e7469616c2069642e01d50601ed08042c537472696e674c696d697410108000000004a020546865206d6178696d756d206c656e677468206f662061206e616d65206f722073796d626f6c2e01510f981c4f726d6c58636d011c4f726d6c58636d0001010701f1080001550f990c45564d010c45564d10304163636f756e74436f64657301010402210234040000504163636f756e74436f6465734d65746164617461000104022102590f0400003c4163636f756e7453746f726167657301010802025d0f3080000000000000000000000000000000000000000000000000000000000000000000205375696369646564000104022102a804000001050701f5080001610fa02845564d436861696e4964012845564d436861696e4964041c436861696e496401002c2000000000000000000448205468652045564d20636861696e2049442e00000000a11c42617365466565011c4261736546656508344261736546656550657247617301001d058000ca9a3b000000000000000000000000000000000000000000000000000000000028456c6173746963697479010019071048e801000001150701fd080000a220457468657265756d0120457468657265756d141c50656e64696e670100650f040004d02043757272656e74206275696c64696e6720626c6f636b2773207472616e73616374696f6e7320616e642072656365697074732e3043757272656e74426c6f636b0000890f04000470205468652063757272656e7420457468657265756d20626c6f636b2e3c43757272656e74526563656970747300009d0f0400047c205468652063757272656e7420457468657265756d2072656365697074732e6843757272656e745472616e73616374696f6e53746174757365730000a10f04000488205468652063757272656e74207472616e73616374696f6e2073746174757365732e24426c6f636b48617368010104051d053080000000000000000000000000000000000000000000000000000000000000000000011d070101090001a50fa34c457468657265756d5472616e73616374696f6e014c457468657265756d5472616e73616374696f6e04144e6f6e636501001d05800000000000000000000000000000000000000000000000000000000000000000044c2053746f7261676520666f72206e6f6e63652e00000001a90fa46c4c6971756964697479506f6f6c734178656c617247617465776179016c4c6971756964697479506f6f6c734178656c617247617465776179083c47617465776179436f6e7472616374010021025000000000000000000000000000000000000000000040536f75726365436f6e76657273696f6e0001040530490704000819012060536f75726365436f6e76657273696f6e6020697320612060686173685f6f66285665633c75383e29602077686572652074686520605665633c75383e6020697320746865250120626c616b653235362d68617368206f662074686520736f757263652d636861696e206964656e746966696572207573656420627920746865204178656c6172206e6574776f726b2e0145070125090001ad0fa5105375646f01105375646f040c4b6579000000040004842054686520604163636f756e74496460206f6620746865207375646f206b65792e014d070129090001b10fc820506f6f6c466565730120506f6f6c4665657318184665654964730101080202b50fb90f0400100101204d617073206120706f6f6c20746f20746865697220636f72726573706f6e64696e6720666565206964732077697468205b506f6f6c4665654275636b65745d34206772616e756c61726974792e001101204c69666574696d65206f6620612073746f7261676520656e7472793a20466f72657665722c20696e686572697465642066726f6d20706f6f6c206c69666574696d652e244c617374466565496401002c2000000000000000000cd420536f75726365206f6620747275746820666f7220746865206c617374206372656174656420666565206964656e7469666965722e004c204c69666574696d653a20466f72657665722e48466565496473546f506f6f6c4275636b6574000104022cb50f04000c1501204d617073206120666565206964656e74696669657220746f2074686520636f72726573706f6e64696e6720706f6f6c20616e64205b506f6f6c4665654275636b65745d2e001101204c69666574696d65206f6620612073746f7261676520656e7472793a20466f72657665722c20696e686572697465642066726f6d20706f6f6c206c69666574696d652e28416374697665466565730101080202b50fbd0f040014210120526570726573656e74732074686520616374697665206665657320666f72206120676976656e20706f6f6c20696420616e6420666565206275636b65742e20466f7220656163682101206665652c20746865206c696d69742061732077656c6c2061732070656e64696e672c2064697362757273656d656e7420616e642070617961626c6520616d6f756e7473206172652820696e636c756465642e001101204c69666574696d65206f6620612073746f7261676520656e7472793a20466f72657665722c20696e686572697465642066726f6d20706f6f6c206c69666574696d652e48506f7274666f6c696f56616c756174696f6e010104022cd10f6400000000000000000000000000000000a8d7cd6600000000001009012053746f7265732074686520286e656761746976652920706f7274666f6c696f2076616c756174696f6e206173736f63696174656420746f206561636820706f6f6c9820646572697665642066726f6d207468652070656e64696e672066656520616d6f756e74732e001101204c69666574696d65206f6620612073746f7261676520656e7472793a20466f72657665722c20696e686572697465642066726f6d20706f6f6c206c69666574696d652e54417373657473556e6465724d616e6167656d656e74010104022c1840000000000000000000000000000000001009012053746f726573207468652028706f7369746976652920706f7274666f6c696f2076616c756174696f6e206173736f63696174656420746f206561636820706f6f6cb020646572697665642066726f6d207468652041554d206f66207468652070726576696f75732065706f63682e001101204c69666574696d65206f6620612073746f7261676520656e7472793a20466f72657665722c20696e686572697465642066726f6d20706f6f6c206c69666574696d652e015107012d09042050616c6c65744964750b206366672f706c667308fc204964656e746966696572206f6620746869732070616c6c6574207573656420617320616e206163636f756e742077686963682074656d706f726172696c7909012073746f7265732064697362757273696e67206665657320696e206265747765656e20636c6f73696e6720616e6420657865637574696e6720616e2065706f63682e01d90ffa1c52656d61726b73000155070131090001dd0ffb20546f6b656e4d75780120546f6b656e4d757800016d07013509042050616c6c65744964750b206366672f746d75780001e10ffde50f042848436865636b4e6f6e5a65726f53656e646572ed0fa840436865636b5370656356657273696f6ef10f1038436865636b547856657273696f6ef50f1030436865636b47656e65736973f90f3038436865636b4d6f7274616c697479fd0f3028436865636b4e6f6e63650510a82c436865636b5765696768740910a8604368617267655472616e73616374696f6e5061796d656e740d10a844436865636b4d65746164617461486173681110806c50726542616c616e63655472616e73666572457874656e73696f6e1910a80905" +) diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV14_portable.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV14_portable.go new file mode 100644 index 000000000..c7e38d4db --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV14_portable.go @@ -0,0 +1,357 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "errors" + "fmt" + "math/big" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +type PortableTypeV14 struct { + ID Si1LookupTypeID + Type Si1Type +} + +type Si0LookupTypeID UCompact + +type Si0Path []Text + +// `byte` can only be one of the variants listed below +type Si0TypeDefPrimitive byte + +// Si0TypeDefPrimitive variants +const ( + IsBool = 0 + IsChar = 1 + IsStr = 2 + IsU8 = 3 + IsU16 = 4 + IsU32 = 5 + IsU64 = 6 + IsU128 = 7 + IsU256 = 8 + IsI8 = 9 + IsI16 = 10 + IsI32 = 11 + IsI64 = 12 + IsI128 = 13 + IsI256 = 14 +) + +func (d *Si0TypeDefPrimitive) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + switch b { + case IsBool: + *d = IsBool + case IsChar: + *d = IsChar + case IsStr: + *d = IsStr + case IsU8: + *d = IsU8 + case IsU16: + *d = IsU16 + case IsU32: + *d = IsU32 + case IsU64: + *d = IsU64 + case IsU128: + *d = IsU128 + case IsU256: + *d = IsU256 + case IsI8: + *d = IsI8 + case IsI16: + *d = IsI16 + case IsI32: + *d = IsI32 + case IsI64: + *d = IsI64 + case IsI128: + *d = IsI128 + case IsI256: + *d = IsI256 + default: + return fmt.Errorf("Si0TypeDefPrimitive do not support this type: %d", b) + } + return nil +} + +type Si1LookupTypeID struct { + UCompact +} + +func NewSi1LookupTypeID(value *big.Int) Si1LookupTypeID { + return Si1LookupTypeID{NewUCompact(value)} +} + +func NewSi1LookupTypeIDFromUInt(value uint64) Si1LookupTypeID { + return NewSi1LookupTypeID(new(big.Int).SetUint64(value)) +} + +type Si1Path Si0Path + +type Si1Type struct { + Path Si1Path + Params []Si1TypeParameter + Def Si1TypeDef + Docs []Text +} + +type Si1TypeParameter struct { + Name Text + HasType bool + Type Si1LookupTypeID +} + +func (d *Si1TypeParameter) Decode(decoder scale.Decoder) error { + err := decoder.Decode(&d.Name) + if err != nil { + return err + } + + return decoder.DecodeOption(&d.HasType, &d.Type) +} + +func (d Si1TypeParameter) Encode(encoder scale.Encoder) error { + err := encoder.Encode(d.Name) + if err != nil { + return err + } + + return encoder.EncodeOption(d.HasType, &d.Type) +} + +type Si1TypeDef struct { + IsComposite bool + Composite Si1TypeDefComposite + + IsVariant bool + Variant Si1TypeDefVariant + + IsSequence bool + Sequence Si1TypeDefSequence + + IsArray bool + Array Si1TypeDefArray + + IsTuple bool + Tuple Si1TypeDefTuple + + IsPrimitive bool + Primitive Si1TypeDefPrimitive + + IsCompact bool + Compact Si1TypeDefCompact + + IsBitSequence bool + BitSequence Si1TypeDefBitSequence + + IsHistoricMetaCompat bool + HistoricMetaCompat Type +} + +func (d *Si1TypeDef) Decode(decoder scale.Decoder) error { + num, err := decoder.ReadOneByte() + if err != nil { + return err + } + switch num { + case 0: + d.IsComposite = true + return decoder.Decode(&d.Composite) + case 1: + d.IsVariant = true + return decoder.Decode(&d.Variant) + case 2: + d.IsSequence = true + return decoder.Decode(&d.Sequence) + case 3: + d.IsArray = true + return decoder.Decode(&d.Array) + case 4: + d.IsTuple = true + return decoder.Decode(&d.Tuple) + case 5: + d.IsPrimitive = true + return decoder.Decode(&d.Primitive) + case 6: + d.IsCompact = true + return decoder.Decode(&d.Compact) + case 7: + d.IsBitSequence = true + return decoder.Decode(&d.BitSequence) + case 8: + d.IsHistoricMetaCompat = true + return decoder.Decode(&d.HistoricMetaCompat) + + default: + return fmt.Errorf("Si1TypeDef unknow type : %d", num) + } +} + +func (d Si1TypeDef) Encode(encoder scale.Encoder) error { //nolint:funlen + switch { + case d.IsComposite: + err := encoder.PushByte(0) + if err != nil { + return err + } + return encoder.Encode(&d.Composite) + case d.IsVariant: + err := encoder.PushByte(1) + if err != nil { + return err + } + return encoder.Encode(&d.Variant) + case d.IsSequence: + err := encoder.PushByte(2) + if err != nil { + return err + } + return encoder.Encode(&d.Sequence) + case d.IsArray: + err := encoder.PushByte(3) + if err != nil { + return err + } + return encoder.Encode(&d.Array) + case d.IsTuple: + err := encoder.PushByte(4) + if err != nil { + return err + } + return encoder.Encode(&d.Tuple) + case d.IsPrimitive: + err := encoder.PushByte(5) + if err != nil { + return err + } + return encoder.Encode(&d.Primitive) + case d.IsCompact: + err := encoder.PushByte(6) + if err != nil { + return err + } + return encoder.Encode(&d.Compact) + case d.IsBitSequence: + err := encoder.PushByte(7) + if err != nil { + return err + } + return encoder.Encode(&d.BitSequence) + case d.IsHistoricMetaCompat: + err := encoder.PushByte(8) + if err != nil { + return err + } + d.IsHistoricMetaCompat = true + return encoder.Encode(&d.HistoricMetaCompat) + + default: + return errors.New("expected Si1TypeDef instance to be one of the valid variants") + } +} + +type Si1TypeDefComposite struct { + Fields []Si1Field +} + +type Si1Field struct { + HasName bool + Name Text + Type Si1LookupTypeID + HasTypeName bool + TypeName Text + Docs []Text +} + +func (d *Si1Field) Decode(decoder scale.Decoder) error { + err := decoder.DecodeOption(&d.HasName, &d.Name) + if err != nil { + return err + } + + err = decoder.Decode(&d.Type) + if err != nil { + return err + } + + err = decoder.DecodeOption(&d.HasTypeName, &d.TypeName) + if err != nil { + return err + } + + return decoder.Decode(&d.Docs) +} + +func (d Si1Field) Encode(encoder scale.Encoder) error { + err := encoder.EncodeOption(d.HasName, d.Name) + if err != nil { + return err + } + err = encoder.Encode(d.Type) + if err != nil { + return err + } + err = encoder.EncodeOption(d.HasTypeName, d.TypeName) + if err != nil { + return err + } + return encoder.Encode(&d.Docs) +} + +type Si1TypeDefVariant struct { + Variants []Si1Variant +} + +type Si1Variant struct { + Name Text + Fields []Si1Field + Index U8 + Docs []Text +} + +type Si1TypeDefSequence struct { + Type Si1LookupTypeID +} + +type Si1TypeDefArray struct { + Len U32 + Type Si1LookupTypeID +} + +type Si1TypeDefTuple []Si1LookupTypeID + +type Si1TypeDefPrimitive struct { + Si0TypeDefPrimitive +} + +type Si1TypeDefCompact struct { + Type Si1LookupTypeID +} + +type Si1TypeDefBitSequence struct { + BitStoreType Si1LookupTypeID + BitOrderType Si1LookupTypeID +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV4.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV4.go new file mode 100644 index 000000000..711e0abdc --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV4.go @@ -0,0 +1,458 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "errors" + "fmt" + "hash" + "strings" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/xxhash" + "golang.org/x/crypto/blake2b" +) + +// Modelled after https://github.com/paritytech/substrate/blob/v1.0.0rc2/srml/metadata/src/lib.rs +type MetadataV4 struct { + Modules []ModuleMetadataV4 +} + +func (m *MetadataV4) Decode(decoder scale.Decoder) error { + err := decoder.Decode(&m.Modules) + if err != nil { + return err + } + return nil +} + +func (m MetadataV4) Encode(encoder scale.Encoder) error { + err := encoder.Encode(m.Modules) + if err != nil { + return err + } + return nil +} + +func (m *MetadataV4) FindCallIndex(call string) (CallIndex, error) { + s := strings.Split(call, ".") + mi := uint8(0) + for _, mod := range m.Modules { + if !mod.HasCalls { + continue + } + if string(mod.Name) != s[0] { + mi++ + continue + } + for ci, f := range mod.Calls { + if string(f.Name) == s[1] { + return CallIndex{mi, uint8(ci)}, nil + } + } + return CallIndex{}, fmt.Errorf("method %v not found within module %v for call %v", s[1], mod.Name, call) + } + return CallIndex{}, fmt.Errorf("module %v not found in metadata for call %v", s[0], call) +} + +func (m *MetadataV4) FindEventNamesForEventID(eventID EventID) (Text, Text, error) { + mi := uint8(0) + for _, mod := range m.Modules { + if !mod.HasEvents { + continue + } + if mi != eventID[0] { + mi++ + continue + } + if int(eventID[1]) >= len(mod.Events) { + return "", "", fmt.Errorf("event index %v for module %v out of range", eventID[1], mod.Name) + } + return mod.Prefix, mod.Events[eventID[1]].Name, nil + } + return "", "", fmt.Errorf("module index %v out of range", eventID[0]) +} + +func (m *MetadataV4) FindConstantValue(_module Text, _constant Text) ([]byte, error) { + return nil, fmt.Errorf("constants are only supported from metadata v6 and up") +} + +func (m *MetadataV4) FindStorageEntryMetadata(module string, fn string) (StorageEntryMetadata, error) { + for _, mod := range m.Modules { + if !mod.HasStorage { + continue + } + if string(mod.Prefix) != module { + continue + } + for _, s := range mod.Storage { + if string(s.Name) != fn { + continue + } + return s, nil + } + return nil, fmt.Errorf("storage %v not found within module %v", fn, module) + } + return nil, fmt.Errorf("module %v not found in metadata", module) +} + +func (m *MetadataV4) ExistsModuleMetadata(module string) bool { + for _, mod := range m.Modules { + if string(mod.Prefix) == module { + return true + } + } + return false +} + +type ModuleMetadataV4 struct { + Name Text + Prefix Text + HasStorage bool + Storage []StorageFunctionMetadataV4 + HasCalls bool + Calls []FunctionMetadataV4 + HasEvents bool + Events []EventMetadataV4 +} + +func (m *ModuleMetadataV4) Decode(decoder scale.Decoder) error { + err := decoder.Decode(&m.Name) + if err != nil { + return err + } + + err = decoder.Decode(&m.Prefix) + if err != nil { + return err + } + + err = decoder.DecodeOption(&m.HasStorage, &m.Storage) + if err != nil { + return err + } + + err = decoder.DecodeOption(&m.HasCalls, &m.Calls) + if err != nil { + return err + } + + err = decoder.DecodeOption(&m.HasEvents, &m.Events) + if err != nil { + return err + } + return nil +} + +func (m ModuleMetadataV4) Encode(encoder scale.Encoder) error { + err := encoder.Encode(m.Name) + if err != nil { + return err + } + + err = encoder.Encode(m.Prefix) + if err != nil { + return err + } + + err = encoder.EncodeOption(m.HasStorage, m.Storage) + if err != nil { + return err + } + + err = encoder.EncodeOption(m.HasCalls, m.Calls) + if err != nil { + return err + } + + err = encoder.EncodeOption(m.HasEvents, m.Events) + if err != nil { + return err + } + return nil +} + +type StorageFunctionMetadataV4 struct { + Name Text + Modifier StorageFunctionModifierV0 + Type StorageFunctionTypeV4 + Fallback Bytes + Documentation []Text +} + +type StorageFunctionTypeV4 struct { + IsType bool + AsType Type // 0 + IsMap bool + AsMap MapTypeV4 // 1 + IsDoubleMap bool + AsDoubleMap DoubleMapTypeV4 // 2 +} + +func (s StorageFunctionMetadataV4) IsPlain() bool { + return s.Type.IsType +} + +func (s StorageFunctionMetadataV4) Hasher() (hash.Hash, error) { + if s.IsMap() { + return s.Type.AsMap.Hasher.HashFunc() + } + + return DefaultPlainHasher(s) +} + +func (s StorageFunctionMetadataV4) IsMap() bool { + return s.Type.IsMap || s.Type.IsDoubleMap +} + +func (s StorageFunctionMetadataV4) Hashers() ([]hash.Hash, error) { + if !s.IsMap() { + return nil, fmt.Errorf("Hashers() is only to be called on Maps") + } + + if s.Type.IsDoubleMap { + return nil, fmt.Errorf("getting the two hashers of a DoubleMap is not supported for metadata v4. " + + "Please upgrade to use metadata v8 or newer") + } + + hashFn, err := s.Type.AsMap.Hasher.HashFunc() + if err != nil { + return nil, err + } + + return []hash.Hash{hashFn}, nil +} + +func (s *StorageFunctionTypeV4) Decode(decoder scale.Decoder) error { + var t uint8 + err := decoder.Decode(&t) + if err != nil { + return err + } + + switch t { + case 0: + s.IsType = true + err = decoder.Decode(&s.AsType) + if err != nil { + return err + } + case 1: + s.IsMap = true + err = decoder.Decode(&s.AsMap) + if err != nil { + return err + } + case 2: + s.IsDoubleMap = true + err = decoder.Decode(&s.AsDoubleMap) + if err != nil { + return err + } + default: + return fmt.Errorf("received unexpected type %v", t) + } + return nil +} + +func (s StorageFunctionTypeV4) Encode(encoder scale.Encoder) error { + switch { + case s.IsType: + err := encoder.PushByte(0) + if err != nil { + return err + } + err = encoder.Encode(s.AsType) + if err != nil { + return err + } + case s.IsMap: + err := encoder.PushByte(1) + if err != nil { + return err + } + err = encoder.Encode(s.AsMap) + if err != nil { + return err + } + case s.IsDoubleMap: + err := encoder.PushByte(2) + if err != nil { + return err + } + err = encoder.Encode(s.AsDoubleMap) + if err != nil { + return err + } + default: + return fmt.Errorf("expected to be either type, map or double map, but none was set: %v", s) + } + return nil +} + +type DoubleMapTypeV4 struct { + Hasher StorageHasher + Key1 Type + Key2 Type + Value Type + Key2Hasher Text +} + +type MapTypeV4 struct { + Hasher StorageHasher + Key Type + Value Type + Linked bool +} + +type StorageHasher struct { + IsBlake2_128 bool // 0 + IsBlake2_256 bool // 1 + IsTwox128 bool // 2 + IsTwox256 bool // 3 + IsTwox64Concat bool // 4 +} + +func (s *StorageHasher) Decode(decoder scale.Decoder) error { + var t uint8 + err := decoder.Decode(&t) + if err != nil { + return err + } + + switch t { + case 0: + s.IsBlake2_128 = true + case 1: + s.IsBlake2_256 = true + case 2: + s.IsTwox128 = true + case 3: + s.IsTwox256 = true + case 4: + s.IsTwox64Concat = true + default: + return fmt.Errorf("received unexpected storage hasher type %v", t) + } + return nil +} + +func (s StorageHasher) Encode(encoder scale.Encoder) error { + var t uint8 + switch { + case s.IsBlake2_128: + t = 0 + case s.IsBlake2_256: + t = 1 + case s.IsTwox128: + t = 2 + case s.IsTwox256: + t = 3 + case s.IsTwox64Concat: + t = 4 + default: + return fmt.Errorf("expected storage hasher, but none was set: %v", s) + } + return encoder.PushByte(t) +} + +type FunctionMetadataV4 struct { + Name Text + Args []FunctionArgumentMetadata + Documentation []Text +} + +type EventMetadataV4 struct { + Name Text + Args []Type + Documentation []Text +} + +func (s StorageHasher) HashFunc() (hash.Hash, error) { + // Blake2_128 + if s.IsBlake2_128 { + return blake2b.New(128, nil) + } + + // Blake2_256 + if s.IsBlake2_256 { + return blake2b.New256(nil) + } + + // Twox128 + if s.IsTwox128 { + return xxhash.New128(nil), nil + } + + // Twox256 + if s.IsTwox256 { + return xxhash.New256(nil), nil + } + + // Twox64Concat + if s.IsTwox64Concat { + return xxhash.New64Concat(nil), nil + } + + return nil, errors.New("hash function type not yet supported") +} + +type FunctionArgumentMetadata struct { + Name Text + Type Type +} + +type StorageFunctionModifierV0 struct { + IsOptional bool // 0 + IsDefault bool // 1 + IsRequired bool // 2 +} + +func (s *StorageFunctionModifierV0) Decode(decoder scale.Decoder) error { + var t uint8 + err := decoder.Decode(&t) + if err != nil { + return err + } + + switch t { + case 0: + s.IsOptional = true + case 1: + s.IsDefault = true + case 2: + s.IsRequired = true + default: + return fmt.Errorf("received unexpected storage function modifier type %v", t) + } + return nil +} + +func (s StorageFunctionModifierV0) Encode(encoder scale.Encoder) error { + var t uint8 + switch { + case s.IsOptional: + t = 0 + case s.IsDefault: + t = 1 + case s.IsRequired: + t = 2 + default: + return fmt.Errorf("expected storage function modifier, but none was set: %v", s) + } + return encoder.PushByte(t) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV7.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV7.go new file mode 100644 index 000000000..291c89512 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV7.go @@ -0,0 +1,329 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "fmt" + "hash" + "strings" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +// Modelled after packages/types/src/Metadata/v7/Metadata.ts +type MetadataV7 struct { + Modules []ModuleMetadataV7 +} + +func (m *MetadataV7) Decode(decoder scale.Decoder) error { + err := decoder.Decode(&m.Modules) + if err != nil { + return err + } + return nil +} + +func (m MetadataV7) Encode(encoder scale.Encoder) error { + err := encoder.Encode(m.Modules) + if err != nil { + return err + } + return nil +} + +func (m *MetadataV7) FindCallIndex(call string) (CallIndex, error) { + s := strings.Split(call, ".") + mi := uint8(0) + for _, mod := range m.Modules { + if !mod.HasCalls { + continue + } + if string(mod.Name) != s[0] { + mi++ + continue + } + for ci, f := range mod.Calls { + if string(f.Name) == s[1] { + return CallIndex{mi, uint8(ci)}, nil + } + } + return CallIndex{}, fmt.Errorf("method %v not found within module %v for call %v", s[1], mod.Name, call) + } + return CallIndex{}, fmt.Errorf("module %v not found in metadata for call %v", s[0], call) +} + +func (m *MetadataV7) FindEventNamesForEventID(eventID EventID) (Text, Text, error) { + mi := uint8(0) + for _, mod := range m.Modules { + if !mod.HasEvents { + continue + } + if mi != eventID[0] { + mi++ + continue + } + if int(eventID[1]) >= len(mod.Events) { + return "", "", fmt.Errorf("event index %v for module %v out of range", eventID[1], mod.Name) + } + return mod.Name, mod.Events[eventID[1]].Name, nil + } + return "", "", fmt.Errorf("module index %v out of range", eventID[0]) +} + +func (m *MetadataV7) FindConstantValue(module Text, constant Text) ([]byte, error) { + for _, mod := range m.Modules { + if mod.Name == module { + for _, cons := range mod.Constants { + if cons.Name == constant { + return cons.Value, nil + } + } + } + } + return nil, fmt.Errorf("could not find constant %s.%s", module, constant) +} + +func (m *MetadataV7) FindStorageEntryMetadata(module string, fn string) (StorageEntryMetadata, error) { + for _, mod := range m.Modules { + if !mod.HasStorage { + continue + } + if string(mod.Storage.Prefix) != module { + continue + } + for _, s := range mod.Storage.Items { + if string(s.Name) != fn { + continue + } + return s, nil + } + return nil, fmt.Errorf("storage %v not found within module %v", fn, module) + } + return nil, fmt.Errorf("module %v not found in metadata", module) +} + +func (m *MetadataV7) ExistsModuleMetadata(module string) bool { + for _, mod := range m.Modules { + if string(mod.Name) == module { + return true + } + } + return false +} + +type ModuleMetadataV7 struct { + Name Text + HasStorage bool + Storage StorageMetadata + HasCalls bool + Calls []FunctionMetadataV4 + HasEvents bool + Events []EventMetadataV4 + Constants []ModuleConstantMetadataV6 +} + +func (m *ModuleMetadataV7) Decode(decoder scale.Decoder) error { + err := decoder.Decode(&m.Name) + if err != nil { + return err + } + + err = decoder.DecodeOption(&m.HasStorage, &m.Storage) + if err != nil { + return err + } + + err = decoder.DecodeOption(&m.HasCalls, &m.Calls) + if err != nil { + return err + } + + err = decoder.DecodeOption(&m.HasEvents, &m.Events) + if err != nil { + return err + } + + return decoder.Decode(&m.Constants) +} + +func (m ModuleMetadataV7) Encode(encoder scale.Encoder) error { + err := encoder.Encode(m.Name) + if err != nil { + return err + } + + err = encoder.EncodeOption(m.HasStorage, m.Storage) + if err != nil { + return err + } + + err = encoder.EncodeOption(m.HasCalls, m.Calls) + if err != nil { + return err + } + + err = encoder.EncodeOption(m.HasEvents, m.Events) + if err != nil { + return err + } + + return encoder.Encode(m.Constants) +} + +type StorageMetadata struct { + Prefix Text + Items []StorageFunctionMetadataV5 +} + +type StorageFunctionMetadataV5 struct { + Name Text + Modifier StorageFunctionModifierV0 + Type StorageFunctionTypeV5 + Fallback Bytes + Documentation []Text +} + +type StorageFunctionTypeV5 struct { + IsType bool + AsType Type // 0 + IsMap bool + AsMap MapTypeV4 // 1 + IsDoubleMap bool + AsDoubleMap DoubleMapTypeV5 // 2 +} + +func (s StorageFunctionMetadataV5) IsPlain() bool { + return s.Type.IsType +} + +func (s StorageFunctionMetadataV5) Hasher() (hash.Hash, error) { + return DefaultPlainHasher(s) +} + +func (s StorageFunctionMetadataV5) IsMap() bool { + return s.Type.IsMap || s.Type.IsDoubleMap +} + +func (s StorageFunctionMetadataV5) Hashers() ([]hash.Hash, error) { + if !s.IsMap() { + return nil, fmt.Errorf("Hashers() is only to be called on Maps") + } + + var hashers = collectHashersV5(s.Type) + hasherFns := make([]hash.Hash, len(hashers)) + for i, hasher := range hashers { + hasherFn, err := hasher.HashFunc() + if err != nil { + return nil, err + } + hasherFns[i] = hasherFn + } + return hasherFns, nil +} + +func collectHashersV5(x StorageFunctionTypeV5) []StorageHasher { + switch { + case x.IsMap: + return []StorageHasher{x.AsMap.Hasher} + case x.IsDoubleMap: + return []StorageHasher{x.AsDoubleMap.Hasher, x.AsDoubleMap.Key2Hasher} + default: + panic("Unexpexted type") + } +} + +func (s *StorageFunctionTypeV5) Decode(decoder scale.Decoder) error { + var t uint8 + err := decoder.Decode(&t) + if err != nil { + return err + } + + switch t { + case 0: + s.IsType = true + err = decoder.Decode(&s.AsType) + if err != nil { + return err + } + case 1: + s.IsMap = true + err = decoder.Decode(&s.AsMap) + if err != nil { + return err + } + case 2: + s.IsDoubleMap = true + err = decoder.Decode(&s.AsDoubleMap) + if err != nil { + return err + } + default: + return fmt.Errorf("received unexpected type %v", t) + } + return nil +} + +func (s StorageFunctionTypeV5) Encode(encoder scale.Encoder) error { + switch { + case s.IsType: + err := encoder.PushByte(0) + if err != nil { + return err + } + err = encoder.Encode(s.AsType) + if err != nil { + return err + } + case s.IsMap: + err := encoder.PushByte(1) + if err != nil { + return err + } + err = encoder.Encode(s.AsMap) + if err != nil { + return err + } + case s.IsDoubleMap: + err := encoder.PushByte(2) + if err != nil { + return err + } + err = encoder.Encode(s.AsDoubleMap) + if err != nil { + return err + } + default: + return fmt.Errorf("expected to be either type, map or double map, but none was set: %v", s) + } + return nil +} + +type DoubleMapTypeV5 struct { + Hasher StorageHasher + Key1 Type + Key2 Type + Value Type + Key2Hasher StorageHasher +} + +type ModuleConstantMetadataV6 struct { + Name Text + Type Type + Value Bytes + Documentation []Text +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV8.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV8.go new file mode 100644 index 000000000..ab4f6a5e9 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV8.go @@ -0,0 +1,200 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "fmt" + "strings" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +// Modelled after packages/types/src/Metadata/v8/Metadata.ts +type MetadataV8 struct { + Modules []ModuleMetadataV8 +} + +func (m *MetadataV8) Decode(decoder scale.Decoder) error { + err := decoder.Decode(&m.Modules) + if err != nil { + return err + } + return nil +} + +func (m MetadataV8) Encode(encoder scale.Encoder) error { + err := encoder.Encode(m.Modules) + if err != nil { + return err + } + return nil +} + +func (m *MetadataV8) FindCallIndex(call string) (CallIndex, error) { + s := strings.Split(call, ".") + mi := uint8(0) + for _, mod := range m.Modules { + if !mod.HasCalls { + continue + } + if string(mod.Name) != s[0] { + mi++ + continue + } + for ci, f := range mod.Calls { + if string(f.Name) == s[1] { + return CallIndex{mi, uint8(ci)}, nil + } + } + return CallIndex{}, fmt.Errorf("method %v not found within module %v for call %v", s[1], mod.Name, call) + } + return CallIndex{}, fmt.Errorf("module %v not found in metadata for call %v", s[0], call) +} + +func (m *MetadataV8) FindEventNamesForEventID(eventID EventID) (Text, Text, error) { + mi := uint8(0) + for _, mod := range m.Modules { + if !mod.HasEvents { + continue + } + if mi != eventID[0] { + mi++ + continue + } + if int(eventID[1]) >= len(mod.Events) { + return "", "", fmt.Errorf("event index %v for module %v out of range", eventID[1], mod.Name) + } + return mod.Name, mod.Events[eventID[1]].Name, nil + } + return "", "", fmt.Errorf("module index %v out of range", eventID[0]) +} + +func (m *MetadataV8) FindConstantValue(module Text, constant Text) ([]byte, error) { + for _, mod := range m.Modules { + if mod.Name == module { + for _, cons := range mod.Constants { + if cons.Name == constant { + return cons.Value, nil + } + } + } + } + return nil, fmt.Errorf("could not find constant %s.%s", module, constant) +} + +func (m *MetadataV8) FindStorageEntryMetadata(module string, fn string) (StorageEntryMetadata, error) { + for _, mod := range m.Modules { + if !mod.HasStorage { + continue + } + if string(mod.Storage.Prefix) != module { + continue + } + for _, s := range mod.Storage.Items { + if string(s.Name) != fn { + continue + } + return s, nil + } + return nil, fmt.Errorf("storage %v not found within module %v", fn, module) + } + return nil, fmt.Errorf("module %v not found in metadata", module) +} + +func (m *MetadataV8) ExistsModuleMetadata(module string) bool { + for _, mod := range m.Modules { + if string(mod.Name) == module { + return true + } + } + return false +} + +type ModuleMetadataV8 struct { + Name Text + HasStorage bool + Storage StorageMetadata + HasCalls bool + Calls []FunctionMetadataV4 + HasEvents bool + Events []EventMetadataV4 + Constants []ModuleConstantMetadataV6 + Errors []ErrorMetadataV8 +} + +func (m *ModuleMetadataV8) Decode(decoder scale.Decoder) error { + err := decoder.Decode(&m.Name) + if err != nil { + return err + } + + err = decoder.DecodeOption(&m.HasStorage, &m.Storage) + if err != nil { + return err + } + + err = decoder.DecodeOption(&m.HasCalls, &m.Calls) + if err != nil { + return err + } + + err = decoder.DecodeOption(&m.HasEvents, &m.Events) + if err != nil { + return err + } + + err = decoder.Decode(&m.Constants) + if err != nil { + return err + } + + return decoder.Decode(&m.Errors) +} + +func (m ModuleMetadataV8) Encode(encoder scale.Encoder) error { + err := encoder.Encode(m.Name) + if err != nil { + return err + } + + err = encoder.EncodeOption(m.HasStorage, m.Storage) + if err != nil { + return err + } + + err = encoder.EncodeOption(m.HasCalls, m.Calls) + if err != nil { + return err + } + + err = encoder.EncodeOption(m.HasEvents, m.Events) + if err != nil { + return err + } + + err = encoder.Encode(m.Constants) + if err != nil { + return err + } + + return encoder.Encode(m.Errors) +} + +type ErrorMetadataV8 struct { + Name Text + Documentation []Text +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV9.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV9.go new file mode 100644 index 000000000..b8fe1a95f --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/metadataV9.go @@ -0,0 +1,125 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "fmt" + "strings" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +// Modelled after packages/types/src/Metadata/v9/Metadata.ts +type MetadataV9 struct { + Modules []ModuleMetadataV8 +} + +func (m *MetadataV9) Decode(decoder scale.Decoder) error { + err := decoder.Decode(&m.Modules) + if err != nil { + return err + } + return nil +} + +func (m MetadataV9) Encode(encoder scale.Encoder) error { + err := encoder.Encode(m.Modules) + if err != nil { + return err + } + return nil +} + +func (m *MetadataV9) FindCallIndex(call string) (CallIndex, error) { + s := strings.Split(call, ".") + mi := uint8(0) + for _, mod := range m.Modules { + if !mod.HasCalls { + continue + } + if string(mod.Name) != s[0] { + mi++ + continue + } + for ci, f := range mod.Calls { + if string(f.Name) == s[1] { + return CallIndex{mi, uint8(ci)}, nil + } + } + return CallIndex{}, fmt.Errorf("method %v not found within module %v for call %v", s[1], mod.Name, call) + } + return CallIndex{}, fmt.Errorf("module %v not found in metadata for call %v", s[0], call) +} + +func (m *MetadataV9) FindEventNamesForEventID(eventID EventID) (Text, Text, error) { + mi := uint8(0) + for _, mod := range m.Modules { + if !mod.HasEvents { + continue + } + if mi != eventID[0] { + mi++ + continue + } + if int(eventID[1]) >= len(mod.Events) { + return "", "", fmt.Errorf("event index %v for module %v out of range", eventID[1], mod.Name) + } + return mod.Name, mod.Events[eventID[1]].Name, nil + } + return "", "", fmt.Errorf("module index %v out of range", eventID[0]) +} + +func (m *MetadataV9) FindConstantValue(module Text, constant Text) ([]byte, error) { + for _, mod := range m.Modules { + if mod.Name == module { + for _, cons := range mod.Constants { + if cons.Name == constant { + return cons.Value, nil + } + } + } + } + return nil, fmt.Errorf("could not find constant %s.%s", module, constant) +} + +func (m *MetadataV9) FindStorageEntryMetadata(module string, fn string) (StorageEntryMetadata, error) { + for _, mod := range m.Modules { + if !mod.HasStorage { + continue + } + if string(mod.Storage.Prefix) != module { + continue + } + for _, s := range mod.Storage.Items { + if string(s.Name) != fn { + continue + } + return s, nil + } + return nil, fmt.Errorf("storage %v not found within module %v", fn, module) + } + return nil, fmt.Errorf("module %v not found in metadata", module) +} + +func (m *MetadataV9) ExistsModuleMetadata(module string) bool { + for _, mod := range m.Modules { + if string(mod.Name) == module { + return true + } + } + return false +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/migration_compute.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/migration_compute.go new file mode 100644 index 000000000..7521e7d1e --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/migration_compute.go @@ -0,0 +1,54 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +// MigrationCompute is an enum describing how a migration was computed. +type MigrationCompute struct { + IsSigned bool + IsAuto bool +} + +func (m *MigrationCompute) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + m.IsSigned = true + case 1: + m.IsAuto = true + } + + return nil +} + +func (m MigrationCompute) Encode(encoder scale.Encoder) error { + switch { + case m.IsSigned: + return encoder.PushByte(0) + case m.IsAuto: + return encoder.PushByte(1) + } + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/mmr.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/mmr.go new file mode 100644 index 000000000..163c65909 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/mmr.go @@ -0,0 +1,79 @@ +package types + +import ( + "encoding/json" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/codec" +) + +// GenerateMMRProofResponse contains the generate proof rpc response +type GenerateMMRProofResponse struct { + BlockHash H256 + Leaf MMRLeaf + Proof MMRProof +} + +// UnmarshalJSON fills u with the JSON encoded byte array given by b +func (d *GenerateMMRProofResponse) UnmarshalJSON(bz []byte) error { + var tmp struct { + BlockHash string `json:"blockHash"` + Leaf string `json:"leaf"` + Proof string `json:"proof"` + } + if err := json.Unmarshal(bz, &tmp); err != nil { + return err + } + err := codec.DecodeFromHex(tmp.BlockHash, &d.BlockHash) + if err != nil { + return err + } + var encodedLeaf MMREncodableOpaqueLeaf + err = codec.DecodeFromHex(tmp.Leaf, &encodedLeaf) + if err != nil { + return err + } + err = codec.Decode(encodedLeaf, &d.Leaf) + if err != nil { + return err + } + err = codec.DecodeFromHex(tmp.Proof, &d.Proof) + if err != nil { + return err + } + return nil +} + +type MMREncodableOpaqueLeaf Bytes + +// MMRProof is a MMR proof +type MMRProof struct { + // The index of the leaf the proof is for. + LeafIndex U64 + // Number of leaves in MMR, when the proof was generated. + LeafCount U64 + // Proof elements (hashes of siblings of inner nodes on the path to the leaf). + Items []H256 +} + +type MMRLeaf struct { + Version MMRLeafVersion + ParentNumberAndHash ParentNumberAndHash + BeefyNextAuthoritySet BeefyNextAuthoritySet + ParachainHeads H256 +} + +type MMRLeafVersion U8 + +type ParentNumberAndHash struct { + ParentNumber U32 + Hash Hash +} + +type BeefyNextAuthoritySet struct { + // ID + ID U64 + // Number of validators in the set. + Len U32 + // Merkle Root Hash build from BEEFY uncompressed AuthorityIds. + Root H256 +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/moment.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/moment.go new file mode 100644 index 000000000..f332cf9f7 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/moment.go @@ -0,0 +1,69 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "fmt" + "math" + "time" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +const ( + NanosInSecond = 1e9 + MillisInSecond = 1e3 +) + +// Moment is a wrapper around milliseconds/timestamps using the `time.Time` type. +type Moment struct { + time.Time +} + +// NewMoment creates a new Moment type +func NewMoment(t time.Time) Moment { + return Moment{t} +} + +func (m *Moment) Decode(decoder scale.Decoder) error { + var u uint64 + err := decoder.Decode(&u) + if err != nil { + return err + } + + // Error in case of overflow + if u > math.MaxInt64 { + return fmt.Errorf("cannot decode a uint64 into a Moment if it overflows int64") + } + + secs := u / MillisInSecond + nanos := (u % uint64(MillisInSecond)) * uint64(NanosInSecond) + + *m = NewMoment(time.Unix(int64(secs), int64(nanos))) + + return nil +} + +func (m Moment) Encode(encoder scale.Encoder) error { + err := encoder.Encode(uint64(m.UnixNano() / (NanosInSecond / MillisInSecond))) + if err != nil { + return err + } + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/multi_address.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/multi_address.go new file mode 100644 index 000000000..aeadca593 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/multi_address.go @@ -0,0 +1,127 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/codec" +) + +type MultiAddress struct { + IsID bool + AsID AccountID + IsIndex bool + AsIndex AccountIndex + IsRaw bool + AsRaw []byte + IsAddress32 bool + AsAddress32 [32]byte + IsAddress20 bool + AsAddress20 [20]byte +} + +// NewMultiAddressFromAccountID creates an Address from the given AccountID (public key) +func NewMultiAddressFromAccountID(b []byte) (MultiAddress, error) { + accountID, err := NewAccountID(b) + if err != nil { + return MultiAddress{}, err + } + + return MultiAddress{ + IsID: true, + AsID: *accountID, + }, nil +} + +// NewMultiAddressFromHexAccountID creates an Address from the given hex string that contains an AccountID (public key) +func NewMultiAddressFromHexAccountID(str string) (MultiAddress, error) { + b, err := codec.HexDecodeString(str) + if err != nil { + return MultiAddress{}, err + } + return NewMultiAddressFromAccountID(b) +} + +func (m MultiAddress) Encode(encoder scale.Encoder) error { + var err error + switch { + case m.IsID: + if err = encoder.PushByte(0); err != nil { + return err + } + + return encoder.Encode(m.AsID) + case m.IsIndex: + if err = encoder.PushByte(1); err != nil { + return err + } + + return encoder.Encode(m.AsIndex) + case m.IsRaw: + if err = encoder.PushByte(2); err != nil { + return err + } + + return encoder.Encode(m.AsRaw) + case m.IsAddress32: + if err = encoder.PushByte(3); err != nil { + return err + } + + return encoder.Encode(m.AsAddress32) + case m.IsAddress20: + if err = encoder.PushByte(4); err != nil { + return err + } + + return encoder.Encode(m.AsAddress20) + } + + return nil +} + +func (m *MultiAddress) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + m.IsID = true + + return decoder.Decode(&m.AsID) + case 1: + m.IsIndex = true + + return decoder.Decode(&m.AsIndex) + case 2: + m.IsRaw = true + + return decoder.Decode(&m.AsRaw) + case 3: + m.IsAddress32 = true + + return decoder.Decode(&m.AsAddress32) + case 4: + m.IsAddress20 = true + + return decoder.Decode(&m.AsAddress20) + } + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/multi_location_v0.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/multi_location_v0.go new file mode 100644 index 000000000..c88b23747 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/multi_location_v0.go @@ -0,0 +1,150 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +type MultiLocationV0 struct { + IsNull bool + + IsX1 bool + X1 JunctionV0 + + IsX2 bool + X2 [2]JunctionV0 + + IsX3 bool + X3 [3]JunctionV0 + + IsX4 bool + X4 [4]JunctionV0 + + IsX5 bool + X5 [5]JunctionV0 + + IsX6 bool + X6 [6]JunctionV0 + + IsX7 bool + X7 [7]JunctionV0 + + IsX8 bool + X8 [8]JunctionV0 +} + +func (m *MultiLocationV0) Decode(decoder scale.Decoder) error { //nolint:dupl + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + m.IsNull = true + case 1: + m.IsX1 = true + + return decoder.Decode(&m.X1) + case 2: + m.IsX2 = true + + return decoder.Decode(&m.X2) + case 3: + m.IsX3 = true + + return decoder.Decode(&m.X3) + case 4: + m.IsX4 = true + + return decoder.Decode(&m.X4) + case 5: + m.IsX5 = true + + return decoder.Decode(&m.X5) + case 6: + m.IsX6 = true + + return decoder.Decode(&m.X6) + case 7: + m.IsX7 = true + + return decoder.Decode(&m.X7) + case 8: + m.IsX8 = true + + return decoder.Decode(&m.X8) + } + + return nil +} + +func (m MultiLocationV0) Encode(encoder scale.Encoder) error { + switch { + case m.IsNull: + return encoder.PushByte(0) + case m.IsX1: + if err := encoder.PushByte(1); err != nil { + return err + } + + return encoder.Encode(m.X1) + case m.IsX2: + if err := encoder.PushByte(2); err != nil { + return err + } + + return encoder.Encode(m.X2) + case m.IsX3: + if err := encoder.PushByte(3); err != nil { + return err + } + + return encoder.Encode(m.X3) + case m.IsX4: + if err := encoder.PushByte(4); err != nil { + return err + } + + return encoder.Encode(m.X4) + case m.IsX5: + if err := encoder.PushByte(5); err != nil { + return err + } + + return encoder.Encode(m.X5) + case m.IsX6: + if err := encoder.PushByte(6); err != nil { + return err + } + + return encoder.Encode(m.X6) + case m.IsX7: + if err := encoder.PushByte(7); err != nil { + return err + } + + return encoder.Encode(m.X7) + case m.IsX8: + if err := encoder.PushByte(8); err != nil { + return err + } + + return encoder.Encode(m.X8) + } + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/multi_location_v1.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/multi_location_v1.go new file mode 100644 index 000000000..7ebe44508 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/multi_location_v1.go @@ -0,0 +1,125 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +type OptionMultiLocationV1 struct { + option + value MultiLocationV1 +} + +func NewOptionMultiLocationV1(value MultiLocationV1) OptionMultiLocationV1 { + return OptionMultiLocationV1{option{hasValue: true}, value} +} + +func NewOptionMultiLocationV1Empty() OptionMultiLocationV1 { + return OptionMultiLocationV1{option: option{hasValue: false}} +} + +func (o *OptionMultiLocationV1) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +func (o OptionMultiLocationV1) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +// SetSome sets a value +func (o *OptionMultiLocationV1) SetSome(value MultiLocationV1) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionMultiLocationV1) SetNone() { + o.hasValue = false + o.value = MultiLocationV1{} +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o *OptionMultiLocationV1) Unwrap() (ok bool, value MultiLocationV1) { + return o.hasValue, o.value +} + +type MultiLocationV1 struct { + Parents U8 + Interior JunctionsV1 +} + +func (m *MultiLocationV1) Decode(decoder scale.Decoder) error { + if err := decoder.Decode(&m.Parents); err != nil { + return err + } + + return decoder.Decode(&m.Interior) +} + +func (m *MultiLocationV1) Encode(encoder scale.Encoder) error { + if err := encoder.Encode(&m.Parents); err != nil { + return err + } + + return encoder.Encode(&m.Interior) +} + +type VersionedMultiLocation struct { + IsV0 bool + MultiLocationV0 MultiLocationV0 + + IsV1 bool + MultiLocationV1 MultiLocationV1 +} + +func (m *VersionedMultiLocation) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + m.IsV0 = true + + return decoder.Decode(&m.MultiLocationV0) + case 1: + m.IsV1 = true + + return decoder.Decode(&m.MultiLocationV1) + } + + return nil +} + +func (m VersionedMultiLocation) Encode(encoder scale.Encoder) error { + switch { + case m.IsV0: + if err := encoder.PushByte(0); err != nil { + return err + } + + return encoder.Encode(m.MultiLocationV0) + case m.IsV1: + if err := encoder.PushByte(1); err != nil { + return err + } + + return encoder.Encode(m.MultiLocationV1) + } + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/multi_signature.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/multi_signature.go new file mode 100644 index 000000000..b56cc260f --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/multi_signature.go @@ -0,0 +1,78 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +// MultiSignature +type MultiSignature struct { + IsEd25519 bool // 0:: Ed25519(Ed25519Signature) + AsEd25519 SignatureHash // Ed25519Signature + IsSr25519 bool // 1:: Sr25519(Sr25519Signature) + AsSr25519 SignatureHash // Sr25519Signature + IsEcdsa bool // 2:: Ecdsa(EcdsaSignature) + AsEcdsa EcdsaSignature // EcdsaSignature +} + +func (m *MultiSignature) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + m.IsEd25519 = true + err = decoder.Decode(&m.AsEd25519) + case 1: + m.IsSr25519 = true + err = decoder.Decode(&m.AsSr25519) + case 2: + m.IsEcdsa = true + err = decoder.Decode(&m.AsEcdsa) + } + + if err != nil { + return err + } + + return nil +} + +func (m MultiSignature) Encode(encoder scale.Encoder) error { + var err1, err2 error + switch { + case m.IsEd25519: + err1 = encoder.PushByte(0) + err2 = encoder.Encode(m.AsEd25519) + case m.IsSr25519: + err1 = encoder.PushByte(1) + err2 = encoder.Encode(m.AsSr25519) + case m.IsEcdsa: + err1 = encoder.PushByte(2) + err2 = encoder.Encode(m.AsEcdsa) + } + + if err1 != nil { + return err1 + } + if err2 != nil { + return err2 + } + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/network_id.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/network_id.go new file mode 100644 index 000000000..5921f5f2e --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/network_id.go @@ -0,0 +1,71 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +type NetworkID struct { + IsAny bool + + IsNamed bool + NamedNetwork []U8 + + IsPolkadot bool + + IsKusama bool +} + +func (n *NetworkID) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + n.IsAny = true + case 1: + n.IsNamed = true + + return decoder.Decode(&n.NamedNetwork) + case 2: + n.IsPolkadot = true + case 3: + n.IsKusama = true + } + + return nil +} + +func (n NetworkID) Encode(encoder scale.Encoder) error { + switch { + case n.IsAny: + return encoder.PushByte(0) + case n.IsNamed: + if err := encoder.PushByte(1); err != nil { + return err + } + + return encoder.Encode(n.NamedNetwork) + case n.IsPolkadot: + return encoder.PushByte(2) + case n.IsKusama: + return encoder.PushByte(3) + } + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/network_state.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/network_state.go new file mode 100644 index 000000000..6037fe13c --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/network_state.go @@ -0,0 +1,22 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +// NetworkState contains the current state of the network +type NetworkState struct { + PeerID Text +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/null.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/null.go new file mode 100644 index 000000000..f5b249c3b --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/null.go @@ -0,0 +1,44 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +// Null is a type that does not contain anything (apart from null) +type Null byte + +// NewNull creates a new Null type +func NewNull() Null { + return Null(0x00) +} + +// Encode implements encoding for Null, which does nothing +func (n Null) Encode(encoder scale.Encoder) error { + return nil +} + +// Decode implements decoding for Null, which does nothing +func (n *Null) Decode(decoder scale.Decoder) error { + return nil +} + +// String returns a string representation of the value +func (n Null) String() string { + return "" +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/option.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/option.go new file mode 100644 index 000000000..cfbcdcd6b --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/option.go @@ -0,0 +1,31 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +type option struct { + hasValue bool +} + +// IsNone returns true if the value is missing +func (o option) IsNone() bool { + return !o.hasValue +} + +// IsSome returns true if a value is present +func (o option) IsSome() bool { + return o.hasValue +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/option_bool.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/option_bool.go new file mode 100644 index 000000000..4b8720399 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/option_bool.go @@ -0,0 +1,95 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "fmt" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +// OptionBool is a structure that can store a Bool or a missing value +// Note that encoding rules are slightly different from other "option" fields +// This implementation was adopted from https://github.com/Joystream/parity-codec-go/blob/develop/noreflect/codec.go +type OptionBool struct { + option + value Bool +} + +// NewOptionBool creates an OptionBool with a value +func NewOptionBool(value Bool) OptionBool { + return OptionBool{option{true}, value} +} + +// NewOptionBoolEmpty creates an OptionBool without a value +func NewOptionBoolEmpty() OptionBool { + return OptionBool{option{false}, false} +} + +// Encode implements encoding for OptionBool as per Rust implementation +func (o OptionBool) Encode(encoder scale.Encoder) error { + var err error + if !o.hasValue { + err = encoder.PushByte(0) + } else { + if o.value { + err = encoder.PushByte(1) + } else { + err = encoder.PushByte(2) + } + } + if err != nil { + return err + } + return nil +} + +// Decode implements decoding for OptionBool as per Rust implementation +func (o *OptionBool) Decode(decoder scale.Decoder) error { + b, _ := decoder.ReadOneByte() + switch b { + case 0: + o.hasValue = false + o.value = false + case 1: + o.hasValue = true + o.value = true + case 2: + o.hasValue = true + o.value = false + default: + return fmt.Errorf("unknown byte prefix for encoded OptionBool: %d", b) + } + return nil +} + +// SetSome sets a value +func (o *OptionBool) SetSome(value Bool) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionBool) SetNone() { + o.hasValue = false + o.value = Bool(false) +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionBool) Unwrap() (ok bool, value Bool) { + return o.hasValue, o.value +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/option_bytes.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/option_bytes.go new file mode 100644 index 000000000..64fb42ef0 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/option_bytes.go @@ -0,0 +1,429 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +// OptionBytes is a structure that can store a Bytes or a missing value +type OptionBytes struct { + option + value Bytes +} + +// NewOptionBytes creates an OptionBytes with a value +func NewOptionBytes(value Bytes) OptionBytes { + return OptionBytes{option{true}, value} +} + +// NewOptionBytesEmpty creates an OptionBytes without a value +func NewOptionBytesEmpty() OptionBytes { + return OptionBytes{option: option{false}} +} + +func (o OptionBytes) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionBytes) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionBytes) SetSome(value Bytes) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionBytes) SetNone() { + o.hasValue = false + o.value = Bytes{} +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionBytes) Unwrap() (ok bool, value Bytes) { + return o.hasValue, o.value +} + +// OptionBytes8 is a structure that can store a Bytes8 or a missing value +type OptionBytes8 struct { + option + value Bytes8 +} + +// NewOptionBytes8 creates an OptionBytes8 with a value +func NewOptionBytes8(value Bytes8) OptionBytes8 { + return OptionBytes8{option{true}, value} +} + +// NewOptionBytes8Empty creates an OptionBytes8 without a value +func NewOptionBytes8Empty() OptionBytes8 { + return OptionBytes8{option: option{false}} +} + +func (o OptionBytes8) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionBytes8) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionBytes8) SetSome(value Bytes8) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionBytes8) SetNone() { + o.hasValue = false + o.value = Bytes8{} +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionBytes8) Unwrap() (ok bool, value Bytes8) { + return o.hasValue, o.value +} + +// OptionBytes16 is a structure that can store a Bytes16 or a missing value +type OptionBytes16 struct { + option + value Bytes16 +} + +// NewOptionBytes16 creates an OptionBytes16 with a value +func NewOptionBytes16(value Bytes16) OptionBytes16 { + return OptionBytes16{option{true}, value} +} + +// NewOptionBytes16Empty creates an OptionBytes16 without a value +func NewOptionBytes16Empty() OptionBytes16 { + return OptionBytes16{option: option{false}} +} + +func (o OptionBytes16) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionBytes16) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionBytes16) SetSome(value Bytes16) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionBytes16) SetNone() { + o.hasValue = false + o.value = Bytes16{} +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionBytes16) Unwrap() (ok bool, value Bytes16) { + return o.hasValue, o.value +} + +// OptionBytes32 is a structure that can store a Bytes32 or a missing value +type OptionBytes32 struct { + option + value Bytes32 +} + +// NewOptionBytes32 creates an OptionBytes32 with a value +func NewOptionBytes32(value Bytes32) OptionBytes32 { + return OptionBytes32{option{true}, value} +} + +// NewOptionBytes32Empty creates an OptionBytes32 without a value +func NewOptionBytes32Empty() OptionBytes32 { + return OptionBytes32{option: option{false}} +} + +func (o OptionBytes32) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionBytes32) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionBytes32) SetSome(value Bytes32) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionBytes32) SetNone() { + o.hasValue = false + o.value = Bytes32{} +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionBytes32) Unwrap() (ok bool, value Bytes32) { + return o.hasValue, o.value +} + +// OptionBytes64 is a structure that can store a Bytes64 or a missing value +type OptionBytes64 struct { + option + value Bytes64 +} + +// NewOptionBytes64 creates an OptionBytes64 with a value +func NewOptionBytes64(value Bytes64) OptionBytes64 { + return OptionBytes64{option{true}, value} +} + +// NewOptionBytes64Empty creates an OptionBytes64 without a value +func NewOptionBytes64Empty() OptionBytes64 { + return OptionBytes64{option: option{false}} +} + +func (o OptionBytes64) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionBytes64) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionBytes64) SetSome(value Bytes64) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionBytes64) SetNone() { + o.hasValue = false + o.value = Bytes64{} +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionBytes64) Unwrap() (ok bool, value Bytes64) { + return o.hasValue, o.value +} + +// OptionBytes128 is a structure that can store a Bytes128 or a missing value +type OptionBytes128 struct { + option + value Bytes128 +} + +// NewOptionBytes128 creates an OptionBytes128 with a value +func NewOptionBytes128(value Bytes128) OptionBytes128 { + return OptionBytes128{option{true}, value} +} + +// NewOptionBytes128Empty creates an OptionBytes128 without a value +func NewOptionBytes128Empty() OptionBytes128 { + return OptionBytes128{option: option{false}} +} + +func (o OptionBytes128) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionBytes128) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionBytes128) SetSome(value Bytes128) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionBytes128) SetNone() { + o.hasValue = false + o.value = Bytes128{} +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionBytes128) Unwrap() (ok bool, value Bytes128) { + return o.hasValue, o.value +} + +// OptionBytes256 is a structure that can store a Bytes256 or a missing value +type OptionBytes256 struct { + option + value Bytes256 +} + +// NewOptionBytes256 creates an OptionBytes256 with a value +func NewOptionBytes256(value Bytes256) OptionBytes256 { + return OptionBytes256{option{true}, value} +} + +// NewOptionBytes256Empty creates an OptionBytes256 without a value +func NewOptionBytes256Empty() OptionBytes256 { + return OptionBytes256{option: option{false}} +} + +func (o OptionBytes256) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionBytes256) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionBytes256) SetSome(value Bytes256) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionBytes256) SetNone() { + o.hasValue = false + o.value = Bytes256{} +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionBytes256) Unwrap() (ok bool, value Bytes256) { + return o.hasValue, o.value +} + +// OptionBytes512 is a structure that can store a Bytes512 or a missing value +type OptionBytes512 struct { + option + value Bytes512 +} + +// NewOptionBytes512 creates an OptionBytes512 with a value +func NewOptionBytes512(value Bytes512) OptionBytes512 { + return OptionBytes512{option{true}, value} +} + +// NewOptionBytes512Empty creates an OptionBytes512 without a value +func NewOptionBytes512Empty() OptionBytes512 { + return OptionBytes512{option: option{false}} +} + +func (o OptionBytes512) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionBytes512) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionBytes512) SetSome(value Bytes512) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionBytes512) SetNone() { + o.hasValue = false + o.value = Bytes512{} +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionBytes512) Unwrap() (ok bool, value Bytes512) { + return o.hasValue, o.value +} + +// OptionBytes1024 is a structure that can store a Bytes1024 or a missing value +type OptionBytes1024 struct { + option + value Bytes1024 +} + +// NewOptionBytes1024 creates an OptionBytes1024 with a value +func NewOptionBytes1024(value Bytes1024) OptionBytes1024 { + return OptionBytes1024{option{true}, value} +} + +// NewOptionBytes1024Empty creates an OptionBytes1024 without a value +func NewOptionBytes1024Empty() OptionBytes1024 { + return OptionBytes1024{option: option{false}} +} + +func (o OptionBytes1024) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionBytes1024) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionBytes1024) SetSome(value Bytes1024) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionBytes1024) SetNone() { + o.hasValue = false + o.value = Bytes1024{} +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionBytes1024) Unwrap() (ok bool, value Bytes1024) { + return o.hasValue, o.value +} + +// OptionBytes2048 is a structure that can store a Bytes2048 or a missing value +type OptionBytes2048 struct { + option + value Bytes2048 +} + +// NewOptionBytes2048 creates an OptionBytes2048 with a value +func NewOptionBytes2048(value Bytes2048) OptionBytes2048 { + return OptionBytes2048{option{true}, value} +} + +// NewOptionBytes2048Empty creates an OptionBytes2048 without a value +func NewOptionBytes2048Empty() OptionBytes2048 { + return OptionBytes2048{option: option{false}} +} + +func (o OptionBytes2048) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionBytes2048) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionBytes2048) SetSome(value Bytes2048) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionBytes2048) SetNone() { + o.hasValue = false + o.value = Bytes2048{} +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionBytes2048) Unwrap() (ok bool, value Bytes2048) { + return o.hasValue, o.value +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/option_hash.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/option_hash.go new file mode 100644 index 000000000..9682d39f3 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/option_hash.go @@ -0,0 +1,183 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +// OptionH160 is a structure that can store a H160 or a missing value +type OptionH160 struct { + option + value H160 +} + +// NewOptionH160 creates an OptionH160 with a value +func NewOptionH160(value H160) OptionH160 { + return OptionH160{option{true}, value} +} + +// NewOptionH160Empty creates an OptionH160 without a value +func NewOptionH160Empty() OptionH160 { + return OptionH160{option: option{false}} +} + +func (o OptionH160) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionH160) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionH160) SetSome(value H160) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionH160) SetNone() { + o.hasValue = false + o.value = H160{} +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionH160) Unwrap() (ok bool, value H160) { + return o.hasValue, o.value +} + +// OptionH256 is a structure that can store a H256 or a missing value +type OptionH256 struct { + option + value H256 +} + +// NewOptionH256 creates an OptionH256 with a value +func NewOptionH256(value H256) OptionH256 { + return OptionH256{option{true}, value} +} + +// NewOptionH256Empty creates an OptionH256 without a value +func NewOptionH256Empty() OptionH256 { + return OptionH256{option: option{false}} +} + +func (o OptionH256) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionH256) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionH256) SetSome(value H256) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionH256) SetNone() { + o.hasValue = false + o.value = H256{} +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionH256) Unwrap() (ok bool, value H256) { + return o.hasValue, o.value +} + +// OptionH512 is a structure that can store a H512 or a missing value +type OptionH512 struct { + option + value H512 +} + +// NewOptionH512 creates an OptionH512 with a value +func NewOptionH512(value H512) OptionH512 { + return OptionH512{option{true}, value} +} + +// NewOptionH512Empty creates an OptionH512 without a value +func NewOptionH512Empty() OptionH512 { + return OptionH512{option: option{false}} +} + +func (o OptionH512) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionH512) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionH512) SetSome(value H512) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionH512) SetNone() { + o.hasValue = false + o.value = H512{} +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionH512) Unwrap() (ok bool, value H512) { + return o.hasValue, o.value +} + +// OptionHash is a structure that can store a Hash or a missing value +type OptionHash struct { + option + value Hash +} + +// NewOptionHash creates an OptionHash with a value +func NewOptionHash(value Hash) OptionHash { + return OptionHash{option{true}, value} +} + +// NewOptionHashEmpty creates an OptionHash without a value +func NewOptionHashEmpty() OptionHash { + return OptionHash{option: option{false}} +} + +func (o OptionHash) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionHash) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionHash) SetSome(value Hash) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionHash) SetNone() { + o.hasValue = false + o.value = Hash{} +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionHash) Unwrap() (ok bool, value Hash) { + return o.hasValue, o.value +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/option_int.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/option_int.go new file mode 100644 index 000000000..d6072f650 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/option_int.go @@ -0,0 +1,183 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +// OptionI8 is a structure that can store a I8 or a missing value +type OptionI8 struct { + option + value I8 +} + +// NewOptionI8 creates an OptionI8 with a value +func NewOptionI8(value I8) OptionI8 { + return OptionI8{option{true}, value} +} + +// NewOptionI8Empty creates an OptionI8 without a value +func NewOptionI8Empty() OptionI8 { + return OptionI8{option: option{false}} +} + +func (o OptionI8) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionI8) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionI8) SetSome(value I8) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionI8) SetNone() { + o.hasValue = false + o.value = I8(0) +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionI8) Unwrap() (ok bool, value I8) { + return o.hasValue, o.value +} + +// OptionI16 is a structure that can store a I16 or a missing value +type OptionI16 struct { + option + value I16 +} + +// NewOptionI16 creates an OptionI16 with a value +func NewOptionI16(value I16) OptionI16 { + return OptionI16{option{true}, value} +} + +// NewOptionI16Empty creates an OptionI16 without a value +func NewOptionI16Empty() OptionI16 { + return OptionI16{option: option{false}} +} + +func (o OptionI16) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionI16) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionI16) SetSome(value I16) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionI16) SetNone() { + o.hasValue = false + o.value = I16(0) +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionI16) Unwrap() (ok bool, value I16) { + return o.hasValue, o.value +} + +// OptionI32 is a structure that can store a I32 or a missing value +type OptionI32 struct { + option + value I32 +} + +// NewOptionI32 creates an OptionI32 with a value +func NewOptionI32(value I32) OptionI32 { + return OptionI32{option{true}, value} +} + +// NewOptionI32Empty creates an OptionI32 without a value +func NewOptionI32Empty() OptionI32 { + return OptionI32{option: option{false}} +} + +func (o OptionI32) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionI32) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionI32) SetSome(value I32) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionI32) SetNone() { + o.hasValue = false + o.value = I32(0) +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionI32) Unwrap() (ok bool, value I32) { + return o.hasValue, o.value +} + +// OptionI64 is a structure that can store a I64 or a missing value +type OptionI64 struct { + option + value I64 +} + +// NewOptionI64 creates an OptionI64 with a value +func NewOptionI64(value I64) OptionI64 { + return OptionI64{option{true}, value} +} + +// NewOptionI64Empty creates an OptionI64 without a value +func NewOptionI64Empty() OptionI64 { + return OptionI64{option: option{false}} +} + +func (o OptionI64) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionI64) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionI64) SetSome(value I64) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionI64) SetNone() { + o.hasValue = false + o.value = I64(0) +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionI64) Unwrap() (ok bool, value I64) { + return o.hasValue, o.value +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/option_uint.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/option_uint.go new file mode 100644 index 000000000..598b5967e --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/option_uint.go @@ -0,0 +1,228 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "math/big" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +// OptionU8 is a structure that can store a U8 or a missing value +type OptionU8 struct { + option + value U8 +} + +// NewOptionU8 creates an OptionU8 with a value +func NewOptionU8(value U8) OptionU8 { + return OptionU8{option{true}, value} +} + +// NewOptionU8Empty creates an OptionU8 without a value +func NewOptionU8Empty() OptionU8 { + return OptionU8{option: option{false}} +} + +func (o OptionU8) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionU8) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionU8) SetSome(value U8) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionU8) SetNone() { + o.hasValue = false + o.value = U8(0) +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionU8) Unwrap() (ok bool, value U8) { + return o.hasValue, o.value +} + +// OptionU16 is a structure that can store a U16 or a missing value +type OptionU16 struct { + option + value U16 +} + +// NewOptionU16 creates an OptionU16 with a value +func NewOptionU16(value U16) OptionU16 { + return OptionU16{option{true}, value} +} + +// NewOptionU16Empty creates an OptionU16 without a value +func NewOptionU16Empty() OptionU16 { + return OptionU16{option: option{false}} +} + +func (o OptionU16) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionU16) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionU16) SetSome(value U16) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionU16) SetNone() { + o.hasValue = false + o.value = U16(0) +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionU16) Unwrap() (ok bool, value U16) { + return o.hasValue, o.value +} + +// OptionU32 is a structure that can store a U32 or a missing value +type OptionU32 struct { + option + value U32 +} + +// NewOptionU32 creates an OptionU32 with a value +func NewOptionU32(value U32) OptionU32 { + return OptionU32{option{true}, value} +} + +// NewOptionU32Empty creates an OptionU32 without a value +func NewOptionU32Empty() OptionU32 { + return OptionU32{option: option{false}} +} + +func (o OptionU32) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionU32) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionU32) SetSome(value U32) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionU32) SetNone() { + o.hasValue = false + o.value = U32(0) +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionU32) Unwrap() (ok bool, value U32) { + return o.hasValue, o.value +} + +// OptionU64 is a structure that can store a U64 or a missing value +type OptionU64 struct { + option + value U64 +} + +// NewOptionU64 creates an OptionU64 with a value +func NewOptionU64(value U64) OptionU64 { + return OptionU64{option{true}, value} +} + +// NewOptionU64Empty creates an OptionU64 without a value +func NewOptionU64Empty() OptionU64 { + return OptionU64{option: option{false}} +} + +func (o OptionU64) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionU64) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionU64) SetSome(value U64) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionU64) SetNone() { + o.hasValue = false + o.value = U64(0) +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionU64) Unwrap() (ok bool, value U64) { + return o.hasValue, o.value +} + +// OptionU128 is a structure that can store a U128 or a missing value +type OptionU128 struct { + option + value U128 +} + +// NewOptionU128 creates an OptionU128 with a value +func NewOptionU128(value U128) OptionU128 { + return OptionU128{option{true}, value} +} + +// NewOptionU128Empty creates an OptionU128 without a value +func NewOptionU128Empty() OptionU128 { + return OptionU128{option: option{false}} +} + +func (o OptionU128) Encode(encoder scale.Encoder) error { + return encoder.EncodeOption(o.hasValue, o.value) +} + +func (o *OptionU128) Decode(decoder scale.Decoder) error { + return decoder.DecodeOption(&o.hasValue, &o.value) +} + +// SetSome sets a value +func (o *OptionU128) SetSome(value U128) { + o.hasValue = true + o.value = value +} + +// SetNone removes a value and marks it as missing +func (o *OptionU128) SetNone() { + o.hasValue = false + o.value = NewU128(*big.NewInt(0)) +} + +// Unwrap returns a flag that indicates whether a value is present and the stored value +func (o OptionU128) Unwrap() (ok bool, value U128) { + return o.hasValue, o.value +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/origin.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/origin.go new file mode 100644 index 000000000..65d7fe775 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/origin.go @@ -0,0 +1,39 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +// Origin is an internal-only value that will be ignored when encoding/decoding +type Origin byte + +// Encode implements encoding for Origin, which does nothing +func (n Origin) Encode(encoder scale.Encoder) error { + return nil +} + +// Decode implements decoding for Origin, which does nothing +func (n *Origin) Decode(decoder scale.Decoder) error { + return nil +} + +// String returns a string representation of the value +func (n Origin) String() string { + return "" +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/outcome.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/outcome.go new file mode 100644 index 000000000..0f24b59ab --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/outcome.go @@ -0,0 +1,96 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +type Outcome struct { + IsComplete bool + CompleteWeight Weight + + IsIncomplete bool + IncompleteWeight Weight + IncompleteError XCMError + + IsError bool + Error XCMError +} + +func (o *Outcome) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + o.IsComplete = true + + if err = decoder.Decode(&o.CompleteWeight); err != nil { + return err + } + case 1: + o.IsIncomplete = true + + if err = decoder.Decode(&o.IncompleteWeight); err != nil { + return err + } + + if err = decoder.Decode(&o.IncompleteError); err != nil { + return err + } + case 2: + o.IsError = true + + if err = decoder.Decode(&o.Error); err != nil { + return err + } + } + + return nil +} + +func (o Outcome) Encode(encoder scale.Encoder) error { + switch { + case o.IsComplete: + if err := encoder.PushByte(0); err != nil { + return err + } + + return encoder.Encode(o.CompleteWeight) + case o.IsIncomplete: + if err := encoder.PushByte(1); err != nil { + return err + } + + if err := encoder.Encode(o.IncompleteWeight); err != nil { + return err + } + + return encoder.Encode(o.IncompleteError) + case o.IsError: + if err := encoder.PushByte(2); err != nil { + return err + } + + return encoder.Encode(o.Error) + } + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/peer_info.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/peer_info.go new file mode 100644 index 000000000..547fc329c --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/peer_info.go @@ -0,0 +1,26 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +// PeerInfo contains information about a connected peer +type PeerInfo struct { + PeerID Text + Roles Text + ProtocolVersion U32 + BestHash Hash + BestNumber U32 +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/proxy.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/proxy.go new file mode 100644 index 000000000..b2905b6cf --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/proxy.go @@ -0,0 +1,54 @@ +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +type ProxyDefinition struct { + Delegate AccountID + ProxyType U8 + Delay U32 +} + +func (p *ProxyDefinition) Decode(decoder scale.Decoder) error { + if err := decoder.Decode(&p.Delegate); err != nil { + return err + } + + if err := decoder.Decode(&p.ProxyType); err != nil { + return err + } + + return decoder.Decode(&p.Delay) +} + +func (p ProxyDefinition) Encode(encoder scale.Encoder) error { + if err := encoder.Encode(p.Delegate); err != nil { + return err + } + + if err := encoder.Encode(p.ProxyType); err != nil { + return err + } + + return encoder.Encode(p.Delay) +} + +type ProxyStorageEntry struct { + ProxyDefinitions []ProxyDefinition + Balance U128 +} + +func (p *ProxyStorageEntry) Decode(decoder scale.Decoder) error { + if err := decoder.Decode(&p.ProxyDefinitions); err != nil { + return err + } + + return decoder.Decode(&p.Balance) +} + +func (p ProxyStorageEntry) Encode(encoder scale.Encoder) error { + if err := encoder.Encode(p.ProxyDefinitions); err != nil { + return err + } + + return encoder.Encode(p.Balance) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/runtime_version.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/runtime_version.go new file mode 100644 index 000000000..f3229dd0d --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/runtime_version.go @@ -0,0 +1,156 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "encoding/json" + "fmt" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +type RuntimeVersion struct { + APIs []RuntimeVersionAPI `json:"apis"` + AuthoringVersion U32 `json:"authoringVersion"` + ImplName string `json:"implName"` + ImplVersion U32 `json:"implVersion"` + SpecName string `json:"specName"` + SpecVersion U32 `json:"specVersion"` + TransactionVersion U32 `json:"transactionVersion"` +} + +func NewRuntimeVersion() *RuntimeVersion { + return &RuntimeVersion{APIs: make([]RuntimeVersionAPI, 0)} +} + +func (r *RuntimeVersion) Decode(decoder scale.Decoder) error { + err := decoder.Decode(&r.APIs) + if err != nil { + return err + } + + err = decoder.Decode(&r.AuthoringVersion) + if err != nil { + return err + } + + err = decoder.Decode(&r.ImplName) + if err != nil { + return err + } + + err = decoder.Decode(&r.ImplVersion) + if err != nil { + return err + } + + err = decoder.Decode(&r.SpecName) + if err != nil { + return err + } + + err = decoder.Decode(&r.SpecVersion) + if err != nil { + return err + } + + return nil +} + +func (r RuntimeVersion) Encode(encoder scale.Encoder) error { + err := encoder.Encode(r.APIs) + if err != nil { + return err + } + + err = encoder.Encode(r.AuthoringVersion) + if err != nil { + return err + } + + err = encoder.Encode(r.ImplName) + if err != nil { + return err + } + + err = encoder.Encode(r.ImplVersion) + if err != nil { + return err + } + + err = encoder.Encode(r.SpecName) + if err != nil { + return err + } + + err = encoder.Encode(r.SpecVersion) + if err != nil { + return err + } + + return nil +} + +type RuntimeVersionAPI struct { + APIID string + Version U32 +} + +func (r *RuntimeVersionAPI) UnmarshalJSON(b []byte) error { + tmp := []interface{}{&r.APIID, &r.Version} + wantLen := len(tmp) + if err := json.Unmarshal(b, &tmp); err != nil { + return err + } + if g, e := len(tmp), wantLen; g != e { + return fmt.Errorf("wrong number of fields in Notification: %d != %d", g, e) + } + return nil +} + +func (r RuntimeVersionAPI) MarshalJSON() ([]byte, error) { + tmp := []interface{}{r.APIID, r.Version} + return json.Marshal(tmp) +} + +func (r *RuntimeVersionAPI) Decode(decoder scale.Decoder) error { + err := decoder.Decode(&r.APIID) + if err != nil { + return err + } + + err = decoder.Decode(&r.Version) + if err != nil { + return err + } + + return nil +} + +func (r RuntimeVersionAPI) Encode(encoder scale.Encoder) error { + err := encoder.Encode(r.APIID) + if err != nil { + return err + } + + err = encoder.Encode(r.Version) + if err != nil { + return err + } + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/sale.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/sale.go new file mode 100644 index 000000000..ff5451686 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/sale.go @@ -0,0 +1,211 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "errors" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +type Tranche struct { + FirstVal U64 + SecondVal [16]U8 +} + +func (t *Tranche) Decode(decoder scale.Decoder) error { + if err := decoder.Decode(&t.FirstVal); err != nil { + return err + } + + return decoder.Decode(&t.SecondVal) +} + +func (t Tranche) Encode(encoder scale.Encoder) error { + if err := encoder.Encode(t.FirstVal); err != nil { + return err + } + + return encoder.Encode(t.SecondVal) +} + +type PermissionedCurrency struct { + // At the moment of writing this, this enum is empty in altair. +} + +func (p *PermissionedCurrency) Decode(_ scale.Decoder) error { + return nil +} + +func (p *PermissionedCurrency) Encode(_ scale.Encoder) error { + return nil +} + +type StakingCurrency struct { + IsBlockRewards bool +} + +func (s *StakingCurrency) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + s.IsBlockRewards = true + + return nil + default: + return errors.New("unsupported staking currency") + } +} + +func (s StakingCurrency) Encode(encoder scale.Encoder) error { + switch { + case s.IsBlockRewards: + return encoder.PushByte(0) + default: + return errors.New("unsupported staking currency") + } +} + +type CurrencyID struct { + IsNative bool + + IsTranche bool + Tranche Tranche + + IsKSM bool + + IsAUSD bool + + IsForeignAsset bool + AsForeignAsset U32 + + IsStaking bool + AsStaking StakingCurrency +} + +func (c *CurrencyID) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + c.IsNative = true + + return nil + case 1: + c.IsTranche = true + + return decoder.Decode(&c.Tranche) + case 2: + c.IsKSM = true + + return nil + case 3: + c.IsAUSD = true + + return nil + case 4: + c.IsForeignAsset = true + + return decoder.Decode(&c.AsForeignAsset) + case 5: + c.IsStaking = true + + return decoder.Decode(&c.AsStaking) + default: + return errors.New("unsupported currency ID") + } +} + +func (c CurrencyID) Encode(encoder scale.Encoder) error { + switch { + case c.IsNative: + return encoder.PushByte(0) + case c.IsTranche: + if err := encoder.PushByte(1); err != nil { + return err + } + + return encoder.Encode(c.Tranche) + case c.IsKSM: + return encoder.PushByte(2) + case c.IsAUSD: + return encoder.PushByte(3) + case c.IsForeignAsset: + if err := encoder.PushByte(4); err != nil { + return err + } + + return encoder.Encode(c.AsForeignAsset) + case c.IsStaking: + if err := encoder.PushByte(5); err != nil { + return err + } + + return encoder.Encode(c.AsStaking) + default: + return errors.New("unsupported currency ID") + } +} + +type Price struct { + CurrencyID CurrencyID + Amount U128 +} + +func (p *Price) Decode(decoder scale.Decoder) error { + if err := decoder.Decode(&p.CurrencyID); err != nil { + return err + } + + return decoder.Decode(&p.Amount) +} + +func (p Price) Encode(encoder scale.Encoder) error { + if err := encoder.Encode(p.CurrencyID); err != nil { + return err + } + + return encoder.Encode(p.Amount) +} + +type Sale struct { + Seller AccountID + Price Price +} + +func (s *Sale) Decode(decoder scale.Decoder) error { + if err := decoder.Decode(&s.Seller); err != nil { + return err + } + + return decoder.Decode(&s.Price) +} + +func (s Sale) Encode(encoder scale.Encoder) error { + if err := encoder.Encode(s.Seller); err != nil { + return err + } + + return encoder.Encode(s.Price) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/serde.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/serde.go new file mode 100644 index 000000000..5fed0b289 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/serde.go @@ -0,0 +1,44 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "sync" + +// SerDeOptions are serialise and deserialize options for types +type SerDeOptions struct { + // NoPalletIndices enable this to work with substrate chains that do not have indices pallet in runtime + NoPalletIndices bool +} + +var defaultOptions = SerDeOptions{} +var mu sync.RWMutex + +// SetSerDeOptions overrides default serialise and deserialize options +func SetSerDeOptions(so SerDeOptions) { + defer mu.Unlock() + mu.Lock() + defaultOptions = so +} + +// SerDeOptionsFromMetadata returns Serialise and deserialize options from metadata +func SerDeOptionsFromMetadata(meta *Metadata) SerDeOptions { + var opts SerDeOptions + if !meta.ExistsModuleMetadata("Indices") { + opts.NoPalletIndices = true + } + return opts +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/signature.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/signature.go new file mode 100644 index 000000000..f12736715 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/signature.go @@ -0,0 +1,49 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "fmt" + +// SignatureHash is a H512 +type SignatureHash H512 + +// NewSignature creates a new SignatureHash type +func NewSignature(b []byte) SignatureHash { + h := SignatureHash{} + copy(h[:], b) + return h +} + +// Hex returns a hex string representation of the value (not of the encoded value) +func (h SignatureHash) Hex() string { + return fmt.Sprintf("%#x", h[:]) +} + +// EcdsaSignature is a 65 byte array +type EcdsaSignature [65]byte + +// NewEcdsaSignature creates a new EcdsaSignature type +func NewEcdsaSignature(b []byte) EcdsaSignature { + h := EcdsaSignature{} + copy(h[:], b) + return h +} + +// Hex returns a hex string representation of the value (not of the encoded value) +func (eh EcdsaSignature) Hex() string { + return fmt.Sprintf("%#x", eh[:]) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/storage_change_set.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/storage_change_set.go new file mode 100644 index 000000000..f09b412a4 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/storage_change_set.go @@ -0,0 +1,74 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "encoding/json" + "fmt" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/types/codec" +) + +// StorageChangeSet contains changes from storage subscriptions +type StorageChangeSet struct { + Block Hash `json:"block"` + Changes []KeyValueOption `json:"changes"` +} + +type KeyValueOption struct { + StorageKey StorageKey + HasStorageData bool + StorageData StorageDataRaw +} + +func (r *KeyValueOption) UnmarshalJSON(b []byte) error { + var tmp []string + if err := json.Unmarshal(b, &tmp); err != nil { + return err + } + switch len(tmp) { + case 0: + return fmt.Errorf("expected at least one entry for KeyValueOption") + case 2: + r.HasStorageData = true + data, err := codec.HexDecodeString(tmp[1]) + if err != nil { + return err + } + r.StorageData = data + fallthrough + case 1: + key, err := codec.HexDecodeString(tmp[0]) + if err != nil { + return err + } + r.StorageKey = key + default: + return fmt.Errorf("expected 1 or 2 entries for KeyValueOption, got %v", len(tmp)) + } + return nil +} + +func (r KeyValueOption) MarshalJSON() ([]byte, error) { + var tmp []string + if r.HasStorageData { + tmp = []string{r.StorageKey.Hex(), r.StorageData.Hex()} + } else { + tmp = []string{r.StorageKey.Hex()} + } + return json.Marshal(tmp) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/storage_data_raw.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/storage_data_raw.go new file mode 100644 index 000000000..38a9321e6 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/storage_data_raw.go @@ -0,0 +1,60 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "fmt" + "io" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +// StorageDataRaw contains raw bytes that are not decoded/encoded. +// Be careful using this in your own structs – it only works as the last value in a struct since it will consume the +// remainder of the encoded data. The reason for this is that it does not contain any length encoding, so it would +// not know where to stop. +type StorageDataRaw []byte + +// NewStorageDataRaw creates a new StorageDataRaw type +func NewStorageDataRaw(b []byte) StorageDataRaw { + return StorageDataRaw(b) +} + +// Encode implements encoding for StorageDataRaw, which just unwraps the bytes of StorageDataRaw +func (s StorageDataRaw) Encode(encoder scale.Encoder) error { + return encoder.Write(s) +} + +// Decode implements decoding for StorageDataRaw, which just reads all the remaining bytes into StorageDataRaw +func (s *StorageDataRaw) Decode(decoder scale.Decoder) error { + for i := 0; true; i++ { + b, err := decoder.ReadOneByte() + if err == io.EOF { + break + } + if err != nil { + return err + } + *s = append((*s)[:i], b) + } + return nil +} + +// Hex returns a hex string representation of the value +func (s StorageDataRaw) Hex() string { + return fmt.Sprintf("%#x", s) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/storage_key.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/storage_key.go new file mode 100644 index 000000000..8630e55c6 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/storage_key.go @@ -0,0 +1,175 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "fmt" + "io" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/xxhash" +) + +// StorageKey represents typically hashed storage keys of the system. +// Be careful using this in your own structs – it only works as the last value in a struct since it will consume the +// remainder of the encoded data. The reason for this is that it does not contain any length encoding, so it would +// not know where to stop. +type StorageKey []byte + +// NewStorageKey creates a new StorageKey type +func NewStorageKey(b []byte) StorageKey { + return b +} + +// CreateStorageKey uses the given metadata and to derive the right hashing of method, prefix as well as arguments to +// create a hashed StorageKey +// Using variadic argument, so caller do not need to construct array of arguments +func CreateStorageKey(meta *Metadata, prefix, method string, args ...[]byte) (StorageKey, error) { //nolint:funlen + stringKey := []byte(prefix + " " + method) + + validateAndTrimArgs := func(args [][]byte) ([][]byte, error) { + nonNilCount := -1 + for i, arg := range args { + if len(arg) == 0 { + nonNilCount = i + break + } + } + + if nonNilCount == -1 { + return args, nil + } + + for i := nonNilCount; i < len(args); i++ { + if len(args[i]) != 0 { + return nil, fmt.Errorf("non-nil arguments cannot be preceded by nil arguments") + } + } + + trimmedArgs := make([][]byte, nonNilCount) + for i := 0; i < nonNilCount; i++ { + trimmedArgs[i] = args[i] + } + + return trimmedArgs, nil + } + + validatedArgs, err := validateAndTrimArgs(args) + if err != nil { + return nil, err + } + + entryMeta, err := meta.FindStorageEntryMetadata(prefix, method) + if err != nil { + return nil, err + } + + // From metadata >= v14, there is only one representation of Map, + // which is more alike the old 'NMap': a Map with n keys (n >= 1). + // The old variants are now unified thus IsMap() is true for all. + if entryMeta.IsMap() { + hashers, err := entryMeta.Hashers() + if err != nil { + return nil, fmt.Errorf("unable to get hashers for %s map", method) + } + if len(hashers) != len(validatedArgs) { + return nil, fmt.Errorf("%s:%s is a map, therefore requires that number of arguments should "+ + "exactly match number of hashers in metadata. "+ + "Expected: %d, received: %d", prefix, method, len(hashers), len(validatedArgs)) + } + return createKeyMap(method, prefix, validatedArgs, entryMeta) + } + + if entryMeta.IsPlain() && len(validatedArgs) != 0 { + return nil, fmt.Errorf("%s:%s is a plain key, therefore requires no argument. "+ + "received: %d", prefix, method, len(validatedArgs)) + } + + return createKey(meta, method, prefix, stringKey, nil, entryMeta) +} + +// Encode implements encoding for StorageKey, which just unwraps the bytes of StorageKey +func (s StorageKey) Encode(encoder scale.Encoder) error { + return encoder.Write(s) +} + +// Decode implements decoding for StorageKey, which just reads all the remaining bytes into StorageKey +func (s *StorageKey) Decode(decoder scale.Decoder) error { + for i := 0; true; i++ { + b, err := decoder.ReadOneByte() + if err == io.EOF { + break + } + if err != nil { + return err + } + *s = append((*s)[:i], b) + } + return nil +} + +// Hex returns a hex string representation of the value (not of the encoded value) +func (s StorageKey) Hex() string { + return fmt.Sprintf("%#x", s) +} + +// Create a key for a Map. +// The number of keys of the map should match with the number of key hashers. +func createKeyMap(method, prefix string, args [][]byte, entryMeta StorageEntryMetadata) (StorageKey, error) { + hashers, err := entryMeta.Hashers() + if err != nil { + return nil, err + } + + key := createPrefixedKey(method, prefix) + + for i, arg := range args { + _, err := hashers[i].Write(arg) + if err != nil { + return nil, fmt.Errorf("unable to hash args[%d]: %s Error: %v", i, arg, err) + } + key = append(key, hashers[i].Sum(nil)...) + } + + return key, nil +} + +// createKey creates a key for a plain value +func createKey( + meta *Metadata, + method, + prefix string, + stringKey, + arg []byte, + entryMeta StorageEntryMetadata, +) (StorageKey, error) { + hasher, err := entryMeta.Hasher() + if err != nil { + return nil, err + } + + if meta.Version <= 8 { + _, err := hasher.Write(append(stringKey, arg...)) + return hasher.Sum(nil), err + } + + return append(createPrefixedKey(method, prefix), arg...), nil +} + +func createPrefixedKey(method, prefix string) []byte { + return append(xxhash.New128([]byte(prefix)).Sum(nil), xxhash.New128([]byte(method)).Sum(nil)...) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/tally.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/tally.go new file mode 100644 index 000000000..12eb0bf29 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/tally.go @@ -0,0 +1,52 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +type Tally struct { + Votes U128 + Total U128 +} + +func (t *Tally) Decode(decoder scale.Decoder) error { + err := decoder.Decode(&t.Votes) + if err != nil { + return err + } + + err = decoder.Decode(&t.Total) + if err != nil { + return err + } + + return nil +} + +func (t Tally) Encode(encoder scale.Encoder) error { + err := encoder.Encode(t.Votes) + if err != nil { + return err + } + + err = encoder.Encode(t.Total) + if err != nil { + return err + } + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/text.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/text.go new file mode 100644 index 000000000..a995aae57 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/text.go @@ -0,0 +1,25 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +// Text is a string type +type Text string + +// NewText creates a new Text type +func NewText(s string) Text { + return Text(s) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/type.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/type.go new file mode 100644 index 000000000..b26eeae1d --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/type.go @@ -0,0 +1,20 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +// Type is a string, specifically to handle types +type Type string diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/ucompact.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/ucompact.go new file mode 100644 index 000000000..c8cb9f249 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/ucompact.go @@ -0,0 +1,61 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "encoding/json" + "math/big" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +type UCompact big.Int + +func NewUCompact(value *big.Int) UCompact { + return UCompact(*value) +} + +func (u *UCompact) Int64() int64 { + i := big.Int(*u) + return i.Int64() +} + +func NewUCompactFromUInt(value uint64) UCompact { + return NewUCompact(new(big.Int).SetUint64(value)) +} + +func (u *UCompact) Decode(decoder scale.Decoder) error { + ui, err := decoder.DecodeUintCompact() + if err != nil { + return err + } + + *u = UCompact(*ui) + return nil +} + +func (u UCompact) Encode(encoder scale.Encoder) error { + err := encoder.EncodeUintCompact(big.Int(u)) + if err != nil { + return err + } + return nil +} + +func (u UCompact) MarshalJSON() ([]byte, error) { + return json.Marshal(u.Int64()) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/uint.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/uint.go new file mode 100644 index 000000000..27d9862c8 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/uint.go @@ -0,0 +1,263 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "encoding/json" + "fmt" + "math/big" + + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" +) + +// U8 is an unsigned 8-bit integer +type U8 uint8 + +// NewU8 creates a new U8 type +func NewU8(u uint8) U8 { + return U8(u) +} + +// UnmarshalJSON fills u with the JSON encoded byte array given by b +func (u *U8) UnmarshalJSON(b []byte) error { + var tmp uint8 + if err := json.Unmarshal(b, &tmp); err != nil { + return err + } + *u = U8(tmp) + return nil +} + +// MarshalJSON returns a JSON encoded byte array of u +func (u U8) MarshalJSON() ([]byte, error) { + return json.Marshal(uint8(u)) +} + +// U16 is an unsigned 16-bit integer +type U16 uint16 + +// NewU16 creates a new U16 type +func NewU16(u uint16) U16 { + return U16(u) +} + +// UnmarshalJSON fills u with the JSON encoded byte array given by b +func (u *U16) UnmarshalJSON(b []byte) error { + var tmp uint16 + if err := json.Unmarshal(b, &tmp); err != nil { + return err + } + *u = U16(tmp) + return nil +} + +// MarshalJSON returns a JSON encoded byte array of u +func (u U16) MarshalJSON() ([]byte, error) { + return json.Marshal(uint16(u)) +} + +// U32 is an unsigned 32-bit integer +type U32 uint32 + +// NewU32 creates a new U32 type +func NewU32(u uint32) U32 { + return U32(u) +} + +// UnmarshalJSON fills u with the JSON encoded byte array given by b +func (u *U32) UnmarshalJSON(b []byte) error { + var tmp uint32 + if err := json.Unmarshal(b, &tmp); err != nil { + return err + } + *u = U32(tmp) + return nil +} + +// MarshalJSON returns a JSON encoded byte array of u +func (u U32) MarshalJSON() ([]byte, error) { + return json.Marshal(uint32(u)) +} + +// U64 is an unsigned 64-bit integer +type U64 uint64 + +// NewU64 creates a new U64 type +func NewU64(u uint64) U64 { + return U64(u) +} + +// UnmarshalJSON fills u with the JSON encoded byte array given by b +func (u *U64) UnmarshalJSON(b []byte) error { + var tmp uint64 + if err := json.Unmarshal(b, &tmp); err != nil { + return err + } + *u = U64(tmp) + return nil +} + +// MarshalJSON returns a JSON encoded byte array of u +func (u U64) MarshalJSON() ([]byte, error) { + return json.Marshal(uint64(u)) +} + +// U128 is an unsigned 128-bit integer, it is represented as a big.Int in Go. +type U128 struct { + *big.Int +} + +// NewU128 creates a new U128 type +func NewU128(i big.Int) U128 { + return U128{&i} +} + +// Decode implements decoding as per the Scale specification +func (i *U128) Decode(decoder scale.Decoder) error { + bs := make([]byte, 16) + err := decoder.Read(bs) + if err != nil { + return err + } + // reverse bytes, scale uses little-endian encoding, big.int's bytes are expected in big-endian + scale.Reverse(bs) + + b, err := UintBytesToBigInt(bs) + if err != nil { + return err + } + + // deal with zero differently to get a nil representation (this is how big.Int deals with 0) + if b.Sign() == 0 { + *i = U128{big.NewInt(0)} + return nil + } + + *i = U128{b} + return nil +} + +// Encode implements encoding as per the Scale specification +func (i U128) Encode(encoder scale.Encoder) error { + if i.Int == nil { + i.Int = big.NewInt(0) + } + + b, err := BigIntToUintBytes(i.Int, 16) + if err != nil { + return err + } + + // reverse bytes, scale uses little-endian encoding, big.int's bytes are expected in big-endian + scale.Reverse(b) + + return encoder.Write(b) +} + +func (i U128) GobEncode() ([]byte, error) { + return i.Int.GobEncode() +} + +func (i *U128) GobDecode(b []byte) error { + if i.Int == nil { + i.Int = big.NewInt(0) + } + + return i.Int.GobDecode(b) +} + +// U256 is an usigned 256-bit integer, it is represented as a big.Int in Go. +type U256 struct { + *big.Int +} + +// NewU256 creates a new U256 type +func NewU256(i big.Int) U256 { + return U256{&i} +} + +// Decode implements decoding as per the Scale specification +func (i *U256) Decode(decoder scale.Decoder) error { + bs := make([]byte, 32) + err := decoder.Read(bs) + if err != nil { + return err + } + // reverse bytes, scale uses little-endian encoding, big.int's bytes are expected in big-endian + scale.Reverse(bs) + + b, err := UintBytesToBigInt(bs) + if err != nil { + return err + } + + // deal with zero differently to get a nil representation (this is how big.Int deals with 0) + if b.Sign() == 0 { + *i = U256{big.NewInt(0)} + return nil + } + + *i = U256{b} + return nil +} + +// Encode implements encoding as per the Scale specification +func (i U256) Encode(encoder scale.Encoder) error { + if i.Int == nil { + i.Int = big.NewInt(0) + } + + b, err := BigIntToUintBytes(i.Int, 32) + if err != nil { + return err + } + + // reverse bytes, scale uses little-endian encoding, big.int's bytes are expected in big-endian + scale.Reverse(b) + + return encoder.Write(b) +} + +// BigIntToUintBytes encodes the given big.Int to a big endian encoded unsigned integer byte slice of the given byte +// length, returning an error if the given big.Int would be bigger than the maximum number the byte slice of the given +// length could hold +func BigIntToUintBytes(i *big.Int, bytelen int) ([]byte, error) { + if i.Sign() < 0 { + return nil, fmt.Errorf("cannot encode a negative big.Int into an unsigned integer") + } + + max := big.NewInt(0).Exp(big.NewInt(2), big.NewInt(int64(bytelen*8)), nil) + if i.CmpAbs(max) > 0 { + return nil, fmt.Errorf("cannot encode big.Int to []byte: given big.Int exceeds highest number "+ + "%v for an uint with %v bits", max, bytelen*8) + } + + res := make([]byte, bytelen) + + bs := i.Bytes() + copy(res[len(res)-len(bs):], bs) + return res, nil +} + +// UintBytesToBigInt decodes the given byte slice containing a big endian encoded unsigned integer to a big.Int +func UintBytesToBigInt(b []byte) (*big.Int, error) { + if len(b) == 0 { + return nil, fmt.Errorf("cannot decode an empty byte slice") + } + + return big.NewInt(0).SetBytes(b), nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/usize.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/usize.go new file mode 100644 index 000000000..96d6eb3b0 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/usize.go @@ -0,0 +1,41 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "encoding/json" +) + +// Deprecated: USize is a system default unsigned number, typically used in RPC to report non-consensus +// data. It is a wrapper for [[U32]] as a WASM default (as generated by Rust bindings). +// It is not to be used, since it created consensus mismatches. +type USize uint32 + +// UnmarshalJSON fills u with the JSON encoded byte array given by b +func (u *USize) UnmarshalJSON(b []byte) error { + var tmp uint32 + if err := json.Unmarshal(b, &tmp); err != nil { + return err + } + *u = USize(tmp) + return nil +} + +// MarshalJSON returns a JSON encoded byte array of u +func (u USize) MarshalJSON() ([]byte, error) { + return json.Marshal(uint32(u)) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/weight.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/weight.go new file mode 100644 index 000000000..0d46475a8 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/weight.go @@ -0,0 +1,33 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +// Weight is a numeric range of a transaction weight +type Weight struct { + // The weight of computational time used based on some reference hardware. + RefTime UCompact + // The weight of storage space used by proof of validity. + ProofSize UCompact +} + +// NewWeight creates a new Weight type +func NewWeight(refTime UCompact, proofSize UCompact) Weight { + return Weight{ + RefTime: refTime, + ProofSize: proofSize, + } +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/weight_multiplier.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/weight_multiplier.go new file mode 100644 index 000000000..6c956e298 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/weight_multiplier.go @@ -0,0 +1,25 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +// WeightMultiplier represents how a fee value can be computed from a weighted transaction +type WeightMultiplier int64 + +// NewWeightMultiplier creates a new WeightMultiplier type +func NewWeightMultiplier(i int64) WeightMultiplier { + return WeightMultiplier(i) +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/xcm.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/xcm.go new file mode 100644 index 000000000..03d2689f2 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/xcm.go @@ -0,0 +1,1372 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +type AssetID struct { + Parents U8 + Interior JunctionsV1 +} + +func (a *AssetID) Decode(decoder scale.Decoder) error { + if err := decoder.Decode(&a.Parents); err != nil { + return err + } + + if err := decoder.Decode(&a.Interior); err != nil { + return err + } + + return nil +} + +func (a AssetID) Encode(encoder scale.Encoder) error { + if err := encoder.Encode(a.Parents); err != nil { + return err + } + + if err := encoder.Encode(a.Interior); err != nil { + return err + } + + return nil +} + +type AssetInstance struct { + IsUndefined bool + + IsIndex bool + Index U128 + + IsArray4 bool + Array4 [4]U8 + + IsArray8 bool + Array8 [8]U8 + + IsArray16 bool + Array16 [16]U8 + + IsArray32 bool + Array32 [32]U8 + + IsBlob bool + Blob []U8 +} + +func (a *AssetInstance) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + a.IsUndefined = true + case 1: + a.IsIndex = true + + return decoder.Decode(&a.Index) + case 2: + a.IsArray4 = true + + return decoder.Decode(&a.Array4) + case 3: + a.IsArray8 = true + + return decoder.Decode(&a.Array8) + case 4: + a.IsArray16 = true + + return decoder.Decode(&a.Array16) + case 5: + a.IsArray32 = true + + return decoder.Decode(&a.Array32) + case 6: + a.IsBlob = true + + return decoder.Decode(&a.Blob) + } + + return nil +} + +func (a AssetInstance) Encode(encoder scale.Encoder) error { + switch { + case a.IsUndefined: + return encoder.PushByte(0) + case a.IsIndex: + if err := encoder.PushByte(1); err != nil { + return err + } + + return encoder.Encode(a.Index) + case a.IsArray4: + if err := encoder.PushByte(2); err != nil { + return err + } + + return encoder.Encode(a.Array4) + case a.IsArray8: + if err := encoder.PushByte(3); err != nil { + return err + } + + return encoder.Encode(a.Array8) + case a.IsArray16: + if err := encoder.PushByte(4); err != nil { + return err + } + + return encoder.Encode(a.Array16) + case a.IsArray32: + if err := encoder.PushByte(5); err != nil { + return err + } + + return encoder.Encode(a.Array32) + case a.IsBlob: + if err := encoder.PushByte(6); err != nil { + return err + } + + return encoder.Encode(a.Blob) + } + + return nil +} + +type Fungibility struct { + IsFungible bool + Amount UCompact + + IsNonFungible bool + AssetInstance AssetInstance +} + +func (f *Fungibility) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + f.IsFungible = true + + return decoder.Decode(&f.Amount) + case 1: + f.IsNonFungible = true + + return decoder.Decode(&f.AssetInstance) + } + + return nil +} + +func (f Fungibility) Encode(encoder scale.Encoder) error { + switch { + case f.IsFungible: + if err := encoder.PushByte(0); err != nil { + return err + } + + return encoder.Encode(f.Amount) + case f.IsNonFungible: + if err := encoder.PushByte(1); err != nil { + return err + } + + return encoder.Encode(f.AssetInstance) + } + + return nil +} + +type MultiAssetV1 struct { + ID AssetID + Fungibility Fungibility +} + +func (m *MultiAssetV1) Decode(decoder scale.Decoder) error { + if err := decoder.Decode(&m.ID); err != nil { + return err + } + + return decoder.Decode(&m.Fungibility) +} + +func (m MultiAssetV1) Encode(encoder scale.Encoder) error { + if err := encoder.Encode(m.ID); err != nil { + return err + } + + return encoder.Encode(m.Fungibility) +} + +type MultiAssetsV1 []MultiAssetV1 + +type MultiAssetV0 struct { + IsNone bool + + IsAll bool + + IsAllFungible bool + + IsAllNonFungible bool + + IsAllAbstractFungible bool + AllAbstractFungibleID []U8 + + IsAllAbstractNonFungible bool + AllAbstractNonFungibleClass []U8 + + IsAllConcreteFungible bool + AllConcreteFungibleID MultiLocationV1 + + IsAllConcreteNonFungible bool + AllConcreteNonFungibleClass MultiLocationV1 + + IsAbstractFungible bool + AbstractFungibleID []U8 + AbstractFungible U128 + + IsAbstractNonFungible bool + AbstractNonFungibleClass []U8 + AbstractNonFungibleInstance AssetInstance + + IsConcreteFungible bool + ConcreteFungibleID MultiLocationV1 + ConcreteFungibleAmount U128 + + IsConcreteNonFungible bool + ConcreteNonFungibleClass MultiLocationV1 + ConcreteNonFungibleInstance AssetInstance +} + +func (m *MultiAssetV0) Decode(decoder scale.Decoder) error { //nolint:funlen + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + m.IsNone = true + case 1: + m.IsAll = true + case 2: + m.IsAllFungible = true + case 3: + m.IsAllNonFungible = true + case 4: + m.IsAllAbstractFungible = true + + return decoder.Decode(&m.AllAbstractFungibleID) + case 5: + m.IsAllAbstractNonFungible = true + + return decoder.Decode(&m.AllAbstractNonFungibleClass) + case 6: + m.IsAllConcreteFungible = true + + return decoder.Decode(&m.AllConcreteFungibleID) + case 7: + m.IsAllConcreteNonFungible = true + + return decoder.Decode(&m.AllConcreteNonFungibleClass) + case 8: + m.IsAbstractFungible = true + + if err := decoder.Decode(&m.AbstractFungibleID); err != nil { + return err + } + + return decoder.Decode(&m.AbstractFungible) + case 9: + m.IsAbstractNonFungible = true + + if err := decoder.Decode(&m.AbstractNonFungibleClass); err != nil { + return err + } + + return decoder.Decode(&m.AbstractNonFungibleInstance) + case 10: + m.IsConcreteFungible = true + + if err := decoder.Decode(&m.ConcreteFungibleID); err != nil { + return err + } + + return decoder.Decode(&m.ConcreteFungibleAmount) + case 11: + m.IsConcreteNonFungible = true + + if err := decoder.Decode(&m.ConcreteNonFungibleClass); err != nil { + return err + } + + return decoder.Decode(&m.ConcreteNonFungibleInstance) + } + + return nil +} + +func (m MultiAssetV0) Encode(encoder scale.Encoder) error { //nolint:funlen + switch { + case m.IsNone: + return encoder.PushByte(0) + case m.IsAll: + return encoder.PushByte(1) + case m.IsAllFungible: + return encoder.PushByte(2) + case m.IsAllNonFungible: + return encoder.PushByte(3) + case m.IsAllAbstractFungible: + if err := encoder.PushByte(4); err != nil { + return err + } + + return encoder.Encode(m.AllAbstractFungibleID) + case m.IsAllAbstractNonFungible: + if err := encoder.PushByte(5); err != nil { + return err + } + + return encoder.Encode(m.AllAbstractNonFungibleClass) + case m.IsAllConcreteFungible: + if err := encoder.PushByte(6); err != nil { + return err + } + + return encoder.Encode(m.AllConcreteFungibleID) + case m.IsAllConcreteNonFungible: + if err := encoder.PushByte(7); err != nil { + return err + } + + return encoder.Encode(m.AllConcreteNonFungibleClass) + case m.IsAbstractFungible: + if err := encoder.PushByte(8); err != nil { + return err + } + + if err := encoder.Encode(m.AbstractFungibleID); err != nil { + return err + } + + return encoder.Encode(m.AbstractFungible) + case m.IsAbstractNonFungible: + if err := encoder.PushByte(9); err != nil { + return err + } + + if err := encoder.Encode(m.AbstractNonFungibleClass); err != nil { + return err + } + + return encoder.Encode(m.AbstractNonFungibleInstance) + case m.IsConcreteFungible: + if err := encoder.PushByte(10); err != nil { + return err + } + + if err := encoder.Encode(m.ConcreteFungibleID); err != nil { + return err + } + + return encoder.Encode(m.ConcreteFungibleAmount) + case m.IsConcreteNonFungible: + if err := encoder.PushByte(11); err != nil { + return err + } + + if err := encoder.Encode(m.ConcreteNonFungibleClass); err != nil { + return err + } + + return encoder.Encode(m.ConcreteNonFungibleInstance) + } + + return nil +} + +type VersionedMultiAssets struct { + IsV0 bool + MultiAssetsV0 []MultiAssetV0 + + IsV1 bool + MultiAssetsV1 MultiAssetsV1 +} + +func (v *VersionedMultiAssets) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + + if err != nil { + return err + } + + switch b { + case 0: + v.IsV0 = true + + return decoder.Decode(&v.MultiAssetsV0) + case 1: + v.IsV1 = true + + return decoder.Decode(&v.MultiAssetsV1) + } + + return nil +} + +func (v VersionedMultiAssets) Encode(encoder scale.Encoder) error { + switch { + case v.IsV0: + if err := encoder.PushByte(0); err != nil { + return err + } + + return encoder.Encode(v.MultiAssetsV0) + case v.IsV1: + if err := encoder.PushByte(1); err != nil { + return err + } + + return encoder.Encode(v.MultiAssetsV1) + } + + return nil +} + +type Response struct { + IsNull bool + + IsAssets bool + MultiAssets MultiAssetsV1 + + IsExecutionResult bool + ExecutionResult ExecutionResult + + IsVersion bool + Version U32 +} + +func (r *Response) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + r.IsNull = true + case 1: + r.IsAssets = true + + return decoder.Decode(&r.MultiAssets) + case 2: + r.IsExecutionResult = true + + return decoder.Decode(&r.ExecutionResult) + case 3: + r.IsVersion = true + + return decoder.Decode(&r.Version) + } + + return nil +} + +func (r Response) Encode(encoder scale.Encoder) error { + switch { + case r.IsNull: + return encoder.PushByte(0) + case r.IsAssets: + if err := encoder.PushByte(1); err != nil { + return err + } + + return encoder.Encode(r.MultiAssets) + case r.IsExecutionResult: + if err := encoder.PushByte(2); err != nil { + return err + } + + return encoder.Encode(r.ExecutionResult) + case r.IsVersion: + if err := encoder.PushByte(3); err != nil { + return err + } + + return encoder.Encode(r.Version) + } + + return nil +} + +type OriginKind struct { + IsNative bool + + IsSovereignAccount bool + + IsSuperuser bool + + IsXcm bool +} + +func (o *OriginKind) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + o.IsNative = true + case 1: + o.IsSovereignAccount = true + case 2: + o.IsSuperuser = true + case 3: + o.IsXcm = true + } + + return nil +} + +func (o OriginKind) Encode(encoder scale.Encoder) error { + switch { + case o.IsNative: + return encoder.PushByte(0) + case o.IsSovereignAccount: + return encoder.PushByte(1) + case o.IsSuperuser: + return encoder.PushByte(2) + case o.IsXcm: + return encoder.PushByte(3) + } + + return nil +} + +type EncodedCall struct { + Call []U8 +} + +func (e *EncodedCall) Decode(decoder scale.Decoder) error { + return decoder.Decode(&e.Call) +} + +func (e EncodedCall) Encode(encoder scale.Encoder) error { + return encoder.Encode(e.Call) +} + +type WildFungibility struct { + IsFungible bool + IsNonFungible bool +} + +func (w *WildFungibility) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + w.IsFungible = true + case 1: + w.IsNonFungible = true + } + + return nil +} + +func (w WildFungibility) Encode(encoder scale.Encoder) error { + switch { + case w.IsFungible: + return encoder.PushByte(0) + case w.IsNonFungible: + return encoder.PushByte(1) + } + + return nil +} + +type WildMultiAsset struct { + IsAll bool + + IsAllOf bool + ID AssetID + Fun WildFungibility +} + +func (w *WildMultiAsset) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + w.IsAll = true + case 1: + w.IsAllOf = true + + if err := decoder.Decode(&w.ID); err != nil { + return err + } + + return decoder.Decode(&w.Fun) + } + + return nil +} + +func (w WildMultiAsset) Encode(encoder scale.Encoder) error { + switch { + case w.IsAll: + return encoder.PushByte(0) + case w.IsAllOf: + if err := encoder.PushByte(1); err != nil { + return err + } + + if err := encoder.Encode(w.ID); err != nil { + return err + } + + return encoder.Encode(w.Fun) + } + + return nil +} + +type MultiAssetFilter struct { + IsDefinite bool + MultiAssets MultiAssetsV1 + + IsWild bool + WildMultiAsset WildMultiAsset +} + +func (m *MultiAssetFilter) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + m.IsDefinite = true + + return decoder.Decode(&m.MultiAssets) + case 1: + m.IsWild = true + + return decoder.Decode(&m.WildMultiAsset) + } + + return nil +} + +func (m MultiAssetFilter) Encode(encoder scale.Encoder) error { + switch { + case m.IsDefinite: + if err := encoder.PushByte(0); err != nil { + return err + } + + return encoder.Encode(m.MultiAssets) + case m.IsWild: + if err := encoder.PushByte(1); err != nil { + return err + } + + return encoder.Encode(m.WildMultiAsset) + } + + return nil +} + +type WeightLimit struct { + IsUnlimited bool + + IsLimited bool + Limit U64 +} + +func (w *WeightLimit) Decode(decoder scale.Decoder) error { + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + w.IsUnlimited = true + case 1: + w.IsLimited = true + + return decoder.Decode(&w.Limit) + } + + return nil +} + +func (w WeightLimit) Encode(encoder scale.Encoder) error { + switch { + case w.IsUnlimited: + return encoder.PushByte(0) + case w.IsLimited: + if err := encoder.PushByte(1); err != nil { + return err + } + + return encoder.Encode(w.Limit) + } + + return nil +} + +type Instruction struct { + IsWithdrawAsset bool + WithdrawAssetMultiAssets MultiAssetsV1 + + IsReserveAssetDeposited bool + ReserveAssetDepositedMultiAssets MultiAssetsV1 + + IsReceiveTeleportedAsset bool + ReceiveTeleportedAssetMultiAssets MultiAssetsV1 + + IsQueryResponse bool + QueryResponseQueryID UCompact + QueryResponseResponse Response + QueryResponseMaxWeight UCompact + + IsTransferAsset bool + TransferAssetAssets MultiAssetsV1 + TransferAssetBeneficiary MultiLocationV1 + + IsTransferReserveAsset bool + TransferReserveAssetMultiAssets MultiAssetsV1 + TransferReserveAssetDest MultiLocationV1 + TransferReserveAssetXCM []Instruction + + IsTransact bool + TransactOriginType OriginKind + TransactRequireWeightAtMost UCompact + // NOTE: + // + // As per https://github.com/paritytech/polkadot/blob/c254e5975711a6497af256f6831e9a6c752d28f5/xcm/src/v2/mod.rs#L343 + // The `Call` should be wrapped by the `DoubleEncoded` found here: + // https://github.com/paritytech/polkadot/blob/c254e5975711a6497af256f6831e9a6c752d28f5/xcm/src/double_encoded.rs#L27 + // + // However, since the decoded option is skipped by the codec, we are not adding it here. + TransactCall EncodedCall + + IsHrmpNewChannelOpenRequest bool + HrmpNewChannelOpenRequestSender U32 + HrmpNewChannelOpenRequestMaxMessageSize U32 + HrmpNewChannelOpenRequestMaxCapacity U32 + + IsHrmpChannelAccepted bool + HrmpChannelAcceptedRecipient U32 + + IsHrmpChannelClosing bool + HrmpChannelClosingInitiator U32 + HrmpChannelClosingSender U32 + HrmpChannelClosingRecipient U32 + + IsClearOrigin bool + + IsDescendOrigin bool + DescendOriginLocation JunctionsV1 + + IsReportError bool + ReportErrorQueryID U64 + ReportErrorDestination MultiLocationV1 + ReportErrorMaxResponseWeight U64 + + IsDepositAsset bool + DepositAssetMultiAssetFilter MultiAssetFilter + DepositAssetMaxAssets U32 + DepositAssetBeneficiary MultiLocationV1 + + IsDepositReserveAsset bool + DepositReserveAssetMultiAssetFilter MultiAssetFilter + DepositReserveAssetMaxAssets U32 + DepositReserveAssetDest MultiLocationV1 + DepositReserveAssetXCM []Instruction + + IsExchangeAsset bool + ExchangeAssetGive MultiAssetFilter + ExchangeAssetReceive MultiAssetsV1 + + IsInitiateReserveWithdraw bool + InitiateReserveWithdrawAssets MultiAssetFilter + InitiateReserveWithdrawReserve MultiLocationV1 + InitiateReserveWithdrawXCM []Instruction + + IsInitiateTeleport bool + InitiateTeleportAssets MultiAssetFilter + InitiateTeleportDest MultiLocationV1 + InitiateTeleportXCM []Instruction + + IsQueryHolding bool + QueryHoldingQueryID U64 + QueryHoldingDest MultiLocationV1 + QueryHoldingAssets MultiAssetFilter + QueryHoldingMaxResponseWeight U64 + + IsBuyExecution bool + BuyExecutionFees MultiAssetV1 + BuyExecutionWeightLimit WeightLimit + + IsRefundSurplus bool + + IsSetErrorHandler bool + SetErrorHandlerXCM []Instruction + + IsSetAppendix bool + SetAppendixXCM []Instruction + + IsClearError bool + + IsClaimAsset bool + ClaimAssetAssets MultiAssetsV1 + ClaimAssetTicket MultiLocationV1 + + IsTrap bool + TrapCode U64 + + IsSubscribeVersion bool + SubscribeVersionQueryID U64 + SubscribeVersionMaxResponseWeight U64 + + IsUnsubscribeVersion bool +} + +func (i *Instruction) Decode(decoder scale.Decoder) error { //nolint:gocyclo,funlen + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + i.IsWithdrawAsset = true + + return decoder.Decode(&i.WithdrawAssetMultiAssets) + case 1: + i.IsReserveAssetDeposited = true + + return decoder.Decode(&i.ReserveAssetDepositedMultiAssets) + case 2: + i.IsReceiveTeleportedAsset = true + + return decoder.Decode(&i.ReceiveTeleportedAssetMultiAssets) + case 3: + i.IsQueryResponse = true + + if err := decoder.Decode(&i.QueryResponseQueryID); err != nil { + return err + } + + if err := decoder.Decode(&i.QueryResponseResponse); err != nil { + return err + } + + return decoder.Decode(&i.QueryResponseMaxWeight) + case 4: + i.IsTransferAsset = true + + if err := decoder.Decode(&i.TransferAssetAssets); err != nil { + return err + } + + return decoder.Decode(&i.TransferAssetBeneficiary) + case 5: + i.IsTransferReserveAsset = true + + if err := decoder.Decode(&i.TransferReserveAssetMultiAssets); err != nil { + return err + } + + if err := decoder.Decode(&i.TransferReserveAssetDest); err != nil { + return err + } + + return decoder.Decode(&i.TransferReserveAssetXCM) + case 6: + i.IsTransact = true + + if err := decoder.Decode(&i.TransactOriginType); err != nil { + return err + } + + if err := decoder.Decode(&i.TransactRequireWeightAtMost); err != nil { + return err + } + + return decoder.Decode(&i.TransactCall) + case 7: + i.IsHrmpNewChannelOpenRequest = true + + if err := decoder.Decode(&i.HrmpNewChannelOpenRequestSender); err != nil { + return err + } + + if err := decoder.Decode(&i.HrmpNewChannelOpenRequestMaxMessageSize); err != nil { + return err + } + + return decoder.Decode(&i.HrmpNewChannelOpenRequestMaxCapacity) + case 8: + i.IsHrmpChannelAccepted = true + + return decoder.Decode(&i.HrmpChannelAcceptedRecipient) + case 9: + i.IsHrmpChannelClosing = true + + if err := decoder.Decode(&i.HrmpChannelClosingInitiator); err != nil { + return err + } + + if err := decoder.Decode(&i.HrmpChannelClosingSender); err != nil { + return err + } + + return decoder.Decode(&i.HrmpChannelClosingRecipient) + case 10: + i.IsClearOrigin = true + case 11: + i.IsDescendOrigin = true + + return decoder.Decode(&i.DescendOriginLocation) + case 12: + i.IsReportError = true + + if err := decoder.Decode(&i.ReportErrorQueryID); err != nil { + return err + } + + if err := decoder.Decode(&i.ReportErrorDestination); err != nil { + return err + } + + return decoder.Decode(&i.ReportErrorMaxResponseWeight) + case 13: + i.IsDepositAsset = true + + if err := decoder.Decode(&i.DepositAssetMultiAssetFilter); err != nil { + return err + } + + if err := decoder.Decode(&i.DepositAssetMaxAssets); err != nil { + return err + } + + return decoder.Decode(&i.DepositAssetBeneficiary) + case 14: + i.IsDepositReserveAsset = true + + if err := decoder.Decode(&i.DepositReserveAssetMultiAssetFilter); err != nil { + return err + } + + if err := decoder.Decode(&i.DepositReserveAssetMaxAssets); err != nil { + return err + } + + if err := decoder.Decode(&i.DepositReserveAssetDest); err != nil { + return err + } + + return decoder.Decode(&i.DepositReserveAssetXCM) + case 15: + i.IsExchangeAsset = true + + if err := decoder.Decode(&i.ExchangeAssetGive); err != nil { + return err + } + + return decoder.Decode(&i.ExchangeAssetReceive) + case 16: + i.IsInitiateReserveWithdraw = true + + if err := decoder.Decode(&i.InitiateReserveWithdrawAssets); err != nil { + return err + } + + if err := decoder.Decode(&i.InitiateReserveWithdrawReserve); err != nil { + return err + } + + return decoder.Decode(&i.InitiateReserveWithdrawXCM) + case 17: + i.IsInitiateTeleport = true + + if err := decoder.Decode(&i.InitiateTeleportAssets); err != nil { + return err + } + + if err := decoder.Decode(&i.InitiateTeleportDest); err != nil { + return err + } + + return decoder.Decode(&i.InitiateTeleportXCM) + case 18: + i.IsQueryHolding = true + + if err := decoder.Decode(&i.QueryHoldingQueryID); err != nil { + return err + } + + if err := decoder.Decode(&i.QueryHoldingDest); err != nil { + return err + } + + if err := decoder.Decode(&i.QueryHoldingAssets); err != nil { + return err + } + + return decoder.Decode(&i.QueryHoldingMaxResponseWeight) + case 19: + i.IsBuyExecution = true + + if err := decoder.Decode(&i.BuyExecutionFees); err != nil { + return err + } + + return decoder.Decode(&i.BuyExecutionWeightLimit) + case 20: + i.IsRefundSurplus = true + case 21: + i.IsSetErrorHandler = true + + return decoder.Decode(&i.SetErrorHandlerXCM) + case 22: + i.IsSetAppendix = true + + return decoder.Decode(&i.SetAppendixXCM) + case 23: + i.IsClearError = true + case 24: + i.IsClaimAsset = true + + if err := decoder.Decode(&i.ClaimAssetAssets); err != nil { + return err + } + + return decoder.Decode(&i.ClaimAssetTicket) + case 25: + i.IsTrap = true + + return decoder.Decode(&i.TrapCode) + case 26: + i.IsSubscribeVersion = true + + if err := decoder.Decode(&i.SubscribeVersionQueryID); err != nil { + return err + } + + return decoder.Decode(&i.SubscribeVersionMaxResponseWeight) + case 27: + i.IsUnsubscribeVersion = true + } + + return nil +} + +func (i Instruction) Encode(encoder scale.Encoder) error { //nolint:gocyclo,funlen + switch { + case i.IsWithdrawAsset: + if err := encoder.PushByte(0); err != nil { + return err + } + + return encoder.Encode(i.WithdrawAssetMultiAssets) + case i.IsReserveAssetDeposited: + if err := encoder.PushByte(1); err != nil { + return err + } + + return encoder.Encode(i.ReserveAssetDepositedMultiAssets) + case i.IsReceiveTeleportedAsset: + if err := encoder.PushByte(2); err != nil { + return err + } + + return encoder.Encode(i.ReceiveTeleportedAssetMultiAssets) + case i.IsQueryResponse: + if err := encoder.PushByte(3); err != nil { + return err + } + + if err := encoder.Encode(i.QueryResponseQueryID); err != nil { + return err + } + + if err := encoder.Encode(i.QueryResponseResponse); err != nil { + return err + } + + return encoder.Encode(i.QueryResponseMaxWeight) + case i.IsTransferAsset: + if err := encoder.PushByte(4); err != nil { + return err + } + + if err := encoder.Encode(i.TransferAssetAssets); err != nil { + return err + } + + return encoder.Encode(i.TransferAssetBeneficiary) + case i.IsTransferReserveAsset: + if err := encoder.PushByte(5); err != nil { + return err + } + + if err := encoder.Encode(i.TransferReserveAssetMultiAssets); err != nil { + return err + } + + if err := encoder.Encode(i.TransferReserveAssetDest); err != nil { + return err + } + + return encoder.Encode(i.TransferReserveAssetXCM) + case i.IsTransact: + if err := encoder.PushByte(6); err != nil { + return err + } + + if err := encoder.Encode(i.TransactOriginType); err != nil { + return err + } + + if err := encoder.Encode(i.TransactRequireWeightAtMost); err != nil { + return err + } + + return encoder.Encode(i.TransactCall) + case i.IsHrmpNewChannelOpenRequest: + if err := encoder.PushByte(7); err != nil { + return err + } + + if err := encoder.Encode(i.HrmpNewChannelOpenRequestSender); err != nil { + return err + } + + if err := encoder.Encode(i.HrmpNewChannelOpenRequestMaxMessageSize); err != nil { + return err + } + + return encoder.Encode(i.HrmpNewChannelOpenRequestMaxCapacity) + case i.IsHrmpChannelAccepted: + if err := encoder.PushByte(8); err != nil { + return err + } + + return encoder.Encode(i.HrmpChannelAcceptedRecipient) + case i.IsHrmpChannelClosing: + if err := encoder.PushByte(9); err != nil { + return err + } + + if err := encoder.Encode(i.HrmpChannelClosingInitiator); err != nil { + return err + } + + if err := encoder.Encode(i.HrmpChannelClosingSender); err != nil { + return err + } + + return encoder.Encode(i.HrmpChannelClosingRecipient) + case i.IsClearOrigin: + return encoder.PushByte(10) + case i.IsDescendOrigin: + if err := encoder.PushByte(11); err != nil { + return err + } + + return encoder.Encode(i.DescendOriginLocation) + case i.IsReportError: + if err := encoder.PushByte(12); err != nil { + return err + } + + if err := encoder.Encode(i.ReportErrorQueryID); err != nil { + return err + } + + if err := encoder.Encode(i.ReportErrorDestination); err != nil { + return err + } + + return encoder.Encode(i.ReportErrorMaxResponseWeight) + case i.IsDepositAsset: + if err := encoder.PushByte(13); err != nil { + return err + } + + if err := encoder.Encode(i.DepositAssetMultiAssetFilter); err != nil { + return err + } + + if err := encoder.Encode(i.DepositAssetMaxAssets); err != nil { + return err + } + + return encoder.Encode(i.DepositAssetBeneficiary) + case i.IsDepositReserveAsset: + if err := encoder.PushByte(14); err != nil { + return err + } + + if err := encoder.Encode(i.DepositReserveAssetMultiAssetFilter); err != nil { + return err + } + + if err := encoder.Encode(i.DepositReserveAssetMaxAssets); err != nil { + return err + } + + if err := encoder.Encode(i.DepositReserveAssetDest); err != nil { + return err + } + + return encoder.Encode(i.DepositReserveAssetXCM) + case i.IsExchangeAsset: + if err := encoder.PushByte(15); err != nil { + return err + } + + if err := encoder.Encode(i.ExchangeAssetGive); err != nil { + return err + } + + return encoder.Encode(i.ExchangeAssetReceive) + case i.IsInitiateReserveWithdraw: + if err := encoder.PushByte(16); err != nil { + return err + } + + if err := encoder.Encode(i.InitiateReserveWithdrawAssets); err != nil { + return err + } + + if err := encoder.Encode(i.InitiateReserveWithdrawReserve); err != nil { + return err + } + + return encoder.Encode(i.InitiateReserveWithdrawXCM) + case i.IsInitiateTeleport: + if err := encoder.PushByte(17); err != nil { + return err + } + + if err := encoder.Encode(i.InitiateTeleportAssets); err != nil { + return err + } + + if err := encoder.Encode(i.InitiateTeleportDest); err != nil { + return err + } + + return encoder.Encode(i.InitiateTeleportXCM) + case i.IsQueryHolding: + if err := encoder.PushByte(18); err != nil { + return err + } + + if err := encoder.Encode(i.QueryHoldingQueryID); err != nil { + return err + } + + if err := encoder.Encode(i.QueryHoldingDest); err != nil { + return err + } + + if err := encoder.Encode(i.QueryHoldingAssets); err != nil { + return err + } + + return encoder.Encode(i.QueryHoldingMaxResponseWeight) + case i.IsBuyExecution: + if err := encoder.PushByte(19); err != nil { + return err + } + + if err := encoder.Encode(i.BuyExecutionFees); err != nil { + return err + } + + return encoder.Encode(i.BuyExecutionWeightLimit) + case i.IsRefundSurplus: + return encoder.PushByte(20) + case i.IsSetErrorHandler: + if err := encoder.PushByte(21); err != nil { + return err + } + + return encoder.Encode(i.SetErrorHandlerXCM) + case i.IsSetAppendix: + if err := encoder.PushByte(22); err != nil { + return err + } + + return encoder.Encode(i.SetAppendixXCM) + case i.IsClearError: + return encoder.PushByte(23) + case i.IsClaimAsset: + if err := encoder.PushByte(24); err != nil { + return err + } + + if err := encoder.Encode(i.ClaimAssetAssets); err != nil { + return err + } + + return encoder.Encode(i.ClaimAssetTicket) + case i.IsTrap: + if err := encoder.PushByte(25); err != nil { + return err + } + + return encoder.Encode(i.TrapCode) + case i.IsSubscribeVersion: + if err := encoder.PushByte(26); err != nil { + return err + } + + if err := encoder.Encode(i.SubscribeVersionQueryID); err != nil { + return err + } + + return encoder.Encode(i.SubscribeVersionMaxResponseWeight) + case i.IsUnsubscribeVersion: + return encoder.PushByte(27) + } + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/types/xcm_error.go b/pkg/dia/helpers/substrate-helper/gsrpc/types/xcm_error.go new file mode 100644 index 000000000..7783075d4 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/types/xcm_error.go @@ -0,0 +1,217 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/scale" + +type XCMError struct { + IsOverflow bool + + IsUnimplemented bool + + IsUntrustedReserveLocation bool + + IsUntrustedTeleportLocation bool + + IsMultiLocationFull bool + + IsMultiLocationNotInvertible bool + + IsBadOrigin bool + + IsInvalidLocation bool + + IsAssetNotFound bool + + IsFailedToTransactAsset bool + + IsNotWithdrawable bool + + IsLocationCannotHold bool + + IsExceedsMaxMessageSize bool + + IsDestinationUnsupported bool + + IsTransport bool + Transport string + + IsUnroutable bool + + IsUnknownClaim bool + + IsFailedToDecode bool + + IsMaxWeightInvalid bool + + IsNotHoldingFees bool + + IsTooExpensive bool + + IsTrap bool + TrapCode U64 + + IsUnhandledXcmVersion bool + + IsWeightLimitReached bool + Weight Weight + + IsBarrier bool + + IsWeightNotComputable bool +} + +func (x *XCMError) Decode(decoder scale.Decoder) error { //nolint: funlen + b, err := decoder.ReadOneByte() + if err != nil { + return err + } + + switch b { + case 0: + x.IsOverflow = true + case 1: + x.IsUnimplemented = true + case 2: + x.IsUntrustedReserveLocation = true + case 3: + x.IsUntrustedTeleportLocation = true + case 4: + x.IsMultiLocationFull = true + case 5: + x.IsMultiLocationNotInvertible = true + case 6: + x.IsBadOrigin = true + case 7: + x.IsInvalidLocation = true + case 8: + x.IsAssetNotFound = true + case 9: + x.IsFailedToTransactAsset = true + case 10: + x.IsNotWithdrawable = true + case 11: + x.IsLocationCannotHold = true + case 12: + x.IsExceedsMaxMessageSize = true + case 13: + x.IsDestinationUnsupported = true + case 14: + x.IsTransport = true + + return decoder.Decode(&x.Transport) + case 15: + x.IsUnroutable = true + case 16: + x.IsUnknownClaim = true + case 17: + x.IsFailedToDecode = true + case 18: + x.IsMaxWeightInvalid = true + case 19: + x.IsNotHoldingFees = true + case 20: + x.IsTooExpensive = true + case 21: + x.IsTrap = true + + return decoder.Decode(&x.TrapCode) + case 22: + x.IsUnhandledXcmVersion = true + case 23: + x.IsWeightLimitReached = true + + return decoder.Decode(&x.Weight) + case 24: + x.IsBarrier = true + case 25: + x.IsWeightNotComputable = true + } + + return nil +} + +func (x XCMError) Encode(encoder scale.Encoder) error { //nolint:gocyclo,funlen + switch { + case x.IsOverflow: + return encoder.PushByte(0) + case x.IsUnimplemented: + return encoder.PushByte(1) + case x.IsUntrustedReserveLocation: + return encoder.PushByte(2) + case x.IsUntrustedTeleportLocation: + return encoder.PushByte(3) + case x.IsMultiLocationFull: + return encoder.PushByte(4) + case x.IsMultiLocationNotInvertible: + return encoder.PushByte(5) + case x.IsBadOrigin: + return encoder.PushByte(6) + case x.IsInvalidLocation: + return encoder.PushByte(7) + case x.IsAssetNotFound: + return encoder.PushByte(8) + case x.IsFailedToTransactAsset: + return encoder.PushByte(9) + case x.IsNotWithdrawable: + return encoder.PushByte(10) + case x.IsLocationCannotHold: + return encoder.PushByte(11) + case x.IsExceedsMaxMessageSize: + return encoder.PushByte(12) + case x.IsDestinationUnsupported: + return encoder.PushByte(13) + case x.IsTransport: + if err := encoder.PushByte(14); err != nil { + return err + } + + return encoder.Encode(x.Transport) + case x.IsUnroutable: + return encoder.PushByte(15) + case x.IsUnknownClaim: + return encoder.PushByte(16) + case x.IsFailedToDecode: + return encoder.PushByte(17) + case x.IsMaxWeightInvalid: + return encoder.PushByte(18) + case x.IsNotHoldingFees: + return encoder.PushByte(19) + case x.IsTooExpensive: + return encoder.PushByte(20) + case x.IsTrap: + if err := encoder.PushByte(21); err != nil { + return err + } + + return encoder.Encode(x.TrapCode) + case x.IsUnhandledXcmVersion: + return encoder.PushByte(22) + case x.IsWeightLimitReached: + if err := encoder.PushByte(23); err != nil { + return err + } + + return encoder.Encode(x.Weight) + case x.IsBarrier: + return encoder.PushByte(24) + case x.IsWeightNotComputable: + return encoder.PushByte(25) + } + + return nil +} diff --git a/pkg/dia/helpers/substrate-helper/gsrpc/xxhash/xxhash.go b/pkg/dia/helpers/substrate-helper/gsrpc/xxhash/xxhash.go new file mode 100644 index 000000000..ded44cab9 --- /dev/null +++ b/pkg/dia/helpers/substrate-helper/gsrpc/xxhash/xxhash.go @@ -0,0 +1,117 @@ +// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls +// +// Copyright 2019 Centrifuge GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package xxhash + +import ( + "hash" + + "github.com/pierrec/xxHash/xxHash64" +) + +const ( + Typ64 int = iota + Typ64Concat + Typ128 + Typ256 +) + +type state struct { + data []byte + typ int + rounds int +} + +// New64 returns a new hash.Hash computing the xxhash checksum with 1 iteration +func New64(b []byte) hash.Hash { + return &state{ + data: b, + typ: Typ64, + rounds: 1, + } +} + +// New64Concat returns a new hash.Hash computing the xxhash checksum with 1 iteration and appending the data +func New64Concat(b []byte) hash.Hash { + return &state{ + data: b, + typ: Typ64Concat, + rounds: 1, + } +} + +// New128 returns a new hash.Hash computing the xxhash checksum with 2 iterations +func New128(b []byte) hash.Hash { + return &state{ + data: b, + typ: Typ128, + rounds: 2, + } +} + +// New256 returns a new hash.Hash computing the xxhash checksum with 4 iterations +func New256(b []byte) hash.Hash { + return &state{ + data: b, + typ: Typ256, + rounds: 4, + } +} + +// Write (via the embedded io.Writer interface) adds more data to the running hash. +// It never returns an error. +func (s *state) Write(p []byte) (n int, err error) { + s.data = append(s.data, p...) + return len(p), nil +} + +// Sum appends the current hash to b and returns the resulting slice. +// It does not change the underlying hash state. +func (s *state) Sum(b []byte) []byte { + res := make([]byte, 0, s.rounds*8) + + for i := 0; i < s.rounds; i++ { + h := xxHash64.New(uint64(i)) + _, err := h.Write(s.data) + if err != nil { + panic(err) + } + res = append(res, h.Sum(nil)...) + } + + if s.typ == Typ64Concat { + res = append(res, s.data...) + } + return append(b, res...) +} + +// Reset resets the Hash to its initial state. +func (s *state) Reset() { + s.data = make([]byte, 0) +} + +// Size returns the number of bytes Sum will return. +func (s *state) Size() int { + return len(s.Sum(nil)) +} + +// BlockSize returns the hash's underlying block size. +// The Write method must be able to accept any amount +// of data, but it may operate more efficiently if all writes +// are a multiple of the block size. +func (s *state) BlockSize() int { + return 64 +} diff --git a/pkg/dia/scraper/exchange-scrapers/APIScraper.go b/pkg/dia/scraper/exchange-scrapers/APIScraper.go index 589f59726..151ac2108 100644 --- a/pkg/dia/scraper/exchange-scrapers/APIScraper.go +++ b/pkg/dia/scraper/exchange-scrapers/APIScraper.go @@ -304,10 +304,15 @@ func NewAPIScraper(exchange string, scrape bool, key string, secret string, relD return NewUniswapHistoryScraper(Exchanges[dia.UniswapExchange], scrape, relDB) case dia.AyinExchange: return NewAyinScraper(Exchanges[dia.AyinExchange], scrape, relDB) +<<<<<<< HEAD case dia.BitflowExchange: return NewBitflowScraper(Exchanges[dia.BitflowExchange], scrape, relDB) case dia.VelarExchange: return NewVelarScraper(Exchanges[dia.VelarExchange], scrape, relDB) +======= + case dia.BifrostExchange: + return NewBifrostScraper(Exchanges[dia.BifrostExchange], scrape, relDB) +>>>>>>> cd7e3ff50b351adef5c2999645e18ccd225ead0e default: return nil } diff --git a/pkg/dia/scraper/exchange-scrapers/BifrostScraper.go b/pkg/dia/scraper/exchange-scrapers/BifrostScraper.go new file mode 100644 index 000000000..a374f2ec5 --- /dev/null +++ b/pkg/dia/scraper/exchange-scrapers/BifrostScraper.go @@ -0,0 +1,374 @@ +package scrapers + +import ( + "context" + "errors" + "fmt" + "strconv" + "strings" + "sync" + "time" + + "github.com/diadata-org/diadata/pkg/dia" + substratehelper "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/registry" + "github.com/diadata-org/diadata/pkg/dia/helpers/substrate-helper/gsrpc/registry/parser" + + models "github.com/diadata-org/diadata/pkg/model" + + "github.com/diadata-org/diadata/pkg/utils" + "github.com/sirupsen/logrus" +) + +const ( + Blockchain = "Bifrost" +) + +type BifrostScraper struct { + logger *logrus.Entry + pairScrapers map[string]*BifrostPairScraper // pc.ExchangePair -> pairScraperSet + shutdown chan nothing + shutdownDone chan nothing + errorLock sync.RWMutex + error error + closed bool + ticker *time.Ticker + chanTrades chan *dia.Trade + db *models.RelDB + wsApi *substratehelper.SubstrateEventHelper + exchangeName string + blockchain string + currentBlock uint64 +} + +func NewBifrostScraper(exchange dia.Exchange, scrape bool, relDB *models.RelDB) *BifrostScraper { + logger := logrus. + New(). + WithContext(context.Background()). + WithField("context", "BifrostScraper") + + wsApi, err := substratehelper.NewSubstrateEventHelper(exchange.WsAPI, logger) + if err != nil { + logrus.WithError(err).Error("Failed to create Bifrost Substrate event helper") + return nil + } + + startBlock := utils.Getenv(strings.ToUpper(exchange.Name)+"_START_BLOCK", "0") + startBlockUint64, err := strconv.ParseUint(startBlock, 10, 64) + if err != nil { + logrus.WithError(err).Error("Failed to parse start block, using default value of 10") + startBlockUint64 = 10 + } + + s := &BifrostScraper{ + shutdown: make(chan nothing), + shutdownDone: make(chan nothing), + chanTrades: make(chan *dia.Trade), + db: relDB, + wsApi: wsApi, + exchangeName: exchange.Name, + blockchain: Blockchain, + currentBlock: startBlockUint64, + } + + s.logger = logger + + s.logger.Info("Initialized BifrostScraper") + + if scrape { + go s.mainLoop() + } + return s +} + +func (s *BifrostScraper) mainLoop() { + s.logger.Info("Listening for new blocks") + defer s.cleanup(nil) + + for { + select { + case <-s.shutdown: + s.logger.Println("shutting down") + return + default: + s.logger.Info("Processing block:", s.currentBlock) + + if s.currentBlock == 0 { + s.wsApi.ListenForNewBlocks(s.processEvents) + } else { + s.wsApi.ListenForSpecificBlock(s.currentBlock, s.processEvents) + s.currentBlock++ + time.Sleep(time.Second) + latestBlock, err := s.wsApi.API.RPC.Chain.GetBlockLatest() + if err != nil { + s.logger.WithError(err).Error("Failed to get latest block") + return + } + + if s.currentBlock > uint64(latestBlock.Block.Header.Number) { + s.logger.Info("Reached the latest block") + s.wsApi.ListenForNewBlocks(s.processEvents) + } + } + } + } +} + +func (s *BifrostScraper) processEvents(events []*parser.Event, blockNumber uint64) { + s.logger.Info("Processing events") + + for _, e := range events { + if e.Name == "StableAsset.TokenSwapped" { + parsedEvent := parseFields(e) + parsedEvent.ExtrinsicID = fmt.Sprintf("%d-%d", blockNumber, e.Phase.AsApplyExtrinsic) + pool, err := s.db.GetPoolByAddress(s.blockchain, parsedEvent.PoolId) + + if len(pool.Assetvolumes) < 2 { + s.logger.WithField("poolAddress", pool.Address).Error("Pool has fewer than 2 asset volumes") + continue + } + if err != nil { + continue + } + + diaTrade := s.handleTrade(pool, parsedEvent, time.Now()) + + s.logger.WithFields(logrus.Fields{ + "Pair": diaTrade.Pair, + "Price": diaTrade.Price, + "Volume": diaTrade.Volume, + }).Info("Trade processed") + + s.chanTrades <- diaTrade + } + } +} + +type ParsedEvent struct { + InputAsset string + OutputAsset string + InputAmount string + OutputAmount string + PoolId string + ExtrinsicID string +} + +type TokenValue struct { + Token *string `json:"Token,omitempty"` // Token variant, e.g., "KSM" +} +type VTokenValue struct { + VToken string `json:"VToken,omitempty"` // Token variant, e.g., "KSM" +} + +// TokenSymbol represents the token symbols as an enum +type TokenSymbol int + +const ( + ASG TokenSymbol = iota + BNC + KUSD + DOT + KSM + ETH + KAR + ZLK + PHA + RMRK + MOVR +) + +// String returns the string representation of the TokenSymbol +func (ts TokenSymbol) String() string { + return [...]string{"ASG", "BNC", "KUSD", "DOT", "KSM", "ETH", "KAR", "ZLK", "PHA", "RMRK", "MOVR"}[ts] +} + +func parseFields(event *parser.Event) ParsedEvent { + var parsedEvent ParsedEvent + for _, v := range event.Fields { + switch v.Name { + case "bifrost_primitives.currency.CurrencyId.input_asset": + if result, ok := v.Value.(registry.VariantDecoderResult); ok { + if decodedFields, ok := result.Value.(registry.DecodedFields); ok { + if len(decodedFields) > 0 { + parsedEvent.InputAsset = strings.ToLower(result.FieldName) + "-" + strings.ToLower(fmt.Sprint(decodedFields[0].Value)) + } + } + } + case "bifrost_primitives.currency.CurrencyId.output_asset": + if result, ok := v.Value.(registry.VariantDecoderResult); ok { + if decodedFields, ok := result.Value.(registry.DecodedFields); ok { + if len(decodedFields) > 0 { + if len(decodedFields) > 0 { + parsedEvent.OutputAsset = strings.ToLower(result.FieldName) + "-" + strings.ToLower(fmt.Sprint(decodedFields[0].Value)) + } + } + } + } + + case "input_amount": + parsedEvent.InputAmount = fmt.Sprint(v.Value) + case "output_amount": + parsedEvent.OutputAmount = fmt.Sprint(v.Value) + case "pool_id": + parsedEvent.PoolId = fmt.Sprint(v.Value) + } + } + return parsedEvent +} + +// handleTrade processes a swap event and converts it into a dia.Trade object. +// +// This function takes a pool and a corresponding stable swap event, calculates +// the trade volume and price based on the asset amounts in the event, and returns +// a `dia.Trade` object representing the processed trade. The price is calculated +// as the ratio of the input to output amounts, and the volume is set as the +// negative of the input amount to indicate the amount being swapped. +// +// The `dia.Trade` object includes metadata such as the trade timestamp, the trading pair, +// the pool address, and the exchange source. +// +// Parameters: +// - pool: A `dia.Pool` object representing the liquidity pool where the swap occurred. +// - event: A `ParsedEvent` containing the swap details such as asset amounts and event ID. +// - time: The timestamp for the trade event. +// +// Returns: +// - *dia.Trade: A pointer to the constructed `dia.Trade` object containing the trade details. + +func (s *BifrostScraper) handleTrade(pool dia.Pool, event ParsedEvent, time time.Time) *dia.Trade { + var volume, price float64 + var baseToken, quoteToken dia.Asset + var decimalsIn, decimalsOut int64 + + if fmt.Sprint(event.InputAsset) == pool.Assetvolumes[0].Asset.Address { + baseToken = pool.Assetvolumes[0].Asset + quoteToken = pool.Assetvolumes[1].Asset + } else { + baseToken = pool.Assetvolumes[1].Asset + quoteToken = pool.Assetvolumes[0].Asset + } + + decimalsIn = int64(baseToken.Decimals) + decimalsOut = int64(quoteToken.Decimals) + amountIn, _ := utils.StringToFloat64(event.InputAmount, decimalsIn) + amountOut, _ := utils.StringToFloat64(event.OutputAmount, decimalsOut) + + volume = amountOut + + price = amountIn / amountOut + + symbolPair := fmt.Sprintf("%s-%s", quoteToken.Symbol, baseToken.Symbol) + + return &dia.Trade{ + Time: time, + Symbol: quoteToken.Symbol, + Pair: symbolPair, + ForeignTradeID: event.ExtrinsicID, + Source: s.exchangeName, + Price: price, + Volume: volume, + VerifiedPair: true, + QuoteToken: quoteToken, + BaseToken: baseToken, + PoolAddress: pool.Address, + } +} + +// FetchAvailablePairs returns a list with all trading pairs available on +// the exchange associated to the APIScraper. The format is such that it can +// be used by the corr. pairScraper in order to fetch trades. +func (s *BifrostScraper) FetchAvailablePairs() ([]dia.ExchangePair, error) { + return []dia.ExchangePair{}, nil +} + +func (s *BifrostScraper) FillSymbolData(symbol string) (dia.Asset, error) { + return dia.Asset{Symbol: symbol}, nil +} + +func (s *BifrostScraper) NormalizePair(pair dia.ExchangePair) (dia.ExchangePair, error) { + return pair, nil +} + +// ScrapePair initializes and returns a `BifrostPairScraper`. +// +// Parameters: +// - pair: The `dia.ExchangePair` representing the trading pair (e.g: `BifrostPairScraper`) to be scraped. +// +// Returns: +// - PairScraper: A `PairScraper` (specifically a `BifrostPairScraper`) for the given exchange pair. +// - error: An error if the scraper is closed or if an error has occurred, otherwise `nil`. +func (s *BifrostScraper) ScrapePair(pair dia.ExchangePair) (PairScraper, error) { + s.errorLock.RLock() + defer s.errorLock.RUnlock() + if s.error != nil { + return nil, s.error + } + if s.closed { + return nil, errors.New("BifrostScraper: Call ScrapePair on closed scraper") + } + ps := &BifrostPairScraper{ + parent: s, + pair: pair, + lastRecord: 0, + } + + s.pairScrapers[pair.Symbol] = ps + + return ps, nil +} + +// cleanup handles the shutdown procedure. +func (s *BifrostScraper) cleanup(err error) { + s.errorLock.Lock() + defer s.errorLock.Unlock() + + s.ticker.Stop() + + if err != nil { + s.error = err + } + s.closed = true + close(s.shutdownDone) +} + +// Close gracefully shuts down the BifrostScraper. +func (s *BifrostScraper) Close() error { + if s.closed { + return errors.New("BifrostScraper: Already closed") + } + close(s.shutdown) + <-s.shutdownDone + s.errorLock.RLock() + defer s.errorLock.RUnlock() + return s.error +} + +// Channel returns the channel used to receive trades/pricing information. +func (s *BifrostScraper) Channel() chan *dia.Trade { + return s.chanTrades +} + +type BifrostPairScraper struct { + parent *BifrostScraper + pair dia.ExchangePair + closed bool + lastRecord int64 +} + +func (ps *BifrostPairScraper) Pair() dia.ExchangePair { + return ps.pair +} + +func (ps *BifrostPairScraper) Close() error { + ps.closed = true + return nil +} + +// Error returns an error when the channel Channel() is closed +// and nil otherwise +func (ps *BifrostPairScraper) Error() error { + s := ps.parent + s.errorLock.RLock() + defer s.errorLock.RUnlock() + return s.error +} diff --git a/pkg/dia/scraper/liquidity-scrapers/BifrostScraper.go b/pkg/dia/scraper/liquidity-scrapers/BifrostScraper.go new file mode 100644 index 000000000..d97727baf --- /dev/null +++ b/pkg/dia/scraper/liquidity-scrapers/BifrostScraper.go @@ -0,0 +1,225 @@ +package liquidityscrapers + +import ( + "context" + "strconv" + "strings" + "time" + "unicode" + + // "unicode" + + "github.com/diadata-org/diadata/pkg/dia" + bifrosthelper "github.com/diadata-org/diadata/pkg/dia/helpers/bifrost-helper" + models "github.com/diadata-org/diadata/pkg/model" + "github.com/diadata-org/diadata/pkg/utils" + "github.com/sirupsen/logrus" +) + +const ( + Blockchain = "Bifrost" +) + +type BifrostLiquidityScraper struct { + logger *logrus.Entry + api *bifrosthelper.BifrostClient + poolChannel chan dia.Pool + doneChannel chan bool + blockchain string + exchangeName string + relDB *models.RelDB + datastore *models.DB + targetSwapContract string + swapContractsLimit int + handlerType string + sleepBetweenContractCalls time.Duration +} + +// NewBifrostLiquidityScraper returns a new BifrostLiquidityScraper initialized with default values. +// The instance is asynchronously scraping as soon as it is created. +// ENV values: +// +// BIFROST_SLEEP_TIMEOUT - (optional,millisecond), make timeout between API calls, default "bifrosthelper.DefaultSleepBetweenContractCalls" value +// BIFROST_TARGET_SWAP_CONTRACT - (optional, string), useful for debug, default = "" +// BIFROST_DEBUG - (optional, bool), make stdout output with bifrost client http call, default = false +func NewBifrostLiquidityScraper(exchange dia.Exchange, relDB *models.RelDB, datastore *models.DB) *BifrostLiquidityScraper { + targetSwapContract := utils.Getenv( + strings.ToUpper(exchange.Name)+"_TARGET_SWAP_CONTRACT", + "", + ) + isDebug := utils.GetenvBool(strings.ToUpper(exchange.Name)+"_DEBUG", false) + sleepBetweenContractCalls := utils.GetTimeDurationFromIntAsMilliseconds( + utils.GetenvInt( + strings.ToUpper(exchange.Name)+"_SLEEP_TIMEOUT", + bifrosthelper.DefaultSleepBetweenContractCalls, + ), + ) + swapContractsLimit := utils.GetenvInt( + strings.ToUpper(exchange.Name)+"_SWAP_CONTRACTS_LIMIT", + bifrosthelper.DefaultSwapContractsLimit, + ) + + var ( + poolChannel = make(chan dia.Pool) + doneChannel = make(chan bool) + scraper *BifrostLiquidityScraper + ) + + bifrostClient := bifrosthelper.NewBifrostClient( + log.WithContext(context.Background()).WithField("context", "BifrostClient"), + sleepBetweenContractCalls, + isDebug, + ) + + scraper = &BifrostLiquidityScraper{ + api: bifrostClient, + poolChannel: poolChannel, + doneChannel: doneChannel, + exchangeName: exchange.Name, + blockchain: Blockchain, + relDB: relDB, + datastore: datastore, + targetSwapContract: targetSwapContract, + swapContractsLimit: swapContractsLimit, + handlerType: "liquidity", + sleepBetweenContractCalls: sleepBetweenContractCalls, + } + scraper.logger = logrus. + New(). + WithContext(context.Background()). + WithField("handlerType", scraper.handlerType). + WithField("context", "BifrostLiquidityScraper") + + go scraper.fetchPools() + + return scraper +} + +// func detectPrecision(input string) (uint8, error) { +// normalized := normalizeNumber(input) +// decimalIndex := strings.Index(normalized, ".") +// if decimalIndex == -1 { +// return 0, nil +// } + +// precision := len(normalized) - decimalIndex - 1 +// return uint8(precision), nil +// } + +func normalizeNumber(input string) string { + if strings.Contains(input, ",") && strings.Contains(input, ".") { + input = strings.ReplaceAll(input, ",", "") + } else if strings.Count(input, ",") > 1 { + input = strings.ReplaceAll(input, ",", "") + } else if strings.Count(input, ".") > 1 { + input = strings.ReplaceAll(input, ".", "") + input = strings.Replace(input, ",", ".", 1) + } else if strings.Contains(input, ",") { + input = strings.Replace(input, ",", ".", 1) + } + + // Remove any remaining non-numeric characters (e.g., spaces) + return strings.Map(func(r rune) rune { + if unicode.IsDigit(r) || r == '.' { + return r + } + return -1 + }, input) +} + +func (s *BifrostLiquidityScraper) fetchPools() { + logger := s.logger.WithFields(logrus.Fields{ + "function": "fetchPools", + }) + + // Fetch all pair tokens pool entries from api + bifrostPoolAssets, err := s.api.GetAllPoolAssets() + if err != nil { + s.logger.WithError(err).Error("failed to GetAllPoolAssets") + } + + s.logger.Infof("Found %d pools", len(bifrostPoolAssets)) + + // Iterate all over the pool assets creating pool objects and sending them to the pool channel + for _, bPool := range bifrostPoolAssets { + dbAssets := make([]dia.Asset, 0) + for _, assetId := range bPool.Assets { + assetKey := strings.ToLower(assetId) + dbTokenInfo, err := s.relDB.GetAsset(assetKey, s.blockchain) + if err != nil { + logger.WithError(err).Error("Failed to GetAsset with address:%s, blockchain:%s", assetKey, s.blockchain) + continue + } + + dbAssets = append(dbAssets, dbTokenInfo) + } + + if len(dbAssets) != 2 { + logger.Error("found more than 2 asset types for the pool pair") + continue + } + + if len(bPool.Balances) != 2 { + logger.Error("found more than 2 balances for the pool pair") + continue + } + + tokenABalance, err := strconv.ParseFloat(normalizeNumber(bPool.Balances[0]), 64) + if err != nil { + logger.WithError(err).Error("failed to parse tokenA balance") + continue + } + + tokenBBalance, err := strconv.ParseFloat(normalizeNumber(bPool.Balances[1]), 64) + if err != nil { + logger.WithError(err).Error("failed to parse tokenB balance") + continue + } + + s.logger.WithFields(logrus.Fields{ + "BalanceA": tokenABalance, + "BalanceB": tokenBBalance, + }).Info("Found balances") + + tokenA := dia.AssetVolume{ + Index: 0, + Asset: dbAssets[0], + Volume: tokenABalance, + } + + tokenB := dia.AssetVolume{ + Index: 1, + Asset: dbAssets[1], + Volume: tokenBBalance, + } + + pool := dia.Pool{ + Exchange: dia.Exchange{Name: s.exchangeName}, + Blockchain: dia.BlockChain{Name: s.blockchain}, + Address: bPool.PoolId, + Time: time.Now(), + Assetvolumes: []dia.AssetVolume{tokenA, tokenB}, + } + + // Determine USD liquidity. + if pool.SufficientNativeBalance(GLOBAL_NATIVE_LIQUIDITY_THRESHOLD) { + s.datastore.GetPoolLiquiditiesUSD(&pool, priceCache) + } + + s.logger.WithFields(logrus.Fields{ + "Address": pool.Address, + }).Info("sending pool to poolChannel") + + s.poolChannel <- pool + } + + s.doneChannel <- true +} + +func (s *BifrostLiquidityScraper) Pool() chan dia.Pool { + return s.poolChannel +} + +func (s *BifrostLiquidityScraper) Done() chan bool { + return s.doneChannel +} diff --git a/pkg/dia/scraper/liquidity-scrapers/ScraperInterface.go b/pkg/dia/scraper/liquidity-scrapers/ScraperInterface.go index f6c20a552..2fae79c81 100644 --- a/pkg/dia/scraper/liquidity-scrapers/ScraperInterface.go +++ b/pkg/dia/scraper/liquidity-scrapers/ScraperInterface.go @@ -170,6 +170,8 @@ func NewLiquidityScraper(source string, relDB *models.RelDB, datastore *models.D return NewBitflowLiquidityScraper(exchanges[dia.BitflowExchange], relDB, datastore) case dia.VelarExchange: return NewVelarLiquidityScraper(exchanges[dia.VelarExchange], relDB, datastore) + case dia.BifrostExchange: + return NewBifrostLiquidityScraper(exchanges[dia.BifrostExchange], relDB, datastore) default: return nil } diff --git a/pkg/dia/service/assetservice/source/bifrost.go b/pkg/dia/service/assetservice/source/bifrost.go new file mode 100644 index 000000000..765840428 --- /dev/null +++ b/pkg/dia/service/assetservice/source/bifrost.go @@ -0,0 +1,113 @@ +package source + +import ( + "context" + "strings" + "time" + + "github.com/diadata-org/diadata/pkg/dia" + bifrosthelper "github.com/diadata-org/diadata/pkg/dia/helpers/bifrost-helper" + models "github.com/diadata-org/diadata/pkg/model" + "github.com/diadata-org/diadata/pkg/utils" + "github.com/sirupsen/logrus" +) + +const ( + Blockchain = "Bifrost" +) + +// BifrostAssetSource asset collector object - which serves assetCollector command +type BifrostAssetSource struct { + // client - interaction with bifrost REST API services + bifrostClient *bifrosthelper.BifrostClient + // channel to store received asset info + assetChannel chan dia.Asset + // channel which informs about work is finished + doneChannel chan bool + // blockchain name + blockchain string + // DB connector to interact with databases + relDB *models.RelDB + // logs all events here + logger *logrus.Entry + // swap contracts count limitation in bifrost REST API + swapContractsLimit int + + sleepTimeout time.Duration + exchangeName string + targetSwapContract string +} + +// NewBifrostAssetSource creates object to get bifrost assets +// ENV values: +// +// BIFROST_ASSETS_SLEEP_TIMEOUT - (optional,millisecond), make timeout between API calls, default "bifrosthelper.DefaultSleepBetweenContractCalls" value +// BIFROST_SWAP_CONTRACTS_LIMIT - (optional, int), limit to get swap contact addresses, default "bifrosthelper.DefaultSwapContractsLimit" value +// BIFROST_TARGET_SWAP_CONTRACT - (optional, string), useful for debug, default = "" +// BIFROST_DEBUG - (optional, bool), make stdout output with bifrost client http call, default = false +func NewBifrostAssetSource(exchange dia.Exchange, relDB *models.RelDB) *BifrostAssetSource { + sleepBetweenContractCalls := utils.GetTimeDurationFromIntAsMilliseconds( + utils.GetenvInt(strings.ToUpper(exchange.Name)+"_SLEEP_TIMEOUT", bifrosthelper.DefaultSleepBetweenContractCalls), + ) + swapContractsLimit := utils.GetenvInt( + strings.ToUpper(exchange.Name)+"_SWAP_CONTRACTS_LIMIT", + bifrosthelper.DefaultSwapContractsLimit, + ) + targetSwapContract := utils.Getenv(strings.ToUpper(exchange.Name)+"_TARGET_SWAP_CONTRACT", "") + isDebug := utils.GetenvBool(strings.ToUpper(exchange.Name)+"_DEBUG", false) + + var ( + assetChannel = make(chan dia.Asset) + doneChannel = make(chan bool) + ) + bifrostClient := bifrosthelper.NewBifrostClient( + log.WithContext(context.Background()).WithField("context", "BifrostClient"), + sleepBetweenContractCalls, + isDebug, + ) + + logger := log. + WithContext(context.Background()). + WithField("service", "assetCollector"). + WithField("network", "Bifrost") + + scraper := &BifrostAssetSource{ + bifrostClient: bifrostClient, + assetChannel: assetChannel, + doneChannel: doneChannel, + blockchain: Blockchain, + relDB: relDB, + logger: logger, + swapContractsLimit: swapContractsLimit, + exchangeName: "Bifrost", + sleepTimeout: sleepBetweenContractCalls, + targetSwapContract: targetSwapContract, + } + + go scraper.fetchAssets() + + return scraper +} + +func (s *BifrostAssetSource) fetchAssets() { + s.logger.Info("Scraping assets...") + + assets, err := s.bifrostClient.ScrapAssets() + if err != nil { + s.logger.Error("Error when scraping assets: ", err) + return + } + + for _, asset := range assets { + s.assetChannel <- *asset + } + s.doneChannel <- true +} + +func (s *BifrostAssetSource) Asset() chan dia.Asset { + return s.assetChannel +} + +func (s *BifrostAssetSource) Done() chan bool { + return s.doneChannel +}