Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
Update to version 0.2.13
Browse files Browse the repository at this point in the history
  • Loading branch information
gbalabasquer committed Sep 16, 2019
1 parent 4fd4d67 commit c69e8fb
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 87 deletions.
100 changes: 50 additions & 50 deletions libexec/mcd/conf/kovan.json
Original file line number Diff line number Diff line change
@@ -1,83 +1,83 @@
{
"DEPLOYER": "0x61de44946D6b809a30D8e6A236157966659f9640",
"MULTICALL": "0x45cb578f91fd7e1ebcf910d270814c7ddf9c3bdd",
"MULTICALL": "0x4414d9d8b56a917ffa25cda4c201956ece32a960",
"FAUCET": "0x94598157fcf0715c3bc9b4a35450cce82ac57b20",
"MCD_DEPLOY": "0x8d02bab52dc69f473b7ab65fc3b608c1d92746bd",
"MCD_DEPLOY": "0x73acbfb5b9413b0020164ee63dce4e1f71aba67c",
"MCD_GOV": "0xaaf64bfcc32d0f15873a02163e7e500671a4ffcd",
"MCD_GUARD": "0x9b265d2abc5248389f0e603963d22141304f7b18",
"MCD_ADM": "0xbe4bc5ed0bd879327e161ae57b8d59bb103bf56c",
"MCD_IOU": "0xe7f374ef2dfa4f33d99fa8237749fbf69532a867",
"VOTE_PROXY_FACTORY": "0xa3b66ac8d0b621a406b9f974ec68badd45bb18ef",
"MCD_VAT": "0xdf69460542dbdcf2f1e77941f53cfd4113a06183",
"MCD_JUG": "0x269b2ca90b8f5d8e0a78ec9e1ea43ec41f7d1477",
"MCD_CAT": "0xb30432fc29e1479240e9f107c1e333b962998f06",
"MCD_VOW": "0x022688b43bf76a9e6f4d3a96350ffde90a752d25",
"MCD_JOIN_DAI": "0x922253e8bb9905ae4d37bc9bd512db5c91b5ee6c",
"MCD_FLAP": "0x2f03d50e1fa1768b2c627e683d940911eea4449b",
"MCD_FLOP": "0xd86a529f008c092009334f0ea975e01d6d2dbf9a",
"MCD_PAUSE": "0x7c05a46d96a125ee8f084f600f33cd6432c48400",
"MCD_PAUSE_PROXY": "0xf11469b79f4836e53a63447f019d1806aaa749dc",
"MCD_GOV_ACTIONS": "0x05c0d17607d0b048fc7b4749be73f11698461a4b",
"MCD_DAI": "0xb64964e9c0b658aa7b448cdbddfcdccab26cc584",
"MCD_SPOT": "0xb61db7923f841740c96b24baec4805e522bb8594",
"MCD_POT": "0xe8fc4fc4d5ab7fa20be296277ef157a8b0ec20ce",
"MCD_END": "0xeb9df03edf12619648911b5101d911ebb3527adc",
"MCD_ESM": "0x509628df09de9b86af6650f90978412ed95c148d",
"PROXY_ACTIONS": "0xad5e4a739e950ee591861d034090c2b1e232dc15",
"CDP_MANAGER": "0x093a6036114813f951c82929c171c2e415539ffa",
"GET_CDPS": "0x672fa0c6ebe0bc93fc78acc064212181ac5a0c55",
"MCD_GUARD": "0x05b46c0228d651ddb1cbb03d2a9cc3fff03b1f4e",
"MCD_ADM": "0x844570155a4ad854241bde56af31e4a129ee2865",
"MCD_IOU": "0x15ac50da2b52ec1e78e16d51314daf83340890f3",
"VOTE_PROXY_FACTORY": "0xa0f10a8557f5a4562ea78421d7196657ffffb173",
"MCD_VAT": "0x1cc5abe5c0464f3af2a10df0c711236a8446bf75",
"MCD_JUG": "0x5a4e9bb2407cf12624dbf966fe88ab77c93fbf74",
"MCD_CAT": "0x48187b8b3ed3be81284c0a686a180b2b595e6d19",
"MCD_VOW": "0x32afee51c93d0bb71ff2e58af6b7b29cff5f8436",
"MCD_JOIN_DAI": "0xa9ac4ae91f3e933cbb12a4229c425b7cfd3ac458",
"MCD_FLAP": "0x11e92e6116935b314db7af800d2fb4adedcc2830",
"MCD_FLOP": "0xa806168abccd3c8cbc07ee4a87b16b14b874ffcf",
"MCD_PAUSE": "0x6e28539bd0c2ae67cd806bb69baf8682c20bad68",
"MCD_PAUSE_PROXY": "0x905490e12bcf3843ef75bd9e778188b91780c451",
"MCD_GOV_ACTIONS": "0x87300d074bdfea75d708448d37331e572730579e",
"MCD_DAI": "0x98738f2ca303a7e8bf22b252e4418f2b14bbdfa2",
"MCD_SPOT": "0xa5aa0fb23322ff0a60832bb08cd0d360a71413c1",
"MCD_POT": "0x3d9afbed6ee2c2d17749b003875eaa38c0ce0c7f",
"MCD_END": "0x0f748fd0235b3744a40b0171737ffa492042f8dc",
"MCD_ESM": "0xd757d65441205335621554a3c32a3d3c1fe77aad",
"PROXY_ACTIONS": "0xfd561c946cd13a82962e1a28978b305560ccd009",
"CDP_MANAGER": "0x89db53b3a774e6c29c4db596281f3ca3e1247610",
"GET_CDPS": "0x4ef9c49aae6419f3e2663d31aa104341b8ad3db1",
"PROXY_FACTORY": "0xe11e3b391f7e8bc47247866af32af67dd58dc800",
"PROXY_REGISTRY": "0x64a436ae831c1672ae81f674cab8b6775df3475c",
"ETH": "0xd0a1e359811322d97991e03f863a0c30c2cf029c",
"VAL_ETH": "0x75dd74e8afe8110c8320ed397cccff3b8134d981",
"PIP_ETH": "0x75dd74e8afe8110c8320ed397cccff3b8134d981",
"MCD_JOIN_ETH_A": "0xc6d2c6ac2155461d41621eac97ca0e42cd8c6805",
"MCD_FLIP_ETH_A": "0x02b6c914e29ee4d310e6b8e24340a8a643627d44",
"MCD_JOIN_ETH_B": "0xcf9a5fe859b4797630141f156c597281d824d62d",
"MCD_FLIP_ETH_B": "0x30a1d49da153d12bb74e3a273a21850a1e484a45",
"MCD_JOIN_ETH_C": "0x3b8ed141f5961ba98527f30723cd90c028c4ec94",
"MCD_FLIP_ETH_C": "0xc7fd00f35e77f40034a775feb88cbc6e4e88fbbc",
"MCD_JOIN_ETH_A": "0xaaf1114db4b7ab3cf67015358326e0805af3aea5",
"MCD_FLIP_ETH_A": "0xd8efe36a4e25de8bad875c8340b86975bb363cf1",
"MCD_JOIN_ETH_B": "0x85f16b70d62e04f4cdcd2b1378e657e563479732",
"MCD_FLIP_ETH_B": "0x62eaaee46eaf4a9c57e0859702906967627a0dc5",
"MCD_JOIN_ETH_C": "0x32c228b77afdb55b776c863a2036875bb9861853",
"MCD_FLIP_ETH_C": "0x5c427c040630e9b826b584b55b517c1194634676",
"REP": "0xc7aa227823789e363f29679f23f7e8f6d9904a9b",
"VAL_REP": "0x5debc8c4124db0c1d3bad99e69287a576c7b2ccc",
"PIP_REP": "0x5debc8c4124db0c1d3bad99e69287a576c7b2ccc",
"MCD_JOIN_REP_A": "0x2c205dd1a49b17d24062e72b2fd4585c643359fb",
"MCD_FLIP_REP_A": "0x4ef2bede48b106151e75b58ee73c85a4ef444adc",
"MCD_JOIN_REP_A": "0x8218a5a1ff5320e763127320a1a2c5f16e2e5933",
"MCD_FLIP_REP_A": "0xf6fe0cfe07acc9e1ad9165e5bb831fa97f619a33",
"ZRX": "0x18392097549390502069c17700d21403ea3c721a",
"VAL_ZRX": "0xc010f1bbde279a5bb05c93f5fc902293d5a9f7a9",
"PIP_ZRX": "0xc010f1bbde279a5bb05c93f5fc902293d5a9f7a9",
"MCD_JOIN_ZRX_A": "0x3d030db261162992484efad43174fce231b0984c",
"MCD_FLIP_ZRX_A": "0xb08a9c38f184c7e0b7468e6fb3923a1121a23cb0",
"MCD_JOIN_ZRX_A": "0xcd0b608aaf35c81e6e3f132425244671948e16e9",
"MCD_FLIP_ZRX_A": "0x770e18b9779704a17dc108a3ca0537959a9e3028",
"OMG": "0x441b1a74c69ee6e631834b626b29801d42076d38",
"VAL_OMG": "0x1e9740f61e80650a60ba70f2d0b477fb85db2b03",
"PIP_OMG": "0x1e9740f61e80650a60ba70f2d0b477fb85db2b03",
"MCD_JOIN_OMG_A": "0x7ee813838fb9eef4b46ea1756380e16f2db51669",
"MCD_FLIP_OMG_A": "0x3f3fea4e1e8a21c0517eccb034b97ea7756ecea4",
"MCD_JOIN_OMG_A": "0x29a0f01ad97932b06e351b8b62dbe47866a2bf3f",
"MCD_FLIP_OMG_A": "0xfffc89adca194e4afbe7849f71d587e9b3909138",
"BAT": "0x9f8cfb61d3b2af62864408dd703f9c3beb55dff7",
"VAL_BAT": "0x5c40c9eb35c76069fa4c3a00ea59fac6ffa9c113",
"PIP_BAT": "0x5c40c9eb35c76069fa4c3a00ea59fac6ffa9c113",
"MCD_JOIN_BAT_A": "0x9ca955e44ebdd69d070e4a62653b73d82b4e82ba",
"MCD_FLIP_BAT_A": "0x7b0f4c12003ab881ecc11d9d12f15d3f8fe9fcff",
"MCD_JOIN_BAT_A": "0xe7f38ef2254849b2c5fd8f081fd19564818d64a5",
"MCD_FLIP_BAT_A": "0x2e389062d5691dd9d0a6164d5031e7c9b797ea41",
"DGD": "0x62aeec5fb140bb233b1c5612a8747ca1dc56dc1b",
"VAL_DGD": "0x112bf99e873317643fbfcc22d197e3e01b825cb0",
"PIP_DGD": "0x112bf99e873317643fbfcc22d197e3e01b825cb0",
"MCD_JOIN_DGD_A": "0xc269c2b400f560668ec15d04767607f60be46947",
"MCD_FLIP_DGD_A": "0x2768a3436d51fd7b6f0ef002b46912e423920721",
"MCD_JOIN_DGD_A": "0x5d6c21fa48b467f0dbe4ebf4f2b5852bc1f9c25a",
"MCD_FLIP_DGD_A": "0x28e14dc5d69662585bb36523c7e8cf0f664de66e",
"GNT": "0xc81ba844f451d4452a01bbb2104c1c4f89252907",
"VAL_GNT": "0xf46e96a6f23fdcb5870f0ac0dbe9d2c605485ddc",
"PIP_GNT": "0xf46e96a6f23fdcb5870f0ac0dbe9d2c605485ddc",
"MCD_JOIN_GNT_A": "0xb8dbbd75ebf7de71815177ff43b809c428702260",
"MCD_FLIP_GNT_A": "0xb831251366a991f8a867f7f3bb1c720a7e12900f",
"MCD_JOIN_GNT_A": "0xec7d8e7251c2aa4b897247f3e5e85297d860b875",
"MCD_FLIP_GNT_A": "0x7042d5752556d3b6ee01dbef29c1a00d35a45d63",
"SAI": "0xc4375b7de8af5a38a93548eb8453a498222c4ff2",
"PIP_SAI": "0x0000000000000000000000000000000000000001",
"MCD_JOIN_SAI": "0x92424ca1df17c48d6be8448173bb10366120df0b",
"MCD_FLIP_SAI": "0x2f4e4a5507db5dc4e07bb949cbb0135b06f9885c",
"PROXY_PAUSE_ACTIONS": "0x317e4d435a9c067529b985aa55fce8a92153f0fd",
"MCD_JOIN_SAI": "0x281af9641cd36fb0199821be56b14b84282d812b",
"MCD_FLIP_SAI": "0x3dedf18560200aa9d733ac140f01ceb87b6fbd4d",
"PROXY_PAUSE_ACTIONS": "0x09ccfe3be9f41519232e9c60539495fd5c181c44",
"PROXY_DEPLOYER": "0x818a81dd914e89a4698869ee54c8e2c056bfda03",
"SAI_TUB": "0xa71937147b55deb8a530c7229c442fd3f31b7db2",
"MIGRATION": "0x1276d811b96bfa2413a28ff062eb854e42af94f5",
"MIGRATION_PROXY_ACTIONS": "0x53283da4dddac7cda87fd01458c6ceed32451b21",
"GOV_POLL_GEN": "0x9211500996c12f833574ec6819ba0a87227fd840",
"MIGRATION": "0x786e119d9ee56ac6f5741ada57415cede8df75df",
"MIGRATION_PROXY_ACTIONS": "0x965b1644ccd7e6a76b51b6f276a60b8cd3a77b43",
"GOV_POLL_GEN": "0xe23676703103a567a26fa0c0ed072942efa41cea",
"POLL_ID": "0",
"VOTE_YES": "0x6f0710bf5fd566933ee3f3fd17c7c859ddb0eedd",
"VOTE_NO": "0x7995d41a52e5f7145aca41e6d9cdde30323342f6"
"VOTE_YES": "0x2e0c12db60cb79a0981c27ca3265584898030e53",
"VOTE_NO": "0xee10a95bca8d6ca5d081429fdabd6183ca450879"
}
24 changes: 14 additions & 10 deletions libexec/mcd/mcd-flops
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
###
### Commands: ls List recent flop auctions
### beg Minimum bid increase
### pad Lot increase for tick
### ttl Max bid lifetime
### end Max auction duration
### count Total auction count
Expand All @@ -18,33 +19,36 @@ case $1 in
export ETH_BLOCK=${ETH_BLOCK:-$(mcd --from-block)}
sig="Kick(uint256,uint256,uint256,address)"
sig=$(seth keccak "$(seth --from-ascii $sig)")
seth logs ${MCD_FLOP?} $sig |
seth logs "${MCD_FLOP?}" "$sig" |
while read -r log; do
tx=$(jshon -e transactionHash -u <<<"$log")
block=$(seth --to-dec $(jshon -e blockNumber -u <<<"$log"))
topics=($(jshon -e topics -a -u <<<"$log"))
block=$(seth --to-dec "$(jshon -e blockNumber -u <<<"$log")")
topics=("$(jshon -e topics -a -u <<<"$log")")
data=$(jshon -e data -u <<<"$log")

