Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

Commit

Permalink
Merge pull request #864 from ethereum/fix-broken-link
Browse files Browse the repository at this point in the history
Adding tests for broken links
  • Loading branch information
evertonfraga committed Jun 12, 2018
2 parents 2dda522 + d431f24 commit d06fe43
Show file tree
Hide file tree
Showing 14 changed files with 467 additions and 529 deletions.
15 changes: 13 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
language: node_js
node_js:
- "0.12"
node_js: 8

before_script:
- npm install broken-link-checker -g
- npm install http-server -g
- npm install grunt -g

script:
# building website
- grunt build

# running local server, checking for broken links
- http-server dist/ --silent & blc http://localhost:8080 -rg
2 changes: 1 addition & 1 deletion data/mist_releases.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cli.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ <h4>Install: on Mac</h4>
</code></pre>
<p>The <a href="http://www.ethdocs.org/en/latest/ethereum-clients/cpp-ethereum/index.html">cpp-ethereum documentation</a>
has detailed information on <a href="http://www.ethdocs.org/en/latest/ethereum-clients/cpp-ethereum/installing-binaries/osx-homebrew.html">OS X Homebrew package</a>
and on <a href="http://www.ethdocs.org/en/latest/ethereum-clients/cpp-ethereum/building-from-source/osx.html">Building OS X from Source</a>.</p>
and on <a href="http://www.ethdocs.org/en/latest/ethereum-clients/cpp-ethereum/building-from-source/macos.html">Building OS X from Source</a>.</p>
<h4>Install on Linux:</h4>
<p>If you use Apt-get, paste this into the terminal:</p>
<pre><code>apt-get install cpp-ethereum
Expand Down
2 changes: 1 addition & 1 deletion dist/dao.html
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ <h4>The code</h4>

</code></pre>
<h4>Deployment</h4>
<p>First, you need a token. If you have followed the <strong>Shareholder association</strong> tutorial above, you can use the same token as you had previously, otherwise just <a href="./token/">deploy a new token</a> and distribute it among some accounts. Copy the token address.</p>
<p>First, you need a token. If you have followed the <strong>Shareholder association</strong> tutorial above, you can use the same token as you had previously, otherwise just <a href="./token">deploy a new token</a> and distribute it among some accounts. Copy the token address.</p>
<p>Deploy the democracy contract, and put the token address on the <strong>Voting weight token</strong>, put <strong>75</strong> as the <strong>Percent loss in each round</strong> and <strong>transferOwnership(address)</strong> (without any spaces or extra characters!) as the <strong>forbidden function</strong>.</p>
<h4>Selecting a delegate</h4>
<p>Now deploy the Liquid democracy and go to its page. First have any of the shareholders <strong>vote</strong> on who they would trust to make decisions on behalf of this contract. You can vote on yourself if you want to be the final decision maker, or on the zero address, if you'd rather have no one representing you on that role.</p>
Expand Down
9 changes: 1 addition & 8 deletions dist/ether.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,8 @@ <h4>GPU MINING Using the command line</h4>
<pre><code>eth -b --genesis path/to/genesis.json -i -m on -G
</code></pre>
<p>Once you started, just follow the same instructions as normal CPU mining.</p>
<p><strong>Instructions for Geth</strong></p>
<p>There are currently two options for GPU mining in Geth available. You can read a more detailed description of how to install it on this <a href="https://forum.ethereum.org/discussion/197/mining-faq-live-updates">mining post</a>.</p>
<ul>
<li>
<p><strong>C++ Etherminer</strong>. This is a version for the pro miners. To install it, follow the guide to <a href="https://github.com/ethereum/cpp-ethereum/wiki/Installing-clients">install the whole C++ ethereum code</a>.</p>
</li>
<li>
<p><strong>Go experimental GPU branch</strong>. It's experimental so you need to build go from source to get it. This version is focused on hobbyists and developers. To install it, <a href="https://github.com/ethereum/go-ethereum/wiki/Installation-Instructions-for-Ubuntu">clone geth from source</a> and then switch to the <a href="https://github.com/ethereum/go-ethereum/tree/gpu_miner">GPU Miner branch</a>.</p>
</li>
<li><strong>C++ Etherminer</strong>. This is a version for the pro miners. To install it, follow the guide to <a href="https://github.com/ethereum/cpp-ethereum/wiki/Installing-clients">install the whole C++ ethereum code</a>.</li>
</ul>
<h4>More information on Mining</h4>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion dist/foundation.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h3>Technical Steering Group</h3>
<h4>Jeffrey Wilcke</h4>
<p><img src="/images/portraits/Jeffrey.jpg" alt="Portrait of Jeffrey Wilcke"></p>
<p><strong>Jeff is one of the founders of Ethereum.</strong> He started the first implementation of Ethereum using the Go programming language in 2013 and has been the Go team lead and head developer ever since. The Go client launched successfully on July 30, 2015, marking the release of the genesis block and Ethereum platform.</p>
<p><a href="https://www.linkedin.com/in/jeffreywilcke">LinkedIn</a>, <a href="https://github.com/obscuren">GitHub</a></p>
<p><a href="https://github.com/obscuren">GitHub</a></p>
<a class="button small" href="https://github.com/ethereum/ethereum-org/edit/master/views/content/foundation.md">Improve this page</a></div></div></div></div><div class="main-tutorial inner-page foundation-page even"><div class="container scrollme"> <div class="row animateme" data-when="enter" data-from="0.9" data-to="0.1" data-opacity="0" data-scale="0.8"><div class="col-md-12"><h2>Ethereum History</h2>
<p>Ethereum has been made possible thanks to many more people than would be possible to list here. A more comprehensive short history of Ethereum, <a href="https://blog.ethereum.org/2016/02/09/cut-and-try-building-a-dream/">read this blog post by Taylor Gerring</a>. Help write this story at <a href="https://ethereum-homestead.readthedocs.org/en/latest/introduction/history-of-ethereum.html">the history guide</a></p>
</div></div></div></div><footer class="scrollme"><div class="footer"><div class="container"><div class="row row-footer-news"><div class="col-md-12 news"><h3>News</h3><div class="iframe-wrapper"><a class="twitter-timeline" href="https://twitter.com/ethereum" data-widget-id="694952013856112640" data-chrome="nofooter noborders transparent noheader" width="100%" height="370px">Tweets by @ethereum</a><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></div></div></div><div class="row row-footer-primary"><div class="col-md-4 community"><h3>Community</h3><div class="row"><div class="col-sm-5"><ul><li><a href="https://blog.ethereum.org" target="_blank"><i class="fa fa-rss"></i> Blog</a></li><li><a href="https://github.com/ethereum" target="_blank"><i class="fa fa-github"></i> GitHub</a></li><li><a href="https://www.youtube.com/user/ethereumproject" target="_blank"><i class="fa fa-youtube"></i> YouTube</a></li><li><a href="https://www.reddit.com/r/ethereum" target="_blank"><i class="fa fa-reddit"></i> Reddit</a></li><li><a href="https://gitter.im/orgs/ethereum/rooms" target="_blank"><i class="fa fa-comments-o"></i> Gitter</a></li></ul></div><div class="col-sm-7"><ul><li><a href="https://twitter.com/ethereum" target="_blank"><i class="fa fa-twitter"></i> Twitter</a></li><li><a href="https://ethereum.stackexchange.com" target="_blank"><i class="fa fa-stack-exchange"></i> Stack Exchange</a></li><li><a href="https://www.facebook.com/ethereumproject" target="_blank"><i class="fa fa-facebook"></i> Facebook </a></li><li><a href="https://ethereum.meetup.com" target="_blank"><i class="fa fa-meetup"></i> Meetups</a></li></ul></div></div></div><div class="col-md-4 about-us"><h3>Ethereum Foundation</h3><p>Ethereum is developed by a worldwide team of passionate developers for the <a href="./foundation">Ethereum Foundation</a>, a Swiss nonprofit organization. </p><p> <a class="donate-button" href="./donate">Donate to support development </a><div class="caption">(and you can get a unicorn!)</div></p></div><div class="col-md-4 developer-resources"><h3>Developer Resources</h3><ul><li>What is Ether? <a href="./ether">Read our FAQ</a></li><li>Browse our source code on <a href="https://github.com/ethereum/" target="_blank">GitHub</a></li><li>Read the <a href="http://www.ethdocs.org/" target="_blank">documentation</a>
Expand Down
56 changes: 3 additions & 53 deletions dist/greeter.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<p>Before you begin:</p>
<ul>
<li><a href="https://ethereum.org/cli">Install the Ethereum CLI</a></li>
<li><a href="https://github.com/ethereum/go-ethereum/wiki/Contracts-and-Transactions">Learn more about contracts</a></li>
<li><a href="http://ethdocs.org/en/latest/contracts-and-transactions/contracts.html">Learn more about contracts</a></li>
</ul>
<p>Please confirm that the GUI is closed before entering the <code>geth</code> console.
Run <code>geth</code> to begin the sync process (this may take a while on the first run).</p>
Expand Down Expand Up @@ -41,58 +41,8 @@ <h3>Your first citizen: the greeter</h3>
</code></pre>
<p>You'll notice that there are two different contracts in this code: <em>&quot;mortal&quot;</em> and <em>&quot;greeter&quot;</em>. This is because Solidity (the high level contract language we are using) has <em>inheritance</em>, meaning that one contract can inherit characteristics of another. This is very useful to simplify coding as common traits of contracts don't need to be rewritten every time, and all contracts can be written in smaller, more readable chunks. So by just declaring that <em>greeter is mortal</em> you inherited all characteristics from the &quot;mortal&quot; contract and kept the greeter code simple and easy to read.</p>
<p>The inherited characteristic <em>&quot;mortal&quot;</em> simply means that the greeter contract can be killed by its owner, to clean up the blockchain and recover funds locked into it when the contract is no longer needed. Contracts in ethereum are, by default, immortal and have no owner, meaning that once deployed the author has no special privileges anymore. Consider this before deploying.</p>
<h3>Compiling your contract using the Solc Compiler</h3>
<p>Before you are able to deploy your contract, you'll need two things:</p>
<ol>
<li>The compiled code</li>
<li>The Application Binary Interface, which is a JavaScript Object that defines how to interact with the contract</li>
</ol>
<p>You can get both of these by using a Solidity compiler. If you have not installed a compiler, you can either:</p>
<ol>
<li>Install a compiler on your machine by following the <a href="http://solidity.readthedocs.io/en/develop/installing-solidity.html">instructions for installing the Solidity Compiler</a></li>
<li>Use <a href="https://remix.ethereum.org">Remix</a>, a web-based Solidity IDE</li>
</ol>
<h4>Solc on your machine</h4>
<p>=======</p>
<p>If you installed the compiler on your machine, you need to compile the contract to acquire the compiled code and Application Binary Interface.</p>
<pre><code>solc -o target --bin --abi Greeter.sol
</code></pre>
<p>This will create two files, one file containing the compiled code and one file creating the Application Binary Interface in a directory called target.</p>
<pre><code>$tree
.
├── Greeter.sol
└── target
├── Greeter.abi
├── Greeter.bin
├── Mortal.abi
└── Mortal.bin
</code></pre>
<p>You will see that there are files created for both contracts; but because Greeter includes Mortal you do not need to deploy Mortal to deploy Greeter.</p>
<p>You can use these two files to create and deploy the contract.</p>
<pre><code>var greeterFactory = eth.contract(&lt;contents of the file Greeter.abi&gt;)

