Closed kwiss closed 1 month ago
I would like to work on this @kwiss
Can i work on this @kwiss
Hello @kwiss! My name is Daniel I'm an active contributor in OD this is my profile, I would like to help you with this issue, I will solve this by following your instructions, it seems to be very straightforward
I am applying to this issue via OnlyDust platform.
My recent focus in Ethereum-Solidity and Starknet-Cairo has significantly deepened my understanding of web3 technologies, positioning me well to contribute to innovative projects in the blockchain space. As an alumnus of Web3Bridge, where I received training in Solidity and Cairo, I have developed a solid foundation in these technologies. I am eager to contribute to open-source projects within the Starknet ecosystem, and I am particularly excited about the opportunity to make meaningful contributions to this project. Given the chance, I am committed to delivering my best work and leveraging my skills to drive success.
To address the problem of splitting contracts.json into two separate files for better developer experience, I would follow these steps:
Splitting the contracts.json File a. Create local.contracts.json
Copy the existing contracts.json to local.contracts.json. Modify .gitignore to include local.contracts.json to ensure it is not tracked by Git.
b. Modify contracts.json
Ensure contracts.json only contains contract information for Goerli, Sepolia, and Mainnet networks.
Update the Build/Dev Process a. Modify SDK Build Process
Update the core SDK's build scripts to differentiate between the environments using environment variables.
b. Implement Environment Variables
Use STARKNET_NETWORK_ID and SOLIS_NETWORK_ID to determine the appropriate contracts.json file to use.
Implementing the Changes a. Updating Deployment Scripts
Adjust deployment scripts to write local contract information to local.contracts.json if the environment is local.
b. Adjusting Build Scripts
Modify build scripts to read the appropriate contracts.json file based on the environment variables.
Testing the Solution a. Local Testing
Deploy contracts locally and ensure that local.contracts.json is created/updated correctly.
b. Network Testing
Deploy contracts on Goerli, Sepolia, and Mainnet to verify that contracts.json remains correct and unaffected by local deployments.
I am applying to this issue via OnlyDust platform.
I am a software engineer at Zscaler with a year of experience in providing cloud security solutions. My role involves developing secure, scalable cloud-based applications, which has honed my skills in cloud infrastructure, security protocols, and system architecture. Additionally, I have developed a blockchain project that connects multiple wallets, showcasing my proficiency in blockchain technology, smart contract development, and Dapp deployment. This project is deployed on Netlify and available on my GitHub profile. My expertise in cloud security ensures that blockchain projects are secure from various threats while being scalable and efficient. I excel in integrating blockchain networks, deploying applications, and maintaining them using CI/CD pipelines. My collaborative approach, problem-solving skills, and customer-centric mindset further enhance my ability to deliver innovative and secure solutions in both cloud security and blockchain domains.
To approach the problem of separating local and network-specific contract deployments into different JSON files, I would follow a systematic process that ensures both backward compatibility and ease of use for developers. Here’s a step-by-step breakdown:
const isLocal = networkId === 'dev';
const filePath = isLocal ? './local.contracts.json' : './contracts.json';
// Assuming deployedContracts
is the object with the deployment details
fs.writeFileSync(filePath, JSON.stringify(deployedContracts, null, 2));
Describe the bug
To make developer experience better we should split the contracts.json in two separate files: local.contracts.json -> add that to gitignore contracts.json -> stay as it is but only for goerli/sepolia/mainnet
This change also implies to modify the build/dev for the core sdk that currently generate its build using contracts.json possible solution: use the env variables:
To Reproduce
Expected behavior