The Exocore contracts repository contains a set of smart contracts deployed on both Exocore and the target client chains, which facilitate assets deposit and withdrawal, cross-chain communication, and restaking operations for native assets and liquid staking tokens (LSTs), ensuring secure interactions and efficient management of restaked assets.
Our docs site is here. It contains tutorials, explainers, and smart contract documentation. If you'd like to view these docs on github instead, check out the docs repo:
For the latest and most detailed technical documentation, visit /docs directory. If you're an advanced coder, this is the perfect place to get an overview of the contracts before you start exploring the code.
To understand how users interact with these contracts, take a look at our Tests.
This repository utilizes Foundry. For more information on installation and usage, refer to the Foundry documentation. If you already have Foundry installed, you can build this project and run tests using the following commands:
foundryup
git clone --recurse-submodules [email protected]:ExocoreNetwork/exocore-contracts.git && cd exocore-contracts
forge build
forge test
We have several tests against the local anvil testnet. To pass these tests, you need to set the environment variable. Refer to .env.example
for guidance. Once your environment is set up, running forge script/test
should show these tests passing.
source .env
Then run the test like:
forge script script/1_Prerequisites.s.sol --broadcast -vvvv
forge test -vvvv --match-path/--match-path xxxx
Deposit & Withdraw e2e test:
forge test -vvvv --match-test test_DepositWithdraw
- Install solhint, then run:
solhint 'src/contracts/**/*.sol'
- Install slither, then run:
slither .
The current main deployment is our v1.0.0 release. You can view the deployed contract addresses below, or check out the code itself on the main
branch.