Giter Site home page Giter Site logo

maurolp15 / martian_token_crowdsale Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 10.02 MB

Develop a new cryptocurrency monetary system for the new Human Mars colony. Kaisecoin is a fungible token that’s ERC-20 compliant

Solidity 100.00%
blockchain ehtererum ethereum fungible-tokens solidity

martian_token_crowdsale's Introduction

Martian Token Crowdsale

My name is Oscar Lopez, I’m a student at the University of Miami FinTech Bootcamp Program.

In this activity, I was tasked with creating a monetary system for the first human colony on Mars, this system will be blockchain technology based and will have a cryptocurrency coin named KaseiCion or KAI. (Kaise means Mars in Japanese).

I developed the Solidity started code file KaseiCoin.sol to create the Token Contract containing a fungible token that is ERC-20 compliant, starting with the pragma statement for Solidity version 0.5.0, then importing the contracts from the from the OpenZeppelin library (ERC20, ERC20Detailed and ERC20Mintable), next defining a contract for the “KAI” coin and inheriting the three contracts imported from OpenZeppelin. Inside the “KAI” contract, I added a constructor with the name, symbol, and initial supply parameters, then I added a call to the constructor of the ERC20Detailed contract, passing the name, symbol and 18 (Decimals values) as parameters. Finally, I compiled the contract.

Also, I developed the Solidity started code file KaseiCoinCrowdsale.sol to create the crwodsale contract that will manage the entire process that allows the users to send ether to the contract and receive KaseiCoin tokens / KAI in return, the contract automatically mints the tokens and distribute them to a buyer in one transaction. I started with the pragma statement for Solidity version 0.5.0, then imported the contracts from the from the OpenZeppelin library (Crowdsale and MintedCrowdsale), next I defined a constructor providing the rate, wallet, and token parameters. Finally, I compiled the contract. Then, I created the the KaseiCoin Deployer Contract, I added variables to store addresses of the KaseCoin and KaseiCoinCrowdsale contracts, then I created a public address variable which will store the KaseiCoin address, a public address variable which will store the KaseiCoinCrowdsale address, a constructor with a name, symbol, and wallet parameters, inside it holds a new instance of the KaseiCoinToken contract with an assign address of the KaseiCoin token variable to the kasei_token_address variable. It also holds a new instance of the KaseiCoinCrowdsale contract by using rate (1) wallet (from main constructor), and token parameters. Then, I set the KaseiCoinCrowdsale contract as a minter and the KaseiCoinCrowdsaleDeployer renounce its minter role and finally, I compiled the contract.

Ultimately, I deployed and tested the Crowdsale on a my local Blockchain, by using Remix, MetaMask and Ganache, then performed real-world preproduction test by using test accounts to buy new tokens and then checking the balances of those accounts. Finally, I review the total supply of minted tokens and the amount of wei that the crowdsale contract has raised.


Solidity – KaseiCoin Contract Compiler

Stocks Phot


Solidity – KaseiCoinCrowdsale Contract Compiler

Stocks Phot


Solidity – KaseiCoinCrowdsaleDeployer Contract Compiler

Stocks Phot


Solidity – KaseiCoin Contract Deploy

Stocks Phot


Solidity – KaseiCoinCrowdsaleDeployer Contract Deploy

Stocks Phot


Solidity – KaseiCoinCrowdsale Contract Deploy

Stocks Phot


Solidity – kasei_crowdsale and kasei_token Addresses

Stocks Phot


Solidity – KaseiCoinCrowdsale Contract Transaction

Stocks Phot


Solidity – Ganache 8 Account Balance

Stocks Phot


Solidity – Ganache 9 Account Balance

Stocks Phot

martian_token_crowdsale's People

Contributors

maurolp15 avatar

Watchers

 avatar  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.