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

Elixir_and_Blockchain_-_a_Perfect_Match.pdf

 Elixir_and_Blockchain_-_a_Perfect_Match.pdf

Elixir might not be the first thing you think of when you're thinking about the world of cryptocurrencies, but there are reasons to consider using it in your stack. Miloš will explain how he used Elixir to interact with Ethereum Smart Contracts to make a reliable backend for a new decentralized finance project from Mainframe.

OBJECTIVES

Demonstrate how Elixir can be used to build a service that interacts with Ethereum and other blockchains, in order to make an app that works with crypto transactions.

AUDIENCE

Crypto enthusiasts and skeptics, developers interested in using the blockchain or hearing about the world of decentralized finance, Elixir fans who would like to see the language being used in novel ways.

Miloš Mošić

September 20, 2019
Tweet

More Decks by Miloš Mošić

Other Decks in Programming

Transcript

  1. Ethereum 101 What is Ethereum? What is a Blockchain? Miloš

    Mošić ht ps://milosmosic.com — —
  2. Ethereum 101 What is Ethereum? What is a Blockchain? What

    are Blocks? Miloš Mošić ht ps://milosmosic.com — — —
  3. How of en do new blocks appear? 15 seconds Miloš

    Mošić ht ps://milosmosic.com
  4. How of en do new blocks appear? 15 seconds (usually)

    Miloš Mošić ht ps://milosmosic.com
  5. What are Smar Contracts? Computer Programs Immutable Deterministic Run on

    EVM Decentralized World Computer — — — — — Miloš Mošić ht ps://milosmosic.com
  6. Popular Smar Contract use cases Creating a new token Initial

    Coin Of erings (ICOs) Miloš Mošić ht ps://milosmosic.com — —
  7. Popular Smar Contract use cases Creating a new token Initial

    Coin Of erings (ICOs) Decentralized Exchanges Miloš Mošić ht ps://milosmosic.com — — —
  8. Emerging Smar Contract use cases Fun Utility Tokens (Brave &

    BAT) Miloš Mošić ht ps://milosmosic.com — —
  9. Emerging Smar Contract use cases Fun Utility Tokens (Brave &

    BAT) Decentralised Finance (Lending/Borrowing) Miloš Mošić ht ps://milosmosic.com — — —
  10. Smar Contract Programming Languages Solidity Serpent Vyper Mutan Bamboo Flint

    Lisp Like Language (LLL) — — — — — — — Miloš Mošić ht ps://milosmosic.com
  11. pragma solidity ^0.4.21; import "openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol"; // CodeBEAMToken is a basic

    ERC20 Token contract CodeBEAMToken is StandardToken { string public name; string public symbol; uint32 public decimals; uint256 public totalSupply; constructor() public { name = "Code BEAM Token"; symbol = "BEAM"; decimals = 18; totalSupply = 1000000 ether; // 1 million, 18 decimals (ether = 10^18) owner = msg.sender; balances[msg.sender] = totalSupply; emit Transfer(0x0, msg.sender, totalSupply); } } Miloš Mošić ht ps://milosmosic.com
  12. What tools are typically used to build Smar Contracts? Truf

    le Suite: Truf le Ganache Drizzle — — — — ht ps:// .truf lesuite.com/ Miloš Mošić ht ps://milosmosic.com
  13. What tools are typically used to interact with Ethereum? web3.js

    ethers.js eth.js — — — Miloš Mošić ht ps://milosmosic.com
  14. What tools are available in Elixir? ethereumex exw3 — —

    ht ps://github.com/hswick/exw3 Miloš Mošić ht ps://milosmosic.com
  15. Mana Full Ethereum node implementation Aims to be al ernative

    to Geth and Parity 100% implemented in Elixir — — — Miloš Mošić ht ps://milosmosic.com
  16. Benefits of using Elixir Managing many concurrent connections Dealing with

    failures of those peers Miloš Mošić ht ps://milosmosic.com — —
  17. Benefits of using Elixir Managing many concurrent connections Dealing with

    failures of those peers Serving many requests as a gateway Miloš Mošić ht ps://milosmosic.com — — —
  18. Benefits of using Elixir Managing many concurrent connections Dealing with

    failures of those peers Serving many requests as a gateway Quickly reacting to blockchain events Miloš Mošić ht ps://milosmosic.com — — — —
  19. Cases where Elixir is not suitable Proof of work mining

    — Miloš Mošić ht ps://milosmosic.com
  20. Cases where Elixir is not suitable Proof of work mining

    (But this can be of loaded to NIFs) — Miloš Mošić ht ps://milosmosic.com