Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 24 additions & 9 deletions .github/scripts/wallet/test-send.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,44 @@ RECEIVER=$(cat "$PUBKEY_FILE")
# Use minimal amounts to avoid draining the account
# 1 nanomina = smallest unit
AMOUNT="1"
# 1000000 nanomina = 0.001 MINA (small but acceptable fee)
FEE="1000000"
# 1000000 nanomina = 0.1 MINA (small but acceptable fee)
FEE="100000000"

# Optional memo from environment variable (empty by default)
MEMO="${MINA_E2E_TEST_MEMO:-}"

echo "Test: Send transaction to same account (e2e test)"
echo "Key file: $KEY_FILE"
echo "Receiver: $RECEIVER"
echo "Amount: $AMOUNT nanomina"
echo "Fee: $FEE nanomina"
echo "Node endpoint: $NODE_ENDPOINT"
if [ -n "$MEMO" ]; then
echo "Memo: $MEMO"
fi
echo ""

# Export password for the CLI
export MINA_PRIVKEY_PASS="$PASSWORD"

# Build send command arguments
SEND_ARGS=(
--from "$KEY_FILE"
--to "$RECEIVER"
--amount "$AMOUNT"
--fee "$FEE"
--node "$NODE_ENDPOINT"
--network devnet
)

# Add memo if running in CI
if [ -n "$MEMO" ]; then
SEND_ARGS+=(--memo "$MEMO")
fi

# Run the wallet send command
echo "Sending transaction..."
SEND_OUTPUT=$(./target/release/mina wallet send \
--from "$KEY_FILE" \
--to "$RECEIVER" \
--amount "$AMOUNT" \
--fee "$FEE" \
--node "$NODE_ENDPOINT" \
--network devnet 2>&1 || true)
SEND_OUTPUT=$(./target/release/mina wallet send "${SEND_ARGS[@]}" 2>&1 || true)

echo "Send command output:"
echo "$SEND_OUTPUT"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ jobs:
env:
MINA_PRIVKEY_PASS: ${{ secrets.MINA_PRIVKEY_PASS }}
MINA_NODE_ENDPOINT: http://mina-rust-plain-1.gcp.o1test.net/graphql
MINA_E2E_TEST_MEMO: MINA_RUST PR#${{ github.event.pull_request.number }}
run: make test-wallet

build-tests:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
should have on the ledger. Also, document the different types of transactions
that can be used to modify the ledger
([#1541](https://github.com/o1-labs/mina-rust/pull/1541))
- **CLI**: introduce a subcommand `wallet` to be able to send transactions, get
the public key and address from the secret key, get balance and generate
wallets from the CLI. End-to-end tests are added in the CI and a new target
`make test-wallet` has been added. This focuses on basic payments
([#1543](https://github.com/o1-labs/mina-rust/pull/1543)).

### Changed

Expand Down
Loading