arrow-turn-down-rightClient Libraries

Metacces uses Geth which supports common smart contract and dapp development, deployment, and operational use cases, using tools such as Hardhat, web3.js and web3js-quorum. The client supports common JSON-RPC API methods, for example eth, net, web3, debug, and miner.

Prerequisites​

  • Node.js version 15 or later.

  • The web3 library must be installed in your project.

web3arrow-up-right

The web3.js library is the most widely used for developing applications.

Install web3 in your projectarrow-up-right

npm install web3

Initialize the web3 clientarrow-up-right

Initialize your client where:

  • https://oli.accesscan.io is the JSON-RPC HTTP endpoint of your Metacces node.

  • HTTP example

Example connection

const Web3 = require("web3");

const web3 = new Web3("http://oli.accesscan.io");

WS example

Example connection

const Web3 = require("web3");

const web3 = new Web3("http://ws.accesscan.io");

Deploying a contractarrow-up-right

To deploy a private contract, you need the contract binary. You can use Solidity to get the contract binary.

Copy

Alternatively, you can also deploy a contract using eth.sendSignedTransaction

Copy

web3 methodsarrow-up-right

For more information about the web3 methods, see the web3 reference documentation.

Last updated

Was this helpful?