From 29ff2594937e807a539ad2991fa29f6edbcffba4 Mon Sep 17 00:00:00 2001 From: Emilio Almansi Date: Fri, 16 Feb 2018 15:21:13 -0300 Subject: [PATCH] Remove deprecated docs directory and link to new documentation in readme. (#750) * Remove deprecated docs directory. * Update link to docs in readme. --- README.md | 2 +- docs/Makefile | 20 --- docs/source/basictoken.rst | 12 -- docs/source/bounty.rst | 60 -------- docs/source/claimable.rst | 20 --- docs/source/conf.py | 160 --------------------- docs/source/contract-security-patterns.rst | 4 - docs/source/delayedclaimable.rst | 13 -- docs/source/developer-resources.rst | 12 -- docs/source/ecrecovery.rst | 9 -- docs/source/getting-started.rst | 21 --- docs/source/index.rst | 47 ------ docs/source/killable.rst | 16 --- docs/source/license.rst | 23 --- docs/source/limitbalance.rst | 12 -- docs/source/math.rst | 24 ---- docs/source/merkleproof.rst | 9 -- docs/source/migrations.rst | 16 --- docs/source/ownable.rst | 16 --- docs/source/pausable.rst | 27 ---- docs/source/pullpayment.rst | 12 -- docs/source/safemath.rst | 24 ---- docs/source/standardtoken.rst | 26 ---- 23 files changed, 1 insertion(+), 584 deletions(-) delete mode 100644 docs/Makefile delete mode 100644 docs/source/basictoken.rst delete mode 100644 docs/source/bounty.rst delete mode 100644 docs/source/claimable.rst delete mode 100644 docs/source/conf.py delete mode 100644 docs/source/contract-security-patterns.rst delete mode 100644 docs/source/delayedclaimable.rst delete mode 100644 docs/source/developer-resources.rst delete mode 100644 docs/source/ecrecovery.rst delete mode 100644 docs/source/getting-started.rst delete mode 100644 docs/source/index.rst delete mode 100644 docs/source/killable.rst delete mode 100644 docs/source/license.rst delete mode 100644 docs/source/limitbalance.rst delete mode 100644 docs/source/math.rst delete mode 100644 docs/source/merkleproof.rst delete mode 100644 docs/source/migrations.rst delete mode 100644 docs/source/ownable.rst delete mode 100644 docs/source/pausable.rst delete mode 100644 docs/source/pullpayment.rst delete mode 100644 docs/source/safemath.rst delete mode 100644 docs/source/standardtoken.rst diff --git a/README.md b/README.md index d5f55513922..45710fe97df 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ If you find a security issue, please email [security@openzeppelin.org](mailto:se Building a distributed application, protocol or organization with OpenZeppelin? -- Read documentation: https://zeppelin-solidity.readthedocs.io/en/latest/ +- Read documentation: https://openzeppelin.org/api/docs/open-zeppelin.html - Ask for help and follow progress at: https://slack.openzeppelin.org/ diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index 37f1e47278f..00000000000 --- a/docs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -SPHINXPROJ = zeppelin-solidity -SOURCEDIR = source -BUILDDIR = build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/source/basictoken.rst b/docs/source/basictoken.rst deleted file mode 100644 index 8e8fb25b618..00000000000 --- a/docs/source/basictoken.rst +++ /dev/null @@ -1,12 +0,0 @@ -BasicToken -============================================= - -Simpler version of StandardToken, with no allowances - -balanceOf(address _owner) constant returns (uint balance) -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -Returns the token balance of the passed address. - -function transfer(address _to, uint _value) returns (bool success) -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -Transfers tokens from sender's account. Amount must not be greater than sender's balance. diff --git a/docs/source/bounty.rst b/docs/source/bounty.rst deleted file mode 100644 index 89074c6c953..00000000000 --- a/docs/source/bounty.rst +++ /dev/null @@ -1,60 +0,0 @@ -Bounty -============================================= - -To create a bounty for your contract, inherit from the base `Bounty` contract and provide an implementation for ```deployContract()``` returning the new contract address.:: - - import {Bounty, Target} from "./zeppelin/Bounty.sol"; - import "./YourContract.sol"; - - contract YourBounty is Bounty { - function deployContract() internal returns(address) { - return new YourContract() - } - } - - -Next, implement invariant logic into your smart contract. -Your main contract should inherit from the `Target` class and implement the ```checkInvariant()``` method. This is a function that should check everything your contract assumes to be true all the time. If this function returns false, it means your contract was broken in some way and is in an inconsistent state. This is what security researchers will try to acomplish when trying to get the bounty. - -At contracts/YourContract.sol:: - - - import {Bounty, Target} from "./zeppelin/Bounty.sol"; - contract YourContract is Target { - function checkInvariant() returns(bool) { - // Implement your logic to make sure that none of the invariants are broken. - } - } - -Next, deploy your bounty contract along with your main contract to the network. - -At ```migrations/2_deploy_contracts.js```:: - - module.exports = function(deployer) { - deployer.deploy(YourContract); - deployer.deploy(YourBounty); - }; - -Next, add a reward to the bounty contract. - -After deploying the contract, send reward funds into the bounty contract. - -From ```truffle console```:: - - bounty = YourBounty.deployed(); - address = 0xb9f68f96cde3b895cc9f6b14b856081b41cb96f1; // your account address - reward = 5; // reward to pay to a researcher who breaks your contract - - web3.eth.sendTransaction({ - from: address, - to: bounty.address, - value: web3.toWei(reward, "ether") - }) - -If researchers break the contract, they can claim their reward. - -For each researcher who wants to hack the contract and claims the reward, refer to our `Test `_ for the detail. - -Finally, if you manage to protect your contract from security researchers, you can reclaim the bounty funds. To end the bounty, destroy the contract so that all the rewards go back to the owner.:: - - bounty.destroy(); diff --git a/docs/source/claimable.rst b/docs/source/claimable.rst deleted file mode 100644 index 47efcc2474f..00000000000 --- a/docs/source/claimable.rst +++ /dev/null @@ -1,20 +0,0 @@ -Claimable -============================================= - -Extension for the Ownable contract, where the ownership needs to be claimed - -transfer(address newOwner) onlyOwner -"""""""""""""""""""""""""""""""""""""" - -Sets the passed address as the pending owner. - -modifier onlyPendingOwner -"""""""""""""""""""""""""""""""""""""" - -Function only runs if called by pending owner. - -claimOwnership( ) onlyPendingOwner -"""""""""""""""""""""""""""""""""""""" - -Completes transfer of ownership by setting pending owner as the new owner. - diff --git a/docs/source/conf.py b/docs/source/conf.py deleted file mode 100644 index 2a17842e5cb..00000000000 --- a/docs/source/conf.py +++ /dev/null @@ -1,160 +0,0 @@ -# -*- coding: utf-8 -*- -# -# zeppelin-solidity documentation build configuration file, created by -# sphinx-quickstart on Tue Dec 13 11:35:05 2016. -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -# import os -# import sys -# sys.path.insert(0, os.path.abspath('.')) - - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -# -# needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -# source_suffix = ['.rst', '.md'] -source_suffix = '.rst' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'zeppelin-solidity' -copyright = u'2016, Smart Contract Solutions, Inc' -author = u'Smart Contract Solutions, Inc' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = u'1.0.0' -# The full version, including alpha/beta/rc tags. -release = u'1.0.0' - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This patterns also effect to html_static_path and html_extra_path -exclude_patterns = [] - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = False - - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -import sphinx_rtd_theme - -html_theme = "sphinx_rtd_theme" - -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -# -# html_theme_options = {} - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - - -# -- Options for HTMLHelp output ------------------------------------------ - -# Output file base name for HTML help builder. -htmlhelp_basename = 'zeppelin-soliditydoc' - - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # - # 'papersize': 'letterpaper', - - # The font size ('10pt', '11pt' or '12pt'). - # - # 'pointsize': '10pt', - - # Additional stuff for the LaTeX preamble. - # - # 'preamble': '', - - # Latex figure (float) alignment - # - # 'figure_align': 'htbp', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - (master_doc, 'zeppelin-solidity.tex', u'zeppelin-solidity Documentation', - u'Zeppelin', 'manual'), -] - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'zeppelin-solidity', u'zeppelin-solidity Documentation', - [author], 1) -] - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - (master_doc, 'zeppelin-solidity', u'zeppelin-solidity Documentation', - author, 'zeppelin-solidity', 'One line description of project.', - 'Miscellaneous'), -] - - - diff --git a/docs/source/contract-security-patterns.rst b/docs/source/contract-security-patterns.rst deleted file mode 100644 index 74dacfc45f6..00000000000 --- a/docs/source/contract-security-patterns.rst +++ /dev/null @@ -1,4 +0,0 @@ -Common Contract Security Patterns -============================================= - -Zeppelin smart contracts are developed using industry standard contract security patterns and best practices. To learn more, please see `Onward with Ethereum Smart Contract Security `_. diff --git a/docs/source/delayedclaimable.rst b/docs/source/delayedclaimable.rst deleted file mode 100644 index cf01d6c6b9c..00000000000 --- a/docs/source/delayedclaimable.rst +++ /dev/null @@ -1,13 +0,0 @@ -DelayedClaimable -============================================= -Extension for the Claimable contract, where the ownership needs to be claimed before/after a certain block number. - -setLimits(uint256 _start, uint256 _end) onlyOwner -"""""""""""""""""""""""""""""""""""""" -Specifies the time period during which a pending owner can claim ownership. - - -claimOwnership( ) onlyPendingOwner -"""""""""""""""""""""""""""""""""""""" - -Completes transfer of ownership by setting pending owner as the new owner. diff --git a/docs/source/developer-resources.rst b/docs/source/developer-resources.rst deleted file mode 100644 index 3b4dbc46ce2..00000000000 --- a/docs/source/developer-resources.rst +++ /dev/null @@ -1,12 +0,0 @@ -Developer Resources -============================================= - -Building a distributed application, protocol or organization with OpenZeppelin? - -Ask for help and follow progress at: https://slack.openzeppelin.org/ - -Interested in contributing to OpenZeppelin? - -* Framework proposal and roadmap: https://medium.com/zeppelin-blog/zeppelin-framework-proposal-and-development-roadmap-fdfa9a3a32ab#.iain47pak -* Issue tracker: https://github.com/OpenZeppelin/zeppelin-solidity/issues -* Contribution guidelines: https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/CONTRIBUTING.md diff --git a/docs/source/ecrecovery.rst b/docs/source/ecrecovery.rst deleted file mode 100644 index ac666868652..00000000000 --- a/docs/source/ecrecovery.rst +++ /dev/null @@ -1,9 +0,0 @@ -ECRecovery -============================================= - -Returns the signer of the hash using the signature divided in v, r, and s values. - -recover(bytes32 hash, bytes sig) internal returns (address) -""""""""""""""""""""""""""""""""""""""""""""""""" - -Returns the signer of the the hash using the signature that provides the web3.eth.sign() method. diff --git a/docs/source/getting-started.rst b/docs/source/getting-started.rst deleted file mode 100644 index d0c6ef70802..00000000000 --- a/docs/source/getting-started.rst +++ /dev/null @@ -1,21 +0,0 @@ -Getting Started -============================================= - -OpenZeppelin integrates with `Truffle `_, an Ethereum development environment. Please install Truffle and initialize your project with ``truffle init``:: - - npm install -g truffle - mkdir myproject && cd myproject - truffle init - -To install the OpenZeppelin library, run:: - - npm init # follow instructions - npm install zeppelin-solidity - -After that, you'll get all the library's contracts in the `node_modules/zeppelin-solidity/contracts` folder. You can use the contracts in the library like so:: - - import "zeppelin-solidity/contracts/ownership/Ownable.sol"; - - contract MyContract is Ownable { - ... - } diff --git a/docs/source/index.rst b/docs/source/index.rst deleted file mode 100644 index e0e999c16f0..00000000000 --- a/docs/source/index.rst +++ /dev/null @@ -1,47 +0,0 @@ -.. zeppelin-solidity documentation master file, created by - sphinx-quickstart on Tue Dec 13 11:35:05 2016. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Welcome to Zeppelin-Solidity -============================================= - -Zeppelin is a library for writing secure Smart Contracts on Ethereum. - -With Zeppelin, you can build distributed applications, protocols and organizations: - -* using :doc:`contract-security-patterns` -* in the `Solidity language `_. - -The code is open-source, and `available on github `_. - -.. toctree:: - :maxdepth: 2 - - getting-started - - -.. toctree:: - :maxdepth: 2 - :caption: Smart Contracts - - ownable - Pausable - destructible - claimable - migrations - safemath - limitbalance - pullpayment - standardtoken - basictoken - crowdsaletoken - bounty - -.. toctree:: - :maxdepth: 2 - :caption: Developer Resources - - contract-security-patterns - developer-resources - license diff --git a/docs/source/killable.rst b/docs/source/killable.rst deleted file mode 100644 index 2d683dcf834..00000000000 --- a/docs/source/killable.rst +++ /dev/null @@ -1,16 +0,0 @@ -Destructible -============================================= - -Base contract that can be destroyed by owner. - -Inherits from contract Ownable. - -destroy( ) onlyOwner -""""""""""""""""""" - -Destroys the contract and sends funds back to the owner. - -destroyAndSend(address _recipient) onlyOwner -""""""""""""""""""" - -Destroys the contract and sends funds back to the _recepient. diff --git a/docs/source/license.rst b/docs/source/license.rst deleted file mode 100644 index c25806f71f8..00000000000 --- a/docs/source/license.rst +++ /dev/null @@ -1,23 +0,0 @@ -The MIT License (MIT) -============================================= - -Copyright (c) 2016 Smart Contract Solutions, Inc. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/docs/source/limitbalance.rst b/docs/source/limitbalance.rst deleted file mode 100644 index f30d119f4d6..00000000000 --- a/docs/source/limitbalance.rst +++ /dev/null @@ -1,12 +0,0 @@ -LimitBalance -============================================= - -Base contract that provides mechanism for limiting the amount of funds a contract can hold. - -LimitBalance(unit _limit) -"""""""""""""""""""""""""""" -Constructor takes an unsigned integer and sets it as the limit of funds this contract can hold. - -modifier limitedPayable() -"""""""""""""""""""""""""""" -Throws an error if this contract's balance is already above the limit. diff --git a/docs/source/math.rst b/docs/source/math.rst deleted file mode 100644 index 30d67124ca6..00000000000 --- a/docs/source/math.rst +++ /dev/null @@ -1,24 +0,0 @@ -Math -============================================= - -Provides assorted low-level math operations. - -max64(uint64 a, uint64 b) internal constant returns (uint64) -""""""""""""""""""""""""""""""""""""""""""""""""" - -Returns the largest of two uint64 numbers. - -min64(uint64 a, uint64 b) internal constant returns (uint64) -""""""""""""""""""""""""""""""""""""""""""""""""" - -Returns the smallest of two uint64 numbers. - -max64(uint256 a, uint256 b) internal constant returns (uint256) -""""""""""""""""""""""""""""""""""""""""""""""""" - -Returns the largest of two uint256 numbers. - -min64(uint256 a, uint256 b) internal constant returns (uint256) -""""""""""""""""""""""""""""""""""""""""""""""""" - -Returns the smallest of two uint256 numbers. diff --git a/docs/source/merkleproof.rst b/docs/source/merkleproof.rst deleted file mode 100644 index 4dcc94e4703..00000000000 --- a/docs/source/merkleproof.rst +++ /dev/null @@ -1,9 +0,0 @@ -MerkleProof -============================================= - -Merkle proof verification for leaves of a Merkle tree. - -verifyProof(bytes _proof, bytes32 _root, bytes32 _leaf) internal constant returns (bool) -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - -Verifies a Merkle proof proving the existence of a leaf in a Merkle tree. Assumes that each pair of leaves and each pair of pre-images is sorted. diff --git a/docs/source/migrations.rst b/docs/source/migrations.rst deleted file mode 100644 index 6ca3fe81a96..00000000000 --- a/docs/source/migrations.rst +++ /dev/null @@ -1,16 +0,0 @@ -Migrations -============================================= - -Base contract that allows for a new instance of itself to be created at a different address. - -Inherits from contract Ownable. - -upgrade(address new_address) onlyOwner -"""""""""""""""""""""""""""""""""""""""" - -Creates a new instance of the contract at the passed address. - -setCompleted(uint completed) onlyOwner** -"""""""""""""""""""""""""""""""""""""""" - -Sets the last time that a migration was completed. diff --git a/docs/source/ownable.rst b/docs/source/ownable.rst deleted file mode 100644 index 30daaab618a..00000000000 --- a/docs/source/ownable.rst +++ /dev/null @@ -1,16 +0,0 @@ -Ownable -============================================= - -Base contract with an owner. - -Ownable( ) -"""""""""""""""""""""""""""""""""""""" -Sets the address of the creator of the contract as the owner. - -modifier onlyOwner( ) -"""""""""""""""""""""""""""""""""""""" -Prevents function from running if it is called by anyone other than the owner. - -transferOwnership(address newOwner) onlyOwner -"""""""""""""""""""""""""""""""""""""" -Transfers ownership of the contract to the passed address. diff --git a/docs/source/pausable.rst b/docs/source/pausable.rst deleted file mode 100644 index b108c740e97..00000000000 --- a/docs/source/pausable.rst +++ /dev/null @@ -1,27 +0,0 @@ -Pausable -============================================= - -Base contract that provides a pause mechanism. - -Inherits from contract Ownable. - -pause() onlyOwner whenNotPaused returns (bool) -""""""""""""""""""""""""""""""""""""" - -Triggers pause mechanism on the contract. After this function is called (by the owner of the contract), any function with modifier whenNotPaused will not run. - - -modifier whenNotPaused() -""""""""""""""""""""""""""""""""""""" - -Prevents function from running if pause mechanism is activated. - -modifier whenPaused() -""""""""""""""""""""""""""""""""""""" - -Only runs if pause mechanism is activated. - -unpause() onlyOwner whenPaused returns (bool) -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" - -Deactivates the pause mechanism. diff --git a/docs/source/pullpayment.rst b/docs/source/pullpayment.rst deleted file mode 100644 index 636b3a1c5dd..00000000000 --- a/docs/source/pullpayment.rst +++ /dev/null @@ -1,12 +0,0 @@ -PullPayment -============================================= - -Base contract supporting async send for pull payments. Inherit from this contract and use asyncSend instead of send. - -asyncSend(address dest, uint amount) internal -""""""""""""""""""""""""""""""""""""""""""""""" -Adds sent amount to available balance that payee can pull from this contract, called by payer. - -withdrawPayments( ) -""""""""""""""""""""""""""""""""""""""""""""""" -Sends designated balance to payee calling the contract. Throws error if designated balance is 0, if contract does not hold enough funds to pay the payee, or if the send transaction is not successful. diff --git a/docs/source/safemath.rst b/docs/source/safemath.rst deleted file mode 100644 index bb5be50369c..00000000000 --- a/docs/source/safemath.rst +++ /dev/null @@ -1,24 +0,0 @@ -SafeMath -============================================= - -Provides functions of mathematical operations with safety checks. - -assert(bool assertion) internal -""""""""""""""""""""""""""""""""""""""""""""""""" - -Throws an error if the passed result is false. Used in this contract by checking mathematical expressions. - -mul(uint256 a, uint256 b) internal returns (uint256) -""""""""""""""""""""""""""""""""""""""""""""""""" - -Multiplies two unsigned integers. Asserts that dividing the product by the non-zero multiplicand results in the multiplier. - -sub(uint256 a, uint256 b) internal returns (uint256) -""""""""""""""""""""""""""""""""""""""""""""""""" - -Checks that b is not greater than a before subtracting. - -add(uint256 a, uint256 b) internal returns (uint256) -""""""""""""""""""""""""""""""""""""""""""""""""" - -Checks that the result is greater than both a and b. diff --git a/docs/source/standardtoken.rst b/docs/source/standardtoken.rst deleted file mode 100644 index a34c7569519..00000000000 --- a/docs/source/standardtoken.rst +++ /dev/null @@ -1,26 +0,0 @@ -StandardToken -============================================= - -Based on code by FirstBlood: `Link FirstBloodToken.sol `_ - -Inherits from contract SafeMath. Implementation of abstract contract ERC20 (see https://github.com/ethereum/EIPs/issues/20) - -approve(address _spender, uint _value) returns (bool success) -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -Sets the amount of the sender's token balance that the passed address is approved to use. - -allowance(address _owner, address _spender) constant returns (uint remaining) -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -Returns the approved amount of the owner's balance that the spender can use. - -balanceOf(address _owner) constant returns (uint balance) -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -Returns the token balance of the passed address. - -transferFrom(address _from, address _to, uint _value) returns (bool success) -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -Transfers tokens from an account that the sender is approved to transfer from. Amount must not be greater than the approved amount or the account's balance. - -function transfer(address _to, uint _value) returns (bool success) -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -Transfers tokens from sender's account. Amount must not be greater than sender's balance.