This repository was archived by the owner on Apr 18, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22# hex to decimal wad
33set -e
4- seth --to-fix 18 $( mcd --to-dec $1 )
4+ seth --to-fix 18 " $( mcd --to-dec " $1 " ) "
Original file line number Diff line number Diff line change 22# ## mcd-unwrap -- Unwrap WETH to ETH
33# ## Usage: mcd unwrap <amount>
44set -e
5- mcd --require-from $0
5+ mcd --require-from " $0 "
66[ -n " $1 " ] || mcd --fail " mcd-wrap: Please specify an amount to wrap"
7- seth send ${ETH?} ' withdraw(uint)' $( seth --to-word $( seth --to-wei " $1 eth" ) )
7+ seth send " ${ETH?} " ' withdraw(uint)' " $( seth --to-word " $( seth --to-wei " $1 eth" ) " ) "
88
99[[ $SETH_ASYNC == yes ]] && exit 1
1010
1111sig=" balanceOf(address)(uint)"
12- weth=$( mcd --to-wad $( seth call ${ETH?} " $sig " " $ETH_FROM " ) )
13- eth=$( mcd --to-wad $( seth balance $ETH_FROM ) )
12+ weth=$( mcd --to-wad " $( seth call " ${ETH?} " " $sig " " $ETH_FROM " ) " )
13+ eth=$( seth --to-fix 18 " $( seth balance " $ETH_FROM " ) " )
1414
1515echo " eth $eth "
1616echo " weth $weth "
Original file line number Diff line number Diff line change 22# ## mcd-wrap -- Wrap ETH to WETH
33# ## Usage: mcd wrap <amount>
44set -e
5- mcd --require-from $0
5+ mcd --require-from " $0 "
66[ -n " $1 " ] || mcd --fail " mcd-wrap: Please specify an amount to wrap"
7- seth send ${ETH?} --value $( seth --to-wei " $1 eth" )
7+ seth send " ${ETH?} " --value " $( seth --to-wei " $1 eth" ) "
88
99[[ $SETH_ASYNC == yes ]] && exit 1
1010
1111sig=" balanceOf(address)(uint)"
12- weth=$( mcd --to-wad $( seth call ${ETH?} " $sig " " $ETH_FROM " ) )
13- eth=$( mcd --to-wad $( seth balance $ETH_FROM ) )
12+ weth=$( mcd --to-wad " $( seth call " ${ETH?} " " $sig " " $ETH_FROM " ) " )
13+ eth=$( seth --to-fix 18 " $( seth balance " $ETH_FROM " ) " )
1414
1515echo " eth $eth "
1616echo " weth $weth "
You can’t perform that action at this time.
0 commit comments