Skip to content

Instantly share code, notes, and snippets.

View abrkn's full-sized avatar

Andreas Brekken abrkn

View GitHub Profile

SideShift AI

hmm

import { fromEnv as configFromEnv } from './config';
import { getRpc } from '../shared/rpcs';
import { n, runWorkerUntilShutdown } from '../shared/utils';
import { createDeposit, getConnection, Deposit, Quote } from '../shared/orm';
import { safePromise } from 'safep';
import { AxiosError } from 'axios';
const config = configFromEnv();
const depositMethod = config.depositMethod!;
const { node, asset } = depositMethod!;
@abrkn
abrkn / shifty-output.log
Last active January 31, 2019 05:43
Example Shifty output log
Jan 31 11:41:14am info app worker.1 assert(amount)
Jan 31 11:41:14am info app worker.1 at fetchDepositAddress (/app/src/web/backend/utils/address.js:146:5)
Jan 31 11:41:14am info app worker.1 at shift (/app/src/worker-shifty/start.js:72:32)
Jan 31 11:41:14am info app worker.1 at process._tickCallback (internal/process/next_tick.js:68:7)
Time gap of 5 minutes • Thursday, January 31st at 11:46 am
Jan 31 11:46:19am info app worker.1 19 deposit methods can send $5
Jan 31 11:46:19am info app worker.1 16 deposit methods are possible to send automatically
Jan 31 11:46:19am info app worker.1 Picked the deposit method ltc (asset LTC) by random
Jan 31 11:46:19am info app worker.1 Picked the settle method bch (asset BCH) by random
Jan 31 11:46:19am info app worker.1 Creating quote...
@abrkn
abrkn / shifty.js
Created January 31, 2019 05:07
Shifty, the automated ShapeShift AI testing robot
const { delayUnlessShutdown } = require('shutin');
const { depositMethods, settleMethods } = require('../shared/facts');
const { n } = require('../shared/utils');
const { fetchRate, convert } = require('../shared/rates');
const { sample, values, chain, keys } = require('lodash');
const { fetchInventorySnapshot } = require('../shared/db');
const pReduce = require('p-reduce');
const { fetchDepositAddress } = require('../web/backend/utils/address');
const payWith = require('../shared/pay');
const { safePromise } = require('safep');
const assert = require('assert');
const delay = require('delay');
const { getRpc } = require('../rpcs');
const { n } = require('../utils');
const config = require('../config');
const debug = require('consol').debugger('sideshift:pay:zaddr');
const FEE = 0.0001;
module.exports = async function payWithZaddr(paymentMethod, paymentDetails) {
@abrkn
abrkn / sai.md
Last active January 29, 2019 09:28
Sai

SAI is the native token of SideShift AI. At this time, 1 SAI = $0.10 USD. This is a temporary promotion during the TEST PILOT PHASE and not a guarantee. Basically, SAI could be worth zero in the future.

Smart Contract

  • Type: ERC20
  • Network: Ethereum (mainnet)
  • Address: 0xf5b403abd806eff15b339909943e2c22ecbac54c
  • Decimals: 18
  • Symbol: SAI
  • Name: Sai
[Unit]
Description=Bitcoin Daemon
[Service]
User=ubuntu
Group=ubuntu
ExecStart=/usr/local/bin/bitcoind -datadir=/opt/bitcoin
[Install]
WantedBy=multi-user.target
@abrkn
abrkn / GA8903.md
Last active January 13, 2019 08:25

GENERIC ANSWER [GA8903]

Thank you for evaluating the [technicals/econometrics/politics/game theory] of SideShift AI.

SideShift AI is currently in its TEST PILOT PHASE. The easiest way for you to give feedback, such as [insert user opinion], is to become a TEST PILOT by obtaining a TEST PILOT CODE.

See the form at https://sideshift.ai/pilot

Thank you CRLF

@abrkn
abrkn / drivechain.ai.md
Created October 22, 2018 10:42
Drivechain.ai

Drivechain.ai

The following toolkit makes getting started with Drivechain TestDrive easier and more fun!

Services

@abrkn
abrkn / move-bitcoin-unspent-to-default-account.sh
Created November 22, 2018 04:59
Bitcoin: Move all unspent funds to the default ("") account
bitcoin-cli listunspent | grep address | cut -d\" -f4 | xargs -L1 -I{} bitcoin-cli setaccount {} ""