-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from protofire/fix-node-connection-issues
Update polkadot dependencies an fix node connection issue.
- Loading branch information
Showing
13 changed files
with
547 additions
and
531 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Polkadot Mempool Explorer API | ||
|
||
Mempool Explorer API Definition [api-docs](https://mempool.dot.protofire.io/api/v1/api-docs). | ||
|
||
## Environment setup | ||
|
||
- Install [Node.js](https://nodejs.org/) | ||
- Recommended method is by using [NVM](https://github.com/creationix/nvm) | ||
- Recommended Node.js version is v12 | ||
|
||
## Demo | ||
|
||
[mempool.dot.protofire.io](https://mempool.dot.protofire.io) | ||
|
||
## Custom Polkadot Node | ||
|
||
In order to track extrinsics lifecycle. We added a new RPC method ([author_trackExtrinsic](https://github.com/protofire/polkadot-mempool-explorer/blob/develop/api/services/polkadot/custom-rpc-methods.js)) on [Substrate core](https://github.com/jarcodallo/substrate/blob/master/client/rpc-api/src/author/mod.rs). | ||
|
||
This basically allows someone to subscribe and track status changes in the extrinsics lifecycle, for example movements getting in or out of queues, and everything that matters for us before including those extrinsics in blocks. | ||
|
||
- Substrate change: [github.com/paritytech/substrate](https://github.com/jarcodallo/substrate/commits/master) | ||
- Polkadot dependencies update: [github.com/paritytech/polkadot](https://github.com/jarcodallo/polkadot/commits/master) | ||
- Docker image of the polkadot binary: [hub.docker.com/polkadot](https://hub.docker.com/repository/docker/jarcodallo/polkadot) | ||
|
||
## Get Started | ||
|
||
In the project directory, you can run: | ||
|
||
### `npm start` | ||
|
||
Runs the NodeJs service in the development mode.\ | ||
Open [localhost:8081/api/v1/api-docs](http://localhost:8084/api/v1/api-docs) to view it in the browser or Postman. | ||
|
||
The service will reload if you make edits. | ||
|
||
## Mempool Explorer API Definition | ||
|
||
<p align="center"><img src="../assets/swagger.png"/></p> | ||
|
||
|
||
## Endpoints | ||
|
||
- `/networks`: Get networks [specs](https://github.com/protofire/polkadot-mempool-explorer/blob/main/api/routes/explorerApiDocumentation.js#L32-L65). | ||
- `/networks/:networkId/reset`: Reset the listener for a network id. [specs](https://github.com/protofire/polkadot-mempool-explorer/blob/main/api/routes/explorerApiDocumentation.js#L66-L95). | ||
- `/transactions/:networkId`: Get transactions by network id. [specs](https://github.com/protofire/polkadot-mempool-explorer/blob/main/api/routes/explorerApiDocumentation.js#L96-L133). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.