https://github.com/danieldacosta/erc-20-token
Creating my own token using the ERC-20 standard
https://github.com/danieldacosta/erc-20-token
Last synced: over 1 year ago
JSON representation
Creating my own token using the ERC-20 standard
- Host: GitHub
- URL: https://github.com/danieldacosta/erc-20-token
- Owner: DanielDaCosta
- Created: 2022-03-11T23:32:35.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-14T18:47:12.000Z (about 4 years ago)
- Last Synced: 2025-01-11T01:10:39.591Z (over 1 year ago)
- Language: JavaScript
- Size: 223 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ERC-20-token
Creating my own token using the ERC-20 standard => DPC Token
# Dependencies
```json
{
"dependencies": {
"@openzeppelin/contracts": "^4.5.0",
"@truffle/hdwallet-provider": "^2.0.4",
}
}
```
```bash
Truffle v5.5.3 (core: 5.5.3)
Ganache v7.0.1
Solidity - 0.8.12 (solc-js)
Node v16.14.0
Web3.js v1.5.3
```
# Usage
## Create Token
Update `contracts/DanielToken.sol` with your new token information.
## Pass the parameters specified in the Contract constructor
To be able to deploy your token you will need to create a file in the migrations folder create a new file *2_initial_migration.js*.
## (optional) Deploy to a local blockchain
Deploy to truffle develop:
```
1) Open a Terminal window, and make sure you are inside your project directory
2) Run the command `truffle develop` (to run a local ethereum network)
3) Use the command `compile` (to compile your solidity contract files)
4) Use the command `migrate --reset` (to deploy your contract to the locally running ethereum network)
```
## Deploy to Ropsten Test Network
In the file `truffle-config.js`, replace {YOUR_PRIVATE_KEY} with your **Metamask** private key and {YOUR_INFURA_ACCOUNT} with your **infura** account robsten endpoint
```
truffle migrate --reset --network ropsten
```