-
Notifications
You must be signed in to change notification settings - Fork 189
Added support for f4 addresses in forest-wallet #6710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
3c594c8
Add support for delegated address in forest-wallet
sudo-shashank 4a662d3
Add wallet test
sudo-shashank ca1d974
fix test
sudo-shashank 414f300
fix getting eth addr
sudo-shashank 1d717cd
fix balance check
sudo-shashank cace07c
fund delegate wallet for test
sudo-shashank 04d7d15
update changelog
sudo-shashank 6b652f2
increase delegate test wallet fund
sudo-shashank 57cb5d4
Merge branch 'main' into shashank/add-f4-support
sudo-shashank 65ea290
Merge branch 'main' into shashank/add-f4-support
sudo-shashank 9d2ea9d
Merge branch 'main' into shashank/add-f4-support
sudo-shashank 4591458
Merge branch 'main' into shashank/add-f4-support
sudo-shashank ed652e8
refactor and add test
sudo-shashank 3c928c8
refactor resolve_method_num
sudo-shashank 675da0a
lint fix
sudo-shashank 4b7ac40
more lint fix
sudo-shashank cce81a9
Merge branch 'main' into shashank/add-f4-support
sudo-shashank 73db886
Merge branch 'main' into shashank/add-f4-support
sudo-shashank a8a54a5
update changelog
sudo-shashank d299b36
Merge branch 'main' into shashank/add-f4-support
sudo-shashank 4fa870a
refactor test
sudo-shashank 51275e3
run wallet tests in parallel
sudo-shashank 2508b46
Merge branch 'main' into shashank/add-f4-support
sudo-shashank 90aa7b1
Increase delegated wallet test fund
sudo-shashank 6ee251f
Merge branch 'main' into shashank/add-f4-support
sudo-shashank 0d59a3d
Merge branch 'main' into shashank/add-f4-support
sudo-shashank 5a38954
Merge branch 'main' into shashank/add-f4-support
sudo-shashank 65dd517
send only required fund
sudo-shashank 501461b
Merge branch 'main' into shashank/add-f4-support
sudo-shashank File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,87 @@ | ||
| #!/usr/bin/env bash | ||
| # This script checks delegated wallet features of the forest node and the forest-cli. | ||
| # It requires both `forest` and `forest-cli` to be in the PATH. | ||
|
|
||
| set -euxo pipefail | ||
|
|
||
| source "$(dirname "$0")/harness.sh" | ||
|
|
||
| forest_wallet_init "$@" | ||
|
|
||
| # Amount to send (note: `send` command defaults to FIL if no units are specified) | ||
| FIL_AMT="500 atto FIL" | ||
|
|
||
| # Amount for an empty wallet | ||
| FIL_ZERO="0 FIL" | ||
|
|
||
| # The preloaded address | ||
| ADDR_ONE=$($FOREST_WALLET_PATH list | tail -1 | cut -d ' ' -f1) | ||
|
|
||
| sleep 5s | ||
|
|
||
| : Begin delegated wallet tests | ||
|
|
||
| # The following steps do basic delegated wallet handling tests. | ||
|
|
||
| echo "Creating delegated wallet DELEGATE_ADDR_ONE" | ||
| DELEGATE_ADDR_ONE=$($FOREST_WALLET_PATH new delegated) | ||
| echo "$DELEGATE_ADDR_ONE" | ||
| $FOREST_WALLET_PATH export "$DELEGATE_ADDR_ONE" > delegated_wallet.key | ||
| $FOREST_WALLET_PATH --remote-wallet import delegated_wallet.key | ||
|
|
||
| # Fund delegated wallet from preloaded wallet | ||
| DELEGATE_FUND_AMT="2 micro FIL" | ||
| $FOREST_WALLET_PATH set-default "$ADDR_ONE" | ||
| MSG_DELEGATE_FUND=$($FOREST_WALLET_PATH send "$DELEGATE_ADDR_ONE" "$DELEGATE_FUND_AMT") | ||
| : "$MSG_DELEGATE_FUND" | ||
|
|
||
| DELEGATE_ADDR_ONE_BALANCE=$FIL_ZERO | ||
| i=0 | ||
| while [[ $i != 20 && $DELEGATE_ADDR_ONE_BALANCE == "$FIL_ZERO" ]]; do | ||
| i=$((i+1)) | ||
| : "Checking DELEGATE_ADDR_ONE balance $i/20" | ||
| sleep 30s | ||
| DELEGATE_ADDR_ONE_BALANCE=$($FOREST_WALLET_PATH balance "$DELEGATE_ADDR_ONE" --exact-balance) | ||
| done | ||
|
|
||
| echo "Creating delegated wallet DELEGATE_ADDR_TWO" | ||
| DELEGATE_ADDR_TWO=$($FOREST_WALLET_PATH new delegated) | ||
| echo "$DELEGATE_ADDR_TWO" | ||
| $FOREST_WALLET_PATH set-default "$DELEGATE_ADDR_ONE" | ||
|
|
||
| echo "Creating delegated (remote) wallet DELEGATE_ADDR_THREE" | ||
| DELEGATE_ADDR_THREE=$($FOREST_WALLET_PATH --remote-wallet new delegated) | ||
| echo "$DELEGATE_ADDR_THREE" | ||
| $FOREST_WALLET_PATH --remote-wallet set-default "$DELEGATE_ADDR_ONE" | ||
|
|
||
| $FOREST_WALLET_PATH list | ||
| $FOREST_WALLET_PATH --remote-wallet list | ||
|
|
||
| MSG_DELEGATE_TWO=$($FOREST_WALLET_PATH send "$DELEGATE_ADDR_TWO" "$FIL_AMT") | ||
| : "$MSG_DELEGATE_TWO" | ||
|
|
||
| MSG_DELEGATE_THREE=$($FOREST_WALLET_PATH send "$DELEGATE_ADDR_THREE" "$FIL_AMT") | ||
| : "$MSG_DELEGATE_THREE" | ||
|
|
||
| DELEGATE_ADDR_TWO_BALANCE=$FIL_ZERO | ||
| i=0 | ||
| while [[ $i != 20 && $DELEGATE_ADDR_TWO_BALANCE == "$FIL_ZERO" ]]; do | ||
| i=$((i+1)) | ||
| : "Checking DELEGATE_ADDR_TWO balance $i/20" | ||
| sleep 30s | ||
| DELEGATE_ADDR_TWO_BALANCE=$($FOREST_WALLET_PATH balance "$DELEGATE_ADDR_TWO" --exact-balance) | ||
| done | ||
|
|
||
| DELEGATE_ADDR_THREE_BALANCE=$FIL_ZERO | ||
| i=0 | ||
| while [[ $i != 20 && $DELEGATE_ADDR_THREE_BALANCE == "$FIL_ZERO" ]]; do | ||
| i=$((i+1)) | ||
| : "Checking DELEGATE_ADDR_THREE balance $i/20" | ||
| sleep 30s | ||
| DELEGATE_ADDR_THREE_BALANCE=$($FOREST_WALLET_PATH --remote-wallet balance "$DELEGATE_ADDR_THREE" --exact-balance) | ||
| done | ||
|
|
||
| $FOREST_WALLET_PATH list | ||
| $FOREST_WALLET_PATH --remote-wallet list | ||
|
|
||
| : End delegated wallet tests |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.