4
0
Fork 0

Added image to README

contracts
hswick 7 years ago
parent 0bb04f362e
commit 63eec560bf
  1. 2
      .gitignore
  2. 4
      README.md
  3. 13
      doc/.build
  4. 103
      doc/404.html
  5. 359
      doc/ExW3.Contract.html
  6. 572
      doc/ExW3.html
  7. 126
      doc/api-reference.html
  8. 1
      doc/dist/app-480ffdc169.css
  9. 8
      doc/dist/app-9bd040e5e5.js
  10. 1
      doc/dist/sidebar_items-8f71fb01e6.js
  11. BIN
      doc/fonts/icomoon.eot
  12. 18
      doc/fonts/icomoon.svg
  13. BIN
      doc/fonts/icomoon.ttf
  14. BIN
      doc/fonts/icomoon.woff
  15. 11
      doc/index.html
  16. 98
      doc/search.html
  17. BIN
      exw3_logo.jpg
  18. 5
      lib/exw3.ex
  19. 25
      mix.exs
  20. 2
      mix.lock
  21. 24
      test/exw3_test.exs

2
.gitignore vendored

@ -3,3 +3,5 @@
/deps
erl_crash.dump
*.ez
*.tar
/doc

@ -1,3 +1,7 @@
<p align="center">
<img src="./exw3_logo.jpg"/>
</p>
# ExW3
Ethereum client for Elixir

@ -0,0 +1,13 @@
dist/app-480ffdc169.css
dist/app-9bd040e5e5.js
fonts/icomoon.eot
fonts/icomoon.svg
fonts/icomoon.ttf
fonts/icomoon.woff
dist/sidebar_items-8f71fb01e6.js
api-reference.html
search.html
404.html
ExW3.html
ExW3.Contract.html
index.html

@ -0,0 +1,103 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.18.3">
<title>404 – exw3 v0.0.1</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<link rel="canonical" href="https://hexdocs.pm/exw3/404.html" />
<script src="dist/sidebar_items-8f71fb01e6.js"></script>
</head>
<body data-type="extras">
<script>try { if(localStorage.getItem('night-mode')) document.body.className += ' night-mode'; } catch (e) { }</script>
<div class="main">
<button class="sidebar-button sidebar-toggle">
<span class="icon-menu" aria-hidden="true"></span>
<span class="sr-only">Toggle Sidebar</span>
</button>
<button class="sidebar-button night-mode-toggle">
<span class="icon-theme" aria-hidden="true"></span>
<span class="sr-only">Toggle Theme</span>
</button>
<section class="sidebar">
<a href="api-reference.html" class="sidebar-projectLink">
<div class="sidebar-projectDetails">
<h1 class="sidebar-projectName">
exw3
</h1>
<h2 class="sidebar-projectVersion">
v0.0.1
</h2>
</div>
</a>
<form class="sidebar-search" action="search.html">
<button type="submit" class="search-button">
<span class="icon-search" aria-hidden="true"></span>
</button>
<input name="q" type="text" id="search-list" class="search-input" placeholder="Search" aria-label="Search" autocomplete="off" />
</form>
<ul class="sidebar-listNav">
<li><a id="extras-list" href="#full-list">Pages</a></li>
<li><a id="modules-list" href="#full-list">Modules</a></li>
</ul>
<div class="gradient"></div>
<ul id="full-list" class="sidebar-fullList"></ul>
</section>
<section class="content">
<div class="content-outer">
<div id="content" class="content-inner">
<h2>Page not found</h2>
<p>Sorry, but the page you were trying to get to, does not exist. You
may want to try searching this site using the sidebar or using our
<a href="api-reference.html" title="API Reference">API Reference</a> page to find what
you were looking for.</p>
<footer class="footer">
<p>
<span class="line">
Built using
<a href="https://github.com/elixir-lang/ex_doc" title="ExDoc" rel="help" target="_blank">ExDoc</a> (v0.18.3),
</span>
<span class="line">
designed by
<a href="https://twitter.com/dignifiedquire" target="_blank" title="@dignifiedquire">Friedel Ziegelmayer</a>.
</span>
</p>
</footer>
</div>
</div>
</section>
</div>
<script src="dist/app-9bd040e5e5.js"></script>
</body>
</html>

