Skip to content

Instantly share code, notes, and snippets.

View davekaj's full-sized avatar
🎯
Focusing

Dave davekaj

🎯
Focusing
View GitHub Profile
@davekaj
davekaj / TokenRegistry.abi
Created February 15, 2020 22:54
token registry
[{"constant":false,"inputs":[{"name":"_newCharter","type":"bytes32"}],"name":"updateCharter","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"reserveBank","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"applicationFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"members","outputs":[{"name":"challengeID","type":"uint256"},{"name":"membershipStartTime","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"challengeDeposit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"erc1056Registry","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"
/*
AccrueInterest() - updates the market total borrows and lends. If we mimic this, we can
get the pseudo values of accrue interest based on the block delta from the last time
accrue interest was calculated. What follows is a breakdown of what we need
to calculate to get the pseudo values for the market
Note you'll have to handle big numbers being returned. The mantissa makes a lot of calculations hard to follow, along
with the decimals of each token.... care must be taken here! Although the output values are easy to verify, if you are
wrong you are usually wrong by 10^18, or other big exponents.
@davekaj
davekaj / cosmos-async.py
Created June 27, 2018 22:06
send async commands over the cosmos network
account2="cosmosaccaddr1mq93l3s2zml6nn97rmwlqhdw7gf6h0hgagyjun"
name2="dave-node2"
pass2="12345678"
sequence2=27
account3="cosmosaccaddr1j22rgj5znf0rp0g7gsrv9sndk2qxuxqevkmpej"
name3="dave-node3"
pass3="12345678"
sequence3=23
0xd912AeCb07E9F4e1eA8E6b4779e7Fb6Aa1c3e4D8
0xB42C6dEFa04234F0b7C956F9334D8533EecFD6AF
0xB42C6dEFa04234F0b7C956F9334D8533EecFD6AF