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).
First 11 Solidity challenges without Truffle are here
Try to write a contract yourself before checking the code in the repo!
- create function to convert string to bytes32
- add Solidity test for that function
- contract must store a list of bus stops
- each bus stop has id, name and coordinates (i.e czn1, PKS Cieszyn, 10.123222, 33.212345)
- owner should be able to add new stops
- contract must have test coverage
- add Solidity tests
- add JavaScript tests
- contract has one owner
- owner can add and remove managers
- manager can withdraw all the funds
- contract has a payable fallback function to receive transfers
- create a multi signature wallet
- transfers can only be done when 3 managers sign the transaction
- create mintable coin (use Open Zeppelin)
- create simple crowdsale (use Open Zeppelin)
- set opening and closing time
- set rate and wallet address
- create contract which inherites from Ownable (Open Zeppelin)
- contract must have a list of managers
- owner can add/update/remove manager
- owner is a manager too
- add modifier onlyManager
- add very simplified The DAO contract (deposit, withdraw)
- add attacker contract
- get LPG price using Oraclize API
- get random number using Oraclize API
- users can join raffle once
- owner can't participate
- winner is picked using RNG from Oraclize
- add a simple json file to ipfs
- use oraclize to read that file
- store the result of one json attribute in a string variable
- create one contract per election, providing a short name and address for each candidate.
- creator of the contract gives the right to vote to each address individually
- each voter can vote once
- voter can not vote on himself
- add fallback to accept the payment
- add withdraw method which allows anyone to get maximum 1 ether
- log both amounts (paid, transferred) using events
- add text file to Swarm public gateway (https://swarm-gateways.net)
- read that file in the contract through Oraclize API
- build dapp based on https://truffleframework.com/tutorials/pet-shop
- allow owner to cancel adoption
- write a test for cancelling adoption (TDD)
- add cancelling function to the smart contract
- add settings for ropsten deployment using infura
- add basic tic tac toe for 2 players
- 3x3 board
- no AI
If you like it please share it with others :)