Giter VIP home page Giter VIP logo

compound-test-tx's Introduction

Compound Test Tx

A simple repo for executing a set of transactions against an asset on specified Compound protocol smart contracts.

Installation

First, install needed packages:

npm install

Configuration

Next, setup configuration data needed for the project.

.env

This project expects a .env file in the root of the repository with an INFURA_KEY and MNEMONIC set to an Infura Project ID, and a 12-word mnemonic, respectively. The file should thus look like:

INFURA_KEY='xxxxxxxxxxxxxxxxxxxxxxxxxxxx'
MNEMONIC='xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx'

.eth.config.js

This file should export an object with a property addresses mapping Compound contract names to their deployed addresses on the network. Fauceteer, BAT, DAI, cBAT, cDAI, and Unitroller are the required properties of the addresses object. This file might thus look like:

module.exports = {
  addresses: {
    'Fauceteer': '0x96fa14D96145C8a0338Ae840c57A230716d02C63',
    'BAT': '0x832dA1e7FB808c1Fe04e65eC2826C79943Ec5673',
    'DAI': '0x25A4388B3343d73B1878a40DBbF82F7c7ECa4bCC',
    'cBAT': '0x9040D587Ee279948F8A81B43D5351160336FcA45',
    'cDAI': '0x6f131f13c0A68304308Aed13976e3c962E7603A7',
    'Unitroller': '0xfa0719C271B9cB4305612EF71d4eeFf813Ff0E33'
  }
};

truffe-config.js (optional if using Rinkeby)

If you are using Rinkeby, you do not need to do anything, but if you are looking to use a different testnet, like Ropsten, you will have to configure this file with the proper network data. For more information on how to configure for your desired network, please see: https://www.trufflesuite.com/docs/truffle/reference/configuration

Running Test Tx

Simply run npm run test-tx to execute the transactions on the addresses configured above. Note that, if using a network other than Rinkeby, you will need to instead run npx truffle migrate --network NETWORK, where NETWORK is the name of the network. For example, for Ropsten, one would run:

npx truffle migrate --network ropsten

License

This project has been licensed under the MIT License.

compound-test-tx's People

Contributors

luiserebii avatar

Watchers

James Cloos avatar  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.