Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rsksmart/erc677

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rsksmart/erc677

ERC-677 Token Implementation

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

logo

@rsksmart/erc677

Simple implementation of ERC-677 token contract, compatible with RIF Token.

Coverage Status npm

This package is only to use for testing purposes

Install

npm i @rsksmart/erc677

Usage

const ERC677 = artifacts.require('@rsksmart/erc677');

contract('My contract tests', async accounts => {
  let erc677;

  beforeEach(async () => {
    erc677 = await ERC677.new(
      accounts[0],
      web3.utils.toBN('1000000000000000000000'),
      'RIFOS',
      'RIF',
      web3.utils.toBN('18'),
    );
  });
});

JS

const Web3 = require('web3');
const ERC677Data = require('@rsksmart/erc677/ERC677Data.json');
const web3 = new Web3('https://public-node.rsk.co')
const ERC677 = new web3.eth.Contract(ERC677Data.abi, ERC677Data.address.rskMainnet);

Types

There are TypeScript typing definitions of the contracts published together with the original contracts. Supported contract's libraries are:

  • web3 version 1.* - web3-v1-contracts
  • web3 version 2.* - web3-v2-contracts
  • truffle - truffle-contracts
  • ethers - ethers-contracts

You can use them as follow:

import Web3 from 'web3'
import ERC677 from '@rsksmart/erc677/types/web3-v1-contracts/ERC677Data.d.ts'
import ERC677Data from '@rsksmart/erc677/ERC677Data.json'

const web3 = new Web3('https://public-node.rsk.co')
const rif = new web3.eth.Contract(ERC677Data.abi, ERC677Data.address.rskMainnet) as ERC677

Replace web3-v1-contracts with the proper library version.

Versions

  • Installing v1 will use Solidity v5
  • Installing v2 will use Solidity v8

RIF Token:

Keywords

FAQs

Package last updated on 20 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc