Giter Site home page Giter Site logo

tempus-protocol's Introduction

Tempus Protocol

Smart contracts of Tempus Finance

Coverage Status

Compiling and running tests

Installing dependancies yarn install

To compile run yarn build

To run the unit tests yarn test

To run the integration tests yarn test:integration (check prerequisites here)

Coding style

Please follow suggested coding style from solidity language documentation. It can be found at https://docs.soliditylang.org/en/latest/style-guide.html

Testing

Unit Tests

To run unit tests, simply execute yarn test.

Integration Tests

Our integration tests run against a local network that is forked off of the Ethereum Mainnet. Follow these steps to run them:

  • Set the ETH_NODE_URI_MAINNET environment variable to an archive mainnet Ethereum node URI.
  • Execute yarn test:integration.

Running locally

Set env variable

Set ETH_NODE_URI_MAINNET to https://eth-mainnet.alchemyapi.io/v2/<AlchemyKey>

Run Mainnet

Run yarn run start-local:fork:mainnet

Deploy local pools

In another terminal run yarn run deploy-local:fork:mainnet. It may fail due to network error, so please try until it works.

  • Once done, it generates 2 cookie configs: AWS and Local.

  • copy the local value (javascript:(function() {document.cookie = "TEMPUS_OVERRIDING_CONFIG=....})())

  • in Chrome open Bookmarks and then Bookmark Manager

  • Click 3 dots and Add new bookmark

  • Name can be anything, for example Mainnet fork

  • In the URL field paste the value copied earlier

  • once the client is running, go to Bookmarks and select Mainnet fork

Set MetaMask

  • set up MetaMask chain id to 31337 and URL to http://127.0.0.1:8545/
  • to get tokens in MetaMask yarn run deposit-local:fork:mainnet
  • add tokens to MetaMask if not present

tempus-protocol's People

Contributors

axic avatar danieledamiani avatar lazarmitic avatar mijovic avatar redfox20 avatar stefanvitor avatar yuval-weiss avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.