Skip to content

Commit 89e59cb

Browse files
Fix: GetFiles
1 parent 6bc36ab commit 89e59cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

api.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func (api *API) CheckAllByAddresses(ctx context.Context, addresses []string, cha
187187
}
188188

189189
// GetFiles - Returns all verified sources from the repository for the desired contract address and chain, including metadata.json. Searches for full and partial matches.
190-
func (api *API) GetFiles(ctx context.Context, chainID, address string) ([]Sources, error) {
190+
func (api *API) GetFiles(ctx context.Context, chainID, address string) (*Sources, error) {
191191
link, err := url.Parse(api.baseURL)
192192
if err != nil {
193193
return nil, err
@@ -196,9 +196,9 @@ func (api *API) GetFiles(ctx context.Context, chainID, address string) ([]Source
196196
link = link.JoinPath(chainID)
197197
link = link.JoinPath(address)
198198

199-
var response []Sources
199+
var response Sources
200200
err = api.get(ctx, link, &response)
201-
return response, err
201+
return &response, err
202202
}
203203

204204
// GetFilesFullMatch - Returns all verified sources from the repository for the desired contract address and chain, including metadata.json. Searches only for full matches.

0 commit comments

Comments
 (0)