Code Monkey home page Code Monkey logo

supplychain's Introduction

Udemy Supplychain Project

link to course

  • project goes through basic event handling, unit testing, and react coding
  • introduction to low level calls with custom gas for extra functionality (instead of transfer() function)
  • use of someAddress.call{gas: x, value: y}(data) for contract to contract interaction
(bool success, ) = address(parentContract).call{value:msg.value}(abi.encodeWithSignature("triggerPayment(uint256)",index));
  • basic use of openzeppelin ownable.sol
  • smart contract deployment through a smart contract
  • use of receive/fallback formatting for solidity >= 6

Instructions

  1. Create a new item and specify its cost and identifier (id)
  2. Make an payment to the new item contract that was created. This can be done through metamask or manually through truffle console using the following code (value in wei):
web3.eth.sendTransaction({to: "0x123..", value: 100, gas: 300000})
  1. Look for confirmation item was paid

NOTE: The triggerDelivery() function in our ItemManager.sol contract is not used in the tutorial for whatever reason, but marks the next step in the supplychain process. Also, there is only 1 event emitter, which makes the code more compact.

Design

supplychain's People

Contributors

guceri avatar

Watchers

 avatar

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.