1.0.5 • Published 1 year ago

node-red-contrib-near-protocol v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

node-red-contrib-near-protocol

platform NPM version NPM

This module provides nodes to call smart contract methods and observe it from your automation Node-RED Project.

npm.io

Install

To install the stable version use the Menu - Manage palette option and search for node-red-contrib-near-protocol, or run the following command in your Node-RED user directory - typically ~/.node-red:

cd ~/.node-red
npm i node-red-contrib-near-protocol

Create your first flow

  1. Add Near Contract node to workspace

    npm.io

  2. Double click it and configure contract.

    npm.io

  3. Set values to fields, fill in contract methods and press Done

    npm.io

  4. Press Deploy button. After succesful flow deploy you have to see similar contract node or error message.

    npm.io

  5. Add Contract Method node to workspase

    npm.io

  6. Double click it and configure method. Choose created before contract and method and press Done

    npm.io

  7. Method node has to change label

    npm.io

  8. To call contract we have to emit some event and pass some arguments. To do it let't add standard inject node to a workspace.

    npm.io

  9. Set arguments to payload field and press Done

    npm.io

  10. Add standart debug node to show result in debug console, connect nodes inputs and outputs and press Deploy. After that you can run contract by pressing to button on inject node.

    npm.io

    Execution error will be displayed in debug console and as a contract node status

    npm.io

    Execution succes result will be transmitted to next node. If contract call does not return any result next node will get { payload: {} } npm.io