This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Milestone 1: | |
There are two main steps in this milestone: | |
- Connect to or set up an IPFS node | |
- HTML and JS to upload a file to IPFS and download it | |
In order to do this you will need to create: | |
1. JavaScript that implements functions to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// paste into the "function" node in node-red | |
ethers = global.get('ethers'); | |
let provider = ethers.getDefaultProvider(flow.get("network")); | |
const deployerPK = flow.get("deployer_pk"); | |
let wallet = new ethers.Wallet(deployerPK, provider); | |
let amount = ethers.utils.parseEther('0.001'); | |
let to = msg.payload.user.fields.Address; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity 0.4.24; | |
contract PingPong { | |
event Pong(address _pinger); | |
function ping() public { | |
emit Pong(msg.sender); | |
} | |
} |