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.14
Browse files Browse the repository at this point in the history
  • Loading branch information
gbalabasquer committed Oct 1, 2019
1 parent 0471c20 commit 73b1fb0
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 70 deletions.
102 changes: 52 additions & 50 deletions libexec/mcd/conf/kovan.json
Original file line number Diff line number Diff line change
@@ -1,83 +1,85 @@
{
"DEPLOYER": "0x61de44946D6b809a30D8e6A236157966659f9640",
"MULTICALL": "0x4414d9d8b56a917ffa25cda4c201956ece32a960",
"MULTICALL": "0x1b1062857a438bb002acf2832cafe36ae389f15d",
"FAUCET": "0x94598157fcf0715c3bc9b4a35450cce82ac57b20",
"MCD_DEPLOY": "0x73acbfb5b9413b0020164ee63dce4e1f71aba67c",
"MCD_DEPLOY": "0xa5381c87e89ad71893e4f311fa3db92e18a83184",
"MCD_GOV": "0xaaf64bfcc32d0f15873a02163e7e500671a4ffcd",
"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",
"GOV_GUARD": "",
"MCD_ADM": "0x1394f42f48b7e4910f0c765e18ca5028cc64c26a",
"MCD_IOU": "0x33b187d276534cecc41921c42c7dc24a7ffec45f",
"VOTE_PROXY_FACTORY": "0xf9f26ce6b18a62bd2aa782139fc4b7b6e2325293",
"MCD_VAT": "0x6e6073260e1a77dfaf57d0b92c44265122da8028",
"MCD_JUG": "0x3793181ebbc1a72cc08ba90087d21c7862783fa5",
"MCD_CAT": "0xdd9eff17f24f42adef1b240fc5dafba2aa6dcefd",
"MCD_VOW": "0xdc02a6b2ecd2ed6c54a5ec1f1585fe82137d31dd",
"MCD_JOIN_DAI": "0x61af28390d0b3e806bbaf09104317cb5d26e215d",
"MCD_FLAP": "0x6ef903c89c469d81bb685fdec9c845559b0e4d94",
"MCD_FLOP": "0x60d5a91cd212164f5c24ee8b9dee841b0aa7065e",
"MCD_PAUSE": "0x15461247ca3df9bdc684d6724fec59968f630800",
"MCD_PAUSE_PROXY": "0xec53c1ea08dba355762edd009d21bfef9c620ca4",
"MCD_GOV_ACTIONS": "0x6c6c45cbc6a6e3a5e7dfd5b38f784af730d3e0f1",
"MCD_DAI": "0x1f9beaf12d8db1e50ea8a5ed53fb970462386aa0",
"MCD_SPOT": "0xf5cdfce5a0b85ff06654ef35f4448e74c523c5ac",
"MCD_POT": "0x24e89801dad4603a3e2280ee30fb77f183cb9ed9",
"MCD_END": "0xaf2bd74a519f824483e3a2cea9058fbe6bdac036",
"MCD_ESM": "0x0f3582be7281022fca2ea5dc4c106983437d7de0",
"PROXY_ACTIONS": "0xc21274797a01e133ebd9d79b23498edbd7166137",
"PROXY_ACTIONS_END": "0x45da208fb53a8d60eeea2a055908ee82d0a6485a",
"PROXY_ACTIONS_DSR": "0x8b31ef27d7708a7e24b43d352e837b9486b2b961",
"CDP_MANAGER": "0x1cb0d969643af4e929b3fafa5ba82950e31316b8",
"GET_CDPS": "0xb5907a51e3b747dbf9d5125ab77eff3a55e50b7d",
"PROXY_FACTORY": "0xe11e3b391f7e8bc47247866af32af67dd58dc800",
"PROXY_REGISTRY": "0x64a436ae831c1672ae81f674cab8b6775df3475c",
"ETH": "0xd0a1e359811322d97991e03f863a0c30c2cf029c",
"VAL_ETH": "0x75dd74e8afe8110c8320ed397cccff3b8134d981",
"PIP_ETH": "0x75dd74e8afe8110c8320ed397cccff3b8134d981",
"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",
"MCD_JOIN_ETH_A": "0xc3abba566bb62c09b7f94704d8dfd9800935d3f9",
"MCD_FLIP_ETH_A": "0x494d6664a6b305f1f6dbded879f01e5dc1ea8b55",
"MCD_JOIN_ETH_B": "0x960fb16406b56fdd7e2800fca5457f524a393877",
"MCD_FLIP_ETH_B": "0x34cb09e935a1f19f2feb250c31137e67f127975e",
"MCD_JOIN_ETH_C": "0x17fb91117feed678a9de18fb1e1d0f1fe8ec24e1",
"MCD_FLIP_ETH_C": "0x0a923697e384b83a6be800fa1d3e98816381f26b",
"REP": "0xc7aa227823789e363f29679f23f7e8f6d9904a9b",
"VAL_REP": "0x5debc8c4124db0c1d3bad99e69287a576c7b2ccc",
"PIP_REP": "0x5debc8c4124db0c1d3bad99e69287a576c7b2ccc",
"MCD_JOIN_REP_A": "0x8218a5a1ff5320e763127320a1a2c5f16e2e5933",
"MCD_FLIP_REP_A": "0xf6fe0cfe07acc9e1ad9165e5bb831fa97f619a33",
"MCD_JOIN_REP_A": "0xebbd300bb527f1d50abd937f8ca11d7fd0e5b68b",
"MCD_FLIP_REP_A": "0x096f6bb4ad63d9c2787bb2be77a5a7ea74a35826",
"ZRX": "0x18392097549390502069c17700d21403ea3c721a",
"VAL_ZRX": "0xc010f1bbde279a5bb05c93f5fc902293d5a9f7a9",
"PIP_ZRX": "0xc010f1bbde279a5bb05c93f5fc902293d5a9f7a9",
"MCD_JOIN_ZRX_A": "0xcd0b608aaf35c81e6e3f132425244671948e16e9",
"MCD_FLIP_ZRX_A": "0x770e18b9779704a17dc108a3ca0537959a9e3028",
"MCD_JOIN_ZRX_A": "0x79f15b0da982a99b7bcf602c8f384c56f0b0e8cd",
"MCD_FLIP_ZRX_A": "0x2f5979b27cdc809a85300e1902827c2bd2dcc155",
"OMG": "0x441b1a74c69ee6e631834b626b29801d42076d38",
"VAL_OMG": "0x1e9740f61e80650a60ba70f2d0b477fb85db2b03",
"PIP_OMG": "0x1e9740f61e80650a60ba70f2d0b477fb85db2b03",
"MCD_JOIN_OMG_A": "0x29a0f01ad97932b06e351b8b62dbe47866a2bf3f",
"MCD_FLIP_OMG_A": "0xfffc89adca194e4afbe7849f71d587e9b3909138",
"MCD_JOIN_OMG_A": "0x7d9f9e9ac1c768be3f9c241ad9420e9ac37688e4",
"MCD_FLIP_OMG_A": "0x0617245c06b75b27e97b3174e2e3ef79b2af837b",
"BAT": "0x9f8cfb61d3b2af62864408dd703f9c3beb55dff7",
"VAL_BAT": "0x5c40c9eb35c76069fa4c3a00ea59fac6ffa9c113",
"PIP_BAT": "0x5c40c9eb35c76069fa4c3a00ea59fac6ffa9c113",
"MCD_JOIN_BAT_A": "0xe7f38ef2254849b2c5fd8f081fd19564818d64a5",
"MCD_FLIP_BAT_A": "0x2e389062d5691dd9d0a6164d5031e7c9b797ea41",
"MCD_JOIN_BAT_A": "0xf8e9b4c3e17c1a2d55767d44fb91feed798bb7e8",
"MCD_FLIP_BAT_A": "0x6c5812f6db86aebdc54a0fcbf3bfd29884feb2f9",
"DGD": "0x62aeec5fb140bb233b1c5612a8747ca1dc56dc1b",
"VAL_DGD": "0x112bf99e873317643fbfcc22d197e3e01b825cb0",
"PIP_DGD": "0x112bf99e873317643fbfcc22d197e3e01b825cb0",
"MCD_JOIN_DGD_A": "0x5d6c21fa48b467f0dbe4ebf4f2b5852bc1f9c25a",
"MCD_FLIP_DGD_A": "0x28e14dc5d69662585bb36523c7e8cf0f664de66e",
"MCD_JOIN_DGD_A": "0x92a3b1c0882e6e17aa41c5116e01b0b9cf117cf2",
"MCD_FLIP_DGD_A": "0x6ee776b367191fad854df97ef267462053af283d",
"GNT": "0xc81ba844f451d4452a01bbb2104c1c4f89252907",
"VAL_GNT": "0xf46e96a6f23fdcb5870f0ac0dbe9d2c605485ddc",
"PIP_GNT": "0xf46e96a6f23fdcb5870f0ac0dbe9d2c605485ddc",
"MCD_JOIN_GNT_A": "0xec7d8e7251c2aa4b897247f3e5e85297d860b875",
"MCD_FLIP_GNT_A": "0x7042d5752556d3b6ee01dbef29c1a00d35a45d63",
"MCD_JOIN_GNT_A": "0xc28d56522280d20c1c33b239a8e8ffef1c2d5457",
"MCD_FLIP_GNT_A": "0x61069f909772cf5a8442e888c47fc012148a81c4",
"SAI": "0xc4375b7de8af5a38a93548eb8453a498222c4ff2",
"PIP_SAI": "0x0000000000000000000000000000000000000001",
"MCD_JOIN_SAI": "0x281af9641cd36fb0199821be56b14b84282d812b",
"MCD_FLIP_SAI": "0x3dedf18560200aa9d733ac140f01ceb87b6fbd4d",
"PROXY_PAUSE_ACTIONS": "0x09ccfe3be9f41519232e9c60539495fd5c181c44",
"MCD_JOIN_SAI": "0x92ea67bb099af9900ffbd996e7b94e7667e860dc",
"MCD_FLIP_SAI": "0x0800e1fd813b68fc29c3cd6532c4747946133ffd",
"PROXY_PAUSE_ACTIONS": "0x5e6b5d90cb8916e4175b75b85095b219745242ff",
"PROXY_DEPLOYER": "0x818a81dd914e89a4698869ee54c8e2c056bfda03",
"SAI_TUB": "0xa71937147b55deb8a530c7229c442fd3f31b7db2",
"MIGRATION": "0x786e119d9ee56ac6f5741ada57415cede8df75df",
"MIGRATION_PROXY_ACTIONS": "0x965b1644ccd7e6a76b51b6f276a60b8cd3a77b43",
"GOV_POLL_GEN": "0xe23676703103a567a26fa0c0ed072942efa41cea",
"MIGRATION": "0xd18abc7ab304952ec23dd7495fb3e7d0ee571c2d",
"MIGRATION_PROXY_ACTIONS": "0x1abd563a0156e3983bbb8e0a37d61e5b0ce4339d",
"GOV_POLL_GEN": "0xefd4997a5a2f42f9ee69ef7e6108176137cc96e4",
"POLL_ID": "0",
"VOTE_YES": "0x2e0c12db60cb79a0981c27ca3265584898030e53",
"VOTE_NO": "0xee10a95bca8d6ca5d081429fdabd6183ca450879"
"VOTE_YES": "0xcee57ae5e41b273882c247461c7183737e4be22e",
"VOTE_NO": "0x787b0d03eccb92465c788528785c4c9a17916dc3"
}
14 changes: 8 additions & 6 deletions libexec/mcd/mcd-cdp-cmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ require-wad() {
wad=$(seth --to-uint256 "$(seth --to-wei "$1" eth)")
}

