Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

did:3:bafyreiczijmdx5ogo4gdjjxrgwspcn3jbgcuqp2wnzwbcmturgnpdlywva
@p-s-dev
p-s-dev / CompFiSupplyBorrow.sol
Created April 3, 2019 21:54
Return all CompFi token supply/borrow values in 1 call
contract IMoneyMarket {
function getSupplyBalance(address account, address asset) view public returns (uint);
function getBorrowBalance(address account, address asset) view public returns (uint);
}
contract AllComFiTokens {
address public bat;
address public dai;
address public rep;
@p-s-dev
p-s-dev / RewardSplitter.sol
Created July 6, 2018 22:24
RewardSplitter
pragma solidity ^0.4.2;
interface MasternodeRegistrationInterface {
function nodeRegistration() public payable;
function disableNode() public;
function withdrawStake() public;
function nodeRegistrationEnabled() public constant returns(bool);
function nodeCost() public constant returns(uint256);
}

Keybase proof

I hereby claim:

  • I am p-s-dev on github.
  • I am psdev (https://keybase.io/psdev) on keybase.
  • I have a public key ASAqMpUqdnoaxJlrhqC0tsH-6oiKxv6QknWBN0TudXXj5Qo

To claim this, I am signing this object:

@p-s-dev
p-s-dev / bootstrap_ecs_host.sh
Last active July 2, 2017 23:56
commands to run when an ecs host starts
#!/bin/bash
sudo su ec2-user
cd
curl -O https://bootstrap.pypa.io/get-pip.py
sudo apt-get install -yy python-minimal
python get-pip.py --user
pip install awscli --upgrade --user
@p-s-dev
p-s-dev / Dockerfile
Created May 30, 2017 15:48
nginx forward 80 to 443
FROM nginx:mainline-alpine
COPY default.conf /etc/nginx/conf.d/
@p-s-dev
p-s-dev / install_awscli.sh
Created May 23, 2017 22:15
install aws cli
#!/bin/bash
curl -O https://bootstrap.pypa.io/get-pip.py
python get-pip.py --user
pip install awscli --upgrade --user
aws configure
#!/bin/bash
geth --preload 'monitorBlocks.js' attach
SELECT
to
FROM
[etherquery:ethereum.transactions]
WHERE
hash IN (
SELECT
hash
FROM
[etherquery:ethereum.transactions]
SELECT
REPLACE(d.logs.topics,'000000000000000000000000','') AS [voter],
BOOLEAN(REPLACE(d.logs.topics,'000000000000000000000000','') != [c.a.from]) AS proxy_vote,
INTEGER(FLOAT(c.a.logs.topics)) AS prop,
d.vote AS vote,
d.blocknumber,
d.timestamp,
c.a.hash,
[c.a.from] AS [from]
FROM (