Skip to content

Instantly share code, notes, and snippets.

View mswezey23's full-sized avatar
🎯
Focusing

Swezey, Matt mswezey23

🎯
Focusing
View GitHub Profile
@mswezey23
mswezey23 / gist:f372516e5cc417cf4fcb73b2dea8b7e9
Created November 29, 2021 23:29 — forked from rahuldamodar94/gist:6bdd022f3457934f2a104fd5f4bb45e4
0x V3 deployment on Matic Testnet (Mumbai - 80001) and Matic Mainnet (137)
"80001":{
"erc20Proxy": "0x0b47076aaa5246411458fcf85494f41bbfdb8470",
"erc721Proxy": "0xff7ca10af37178bdd056628ef42fd7f799fac77c",
"erc1155Proxy": "0x53d791f18155c211ff8b58671d0f7e9b50e596ad",
"zrxToken": "0x5af2b282779c7d4ffc69ca4e6e16676747f5c56b",
"etherToken": "0x5b5e11e4818cceba3e82ca9b97cd0ab80be75ad3",
"exchange": "0x533dc89624dcc012c7323b41f286bd2df478800b",
"erc20BridgeProxy": "0x5638a4b19f121adc4436de3f0e845173b33b594c",
"forwarder": "0x6dcf02d3a963f22dbf85c4025b86a834fef16c15",
"coordinatorRegistry": "0x6f5b9e0456c4849224c7b59dc15f05c48641c4e3",
[Unit]
Description=Polkadot Validator
[Service]
WorkingDirectory=/home/ubuntu/GitHub/substrate-node-template
NODENAME="YOUR NODE NAME"
CHAINJSON="./shiftSubstrateTN02.json"
ExecStart=/home/ubuntu/GitHub/substrate-node-template/target/release/node-template --base-path /home/ubuntu/substrateShift --chain=$CHAINJSON --port 30333 --ws-port 9944 --rpc-port 9933 --validator --rpc-methods=Unsafe --name $NODENAME --rpc-cors all
{
"name": "ShiftNRG Testnet",
"id": "shiftnrg_testnet",
"chainType": "Development",
"bootNodes": ["/dns/substrate.shiftnrg.dev/tcp/30333/p2p/12D3KooWMPPkgzxKE5gzfRLW8CAAhpTTpd2XauTeVK4ZNFHpbXcw"],
"telemetryEndpoints": [["wss://telemetry.polkadot.io/submit/", 0]],
"protocolId": null,
"properties": null,
"consensusEngine": null,
"genesis": {
#!/bin/bash
### Functions ###
# get password from AWS Secrets Manager
function getCliSecrets {
RAW_SECRETS="$(aws secretsmanager get-secret-value --secret-id mgmt/cliTool/artifactory --region us-east-1)"
USERNAME="$(echo $RAW_SECRETS | jq -r '.SecretString' | jq -r '.username')"
PASSWORD="$(echo $RAW_SECRETS | jq -r '.SecretString' | jq -r '.password')"
API_KEY="$(echo $RAW_SECRETS | jq -r '.SecretString' | jq -r '.api_key')"
}
@mswezey23
mswezey23 / wsl-redis-start.md
Created February 26, 2020 05:42 — forked from cromat/wsl-redis-start.md
Run redis inside WSL as background service on Windows startup

Step by step guide to run redis-server inside WSL(Windows Subsystem for Linux) on Windows

I have tried to setup redis as starting background task with wsl-autostart, Task Scheduler and with lot vbs scripts including one described here but none of them seemed to work.

In the end I have manually created a simple one that does the job. This script basically starts a hidden Ubuntu Window and starts redis-server inside it.

  1. Install WSL (this is tested with Ubuntu 18.04 version)
  2. Install redis-server inside WSL sudo apt install redis-server
  3. Add sudo permission to your user to execute service command without password
@mswezey23
mswezey23 / wsl-redis-start.md
Created February 26, 2020 05:42 — forked from cromat/wsl-redis-start.md
Run redis inside WSL as background service on Windows startup

Step by step guide to run redis-server inside WSL(Windows Subsystem for Linux) on Windows

I have tried to setup redis as starting background task with wsl-autostart, Task Scheduler and with lot vbs scripts including one described here but none of them seemed to work.

In the end I have manually created a simple one that does the job. This script basically starts a hidden Ubuntu Window and starts redis-server inside it.

  1. Install WSL (this is tested with Ubuntu 18.04 version)
  2. Install redis-server inside WSL sudo apt install redis-server
  3. Add sudo permission to your user to execute service command without password
@mswezey23
mswezey23 / wsl-redis-start.md
Created February 26, 2020 05:42 — forked from cromat/wsl-redis-start.md
Run redis inside WSL as background service on Windows startup

Step by step guide to run redis-server inside WSL(Windows Subsystem for Linux) on Windows

I have tried to setup redis as starting background task with wsl-autostart, Task Scheduler and with lot vbs scripts including one described here but none of them seemed to work.

In the end I have manually created a simple one that does the job. This script basically starts a hidden Ubuntu Window and starts redis-server inside it.

  1. Install WSL (this is tested with Ubuntu 18.04 version)
  2. Install redis-server inside WSL sudo apt install redis-server
  3. Add sudo permission to your user to execute service command without password
@mswezey23
mswezey23 / wsl-redis-start.md
Created February 26, 2020 05:42 — forked from cromat/wsl-redis-start.md
Run redis inside WSL as background service on Windows startup

Step by step guide to run redis-server inside WSL(Windows Subsystem for Linux) on Windows

I have tried to setup redis as starting background task with wsl-autostart, Task Scheduler and with lot vbs scripts including one described here but none of them seemed to work.

In the end I have manually created a simple one that does the job. This script basically starts a hidden Ubuntu Window and starts redis-server inside it.

  1. Install WSL (this is tested with Ubuntu 18.04 version)
  2. Install redis-server inside WSL sudo apt install redis-server
  3. Add sudo permission to your user to execute service command without password
pragma solidity 0.5.6;
interface DeployInterface {
function foo() external returns (uint256);
}
contract DeploySecond is DeployInterface {
function foo() external returns (uint256) {
return 2;
}
pragma solidity 0.5.5;
import "github.com/OpenZeppelin/openzeppelin-solidity/contracts/math/SafeMath.sol";
contract StoreVsCalculate {
using SafeMath for uint256;
uint256[] _result;
function storeResult(uint256 input) public {