Skip to content

Commit 63efd81

Browse files
committed
docs: gateway - contracts-by-tags
1 parent 5238318 commit 63efd81

File tree

2 files changed

+165
-7
lines changed

2 files changed

+165
-7
lines changed
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# Contracts by tags endpoint
2+
3+
Method: `GET`
4+
5+
`/gateway/contracts-by-tags?tags=<tags>&owner=<owner>&srcId=<srcId>limit=<limit>&page=<page>&testnet<testnet>` - lists all the contracts that contain indicated tags, additionally - owner or source transaction id can be passed to narrow the search
6+
7+
Parameters:
8+
9+
1. `tags` - list of tags, maximum 5 tags with different names can be passed, for each of these tags - up to 5 values can be assigned, example list: `tags=[{"name":"Contract-Src","values":["rbAQI1R9m5eWwExR5fiAgepQvyuUpUf1-DbGAEETmXc","2j7rlIzlt4WQFIfDPomvu4dq7tZ8mJKPTsrY3xwtong","-TBbRLWsP8wAlj8y5bh7RHRdwGJ7kT9urFvEbn1UomQ"]},{"name":"Content-Type","values":["application/json"]}]`
10+
2. `owner` [optional] - only contracts which were deployed by this owner will be listed
11+
3. `srcId` [optional] - only contracts which were deployed based on this source transaction will be listed
12+
4. `limit` [optional] - limits records to specific number
13+
5. `page` [optional] - lists contracts for specific page number
14+
15+
Examples:
16+
17+
`https://gw.warp.cc/gateway/contracts-by-tags?tags=[{"name":"Contract-Src","values":["2nFNFs9YWIfj2k3BV2IR3XkC_F4V4gZiRDj60HilZzU","L2k7QI2kg-aSwXg7owgzV9gqXoG0jjRsWJ9Nm4RImrE","WnxZnhLclP_4B1yZpGDVAgtNuJV2klzY-B_-Io0QMTg"]},{"name":"Content-Type","values":["application/json"]}]`
18+
19+
Response:
20+
21+
```json
22+
{
23+
"paging": {
24+
"total": 3,
25+
"limit": 100,
26+
"items": 3,
27+
"page": 1,
28+
"pages": 1
29+
},
30+
"contracts": [
31+
{
32+
"contract": "TZk31WrAGpjIUAWb8y6rU8FIAVRoEr7qcOz5uqsIda0",
33+
"srctxid": "2nFNFs9YWIfj2k3BV2IR3XkC_F4V4gZiRDj60HilZzU",
34+
"owner": "33F0QHcb22W7LwWR1iRC8Az1ntZG09XQ03YWuw2ABqA",
35+
"testnet": null,
36+
"contracttx": {
37+
"tags": [
38+
{
39+
"name": "App-Name",
40+
"value": "SmartWeaveContract"
41+
},
42+
{
43+
"name": "App-Version",
44+
"value": "0.3.0"
45+
},
46+
{
47+
"name": "Contract-Src",
48+
"value": "2nFNFs9YWIfj2k3BV2IR3XkC_F4V4gZiRDj60HilZzU"
49+
},
50+
{
51+
"name": "SDK",
52+
"value": "Warp"
53+
},
54+
{
55+
"name": "Nonce",
56+
"value": "1679856025700"
57+
},
58+
{
59+
"name": "Content-Type",
60+
"value": "application/json"
61+
},
62+
{
63+
"name": "Contract-Manifest",
64+
"value": "{\"evaluationOptions\":{\"useConstructor\":true}}"
65+
}
66+
]
67+
},
68+
"synctimestamp": null,
69+
"total": "3"
70+
},
71+
{
72+
"contract": "F6M_D4d3bdKreFv-Q1FxlgcRwVYb0yPXZzb1wvwCbB8",
73+
"srctxid": "WnxZnhLclP_4B1yZpGDVAgtNuJV2klzY-B_-Io0QMTg",
74+
"owner": "jnioZFibZSCcV8o-HkBXYPYEYNib4tqfexP0kCBXX_M",
75+
"testnet": null,
76+
"contracttx": {
77+
"tags": [
78+
{
79+
"name": "App-Name",
80+
"value": "SmartWeaveContract"
81+
},
82+
{
83+
"name": "App-Version",
84+
"value": "0.3.0"
85+
},
86+
{
87+
"name": "Contract-Src",
88+
"value": "WnxZnhLclP_4B1yZpGDVAgtNuJV2klzY-B_-Io0QMTg"
89+
},
90+
{
91+
"name": "SDK",
92+
"value": "Warp"
93+
},
94+
{
95+
"name": "Nonce",
96+
"value": "1699634605917"
97+
},
98+
{
99+
"name": "Content-Type",
100+
"value": "application/json"
101+
},
102+
{
103+
"name": "Contract-Manifest",
104+
"value": "{\"evaluationOptions\":{\"useKVStorage\":true}}"
105+
}
106+
]
107+
},
108+
"synctimestamp": "1699634606419",
109+
"total": "3"
110+
},
111+
{
112+
"contract": "n5hE54enkEAyzyEOP0tbolCTuT47piSa-tX5TvF4dCE",
113+
"srctxid": "L2k7QI2kg-aSwXg7owgzV9gqXoG0jjRsWJ9Nm4RImrE",
114+
"owner": "0xc84f421658dabC69Ee0440649f2f17b98D284CCC",
115+
"testnet": null,
116+
"contracttx": {
117+
"tags": [
118+
{
119+
"name": "App-Name",
120+
"value": "SmartWeaveContract"
121+
},
122+
{
123+
"name": "App-Version",
124+
"value": "0.3.0"
125+
},
126+
{
127+
"name": "Contract-Src",
128+
"value": "L2k7QI2kg-aSwXg7owgzV9gqXoG0jjRsWJ9Nm4RImrE"
129+
},
130+
{
131+
"name": "SDK",
132+
"value": "Warp"
133+
},
134+
{
135+
"name": "Nonce",
136+
"value": "1692188736414"
137+
},
138+
{
139+
"name": "Content-Type",
140+
"value": "application/json"
141+
}
142+
]
143+
},
144+
"synctimestamp": "1692188737275",
145+
"total": "3"
146+
}
147+
]
148+
}
149+
```

