基于区块链的毕业设计node-red-contrib-ethereum – 节点红contrib以太坊

本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计node-red-contrib-ethereum – 节点红contrib以太坊 是一篇很好的国外资料

node-red-contrib-ethereum

A node palette for interacting with ethereum clients

Installation

Prerequisites

  • Install Node.js : https://nodejs.org/en/download/package-manager/
  • Install Node-RED : https://nodered.org/docs/getting-started/local

Installing the node palette

  • Currently this package is not available from the Node-RED Library. It must be installed using the npm package manager (comes with Node.js).

  • First copy this package (node-red-contrib-ethereum) to anywhere on your machine.

  • Then find the .node-red directory (usually located inside the user directory)

  • From the .node-red directory run the following command to install the packge to Node-RED.

npm install <path to node-red-contrib-ethereum>
  • Run Node-RED
node-red
  • The console logs will show a log entry like this, where you can find the url to access the Node-RED editor from your web browser.
6 Jan 10:13:34 - [info] Server now running at http://127.0.0.1:1880/
  • If everything worked out, you will find the ethereum nodes in the node palette.

Example flows

Prerequisites

  • Install Truffle : https://www.trufflesuite.com/truffle
  • Install Ganache : https://www.trufflesuite.com/ganache

Set up ganache workspace

  • Start ganache and choose ‘New Workspace’
  • In the setup window, go to the ‘Accounts & Keys’ tab
  • Enter the following mnemonic and then press ‘Save Workspace’
visit carpet logic blame furnace confirm rebel deliver medal mean illness error

Deploy test smart contracts

  • Find the smart contracts directory ‘node-red-contrib-ethereumexample-flowsexample-contracts’
  • From the smart contracts directory run the commands to deploy the contracts to ganache
truffle compile truffle migrate
  • In ganache go to the ‘Contracts’ tab and choose ‘Link Truffle Projects’
  • Choose ‘Add Project’ and select the truffle-config.js from the smart contracts directory
  • Press ‘Save and Restart’
  • Now you should see the deployed contracts in the ‘Contracts’ tab

Install the VISEO Nodes

  • In Node-RED editor go to the ‘Manage palette’ menu
  • Install the package: node-red-contrib-viseo-ethjs

Install other packages

  • Install: node-red-contrib-binary
  • Install: node-red-contrib-https

Import flows

  • Find the file ‘node-red-contrib-ethereumexample-flowsExampleFlows.json’
  • In Node-RED editor go to the ‘Import’ menu
  • Copy & Paste the contents of ExampleFlows.json into the text field and press ‘Import’

Enter Account Private Keys

  • The private keys of the accounts where not part of the import, they must be entered manually
  • In Node-RED editor find the ‘Configuration Nodes’ menu
  • Enter the private keys for the following account config nodes:
  • sender-account ‘Account 11’ : 0xfc72302ffbed8453080f1149135cfb57155d90c8e3cfa8835871d954cea50664
  • ethjs-wallet ‘Account 11’ : 0xfc72302ffbed8453080f1149135cfb57155d90c8e3cfa8835871d954cea50664
  • ethjs-wallet ‘Account 2’ : 0xdbbf87459bea5ca7309d9eb990f05922ab8579f4ad42364ffc229000db2ed818
  • ethjs-wallet ‘Account 3’ : 0xde4ed0ee59a7153b7c32e5d6e25ecbfd42e94f0130be604d231169d2e67cd7f5
  • Hit the ‘Deploy’ button
  • Now the flows should be usable, try them out

add filter options to transaction reader node


节点red contrib ethereum

用于与以太坊eth客户端进行交互的节点调色板

安装

先决条件

  • 安装节点.js: https://nodejs.org/en/download/package-manager/
  • 安装节点红色:https://nodered.org/docs/getting-started/local

安装节点调色板

  • 当前节点红色库中没有此程序包。它必须使用npm包管理器(随附)安装节点.js).
  • 首先将此包(node red contrib ethereum)复制到计算机上的任何位置。
  • 然后从.node red目录中找到.node red目录(通常位于用户目录中)
  • 运行以下命令将packge安装到node red。
npm install <path to node-red-contrib-ethereum>
  • 运行Node RED
node-red
  • 控制台日志将显示这样的日志条目,您可以在其中找到从web浏览器访问Node RED编辑器的url。
6 Jan 10:13:34 - [info] Server now running at http://127.0.0.1:1880/
  • 如果一切顺利,您将在节点调色板中找到以太坊eth节点。

示例流

先决条件

  • 安装块菌:https://www.trufflesuite.com/truffle
  • 安装Ganache:https://www.trufflesuite.com/ganache

部署测试智能合约

  • 启动ganache并选择“新建工作区”
  • 在“设置”窗口中,转到“帐户和密钥”选项卡,输入以下助记符,然后按“保存工作区”
  • 查找智能合约目录“node red contrib ethereumexample flowsexample contracts”
visit carpet logic blame furnace confirm rebel deliver medal mean illness error

安装VISEO节点

  • 从智能合约目录运行命令,将合约部署到ganache
  • 在ganache中转到“合约”选项卡并选择“链接块菌项目”
truffle compile truffle migrate
  • 选择“添加项目”并选择块菌-配置.js从智能合约目录
  • 按“保存并重新启动”
  • 现在您应该在节点红色编辑器的“合约”选项卡中看到部署的合约转到“管理调色板”菜单
  • 安装包:节点红色contrib viseo ethjs

安装其他包

  • 安装:节点红色contrib binary
  • 安装:node red contrib https

导入流

  • 查找文件“node red contrib ethereumexample flows”ExampleFlows.json示例’在节点红色编辑器中转到’导入’菜单
  • 复制和粘贴ExampleFlows.json示例输入文本字段并按“导入”

输入帐户私钥

  • 不属于导入的帐户的私钥,它们必须手动输入
  • 在节点红色编辑器中查找“配置节点”菜单
  • 输入以下帐户配置节点的私钥:

Enter Account Private Keys

  • 发件人帐户“帐户11”:0xfc72302ffbed8453080f1149135cfb57155d90c8e3cfa8835871d954cea50664
  • ethjs wallet“帐户11”:0xfc72302ffbed8453080f1149135cfb57155d90c8e3cfaa8835871d954cea50664
  • ethjs wallet“帐户2”:0xdbbf87459bea7309d9eb990f05922ab8579f4ad42364ffc229000db2ed818
  • ethjs wallet“帐户3”:0xde4ed0ee59a7153b7c32e5e25ecbfd42e94f0130be604d231169d2e67cd7f5
  • 现在流应该有用的话,试试看
  • ethjs-wallet ‘Account 2’ : 0xdbbf87459bea5ca7309d9eb990f05922ab8579f4ad42364ffc229000db2ed818
  • ethjs-wallet ‘Account 3’ : 0xde4ed0ee59a7153b7c32e5d6e25ecbfd42e94f0130be604d231169d2e67cd7f5
  • Hit the ‘Deploy’ button
  • Now the flows should be usable, try them out

add filter options to transaction reader node

部分转自网络,侵权联系删除区块链源码网

www.interchains.cc

https://www.interchains.cc/20707.html

区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 ! QQ3039046426
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » 基于区块链的毕业设计node-red-contrib-ethereum – 节点红contrib以太坊

提供最优质的资源集合

立即查看 了解详情