mirror of
https://github.com/serai-dex/serai.git
synced 2024-12-22 19:49:22 +00:00
63521f6a96
* start Router contract * use calldata for function args * var name changes * start testing router contract * test with and without abi.encode * cleanup * why tf isn't tests/utils working * cleanup tests * remove unused files * wip * fix router contract and tests, add set/update public keys funcs * impl some Froms * make execute non-reentrant * cleanup * update Router to use ReentrancyGuard * update contract to use errors, use bitfield in Executed event, minor other fixes * wip * fix build issues from merge, tests ok * Router.sol cleanup * cleanup, uncomment stuff * bump ethers.rs version to latest * make contract functions take generic middleware * update build script to assert no compiler errors * hardcode pubkey parity into contract, update tests * Polish coins/ethereum in various ways --------- Co-authored-by: Luke Parker <lukeparker5132@gmail.com>
1.6 KiB
1.6 KiB
Getting Started
Dependencies
Ubuntu
sudo apt-get install -y build-essential clang-11 pkg-config cmake git curl protobuf-compiler
Install rustup
Linux
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
macOS
brew install rustup
Install Rust
rustup update
rustup toolchain install stable
rustup target add wasm32-unknown-unknown
rustup toolchain install nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
Install Solidity
cargo install svm-rs
svm install 0.8.25
svm use 0.8.25
Install Solidity Compiler Version Manager
cargo install svm-rs
svm install 0.8.25
svm use 0.8.25
Install foundry (for tests)
cargo install --git https://github.com/foundry-rs/foundry --profile local --locked forge cast chisel anvil
Clone and Build Serai
git clone https://github.com/serai-dex/serai
cd serai
cargo build --release --all-features
Run Tests
Running tests requires:
- A rootless Docker setup
- A properly configured Bitcoin regtest node (available via Docker)
- A properly configured Monero regtest node (available via Docker)
- A properly configured monero-wallet-rpc instance (available via Docker)
To start the required daemons, one may run:
cargo run -p serai-orchestrator -- key_gen dev
cargo run -p serai-orchestrator -- setup dev
and then:
cargo run -p serai-orchestrator -- start dev bitcoin-daemon monero-daemon monero-wallet-rpc
Finally, to run the tests:
cargo test --all-features