echo "id $(seth --to-dec ${data:2:64})"
echo "lot $(mcd --to-wad ${data:66:64})"
echo "bid $(mcd --to-rad ${data:130:64})"
echo "id $(seth --to-dec "${data:2:64}")"
echo "lot $(mcd --to-wad "${data:66:64}")"
echo "bid $(mcd --to-rad "${data:130:64}")"
echo "gal 0x${topics[1]:26:64}"
echo "tx: $tx";
echo "block: $block";
echo
done
};;
beg) {
mcd --to-ray $(seth call ${MCD_FLOP?} 'beg()(uint)')
mcd --to-ray "$(seth call "${MCD_FLOP?}" 'beg()(uint)')"
};;
pad) {
mcd --to-ray "$(seth call "${MCD_FLOP?}" 'pad()(uint)')"
};;
ttl) {
seth --to-dec $(seth call ${MCD_FLOP?} 'ttl()(uint48)')
seth --to-dec "$(seth call "${MCD_FLOP?}" 'ttl()(uint48)')"
};;
tau) {
seth --to-dec $(seth call ${MCD_FLOP?} 'tau()(uint48)')
seth --to-dec "$(seth call "${MCD_FLOP?}" 'tau()(uint48)')"
};;
count) {
seth --to-dec $(seth call ${MCD_FLOP?} 'kicks()(uint48)')
seth --to-dec "$(seth call "${MCD_FLOP?}" 'kicks()(uint48)')"
};;
+([[:digit:]]) ) {
mcd-flops-cmd "${@}"
Expand Down
57 changes: 30 additions & 27 deletions libexec/mcd/mcd-vow
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,43 @@
### mcd vow Sin
set -e

p() { printf "%-4s %-20s %-10s\n" "$1" "$2" "$3"; }
p() { printf "%-4s %-48s %-10s\n" "$1" "$2" "$3"; }

mcd-vow() {
exec 3< <(mcd vow Sin)
exec 4< <(mcd vow Ash)
exec 5< <(mcd vow wait)
exec 6< <(mcd vow sump)
exec 7< <(mcd vow bump)
exec 8< <(mcd vow hump)
exec 9< <(mcd vow Awe)
exec 10< <(mcd vow Joy)
exec 11< <(mcd vow Woe)
p "Sin" $(cat <&3) "Queued debt"
p "Ash" $(cat <&4) "On-auction debt"
p "wait" $(cat <&5) "Flop delay"
p "sump" $(cat <&6) "Flop lot size"
p "bump" $(cat <&7) "Flap lot size"
p "hump" $(cat <&8) "Surplus buffer size"
p "Awe" $(cat <&9) "Total deficit"
p "Joy" $(cat <&10) "Total surplus"
p "Woe" $(cat <&11) "Un-queued pre-auction debt"
exec 6< <(mcd vow dump)
exec 7< <(mcd vow sump)
exec 8< <(mcd vow bump)
exec 9< <(mcd vow hump)
exec 10< <(mcd vow Awe)
exec 11< <(mcd vow Joy)
exec 12< <(mcd vow Woe)
p "Sin" "$(cat <&3)" "Queued debt"
p "Ash" "$(cat <&4)" "On-auction debt"
p "wait" "$(cat <&5)" "Flop delay"
p "dump" "$(cat <&6)" "Flop initial lot size"
p "sump" "$(cat <&7)" "Flop fixed bid size"
p "bump" "$(cat <&8)" "Flap lot size"
p "hump" "$(cat <&9)" "Surplus buffer size"
p "Awe" "$(cat <&10)" "Total deficit"
p "Joy" "$(cat <&11)" "Total surplus"
p "Woe" "$(cat <&12)" "Un-queued pre-auction debt"
}

case $1 in
Sin) mcd --to-rad $(seth call "${MCD_VOW}" 'Sin()(uint256)' ); ;;
Ash) mcd --to-rad $(seth call "${MCD_VOW}" 'Ash()(uint256)' ); ;;
wait) mcd --to-rad $(seth call "${MCD_VOW}" 'wait()(uint256)'); ;;
sump) mcd --to-rad $(seth call "${MCD_VOW}" 'sump()(uint256)'); ;;
bump) mcd --to-rad $(seth call "${MCD_VOW}" 'bump()(uint256)'); ;;
hump) mcd --to-rad $(seth call "${MCD_VOW}" 'hump()(uint256)'); ;;
Awe) mcd --to-rad $(seth call "${MCD_VAT}" 'sin(address)' $MCD_VOW ); ;;
Joy) mcd --to-rad $(seth call "${MCD_VAT}" 'dai(address)' $MCD_VOW ); ;;
Woe) printf '%.45f\n' $(bc <<< "$(mcd vow Awe) - $(mcd vow Sin) - $(mcd vow Ash)") ;;
sin) mcd vow-sin $2; ;;
"") mcd-vow; ;;
Sin) mcd --to-rad "$(seth call "${MCD_VOW}" 'Sin()(uint256)' )"; ;;
Ash) mcd --to-rad "$(seth call "${MCD_VOW}" 'Ash()(uint256)' )"; ;;
wait) mcd --to-rad "$(seth call "${MCD_VOW}" 'wait()(uint256)')"; ;;
dump) mcd --to-wad "$(seth call "${MCD_VOW}" 'dump()(uint256)')"; ;;
sump) mcd --to-rad "$(seth call "${MCD_VOW}" 'sump()(uint256)')"; ;;
bump) mcd --to-rad "$(seth call "${MCD_VOW}" 'bump()(uint256)')"; ;;
hump) mcd --to-rad "$(seth call "${MCD_VOW}" 'hump()(uint256)')"; ;;
Awe) mcd --to-rad "$(seth call "${MCD_VAT}" 'sin(address)' "$MCD_VOW" )"; ;;
Joy) mcd --to-rad "$(seth call "${MCD_VAT}" 'dai(address)' "$MCD_VOW" )"; ;;
Woe) printf '%.45f\n' "$(bc <<< "$(mcd vow Awe) - $(mcd vow Sin) - $(mcd vow Ash)")" ;;
sin) mcd vow-sin "$2"; ;;
"") mcd-vow; ;;
*) mcd help vow;
esac

0 comments on commit c69e8fb

Please sign in to comment.