@@ -687,6 +687,39 @@ const abi = await web3data.contract.getAbi('0x06012c8cf97bead5deae237070f9587f8e
687687
688688
689689
690+ #### getSourceCode(hash)
691+
692+
693+ Retrieves the contract's source code.
694+
695+
696+
697+
698+ ##### Parameters
699+
700+ | Name | Type | Description | |
701+ | ---- | ---- | ----------- | -------- |
702+ | hash | | The contract address. |   ; |
703+
704+
705+
706+
707+ ##### Examples
708+
709+ ``` javascript
710+ const source = await web3data .contract .getSourceCode (' 0x06012c8cf97bead5deae237070f9587f8e7a266d' )
711+ ```
712+
713+
714+ ##### Returns
715+
716+
717+ - The source of the contract.
718+
719+
720+
721+
722+
690723### src/market.js
691724
692725
@@ -1136,15 +1169,27 @@ const batTokenAddress = web3data.market.getAssetAddresses('bat') const assetAddr
11361169
11371170
11381171
1139- ### src/utils .js
1172+ ### src/web3data .js
11401173
11411174
11421175
1143- #### get(web3data, subendpoint, endpoint, hash, pathParam, filterOptions)
1176+ #### Class: Web3DataFactory
11441177
11451178
1146- Builds the endpoint url to pass to .rawQuery(). Checks for non empties and appends
1147- the appropriate parameter(s) where applicable.
1179+ Contains common methods used in.
1180+
1181+
1182+
1183+
1184+
1185+
1186+
1187+
1188+
1189+ #### constructor(apiKey, options, blockchainId:, -, -)
1190+
1191+
1192+ Creates a Web3Data instance.
11481193
11491194
11501195
@@ -1153,12 +1198,11 @@ the appropriate parameter(s) where applicable.
11531198
11541199| Name | Type | Description | |
11551200| ---- | ---- | ----------- | -------- |
1156- | web3data | | Instance on which to call .rawQuery(). |   ; |
1157- | subendpoint | | The subendpoint. |   ; |
1158- | endpoint | | The endpoint. |   ; |
1159- | hash | | The address hash. |   ; |
1160- | pathParam | | The path parameter. |   ; |
1161- | filterOptions | | The filters associated with a given endpoint. |   ; |
1201+ | apiKey | | The Amberdata api key needed to access data. |   ; |
1202+ | options | ` object ` | Contains additional configuration options: |   ; |
1203+ | blockchainId: | | specifies the blockchain to get data from |   ; |
1204+ | - | | baseUrl: the base url of API calls |   ; |
1205+ | - | | websocketUrl: the websocket url to use |   ; |
11621206
11631207
11641208
@@ -1173,16 +1217,17 @@ the appropriate parameter(s) where applicable.
11731217##### Returns
11741218
11751219
1176- - Returns a Promise of the rawQuery request from web3data.
1220+ - ` Void `
11771221
11781222
11791223
11801224
11811225
1182- #### uuid(data )
1226+ #### rawQuery(url )
11831227
11841228
1185- Generates a uuid see [ this gist] ( ) for more details.
1229+ Appends the API base url with the endpoint url. Then sends an
1230+ http request to the Amberdata API endpoint.
11861231
11871232
11881233
@@ -1191,7 +1236,7 @@ Generates a uuid see [this gist]() for more details.
11911236
11921237| Name | Type | Description | |
11931238| ---- | ---- | ----------- | -------- |
1194- | data | | |   ; |
1239+ | url | | The endpoint url with any query/path params if set. |   ; |
11951240
11961241
11971242
@@ -1206,71 +1251,69 @@ Generates a uuid see [this gist]() for more details.
12061251##### Returns
12071252
12081253
1209- - ` Void `
1254+ - The axios request object.
12101255
12111256
12121257
12131258
12141259
1215- ### src/web3data.js
1260+ #### rpc(method, params)
12161261
12171262
1263+ Method used to interact with web3api json rpc endpoints.
12181264
1219- #### Class: Web3DataFactory
12201265
12211266
1222- Contains common methods used in.
12231267
1268+ ##### Parameters
12241269
1270+ | Name | Type | Description | |
1271+ | ---- | ---- | ----------- | -------- |
1272+ | method | | The json rpc method to call. |   ; |
1273+ | params | | The parameters to the json rpc call. |   ; |
12251274
12261275
12271276
12281277
1278+ ##### Examples
12291279
1280+ ``` javascript
12301281
1282+ ```
12311283
1232- #### constructor(apiKey, options, blockchainId:, -, -)
12331284
1285+ ##### Returns
12341286
1235- Creates a Web3Data instance.
12361287
1288+ - Returns the json rpc result.
12371289
12381290
12391291
1240- ##### Parameters
12411292
1242- | Name | Type | Description | |
1243- | ---- | ---- | ----------- | -------- |
1244- | apiKey | | The Amberdata api key needed to access data. |   ; |
1245- | options | ` object ` | Contains additional configuration options: |   ; |
1246- | blockchainId: | | specifies the blockchain to get data from |   ; |
1247- | - | | baseUrl: the base url of API calls |   ; |
1248- | - | | websocketUrl: the websocket url to use |   ; |
12491293
1294+ #### Class: Web3Data
12501295
12511296
1297+ Class Web3data contains methods for hitting Amberdata's
1298+ API endpoints.
12521299
1253- ##### Examples
12541300
1255- ``` javascript
12561301
1257- ```
12581302
12591303
1260- ##### Returns
12611304
12621305
1263- - ` Void `
12641306
12651307
1308+ ### src/utils.js
12661309
12671310
12681311
1269- #### rawQuery(url )
1312+ #### get(web3data, subendpoint, endpoint, hash, pathParam, filterOptions )
12701313
12711314
1272- Appends the API base url with the endpoint url. Then sends an
1273- http request to the Amberdata API endpoint .
1315+ Builds the endpoint url to pass to .rawQuery(). Checks for non empties and appends
1316+ the appropriate parameter(s) where applicable .
12741317
12751318
12761319
@@ -1279,7 +1322,12 @@ http request to the Amberdata API endpoint.
12791322
12801323| Name | Type | Description | |
12811324| ---- | ---- | ----------- | -------- |
1282- | url | | The endpoint url with any query/path params if set. |   ; |
1325+ | web3data | | Instance on which to call .rawQuery(). |   ; |
1326+ | subendpoint | | The subendpoint. |   ; |
1327+ | endpoint | | The endpoint. |   ; |
1328+ | hash | | The address hash. |   ; |
1329+ | pathParam | | The path parameter. |   ; |
1330+ | filterOptions | | The filters associated with a given endpoint. |   ; |
12831331
12841332
12851333
@@ -1294,16 +1342,16 @@ http request to the Amberdata API endpoint.
12941342##### Returns
12951343
12961344
1297- - The axios request object .
1345+ - Returns a Promise of the rawQuery request from web3data .
12981346
12991347
13001348
13011349
13021350
1303- #### rpc(method, params )
1351+ #### uuid(data )
13041352
13051353
1306- Method used to interact with web3api json rpc endpoints .
1354+ Generates a uuid see [ this gist ] ( ) for more details .
13071355
13081356
13091357
@@ -1312,8 +1360,7 @@ Method used to interact with web3api json rpc endpoints.
13121360
13131361| Name | Type | Description | |
13141362| ---- | ---- | ----------- | -------- |
1315- | method | | The json rpc method to call. |   ; |
1316- | params | | The parameters to the json rpc call. |   ; |
1363+ | data | | |   ; |
13171364
13181365
13191366
@@ -1328,21 +1375,7 @@ Method used to interact with web3api json rpc endpoints.
13281375##### Returns
13291376
13301377
1331- - Returns the json rpc result.
1332-
1333-
1334-
1335-
1336-
1337- #### Class: Web3Data
1338-
1339-
1340- Class Web3data contains methods for hitting Amberdata's
1341- API endpoints.
1342-
1343-
1344-
1345-
1378+ - ` Void `
13461379
13471380
13481381
0 commit comments