Thank you for your interest in contributing to InheritX! InheritX is a revolutionary blockchain-powered digital asset inheritance platform that empowers users to securely manage, transfer, and optimize their digital assets—including cryptocurrencies and NFTs—using a decentralized exchange (DEX) swap feature. Built on StarkNet, InheritX ensures transparency, security, and automation in digital estate planning.
InheritX combines:
- Digital Asset Inheritance: Secure, automated transfer of digital assets to designated beneficiaries.
- DEX Swap Integration: Pre- and post-inheritance asset swaps for optimal portfolio management.
- Blockchain Technology: Leveraging StarkNet to guarantee a decentralized, trustless, and secure environment.
- User-Centric Design: Intuitive dashboards and robust identity verification for asset owners and beneficiaries.
- Star the project
- Drop your TG handle
- Join the group
https://t.me/+xN161b3GkwNiYTZk
We welcome contributions in various forms, including bug fixes, feature implementations, and documentation improvements.
- Navigate to the (https://github.com/skill-mind/InheritX-smart_contract.git).
- Click the Fork button to create your copy of the repository.
- Clone your forked repository to your local machine:
git clone https://github.com/<your-username>/InheritX-smart_contract.git
cd InheritX-smart_contract
Create a branch for your feature or bug fix:
git checkout -b feature/<Issue title>
- Implement your changes.
- Test your changes thoroughly.
- Commit your work with a descriptive message:
git add .
git commit -m "Issue Title"
- Push your branch to your forked repository:
git push origin <Issue Title>
- Click on Pull Requests and select New Pull Request.
- Provide a clear and concise title and description for your PR.
- Link any relevant issues.
Code of Conduct
- Please adhere to our Code of Conduct to maintain a respectful and inclusive community.
- Write clean and modular code following the repository's coding standards.
- Ensure all changes are tested before submission.
- Document new features and updates thoroughly.
This document provides instructions for deploying and upgrading the counter contract system using Starknet.
- Starknet CLI installed
- Cairo compiler installed
- Account configured with Starknet
First, compile all the contracts:
scarb build
starknet declare --contract target/release/CounterLogic.json
Make note of the returned class hash: 0x<LOGIC_CLASS_HASH>
starknet deploy --class_hash 0x<LOGIC_CLASS_HASH> --inputs <OWNER_ADDRESS>
starknet declare --contract target/release/CounterProxy.json
Make note of the returned class hash: 0x<PROXY_CLASS_HASH>
starknet deploy --class_hash 0x<PROXY_CLASS_HASH> --inputs <OWNER_ADDRESS> <LOGIC_CLASS_HASH>
Your proxy contract is now deployed with the class hash of the logic contract. The proxy contract will be the one users interact with.
When you want to upgrade to a new version of the logic contract, follow these steps:
starknet declare --contract target/release/CounterLogicV2.json
Make note of the returned class hash: 0x<LOGIC_V2_CLASS_HASH>
starknet invoke \
--address <PROXY_CONTRACT_ADDRESS> \
--function upgrade \
--inputs <LOGIC_V2_CLASS_HASH> \
--account <YOUR_ACCOUNT>
You can verify that the logic contract has been upgraded by calling the get_version
function:
starknet call \
--address <PROXY_CONTRACT_ADDRESS> \
--function get_version
The response should be "v2.0", confirming that the upgrade was successful.
The beauty of this upgrade pattern is that all state is stored in the proxy contract. When you upgrade the logic contract, the state remains intact in the proxy contract's storage. This means:
- Counter values will persist after an upgrade
- Ownership will remain the same
- Any other state variables will be preserved
- Only the contract owner can perform an upgrade
- The proxy pattern ensures that state is preserved during upgrades
- New implementations can add functionality but shouldn't change the storage layout
Join our Telegram group to discuss this project and share your feedback: [TG Group Link] (replace with your actual TG group link)
When you join, please drop your TG handle so we can welcome you properly!
If you encounter any issues during deployment or upgrade, please:
- Verify that you're using the correct class hashes
- Make sure you're calling functions with the correct account (owner)
- Check transaction receipts for detailed error messages
Thank you for contributing to InheritX and helping us build a secure, innovative platform for digital asset inheritance!