-
Notifications
You must be signed in to change notification settings - Fork 1
/
methods_files.go
57 lines (55 loc) · 2.23 KB
/
methods_files.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package sourcify
var (
// MethodGetFileFromRepositoryFullMatch represents the API endpoint for retrieving staticly served files over the server for full match contract in the Sourcify service.
// It includes the name, the HTTP method, the URI, and the parameters necessary for the request.
// Returns all verified sources from the repository for the desired contract address and chain, including metadata.json. Searches only for full matches.
// More information: https://docs.sourcify.dev/docs/api/repository/get-file-static/
MethodGetFileFromRepositoryFullMatch = Method{
Name: "Retrieve staticly served files over the server for full match contract",
URI: "/repository/contracts/full_match/:chain/:address/:filePath",
MoreInfo: "https://docs.sourcify.dev/docs/api/repository/get-file-static/",
Method: "GET",
ParamType: MethodParamTypeUri,
RequiredParams: []string{":chain", ":address", ":filePath"},
Params: []MethodParam{
{
Key: ":chain",
Value: "",
},
{
Key: ":address",
Value: "",
},
{
Key: ":filePath",
Value: "",
},
},
}
// MethodGetFileFromRepositoryPartialMatch represents the API endpoint for retrieving staticly served files over the server for partial match contract in the Sourcify service.
// It includes the name, the HTTP method, the URI, and the parameters necessary for the request.
// Returns all verified sources from the repository for the desired contract address and chain, including metadata.json. Searches only for partial matches.
// More information: https://docs.sourcify.dev/docs/api/repository/get-file-static/
MethodGetFileFromRepositoryPartialMatch = Method{
Name: "Retrieve staticly served files over the server for partial match contract",
URI: "/repository/contracts/partial_match/:chain/:address/:filePath",
MoreInfo: "https://docs.sourcify.dev/docs/api/repository/get-file-static/",
Method: "GET",
ParamType: MethodParamTypeUri,
RequiredParams: []string{":chain", ":address", ":filePath"},
Params: []MethodParam{
{
Key: ":chain",
Value: "",
},
{
Key: ":address",
Value: "",
},
{
Key: ":filePath",
Value: "",
},
},
}
)