@ -0,0 +1,359 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.18.3">
<title>ExW3.Contract – exw3 v0.0.1</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<link rel="canonical" href="https://hexdocs.pm/exw3/ExW3.Contract.html" />
<script src="dist/sidebar_items-8f71fb01e6.js"></script>
</head>
<body data-type="modules">
<script>try { if(localStorage.getItem('night-mode')) document.body.className += ' night-mode'; } catch (e) { }</script>
<div class="main">
<button class="sidebar-button sidebar-toggle">
<span class="icon-menu" aria-hidden="true"></span>
<span class="sr-only">Toggle Sidebar</span>
</button>
<button class="sidebar-button night-mode-toggle">
<span class="icon-theme" aria-hidden="true"></span>
<span class="sr-only">Toggle Theme</span>
</button>
<section class="sidebar">
<a href="api-reference.html" class="sidebar-projectLink">
<div class="sidebar-projectDetails">
<h1 class="sidebar-projectName">
exw3
</h1>
<h2 class="sidebar-projectVersion">
v0.0.1
</h2>
</div>
</a>
<form class="sidebar-search" action="search.html">
<button type="submit" class="search-button">
<span class="icon-search" aria-hidden="true"></span>
</button>
<input name="q" type="text" id="search-list" class="search-input" placeholder="Search" aria-label="Search" autocomplete="off" />
</form>
<ul class="sidebar-listNav">
<li><a id="extras-list" href="#full-list">Pages</a></li>
<li><a id="modules-list" href="#full-list">Modules</a></li>
</ul>
<div class="gradient"></div>
<ul id="full-list" class="sidebar-fullList"></ul>
</section>
<section class="content">
<div class="content-outer">
<div id="content" class="content-inner">
<h1>
<small class="visible-xs">exw3 v0.0.1</small>
ExW3.Contract
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L121" title="View Source" class="view-source" rel="help">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</h1>
<section id="summary" class="details-list">
<h1 class="section-heading">
<a class="hover-link" href="#summary">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this section</span>
</a>
Summary
</h1>
<div class="summary-functions summary">
<h2>
<a href="#functions">Functions</a>
</h2>
<div class="summary-row">
<div class="summary-signature">
<a href="#at/2">at(abi, address)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#child_spec/1">child_spec(arg)</a>
</div>
<div class="summary-synopsis"><p>Returns a specification to start this module under a supervisor</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#deploy/2">deploy(bin_filename, options)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#get/2">get(contract, key)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#method/4">method(contract_agent, method_name, args \\ [], options \\ %{})</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#put/3">put(contract, key, value)</a>
</div>
<div class="summary-synopsis"><p>Puts the <code class="inline">value</code> for the given <code class="inline">key</code> in the <code class="inline">contract</code></p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#tx_receipt/2">tx_receipt(contract_agent, tx_hash)</a>
</div>
</div>
</div>
</section>
<section id="functions" class="details-list">
<h1 class="section-heading">
<a class="hover-link" href="#functions">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this section</span>
</a>
Functions
</h1>
<div class="detail" id="at/2">
<div class="detail-header">
<a href="#at/2" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">at(abi, address)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L124" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="child_spec/1">
<div class="detail-header">
<a href="#child_spec/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">child_spec(arg)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L122" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
<p>Returns a specification to start this module under a supervisor.</p>
<p>See <a href="https://hexdocs.pm/elixir/Supervisor.html"><code class="inline">Supervisor</code></a>.</p>
</section>
</div>
<div class="detail" id="deploy/2">
<div class="detail-header">
<a href="#deploy/2" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">deploy(bin_filename, options)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L156" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="get/2">
<div class="detail-header">
<a href="#get/2" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">get(contract, key)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L145" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="method/4">
<span id="method/2"></span>
<span id="method/3"></span>
<div class="detail-header">
<a href="#method/4" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">method(contract_agent, method_name, args \\ [], options \\ %{})</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L172" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="put/3">
<div class="detail-header">
<a href="#put/3" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">put(contract, key, value)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L152" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
<p>Puts the <code class="inline">value</code> for the given <code class="inline">key</code> in the <code class="inline">contract</code>.</p>
</section>
</div>
<div class="detail" id="tx_receipt/2">
<div class="detail-header">
<a href="#tx_receipt/2" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">tx_receipt(contract_agent, tx_hash)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L202" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
</section>
<footer class="footer">
<p>
<span class="line">
Built using
<a href="https://github.com/elixir-lang/ex_doc" title="ExDoc" rel="help" target="_blank">ExDoc</a> (v0.18.3),
</span>
<span class="line">
designed by
<a href="https://twitter.com/dignifiedquire" target="_blank" title="@dignifiedquire">Friedel Ziegelmayer</a>.
</span>
</p>
</footer>
</div>
</div>
</section>
</div>
<script src="dist/app-9bd040e5e5.js"></script>
</body>
</html>

