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
const HDWalletProvider = require("@truffle/hdwallet-provider"); | |
require('dotenv').config(); // Store environment-specific variable from '.env' to process.env | |
const rpcURL = 'YOUR_RPC_URL_GOES_HERE'; | |
let creds = process.env.USERNAME + ':' + process.env.PASSWORD; | |
const secURL = 'https://' + creds + '@' + rpcURL; | |
module.exports = { | |
/** | |
* Networks define how you connect to your ethereum client and let you set the |
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
coconst Web3 = require('web3'); | |
const username = 'YOUR_USERNAME_HERE'; | |
const password = 'YOUR_PASSWORD_HERE'; | |
const url = 'YOUR_URL_HERE'; // make sure to strip the wss:// prefix! | |
const wsSecURL = 'wss://' + username + ':' + password + '@' + url; | |
const web3ws = new Web3(new Web3.providers.WebsocketProvider(wsSecURL)); | |
const tether_abi = require('./tether_abi.json'); // you can copy the ABI for the Tether contract here: https://etherscan.io/address/0xdac17f958d2ee523a2206206994597c13d831ec7#code |
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
// require dependencies | |
const Web3 = require('web3'); | |
const EthTx = require('ethereumjs-tx').Transaction; | |
// assign address and private key to account | |
const account = { | |
address: 'YOUR_ETHEREUM_ADDRESS_GOES_HERE', // Your address goes here | |
privateKey: 'YOUR_PRIVATE_KEY_GOES_HERE' // Your private key goes here | |
}; |
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
# fun with turtle, a Python module | |
# draw 100 circles of many colors | |
# http://docs.python.org/3.1/library/turtle.html | |
# http://static.michael0x2a.com/turtle_examples.html | |
# http://www.eg.bucknell.edu/~hyde/Python3/TurtleDirections.html | |
import random | |
import time | |
import turtle | |
t = turtle.Pen() |