You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Documentation**
- Updated documentation to reflect the renaming of middleware service
from "Hyplerledger Besu Middleware" to "Smart Contract Portal
Middleware" throughout relevant sections.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Copy file name to clipboardExpand all lines: docs/developer-guides/connect-frontend.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,7 +91,7 @@ You can find the ERC20 contract on the left in the Explorer under `contracts/Gen
91
91
92
92
We don't need to change anything in this contract's code. The current default is to deploy a token called `GenericToken` with a symbol `GT`.
93
93
94
-
To change this to something less generic, we can go to the `gnition/modules` folder and open the `main.ts` file. From there we can edit the below code block that starts on line 4:
94
+
To change this to something less generic, we can go to the `ignition/modules` folder and open the `main.ts` file. From there we can edit the below code block that starts on line 4:
95
95
96
96
**Before:**
97
97
@@ -104,7 +104,7 @@ By editing this code block, you can create your token name and symbol:
Copy file name to clipboardExpand all lines: docs/using-platform/11_middleware.md
+166-6Lines changed: 166 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
For any dApp to provide good UX, you need a solution that quickly loads the data stored on chain and on IPFS. Querying data directly from blockchain is complex. This is where the middleware comes in, which is essentially a layer in between blockchain and your dApp, allowing you to index and query your blockchain data easily and efficiently.
4
4
5
-
SettleMint offers two Middleware solutions: **The Graph Middleware (for all EVM-compatible chains)** and **Hyperledger Besu Middleware**.
5
+
SettleMint offers two Middleware solutions: **The Graph Middleware (for all EVM-compatible chains)** and **Smart Contract Portal Middleware**.
6
6
7
7
## Adding a middleware
8
8
@@ -13,7 +13,7 @@ Navigate to the **application** where you want to add a middleware. Click **Midd
13
13
Follow these steps to add the middleware:
14
14
15
15
1. Select to which of your **smart contract sets** the middleware needs to connect, and click **Continue**.
16
-
2. Choose [Graph Middleware](#the-graph-middleware) or [Hyperledger Besu Middleware](#the-hyperledger-besu-middleware)
16
+
2. Choose [Graph Middleware](#the-graph-middleware) or [Smart Contract Portal Middleware](#the-smart-contract-portal-middleware)
17
17
3. Choose a **Middleware name**. Choose one that will be easily recognizable in your dashboards.
18
18
4. Select the **storage provider**
19
19
5. Choose a **deployment plan**. Select the type, cloud provider, region and resource pack. [More about deployment plans.](../launch-platform/managed-cloud-deployment/13_deployment-plans.md)
@@ -23,7 +23,7 @@ When the middleware is deployed, click it from the list and start using it.
23
23
24
24
## The Graph Middleware
25
25
26
-
[The Graph](https://thegraph.com/en/) is a protocol for indexing and querying blockchain data from networks. It can be used with all EVM-compatible chains like Ethereum, Hyperledger Besu, Polygon, Binance Smart Chain and Avalanche. You can run it on your own blockchain nodes (both public and permissioned) and IPFS nodes.
26
+
[The Graph](https://thegraph.com/en/) is a protocol for indexing and querying blockchain data from networks. It can be used with all EVM-compatible chains like Ethereum, Hyperledger Besu, Polygon, Binance Smart Chain, Avalanche, etc. You can run it on your own blockchain nodes (both public and permissioned) and IPFS nodes.
27
27
28
28
Using the Graph protocol, you can create **subgraphs** that define which blockchain data will be indexed. These subgraphs are **defined in the smart contract set** and deployed to the middleware. The middleware will then use these subgraphs to correctly index your smart contracts and expose a developer-friendly and efficient **GraphQL API**, allowing you to query the data you need.
29
29
@@ -33,7 +33,7 @@ The middleware is fully preconfigured and integrated with the smart contract set
33
33
34
34
Before you start, make sure you are running:
35
35
36
-
- An EVM-compatible network (Ethereum, Polygon, Hyperleder Besu, Binance Smart Chain or Avalanche)
- A smart contract set with a deployed smart contract
38
38
- An IPFS node
39
39
- A private key
@@ -107,6 +107,166 @@ To make this a bit easier, the `graph:all` task executes all these steps in the
107
107
108
108
The indexing of your smart contracts has now started. This can take a while, but once done you can query the middleware for your data in seconds using the **GraphQL API**. You can find the **endpoint** in the **Connect-tab**.
109
109
110
-
## The Hyperledger Besu Middleware
110
+
## The Smart Contract Portal Middleware
111
111
112
-
Documentation will be online soon.
112
+
The Smart Contract Portal is a middleware which creates an easy to use api on top of your smart contracts. It can be used with all EVM-compatible chains like Ethereum, Hyperledger Besu, Polygon, Binance Smart Chain, Avalanche, etc. You can run it on your own blockchain nodes (both public and permissioned) or on a Load Balancer.
113
+
114
+
Benefits of using the smart contract portal:
115
+
116
+
1. Simplified Integration: APIs allow developers to interact with complex smart contract functions through familiar interfaces, reducing the need to understand blockchain-specific languages and protocols.
117
+
2. Data Aggregation: APIs can consolidate data from multiple smart contracts, providing a unified view.
118
+
3. Improved Performance: GraphQL optimizes data fetching, ensuring that clients retrieve only the necessary data in a single request, reducing network load and improving performance.
119
+
4. Stack agnostic: Teams are free to choose their own technology stack.
A smart contract ABI (Application Binary Interface) is a standardized way for interacting with smart contracts in the Ethereum blockchain and other compatible systems. It serves as the bridge between human-readable contract code (written in languages like Solidity) and the Ethereum Virtual Machine (EVM), which executes the contract. The ABI specifies the functions that can be called on the contract, including their names, input parameters, and output types.
133
+
134
+
When deploying a smart contract the ABI file can be found as part of the artificats. See [Deploying the Smart Contract](/documentation/docs/developer-guides/connect-frontend#adding-the-abi). Download the ABI json files and save them on your local filesystem.
135
+
136
+
When creating a new middleware you'll need to upload at least one ABI.
137
+
138
+
To update the ABIs of an existing smart contract portal middleware navigate to the middleware, go the details and click on the 'Manage Middleware' button on the top right. Click on the 'Update ABIs' item and a dialog will open. In this dialog upload the ABI file(s) you saved on your local filesystem in the previous step.
A fully typed REST api with documentation is created out of the Smart Contract ABI, you can discover all its endpoints on the REST tab. To see examples in your technology of choice use the dropdown in the example section on the right.
Standard Webhooks has built [SDKs and useful tools](https://www.standardwebhooks.com/#resources) using different programming languages that make it easy to start using webhooks.
165
+
166
+
An example using Typescript, [Elysia](https://elysiajs.com/) and [standard webhooks](https://www.standardwebhooks.com/).
newError(`No connection to the WebSocket: ${webSocket.readyState}`)
262
+
);
263
+
}
264
+
});
265
+
}
266
+
```
267
+
268
+
### Transactions api
269
+
270
+
The portal exposes some general purpose APIs for transactions. This could be used for example to display transactions which are pending or processed in your UI. Both REST and GraphQL offer this functionality.
0 commit comments