@ -0,0 +1,572 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.18.3">
<title>ExW3 – exw3 v0.0.1</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<link rel="canonical" href="https://hexdocs.pm/exw3/ExW3.html" />
<script src="dist/sidebar_items-8f71fb01e6.js"></script>
</head>
<body data-type="modules">
<script>try { if(localStorage.getItem('night-mode')) document.body.className += ' night-mode'; } catch (e) { }</script>
<div class="main">
<button class="sidebar-button sidebar-toggle">
<span class="icon-menu" aria-hidden="true"></span>
<span class="sr-only">Toggle Sidebar</span>
</button>
<button class="sidebar-button night-mode-toggle">
<span class="icon-theme" aria-hidden="true"></span>
<span class="sr-only">Toggle Theme</span>
</button>
<section class="sidebar">
<a href="api-reference.html" class="sidebar-projectLink">
<div class="sidebar-projectDetails">
<h1 class="sidebar-projectName">
exw3
</h1>
<h2 class="sidebar-projectVersion">
v0.0.1
</h2>
</div>
</a>
<form class="sidebar-search" action="search.html">
<button type="submit" class="search-button">
<span class="icon-search" aria-hidden="true"></span>
</button>
<input name="q" type="text" id="search-list" class="search-input" placeholder="Search" aria-label="Search" autocomplete="off" />
</form>
<ul class="sidebar-listNav">
<li><a id="extras-list" href="#full-list">Pages</a></li>
<li><a id="modules-list" href="#full-list">Modules</a></li>
</ul>
<div class="gradient"></div>
<ul id="full-list" class="sidebar-fullList"></ul>
</section>
<section class="content">
<div class="content-outer">
<div id="content" class="content-inner">
<h1>
<small class="visible-xs">exw3 v0.0.1</small>
ExW3
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L1" title="View Source" class="view-source" rel="help">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</h1>
<section id="summary" class="details-list">
<h1 class="section-heading">
<a class="hover-link" href="#summary">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this section</span>
</a>
Summary
</h1>
<div class="summary-functions summary">
<h2>
<a href="#functions">Functions</a>
</h2>
<div class="summary-row">
<div class="summary-signature">
<a href="#accounts/0">accounts()</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#balance/1">balance(account)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#block/1">block(block_number)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#block_number/0">block_number()</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#bytes_to_string/1">bytes_to_string(bytes)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#decode_event/2">decode_event(data, signature)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#decode_output/3">decode_output(abi, name, output)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#encode_event/1">encode_event(signature)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#encode_input/3">encode_input(abi, name, input)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#keys_to_decimal/2">keys_to_decimal(map, keys)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#load_abi/1">load_abi(file_path)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#mine/1">mine(num_blocks \\ 1)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#reformat_abi/1">reformat_abi(abi)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#to_decimal/1">to_decimal(hex_string)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#tx_receipt/1">tx_receipt(tx_hash)</a>
</div>
</div>
</div>
</section>
<section id="functions" class="details-list">
<h1 class="section-heading">
<a class="hover-link" href="#functions">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this section</span>
</a>
Functions
</h1>
<div class="detail" id="accounts/0">
<div class="detail-header">
<a href="#accounts/0" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">accounts()</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L41" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="balance/1">
<div class="detail-header">
<a href="#balance/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">balance(account)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L65" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="block/1">
<div class="detail-header">
<a href="#block/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">block(block_number)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L93" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="block_number/0">
<div class="detail-header">
<a href="#block_number/0" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">block_number()</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L55" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="bytes_to_string/1">
<div class="detail-header">
<a href="#bytes_to_string/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">bytes_to_string(bytes)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L34" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="decode_event/2">
<div class="detail-header">
<a href="#decode_event/2" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">decode_event(data, signature)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L110" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="decode_output/3">
<div class="detail-header">
<a href="#decode_output/3" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">decode_output(abi, name, output)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L15" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="encode_event/1">
<div class="detail-header">
<a href="#encode_event/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">encode_event(signature)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L106" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="encode_input/3">
<div class="detail-header">
<a href="#encode_input/3" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">encode_input(abi, name, input)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L24" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="keys_to_decimal/2">
<div class="detail-header">
<a href="#keys_to_decimal/2" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">keys_to_decimal(map, keys)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L75" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="load_abi/1">
<div class="detail-header">
<a href="#load_abi/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">load_abi(file_path)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L6" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="mine/1">
<span id="mine/0"></span>
<div class="detail-header">
<a href="#mine/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">mine(num_blocks \\ 1)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L100" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="reformat_abi/1">
<div class="detail-header">
<a href="#reformat_abi/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">reformat_abi(abi)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L2" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="to_decimal/1">
<div class="detail-header">
<a href="#to_decimal/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">to_decimal(hex_string)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L49" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
<div class="detail" id="tx_receipt/1">
<div class="detail-header">
<a href="#tx_receipt/1" class="detail-link" title="Link to this function">
<span class="icon-link" aria-hidden="true"></span>
<span class="sr-only">Link to this function</span>
</a>
<span class="signature">tx_receipt(tx_hash)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L83" class="view-source" rel="help" title="View Source">
<span class="icon-code" aria-hidden="true"></span>
<span class="sr-only">View Source</span>
</a>
</div>
<section class="docstring">
</section>
</div>
</section>
<footer class="footer">
<p>
<span class="line">
Built using
<a href="https://github.com/elixir-lang/ex_doc" title="ExDoc" rel="help" target="_blank">ExDoc</a> (v0.18.3),
</span>
<span class="line">
designed by
<a href="https://twitter.com/dignifiedquire" target="_blank" title="@dignifiedquire">Friedel Ziegelmayer</a>.
</span>
</p>
</footer>
</div>
</div>
</section>
</div>
<script src="dist/app-9bd040e5e5.js"></script>
</body>
</html>