proxy=$(mcd --proxy-address)

case $act in
lock) {
export ETH_GAS=${ETH_GAS:-300000}
Expand All @@ -28,8 +30,8 @@ case $act in
export ETH_GAS=${ETH_GAS:-300000}
require-wad "$1"
mcd --gem-approve "$MCD_PROXY" "$1"
sig="safeLockGem(address,address,uint,uint,bool)"
mcd --proxy-exec $sig "${CDP_MANAGER?}" "$(mcd gem adapter)" "$hex" "$wad" 1
sig="safeLockGem(address,address,uint,uint,bool,address)"
mcd --proxy-exec $sig "${CDP_MANAGER?}" "$(mcd gem adapter)" "$hex" "$wad" 1 "$proxy"

[[ $SETH_ASYNC != yes ]] && mcd cdp "$cdp" urn
};;
Expand Down Expand Up @@ -64,8 +66,8 @@ case $act in
require-wad "$1"
export MCD_TOKEN=$MCD_DAI
mcd --dai-approve "$MCD_PROXY"
sig="safeWipe(address,address,uint,uint)"
mcd --proxy-exec $sig "${CDP_MANAGER?}" "$MCD_JOIN_DAI" "$hex" "$wad"
sig="safeWipe(address,address,uint,uint,address)"
mcd --proxy-exec $sig "${CDP_MANAGER?}" "$MCD_JOIN_DAI" "$hex" "$wad" "$proxy"

