Giter VIP home page Giter VIP logo

learn-solidity-with-examples's Introduction

Learn solidity with examples!

A repo full of smart contracts written in Solidity.

Important

This repo is for educational purposes only, use at your own risk.

Getting started

  • Install the dependencies npm i
  • Run the dapp-tools tests with npm run test
  • Run the hardhat tests with npm run hardhat-test
  • Run the fuzzer on ETH2BTC with echidna-test contracts/ETH2BTC.sol
  • Explore the contracts in ./contracts

Sample tests with dapp-tools (solidity) and hardhat (js) are included for educational purposes so you can choose which framework works best for you

learn-solidity-with-examples's People

Contributors

bitcoinwarrior1 avatar yeqbfgxjiq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

learn-solidity-with-examples's Issues

Error: JSON Parse error

Hello James , Thanks for sharing knowledge , i am trying to run your contract in Remix ide and struggling get it working. I am afraid i am getting error in pragma solidity ^0.4.11; I have tried to pass the address hardcoded but no luck .

While invoking deploy function with addresses as parameter i am getting error , i have tried to add the local remix address with /without different braces/both cases letters/with/without comma but no luck , please advice what i am doing wrong - i have chosen 1st address of remix for contract and 2nd address for buying and 3rd contract for seller.

{'0X14723A09ACFF6D2A60DCDF7AA4AFF308FDDC160C' , '0X4B0897B0513FDC7C541B6D9D7E929C4E5364D2DB'}

screen shot 2018-05-21 at 10 46 50

Hope for help.

Kind Regards
raky

Problems with contracts/current/escrow.sol

I was using the mentioned script, and I may have uncovered an error. The script throws() in the buyerOrSellerOnly modifier, when the buyer calls it. Your conditional is a little off. Will you honor a pull request?

Allow the user to place an order in eth2btc.sol by making a deposit

  • User can place an order by locking up a small deposit of eth for a set interval of time (enough time for them to make the btc transaction and receive confirmation). This locks a portion of the eth in the contract just for them.
  • When making a deposit, the user set's their btc details including their address
  • User receives an order id
  • After user sends btc, they can claim the eth and get a refund for the deposit
  • If the user does not send the btc and the time lapses, the deposit is given to the MM and the eth becomes available again

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.