4
0
Fork 0

Support address type

pull/5/head v0.1.2
hswick 7 years ago
parent 29381a264a
commit 4ec252d2ef
  1. 3
      .gitignore
  2. 9
      README.md
  3. 13
      doc/.build
  4. 103
      doc/404.html
  5. 528
      doc/ExW3.Contract.html
  6. 712
      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-fa0908e9e2.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. 15
      lib/exw3.ex
  18. 2
      mix.exs
  19. 1
      test/examples/build/AddressTester.abi
  20. 1
      test/examples/build/AddressTester.bin
  21. 2
      test/examples/build/ArrayTester.bin
  22. 2
      test/examples/build/Complex.bin
  23. 2
      test/examples/build/EventTester.bin
  24. 2
      test/examples/build/SimpleStorage.bin
  25. 7
      test/examples/contracts/AddressTester.sol
  26. 2
      test/examples/contracts/Complex.sol
  27. 29
      test/exw3_test.exs

3
.gitignore vendored

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

@ -5,7 +5,7 @@
## Installation
def deps do
[{:exw3, "~> 0.1.1"}]
[{:exw3, "~> 0.1.2"}]
end
## Overview
@ -78,4 +78,11 @@ iex(9)> ExW3.Contract.send(SimpleStorage, :set, [1], %{from: Enum.at(accounts, 0
{:ok, "0xb7e9cbdd2cec8ca017e675059a3af063d754496c960f156e1a41fe51ea82f3b8"}
iex(10)> ExW3.Contract.call(SimpleStorage, :get)
{:ok, 1}
```
# Compiling Soldity
To compile the test solidity contracts after making a change run this command:
```
solc --abi --bin --overwrite -o test/examples/build test/examples/contracts/*.sol
```

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

@ -1,103 +0,0 @@
<!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.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<link rel="canonical" href="https://hexdocs.pm/exw3/404.html" />
<script src="dist/sidebar_items-fa0908e9e2.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.1.0
</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>

@ -1,528 +0,0 @@
<!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.1.0</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-fa0908e9e2.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.1.0
</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.1.0</small>
ExW3.Contract
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L179" 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="#address/1">address(pid)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#at/2">at(pid, address)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#call/3">call(pid, method_name, args \\ [])</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(pid, args)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#deploy_helper/3">deploy_helper(bin, abi, args)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#eth_call_helper/4">eth_call_helper(address, abi, method_name, args)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#eth_send_helper/5">eth_send_helper(address, abi, method_name, args, options)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#init/1">init(state)</a>
</div>
<div class="summary-synopsis"><p>Invoked when the server is started. <code class="inline">start_link/3</code> or <code class="inline">start/3</code> will
block until it returns</p>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#send/4">send(pid, method_name, args, options)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#start_link/2">start_link(name, state)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#tx_receipt/2">tx_receipt(pid, 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="address/1">
<div class="detail-header">
<a href="#address/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">address(pid)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L196" 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="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(pid, address)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L192" 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="call/3">
<span id="call/2"></span>
<div class="detail-header">
<a href="#call/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">call(pid, method_name, args \\ [])</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L200" 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#L180" 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(pid, args)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L188" 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="deploy_helper/3">
<div class="detail-header">
<a href="#deploy_helper/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">deploy_helper(bin, abi, args)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L240" 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="eth_call_helper/4">
<div class="detail-header">
<a href="#eth_call_helper/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">eth_call_helper(address, abi, method_name, args)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L267" 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="eth_send_helper/5">
<div class="detail-header">
<a href="#eth_send_helper/5" 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">eth_send_helper(address, abi, method_name, args, options)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L279" 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="init/1">
<div class="detail-header">
<a href="#init/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">init(state)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L214" 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>Invoked when the server is started. <code class="inline">start_link/3</code> or <code class="inline">start/3</code> will
block until it returns.</p>
<p><code class="inline">args</code> is the argument term (second argument) passed to <code class="inline">start_link/3</code>.</p>
<p>Returning <code class="inline">{:ok, state}</code> will cause <code class="inline">start_link/3</code> to return
<code class="inline">{:ok, pid}</code> and the process to enter its loop.</p>
<p>Returning <code class="inline">{:ok, state, timeout}</code> is similar to <code class="inline">{:ok, state}</code>
except <code class="inline">handle_info(:timeout, state)</code> will be called after <code class="inline">timeout</code>
milliseconds if no messages are received within the timeout.</p>
<p>Returning <code class="inline">{:ok, state, :hibernate}</code> is similar to
<code class="inline">{:ok, state}</code> except the process is hibernated before entering the loop. See
<code class="inline">c:handle_call/3</code> for more information on hibernation.</p>
<p>Returning <code class="inline">:ignore</code> will cause <code class="inline">start_link/3</code> to return <code class="inline">:ignore</code> and the
process will exit normally without entering the loop or calling <code class="inline">c:terminate/2</code>.
If used when part of a supervision tree the parent supervisor will not fail
to start nor immediately try to restart the <a href="https://hexdocs.pm/elixir/GenServer.html"><code class="inline">GenServer</code></a>. The remainder of the
supervision tree will be (re)started and so the <a href="https://hexdocs.pm/elixir/GenServer.html"><code class="inline">GenServer</code></a> should not be
required by other processes. It can be started later with
<a href="https://hexdocs.pm/elixir/Supervisor.html#restart_child/2"><code class="inline">Supervisor.restart_child/2</code></a> as the child specification is saved in the parent
supervisor. The main use cases for this are:</p>
<ul>
<li>The <a href="https://hexdocs.pm/elixir/GenServer.html"><code class="inline">GenServer</code></a> is disabled by configuration but might be enabled later.
</li>
<li>An error occurred and it will be handled by a different mechanism than the
<a href="https://hexdocs.pm/elixir/Supervisor.html"><code class="inline">Supervisor</code></a>. Likely this approach involves calling <a href="https://hexdocs.pm/elixir/Supervisor.html#restart_child/2"><code class="inline">Supervisor.restart_child/2</code></a>
after a delay to attempt a restart.
</li>
</ul>
<p>Returning <code class="inline">{:stop, reason}</code> will cause <code class="inline">start_link/3</code> to return
<code class="inline">{:error, reason}</code> and the process to exit with reason <code class="inline">reason</code> without
entering the loop or calling <code class="inline">c:terminate/2</code>.</p>
<p>Callback implementation for <a href="https://hexdocs.pm/elixir/GenServer.html#c:init/1"><code class="inline">GenServer.init/1</code></a>.</p>
</section>
</div>
<div class="detail" id="send/4">
<div class="detail-header">
<a href="#send/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">send(pid, method_name, args, options)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L204" 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="start_link/2">
<div class="detail-header">
<a href="#start_link/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">start_link(name, state)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L184" 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/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(pid, tx_hash)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L208" 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>

@ -1,712 +0,0 @@
<!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.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<link rel="canonical" href="https://hexdocs.pm/exw3/ExW3.html" />
<script src="dist/sidebar_items-fa0908e9e2.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.1.0
</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.1.0</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_data/2">encode_data(types_signature, data)</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="#encode_method_call/3">encode_method_call(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="#load_bin/1">load_bin(file_path)</a>
</div>
</div>
<div class="summary-row">
<div class="summary-signature">
<a href="#method_signature/2">method_signature(abi, name)</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 class="summary-row">
<div class="summary-signature">
<a href="#types_signature/2">types_signature(abi, name)</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#L10" 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#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="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#L62" 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#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="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#L3" 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#L79" 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#L112" 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_data/2">
<div class="detail-header">
<a href="#encode_data/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">encode_data(types_signature, data)</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="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#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="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#L157" 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_method_call/3">
<div class="detail-header">
<a href="#encode_method_call/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_method_call(abi, name, input)</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">
</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#L44" 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#L94" 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_bin/1">
<div class="detail-header">
<a href="#load_bin/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_bin(file_path)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L103" 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_signature/2">
<div class="detail-header">
<a href="#method_signature/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">method_signature(abi, name)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L133" 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#L69" 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#L90" 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#L18" 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#L52" 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="types_signature/2">
<div class="detail-header">
<a href="#types_signature/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">types_signature(abi, name)</span>
<a href="https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L127" 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>

@ -1,126 +0,0 @@
<!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.1.0</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-fa0908e9e2.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.1.0
</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.1.0</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

@ -1 +0,0 @@
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_data/2","anchor":"encode_data/2"},{"id":"encode_event/1","anchor":"encode_event/1"},{"id":"encode_input/3","anchor":"encode_input/3"},{"id":"encode_method_call/3","anchor":"encode_method_call/3"},{"id":"keys_to_decimal/2","anchor":"keys_to_decimal/2"},{"id":"load_abi/1","anchor":"load_abi/1"},{"id":"load_bin/1","anchor":"load_bin/1"},{"id":"method_signature/2","anchor":"method_signature/2"},{"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":"types_signature/2","anchor":"types_signature/2"}]},{"id":"ExW3.Contract","title":"ExW3.Contract","group":"","functions":[{"id":"address/1","anchor":"address/1"},{"id":"at/2","anchor":"at/2"},{"id":"call/3","anchor":"call/3"},{"id":"child_spec/1","anchor":"child_spec/1"},{"id":"deploy/2","anchor":"deploy/2"},{"id":"deploy_helper/3","anchor":"deploy_helper/3"},{"id":"eth_call_helper/4","anchor":"eth_call_helper/4"},{"id":"eth_send_helper/5","anchor":"eth_send_helper/5"},{"id":"init/1","anchor":"init/1"},{"id":"send/4","anchor":"send/4"},{"id":"start_link/2","anchor":"start_link/2"},{"id":"tx_receipt/2","anchor":"tx_receipt/2"}]}],"tasks":[]}

Binary file not shown.

@ -1,18 +0,0 @@
<?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>

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Binary file not shown.

@ -1,11 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>exw3 v0.1.0 – 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>

@ -1,98 +0,0 @@
<!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.1.0</title>
<link rel="stylesheet" href="dist/app-480ffdc169.css" />
<link rel="canonical" href="https://hexdocs.pm/exw3/search.html" />
<script src="dist/sidebar_items-fa0908e9e2.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.1.0
</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>

@ -8,6 +8,21 @@ defmodule ExW3 do
|> Base.decode16!(case: :lower)
end
@spec format_address(binary()) :: integer()
@doc "Converts an Ethereum address into a form that can be used by the ABI encoder"
def format_address(address) do
address
|> String.slice(2..-1)
|> Base.decode16!(case: :lower)
|> :binary.decode_unsigned
end
@spec to_address(binary()) :: binary()
@doc "Converts bytes to Ethereum address"
def to_address(bytes) do
Enum.join(["0x", bytes |> Base.encode16(case: :lower)], "")
end
@spec accounts() :: list()
@doc "returns all available accounts"
def accounts do

@ -3,7 +3,7 @@ defmodule ExW3.MixProject do
def project do
[app: :exw3,
version: "0.1.1",
version: "0.1.2",
elixir: "~> 1.6.4",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,

@ -0,0 +1 @@
[{"constant":true,"inputs":[{"name":"a","type":"address"}],"name":"get","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"pure","type":"function"}]

@ -0,0 +1 @@
608060405234801561001057600080fd5b5060fa8061001f6000396000f300608060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063c2bc2efc146044575b600080fd5b348015604f57600080fd5b506082600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505060c4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008190509190505600a165627a7a72305820c9e567e4879f2d99bc8a8c8087fb98be20fd5b09fd83be079d1e75a307d1553e0029

@ -1 +1 @@
6060604052341561000f57600080fd5b61020a8061001e6000396000f30060606040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680635cfd038d146100515780635d4e0342146100d3575b600080fd5b341561005c57600080fd5b6100956004808060a001906005806020026040519081016040528092919082600560200280828437820191505050505091905050610182565b6040518082600560200280838360005b838110156100c05780820151818401526020810190506100a5565b5050505090500191505060405180910390f35b34156100de57600080fd5b61012b600480803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091905050610192565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561016e578082015181840152602081019050610153565b505050509050019250505060405180910390f35b61018a6101a2565b819050919050565b61019a6101ca565b819050919050565b60a0604051908101604052806005905b60008152602001906001900390816101b25790505090565b6020604051908101604052806000815250905600a165627a7a72305820f19307646822c05c39f3f49818eb7eef776e9108223baeeed363c3d8ac1f65d40029
608060405234801561001057600080fd5b50610203806100206000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680635cfd038d146100515780635d4e0342146100df575b600080fd5b34801561005d57600080fd5b506100a16004803603810190808060a0019060058060200260405190810160405280929190826005602002808284378201915050505050919291929050505061019a565b6040518082600560200280838360005b838110156100cc5780820151818401526020810190506100b1565b5050505090500191505060405180910390f35b3480156100eb57600080fd5b50610143600480360381019080803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192905050506101aa565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561018657808201518184015260208101905061016b565b505050509050019250505060405180910390f35b6101a26101b4565b819050919050565b6060819050919050565b60a0604051908101604052806005906020820280388339808201915050905050905600a165627a7a7230582023b50208656c35f30dc0bc5698895c57470dfbbf2cc779983e04affadaed68c40029

@ -1 +1 @@
6060604052341561000f57600080fd5b6040516040806103128339810160405280805190602001909190805190602001909190505081600081905550806001816000191690555050506102bb806100576000396000f30060606040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631b85502e1461009357806354fcb8a6146100cb5780637b07059b146100f857806393affe511461011f5780639aa7c12014610157578063b17e413b1461017c578063cfd91f2b146101b3578063dc80035d146101e4575b600080fd5b341561009e57600080fd5b6100a6610207565b6040518083815260200182600019166000191681526020019250505060405180910390f35b34156100d657600080fd5b6100de61021b565b604051808215151515815260200191505060405180910390f35b341561010357600080fd5b61011d600480803560001916906020019091905050610232565b005b341561012a57600080fd5b610132610240565b6040518083815260200182600019166000191681526020019250505060405180910390f35b341561016257600080fd5b61017a60048080351515906020019091905050610251565b005b341561018757600080fd5b61019d600480803590602001909190505061026e565b6040518082815260200191505060405180910390f35b34156101be57600080fd5b6101c661027b565b60405180826000191660001916815260200191505060405180910390f35b34156101ef57600080fd5b6102056004808035906020019091905050610285565b005b600080602a60005401600154915091509091565b6000600260009054906101000a900460ff16905090565b806001816000191690555050565b600080600054600154915091509091565b80600260006101000a81548160ff02191690831515021790555050565b6000602a82019050919050565b6000600154905090565b80600081905550505600a165627a7a72305820a5876c0366e7b544e1f545407a57da0518f86811621fe36050e2beed38288ea90029
608060405234801561001057600080fd5b5060405160408061034b833981018060405281019080805190602001909291908051906020019092919050505081600081905550806001816000191690555050506102eb806100606000396000f30060806040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631b85502e1461009357806354fcb8a6146100cd5780637b07059b146100fc57806393affe511461012d5780639aa7c12014610167578063b17e413b14610196578063cfd91f2b146101d7578063dc80035d1461020a575b600080fd5b34801561009f57600080fd5b506100a8610237565b6040518083815260200182600019166000191681526020019250505060405180910390f35b3480156100d957600080fd5b506100e261024b565b604051808215151515815260200191505060405180910390f35b34801561010857600080fd5b5061012b6004803603810190808035600019169060200190929190505050610262565b005b34801561013957600080fd5b50610142610270565b6040518083815260200182600019166000191681526020019250505060405180910390f35b34801561017357600080fd5b50610194600480360381019080803515159060200190929190505050610281565b005b3480156101a257600080fd5b506101c16004803603810190808035906020019092919050505061029e565b6040518082815260200191505060405180910390f35b3480156101e357600080fd5b506101ec6102ab565b60405180826000191660001916815260200191505060405180910390f35b34801561021657600080fd5b50610235600480360381019080803590602001909291905050506102b5565b005b600080602a60005401600154915091509091565b6000600260009054906101000a900460ff16905090565b806001816000191690555050565b600080600054600154915091509091565b80600260006101000a81548160ff02191690831515021790555050565b6000602a82019050919050565b6000600154905090565b80600081905550505600a165627a7a72305820c499af61834354392e660b8e8a29d6fa2e4f64fc70e8876e171cdaa1959e4c9c0029

@ -1 +1 @@
60606040523415600e57600080fd5b60df8061001c6000396000f300606060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063501064b1146044575b600080fd5b3415604e57600080fd5b60666004808035600019169060200190919050506068565b005b7f906950f44e189193819a60a8ce35a53a0aee725af98bc984839c89d8fa2e09dd602a826040518083815260200182600019166000191681526020019250505060405180910390a1505600a165627a7a723058203db798c71abdc2ee56a59fa2fe124e8f7a3374c90d71559f08e9758d18d58e950029
608060405234801561001057600080fd5b5060e98061001f6000396000f300608060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063501064b1146044575b600080fd5b348015604f57600080fd5b50607060048036038101908080356000191690602001909291905050506072565b005b7f906950f44e189193819a60a8ce35a53a0aee725af98bc984839c89d8fa2e09dd602a826040518083815260200182600019166000191681526020019250505060405180910390a1505600a165627a7a723058202528ea34f2ac2faca07098061871256bde282a122c22356840442706e875e1570029

@ -1 +1 @@
6060604052341561000f57600080fd5b60d38061001d6000396000f3006060604052600436106049576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806360fe47b114604e5780636d4ce63c14606e575b600080fd5b3415605857600080fd5b606c60048080359060200190919050506094565b005b3415607857600080fd5b607e609e565b6040518082815260200191505060405180910390f35b8060008190555050565b600080549050905600a165627a7a723058200f90c0b17ed007c4bc6353db47563e05a1e1caa853d0525e278cdef53546167a0029
608060405234801561001057600080fd5b5060df8061001f6000396000f3006080604052600436106049576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806360fe47b114604e5780636d4ce63c146078575b600080fd5b348015605957600080fd5b5060766004803603810190808035906020019092919050505060a0565b005b348015608357600080fd5b50608a60aa565b6040518082815260200191505060405180910390f35b8060008190555050565b600080549050905600a165627a7a72305820288c3f672c14d2f8264489202b6b9170fe3060251af31eeaffb45b1bbe97992a0029

@ -0,0 +1,7 @@
pragma solidity ^0.4.18;
contract AddressTester {
function get(address a) public pure returns (address) {
return a;
}
}

@ -9,7 +9,7 @@ contract Complex {
event Bar(uint foo, address person);
event FooBar(bool fooboo, uint foo, bytes32 foobar);
function Complex(uint _foo, bytes32 _foobar) public {
constructor(uint _foo, bytes32 _foobar) public {
foo = _foo;
foobar = _foobar;
}

@ -8,6 +8,7 @@ defmodule EXW3Test do
array_tester_abi: ExW3.load_abi("test/examples/build/ArrayTester.abi"),
event_tester_abi: ExW3.load_abi("test/examples/build/EventTester.abi"),
complex_abi: ExW3.load_abi("test/examples/build/Complex.abi"),
address_tester_abi: ExW3.load_abi("test/examples/build/AddressTester.abi"),
accounts: ExW3.accounts()
}
end
@ -156,4 +157,30 @@ defmodule EXW3Test do
assert ExW3.bytes_to_string(foobar) == "Hello, world!"
end
end
test "starts a Contract GenServer for AddressTester contract", context do
ExW3.Contract.start_link(AddressTester, abi: context[:address_tester_abi])
{:ok, address} =
ExW3.Contract.deploy(
AddressTester,
bin: ExW3.load_bin("test/examples/build/AddressTester.bin"),
options: %{
from: Enum.at(context[:accounts], 0),
gas: 300_000
}
)
ExW3.Contract.at(AddressTester, address)
assert address == ExW3.Contract.address(AddressTester)
formatted_address =
Enum.at(context[:accounts], 0)
|> ExW3.format_address
{:ok, same_address} = ExW3.Contract.call(AddressTester, :get, [formatted_address])
assert ExW3.to_address(same_address) == Enum.at(context[:accounts], 0)
end
end
Loading…
Cancel
Save