Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Smart Contracts 101

Smart Contracts 101

Alexandre Balmes

June 12, 2018
Tweet

More Decks by Alexandre Balmes

Other Decks in Programming

Transcript

  1. A SET OF PROMISES, SPECIFIED IN DIGITAL FORM, INCLUDING PROTOCOLS

    WITHIN WHICH THE PARTIES PERFORM ON THE OTHER PROMISES.
  2. LE PETIT BLOC BUILD A DECENTRALISED, TRUSTABLE AND RELIABLE WORLD

    ! SCIC PROJECT - HTTPS://LEPETITBLOC.NET!
  3. COMMON STACK OPERATIONS POP //Pop item off the stack PUSH

    //Push item on the stack MLOAD //Load item into memory MSTORE //Store item in memory JUMP //Alter the location of program counter (PC) PC //Program counter MSIZE //Active memory size GAS //Amount of available gas for transaction DUP //Stack item duplication SWAP //Stack item exchange operation COMMON SYSTEM OPERATIONS CREATE //Create a new account CALL //Instruction for message passing between accounts RETURN //Execution halt REVERT //Execution halt, reverting state changes SELFDESTRUCT //Execution halt, and flag account for deletion ARITHMETIC OPERATIONS ADD //Add MUL //Multiplication SUB //Subtraction DIV //Integer division SDIV //Signed integer division MOD //Modulo (Remainder) operation SMOD //Signed modulo operation ADDMOD //Modulo addition MULMOD //Modulo multiplication EXP //Exponent operation STOP //Halt operation ENVIRONMENTAL OPCODES ADDRESS //Address of current execution account BALANCE //Account balance CALLVALUE //Transaction value for execution environment ORIGIN //Origin address of execution environment CALLER //Address of execution caller CODESIZE //Execution environment code size GASPRICE //Gas price state EXTCODESIZE //An account's code size RETURNDATACOPY //Copy of data output from previous memory call https://github.com/djrtwo/evm-opcode-gas-costs/blob/master/opcode-gas- costs_EIP-150_revision-1e18248_2017-04-12.csv