Safe Crosschain is a mechanism crafted to empower users with the ability to control a Safe across different blockchains using Hashi. The idea is to have a main Safe that controls secondary Safes deployed abroad using storage proofs verification against a block header propagated using Hashi.
-
Begin by deploying two Safes - the main Safe and the Secondary Safe. Attach a module called
ControllerModule
to the Secondary Safe. -
Users wishing to execute a cross-chain transaction should call
execTransaction
on thePeripheral
Safe through the MainSafe which just writes in storage a commitment corresponding to the used function parameters. -
After the transaction is included in a block, a relayer propagates the corresponding block header to the chain where the Secondary Safe is deployed.
-
Once all bridges have stored the block header in their corresponding adapters, the user can call
execTransaction
on theControllerModule
, providing the storage proof. TheControllerModule
verifies the proof against the block header propagated with Hashi, and subsequently callsexecTransaction
on the Secondary Safe usingexecTransactionFromModule
.
Ensure you have Node.js and npm installed.
git clone https://github.com/crosschain-alliance/safe-crosschain.git
cd sj-core-contracts
npm install
npm run compile
Before running the tests, make sure you've set up the required environment variables.
npm run test
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE file for details.
For any inquiries, issues, or feedback, please raise an issue on GitHub or contact the team through our official website.
All contracts in this repository are still under active development. Although Safe Cross Chain endeavors to ensure the highest level of security and reliability, the evolving nature of software development means that these contracts may contain unforeseen issues or vulnerabilities.
While we strive to provide a secure and robust platform through the integration of multiple oracles and other advanced features, it's crucial for users, developers, and integrators to understand the inherent risks associated with smart contracts and blockchain protocols.
All contracts have undergone thorough testing and reviews, but this doesn't guarantee they are free from errors or security vulnerabilities. Use them at your own risk.