@ -0,0 +1,126 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.18.3">
<title>API Reference – exw3 v0.0.1</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<link rel="canonical" href="https://hexdocs.pm/exw3/api-reference.html" />
<script src="dist/sidebar_items-8f71fb01e6.js"></script>
</head>
<body data-type="extras">
<script>try { if(localStorage.getItem('night-mode')) document.body.className += ' night-mode'; } catch (e) { }</script>
<div class="main">
<button class="sidebar-button sidebar-toggle">
<span class="icon-menu" aria-hidden="true"></span>
<span class="sr-only">Toggle Sidebar</span>
</button>
<button class="sidebar-button night-mode-toggle">
<span class="icon-theme" aria-hidden="true"></span>
<span class="sr-only">Toggle Theme</span>
</button>
<section class="sidebar">
<a href="api-reference.html" class="sidebar-projectLink">
<div class="sidebar-projectDetails">
<h1 class="sidebar-projectName">
exw3
</h1>
<h2 class="sidebar-projectVersion">
v0.0.1
</h2>
</div>
</a>
<form class="sidebar-search" action="search.html">
<button type="submit" class="search-button">
<span class="icon-search" aria-hidden="true"></span>
</button>
<input name="q" type="text" id="search-list" class="search-input" placeholder="Search" aria-label="Search" autocomplete="off" />
</form>
<ul class="sidebar-listNav">
<li><a id="extras-list" href="#full-list">Pages</a></li>
<li><a id="modules-list" href="#full-list">Modules</a></li>
</ul>
<div class="gradient"></div>
<ul id="full-list" class="sidebar-fullList"></ul>
</section>
<section class="content">
<div class="content-outer">
<div id="content" class="content-inner">
<h1>
<small class="visible-xs">exw3 v0.0.1</small>
API Reference
</h1>
<section class="details-list">
<h2 id="modules" class="section-heading">
<a href="#modules" class="hover-link"><span class="icon-link" aria-hidden="true"></span></a>
Modules
</h2>
<div class="summary">
<div class="summary-row">
<div class="summary-signature"><a href="ExW3.html">ExW3</a></div>
</div>
<div class="summary-row">
<div class="summary-signature"><a href="ExW3.Contract.html">ExW3.Contract</a></div>
</div>
</div>
</section>
<footer class="footer">
<p>
<span class="line">
Built using
<a href="https://github.com/elixir-lang/ex_doc" title="ExDoc" rel="help" target="_blank">ExDoc</a> (v0.18.3),
</span>
<span class="line">
designed by
<a href="https://twitter.com/dignifiedquire" target="_blank" title="@dignifiedquire">Friedel Ziegelmayer</a>.
</span>
</p>
</footer>
</div>
</div>
</section>
</div>
<script src="dist/app-9bd040e5e5.js"></script>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
sidebarNodes={"extras":[{"id":"api-reference","title":"API Reference","group":"","headers":[{"id":"Modules","anchor":"modules"}]}],"exceptions":[],"modules":[{"id":"ExW3","title":"ExW3","group":"","functions":[{"id":"accounts/0","anchor":"accounts/0"},{"id":"balance/1","anchor":"balance/1"},{"id":"block/1","anchor":"block/1"},{"id":"block_number/0","anchor":"block_number/0"},{"id":"bytes_to_string/1","anchor":"bytes_to_string/1"},{"id":"decode_event/2","anchor":"decode_event/2"},{"id":"decode_output/3","anchor":"decode_output/3"},{"id":"encode_event/1","anchor":"encode_event/1"},{"id":"encode_input/3","anchor":"encode_input/3"},{"id":"keys_to_decimal/2","anchor":"keys_to_decimal/2"},{"id":"load_abi/1","anchor":"load_abi/1"},{"id":"mine/1","anchor":"mine/1"},{"id":"reformat_abi/1","anchor":"reformat_abi/1"},{"id":"to_decimal/1","anchor":"to_decimal/1"},{"id":"tx_receipt/1","anchor":"tx_receipt/1"}]},{"id":"ExW3.Contract","title":"ExW3.Contract","group":"","functions":[{"id":"at/2","anchor":"at/2"},{"id":"child_spec/1","anchor":"child_spec/1"},{"id":"deploy/2","anchor":"deploy/2"},{"id":"get/2","anchor":"get/2"},{"id":"method/4","anchor":"method/4"},{"id":"put/3","anchor":"put/3"},{"id":"tx_receipt/2","anchor":"tx_receipt/2"}]}],"tasks":[]}

