An open API service indexing awesome lists of open source software.

https://github.com/ajlopez/soliditysamples

Solidity Smart Contracts Samples
https://github.com/ajlopez/soliditysamples

ethereum language learning smartcontract solidity

Last synced: 4 months ago
JSON representation

Solidity Smart Contracts Samples

Awesome Lists containing this project

README

          

# Solidity Samples

Solidity programming language samples, smart contracts for Ethereum.

## Related Repositories

- [Aprendiendo Solidity (Spanish)](https://github.com/ajlopez/AprendiendoSolidity)
- [Solidity Compiler](https://github.com/ajlopez/SolidityCompiler)
- [Solidity Decompiler](https://github.com/ajlopez/yasold)

## References

- [The Ethereum Project](https://ethereum.org/)
- [Solidity Documentation](http://solidity.readthedocs.io/en/develop/)
- [Truffle Framework](http://truffleframework.com/)
- [OpenZeppelin](https://openzeppelin.org/)

## Ethereum

- [The Complete Tutorial On Getting Started With Smart Contracts On Ethereum](https://medium.com/@ricochenx/the-complete-tutorial-on-getting-started-with-smart-contracts-on-ethereum-3ee6c54e84db)
- [What is Ethereum?](https://medium.com/on-the-block/what-is-ethereum-fb6b7c33e21d)
- [Learn Ethereum](https://ethereum.network/learn)
- [The Hitchhiker�s Guide to Smart Contracts in Ethereum](https://blog.zeppelin.solutions/the-hitchhikers-guide-to-smart-contracts-in-ethereum-848f08001f05)
- [Programming Ethereum smart contract transactions in JavaScript](https://tokenmarket.net/blog/creating-ethereum-smart-contract-transactions-in-client-side-javascript/)
- [Ethereum Virtual Machine Awesome List](https://github.com/pirapira/awesome-ethereum-virtual-machine)
- [A curated list of awesome Ethereum Resources](http://awesome-ethereum.com/)
- [A Gentle Introduction to Ethereum Programming, Part 1](https://blog.zeppelin.solutions/a-gentle-introduction-to-ethereum-programming-part-1-783cc7796094)
- [A Gentle Introduction to Ethereum Programming, Part 2](https://blog.zeppelin.solutions/a-gentle-introduction-to-ethereum-programming-part-2-7bbf15e1a953)
- [A Gentle Introduction to Ethereum Programming, Part 3](https://blog.zeppelin.solutions/a-gentle-introduction-to-ethereum-programming-part-3-abdd9644d0c2)
- [Ethereum Dev Cheatsheet](https://github.com/beether/ethereum-dev-cheatsheet)
- [CryptoZombies is a free, interactive code school that teaches you to build games on Ethereum](https://cryptozombies.io/)
- [Beether](http://www.beether.net/)
- [Getting started with Ethereum as a developer](https://medium.com/bcgdv-engineering/getting-started-with-ethereum-as-a-developer-af20d78c49f)
- [Getting Started as an Ethereum Web Developer](https://hackernoon.com/getting-started-as-an-ethereum-web-developer-9a2a4ab47baf)
- [A Guide to Gas](https://media.consensys.net/a-guide-to-gas-12b40d03605d)
- [Understanding the ethereum trie](https://easythereentropy.wordpress.com/2014/06/04/understanding-the-ethereum-trie/)
- [Data structure in Ethereum | Episode 1: Recursive Length Prefix (RLP) Encoding/Decoding](https://medium.com/coinmonks/data-structure-in-ethereum-episode-1-recursive-length-prefix-rlp-encoding-decoding-d1016832f919)
- [Data structure in Ethereum | Episode 1+: Compact (Hex-prefix) encoding](https://medium.com/coinmonks/data-structure-in-ethereum-episode-1-compact-hex-prefix-encoding-12558ae02791)
- [Data structure in Ethereum | Episode 2: Radix trie and Merkle trie](https://medium.com/coinmonks/data-structure-in-ethereum-episode-2-radix-trie-and-merkle-trie-d941d0bfd69a)
- [Data structure in Ethereum | Episode 3: Patricia trie](https://medium.com/coinmonks/data-structure-in-ethereum-episode-3-patricia-trie-b7b0ccddd32f)
- [Data structure in Ethereum | Episode 4: Diving into examples](https://medium.com/coinmonks/data-structure-in-ethereum-episode-4-diving-by-examples-f6a4cbd8c329)
- [Skewed Merkle Trees](https://medium.com/codechain/skewed-merkle-tree-259b984acc0c)
- [Ethereum 69: how to set up a fully synced blockchain node in 10 mins](https://medium.freecodecamp.org/ethereum-69-how-to-set-up-a-fully-synced-blockchain-node-in-10-mins-f6318d7aad40)
- [State Channels for Dummies: Part 5](https://medium.com/blockchannel/state-channels-for-dummies-part-5-6238f83f8da3)
- [Ethereum Explained: Merkle Trees, World State, Transactions, and More](https://pegasys.tech/ethereum-explained-merkle-trees-world-state-transactions-and-more/)
- [The 11 Best Sources for Ethereum News and Learning](https://media.consensys.net/the-11-best-sources-for-ethereum-news-and-learning-783ef4803ab0)
- [Improving Smart Contract development with Tenderly and human readable stack traces](https://medium.com/tenderly/improving-smart-contract-development-with-tenderly-and-human-readable-stack-traces-16abfad5dd15)
- [Ethereum Under the Hood: Part-1 (ver 0.1)](https://medium.com/coinmonks/ethereum-under-the-hood-part-i-ver-0-1-4f2fb24b3d68)
- [Ethereum Under the Hood- Part 2 (RLP Encoding)](https://medium.com/coinmonks/ethereum-under-the-hood-part-ii-i-933411deebe1)
- [Ethereum Under The Hood Part 3 (RLP Decoding)](https://medium.com/coinmonks/ethereum-under-the-hood-part-3-rlp-decoding-c0c07f5c0714)
- [A Guide to Gas](https://media.consensys.net/a-guide-to-gas-12b40d03605d)
- [A Definitive List of Ethereum Developer Tools](https://media.consensys.net/an-definitive-list-of-ethereum-developer-tools-2159ce865974)
- [Ethereum�s EIP 2/4: 15 Second Block Target](https://blog.cotten.io/ethereums-eip-2-4-15-second-block-target-98d4c11017e1)
- [The business of sending transactions on Ethereum](https://medium.com/coinmonks/the-business-of-sending-transactions-on-ethereum-e79fd9a2b88)
- [EVM Evolution Roadmap](https://medium.com/spadebuilders/evm-evolution-roadmap-f8b8e3a73882)
- [Ethereum Yellow Paper Walkthrough: Merkle Trees](https://dzone.com/articles/ethereum-yellow-paper-walkthrough-27)
- [Role Based Access Control for the Ethereum Blockchain](https://hackernoon.com/role-based-access-control-for-the-ethereum-blockchain-bcc9dfbcfe5c)
- [How does Ethereum work, anyway?](https://medium.com/@preethikasireddy/how-does-ethereum-work-anyway-22d1df506369)
- [A guide to Ethereum�s ERC standards](https://news.yahoo.com/guide-ethereum-erc-standards-150024381.html)
- [Diving into Ethereum�s world state](https://medium.com/cybermiles/diving-into-ethereums-world-state-c893102030ed)
- [The Ethereum Virtual Machine (EVM) Runtime Environment](https://medium.com/0xcode/the-ethereum-virtual-machine-evm-runtime-environment-d7969544d3dd)
- [How does Ethereum work, anyway?](https://medium.com/@preethikasireddy/how-does-ethereum-work-anyway-22d1df506369)
- [Mastering The Fundamentals of Ethereum (For New Blockchain Devs) Part III � Wallets, Keys, And Accounts](https://medium.com/@markmuskardin/mastering-the-fundamentals-of-ethereum-for-new-blockchain-devs-part-iii-wallets-keys-and-4cd3175b535b)
- [Ethereum Development Crash Course Part One](https://medium.com/bitfwd/ethereum-development-crash-course-part-one-327dee16878b)
- [Data Convergence � Blockchain � Blockchain Developer Tools](https://medium.com/data-convergence/data-convergence-blockchain-blockchain-developer-tools-8c9e98852251)

## Solidity

- [Documentation](http://solidity.readthedocs.io/en/develop/index.html)
- [Learning Solidity (videos)](https://www.youtube.com/watch?v=v_hU0jPtLto&list=PL16WqdAj66SCOdL6XIFbke-XQg2GW_Avg&index=1)
- [Solidity Contracts](http://solidity.readthedocs.io/en/develop/contracts.html)
- [Application Binary Interface Specification](http://solidity.readthedocs.io/en/develop/abi-spec.html#abi)
- [Solidity Baby Steps](https://github.com/fivedogit/solidity-baby-steps)
- [How to initialize an empty array and push items into it?](https://ethereum.stackexchange.com/questions/11533/how-to-initialize-an-empty-array-and-push-items-into-it)
- [What is the memory keyword? What does it do?](https://solidity.readthedocs.io/en/latest/frequently-asked-questions.html#what-is-the-memory-keyword-what-does-it-do)
- [A curated list of awesome Solidity resources, libraries, tools and more](https://github.com/bkrem/awesome-solidity)
- [Solidity REPL](https://github.com/raineorshine/solidity-repl)
- [Remix](https://remix.ethereum.org/#version=soljson-v0.4.18+commit.9cf6e910.js)
- [Interaction between Contracts](https://dappsforbeginners.wordpress.com/tutorials/interactions-between-contracts/)
- [How can I debug a smart contract?](https://ethereum.stackexchange.com/questions/184/how-can-i-debug-a-smart-contract)
- [What is the difference between an internal/external and public/private function in solidity?](https://ethereum.stackexchange.com/questions/32353/what-is-the-difference-between-an-internal-external-and-public-private-function)
- [external vs public best practices](https://ethereum.stackexchange.com/questions/19380/external-vs-public-best-practices)
- [internal keyword in a function definition in Solidity](https://ethereum.stackexchange.com/questions/631/internal-keyword-in-a-function-definition-in-solidity)
- [Doxity Documentation Generator for Solidity](https://github.com/DigixGlobal/doxity)
- [Solidity doc generator](https://github.com/vitiko/solidity-doc)
- [Markdown documentation generator for Solidity](https://github.com/dpilch/solmd)
- [Solidity Common Patterns](http://solidity.readthedocs.io/en/develop/common-patterns.html)
- [Thinking in Solidity](https://blog.cotten.io/thinking-in-solidity-6670c06390a9)
- [Solidity tips and tricks to save gas and reduce bytecode size](https://blog.polymath.network/solidity-tips-and-tricks-to-save-gas-and-reduce-bytecode-size-c44580b218e6)
- [Solidity CRUD- Epilogue](https://medium.com/robhitchens/solidity-crud-epilogue-e563e794fde)
- [Getting Loopy with Solidity](https://blog.b9lab.com/getting-loopy-with-solidity-1d51794622ad)
- [Solidity Collections](https://github.com/ethereum/wiki/wiki/Solidity-Collections)
- [Testing and Code Coverage of Solidity Smart Contracts](https://medium.com/edgefund/testing-and-code-coverage-of-solidity-smart-contracts-660cb6291701
- [Which custom data structures do you use in Solidity?](https://forum.zeppelin.solutions/t/which-custom-data-structures-do-you-use-in-solidity/510)
- [Ethernaut Lvl 0 Walkthrough: ABIs, Web3, and how to abuse them](https://hackernoon.com/ethernaut-lvl-0-walkthrough-abis-web3-and-how-to-abuse-them-d92a8842d71b)
- [Deconstructing a Solidity Contract � Part II: Creation vs. Runtime](https://forum.zeppelin.solutions/t/deconstructing-a-solidity-contract-part-ii-creation-vs-runtime/679)
- [Solidity for Beginners](https://medium.com/swlh/solidity-for-beginners-9b8cb5cb4620)
- [�Stack Too Deep�- Error in Solidity](https://medium.com/coinmonks/stack-too-deep-error-in-solidity-608d1bd6a1ea)
- [Better Solidity debugging: stack traces are finally here](https://medium.com/nomic-labs-blog/better-solidity-debugging-stack-traces-are-finally-here-dd80a56f92bb)
- [Fixed point math in Solidity](https://medium.com/cementdao/fixed-point-math-in-solidity-616f4508c6e8)
- [Solidity Library for Array of Type Address](https://medium.com/51nodes/solidity-library-for-array-of-type-address-e40c36784ab2)
- [`external` vs `public` best practices](https://ethereum.stackexchange.com/questions/19380/external-vs-public-best-practices)
- [Solidity 0.6: You Might Be Sending Ether Incorrectly](https://medium.com/better-programming/solidity-0-6-you-might-be-sending-ether-all-wrong-1e119e1ffc27)
- [Introduction into Mutation Testing](https://medium.com/swlh/introduction-into-mutation-testing-d6512dc702b0)
- [Math in Solidity (Part 5: Exponent and Logarithm)](https://medium.com/coinmonks/math-in-solidity-part-5-exponent-and-logarithm-9aef8515136e)
- [A brief analysis of the new try/catch functionality in Solidity 0.6](https://forum.openzeppelin.com/t/a-brief-analysis-of-the-new-try-catch-functionality-in-solidity-0-6/2564)

## Contracts

- [How to Code Your Own CryptoKitties-Style Game on Ethereum](https://medium.com/loom-network/how-to-code-your-own-cryptokitties-style-game-on-ethereum-7c8ac86a4eb3)
- [How to call a contract method using the eth_call JSON-RPC API](https://ethereum.stackexchange.com/questions/3514/how-to-call-a-contract-method-using-the-eth-call-json-rpc-api)
- [Smart Contract Patterns](https://github.com/cjgdev/smart-contract-patterns)
- [Writing upgradable contracts in Solidity](https://blog.colony.io/writing-upgradeable-contracts-in-solidity-6743f0eecc88)
- [Legal Design Patterns in Smart Contracts](https://medium.com/@billgleim/legal-design-patterns-in-smart-contracts-60916cd9ebd7)
- [Mad blockchain science: A 100% upgradeable contract](https://www.reddit.com/r/ethereum/comments/4kt1zp/mad_blockchain_science_a_100_upgradeable_contract/)
- [EVM Assembly Tricks](http://www.swende.se/blog/EVM-Assembly-trick.html)
- [Lottery as a Smart Contract: The Business Logic](https://medium.com/coinmonks/lottery-as-a-smart-contract-the-business-logic-3bd22d3a6c4e)
- [Creating Smart Contracts with Smart Contract](https://medium.com/coinmonks/creating-smart-contracts-with-smart-contract-d54e21d26e00)
- [How to Write Upgradeable Smart Contracts with Truffle 5.0 and ZeppelinOS 2.0](https://paulrberg.com/post/2018/12/30/upgradeable-smart-contracts/)
- [zepcon0 - ZeppelinOS - Upgradeability by Elena Nadolinski](https://www.youtube.com/watch?v=FzmzUHLiutg)
- [Smart Contracts: A Simple Guide � Part 1](https://medium.com/@ShapeShift.io/smart-contracts-a-simple-guide-part-1-fa16a6c201c1)
- [Writing Smart Contracts with Solidity > 0.5](https://medium.com/@rossbulat/writing-solidity-0-5-smart-contracts-101-5efd1ee9f53e)
- [Dapp](https://dapp.tools/dapp/)
- [Compiling and deploying Ethereum Smart Contracts with pure JavaScript](https://medium.com/coinmonks/compiling-and-deploying-ethereum-smart-contracts-with-pure-javascript-4bee3bfe99bb)
- [Crypto Wars](https://github.com/e11-io/crypto-wars-solidity)
- [Parity�s Checklist for Secure Smart Contract Development](https://www.parity.io/paritys-checklist-for-secure-smart-contract-development/)
- [A simple blockchain application for data verification](https://hackernoon.com/a-simple-blockchain-application-for-data-verification-c288a64e0d24)
- [Smart contract vs �token�-based systems](https://medium.com/symbiont-io/smart-contract-vs-token-based-systems-ccdd99af41e3)
- [Smart Contract Explained by Demonstration](https://medium.com/coinmonks/smart-contract-explained-by-demonstration-93b06e938474)
- [How to write a simple token contract in Solidity](https://medium.com/datadriveninvestor/writing-a-simple-token-contract-in-solidity-1c457ab25b1a)

## Geth

- [An Introduction to Geth and Running Ethereum Nodes](https://www.sitepoint.com/an-introduction-to-geth-and-running-ethereum-nodes/)
- [Set up an Ethereum development network in two minutes](https://gist.github.com/evertonfraga/9d65a9f3ea399ac138b3e40641accf23)
- [Ethereum : How to setup a local test node with initial ether balance using geth](https://medium.com/@chim/ethereum-how-to-setup-a-local-test-node-with-initial-ether-balance-using-geth-974511ce712)

## Web3JS

- [Web3JS 1.x Documentation](http://web3js.readthedocs.io/en/1.0/)
- [New Contract](https://web3js.readthedocs.io/en/1.0/web3-eth-contract.html#new-contract)
- [Calling your first Smart Contract function with Web3 and Angular5](https://blog.fundrequest.io/calling-your-first-smart-contract-function-with-web3-and-angular5-aa1bde26a55c)
- [Web3JS 0.2x Documentation](https://github.com/ethereum/wiki/wiki/JavaScript-API)
- [03. Web3.js Tutorial - Attach a GUI to your Ethereum Smart Contract](https://www.youtube.com/watch?v=hcTPjpPvas8)
- [04. Capturing Smart Contract Events in our User Interface (Solidity)](https://www.youtube.com/watch?v=L5Au5DY8eL4)

## Truffle

- [Truffle Framework](http://truffleframework.com)
- [Truffle Tutorials](http://truffleframework.com/tutorials)
- [PetShop Tutorial](http://truffleframework.com/tutorials/pet-shop)
- [Building Robust Smart Contracts with OpenZeppelin](http://truffleframework.com/tutorials/robust-smart-contracts-with-openzeppelin)
- [Truffle Boxes](http://truffleframework.com/boxes)
- [How Truffle Works Under the Hood](https://medium.com/heartbankacademy/how-truffle-works-under-the-hood-f1ff6add416c)
- [Debugging Smart Contracts with Truffle Debugger: A Practical Approach](https://medium.com/coinmonks/debugging-smart-contracts-with-truffle-debugger-a-practical-approach-3410e9d20837)
- [Unit Testing: Build a Decentralized Domain Name System on Top of Ethereum](https://hack.bg/blog/tutorials/part-two-unit-testing-build-a-decentralized-domain-name-system-ddns-on-top-of-ethereum/)
- [Introduction to the Truffle Suite and Dapp Development Pipeline](https://medium.com/@rossbulat/introduction-to-the-truffle-suite-and-dapp-development-pipeline-1b33bb8228d4)
- [Test Driven Solidity with Truffle](https://medium.com/@yahya_gis/test-driven-solidity-with-truffle-e4beaa2bd194)
- [Solidity and TDD - How to build a smart contract](https://ilanolkies.com/post/Solidity-and-TDD)
- [Managing Ethereum Smart Contract Events with Drizzle](https://medium.com/truffle-suite/managing-ethereum-smart-contract-events-with-drizzle-58f3f9afbdad)
- [Getting Started with Drizzle and React](https://www.trufflesuite.com/tutorials/getting-started-with-drizzle-and-react)
- [Handy helper functions for Solidity Development with Truffle](https://medium.com/@contacttomnash/handy-helper-functions-for-solidity-development-with-truffle-39d14a371c12)
- [How to Write Complex Truffle Migrations](https://medium.com/better-programming/how-to-write-complex-truffle-migrations-86d4b85d7783)

## Dapps

- [Dapps for Beginners](https://dappsforbeginners.wordpress.com)
- [Tips and Tricks for Adding Metamask to Your UI](https://hackernoon.com/tips-and-tricks-for-adding-metamask-to-your-ui-32728b437194)
- [Dip Dapp Doe?�?Anatomy of an Ethereum distributed fair game (part 1)](https://hackernoon.com/dip-dapp-doe-anatomy-of-an-ethereum-distributed-fair-game-part-1-5ee78980e360)
- [Introducing ZepKit: the easiest way to start your decentralized application](https://blog.zeppelinos.org/introducing-zepkit/)
- [Designing the architecture for your Ethereum application](https://forum.zeppelin.solutions/t/designing-the-architecture-for-your-ethereum-application/534/1)
- [DApp Development for Python Programmers](https://levelup.gitconnected.com/dapps-development-for-python-developers-f52b32b54f28)

## Explorers

- [Etherparty Explorer](https://github.com/etherparty/explorer)

## Tokens

- [What is An Ethereum Token: The Ultimate Beginner�s Guide](https://blockgeeks.com/guides/ethereum-token/)
- [ERC20 Token Standard](https://theethereum.wiki/w/index.php/ERC20_Token_Standard)
- [ERC20 Token Standard: A Beginners Guide](https://medium.com/cryptoxtech/erc20-token-standard-a-beginners-guide-5b5f0c87e11f)
- [ERC20](https://en.wikipedia.org/wiki/ERC20)
- [Ethereum's ERC-20 Token Standard Has Been Formalized](https://www.coindesk.com/ethereums-erc-20-token-standard-formalized/)
- [ERC20 Standard Token Explorer](https://etherscan.io/token-search)
- [ERC: Non-fungible Token Standard #721](https://github.com/ethereum/EIPs/issues/721)
- [Ethereum Based Tokens](https://theethereum.wiki/w/index.php/Ethereum_Based_Tokens)
- [Ethereum smart service payment with tokens](https://medium.com/@jgm.orinoco/ethereum-smart-service-payment-with-tokens-60894a79f75c)
- [How To Write A Smart-Contract For Your ICO? An Ultimate guide](https://howtotoken.com/ico/how-to-write-a-smart-contract-for-your-ico-an-ultimate-guide/)
- [The Innards of an ERC20 Token](https://hackernoon.com/the-innards-of-an-erc20-token-587c29e9b8a1)

## CryptoKitties

- [CriptoKitties](https://www.cryptokitties.co/)
- [CriptoKitties White Paper](https://www.dropbox.com/s/a5h3zso545wuqkm/CryptoKitties_WhitePapurr_V2.pdf?dl=0)
- [How to Code Your Own CryptoKitties-Style Game on Ethereum](https://medium.com/loom-network/how-to-code-your-own-cryptokitties-style-game-on-ethereum-7c8ac86a4eb3)
- [CryptoKitties](https://www.cryptokitties.co)
- [CryptoKitties: Collectible and Breedable Cats Empowered by Blockchain Technology](https://www.dropbox.com/s/a5h3zso545wuqkm/CryptoKitties_WhitePapurr_V2.pdf?dl=0)
- [Source Code](https://ethfiddle.com/09YbyJRfiI)
- [Code From EtherScan](https://etherscan.io/address/0x06012c8cf97bead5deae237070f9587f8e7a266d#code)
- [The Inside Story of the CryptoKitties Congestion Crisis](https://media.consensys.net/the-inside-story-of-the-cryptokitties-congestion-crisis-499b35d119cc)
- [Hacking the CryptoKitties Genome](https://hackernoon.com/hacking-the-cryptokitties-genome-1cb3e7dddab3)
- [CryptoKitties, Explained � Mostly](https://medium.com/the-new-york-times/cryptokitties-explained-mostly-d56d70024f36)

## Zeppelin

- [How to implement ERC20 supply mechanisms](https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226)