Make contract address dynamic and translate Spanish content to English#7
Merged
davidmelendez merged 3 commits intoOct 9, 2025
Conversation
…new contract address and validation checks
…essages, and enhance user notifications for better clarity
xJeffx23
approved these changes
Oct 9, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Make contract address dynamic and translate Spanish content to English
📌 Description
This PR makes the Randomness contract address handling dynamic in the RandomnessComponent, allowing it to work with any deployed contract address instead of hardcoding a specific address. Additionally, all Spanish content in both the Randomness contract and UI component has been translated to English for better international collaboration.
Changes Made:
RandomnessComponent.tsxto use the deployed contract address dynamicallyRandomness.cairocontract commentsRandomnessComponent.tsxUI messages and labels🎯 Motivation and Context
Previously, the component expected a specific hardcoded contract address. This made it inflexible when redeploying contracts or working in different environments. By making the address handling dynamic, the component now:
This change improves flexibility for devnet testing and makes the component more robust across different deployment scenarios.
🛠️ How to Test the Change (if applicable)
🔹 Deploy Randomness contract to devnet/testnet
🔹 Start the development server
cd packages/nextjs yarn dev🔹 Navigate to the debug page
http://localhost:3000/debug🔹 Verify dynamic address handling
🔹 Test random number generation
🖼️ Screenshots (if applicable)
Not applicable for this configuration and translation update.
🔍 Type of Change
✅ Checklist Before Merging
📌 Additional Notes
Key Improvements:
Dynamic Contract Address:
contractAddressas prop from deployment configurationEnglish Translation:
Files Modified:
packages/nextjs/app/debug/_components/contract/RandomnessComponent.tsx- Dynamic address handling + English translationpackages/snfoundry/contracts/src/Randomness.cairo- Comment translation to Englishpackages/nextjs/contracts/deployedContracts.ts- Updated deployment configurationspackages/snfoundry/.tool-versions- Updated tool versionspackages/snfoundry/contracts/.tool-versions- Updated Cairo/Scarb versionspackages/snfoundry/contracts/Scarb.lock- Updated dependenciesContract Address Flow:
Target Network: