USAGE
Last updated
Implementation of ERC20 Token
, Pair
,Factory
, Flash Swapper
, and WCSPR
Contract for the CasperLabs platform.
View Report - commit 801eaaedf4a5fe106cebdc157c82ac801fc04caa
The CasperSwap core consists of 5 smart contracts:
ERC20 Token Contract
Pair Contract
Factory Contract
FLASH SWAPPER Contract
WCSPR 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.
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.
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.
Run this command in the root folder to build all Smart Contract.
Run this command to run Test Cases.
Note: User needs to be in the desired project folder to run the test cases
Run this command in the main folder to run all contract's Test Cases.
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:
Testnet
ERC20
hash-279445c140615fd511759dfb96c610dee212769913f61a57b0f9dde42d6a8d10
Casper
Association
Testnet
WCSPR
hash-4f2d1b772147b9ce3706919fe0750af6964249b0931e2115045f97e1e135e80b
Casper
Association
Testnet
FLASHSWAPPER
hash-1c23f9e89033e5c2d2a21a6926411b2645c000cf43fc0db495821633da2aed6e
Casper
Association
Testnet
PAIR
hash-de6ba94b699dad44e12bf98e35c1122eed7dba9eed8af6d8952875afaec8c7dd
Casper
Association
Testnet
FACTORY
hash-13cc83616c3fb4e6ea22ead5e61eb6319d728783ed02eab51b1f442085e605a7
Casper
Association