-
Notifications
You must be signed in to change notification settings - Fork 11
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
Showing
17 changed files
with
320 additions
and
120 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
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
declare -r get_owners_sig='getOwners()(address[])' | ||
declare owners | ||
owners="$(cast abi-decode "$get_owners_sig" "$(cast call --rpc-url "$rpc_url" "$safe_address" "$(cast calldata "$get_owners_sig")")")" | ||
owners="${owners:1:$((${#owners} - 2))}" | ||
owners="${owners//, /;}" | ||
declare -r owners | ||
|
||
declare -a owners_array | ||
IFS=';' read -r -a owners_array <<<"$owners" | ||
declare -r -a owners_array | ||
|
||
PS3='Who are you?: ' | ||
declare signer | ||
select signer in "${owners_array[@]}" ; do break ; done | ||
declare -r signer | ||
|
||
echo "$signer" >&2 | ||
|
||
if [[ ${signer:-unset} = 'unset' ]] ; then | ||
echo 'I do not know who that is' >&2 | ||
exit 1 | ||
fi |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
PS3='What kind of wallet are you using? ' | ||
declare wallet_type | ||
select wallet_type in ledger trezor hot frame ; do break ; done | ||
declare -r wallet_Type | ||
|
||
if [[ ${wallet_type:-unset} = 'unset' ]] ; then | ||
exit 1 | ||
fi | ||
|
||
declare -a wallet_args | ||
case $wallet_type in | ||
'ledger') | ||
wallet_args=(--ledger) | ||
;; | ||
'trezor') | ||
wallet_args=(--trezor) | ||
;; | ||
'hot') | ||
wallet_args=(--interactive) | ||
;; | ||
'frame') | ||
wallet_args=(--unlocked) | ||
;; | ||
*) | ||
echo 'Unrecognized wallet type: '"$wallet_type" >&2 | ||
exit 1 | ||
;; | ||
esac | ||
|
||
if [[ $wallet_type = 'ledger' ]] ; then | ||
IFS='' read -r -e -p 'Ledger wallet HD path (BIP32) [default '"44'/60'/0'/0"']: ' | ||
if [[ ${REPLY:-unset} = 'unset' ]] ; then | ||
wallet_args+=( | ||
--mnemonic-derivation-path "44'/60'/0'/0" | ||
) | ||
else | ||
wallet_args+=( | ||
--mnemonic-derivation-path "$REPLY" | ||
) | ||
fi | ||
fi |
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
Oops, something went wrong.