在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:tommy-kwon/ethereum-ipfs开源软件地址:https://github.com/tommy-kwon/ethereum-ipfs开源编程语言:JavaScript 99.4%开源软件介绍:(not so) Simple storageA bare-bones example on how to use IPFS and Ethereum from the same application. Check this wiki for the original, Ethereum-only idea. DescriptionThis application deploys a contract to an Ethereum blockchain (the public Ethereum testnet or a local Ethereum testnet) and uses it to keep track of an image stored in an IPFS blockchain (the public IPFS "testnet" or a local IPFS testnet). The image itself is stored in the IPFS file system - the only data stored in the Ethereum contract is the IPFS hash that corresponds to the image. [Images are used in the examples below, but any other file types could be used as well] Requirements
Local Ethereum nodeCheck out this guide if you want to run a local Ethereum node. Local IPFS nodeFirst, install IPFS on your machine.
$ export IPFS_PATH=.ipfs
$ ipfs init After that, you need to loosen your IPFS node's CORS restrictions: $ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
$ ipfs config --json Gateway.HTTPHeaders.Access-Control-Allow-Origin '["*"]' You can now start the IPFS daemon:
Project structure
UsageOpen // Config
var ipfsHost = 'localhost',
ipfsAPIPort = '5001',
ipfsWebPort = '8080',
web3Host = 'localhost',
web3Port = '8545'; Now open |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论