All Projects → pbrudny → learning-solidity-2018

pbrudny / learning-solidity-2018

Licence: other
Basic examples of Solidity smart contracts

Programming Languages

solidity
1140 projects

Projects that are alternatives of or similar to learning-solidity-2018

rICO-smart-contracts
Smart contracts for the Reversible ICO (rICO)
Stars: ✭ 38 (-58.7%)
Mutual labels:  smart-contracts
ora
Bloq Ora multi-blockchain smart contract compute oracle and validation engine
Stars: ✭ 28 (-69.57%)
Mutual labels:  smart-contracts
solidity-unfolder
A Python package to flatten Solidity code with imports into a single file
Stars: ✭ 19 (-79.35%)
Mutual labels:  smart-contracts
enigma-docker-network-deprecated
A containarized Enigma Protocol environment to start writing secret contracts
Stars: ✭ 50 (-45.65%)
Mutual labels:  smart-contracts
Postables-Payment-Channel
Postables Reusable Multi Party Payment Channel. Efficient, and lean Payment Channels with a dash of airdrops. Written in Solidity with Golang bindings
Stars: ✭ 26 (-71.74%)
Mutual labels:  smart-contracts
baseline
The Baseline Protocol is an open source initiative that combines advances in cryptography, messaging, and distributed ledger technology to enable confidential and complex coordination between enterprises while keeping data in systems of record. This repo serves as the main repo for the Baseline Protocol, containing core packages, examples, and r…
Stars: ✭ 565 (+514.13%)
Mutual labels:  smart-contracts
MCW-Azure-Blockchain
MCW Azure Blockchain
Stars: ✭ 35 (-61.96%)
Mutual labels:  smart-contracts
v2-periphery
🎚 Peripheral smart contracts for interacting with Uniswap V2
Stars: ✭ 900 (+878.26%)
Mutual labels:  smart-contracts
contracts
Off-the-shelf Solidity smart contracts
Stars: ✭ 100 (+8.7%)
Mutual labels:  smart-contracts
ethereum-erc20
Fungible token implementation for the Ethereum blockchain.
Stars: ✭ 27 (-70.65%)
Mutual labels:  smart-contracts
docs
Unleash Bitcoin's full potential with decentralized apps and smart contracts. The documentation covers key aspects of the Stacks network and technology and provides tutorials and other helpful content for developers.
Stars: ✭ 134 (+45.65%)
Mutual labels:  smart-contracts
EVM-Simulator
EVM-Simulator bachelor's thesis.
Stars: ✭ 36 (-60.87%)
Mutual labels:  smart-contracts
v1-contracts
🐍Uniswap V1 smart contracts
Stars: ✭ 430 (+367.39%)
Mutual labels:  smart-contracts
react-truffle-metamask
Build an DApp using react, redux, saga, truffle, metamask
Stars: ✭ 25 (-72.83%)
Mutual labels:  smart-contracts
lamden
A Performant Blockchain that Isn't Confusing
Stars: ✭ 116 (+26.09%)
Mutual labels:  smart-contracts
gas-reporting
Reference documentation on every gas price API and all the different formats
Stars: ✭ 85 (-7.61%)
Mutual labels:  smart-contracts
algo-builder
Framework to automate development of Algorand Assets and Smart Contracts.
Stars: ✭ 132 (+43.48%)
Mutual labels:  smart-contracts
contracts
Neufund and platform smart contracts
Stars: ✭ 23 (-75%)
Mutual labels:  smart-contracts
erc721-extensions
A set of composable extension contracts for the OpenZeppelin ERC721 base contracts.
Stars: ✭ 157 (+70.65%)
Mutual labels:  smart-contracts
awesome-solidity-gas-optimization
Best resources for Solidity gas optimizations ⛽
Stars: ✭ 893 (+870.65%)
Mutual labels:  smart-contracts

learning-solidity-2018

These examples are part of my guide The best way to become Ethereum Developer in 2018

and 30/30 challenge on polish ethereum programming FB group (members write one contract a day to improve Solidity skills).

In Ethereum world everything is changing dynamically. I decided to make a set of Smart Contracts for learning purposes.

I know it's funny to name a repo this way but I am quite convinced that in 2019 these examples may not work with the latest Solidity.

Try to write a contract yourself before checking the code in the repo!

Challenges

01_say_hello.sol

  • set greeting on creation and allow to change it by the owner (creator of the contract)
  • return greeting to everyone who calls sayHello method
  • return Hello Daddy to the creator

02_balance_address_checker.sol

  • return address of the contract
  • return address of the contract's owner
  • return address of the sender
  • return balance of the contract
  • return balance of the contract's owner (ONLY if you are the owner)
  • return balance of the sender

03_basic_random.sol

04_lottery_10_users.sol

  • 10 users limit
  • user has to pay 0.1 ether to join the lottery
  • same user can join once
  • owner of the contract can join the lottery
  • when 10 users join then the winner is picked
  • winner receives all the money
  • new lottery starts when the winner is pickecd

05_lottery_no_limit.sol

  • user has to pay 0.1 ether to join the lottery
  • no limit for users number
  • same user can join multiple times
  • owner of the contract can join too
  • owner decides when to pick the winner
  • winner receives all the money
  • new lottery starts when the winner is pickecd

06_lottery_muliple_winners

  • no limit for users
  • user joins paying 0.1 eth and picking number 1-100
  • owner decides when to generate random number (1-100)
  • users who picked generated numbers win
  • total prize is distributed to all winners

07_fundraising

  • fundraising has the goal to reach (amount is set on creation)
  • fundraising has the time limit (time is set on creation)
  • anyone can add any amount until time is up or the goal is reached
  • when the time is up but the goal is not reached users can withdraw their funds
  • when the goal is reached owner can withdraw all the money

08_basic_token

  • intial supply of tokens is set on creation
  • contract creator gets initial tokens
  • tokens can be transferred to any account
  • there is a protection from overflow
  • everyone can check balances

09_ERC_20_token

10_ERC20_usage

  • create your own ERC20 token using Open Zeppelin implementation
  • inherit from "StandardToken"
  • add custom name, symbol, decimals and initial supply

11_ERC_721_usage

  • create your own ERC721 token using Open Zeppelin implementation
  • inherit from "ERC721Token"
  • add custom name and symbol

Other challenges

Contribution

  • feel to free to add new challenges in the README.
  • feel free to add your solution to any challenge (of course if it's different than the existing one)

Example:

If you want to add another Basic Token contract:

  1. Fork the repo
  2. Add basic_token_b.sol to the 07_basic_token directory
  3. Make a PR
  4. Let me review it and merge it
  5. Enjoy having a nice contribution to the great project :)

Like it?

If you like it please share it with others :)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].