This repository has been archived by the owner on Oct 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
14,084 additions
and
315,141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dist/ | ||
coverage/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
{ | ||
"extends": ["bloq"] | ||
"extends": ["bloq"], | ||
|
||
"env": { | ||
"browser": true, | ||
"node": true, | ||
"jest": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
.DS_Store | ||
.vscode | ||
build | ||
node_modules | ||
coverage | ||
contracts/.placeholder | ||
test/.placeholder | ||
|
||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
sudo: required | ||
dist: trusty | ||
os: linux | ||
language: node_js | ||
node_js: | ||
- "8" | ||
|
||
cache: | ||
directories: | ||
- "node_modules" | ||
|
||
script: | ||
- npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,34 @@ | ||
<h1 align="center"> | ||
<img src="./logo.png" alt="MetronomeJS" width="50%"> | ||
<img src="./logo.png" alt="Metronome Contracts JS" width="50%"> | ||
</h1> | ||
|
||
🔌 JavaScript Contracts for [Metronome Token](http://metronome.io). This module provides a [web3](https://github.com/ethereum/web3.js) wrap of Metronome contracts ready to use. | ||
🔌 [Web3](https://github.com/ethereum/web3.js) Contracts for [Metronome Token](http://metronome.io) ready to be used. | ||
|
||
## Index | ||
[![Code Style](https://img.shields.io/badge/code%20style-bloq-0063a6.svg)](https://github.com/bloq/eslint-config-bloq) | ||
|
||
1. [Requirements](#requirements) | ||
1. [Dev Setup](#dev-setup) | ||
1. [Prod Setup](#prod-setup) | ||
1. [Usage](#usage) | ||
1. [Contracts](#interface) | ||
1. [License](#license) | ||
|
||
## Requirements | ||
- [Node.js](https://nodejs.org/en/) / Web Browsers | ||
- [Web3](https://github.com/ethereum/web3.js/) | ||
|
||
|
||
## Dev Setup | ||
```bash | ||
# Install dependencies | ||
$ npm i | ||
|
||
# Init webpack in dev mode | ||
$ npm run dev | ||
|
||
# Start demo application | ||
$ npm run demo | ||
``` | ||
|
||
## Prod Setup | ||
```bash | ||
# Install dependencies | ||
$ npm i | ||
|
||
# Build for production | ||
$ npm run build | ||
|
||
# Publish to npm registry | ||
$ npm publish | ||
## Install | ||
```batch | ||
$ npm i -S metronome-contracts | ||
``` | ||
|
||
## Usage | ||
```js | ||
const Web3 = require('web3') | ||
const Metronome = require('metronomejs') | ||
const Metronome = require('metronome-contracts') | ||
|
||
const web3 = new Web3('ws://localhost:8545') | ||
const metronome = new Metronome(web3) | ||
|
||
console.log(mtn.metToken.options) | ||
console.log(mtn.auctions.options) | ||
console.log(mtn.autonomousConverter.options) | ||
console.log(metronome.metToken.options) | ||
console.log(metronome.auctions.options) | ||
console.log(metronome.autonomousConverter.options) | ||
``` | ||
|
||
## Contracts | ||
|
||
- `METToken` | ||
- `Auctions` | ||
- `AutonomousConverter` | ||
## Contracts API | ||
- [`metToken`](https://github.com/autonomoussoftware/documentation/blob/master/owners_manual/owners_manual.md#token-api) | ||
- [`auctions`](https://github.com/autonomoussoftware/documentation/blob/master/owners_manual/owners_manual.md#auction-api) | ||
- [`autonomousConverter`](https://github.com/autonomoussoftware/documentation/blob/master/owners_manual/owners_manual.md#autonomous-converter-contract-api) | ||
|
||
## LICENSE | ||
|
||
[MIT License](https://github.com/MetronomeToken/metronome-api/blob/develop/LICENSE). | ||
[MIT License](https://github.com/MetronomeToken/metronome-api/blob/develop/LICENSE). |
Oops, something went wrong.