monkrus / drugstore_solidity

Simple drugstore solidity based contract

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

drugstore_solidity

Simple drugstore solidity based contract

The intention of this contract is to create a basic understanding of the basic structure.

πŸ”‹ Line 6 creates a mechanism to count drugs. It is implemented in line 37.

πŸ”‹ Line 8 is a key/value based structure allowing to access struct Drugstore (structure of elements. e.g. manufacturer, drug name etc.).

πŸ”‹ Line 12 implements opening time (Epoch time is used).

πŸ”‹ Lines 14, 19 adds modifiers (adding condition prior to function execution).

πŸ”‹ Line 29 is executed only once, as soon as contract has been lauched.

πŸ”‹ Line 33 allows adding drugs, increments count and refers every newly added item to the counter.(e.g. once new item is added, the counter will increment by 1).

About

Simple drugstore solidity based contract


Languages

Language:JavaScript 100.0%