Skip to content

Instantly share code, notes, and snippets.

View imylomylo's full-sized avatar

Captain Mylo imylomylo

View GitHub Profile
Setting up a table
#############
https://github.com/smk762/kmd_pulp/blob/master/Staked/dice/dice_table.sh#L176
We can see here that to setup a table we use the `dicefund` command which gives us a `rawtransaction` to broadcast on the network at https://github.com/smk762/kmd_pulp/blob/master/Staked/dice/dice_table.sh#L180
We go into a loop to check that the `dicefund` (table setup) transaction has been confirmed https://github.com/smk762/kmd_pulp/blob/master/Staked/dice/dice_table.sh#L191
When confirmed, doing a `dicelist` gives us a list of tables https://github.com/smk762/kmd_pulp/blob/master/Staked/dice/dice_table.sh#L195
@imylomylo
imylomylo / gist:0a5936e88ed8bbf6220005f3e39e37fc
Created October 23, 2018 10:20
Docker komodo from emmanuel dragon riders
Discord #developer channel
FROM ubuntu:16.04
ENV BUILD_PACKAGES="build-essential pkg-config libcurl3-gnutls-dev libc6-dev libevent-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python zlib1g-dev curl wget bsdmainutils automake libboost-all-dev libssl-dev libprotobuf-dev protobuf-compiler libqt4-dev libqrencode-dev libdb++-dev"
RUN apt update && \
apt install -y $BUILD_PACKAGES
```
joker stream
curl -s --url "http://127.0.0.1:7782" --data "{\"userpass\":\"1d8b27b21efabcd96571cd56f91a40fb9aa4cc623d273c63bf9223dc6f8cd81f\",\"method\":\"streamerqadd\",\"data\":\"$hex2\",\"seqid\":$i}"
```
@imylomylo
imylomylo / gist:a5f6e26db56d1c5b028e00429545928d
Created October 19, 2018 07:43
komodo java rpc wrapper
https://github.com/priiduneemre/btcd-cli4j/tree/master/examples/src/main
https://github.com/Polve/JavaBitcoindRpcClient
Start looking into one of those as a starting point
sudo pip3 install peercoin_rpc
python3
>>> from peercoin_rpc import Client
>>> kmdnode = Client(testnet=False, username="user793173901", password="pass07e8702e5982abfee0cf32381716717941bcde8c04dbda147818d26ee94f9737d4", ip="localhost", port="45453")
>>> kmdnode.getinfo()
{'version': 1001550, 'testnet': False, 'rpcport': 45453, 'connections': 3, 'errors': '', 'difficulty': 5103076.631849649, 'reward': 25600000000, 'relayfee': 1e-06, 'keypoololdest': 1538907055, 'paytxfee': 0.0, 'blocks': 36719, 'p2pport': 45452, 'halving': 77777, 'notarizedhash': '0000000000000000000000000000000000000000000000000000000000000000', 'KMDversion': '0.1.1', 'proxy': '', 'notarized': 0, 'balance': 0.0, 'notarizedtxid_height': 'mempool', 'notarizedtxid': '0000000000000000000000000000000000000000000000000000000000000000', 'notarized_confirms': 0, 'timeoffset': 0, 'tiptime': 1537796161, 'KMDnotarized_height': 0, 'longestchain': 36719, 'protocolversion': 170003, 'magic': 397860952, 'prevMoMheight': 0, 'keypoolsize': 101, 'name': 'PIRA
Using https://jsonrpcclient.readthedocs.io/en/latest/api.html
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update
sudo apt-get install python3.6
sudo apt-get install python3-pip
pip3 install "jsonrpcclient[requests]"
# Start python3
@imylomylo
imylomylo / gist:d363de0a40fc6f56c0ef8d9f681e2f73
Last active October 11, 2018 15:45
RUNcoin Documentation
Example project for documentation samples called RUNcoin in the making so the tech can be cloned/expanded etc.
- manufacturer / app (step counter etc.) tracks movement/exercise/etc.
- pays RUNcoin for activity, e.g. 1 RUNcoin per day > your-goal.
- 0.1 RUNcoin for 1 day goal
- 0.5 RUNcoin bonus for 3 days in a row of goal
- 1 RUNcoin bonus for 5 days out of 7 (a week)
- 2 RUNcoin bonus for 9 out of 14
RUNcoin wallets can store RUNcoin for 60 days and 1% rewarded + reward * earned RUNcoin from running.
@imylomylo
imylomylo / tmux.md
Last active April 15, 2019 04:18
workflow for tmux

ssh to host

Session mgmt

  • tmux ls
  • tmux a -t
  • tmux new -s dev
  • ^b n(ext)
  • ^b p(revious)
  • ^b c(reate)
Reason this doesn't work is txindex, addressindex and spentindex were not passed in at command line start or in the config file.
This was working yesterday, here: https://gist.github.com/imylomylo/00f0dc2234d1a65860e0e4ccdd0298e0
Today's komodo.conf is
########################
rpcuser=user
rpcpassword=pass
txindex=1
Using docker-komodo-smartcontracts
git clone https://github.com/imylomylo/docker-komodo-smartcontracts
cd docker-komodo-smartcontracts
sudo docker build -t kmd-cc .
(wait a short while)
sudo docker run -it --mount src=/home/mylo/docker-komodod-smartcontracts/node,target=/root/.komodo,type=bind --mount src=/home/mylo/.zcash-params,target=/root/.zcash-params,type=bind kmd-cc
(get dropped into a shell)
#############################################
TEST KEY