Binary file not shown.

@ -0,0 +1,18 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="icomoon" horiz-adv-x="512">
<font-face units-per-em="512" ascent="480" descent="-32" />
<missing-glyph horiz-adv-x="512" />
<glyph unicode="&#x20;" horiz-adv-x="256" d="" />
<glyph unicode="&#xe005;" glyph-name="link" d="M362.666 437.333q25.166 0 48.584-9.5t41.916-28 28-41.916 9.5-48.584q0-25-9.584-48.583t-27.916-41.917l-64-64q-1.834-1.834-5.5-5.166-17.834-15.834-39.834-24.084t-45.166-8.25q-29.166 0-55.166 12.5-19.5 9.166-35.334 25t-25 35.334q12.5 12.5 30.166 12.5 6.167 0 12.5-1.834 10.834-17.5 28.334-28.334 20.5-12.5 44.5-12.5 16.666 0 32.334 6.334t28 18.666l64 64q12.334 12.333 18.666 28t6.334 32.333-6.334 32.334-18.666 28-28 18.666-32.334 6.334-32.334-6.334-28-18.666l-44.834-44.834q-21.334 5.834-44.166 5.834-3.667 0-10.334-0.334 3.333 3.667 5.167 5.5l64 64q18.334 18.334 41.916 27.917t48.584 9.583zM213.333 288q29.167 0 55.167-12.5 19.5-9.167 35.334-25t25-35.333q-12.5-12.5-30.166-12.5-6.166 0-12.5 1.834-10.834 17.5-28.334 28.333-20.5 12.5-44.5 12.5-16.666 0-32.334-6.333t-28-18.667l-64-64q-12.334-12.334-18.666-28t-6.334-32.334 6.334-32.334 18.666-28 28-18.666 32.334-6.334 32.334 6.334 28 18.666l44.834 44.834q21.334-5.834 44.166-5.834 3.666 0 10.334 0.334-3.334-3.666-5.166-5.5l-64-64q-18.5-18.5-41.916-28t-48.584-9.5q-25 0-48.584 9.584t-41.916 27.916q-18.5 18.5-28 41.916t-9.5 48.584 9.5 48.584 28 41.916l64 64q1.834 1.833 5.5 5.166 17.834 15.834 39.834 24.084t45.166 8.25z" />
<glyph unicode="&#xe036;" glyph-name="search" d="M213.333 437.333q39 0 74.583-15.25t61.25-40.916 40.916-61.25 15.25-74.584q0-33.5-10.916-64.167t-31.084-55.666l121.166-121q6.166-6.166 6.166-15.166 0-9.166-6.084-15.25t-15.25-6.084q-9 0-15.166 6.166l-121 121.166q-25-20.166-55.666-31.084t-64.166-10.916q-39 0-74.584 15.25t-61.25 40.916-40.916 61.25-15.25 74.584 15.25 74.584 40.916 61.25 61.25 40.916 74.584 15.25zM213.333 394.666q-30.333 0-58-11.834t-47.666-31.833-31.834-47.667-11.834-58 11.834-58 31.834-47.666 47.666-31.834 58-11.834 58 11.834 47.666 31.834 31.834 47.666 11.834 58-11.834 58-31.834 47.667-47.666 31.833-58 11.834z" />
<glyph unicode="&#xe117;" glyph-name="cross" d="M405.334 373.333q9.166 0 15.25-6.083t6.084-15.25q0-9-6.166-15.167l-134.334-134.166 134.333-134.167q6.166-6.166 6.166-15.166 0-9.166-6.084-15.25t-15.25-6.084q-9 0-15.166 6.166l-134.166 134.334-134.167-134.333q-6.166-6.166-15.166-6.166-9.166 0-15.25 6.084t-6.084 15.25q0 9 6.166 15.166l134.333 134.167-134.333 134.167q-6.166 6.166-6.166 15.166 0 9.167 6.084 15.25t15.25 6.084q9 0 15.166-6.167l134.167-134.333 134.167 134.333q6.166 6.166 15.166 6.166z" />
<glyph unicode="&#xe120;" glyph-name="menu" d="M64 352h384q8.834 0 15.084-6.25t6.25-15.083-6.25-15.084-15.084-6.25h-384q-8.834 0-15.084 6.25t-6.25 15.084 6.25 15.083 15.084 6.25zM64 96h384q8.834 0 15.084-6.25t6.25-15.084-6.25-15.084-15.084-6.25h-384q-8.834 0-15.084 6.25t-6.25 15.084 6.25 15.084 15.084 6.25zM64 224h384q8.834 0 15.084-6.25t6.25-15.084-6.25-15.084-15.084-6.25h-384q-8.834 0-15.084 6.25t-6.25 15.084 6.25 15.084 15.084 6.25z" />
<glyph unicode="&#xe900;" glyph-name="moon" d="M458.666 215.467c-6.4 4.267-17.067 4.267-23.466-2.134-44.8-34.134-106.666-34.134-151.466 0-57.6 42.667-70.4 121.6-27.733 179.2 4.267 6.4 6.4 14.934 2.134 23.466-4.267 6.4-12.8 10.667-21.334 10.667-102.4-8.534-183.466-89.6-192-192-10.666-117.334 74.666-221.867 192-232.534 6.4 0 12.8 0 19.2 0 49.067 0 98.134 17.067 136.534 49.067 44.8 36.267 70.4 87.466 76.8 145.067 0 6.4-4.267 14.933-10.666 19.2zM366.933 83.2c-34.134-29.866-78.933-42.666-123.733-38.4-93.867 8.534-162.133 91.733-153.6 185.6 6.4 66.133 51.2 123.733 110.934 145.066-25.6-68.266-2.133-149.333 59.733-196.267 46.933-34.134 106.666-42.666 160-23.466-12.8-27.733-29.866-53.334-53.334-72.534z" />
<glyph unicode="&#xe901;" glyph-name="sun" d="M256 341.333c-70.4 0-128-57.6-128-128s57.6-128 128-128 128 57.6 128 128-57.6 128-128 128zM256 128c-46.934 0-85.334 38.4-85.334 85.334s38.4 85.334 85.334 85.334c46.933 0 85.334-38.4 85.334-85.334s-38.4-85.334-85.334-85.334zM256 384c12.8 0 21.334 8.534 21.334 21.334v42.666c0 12.8-8.534 21.333-21.334 21.333s-21.334-8.534-21.334-21.333v-42.666c0-12.8 8.534-21.334 21.334-21.334zM256 42.667c-12.8 0-21.334-8.534-21.334-21.334v-42.666c0-12.8 8.534-21.333 21.334-21.333s21.334 8.534 21.334 21.333v42.666c0 12.8-8.534 21.334-21.334 21.334zM104.534 334.933c4.266-4.267 10.666-6.4 14.933-6.4s10.666 2.134 14.933 6.4c8.534 8.534 8.534 21.334 0 29.867l-29.867 29.866c-8.534 8.534-21.334 8.534-29.867 0s-8.534-21.334 0-29.866l29.867-29.867zM407.466 91.733c-8.534 8.534-21.334 8.534-29.866 0s-8.534-21.334 0-29.866l29.866-29.866c4.267-4.267 10.666-6.4 14.933-6.4s10.666 2.134 14.933 6.4c8.534 8.534 8.534 21.334 0 29.866l-29.866 29.866zM85.334 213.333c0 12.8-8.534 21.334-21.334 21.334h-42.666c-12.8 0-21.334-8.534-21.334-21.334s8.534-21.334 21.334-21.334h42.666c12.8 0 21.334 8.534 21.334 21.334zM490.666 234.667h-42.666c-12.8 0-21.334-8.534-21.334-21.334s8.534-21.334 21.334-21.334h42.666c12.8 0 21.334 8.534 21.334 21.334s-8.534 21.334-21.334 21.334zM104.534 91.733l-29.867-29.866c-8.534-8.534-8.534-21.334 0-29.866 4.266-4.267 10.666-6.4 14.933-6.4s10.666 2.134 14.933 6.4l29.867 29.866c8.534 8.534 8.534 21.334 0 29.866s-21.334 8.534-29.867 0zM392.534 328.533c6.4 0 10.666 2.134 14.933 6.4l29.866 29.867c8.534 8.534 8.534 21.333 0 29.866s-21.334 8.534-29.866 0l-29.866-29.866c-8.534-8.534-8.534-21.334 0-29.867 2.134-4.267 8.534-6.4 14.933-6.4z" />
<glyph unicode="&#xf105;" glyph-name="angle-right" horiz-adv-x="183" d="M170 190.476q0-3.714-2.857-6.572l-133.143-133.143q-2.857-2.857-6.572-2.857t-6.572 2.857l-14.286 14.286q-2.857 2.857-2.857 6.572t2.857 6.572l112.285 112.286-112.285 112.286q-2.857 2.857-2.857 6.572t2.857 6.572l14.285 14.286q2.857 2.857 6.572 2.857t6.572-2.857l133.143-133.143q2.857-2.857 2.857-6.572z" />
<glyph unicode="&#xf121;" glyph-name="code" horiz-adv-x="549" d="M176.286 65.047l-14.286-14.286q-2.857-2.857-6.572-2.857t-6.572 2.857l-133.143 133.143q-2.857 2.857-2.857 6.572t2.857 6.572l133.143 133.143q2.857 2.857 6.572 2.857t6.572-2.857l14.286-14.286q2.857-2.857 2.857-6.571t-2.857-6.572l-112.285-112.286 112.285-112.286q2.857-2.857 2.857-6.572t-2.857-6.572zM345.143 369.905l-106.572-368.857q-1.143-3.714-4.428-5.572t-6.714-0.714l-17.714 4.857q-3.714 1.143-5.572 4.428t-0.714 7l106.572 368.857q1.143 3.714 4.428 5.571t6.714 0.715l17.714-4.857q3.714-1.143 5.572-4.428t0.714-7zM532.857 183.905l-133.143-133.143q-2.857-2.857-6.572-2.857t-6.572 2.857l-14.286 14.286q-2.857 2.857-2.857 6.572t2.857 6.572l112.286 112.286-112.286 112.286q-2.857 2.857-2.857 6.572t2.857 6.572l14.286 14.286q2.857 2.857 6.572 2.857t6.572-2.857l133.143-133.143q2.857-2.857 2.857-6.572t-2.857-6.572z" />
</font></defs></svg>

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Binary file not shown.

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>exw3 v0.0.1 – Documentation</title>
<meta http-equiv="refresh" content="0; url=api-reference.html">
<meta name="robots" content="noindex">
<meta name="generator" content="ExDoc v0.18.3">
</head>
<body></body>
</html>

@ -0,0 +1,98 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.18.3">
<title>Search – exw3 v0.0.1</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<link rel="canonical" href="https://hexdocs.pm/exw3/search.html" />
<script src="dist/sidebar_items-8f71fb01e6.js"></script>
</head>
<body data-type="search">
<script>try { if(localStorage.getItem('night-mode')) document.body.className += ' night-mode'; } catch (e) { }</script>
<div class="main">
<button class="sidebar-button sidebar-toggle">
<span class="icon-menu" aria-hidden="true"></span>
<span class="sr-only">Toggle Sidebar</span>
</button>
<button class="sidebar-button night-mode-toggle">
<span class="icon-theme" aria-hidden="true"></span>
<span class="sr-only">Toggle Theme</span>
</button>
<section class="sidebar">
<a href="api-reference.html" class="sidebar-projectLink">
<div class="sidebar-projectDetails">
<h1 class="sidebar-projectName">
exw3
</h1>
<h2 class="sidebar-projectVersion">
v0.0.1
</h2>
</div>
</a>
<form class="sidebar-search" action="search.html">
<button type="submit" class="search-button">
<span class="icon-search" aria-hidden="true"></span>
</button>
<input name="q" type="text" id="search-list" class="search-input" placeholder="Search" aria-label="Search" autocomplete="off" />
</form>
<ul class="sidebar-listNav">
<li><a id="extras-list" href="#full-list">Pages</a></li>
<li><a id="modules-list" href="#full-list">Modules</a></li>
</ul>
<div class="gradient"></div>
<ul id="full-list" class="sidebar-fullList"></ul>
</section>
<section class="content">
<div class="content-outer">
<div id="content" class="content-inner">
<div id="search">
<h1>Search</h1>
</div>
<footer class="footer">
<p>
<span class="line">
Built using
<a href="https://github.com/elixir-lang/ex_doc" title="ExDoc" rel="help" target="_blank">ExDoc</a> (v0.18.3),
</span>
<span class="line">
designed by
<a href="https://twitter.com/dignifiedquire" target="_blank" title="@dignifiedquire">Friedel Ziegelmayer</a>.
</span>
</p>
</footer>
</div>
</div>
</section>
</div>
<script src="dist/app-9bd040e5e5.js"></script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 KiB

