tosynthegeek / Vending-Machine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vending Machine

The Credit for this code goes to Block Explorer

In this contract, I built a simple vending machine with just a few features. This was a very simple contract, but it was nice to refresh my knowledge of mappings and contract logic.

Features

  • You can view the current balance in the vending machine
  • Restocking the vending machine
  • Limiting the restocking feature to only the contract owner
  • Revert transaction when there is not enough stock and when less than 2 ether is paid for an item in the vending machine

Getting Started

To build this application in development, I used the following dependencies:

OpenZeppelin: Library for building reliable contracts on Ethereum

Remix IDE

Metamask: Identity to interact with the Blockchain

Etherscan: Block explorer for verifying/exploring transactions and contracts on Ethereum

Acknowledgements

Contributing

Contributions are always welcome!

See contributing.md for ways to get started.

Please adhere to this project's code of conduct.

License

MIT

Optimizations

What optimizations did you make in your code? E.g. refactors, performance improvements, accessibility

About

License:MIT License


Languages

Language:Solidity 100.0%