Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@0xcert/ethereum-erc20
Advanced tools
Fungible token standard implementation for the Ethereum blockchain.
This is a complete implementation of the ERC-20 fungible token standard for the Ethereum blockchain. This is an open source project build with Truffle framework.
Purpose of this implementation is to provide a good starting point for anyone who wants to use and develop fungible tokens on the Ethereum blockchain. Instead of re-implementing the ERC-20 yourself you can use this code which has gone through multiple audits and we hope it will be extensively used by the community in the future.
Since this is a Truffle project, you will find all tokens in contracts/tokens/
directory.
This is an NPM module for Truffle framework. In order to use it as a dependency in your Javascript project, you must install it through the npm
command:
$ npm install @0xcert/ethereum-erc20
Clone the repository and install the required npm
dependencies:
$ git clone git@github.com:0xcert/ethereum-erc20.git
$ cd ethereum-erc20
$ npm install
Make sure that everything has been set up correctly:
$ npm run test
To interact with package's contracts within JavaScript code, you simply need to require that package's .json files:
const contract = require("@0xcert/ethereum-erc20/build/contracts/Token.json");
console.log(contract);
The easiest way to start is to create a new file under contracts/tokens/
(e.g. MyToken.sol
):
pragma solidity ^0.4.24;
import "../tokens/Token.sol";
contract MyToken is Token {
constructor()
public
{
tokenName = "My Token";
tokenSymbol = "MTK";
tokenDecimals = 18;
tokenTotalSupply = 100000000000000000000000000;
balances[msg.sender] = totalTokenSupply; // Give the owner of the contract the whole balance
}
}
That's it. Let's compile the contract:
$ npm run compile
The easiest way to deploy it locally and start interacting with the contract (minting and transferring tokens) is to deploy it on your personal (local) blockchain using Ganache. Follow the steps in the Truffle documentation which are described here.
See CONTRIBUTING.md for how to help out.
See LICENSE for details.
FAQs
Fungible token standard implementation for the Ethereum blockchain.
We found that @0xcert/ethereum-erc20 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.