public/subjects/blockchain/minimal-token
nprimo 4fa5c876a7 docs: run prettify and move h1 to h2 2023-06-09 09:17:48 +01:00
..
README.md docs: run prettify and move h1 to h2 2023-06-09 09:17:48 +01:00

README.md

Minimal Token

It is now time to create our first token. We will start with a minmal implementation of a token.

Instructions

  • Create a Smart Contract MinimalToken

  • Create a constructor function that takes a positive number as parameter and give an initial balance of tokens to the contract deployer.

  • Create a public function balanceOf(address) to retrieve the balance of each user given an address

Hint: You can declare a variable public to have an implicit public getter function of the same name.

  • Create a function transfer(address,uint) that takes as parameters an address and a positive integer and, providing the sender has sufficient funds, moves the token to the provided address.

Resources

Relevance

This is a minimal functionning token.