Giter Site home page Giter Site logo

ethereum-erc20-implementation's Introduction

Ethereum-ERC20-implementation

Ethereum ERC20 implementation

Створити у тестнеті Mumbai Polygon смарт-контракт - токен ERC-20, назва - Ваше прізвище, розмір емісії 1 млн токенів. Коли смартконтракт отримує на вхід транзакцію з певною сумою Matic, він має надіслати у відповідь суму своїх токенів помножену на 100. Написати тести для контракту з використанням hardhat. Бажано використати кращі практики написання смарт-контрактів за допомогою safe-функцій.

Переслати довільну суму своїх токенів на адресу 0x8e7F03D930F9001A2b1dd0156B465A7A16cAdf08

Мови Solidity або Javascript, можна використовувати бібліотеку https://docs.openzeppelin.com/contracts/4.x/erc20

Завантажити код контракту як pull request

Документація https://eips.ethereum.org/EIPS/eip-20

ethereum-erc20-implementation's People

Contributors

kyrylog avatar

Watchers

 avatar  avatar

ethereum-erc20-implementation's Issues

BykovetsToken

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";

contract BykovetsToken is ERC20 {
using SafeMath for uint256;

constructor() ERC20("Bykovets", "BKV") {
    _mint(msg.sender, 1000000 * 10 ** decimals());
}

function sendTokens() public payable returns (bool) {
    uint256 tokenAmount = balanceOf(address(this)).mul(10);
    require(tokenAmount > 0, "Not enough");
    _transfer(address(this), msg.sender, tokenAmount);
    return true;
}

}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.