warp-academy-docs/sidebars/docsSidebar.js

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,25 +111,29 @@ const sidebars = {
111111
items: [
112112
{ type: 'doc', label: 'Introduction', id: 'syncer/introduction' },
113113
{ type: 'doc', label: 'Configuration', id: 'syncer/configuration' },
114-
{ type: 'category',
115-
label: 'Services',
114+
{
115+
type: 'category',
116+
label: 'Services',
116117
items: [
117118
{ type: 'doc', label: 'Syncer', id: 'syncer/services/syncer' },
118119
{ type: 'doc', label: 'Forwarder', id: 'syncer/services/forwarder' },
119120
{ type: 'doc', label: 'Contractor', id: 'syncer/services/contractor' },
120121
{ type: 'doc', label: 'Bundler', id: 'syncer/services/bundler' },
121122
{ type: 'doc', label: 'Checker', id: 'syncer/services/checker' },
122-
]},
123-
{ type: 'category',
124-
label: 'Internals',
123+
],
124+
},
125+
{
126+
type: 'category',
127+
label: 'Internals',
125128
items: [
126129
{ type: 'doc', label: 'Development', id: 'syncer/internals/development' },
127130
{ type: 'doc', label: 'Tasks', id: 'syncer/internals/tasks' },
128131
{ type: 'doc', label: 'Peer Handling', id: 'syncer/internals/peer-handling' },
129132
{ type: 'doc', label: 'Arweave API Client', id: 'syncer/internals/arweave-client' },
130133
{ type: 'doc', label: 'Bundlr API Client', id: 'syncer/internals/bundlr-client' },
131-
]},
132-
],
134+
],
135+
},
136+
],
133137
},
134138
{
135139
type: 'category',
@@ -215,6 +219,11 @@ const sidebars = {
215219
label: 'Creator',
216220
id: 'gateway/http/get/creator',
217221
},
222+
{
223+
type: 'doc',
224+
label: 'Contracts by tags',
225+
id: 'gateway/http/get/contracts-by-tags',
226+
},
218227
],
219228
},
220229
{

0 commit comments

Comments
 (0)