This repository has been archived by the owner on Apr 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d7561dd
commit a8bfd02
Showing
27 changed files
with
92 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
fail=$1 | ||
mcd --require-from $fail | ||
echo $(seth --to-address $ETH_FROM) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
mcd --require-ilk | ||
echo $(seth --to-bytes32 $(seth --from-ascii "$MCD_ILK")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
fail=$1 | ||
mcd --require-urn $fail | ||
export MCD_URN=${MCD_URN:-$ETH_FROM} | ||
seth --to-address $MCD_URN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
[ -n "$ETH_FROM" ] || mcd --fail "$1: ETH_FROM not set; transact from which account?" | ||
echo $(seth --to-address $ETH_FROM) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,49 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
mcd---require-ilk-opt | ||
echo $(seth --to-bytes32 $(seth --from-ascii "$MCD_ILK")) | ||
|
||
missing-deployment() { | ||
cat <<. | ||
Please specify which mcd deployment you wish to target: | ||
For example, try running against the latest kovan | ||
deployment by settig the chain option: | ||
mcd --chain=kovan <command> | ||
You could also try running against a remote testnet: | ||
List available testnets with: \`mcd testnet chains' | ||
and then set the chain option to a testnet id: | ||
mcd --chain=12899149080555595289 <command> | ||
You can also specify a path to a custom address config | ||
file when runing against deployments on a local testnet: | ||
mcd --config=path/to/out.addresses.json <command> | ||
For more options see \`mcd help'. | ||
. | ||
} | ||
|
||
[ -n "$MCD_VAT" ] || missing-deployment | ||
|
||
missing-ilk() { | ||
cat >&2 <<. | ||
Error: missing Ilk identifier | ||
You must specify an Ilk (collateral type) using the --ilk=<id> option. | ||
See \`mcd ilks' for a list of approved collateral types. | ||
. | ||
exit 1 | ||
} | ||
|
||
invalid-ilk() { | ||
cat >&2 <<. | ||
Error: invalid Ilk identifier | ||
The Ilk identifier $MCD_ILK is not a recognised collateral type. | ||
See \`mcd ilks' for a list of approved collateral types. | ||
. | ||
exit 1 | ||
} | ||
|
||
valid-ilks() { | ||
echo $(mcd ilks | cut -d ' ' -f 1) | ||
} | ||
|
||
[ -n "$MCD_ILK" ] || missing-ilk | ||
|
||
valid-ilks | grep -qE "\s$MCD_ILK\s|\s$MCD_ILK$" || invalid-ilk |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env bash | ||
mcd --require-ilk-opt | ||
mcd --require-ilk | ||
rate=$(mcd ilk rate) | ||
wad=$(bc <<< "scale=18; $1 / $rate") | ||
mcd frob 0 $wad |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env bash | ||
mcd --require-ilk-opt | ||
mcd --require-ilk | ||
rate=$(mcd ilk rate) | ||
wad=$(bc <<< "scale=18; $1 / $rate") | ||
mcd frob 0 -- -$wad |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters