Skip to content

Instantly share code, notes, and snippets.

View jonathanpdunne's full-sized avatar

Jonathan Dunne jonathanpdunne

View GitHub Profile
## 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
@jonathanpdunne
jonathanpdunne / transferETH-node-red.js
Created January 9, 2020 05:47
Send Eth Function - Node Red ethersjs
// 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;
pragma solidity 0.4.24;
contract PingPong {
event Pong(address _pinger);
function ping() public {
emit Pong(msg.sender);
}
}