You can install the required software by running the following commands. If you already have an up-to-date Casper node, you probably already have all of the prerequisites installed so you can skip this step.
# Update package repositoriessudoaptupdate# Install the command-line JSON processorsudoaptinstalljq-y# Install rustcurl--proto'=https'--tlsv1.2-sSfhttps://sh.rustup.rs|sh#Install the nightly version (by default stable toolchain is installed)rustupinstallnightly#Check that nightly toolchain version is installed (this will list stable and nightly versions)rustuptoolchainlist#Set rust nightly as defaultrustupdefaultnightly# Install wasm32-unknown-unknownrustuptargetaddwasm32-unknown-unknown#rust Versionrustup--version#Install Cmakesudoapt-get-yinstallcmake# Note:https://cgold.readthedocs.io/en/latest/first-step/installation.html#cmake Versioncmake--version#Installing the Casper Cratescargoinstallcargo-casper# Add Casper repositoryecho"deb https://repo.casperlabs.io/releases"bionicmain|sudotee-a/etc/apt/sources.list.d/casper.listcurl-Ohttps://repo.casperlabs.io/casper-repo-pubkey.ascsudoapt-keyaddcasper-repo-pubkey.ascrsudoaptupdate# Install the Casper client softwareInstallCasper-clientcargo+nightlyinstallcasper-client# To check Casper Client VersionCasper-client--version# Commands for helpcasper-client--helpcasper-client<command>--help
Creating Keys
# Create keyscasper-clientkeygen<TARGETDIRECTORY>
All Test Cases
Tests require that the CasperLabs-UniswapV2-core repository to be checked out into a sibling directory of CasperLabs-UniswapV2-router.
To build the contracts and run the tests, first navigate back to this directory and run:
make all
To run all the tests:
make test
To clean up:
make clean
Known contract hashes
Router contract has already being deployed. In order to interact with it you need to call it by its hash. The table below contains the contract hash (without the hash- prefix) for Router contract on public Casper networks: