Git Product home page Git Product logo

disney-token-payment-system's Introduction

Disney token payment system

Project written in Solidity that I did during a Blockchain course. This was helpful for me to acquire the main concepts of Smart Contracts. In this case, the contract controls a payment system for a disney park.

Disclaimer

I'm not the author of this code. I just followed the tutorial to learn the concepts and practice Solidity. This project is part of the awesome course Curso Completo de Blockchain de cero a experto by Joan Amengual and Juan Gabriel Gomila Salas. It's in spanish :)

You may notice some strange messages on the code that get printed in the logs as you interact with the contract. I do this because of three reasons: 1, practice my english skills, 2, keeps me focus and motivated while I write the code, and 3, it's a lot more fun!

Test the Smart Contract

  1. There are three .sol files in this project. Download them.
  2. Open Remix IDE.
  3. Create a new folder and upload the .sol files inside it.
  4. Compile the Disney.sol file.
  5. Select Disney contract and deploy it in "Deploy & Run transactions" section.
  6. Play arround with the smart contract methods using some test accounts from the list in "Deployed Contracts" section. Note that the selected account at the moment of deploy will be the owner of the contract, or you can call it "Disney" in this case.
  7. You can now Create attractions and dishes, remove them, generate new tokens, etc.
  8. To use this contract as a customer point of view, you have to select another account from the list.
  9. In order to take an attraction or eat a dish, you have to buy tokens in first place. In the "value" section, you have to put the amount of ether you will spend and select Ether from the dropdown menu. Now you can buy tokens using buyTokens function.
  10. Play arround with the other methods! Try to use Owner-only functions (like "NewAttraction()") and see what happens. Or maybe you want to take atractions, see your account balance or get your ethers back giving your remaining tokens. It's on you! :)

disney-token-payment-system's People

Contributors

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