@ -203,15 +203,16 @@ defmodule ExW3 do
receipt = ExW3.tx_receipt tx_hash
events = get(contract_agent, :events)
logs = receipt["logs"]
Enum.map logs, fn log ->
formatted_logs = Enum.map logs, fn log ->
topic = Enum.at log["topics"], 0
event = Map.get events, topic
if event do
Enum.zip(event[:names], ExW3.decode_event(log["data"], event[:signature])) |> Enum.into %{}
Enum.zip(event[:names], ExW3.decode_event(log["data"], event[:signature])) |> Enum.into(%{})
else
nil
end
end
{:ok, {receipt, formatted_logs}}
end
end

@ -1,4 +1,4 @@
defmodule ExW3.Mixfile do
defmodule ExW3.MixProject do
use Mix.Project
def project do
@ -7,7 +7,12 @@ defmodule ExW3.Mixfile do
elixir: "~> 1.1-dev",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps()]
deps: deps(),
description: description(),
package: package(),
name: "exw3",
source_url: "https://github.com/hswick/exw3"
]
end
# Configuration for the OTP application
@ -28,12 +33,26 @@ defmodule ExW3.Mixfile do
# Type `mix help deps` for more examples and options
defp deps do
[
{:ex_doc, ">= 0.0.0", only: :dev},
{:ethereumex, "~> 0.3.2"},
{:abi, "~> 0.1.8"},
{:poison, "~> 3.1"},
{:pubsub, "~> 1.0"},
{:inflex, "~> 1.10.0" },
{:hexate, ">= 0.6.0"}
]
end
defp description do
"A high level Ethereum JSON RPC Client for Elixir"
end
defp package do
[
name: "exw3",
files: ["lib", "mix.exs", "README*"],
maintainers: ["Harley Swick"],
licenses: ["Apache 2.0"],
links: %{"GitHub" => "https://github.com/hswick/exw3"}
]
end
end

