You can use Web3j-OpenAPI to generate API endpoints based on your Solidity smart contract.
You can then run the generated API server with and send requests to your deployed smart contract.
Deploy an Ethereum or Quorum node with Chainstack
Deploy an Ethereum node as described in Join a public network.
Deploy a Quorum network as described in Deploy a Quorum network.
Run Web3j-OpenAPI based on your smart contract
Refer to the Web3j-OpenAPI documentation.
Install Epirus CLI:
curl -L get.epirus.io | sh
Import your smart contract into the Epirus project:
epirus openapi import
Provide a path to your smart contract:
Please enter the path to your Solidity file/folder [Required Field]:
Run an Ethereum proxy or a Quorum proxy:
Provide the variables to interact with the contract and the network:
- PROXY_LINK — the link to your proxy container to your node's RPC endpoint.
- PRIVATE_KEY — the private key of an account through which you interact with the contract, including contract deployment.
Run the API server:
Access the server at http://localhost:9090/swagger-ui