ethereum-hooks 1.0.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -117
- package/{client/src/crypto_hooks → crypto_hooks}/ens/useFetchAddressENSLookup.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/ens/useFetchENSAddressLookup.ts +3 -4
- package/{client/src/crypto_hooks → crypto_hooks}/ens/useFetchENSIDLookup.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/ens/useFetchENSNameLookup.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/erc20Tokens/useFetchERC20CollectionOwners.ts +3 -3
- package/{client/src/crypto_hooks → crypto_hooks}/erc20Tokens/useFetchERC20CollectionTopCoins.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/erc20Tokens/useFetchERC20CollectionTransfers.ts +3 -3
- package/{client/src/crypto_hooks → crypto_hooks}/erc20Tokens/useFetchERC20Holdings.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/erc20Tokens/useFetchERC20Transfers.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/erc721Tokens/useFetchERC721CollectionAttributes.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/erc721Tokens/useFetchERC721CollectionData.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/erc721Tokens/useFetchERC721CollectionExtraData.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/erc721Tokens/useFetchERC721CollectionFloorPrice.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/erc721Tokens/useFetchERC721CollectionMarketCap.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/erc721Tokens/useFetchERC721CollectionSales.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/erc721Tokens/useFetchERC721CollectionTransfers.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/erc721Tokens/useFetchERC721CollectionTrends.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/erc721Tokens/useFetchERC721CollectionVolume.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/erc721Tokens/useFetchERC721Holdings.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/erc721Tokens/useFetchERC721LookupData.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/erc721Tokens/useFetchERC721OpenseaData.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/erc721Tokens/useFetchERC721RarityData.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/erc721Tokens/useFetchERC721SalesData.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/erc721Tokens/useFetchERC721TransferLookupData.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/erc721Tokens/useFetchERC721TransfersData.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/gas/useFetchGasLookup.ts +2 -2
- package/crypto_hooks/index.ts +39 -0
- package/{client/src/crypto_hooks → crypto_hooks}/prices/useFetchERC20Price.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/prices/useFetchERC721Price.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/prices/useFetchETHPrice.ts +2 -2
- package/{client/src/crypto_hooks → crypto_hooks}/prices/useFetchLayerTwoPrice.ts +2 -2
- package/package.json +19 -21
- package/client/package.json +0 -25
- package/hook-server-design.png +0 -0
- package/hooksinformation.txt +0 -49
- package/server/Controller/ENS/AddressToENSController.ts +0 -30
- package/server/Controller/ENS/ENSIDController.ts +0 -32
- package/server/Controller/ENS/ENSNameController.ts +0 -32
- package/server/Controller/ENS/ENSToAddressController.ts +0 -32
- package/server/Controller/ERC20Tokens/ERC20CollectionOwnersController.ts +0 -29
- package/server/Controller/ERC20Tokens/ERC20CollectionTopCoinsController.ts +0 -27
- package/server/Controller/ERC20Tokens/ERC20CollectionTransfersController.ts +0 -29
- package/server/Controller/ERC20Tokens/ERC20HoldingsController.ts +0 -29
- package/server/Controller/ERC20Tokens/ERC20TransfersController.ts +0 -29
- package/server/Controller/ERC721Tokens/ERC721CollectionAttributesController.ts +0 -29
- package/server/Controller/ERC721Tokens/ERC721CollectionDataController.ts +0 -29
- package/server/Controller/ERC721Tokens/ERC721CollectionExtraDataController.ts +0 -29
- package/server/Controller/ERC721Tokens/ERC721CollectionFloorPriceController.ts +0 -18
- package/server/Controller/ERC721Tokens/ERC721CollectionMarketCapController.ts +0 -29
- package/server/Controller/ERC721Tokens/ERC721CollectionSalesController.ts +0 -29
- package/server/Controller/ERC721Tokens/ERC721CollectionTransfersController.ts +0 -29
- package/server/Controller/ERC721Tokens/ERC721CollectionTrendsController.ts +0 -28
- package/server/Controller/ERC721Tokens/ERC721CollectionVolumeController.ts +0 -28
- package/server/Controller/ERC721Tokens/ERC721HoldingsController.ts +0 -29
- package/server/Controller/ERC721Tokens/ERC721LookupDataController.ts +0 -28
- package/server/Controller/ERC721Tokens/ERC721OpenseaDataController.ts +0 -29
- package/server/Controller/ERC721Tokens/ERC721RarityDataController.ts +0 -29
- package/server/Controller/ERC721Tokens/ERC721SalesDataController.ts +0 -34
- package/server/Controller/ERC721Tokens/ERC721TransferLookupDataController.ts +0 -28
- package/server/Controller/ERC721Tokens/ERC721TransfersDataController.ts +0 -29
- package/server/Controller/Gas/GasLookupController.ts +0 -26
- package/server/Controller/Prices/ERC20PriceController.ts +0 -43
- package/server/Controller/Prices/ERC721PriceController.ts +0 -28
- package/server/Controller/Prices/ETHPriceController.ts +0 -42
- package/server/Controller/Prices/LayerTwoPriceController.ts +0 -41
- package/server/Routes/ENSRoutes/AddressToENSRoute.ts +0 -9
- package/server/Routes/ENSRoutes/ENSIDRoute.ts +0 -8
- package/server/Routes/ENSRoutes/ENSNameRoute.ts +0 -9
- package/server/Routes/ENSRoutes/ENSToAddressRoute.ts +0 -9
- package/server/Routes/ERC20TokensRoutes/ERC20CollectionOwnersRoute.ts +0 -9
- package/server/Routes/ERC20TokensRoutes/ERC20CollectionTopCoinsRoute.ts +0 -9
- package/server/Routes/ERC20TokensRoutes/ERC20CollectionTransfersRoute.ts +0 -9
- package/server/Routes/ERC20TokensRoutes/ERC20HoldingsRoute.ts +0 -9
- package/server/Routes/ERC20TokensRoutes/ERC20TransfersRoute.ts +0 -9
- package/server/Routes/ERC721TokensRoutes/ERC721CollectionAttributesRoute.ts +0 -9
- package/server/Routes/ERC721TokensRoutes/ERC721CollectionDataRoute.ts +0 -9
- package/server/Routes/ERC721TokensRoutes/ERC721CollectionExtraDataRoute.ts +0 -9
- package/server/Routes/ERC721TokensRoutes/ERC721CollectionFloorPriceRoute.ts +0 -9
- package/server/Routes/ERC721TokensRoutes/ERC721CollectionMarketCapRoute.ts +0 -9
- package/server/Routes/ERC721TokensRoutes/ERC721CollectionSalesRoute.ts +0 -9
- package/server/Routes/ERC721TokensRoutes/ERC721CollectionTransfersRoute.ts +0 -9
- package/server/Routes/ERC721TokensRoutes/ERC721CollectionTrendsRoute.ts +0 -9
- package/server/Routes/ERC721TokensRoutes/ERC721CollectionVolumeRoute.ts +0 -9
- package/server/Routes/ERC721TokensRoutes/ERC721HoldingsRoute.ts +0 -9
- package/server/Routes/ERC721TokensRoutes/ERC721LookupDataRoute.ts +0 -9
- package/server/Routes/ERC721TokensRoutes/ERC721OpenseaDataRoute.ts +0 -9
- package/server/Routes/ERC721TokensRoutes/ERC721RarityDataRoute.ts +0 -9
- package/server/Routes/ERC721TokensRoutes/ERC721SalesDataRoute.ts +0 -9
- package/server/Routes/ERC721TokensRoutes/ERC721TransferLookupDataRoute.ts +0 -9
- package/server/Routes/ERC721TokensRoutes/ERC721TransfersDataRoute.ts +0 -9
- package/server/Routes/GasRoutes/GasLookupRoute.ts +0 -9
- package/server/Routes/PriceRoutes/ERC20PriceRoute.ts +0 -9
- package/server/Routes/PriceRoutes/ERC721PriceRoute.ts +0 -9
- package/server/Routes/PriceRoutes/ETHPriceRoute.ts +0 -9
- package/server/Routes/PriceRoutes/LayerTwoPriceRoute.ts +0 -9
- package/server/package.json +0 -25
- package/server/server.ts +0 -96
- package/server/tsconfig.json +0 -109
- /package/{client/src/custom_hooks → custom_hooks}/useFetch.ts +0 -0
- /package/{client/src/types → types}/FetchStateType.ts +0 -0
- /package/{client/src/types → types}/LayerTwoType.ts +0 -0
package/README.md
CHANGED
|
@@ -14,75 +14,37 @@ The following resources were utilized when building these client hooks:
|
|
|
14
14
|
|
|
15
15
|
<br />
|
|
16
16
|
|
|
17
|
-
## React Hooks
|
|
18
|
-
|
|
17
|
+
## React Hooks
|
|
18
|
+
This package uses AWS Lambda functions to construct authenticated API calls. The architecture follows a simple flow: **Client Hook → useFetch → AWS Lambda → Response**.
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
The AWS Lambda functions handle authentication automatically using pre-configured API keys for various blockchain services:
|
|
21
|
+
- **OPENSEA_API_KEY** - For NFT marketplace data
|
|
22
|
+
- **MORALIS_API_KEY** - For Web3 data aggregation
|
|
23
|
+
- **BLK_API_KEY** - For Blocknative gas and mempool data
|
|
24
|
+
- **TRANSPOSE_API_KEY** - For indexed blockchain data
|
|
25
|
+
- **ALCHEMY_API_KEY** - For Ethereum node access and enhanced APIs
|
|
21
26
|
|
|
22
|
-
|
|
23
|
-
- <code>BLK_API_KEY</code>
|
|
24
|
-
- <code>CLIENT_URL</code>
|
|
25
|
-
- <code>COINGECKO_API_KEY</code>
|
|
26
|
-
- <code>MORALIS_API_KEY</code>
|
|
27
|
-
- <code>OPENSEA_API_KEY</code>
|
|
28
|
-
- <code>PORT</code>
|
|
29
|
-
- <code>TRANSPOSE_API_KEY</code>
|
|
30
|
-
|
|
31
|
-
The following diagram will help you understand the workflow:
|
|
32
|
-
|
|
33
|
-
<img src="https://genericbucket95.s3.us-east-2.amazonaws.com/hook-server-design.png" alt="Hook Server" width="600" height="400" />
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
<br />
|
|
37
|
-
|
|
38
|
-
## Server Setup
|
|
39
|
-
|
|
40
|
-
For this part, you will need to incorporate the server object exported from the <code>server.ts</code> file inside the server directory.
|
|
41
|
-
|
|
42
|
-
<b>You will need to build on top of this built-in server, any additional routes and configurations as this server contains all the routes needed to effectively use the client hooks. </b>
|
|
43
|
-
|
|
44
|
-
This is how you can incorporate the built-in server for additional add-ons and configuration in a custom server file of your own:
|
|
45
|
-
|
|
46
|
-
<code>customServer.ts</code>
|
|
47
|
-
|
|
48
|
-
```javascript
|
|
49
|
-
import { server } from 'server'; // Import the built-in server
|
|
50
|
-
|
|
51
|
-
// Environment variables, PORT, and CLIENT_URL will be used by this built-in server
|
|
52
|
-
// PORT specifies the port to activate the Node server
|
|
53
|
-
// CLIENT_URL specifies the URL that is CORS enabled
|
|
54
|
-
|
|
55
|
-
// Add any additional routes you may have on top of this server, etc.
|
|
56
|
-
server.use("", "/xxx-xxxx");
|
|
57
|
-
...
|
|
58
|
-
...
|
|
59
|
-
...
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
<br />
|
|
27
|
+
No backend setup or environment variables are required on your end.
|
|
65
28
|
|
|
66
29
|
## React Client Hooks
|
|
67
30
|
|
|
68
31
|
The hooks cover several areas of the Ethereum blockchain and can be used for Layer Two chains as well.
|
|
69
32
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
For local development, you will need to specify the <b>full localhost address (http://localhost:PORT/ENDPOINT)</b>.
|
|
33
|
+
Each hook automatically connects to its dedicated AWS Lambda endpoint - no manual URL configuration is needed.
|
|
73
34
|
|
|
74
35
|
Here is a quick example of how you can work with client hooks. The following is a code snippet for working with React.js:
|
|
75
36
|
|
|
76
37
|
<code>ENSToAddressPage.tsx</code>
|
|
77
38
|
```javascript
|
|
78
39
|
import React, { FC } from 'react';
|
|
79
|
-
import { useFetchENSAddressLookup } from '
|
|
40
|
+
import { useFetchENSAddressLookup } from 'ethereum-hooks';
|
|
41
|
+
|
|
42
|
+
// Incorporating the ENS to Address Client Hook.. using Vitalik Buterin's address
|
|
43
|
+
// No server setup required - connects directly to AWS Lambda
|
|
80
44
|
|
|
81
|
-
// Incorporating the ENS to Address Client Hook.. using Vitalik Buterin's address ;)
|
|
82
|
-
// Server URL + Endpoint
|
|
83
|
-
// Example uses local development
|
|
84
45
|
const ENSToAddressPage: FC = () => {
|
|
85
|
-
|
|
46
|
+
// Hook automatically connects to AWS Lambda - no server setup required
|
|
47
|
+
const addressInformation = useFetchENSAddressLookup('vitalik.eth');
|
|
86
48
|
|
|
87
49
|
// Each client hook uses the useFetch custom hook
|
|
88
50
|
// It returns three states: data, error, loading
|
|
@@ -119,193 +81,195 @@ export default ENSToAddressPage;
|
|
|
119
81
|
|
|
120
82
|
A list of chains supported is provided below in the <code>Types</code> section.
|
|
121
83
|
|
|
122
|
-
|
|
84
|
+
## AWS Lambda Endpoints
|
|
85
|
+
|
|
86
|
+
The following table shows the **30 different client hooks** and their corresponding **AWS Lambda endpoints**:
|
|
123
87
|
|
|
124
88
|
<table>
|
|
125
89
|
<tr>
|
|
126
90
|
<th>Category</th>
|
|
127
91
|
<th>Client Hook Name</th>
|
|
128
|
-
<th>Endpoint</th>
|
|
92
|
+
<th>AWS Lambda Endpoint</th>
|
|
129
93
|
<th>Description</th>
|
|
130
|
-
|
|
94
|
+
</tr>
|
|
131
95
|
<tr>
|
|
132
96
|
<td>ENS</td>
|
|
133
|
-
<td><code>useFetchAddressENSLookup(address: string
|
|
134
|
-
<td><code
|
|
97
|
+
<td><code>useFetchAddressENSLookup(address: string)</code></td>
|
|
98
|
+
<td><code>https://37zq2u4ntbygkw7inki3djjm440xctyd.lambda-url.us-east-1.on.aws/</code></td>
|
|
135
99
|
<td>Fetch the equivalent ENS name from a given address</td>
|
|
136
100
|
</tr>
|
|
137
101
|
<tr>
|
|
138
102
|
<td>ENS</td>
|
|
139
|
-
<td><code>useFetchENSAddressLookup(ensName: string
|
|
140
|
-
<td><code
|
|
103
|
+
<td><code>useFetchENSAddressLookup(ensName: string)</code></td>
|
|
104
|
+
<td><code>https://jy3upsy3rgbengcktqlqfcwyhy0wcamb.lambda-url.us-east-1.on.aws/</code></td>
|
|
141
105
|
<td>Fetch the equivalent ETH address from a given ENS name</td>
|
|
142
106
|
</tr>
|
|
143
107
|
<tr>
|
|
144
108
|
<td>ENS</td>
|
|
145
|
-
<td><code>useFetchENSIDLookup(id: string
|
|
146
|
-
<td><code
|
|
109
|
+
<td><code>useFetchENSIDLookup(id: string)</code></td>
|
|
110
|
+
<td><code>https://ev6i3gsesgdvj7ouxiwpg4qafu0nfvdw.lambda-url.us-east-1.on.aws/</code></td>
|
|
147
111
|
<td>Fetch information of a given ENS ID</td>
|
|
148
112
|
</tr>
|
|
149
113
|
<tr>
|
|
150
114
|
<td>ENS</td>
|
|
151
|
-
<td><code>useFetchENSNameLookup(ensName: string
|
|
152
|
-
<td><code
|
|
115
|
+
<td><code>useFetchENSNameLookup(ensName: string)</code></td>
|
|
116
|
+
<td><code>https://f53actwgpl2a3rk6uynoryuoxq0eifuo.lambda-url.us-east-1.on.aws/</code></td>
|
|
153
117
|
<td>Fetch information of a given ENS name</td>
|
|
154
118
|
</tr>
|
|
155
119
|
<tr>
|
|
156
120
|
<td>ERC20</td>
|
|
157
|
-
<td><code>useFetchERC20CollectionOwners(contractAddress: string
|
|
158
|
-
<td><code
|
|
121
|
+
<td><code>useFetchERC20CollectionOwners(contractAddress: string)</code></td>
|
|
122
|
+
<td><code>https://hyrbuxy6aivjqjrgtogd3nx5we0gcxjr.lambda-url.us-east-1.on.aws/</code></td>
|
|
159
123
|
<td>Fetch list of owners of a particular ERC20 collection</td>
|
|
160
124
|
</tr>
|
|
161
125
|
<tr>
|
|
162
126
|
<td>ERC20</td>
|
|
163
|
-
<td><code>useFetchERC20CollectionTopCoins(
|
|
164
|
-
<td><code
|
|
127
|
+
<td><code>useFetchERC20CollectionTopCoins()</code></td>
|
|
128
|
+
<td><code>https://2ebpropr2dgzqicposkbrvr5nq0ofyyx.lambda-url.us-east-1.on.aws/</code></td>
|
|
165
129
|
<td>Fetch list of the top ERC20 collections</td>
|
|
166
130
|
</tr>
|
|
167
131
|
<tr>
|
|
168
132
|
<td>ERC20</td>
|
|
169
|
-
<td><code>useFetchERC20CollectionTransfers(contractAddress: string
|
|
170
|
-
<td><code
|
|
133
|
+
<td><code>useFetchERC20CollectionTransfers(contractAddress: string)</code></td>
|
|
134
|
+
<td><code>https://bwqre7ze2vm3sum5avrvwzwbrm0gyxcy.lambda-url.us-east-1.on.aws/</code></td>
|
|
171
135
|
<td>Fetch transfer activity of a particular ERC20 collection</td>
|
|
172
136
|
</tr>
|
|
173
137
|
<tr>
|
|
174
138
|
<td>ERC20</td>
|
|
175
|
-
<td><code>useFetchERC20Holdings(contractAddress: string
|
|
176
|
-
<td><code
|
|
139
|
+
<td><code>useFetchERC20Holdings(contractAddress: string)</code></td>
|
|
140
|
+
<td><code>https://2i2neqclwlgygwimhbzlhdtjwa0dupee.lambda-url.us-east-1.on.aws/</code></td>
|
|
177
141
|
<td>Track wallet holdings of a particular ERC20 token activity</td>
|
|
178
142
|
</tr>
|
|
179
143
|
<tr>
|
|
180
144
|
<td>ERC20</td>
|
|
181
|
-
<td><code>useFetchERC20Transfers(contractAddress: string
|
|
182
|
-
<td><code
|
|
145
|
+
<td><code>useFetchERC20Transfers(contractAddress: string)</code></td>
|
|
146
|
+
<td><code>https://msee4ccresifmjhm3mdedry3ki0xvdgx.lambda-url.us-east-1.on.aws/</code></td>
|
|
183
147
|
<td>Track the transfer activity of a particular ERC20 token in a wallet</td>
|
|
184
148
|
</tr>
|
|
185
149
|
<tr>
|
|
186
150
|
<td>ERC721</td>
|
|
187
|
-
<td><code>useFetchERC721CollectionAttributes(contractAddress: string
|
|
188
|
-
<td><code
|
|
151
|
+
<td><code>useFetchERC721CollectionAttributes(contractAddress: string)</code></td>
|
|
152
|
+
<td><code>https://7rs4acgso6ld44zjpl25jras3q0szvag.lambda-url.us-east-1.on.aws/</code></td>
|
|
189
153
|
<td>Fetch attributes of a particular ERC721 collection</td>
|
|
190
154
|
</tr>
|
|
191
155
|
<tr>
|
|
192
156
|
<td>ERC721</td>
|
|
193
|
-
<td><code>useFetchERC721CollectionData(contractAddress: string
|
|
194
|
-
<td><code
|
|
157
|
+
<td><code>useFetchERC721CollectionData(contractAddress: string)</code></td>
|
|
158
|
+
<td><code>https://u2pdhfz4qbfkkyp6z4yg4n57hq0hzica.lambda-url.us-east-1.on.aws/</code></td>
|
|
195
159
|
<td>Fetch data of a particular ERC721 collection</td>
|
|
196
160
|
</tr>
|
|
197
161
|
<tr>
|
|
198
162
|
<td>ERC721</td>
|
|
199
|
-
<td><code>useFetchERC721CollectionExtraData(contractAddress: string
|
|
200
|
-
<td><code
|
|
163
|
+
<td><code>useFetchERC721CollectionExtraData(contractAddress: string)</code></td>
|
|
164
|
+
<td><code>https://b5mkshxv54bbj4d54rxze5cj6q0xhptc.lambda-url.us-east-1.on.aws/</code></td>
|
|
201
165
|
<td>Fetch extra data of a particular ERC721 collection</td>
|
|
202
166
|
</tr>
|
|
203
167
|
<tr>
|
|
204
168
|
<td>ERC721</td>
|
|
205
|
-
<td><code>useFetchERC721CollectionFloorPrice(contractAddress: string
|
|
206
|
-
<td><code
|
|
169
|
+
<td><code>useFetchERC721CollectionFloorPrice(contractAddress: string)</code></td>
|
|
170
|
+
<td><code>https://343rc276twphsdjwtzrzjytepu0xdxxn.lambda-url.us-east-1.on.aws/</code></td>
|
|
207
171
|
<td>Fetch floor price data of a particular ERC721 collection</td>
|
|
208
172
|
</tr>
|
|
209
173
|
<tr>
|
|
210
174
|
<td>ERC721</td>
|
|
211
|
-
<td><code>useFetchERC721CollectionMarketCap(contractAddress: string, duration: 2 | 14 | 30
|
|
212
|
-
<td><code
|
|
175
|
+
<td><code>useFetchERC721CollectionMarketCap(contractAddress: string, duration: 2 | 14 | 30)</code></td>
|
|
176
|
+
<td><code>https://o5ntejtug7ixeetoqf5uxjpwgq0mbtvt.lambda-url.us-east-1.on.aws/</code></td>
|
|
213
177
|
<td>Fetch market cap data of a particular ERC721 collection</td>
|
|
214
178
|
</tr>
|
|
215
179
|
<tr>
|
|
216
180
|
<td>ERC721</td>
|
|
217
|
-
<td><code>useFetchERC721CollectionSales(contractAddress: string
|
|
218
|
-
<td><code
|
|
181
|
+
<td><code>useFetchERC721CollectionSales(contractAddress: string)</code></td>
|
|
182
|
+
<td><code>https://b5xcn2afinyiq32izaoxe4mzua0ggxvm.lambda-url.us-east-1.on.aws/</code></td>
|
|
219
183
|
<td>Fetch sales data of a particular ERC721 collection</td>
|
|
220
184
|
</tr>
|
|
221
185
|
<tr>
|
|
222
186
|
<td>ERC721</td>
|
|
223
|
-
<td><code>useFetchERC721CollectionTransfers(contractAddress: string
|
|
224
|
-
<td><code
|
|
187
|
+
<td><code>useFetchERC721CollectionTransfers(contractAddress: string)</code></td>
|
|
188
|
+
<td><code>https://lrtnsabh6hkimp4hqonw3foi2e0zzuxq.lambda-url.us-east-1.on.aws/</code></td>
|
|
225
189
|
<td>Fetch transfer activity of a particular ERC721 collection</td>
|
|
226
190
|
</tr>
|
|
227
191
|
<tr>
|
|
228
192
|
<td>ERC721</td>
|
|
229
|
-
<td><code>useFetchERC721CollectionTrends(
|
|
230
|
-
<td><code
|
|
193
|
+
<td><code>useFetchERC721CollectionTrends()</code></td>
|
|
194
|
+
<td><code>https://hmzkjpwut4bwaeovhryd6hie540fwvzi.lambda-url.us-east-1.on.aws/</code></td>
|
|
231
195
|
<td>Fetch trending ERC721 collection data</td>
|
|
232
196
|
</tr>
|
|
233
197
|
<tr>
|
|
234
198
|
<td>ERC721</td>
|
|
235
|
-
<td><code>useFetchERC721CollectionVolume(
|
|
236
|
-
<td><code
|
|
199
|
+
<td><code>useFetchERC721CollectionVolume()</code></td>
|
|
200
|
+
<td><code>https://zlksxwjaikudsub4rmcc5c4eme0uqntg.lambda-url.us-east-1.on.aws/</code></td>
|
|
237
201
|
<td>Fetch ERC721 collections by volume data</td>
|
|
238
202
|
</tr>
|
|
239
203
|
<tr>
|
|
240
204
|
<td>ERC721</td>
|
|
241
|
-
<td><code>useFetchERC721Holdings(walletAddress: string
|
|
242
|
-
<td><code
|
|
205
|
+
<td><code>useFetchERC721Holdings(walletAddress: string)</code></td>
|
|
206
|
+
<td><code>https://rmepnjzubrgdsvmb66kdwz5upm0khfor.lambda-url.us-east-1.on.aws/</code></td>
|
|
243
207
|
<td>Fetch ERC721 holdings of a particular wallet</td>
|
|
244
208
|
</tr>
|
|
245
209
|
<tr>
|
|
246
210
|
<td>ERC721</td>
|
|
247
|
-
<td><code>useFetchERC721LookupData(contractAddress: string, tokenID: string
|
|
248
|
-
<td><code
|
|
211
|
+
<td><code>useFetchERC721LookupData(contractAddress: string, tokenID: string)</code></td>
|
|
212
|
+
<td><code>https://rd7cae6wlnx3lsiuncgjgeap5e0lkbew.lambda-url.us-east-1.on.aws/</code></td>
|
|
249
213
|
<td>Fetch data of a particular ERC721 token</td>
|
|
250
214
|
</tr>
|
|
251
215
|
<tr>
|
|
252
216
|
<td>ERC721</td>
|
|
253
|
-
<td><code>useFetchERC721OpenseaData(contractAddress: string, tokenID: string
|
|
254
|
-
<td><code
|
|
217
|
+
<td><code>useFetchERC721OpenseaData(contractAddress: string, tokenID: string)</code></td>
|
|
218
|
+
<td><code>https://qoeq2n767jbu5gbiiy7463d56m0cwdec.lambda-url.us-east-1.on.aws/</code></td>
|
|
255
219
|
<td>Fetch Opensea data of a particular ERC721 token</td>
|
|
256
220
|
</tr>
|
|
257
221
|
<tr>
|
|
258
222
|
<td>ERC721</td>
|
|
259
|
-
<td><code>useFetchERC721RarityData(contractAddress: string, tokenID: string
|
|
260
|
-
<td><code
|
|
223
|
+
<td><code>useFetchERC721RarityData(contractAddress: string, tokenID: string)</code></td>
|
|
224
|
+
<td><code>https://eilobcax7r4wayov2rfscraqb40rodzv.lambda-url.us-east-1.on.aws/</code></td>
|
|
261
225
|
<td>Fetch rarity data of a particular ERC721 token</td>
|
|
262
226
|
</tr>
|
|
263
227
|
<tr>
|
|
264
228
|
<td>ERC721</td>
|
|
265
|
-
<td><code>useFetchERC721SalesData(contractAddress: string, tokenID: string
|
|
266
|
-
<td><code
|
|
229
|
+
<td><code>useFetchERC721SalesData(contractAddress: string, tokenID: string)</code></td>
|
|
230
|
+
<td><code>https://nhjz6tqihl6bdt7zukf5ru7wnu0ydoqq.lambda-url.us-east-1.on.aws/</code></td>
|
|
267
231
|
<td>Fetch sales data of a particular ERC721 token</td>
|
|
268
232
|
</tr>
|
|
269
233
|
<tr>
|
|
270
234
|
<td>ERC721</td>
|
|
271
|
-
<td><code>useFetchERC721TransferLookupData(contractAddress: string, tokenID: string
|
|
272
|
-
<td><code
|
|
235
|
+
<td><code>useFetchERC721TransferLookupData(contractAddress: string, tokenID: string)</code></td>
|
|
236
|
+
<td><code>https://o66cbw3kaufg5t3k2fl5ydazbq0tvfaz.lambda-url.us-east-1.on.aws/</code></td>
|
|
273
237
|
<td>Fetch transfer data of a particular ERC721 token</td>
|
|
274
238
|
</tr>
|
|
275
239
|
<tr>
|
|
276
240
|
<td>ERC721</td>
|
|
277
|
-
<td><code>useFetchERC721TransfersData(walletAddress: string
|
|
278
|
-
<td><code
|
|
241
|
+
<td><code>useFetchERC721TransfersData(walletAddress: string)</code></td>
|
|
242
|
+
<td><code>https://gnfeczsyzj4v6rsyf4zmlpv23q0uixkv.lambda-url.us-east-1.on.aws/</code></td>
|
|
279
243
|
<td>Fetch ERC721 transfer activity of a particular wallet</td>
|
|
280
244
|
</tr>
|
|
281
245
|
<tr>
|
|
282
246
|
<td>Gas</td>
|
|
283
|
-
<td><code>useFetchGasLookup(
|
|
284
|
-
<td><code
|
|
247
|
+
<td><code>useFetchGasLookup()</code></td>
|
|
248
|
+
<td><code>https://wsebjfjyi4k2kfb4mbcrcjyrqa0nwifh.lambda-url.us-east-1.on.aws/</code></td>
|
|
285
249
|
<td>Fetch gas information related to Ethereum or a supported layer two</td>
|
|
286
250
|
</tr>
|
|
287
251
|
<tr>
|
|
288
252
|
<td>Prices</td>
|
|
289
|
-
<td><code>useFetchERC20Price(contractAddress: string, currentPrice: boolean, duration: 2 | 14 | 30
|
|
290
|
-
<td><code
|
|
253
|
+
<td><code>useFetchERC20Price(contractAddress: string, currentPrice: boolean, duration: 2 | 14 | 30)</code></td>
|
|
254
|
+
<td><code>https://vw5caqjd3yg2oyslxcyxkln2dy0nqgxz.lambda-url.us-east-1.on.aws/</code></td>
|
|
291
255
|
<td>Fetch pricing data of a particular ERC20 collection</td>
|
|
292
256
|
</tr>
|
|
293
257
|
<tr>
|
|
294
258
|
<td>Prices</td>
|
|
295
|
-
<td><code>useFetchERC721Price(contractAddress: string, tokenID: string
|
|
296
|
-
<td><code
|
|
259
|
+
<td><code>useFetchERC721Price(contractAddress: string, tokenID: string)</code></td>
|
|
260
|
+
<td><code>https://brjvjnlp35ln3solbquo6fiize0bnwje.lambda-url.us-east-1.on.aws/</code></td>
|
|
297
261
|
<td>Fetch pricing data of a particular ERC721 collection</td>
|
|
298
262
|
</tr>
|
|
299
263
|
<tr>
|
|
300
264
|
<td>Prices</td>
|
|
301
|
-
<td><code>useFetchETHPrice(currentPrice: boolean, duration: 2 | 14 | 30
|
|
302
|
-
<td><code
|
|
265
|
+
<td><code>useFetchETHPrice(currentPrice: boolean, duration: 2 | 14 | 30)</code></td>
|
|
266
|
+
<td><code>https://fl5mxvcm42g3n7wtodnxq52s2a0jeokj.lambda-url.us-east-1.on.aws/</code></td>
|
|
303
267
|
<td>Fetch Ethereum price data</td>
|
|
304
268
|
</tr>
|
|
305
269
|
<tr>
|
|
306
270
|
<td>Prices</td>
|
|
307
|
-
<td><code>useFetchLayerTwoPrice(layerTwo: LayerTwoNetworks, currentPrice: boolean, duration: 2 | 14 | 30
|
|
308
|
-
<td><code
|
|
271
|
+
<td><code>useFetchLayerTwoPrice(layerTwo: LayerTwoNetworks, currentPrice: boolean, duration: 2 | 14 | 30)</code></td>
|
|
272
|
+
<td><code>https://jt7ds5ua6iix7cpa5ueg2ud2gi0joklo.lambda-url.us-east-1.on.aws/</code></td>
|
|
309
273
|
<td>Fetch Layer Two price data</td>
|
|
310
274
|
</tr>
|
|
311
275
|
</table>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFetch } from "../../custom_hooks/useFetch";
|
|
2
2
|
|
|
3
3
|
// Fetching Address to ENS Custom hook
|
|
4
|
-
export const useFetchAddressENSLookup = (address: string
|
|
4
|
+
export const useFetchAddressENSLookup = (address: string) => {
|
|
5
5
|
const options = {
|
|
6
6
|
method: 'POST',
|
|
7
7
|
body: JSON.stringify({ address }),
|
|
@@ -11,7 +11,7 @@ export const useFetchAddressENSLookup = (address: string, serverURL: string) =>
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
// ENDPOINT - /address-to-ens-information
|
|
14
|
-
const state = useFetch(
|
|
14
|
+
const state = useFetch("https://37zq2u4ntbygkw7inki3djjm440xctyd.lambda-url.us-east-1.on.aws/", options); // Use the custom hook to fetch data
|
|
15
15
|
|
|
16
16
|
return state; // Return the state from the custom hook
|
|
17
17
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import axios from "axios";
|
|
2
1
|
import { useFetch } from "../../custom_hooks/useFetch";
|
|
3
2
|
|
|
4
3
|
// Fetching ENS to Address Custom hook
|
|
5
|
-
export const useFetchENSAddressLookup = (ensName: string
|
|
4
|
+
export const useFetchENSAddressLookup = (ensName: string) => {
|
|
6
5
|
const options = {
|
|
7
6
|
method: 'POST',
|
|
8
7
|
body: JSON.stringify({ ensName }),
|
|
@@ -11,8 +10,8 @@ export const useFetchENSAddressLookup = (ensName: string, serverURL: string) =>
|
|
|
11
10
|
}
|
|
12
11
|
};
|
|
13
12
|
|
|
14
|
-
// ENDPOINT - /
|
|
15
|
-
const state = useFetch(
|
|
13
|
+
// ENDPOINT - /ens-to-address-information
|
|
14
|
+
const state = useFetch("https://jy3upsy3rgbengcktqlqfcwyhy0wcamb.lambda-url.us-east-1.on.aws/", options); // Use the custom hook to fetch data
|
|
16
15
|
|
|
17
16
|
return state; // Return the state from the custom hook
|
|
18
17
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFetch } from "../../custom_hooks/useFetch";
|
|
2
2
|
|
|
3
3
|
// Fetch ENS ID lookups
|
|
4
|
-
export const useFetchENSIDLookup = (id: string
|
|
4
|
+
export const useFetchENSIDLookup = (id: string) => {
|
|
5
5
|
const options = {
|
|
6
6
|
method: 'POST',
|
|
7
7
|
body: JSON.stringify({ id }),
|
|
@@ -11,7 +11,7 @@ export const useFetchENSIDLookup = (id: string, serverURL: string) => {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
// ENDPOINT - /ens-transfers-by-id
|
|
14
|
-
const state = useFetch(
|
|
14
|
+
const state = useFetch("https://ev6i3gsesgdvj7ouxiwpg4qafu0nfvdw.lambda-url.us-east-1.on.aws/", options); // Use the custom hook to fetch data
|
|
15
15
|
|
|
16
16
|
return state; // Return the state from the custom hook
|
|
17
17
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFetch } from "../../custom_hooks/useFetch";
|
|
2
2
|
|
|
3
3
|
// Fetch ENS Name lookups
|
|
4
|
-
export const useFetchENSNameLookup = (ensName: string
|
|
4
|
+
export const useFetchENSNameLookup = (ensName: string) => {
|
|
5
5
|
|
|
6
6
|
const options = {
|
|
7
7
|
method: 'POST',
|
|
@@ -12,7 +12,7 @@ export const useFetchENSNameLookup = (ensName: string, serverURL: string) => {
|
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
// ENDPOINT - /ens-transfers-by-name
|
|
15
|
-
const state = useFetch(
|
|
15
|
+
const state = useFetch("https://f53actwgpl2a3rk6uynoryuoxq0eifuo.lambda-url.us-east-1.on.aws/", options); // Use the custom hook to fetch data
|
|
16
16
|
|
|
17
17
|
return state; // Return the state from the custom hook
|
|
18
18
|
}
|
package/{client/src/crypto_hooks → crypto_hooks}/erc20Tokens/useFetchERC20CollectionOwners.ts
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFetch } from "../../custom_hooks/useFetch";
|
|
2
2
|
|
|
3
|
-
// Fetching ERC20
|
|
4
|
-
export const useFetchERC20CollectionOwners = async (contractAddress: string
|
|
3
|
+
// Fetching ERC20 Collection Owners Hook
|
|
4
|
+
export const useFetchERC20CollectionOwners = async (contractAddress: string) => {
|
|
5
5
|
|
|
6
6
|
// Set options for request
|
|
7
7
|
let options = {
|
|
@@ -14,7 +14,7 @@ export const useFetchERC20CollectionOwners = async (contractAddress: string, ser
|
|
|
14
14
|
|
|
15
15
|
// Use the custom hook to fetch data
|
|
16
16
|
// ENDPOINT - /erc20-collection-owners
|
|
17
|
-
const state = useFetch(
|
|
17
|
+
const state = useFetch("https://hyrbuxy6aivjqjrgtogd3nx5we0gcxjr.lambda-url.us-east-1.on.aws/", options);
|
|
18
18
|
|
|
19
19
|
// Return the state from the custom hook
|
|
20
20
|
return state;
|
package/{client/src/crypto_hooks → crypto_hooks}/erc20Tokens/useFetchERC20CollectionTopCoins.ts
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFetch } from "../../custom_hooks/useFetch";
|
|
2
2
|
|
|
3
3
|
// Fetching ERC20 Collection Top Coins
|
|
4
|
-
export const useFetchERC20CollectionTopCoins = async (
|
|
4
|
+
export const useFetchERC20CollectionTopCoins = async () => {
|
|
5
5
|
|
|
6
6
|
// Set options for request
|
|
7
7
|
let options = {
|
|
@@ -13,7 +13,7 @@ export const useFetchERC20CollectionTopCoins = async (serverURL: string) => {
|
|
|
13
13
|
|
|
14
14
|
// Use the custom hook to fetch data
|
|
15
15
|
// ENDPOINT - /erc20-top-coins
|
|
16
|
-
const state = useFetch(
|
|
16
|
+
const state = useFetch("https://2ebpropr2dgzqicposkbrvr5nq0ofyyx.lambda-url.us-east-1.on.aws/", options);
|
|
17
17
|
|
|
18
18
|
// Return the state from the custom hook
|
|
19
19
|
return state;
|
package/{client/src/crypto_hooks → crypto_hooks}/erc20Tokens/useFetchERC20CollectionTransfers.ts
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFetch } from "../../custom_hooks/useFetch";
|
|
2
2
|
|
|
3
3
|
// Fetching ERC20 Collection Transfers
|
|
4
|
-
export const useFetchERC20CollectionTransfers = async (contractAddress: string
|
|
4
|
+
export const useFetchERC20CollectionTransfers = async (contractAddress: string) => {
|
|
5
5
|
|
|
6
6
|
// Set options for request
|
|
7
7
|
let options = {
|
|
@@ -13,8 +13,8 @@ export const useFetchERC20CollectionTransfers = async (contractAddress: string,
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
// Use the custom hook to fetch data
|
|
16
|
-
// ENDPOINT - /erc20-
|
|
17
|
-
const state = useFetch(
|
|
16
|
+
// ENDPOINT - /erc20-collection-transfers
|
|
17
|
+
const state = useFetch("https://bwqre7ze2vm3sum5avrvwzwbrm0gyxcy.lambda-url.us-east-1.on.aws/", options);
|
|
18
18
|
|
|
19
19
|
// Return the state from the custom hook
|
|
20
20
|
return state;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFetch } from "../../custom_hooks/useFetch";
|
|
2
2
|
|
|
3
3
|
// Fetching ERC20 Collection Holdings
|
|
4
|
-
export const useFetchERC20Holdings = async (contractAddress: string
|
|
4
|
+
export const useFetchERC20Holdings = async (contractAddress: string) => {
|
|
5
5
|
|
|
6
6
|
// Set options for request
|
|
7
7
|
let options = {
|
|
@@ -14,7 +14,7 @@ export const useFetchERC20Holdings = async (contractAddress: string, serverURL:
|
|
|
14
14
|
|
|
15
15
|
// Use the custom hook to fetch data
|
|
16
16
|
// ENDPOINT - /erc20-collection-holdings
|
|
17
|
-
const state = useFetch(
|
|
17
|
+
const state = useFetch("https://2i2neqclwlgygwimhbzlhdtjwa0dupee.lambda-url.us-east-1.on.aws/", options);
|
|
18
18
|
|
|
19
19
|
// Return the state from the custom hook
|
|
20
20
|
return state;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFetch } from "../../custom_hooks/useFetch";
|
|
2
2
|
|
|
3
3
|
// Fetching ERC20 Collection Transfers
|
|
4
|
-
export const useFetchERC20Transfers = async (contractAddress: string
|
|
4
|
+
export const useFetchERC20Transfers = async (contractAddress: string) => {
|
|
5
5
|
|
|
6
6
|
// Set options for request
|
|
7
7
|
let options = {
|
|
@@ -14,7 +14,7 @@ export const useFetchERC20Transfers = async (contractAddress: string, serverURL:
|
|
|
14
14
|
|
|
15
15
|
// Use the custom hook to fetch data
|
|
16
16
|
// ENDPOINT - /erc20-collection-transfers
|
|
17
|
-
const state = useFetch(
|
|
17
|
+
const state = useFetch("https://msee4ccresifmjhm3mdedry3ki0xvdgx.lambda-url.us-east-1.on.aws/", options);
|
|
18
18
|
|
|
19
19
|
// Return the state from the custom hook
|
|
20
20
|
return state;
|
package/{client/src/crypto_hooks → crypto_hooks}/erc721Tokens/useFetchERC721CollectionAttributes.ts
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFetch } from "../../custom_hooks/useFetch";
|
|
2
2
|
|
|
3
3
|
// Fetching ERC721 Collection Attributes Hook
|
|
4
|
-
export const useFetchERC721CollectionAttributes = async (contractAddress: string
|
|
4
|
+
export const useFetchERC721CollectionAttributes = async (contractAddress: string) => {
|
|
5
5
|
|
|
6
6
|
// Set options for request
|
|
7
7
|
let options = {
|
|
@@ -14,7 +14,7 @@ export const useFetchERC721CollectionAttributes = async (contractAddress: string
|
|
|
14
14
|
|
|
15
15
|
// Use the custom hook to fetch data
|
|
16
16
|
// ENDPOINT - /erc721-collection-attributes
|
|
17
|
-
const state = useFetch(
|
|
17
|
+
const state = useFetch("https://7rs4acgso6ld44zjpl25jras3q0szvag.lambda-url.us-east-1.on.aws/", options);
|
|
18
18
|
|
|
19
19
|
// Return the state from the custom hook
|
|
20
20
|
return state;
|
package/{client/src/crypto_hooks → crypto_hooks}/erc721Tokens/useFetchERC721CollectionData.ts
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFetch } from "../../custom_hooks/useFetch";
|
|
2
2
|
|
|
3
3
|
// Fetching ERC721 Collection Data Hook
|
|
4
|
-
export const useFetchERC721CollectionData = async (contractAddress: string
|
|
4
|
+
export const useFetchERC721CollectionData = async (contractAddress: string) => {
|
|
5
5
|
|
|
6
6
|
// Set options for request
|
|
7
7
|
let options = {
|
|
@@ -14,7 +14,7 @@ export const useFetchERC721CollectionData = async (contractAddress: string, serv
|
|
|
14
14
|
|
|
15
15
|
// Use the custom hook to fetch data
|
|
16
16
|
// ENDPOINT - /erc721-collection-data
|
|
17
|
-
const state = useFetch(
|
|
17
|
+
const state = useFetch("https://u2pdhfz4qbfkkyp6z4yg4n57hq0hzica.lambda-url.us-east-1.on.aws/", options);
|
|
18
18
|
|
|
19
19
|
// Return the state from the custom hook
|
|
20
20
|
return state;
|
package/{client/src/crypto_hooks → crypto_hooks}/erc721Tokens/useFetchERC721CollectionExtraData.ts
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFetch } from "../../custom_hooks/useFetch";
|
|
2
2
|
|
|
3
3
|
// Fetching ERC721 Collection Data Hook
|
|
4
|
-
export const useFetchERC721CollectionExtraData = async (contractAddress: string
|
|
4
|
+
export const useFetchERC721CollectionExtraData = async (contractAddress: string) => {
|
|
5
5
|
|
|
6
6
|
// Set options for request
|
|
7
7
|
let options = {
|
|
@@ -14,7 +14,7 @@ export const useFetchERC721CollectionExtraData = async (contractAddress: string,
|
|
|
14
14
|
|
|
15
15
|
// Use the custom hook to fetch data
|
|
16
16
|
// ENDPOINT - erc721-collection-extra-data
|
|
17
|
-
const state = useFetch(
|
|
17
|
+
const state = useFetch("https://b5mkshxv54bbj4d54rxze5cj6q0xhptc.lambda-url.us-east-1.on.aws/", options);
|
|
18
18
|
|
|
19
19
|
// Return the state from the custom hook
|
|
20
20
|
return state;
|
package/{client/src/crypto_hooks → crypto_hooks}/erc721Tokens/useFetchERC721CollectionFloorPrice.ts
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFetch } from "../../custom_hooks/useFetch";
|
|
2
2
|
|
|
3
3
|
// Fetching ERC721 Collection Floor Price Hook
|
|
4
|
-
export const useFetchERC721CollectionFloorPrice = async (contractAddress: string
|
|
4
|
+
export const useFetchERC721CollectionFloorPrice = async (contractAddress: string) => {
|
|
5
5
|
|
|
6
6
|
// Set options for request
|
|
7
7
|
let options = {
|
|
@@ -14,7 +14,7 @@ export const useFetchERC721CollectionFloorPrice = async (contractAddress: string
|
|
|
14
14
|
|
|
15
15
|
// Use the custom hook to fetch data
|
|
16
16
|
// ENDPOINT - /erc721-collection-floor-price
|
|
17
|
-
const state = useFetch(
|
|
17
|
+
const state = useFetch("https://343rc276twphsdjwtzrzjytepu0xdxxn.lambda-url.us-east-1.on.aws/", options);
|
|
18
18
|
|
|
19
19
|
// Return the state from the custom hook
|
|
20
20
|
return state;
|
package/{client/src/crypto_hooks → crypto_hooks}/erc721Tokens/useFetchERC721CollectionMarketCap.ts
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useFetch } from "../../custom_hooks/useFetch";
|
|
2
2
|
|
|
3
3
|
// Fetching ERC721 Collection Market Cap Hook
|
|
4
|
-
export const useFetchERC721CollectionMarketCap = async (contractAddress: string, duration: 2 | 14 | 30
|
|
4
|
+
export const useFetchERC721CollectionMarketCap = async (contractAddress: string, duration: 2 | 14 | 30) => {
|
|
5
5
|
|
|
6
6
|
// Set options for request
|
|
7
7
|
let options = {
|
|
@@ -14,7 +14,7 @@ export const useFetchERC721CollectionMarketCap = async (contractAddress: string,
|
|
|
14
14
|
|
|
15
15
|
// Use the custom hook to fetch data
|
|
16
16
|
// ENDPOINT - /erc721-collection-market-cap
|
|
17
|
-
const state = useFetch(
|
|
17
|
+
const state = useFetch("https://o5ntejtug7ixeetoqf5uxjpwgq0mbtvt.lambda-url.us-east-1.on.aws/", options);
|
|
18
18
|
|
|
19
19
|
// Return the state from the custom hook
|
|
20
20
|
return state;
|