From e95c4c0475830865ec603c7566405da1017e3ee3 Mon Sep 17 00:00:00 2001 From: Artem Poltorzhitskiy Date: Thu, 5 Sep 2024 12:29:10 +0200 Subject: [PATCH] Fix: encoding string as felt array (#5) --- cmd/metadata/filler.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/metadata/filler.go b/cmd/metadata/filler.go index 715f439..63cae72 100644 --- a/cmd/metadata/filler.go +++ b/cmd/metadata/filler.go @@ -18,6 +18,7 @@ import ( "github.com/dipdup-io/starknet-metadata/internal/types" "github.com/dipdup-io/workerpool" "github.com/dipdup-net/go-lib/config" + "github.com/dipdup-net/indexer-sdk/pkg/jsonschema" "github.com/goccy/go-json" "github.com/karlseguin/ccache/v2" "github.com/pkg/errors" @@ -653,7 +654,7 @@ func (f Filler) getImplementation(ctx context.Context, address data.Felt, name s func parseUri(funcSchema abi.JsonSchemaFunction, response []data.Felt) string { var isArray bool for name := range funcSchema.Output.Properties { - if strings.HasSuffix(name, "_len") { + if strings.HasSuffix(name, "_len") || funcSchema.Output.Properties[name].Type == jsonschema.ItemTypeArray { isArray = true break }