var greeterCompiled = &quot;0x&quot; + &quot;&lt;contents of the file Greeter.bin&gt;&quot;
</code></pre>
<p>You have now compiled your code and made it available to Geth. Now you need to get it ready for deployment, this includes setting some variables up, like what greeting you want to use. Edit the first line below to something more interesting than &quot;Hello World!&quot; and execute these commands:</p>
<pre><code>var _greeting = &quot;Hello World!&quot;

var greeter = greeterFactory.new(_greeting,{from:eth.accounts[0],data:greeterCompiled,gas:47000000}, function(e, contract){
if(e) {
console.error(e); // If something goes wrong, at least we'll know.
return;
}

if(!contract.address) {
console.log(&quot;Contract transaction send: TransactionHash: &quot; + contract.transactionHash + &quot; waiting to be mined...&quot;);

} else {
console.log(&quot;Contract mined! Address: &quot; + contract.address);
console.log(contract);
}
})
</code></pre>
<h4>Using Remix</h4>
<p>If you don't have Solc installed, you can simply use the online IDE. Copy the source code (at the top of this page) to <a href="https://remix.ethereum.org">Remix</a> and it should automatically compile your code. You can safely ignore any yellow warning boxes on the right plane.</p>
<p>As of 2018, the most convenient way to develop contracts is using Remix, an online IDE. Copy the source code (at the top of this page) to <a href="https://remix.ethereum.org">Remix</a> and it should automatically compile your code. You can safely ignore any yellow warning boxes on the right plane.</p>
<p>To access the compiled code, ensure that the dropdown menu on the right pane has <code>greeter</code> selected. Then click on the <strong>Details</strong> button directly to the right of the dropdown. In the popup, scroll down and copy all the code in the <strong>WEB3DEPLOY</strong> textbox.</p>
<p>Create a temporary text file on your computer and paste that code. Make sure to change the first line to look like the following:</p>
<pre><code>var _greeting = &quot;Hello World!&quot;
Expand All @@ -101,7 +51,7 @@ <h4>Using Remix</h4>
<pre><code>Contract mined! address: 0xdaa24d02bad7e9d6a80106db164bad9399a0423e
</code></pre>
<p>You may have to &quot;unlock&quot; the account that is sending the transaction using the password you picked in the beginning, because you need to pay for the gas costs to deploying your contract: e.g. <code>personal.unlockAccount(web3.eth.accounts[0], &quot;yourPassword&quot;)</code>.</p>
<p>This contract is estimated to need ~180 thousand gas to deploy (according to the <a href="http://remix.ethereum.org">online solidity compiler</a>), at the time of writing, gas on the test net is priced at 20 gwei (<a href="http://ether.fund/tool/converter#v=20&amp;u=Gwei">equal to( 20000000000 wei, or 0.00000002 ether</a>) per unit of gas. There are many useful stats, including the latest gas prices <a href="https://stats.ethdev.com">at the network stats page</a>.</p>
<p>This contract is estimated to need ~180 thousand gas to deploy (according to the <a href="http://remix.ethereum.org">online solidity compiler</a>), at the time of writing, gas on the main net is priced at 6 gwei, resulting in 0.00108 ETH worth of feed. You can use <a href="https://ethgasstation.info/calculatorTxV.php">ETH Gas Station Transaction Calculator tool</a> for updated information.</p>
<p><strong>Notice that the cost is not paid to the <a href="../foundation">ethereum developers</a>, instead it goes to the <em>Miners</em>, those peers whose computers are working to find new blocks and keep the network secure. Gas price is set by the market of the current supply and demand of computation. If the gas prices are too high, you can become a miner and lower your asking price.</strong></p>
<p>Within less than a minute, you should have a log with the contract address, this means you've successfully deployed your contract. You can verify the deployed code (which will be compiled) by using this command:</p>
<pre><code>eth.getCode(greeter.address)
Expand Down
Loading

0 comments on commit d06fe43

Please sign in to comment.