Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samajammin/etherswing
A smart contract that allows users to leverage up on ETH with built in stop-loss using MakerDAO and Uniswap.
https://github.com/samajammin/etherswing
truffle truffle-framework vyper vyper-contracts
Last synced: 25 days ago
JSON representation
A smart contract that allows users to leverage up on ETH with built in stop-loss using MakerDAO and Uniswap.
- Host: GitHub
- URL: https://github.com/samajammin/etherswing
- Owner: samajammin
- Created: 2019-06-18T08:03:47.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-23T23:02:47.000Z (almost 2 years ago)
- Last Synced: 2024-10-04T15:35:26.223Z (about 1 month ago)
- Topics: truffle, truffle-framework, vyper, vyper-contracts
- Language: Solidity
- Homepage:
- Size: 1.77 MB
- Stars: 16
- Watchers: 4
- Forks: 7
- Open Issues: 7
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# EtherSwing
## Prerequisites
You will need the following properly installed on your computer:
- [Git](https://git-scm.com/)
- [Node.js v8+ LTS](https://nodejs.org/en/)## Installation
Install [yarn](https://yarnpkg.com/lang/en/docs/install) (or use NPM if you prefer):
```
brew install yarn
```Install [Truffle](https://truffleframework.com/truffle):
```
yarn global add truffle
```Ensure you have truffle 5. Running `truffle version` should output look something like:
```
Truffle v5.0.21 (core: 5.0.21)
Solidity v0.5.0 (solc-js)
Node v10.13.0
Web3.js v1.0.0-beta.37
```[Install Vyper](https://vyper.readthedocs.io/en/latest/installing-vyper.html) with a virtualenv
Once your virtualenv is activated, running `vyper --version` should output:
```
0.1.0b10
```Install project dependencies
```bash
yarn
```## Development
In order to run the `mainlocal` network, set up a local [ganache](https://github.com/trufflesuite/ganache-cli) chain that is a fork of Ethereum's mainnet. The easiet way is to create an [Infura](https://infura.io) project. Then run:
```bash
ganache-cli --fork https://mainnet.infura.io/v3/{your-infura-project-id}@8159055
```This will fork the mainnet at block 8159055, allowing you to interact with mainnet contracts and storage (e.g. the MakerDAO system). When using Truffle, make sure to run:
```bash
truffle console --network mainlocal
```Otherwise, running `truffle develop` will spin up a separate ganache instance.