USAGE
Implementation of ERC20 Token
, Pair
,Factory
, Flash Swapper
, and WCSPR
Contract for the CasperLabs platform.
Security Review Status
View Report - commit 801eaaedf4a5fe106cebdc157c82ac801fc04caa
Contents
The CasperSwap core consists of 5 smart contracts:
ERC20 Token Contract
Pair Contract
Factory Contract
FLASH SWAPPER Contract
WCSPR Contract
Interacting with the contract
You'll need to have casper-client
and jq
installed on your system in order to run the examples.
These instructions have been tested on Ubuntu 20.04.2 LTS. For additional information, please refer to the introduction pageYou need to run the command at the folder-level of the contract you wish to execute.
Install
Make sure wasm32-unknown-unknown
is installed.
It's also recommended to have wasm-strip available in your PATH to reduce the size of compiled Wasm.
Build Individual Smart Contract
Run this command to build a Smart Contract.
Note: The user needs to run make build-contract
in every project folder before running the desired contract in order to avoid errors.
Build All Smart Contracts
Run this command in the root folder to build all Smart Contract.
Individual Test Cases
Run this command to run Test Cases.
Note: User needs to be in the desired project folder to run the test cases
All Test Cases
Run this command in the main folder to run all contract's Test Cases.
Known contract hashes
All contracts have been already deployed. In order to interact with a specific contract you will need to call it by its hash. The table below contains the contract hash (without the hash-
prefix) for all the contracts on public Casper network:
Network | Contract Name | Account info contract hash | Contract owner |
---|---|---|---|
Testnet | ERC20 |
| Casper |
Association | |||
Testnet | WCSPR |
| Casper |
Association | |||
Testnet | FLASHSWAPPER |
| Casper |
Association | |||
Testnet | PAIR |
| Casper |
Association | |||
Testnet | FACTORY |
| Casper |
Association |
Last updated