Implementing a Token Contract using Solidity

This page summarizes the projects mentioned and recommended in the original post on dev.to

SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • openzeppelin-contracts

    OpenZeppelin Contracts is a library for secure smart contract development.

  • `pragma solidity ^0.8.17; import "https://github.com/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC20/SafeERC20.sol"; import "https://github.com/OpenZeppelin/openzeppelin-contracts/contracts/math/SafeMath.sol"; contract Token is SafeERC20 { using SafeMath for uint256; // The name of the token string public name; // The symbol of the token string public symbol; // The number of decimal places for the token uint8 public decimals; // The total supply of the token uint256 public totalSupply; // Mapping from addresses to their token balance mapping (address => uint256) public balanceOf; // Event for when tokens are transferred event Transfer(address indexed from, address indexed to, uint256 value); // Initialize the token with a name, symbol, and number of decimal places constructor(string memory _name, string memory _symbol, uint8 _decimals, uint256 _totalSupply) public { require(_totalSupply <= 2**256 - 1); // check totalSupply within range require(_decimals <= 18); // check decimal places within range name = _name; symbol = _symbol; decimals = _decimals; totalSupply = _totalSupply; balanceOf[msg.sender] = _totalSupply; } // Transfer tokens from one address to another function transfer(address payable _to, uint256 _value) public { require(_to != address(0)); // check recipient address is not the null address require(_value > 0); // check value is greater than 0 require(balanceOf[msg.sender] >= _value); // check sender has sufficient balance balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value); // decrease sender balance balanceOf[_to] = balanceOf[_to].add(_value); // increase recipient balance emit Transfer(msg.sender, _to, _value); } function mint(address _to, uint256 _amount) public onlyOwner { require(_amount > 0); totalSupply = totalSupply.add(_amount); balanceOf[_to] = balanceOf[_to].add(_amount); emit Transfer(address(0), _to, _amount); } modifier onlyOwner { require(msg.sender == owner); _; } address public owner; } `

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Fork mainnet using hardhat to test and build on DeFi protocols and more

    3 projects | dev.to | 23 Jan 2023
  • Generating Decentralized identifier using ERC725 and ERC735

    2 projects | /r/solidity | 20 Jan 2023
  • “Every company will have an nft strategy” - Gary Vee Gary V explains why every company will implement in nft strategy in the next decade. Not every nft will be the next big then but they will still be very useful because the technology is so great. Do you agree with Gary?

    1 project | /r/GME | 17 Jan 2023
  • Question about implementing a UUPS proxy

    2 projects | /r/solidity | 10 Jan 2023
  • Kromatika DEX Automates Uniswap V3

    1 project | /r/UniSwap | 8 Jan 2023