@ -2,7 +2,9 @@
"abi": {:hex, :abi, "0.1.12", "87ae04cb09e2308db7b3c350584dc3934de0e308f6a056ba82be5756b081a1ca", [:mix], [{:exth_crypto, "~> 0.1.4", [hex: :exth_crypto, repo: "hexpm", optional: false]}], "hexpm"},
"binary": {:hex, :binary, "0.0.4", "dd077db70c0ded3e85c132b802338e14b80694684a7e2277666bfa4004b7fa66", [:mix], [], "hexpm"},
"certifi": {:hex, :certifi, "2.0.0", "a0c0e475107135f76b8c1d5bc7efb33cd3815cb3cf3dea7aefdd174dabead064", [:rebar3], [], "hexpm"},
"earmark": {:hex, :earmark, "1.2.5", "4d21980d5d2862a2e13ec3c49ad9ad783ffc7ca5769cf6ff891a4553fbaae761", [:mix], [], "hexpm"},
"ethereumex": {:hex, :ethereumex, "0.3.2", "ee01a49c781c9751317b2918f799e84185203c81c8314ebebb1f1e22b754db3e", [:mix], [{:httpoison, "~> 1.0.0", [hex: :httpoison, repo: "hexpm", optional: false]}, {:poison, "~> 3.1.0", [hex: :poison, repo: "hexpm", optional: false]}], "hexpm"},
"ex_doc": {:hex, :ex_doc, "0.18.3", "f4b0e4a2ec6f333dccf761838a4b253d75e11f714b85ae271c9ae361367897b7", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, repo: "hexpm", optional: false]}], "hexpm"},
"exth_crypto": {:hex, :exth_crypto, "0.1.4", "11f9084dfd70d4f9e96f2710a472f4e6b23044b97530c719550c2b0450ffeb61", [:mix], [{:binary, "~> 0.0.4", [hex: :binary, repo: "hexpm", optional: false]}, {:keccakf1600, "~> 2.0.0", [hex: :keccakf1600_orig, repo: "hexpm", optional: false]}, {:libsecp256k1, "~> 0.1.3", [hex: :libsecp256k1, repo: "hexpm", optional: false]}], "hexpm"},
"hackney": {:hex, :hackney, "1.11.0", "4951ee019df102492dabba66a09e305f61919a8a183a7860236c0fde586134b6", [:rebar3], [{:certifi, "2.0.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "5.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "1.0.1", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "1.0.2", [hex: :mimerl, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "1.1.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm"},
"hexate": {:hex, :hexate, "0.6.1", "1cea42e462c1daa32223127d4752e71016c3d933d492b9bb7fa4709a4a0fd50d", [:mix], [], "hexpm"},

@ -50,19 +50,13 @@ defmodule EXW3Test do
storage = ExW3.Contract.at context[:simple_storage_abi], contract_address
{:ok, result} = ExW3.Contract.method(storage, :get)
{:ok, result} = ExW3.Contract.method storage, :get
assert result == 0
{:ok, tx_hash} = ExW3.Contract.method(storage, :set, [1], %{from: Enum.at(context[:accounts], 0)})
receipt = ExW3.tx_receipt tx_hash
#IO.inspect receipt
#IO.inspect ExW3.block receipt["blockNumber"]
{:ok, result} = ExW3.Contract.method(storage, :get)
{:ok, result} = ExW3.Contract.method storage, :get
assert result == 1
@ -86,15 +80,15 @@ defmodule EXW3Test do
%{from: Enum.at(context[:accounts], 0)}
)
receipt = ExW3.Contract.tx_receipt(event_tester, tx_hash)
IO.inspect receipt
#topic = Map.get(Enum.at(logs, 0), "topics")
{:ok, {receipt, logs}} = ExW3.Contract.tx_receipt(event_tester, tx_hash)
#assert String.slice(Enum.at(topic, 0), 2..-1) == ExW3.encode_event("Simple(uint256,bytes32)")
data =
logs
|> Enum.at(0)
|> Map.get("data")
|> ExW3.bytes_to_string()
#:timer.sleep(2000)
assert data == "Hello, World!"
end

Loading…
Cancel
Save