Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

tsla-exchange/tsla-exchange-contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TSLA Exchange

Synthetic TSLA on-ramp. Trades on Synthetix by day, and Balancer by night.

Contract deployed to 0x3df4539a20F11D8D737f17290DA726ff4B049aD5.

Development

Install dependencies via Yarn:

yarn install

Compile contracts via Hardhat:

yarn run hardhat compile

Networks

By default, Hardhat uses the Hardhat Network in-process.

To use an external network via URL, set the URL environment variable and append commands with --network generic:

URL="[NODE_URL]" yarn run hardhat test --network generic

Testing

To test the contracts via Hardhat, specify a URL from which to fork the mainnet by setting the FORK_URL environment variable:

FORK_URL="[NODE_URL]" yarn run hardhat test

Activate gas usage reporting by setting the REPORT_GAS environment variable to "true":

REPORT_GAS=true yarn run hardhat test

Generate a code coverage report using solidity-coverage:

yarn run hardhat coverage

Documentation

A documentation site is output on contract compilation to the docgen directory. It can also be generated manually:

yarn run hardhat docgen

Deployment

The contract can be deployed using the deploy task:

yarn run hardhat deploy