-
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.
update: fix issues in native sol transfer (#407)
To run a test, you can simply execute the following command. ```sh ./bridge-escrow-test.sh ``` ### Updates on Solana Program - send_funds_to_user - send_funds_to_user_cross_chain - escrow_and_store_intent ### Updates on Test - Added the test for `send_funds_to_user ` - Still needs to add some assertions. ### Unclear things - `bridge::bridge_transfer` seems to be updated. But needs help of @alberto
- Loading branch information
1 parent
04fc0d1
commit 83367f4
Showing
4 changed files
with
499 additions
and
85 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
rm -fr ./test-ledger | ||
|
||
solana-test-validator > /dev/null 2>&1 & | ||
VALIDATOR_PID=$! | ||
|
||
echo "Solana test validator started in the background with PID $VALIDATOR_PID." | ||
|
||
sleep 5 | ||
|
||
echo "Running Debug and Deployment" | ||
|
||
# Default behavior | ||
SKIP_DEPLOY=false | ||
|
||
# Parse command-line arguments | ||
while [[ "$#" -gt 0 ]]; do | ||
case $1 in | ||
--skip-deploy) SKIP_DEPLOY=true ;; | ||
*) echo "Unknown parameter passed: $1"; exit 1 ;; | ||
esac | ||
shift | ||
done | ||
|
||
|
||
solana config set --url http://127.0.0.1:8899 | ||
|
||
if [ "$SKIP_DEPLOY" = false ]; then | ||
anchor build -p bridge_escrow | ||
solana program deploy target/deploy/bridge_escrow.so --program-id target/deploy/bridge_escrow-keypair.json | ||
else | ||
echo "Skipping Deployment" | ||
fi | ||
|
||
cargo test -p bridge-escrow -- --nocapture | ||
|
||
echo "Stopping solana-test-validator..." | ||
kill $VALIDATOR_PID | ||
|
||
wait $VALIDATOR_PID | ||
echo "Solana test validator has been stopped." |
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.