Skip to content

Commit

Permalink
Merge pull request #72 from rsksmart/pr-merge
Browse files Browse the repository at this point in the history
Combined contributions PR
  • Loading branch information
ezequiel-rodriguez authored Jan 31, 2025
2 parents 2633b6d + b39808d commit f79555b
Show file tree
Hide file tree
Showing 19 changed files with 1,097 additions and 285 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/codeQL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Initialize CodeQL
uses: github/codeql-action/init@df409f7d9260372bd5f19e5b04e83cb3c43714ae #v3.27.9
uses: github/codeql-action/init@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 #v3.28.5
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@df409f7d9260372bd5f19e5b04e83cb3c43714ae #v3.27.9
uses: github/codeql-action/autobuild@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 #v3.28.5

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@df409f7d9260372bd5f19e5b04e83cb3c43714ae #v3.27.9
uses: github/codeql-action/analyze@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 #v3.28.5
with:
category: "/language:${{ matrix.language }}"
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
pull-requests: write
steps:
- name: "Checkout Repository"
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: "Dependency Review"
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
run: exit 1

- name: Setup Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af #v4.1.0
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a #v4.2.0
with:
node-version: 20
registry-url: https://registry.npmjs.org
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 #v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
with:
persist-credentials: false

Expand All @@ -33,7 +33,7 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 #v4.4.3
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 #v4.6.0
with:
name: SARIF file
path: results.sarif
Expand All @@ -42,6 +42,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
uses: github/codeql-action/upload-sarif@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3.28.5
with:
sarif_file: results.sarif
98 changes: 96 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ This command will guide you through the process of wallet management, offering o
- List all saved wallets
- Switch between saved wallets
- Update a wallet's name
- Backup the wallet's file
- Delete a saved wallet

> **ℹ️ Info:**
Expand Down Expand Up @@ -109,6 +110,17 @@ This command will guide you through the process of wallet management, offering o
💾 Changes saved at /path/to/package/rootstock-wallet.json
```

- Example output when backing up the wallet file:

```
🔑 Current wallet: dev
? What would you like to do? 📂 Backup wallet data
? 💾 Enter the path where you want to save the backup: selected/backup/path
💾 Changes saved at selected/backup/path
✅ Wallet backup created successfully!
💾 Backup saved successfully at: selected/backup/path
```

- Example output when deleting a wallet:

```
Expand All @@ -122,7 +134,7 @@ This command will guide you through the process of wallet management, offering o

### 2. Check Balance

The `balance` command allows you to check the balance of your saved wallet on the Rootstock blockchain. You can check the balance on either the mainnet or testnet using the appropriate flags.
The `balance` command allows you to check the balance of any token on the Rootstock blockchain for any of the saved wallets. You can check the balance on either the mainnet or testnet using the appropriate flags.

#### Mainnet

Expand All @@ -147,10 +159,26 @@ Use the `-t` or `--testnet` flag to check the balance on the Rootstock testnet.
rsk-cli balance -t
```

#### Dynamic Wallet Selection

Use the `--wallet` flag to dynamically select wallet

```bash
rsk-cli balance --wallet <name>
```

Output example:

```
Balance on testnet: 0.6789 RBTC
? Select token to check balance: RIF
✔ Balance retrieved successfully
📄 Token Information:
Name: tRIF Token
Contract: 0x19f64674d8a5b4e652319f5e239efd3bc969a1fe
👤 Holder Address: 0x28eb8d29e4713e211d1ddab19df3de16086bb8fa
💰 Balance: 0.02 tRIF
🌐 Network: Rootstock Testnet
🔗 Ensure that transactions are being conducted on the correct network.
```

### 3. Transfer rBTC
Expand All @@ -171,6 +199,14 @@ Use the `-t` or `--testnet` flag to execute the transfer on the Rootstock testne
rsk-cli transfer --testnet --address 0x0x08C4E4BdAb2473E454B8B2a4400358792786d341 --value 0.001
```

#### Dynamic Wallet Selection

Use the `--wallet` flag to dynamically select wallet

```bash
rsk-cli transfer --wallet <name> --address 0x0x08C4E4BdAb2473E454B8B2a4400358792786d341 --value 0.001
```

Output example:

```
Expand Down Expand Up @@ -227,6 +263,12 @@ rsk-cli deploy --abi <path_to_abi> --bytecode <path_to_bytecode> --args <arg1> <
rsk-cli deploy --testnet --abi <path_to_abi> --bytecode <path_to_bytecode> --args <arg1> <arg2> ...
```

#### Dynamic Wallet Selection

```bash
rsk-cli deploy --wallet <name> --abi <path_to_abi> --bytecode <path_to_bytecode> --args <arg1> <arg2> ...
```

Output example:

```
Expand Down Expand Up @@ -331,6 +373,12 @@ rsk-cli bridge
rsk-cli bridge --testnet
```

#### Dynamic Wallet Selection

```bash
rsk-cli bridge --wallet <name>
```

Output example:

```
Expand All @@ -342,6 +390,52 @@ Output example:
🔗 View on Explorer: https://explorer.testnet.rootstock.io/address/0x0000000000000000000000000000000001000006
```

### 9. Fetch Wallet History

The history command allows you to fetch the transaction history for a wallet on the Rootstock blockchain. This includes transactions such as ERC20, ERC721, and external transfers. You can specify whether to fetch the history from the Mainnet or Testnet by providing the appropriate flag. For this command to work, make sure to have an Alchemy API key you can get from [Alchemy Dashboard](https://dashboard.alchemy.com/).

#### Mainnet

Without having the Alchemy API key previously set:

```bash
rsk-cli history --apiKey <apiKey> --number <number>
```

With Alchemy API key already set:

```bash
rsk-cli history --number <number>
```

#### Testnet

Without having the Alchemy API key previously set:

```bash
rsk-cli history --testnet --apiKey <apiKey> --number <number>
```

With Alchemy API key already set:

```bash
rsk-cli history --testnet --number <number>
```

Output example:

```
? 🔒 Enter Alchemy API key to fetch history: ********************************
🔍 Fetching transaction history on Rootstack Testnet for 0x19661D036D4e590948b9c00eef3807b88fBfA8e1 ...
✅ Transfer:
From: 0x19661d036d4e590948b9c00eef3807b88fbfa8e1
To: 0xb45805aead9407f5c7860ff8eccaedd4d0ab36a6
Token: ETH
Value: 0.000003
Tx Hash: 0xde678614cd9e20fe5891c25069afef680174456b104f31c9078eb486abd95a64
Time: Tue Nov 12 2024 11:46:32 GMT+0700 (Indochina Time)
```

## Contributing

We welcome contributions from the community. Please fork the repository and submit pull requests with your changes. Ensure your code adheres to the project's main objective.
Expand Down
Loading

0 comments on commit f79555b

Please sign in to comment.