[[ $SETH_ASYNC != yes ]] && mcd cdp "$cdp" urn
};;
Expand All @@ -82,8 +84,8 @@ case $act in
export ETH_GAS=${ETH_GAS:-250000}
export MCD_TOKEN=$MCD_DAI
mcd --dai-approve "$MCD_PROXY"
sig="safeWipeAll(address,address,uint)"
mcd --proxy-exec $sig "${CDP_MANAGER?}" "$MCD_JOIN_DAI" "$hex"
sig="safeWipeAll(address,address,uint,address)"
mcd --proxy-exec $sig "${CDP_MANAGER?}" "$MCD_JOIN_DAI" "$hex" "$proxy"

[[ $SETH_ASYNC != yes ]] && mcd cdp "$cdp" urn
};;
Expand Down
2 changes: 1 addition & 1 deletion libexec/mcd/mcd-flaps
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ case $1 in
done
};;
beg) {
mcd --to-ray "$(seth call "${MCD_FLAP?}" 'beg()(uint)')"
mcd --to-wad "$(seth call "${MCD_FLAP?}" 'beg()(uint)')"
};;
ttl) {
seth --to-dec "$(seth call "${MCD_FLAP?}" 'ttl()(uint48)')"
Expand Down
22 changes: 11 additions & 11 deletions libexec/mcd/mcd-flips
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,36 @@ case $1 in
export ETH_BLOCK=${ETH_BLOCK:-$(mcd --from-block)}
sig="Kick(uint256,uint256,uint256,uint256,address,address)"
sig=$(seth keccak "$(seth --from-ascii $sig)")
seth logs $FLIPPER $sig |
seth logs "$FLIPPER" "$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 "id $(seth --to-dec "${data:2:64}")"
echo "urn 0x${topics[1]:26:64}"
echo "lot $(mcd --to-wad ${data:66:64})"
echo "tab $(mcd --to-rad ${data:218:64})"
echo "lot $(mcd --to-wad "${data:66:64}")"
echo "tab $(mcd --to-rad "${data:218:64}")"
echo "tx: $tx";
echo "block: $block";
echo
done
};;
beg) {
mcd --to-ray $(seth call $FLIPPER 'beg()(uint)')
mcd --to-wad "$(seth call "$FLIPPER" 'beg()(uint)')"
};;
ttl) {
seth --to-dec $(seth call $FLIPPER 'ttl()(uint48)')
seth --to-dec "$(seth call "$FLIPPER" 'ttl()(uint48)')"
};;
tau) {
seth --to-dec $(seth call $FLIPPER 'tau()(uint48)')
seth --to-dec "$(seth call "$FLIPPER" 'tau()(uint48)')"
};;
count) {
seth --to-dec $(seth call $FLIPPER 'kicks()(uint48)')
seth --to-dec "$(seth call "$FLIPPER" 'kicks()(uint48)')"
};;
+([[:digit:]]) ) {
mcd-flips-cmd $FLIPPER "${@}"
mcd-flips-cmd "$FLIPPER" "${@}"
};;
*) {
mcd help flips
Expand Down
4 changes: 2 additions & 2 deletions libexec/mcd/mcd-flops
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ case $1 in
done
};;
beg) {
mcd --to-ray "$(seth call "${MCD_FLOP?}" 'beg()(uint)')"
mcd --to-wad "$(seth call "${MCD_FLOP?}" 'beg()(uint)')"
};;
pad) {
mcd --to-ray "$(seth call "${MCD_FLOP?}" 'pad()(uint)')"
mcd --to-wad "$(seth call "${MCD_FLOP?}" 'pad()(uint)')"
};;
ttl) {
seth --to-dec "$(seth call "${MCD_FLOP?}" 'ttl()(uint48)')"
Expand Down

0 comments on commit 73b1fb0

Please sign in to comment.