Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
gabmontes committed Oct 28, 2020
0 parents commit a3599f6
Show file tree
Hide file tree
Showing 8 changed files with 796 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
5 changes: 5 additions & 0 deletions .huskyrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"hooks": {
"pre-commit": "npm run lint"
}
}
30 changes: 30 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
os: linux
dist: bionic

language: node_js
node_js:
- '12'

jobs:
include:
- stage: Lint

script: npm run lint

- stage: NPM release

if: tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+

script: skip

before_deploy:
- echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > ~/.npmrc
- npm i --global otp-cli
- export NPM_OTP=$(otp-cli totp generate -k "$NPM_OTP_SECRET")

deploy:
on:
tags: true
provider: script
script: npm publish --otp "$NPM_OTP"
skip_cleanup: true
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) Bloq, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# erc-20-abi

[![Build Status](https://travis-ci.com/github/bloq/erc-20.abi.svg?branch=master)](https://travis-ci.com/github/bloq/erc-20.abi)

Just the [ERC-20](https://eips.ethereum.org/EIPS/eip-20) standard token contract [ABI](https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI) in an NPM package.
As simple as that!

## Install

```sh
npm install erc-20-abi
```

## Usage

```js
const abi = require('erc-20-abi')

const token = new web3.eth.Contract(abi, address)

token.methods.symbol.call().then(console.log) // prints the token's symbol
```

## License

MIT
Loading

0 comments on commit a3599f6

Please sign in to comment.