Coder Social home page Coder Social logo

degen's Introduction

DegenToken

DegenToken is an ERC20 token deployed on the Avalanche network designed for Degen Gaming. This smart contract enables minting new tokens, transferring tokens between players, redeeming tokens for in-game items, checking token balances, and burning tokens.

Features

  1. Minting New Tokens: The platform owner can create and distribute new tokens to players as rewards.
  2. Transferring Tokens: Players can transfer their tokens to other players.
  3. Redeeming Tokens: Players can redeem their tokens for items available in the in-game store.
  4. Checking Token Balance: Players can check their token balance at any time.
  5. Burning Tokens: Players can burn their tokens to reduce the total supply.

Smart Contract

Contract Address

0x213b84ca078083E07409cB3728873D4eDBAA46f5

The smart contract was deployed on the Avalanche Fuji Testnet.

Minting Tokens

Only the owner can mint new tokens.

mintTokens(address _to, uint256 _amount) external onlyOwner;

Transferring Tokens

Players can transfer their tokens to others.

transferDGN(address _to, uint256 _amount) external returns (bool);

``

Redeeming Game Items

Players can redeem tokens for in-game items. redeemGameItem(uint256 _itemId) external;

Checking Token Balance

Players can check their token balance.

`getDGNBalance() public view returns (uint256);

Burning Tokens

Players can burn their tokens to reduce the total supply.

solidity function burnTokens(uint256 _amount) external;

In-Game Store

The contract includes an in-game store where players can redeem their tokens for items. The store is initialized with default items upon contract deployment.

Adding New Items

Only the owner can add new items to the in-game store.

solidity function addItem(string memory _name, uint256 _price) public onlyOwner;

License

This project is licensed under the MIT License. See the LICENSE file for details.

degen's People

Contributors

bigbalo1 avatar

Watchers

 avatar

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.