From 7d93e44b9e7bda5cf3eb622a5070ba864fb9011b Mon Sep 17 00:00:00 2001 From: Paco Date: Thu, 22 Feb 2018 12:27:44 +0100 Subject: [PATCH 1/4] Draft code ERC223 --- .gitignore | 2 + README.md | 39 +++++- contracts/AMNToken.sol | 30 +++-- contracts/ERC223/ERC223_BasicToken.sol | 54 +++++++++ contracts/ERC223/ERC223_Interface.sol | 31 +++++ contracts/ERC223/ERC223_ReceivingContract.sol | 24 ++++ .../ERC223/ERC223_ReceivingInterface.sol | 11 ++ contracts/ERC223/ERC223_StandardToken.sol | 50 ++++++++ contracts/ERC223/ERC223_Utils.sol | 19 +++ contracts/Migrations.sol | 2 +- migrations/2_deploy_contracts.js | 12 ++ package-lock.json | 114 +++++++++++++++++- package.json | 5 +- test/AMNToken.js | 35 ++++++ 14 files changed, 407 insertions(+), 21 deletions(-) create mode 100644 contracts/ERC223/ERC223_BasicToken.sol create mode 100644 contracts/ERC223/ERC223_Interface.sol create mode 100644 contracts/ERC223/ERC223_ReceivingContract.sol create mode 100644 contracts/ERC223/ERC223_ReceivingInterface.sol create mode 100644 contracts/ERC223/ERC223_StandardToken.sol create mode 100644 contracts/ERC223/ERC223_Utils.sol create mode 100644 test/AMNToken.js diff --git a/.gitignore b/.gitignore index e3fbd98..b3bcdf2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ build node_modules +.DS_Store +package-lock.json diff --git a/README.md b/README.md index 646ffe4..bef47e6 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,43 @@ # AMN Token -This repository holds the source code of the ERC20 Amon Token (AMN) Ethereum smart contract. +Source code for Amon Token (AMN) Ethereum smart contract. -Dependencies + +## Description +This token respects the ERC20 and ERC223 standards. + +### Dependencies - Truffle - OpenZeppelin - Solidity + +### Implemented methods + +- transfer(address to, uint value[, bytes data]) *(needs `tokenFallback` method on `to` if it is a contract)* +- totalSupply() +- balanceOf(address owner) +- transferFrom(address from, address to, uint256 value[, bytes data]) *(needs `tokenFallback` method on `to` if it is a contract)* +- approve(address spender, uint256 value) +- allowance(address owner, address spender) +- increaseApproval(address spender, uint addedValue) +- decreaseApproval(address spender, uint subtractedValue) + +### Contract inheritances + +DetailedERC20: +name, symbol, decimals + +BasicToken +transfer, totalSupply, balanceOf + +StandardToken: +transferFrom, approve, allowance, increaseApproval, decreaseApproval, BasicToken + +ERC223BasicToken: +transfer, BasicToken + +ERC223StandardToken: +transferFrom, ERC223BasicToken, StandardToken + +AMNToken: +DetailedERC20, ERC223StandardToken diff --git a/contracts/AMNToken.sol b/contracts/AMNToken.sol index 23c56b0..2422932 100644 --- a/contracts/AMNToken.sol +++ b/contracts/AMNToken.sol @@ -1,14 +1,22 @@ -pragma solidity ^0.4.11; -import "zeppelin-solidity/contracts/token/StandardToken.sol"; +pragma solidity ^0.4.19; -contract AMNToken is StandardToken { - string public name = "AMON"; - string public symbol = "AMN"; - uint public decimals = 18; - uint public INITIAL_SUPPLY = (1.6 * 10 ** 9) * (10 ** decimals); +import "zeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol"; +import './ERC223/ERC223_StandardToken.sol'; - function AMNToken() { - totalSupply = INITIAL_SUPPLY; - balances[msg.sender] = INITIAL_SUPPLY; - } +contract AMNToken is DetailedERC20, ERC223StandardToken { + string constant NAME = "Amon"; + string constant SYMBOL = "AMN"; + uint8 constant DECIMALS = 18; + uint256 constant INITIAL_SUPPLY = (1.6 * 10 ** 9) * (uint256(10) ** DECIMALS); + + /** + *@dev Constructor that set the token initial parameters + */ + function AMNToken() + DetailedERC20(NAME, SYMBOL, DECIMALS) + public + { + totalSupply_ = INITIAL_SUPPLY; + balances[msg.sender] = INITIAL_SUPPLY; + } } diff --git a/contracts/ERC223/ERC223_BasicToken.sol b/contracts/ERC223/ERC223_BasicToken.sol new file mode 100644 index 0000000..44510e3 --- /dev/null +++ b/contracts/ERC223/ERC223_BasicToken.sol @@ -0,0 +1,54 @@ +pragma solidity ^0.4.19; + +import "zeppelin-solidity/contracts/token/ERC20/BasicToken.sol"; + +import './ERC223_Interface.sol'; +import './ERC223_ReceivingInterface.sol'; +import './ERC223_Utils.sol'; + +/** + * @title ERC223 basic token implementation. + */ +contract ERC223BasicToken is ERC223Interface, BasicToken { + + using SafeMath for uint256; + + function() public { + //if ether is sent to this address, send it back. + revert(); + } + + // Standard function transfer similar to ERC20 transfer with no _data . + // Added due to backwards compatibility reasons . + function transfer(address _to, uint _value) public returns (bool success) { + + bytes memory empty; + return transfer(_to, _value, empty); + + } + + /** + * @dev Transfer tokens to another from sender + * @param _to address The address which you want to transfer to + * @param _value uint256 the amount of tokens to be transferred + * @param _data bytes data to attach that will be stored as event + */ + function transfer(address _to, uint _value, bytes _data) public returns (bool success) { + + require(_to != address(0)); + require(_value <= balances[msg.sender]); + + balances[msg.sender] = balances[msg.sender].sub(_value); + balances[_to] = balances[_to].add(_value); + + if(ERC223Utils.isContract(_to)) { + ERC223ReceivingInterface receiver = ERC223ReceivingInterface(_to); + receiver.tokenFallback(msg.sender, _value, _data); + } + + Transfer(msg.sender, _to, _value); + return true; + + } + +} diff --git a/contracts/ERC223/ERC223_Interface.sol b/contracts/ERC223/ERC223_Interface.sol new file mode 100644 index 0000000..277ae6d --- /dev/null +++ b/contracts/ERC223/ERC223_Interface.sol @@ -0,0 +1,31 @@ +pragma solidity ^0.4.19; + +import "zeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol"; + +/** + * @title ERC223 standard token interface. + */ + +contract ERC223Interface is ERC20Basic { + + /** + * @dev triggered when transfer is successfully called. + * + * @param _from Sender address. + * @param _to Receiver address. + * @param _value Amount of tokens that will be transferred. + * @param _data Transaction metadata. + */ + event Transfer(address indexed _from, address indexed _to, uint256 indexed _value, bytes _data); + + /** + * @dev Transfer the specified amount of tokens to the specified address. + * Now with a new parameter _data. + * + * @param _to Receiver address. + * @param _value Amount of tokens that will be transferred. + * @param _data Transaction metadata. + */ + function transfer(address _to, uint _value, bytes _data) public returns (bool); + +} diff --git a/contracts/ERC223/ERC223_ReceivingContract.sol b/contracts/ERC223/ERC223_ReceivingContract.sol new file mode 100644 index 0000000..b44521f --- /dev/null +++ b/contracts/ERC223/ERC223_ReceivingContract.sol @@ -0,0 +1,24 @@ +pragma solidity ^0.4.19; + + /** + * @title Contract that will work with ERC223 tokens. + */ + +contract ERC223ReceivingContract { + + event TokenDeposit(address indexed sender, address indexed token, uint value, bytes _data); + + /** + * @dev Standard ERC223 function that will handle incoming token transfers. + * + * @param _from Token sender address. + * @param _value Amount of tokens. + * @param _data Transaction metadata. + */ + function tokenFallback(address _from, uint _value, bytes _data) public { + + if (_value > 0) + TokenDeposit(_from, msg.sender, _value, _data); + + } +} diff --git a/contracts/ERC223/ERC223_ReceivingInterface.sol b/contracts/ERC223/ERC223_ReceivingInterface.sol new file mode 100644 index 0000000..740111f --- /dev/null +++ b/contracts/ERC223/ERC223_ReceivingInterface.sol @@ -0,0 +1,11 @@ +pragma solidity ^0.4.19; + + /** + * @title Interface for ERC223 Receiving Contract. + */ + +contract ERC223ReceivingInterface { + + function tokenFallback(address _from, uint _value, bytes _data) public; + +} diff --git a/contracts/ERC223/ERC223_StandardToken.sol b/contracts/ERC223/ERC223_StandardToken.sol new file mode 100644 index 0000000..e5c8560 --- /dev/null +++ b/contracts/ERC223/ERC223_StandardToken.sol @@ -0,0 +1,50 @@ +pragma solidity ^0.4.19; + +import "zeppelin-solidity/contracts/token/ERC20/StandardToken.sol"; + +import './ERC223_BasicToken.sol'; +import './ERC223_ReceivingInterface.sol'; +import './ERC223_Utils.sol'; + +/** + * @title ERC223 standard token implementation. + */ +contract ERC223StandardToken is ERC223BasicToken, StandardToken { + + using SafeMath for uint256; + + + // Standard function transfer similar to ERC20 transfer with no _data . + // Added due to backwards compatibility reasons . + function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { + + bytes memory empty; + return transferFrom(_from, _to, _value, empty); + + } + /** + * @dev Transfer tokens from one address to another + * @param _from address The address which you want to send tokens from + * @param _to address The address which you want to transfer to + * @param _value uint256 the amount of tokens to be transferred + * @param _data bytes data to attach that will be stored as event + */ + function transferFrom(address _from, address _to, uint256 _value, bytes _data) public returns (bool) { + require(_to != address(0)); + require(_value <= balances[_from]); + require(_value <= allowed[_from][msg.sender]); + + balances[_from] = balances[_from].sub(_value); + balances[_to] = balances[_to].add(_value); + allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); + + if(ERC223Utils.isContract(_to)) { + ERC223ReceivingInterface receiver = ERC223ReceivingInterface(_to); + receiver.tokenFallback(_from, _value, _data); + } + + Transfer(_from, _to, _value); + return true; + } + +} diff --git a/contracts/ERC223/ERC223_Utils.sol b/contracts/ERC223/ERC223_Utils.sol new file mode 100644 index 0000000..274176b --- /dev/null +++ b/contracts/ERC223/ERC223_Utils.sol @@ -0,0 +1,19 @@ +pragma solidity ^0.4.19; + +/** + * @title Math + * @dev Assorted math operations + */ +library ERC223Utils { + + //assemble the given address bytecode. If bytecode exists then the _addr is a contract. + function isContract(address _addr) public view returns (bool is_contract) { + uint length; + assembly { + //retrieve the size of the code on target address, this needs assembly + length := extcodesize(_addr) + } + return (length>0); + } + +} diff --git a/contracts/Migrations.sol b/contracts/Migrations.sol index f170cb4..26d7ce9 100644 --- a/contracts/Migrations.sol +++ b/contracts/Migrations.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.17; +pragma solidity ^0.4.19; contract Migrations { address public owner; diff --git a/migrations/2_deploy_contracts.js b/migrations/2_deploy_contracts.js index 9796ddf..7289094 100644 --- a/migrations/2_deploy_contracts.js +++ b/migrations/2_deploy_contracts.js @@ -1,5 +1,17 @@ +/* var AMNToken = artifacts.require("AMNToken"); module.exports = function(deployer) { deployer.deploy(AMNToken); }; + +*/ +const ERC223Utils = artifacts.require('ERC223/ERC223Utils'); +const AMNToken = artifacts.require('AMNToken'); + +module.exports = function (deployer) { + deployer.deploy(ERC223Utils).then(() => { + deployer.deploy(AMNToken); + }); + deployer.link(ERC223Utils, AMNToken); +}; diff --git a/package-lock.json b/package-lock.json index 030ecb8..3a1bae8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,20 +1,122 @@ { - "name": "tok", - "version": "1.0.0", + "name": "amn-token-contract", + "version": "0.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==" + }, + "bn.js": { + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" + }, + "chai": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.1.2.tgz", + "integrity": "sha1-D2RYS6ZC8PKs4oBiefTwbKI61zw=", + "requires": { + "assertion-error": "1.1.0", + "check-error": "1.0.2", + "deep-eql": "3.0.1", + "get-func-name": "2.0.0", + "pathval": "1.1.0", + "type-detect": "4.0.8" + } + }, + "chai-as-promised": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", + "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", + "requires": { + "check-error": "1.0.2" + } + }, + "chai-bignumber": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/chai-bignumber/-/chai-bignumber-2.0.2.tgz", + "integrity": "sha512-BIdRNjRaoRj4bMsZLKbIZPMNKqmwnzNiyxqBYDSs6dFOCs9w8OHPuUE8e1bH60i1IhOzT0NjLtCD+lKEWB1KTQ==" + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=" + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "requires": { + "type-detect": "4.0.8" + } + }, "dotenv": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-4.0.0.tgz", "integrity": "sha1-hk7xN5rO1Vzm+V3r7NzhefegzR0=" }, + "ethjs-abi": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/ethjs-abi/-/ethjs-abi-0.2.1.tgz", + "integrity": "sha1-4KepOn6BFjqUR3utVu3lJKtt5TM=", + "requires": { + "bn.js": "4.11.6", + "js-sha3": "0.5.5", + "number-to-bn": "1.7.0" + } + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=" + }, + "is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" + }, + "js-sha3": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.5.tgz", + "integrity": "sha1-uvDA6MVK1ZA0R9+Wreekobynmko=" + }, + "number-to-bn": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", + "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", + "requires": { + "bn.js": "4.11.6", + "strip-hex-prefix": "1.0.0" + } + }, + "pathval": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=" + }, + "strip-hex-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", + "requires": { + "is-hex-prefixed": "1.0.0" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" + }, "zeppelin-solidity": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/zeppelin-solidity/-/zeppelin-solidity-1.5.0.tgz", - "integrity": "sha512-X4Z7JNarpK71BqiHn/vYrKM1Xul/YeDM9Wr8i2TnTPZSmsUWFy4R4vRxyMk3td58UKvApidWejtgHOC7rkSSew==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/zeppelin-solidity/-/zeppelin-solidity-1.7.0.tgz", + "integrity": "sha512-tb2GsrdbWlPoZGwhd1uAN82L3BwkH+tjtbX9a4L+3SBcfKlkn3WzcMTeYVtiTA1S1LZEGQBGsEwqLQk5w/Y8cw==", "requires": { - "dotenv": "4.0.0" + "dotenv": "4.0.0", + "ethjs-abi": "0.2.1" } } } diff --git a/package.json b/package.json index ffa73ee..f1ee335 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,9 @@ "author": "amon (hello@amon.tech)", "license": "ISC", "dependencies": { - "zeppelin-solidity": "^1.5.0" + "chai": "^4.1.2", + "chai-as-promised": "^7.1.1", + "chai-bignumber": "^2.0.2", + "zeppelin-solidity": "^1.7.0" } } diff --git a/test/AMNToken.js b/test/AMNToken.js new file mode 100644 index 0000000..44ff333 --- /dev/null +++ b/test/AMNToken.js @@ -0,0 +1,35 @@ +const BigNumber = web3.BigNumber; + +require('chai') + .use(require('chai-as-promised')) + .use(require('chai-bignumber')(BigNumber)) + .should(); + +const AMNTokenMock = artifacts.require('AMNToken'); + +contract('AMNToken', accounts => { + let amnToken = null; + + const _name = 'Amon'; + const _symbol = 'AMN'; + const _decimals = 18; + + beforeEach(async function () { + amnToken = await AMNTokenMock.new(); + }); + + it('has a name', async function () { + const name = await amnToken.name(); + name.should.be.equal(_name); + }); + + it('has a symbol', async function () { + const symbol = await amnToken.symbol(); + symbol.should.be.equal(_symbol); + }); + + it('has an amount of decimals', async function () { + const decimals = await amnToken.decimals(); + decimals.should.be.bignumber.equal(_decimals); + }); +}); From a7e3f6ebd1fa0cc017c894812caf1449b3408d24 Mon Sep 17 00:00:00 2001 From: Paco Date: Thu, 22 Feb 2018 13:07:19 +0100 Subject: [PATCH 2/4] tests ++ --- README.md | 38 +- contracts/ERC223/ERC223_BasicToken.sol | 4 +- contracts/ERC223/ERC223_Utils.sol | 4 +- test/AMNERC20Standard.js | 482 +++++++++++++++++++++++++ test/AMNToken.js | 75 +++- 5 files changed, 577 insertions(+), 26 deletions(-) create mode 100644 test/AMNERC20Standard.js diff --git a/README.md b/README.md index bef47e6..44d56fe 100644 --- a/README.md +++ b/README.md @@ -13,31 +13,31 @@ This token respects the ERC20 and ERC223 standards. ### Implemented methods -- transfer(address to, uint value[, bytes data]) *(needs `tokenFallback` method on `to` if it is a contract)* -- totalSupply() -- balanceOf(address owner) -- transferFrom(address from, address to, uint256 value[, bytes data]) *(needs `tokenFallback` method on `to` if it is a contract)* -- approve(address spender, uint256 value) -- allowance(address owner, address spender) -- increaseApproval(address spender, uint addedValue) -- decreaseApproval(address spender, uint subtractedValue) +- `transfer(address to, uint value[, bytes data])` *(needs `tokenFallback` method on `to` if it is a contract)* +- `totalSupply()` +- `balanceOf(address owner)` +- `transferFrom(address from, address to, uint256 value[, bytes data])` *(needs `tokenFallback` method on `to` if it is a contract)* +- `approve(address spender, uint256 value)` +- `allowance(address owner, address spender)` +- `increaseApproval(address spender, uint addedValue)` +- `decreaseApproval(address spender, uint subtractedValue)` ### Contract inheritances -DetailedERC20: -name, symbol, decimals +- DetailedERC20: +`name`, `symbol`, `decimals` -BasicToken -transfer, totalSupply, balanceOf +- BasicToken +`transfer`, `totalSupply`, `balanceOf` -StandardToken: -transferFrom, approve, allowance, increaseApproval, decreaseApproval, BasicToken +- StandardToken: +`transferFrom`, `approve`, `allowance`, `increaseApproval`, `decreaseApproval`, BasicToken -ERC223BasicToken: -transfer, BasicToken +- ERC223BasicToken: +`transfer`, BasicToken -ERC223StandardToken: -transferFrom, ERC223BasicToken, StandardToken +- ERC223StandardToken: +`transferFrom`, ERC223BasicToken, StandardToken -AMNToken: +- AMNToken: DetailedERC20, ERC223StandardToken diff --git a/contracts/ERC223/ERC223_BasicToken.sol b/contracts/ERC223/ERC223_BasicToken.sol index 44510e3..7b628c9 100644 --- a/contracts/ERC223/ERC223_BasicToken.sol +++ b/contracts/ERC223/ERC223_BasicToken.sol @@ -35,8 +35,8 @@ contract ERC223BasicToken is ERC223Interface, BasicToken { */ function transfer(address _to, uint _value, bytes _data) public returns (bool success) { - require(_to != address(0)); - require(_value <= balances[msg.sender]); + if((_to == address(0))) revert(); + if(_value > balances[msg.sender]) revert(); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); diff --git a/contracts/ERC223/ERC223_Utils.sol b/contracts/ERC223/ERC223_Utils.sol index 274176b..6549618 100644 --- a/contracts/ERC223/ERC223_Utils.sol +++ b/contracts/ERC223/ERC223_Utils.sol @@ -1,8 +1,8 @@ pragma solidity ^0.4.19; /** - * @title Math - * @dev Assorted math operations + * @title ERC223Utils + * @dev Detect contracts */ library ERC223Utils { diff --git a/test/AMNERC20Standard.js b/test/AMNERC20Standard.js new file mode 100644 index 0000000..0d177b3 --- /dev/null +++ b/test/AMNERC20Standard.js @@ -0,0 +1,482 @@ +const StandardTokenMock = artifacts.require('AMNToken'); +const BigNumber = web3.BigNumber; + +const _decimals = 18; +const _totalSupply = (1.6 * 10 ** 9) * (10 ** _decimals); + +const assertRevert = async promise => { + try { + await promise; + throw new Error('should have thrown') + } catch (error) { + const revertFound = error.message.search('revert') >= 0; + assert(revertFound, `Expected "revert", got ${error} instead`); + } +}; + +contract('AMNStandardToken', function ([owner, recipient, anotherAccount]) { + const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'; + + beforeEach(async function () { + this.token = await StandardTokenMock.new(); + }); + + describe('total supply', function () { + it('returns the total amount of tokens', async function () { + const totalSupply = await this.token.totalSupply(); + + assert.equal(totalSupply, _totalSupply); + }); + }); + + describe('balanceOf', function () { + describe('when the requested account has no tokens', function () { + it('returns zero', async function () { + const balance = await this.token.balanceOf(anotherAccount); + + assert.equal(balance, 0); + }); + }); + + describe('when the requested account has some tokens', function () { + it('returns the total amount of tokens', async function () { + const balance = await this.token.balanceOf(owner); + + assert.equal(balance, _totalSupply); + }); + }); + }); + + describe('transfer', function () { + describe('when the recipient is not the zero address', function () { + const to = recipient; + + describe('when the sender does not have enough balance', function () { + const amount = new BigNumber(_totalSupply).plus(100); + + it('reverts', async function () { + await assertRevert(this.token.transfer(to, amount, { from: owner })); + }); + }); + + describe('when the sender has enough balance', function () { + const amount = 100; + + it('transfers the requested amount', async function () { + await this.token.transfer(to, amount, { from: owner }); + + const senderBalance = await this.token.balanceOf(owner); + senderBalance.should.be.bignumber.equal(new BigNumber(_totalSupply).sub(amount)); + + const recipientBalance = await this.token.balanceOf(to); + recipientBalance.should.be.bignumber.equal(amount); + }); + + it('emits a transfer event', async function () { + const { logs } = await this.token.transfer(to, amount, { from: owner }); + + assert.equal(logs.length, 1); + assert.equal(logs[0].event, 'Transfer'); + assert.equal(logs[0].args.from, owner); + assert.equal(logs[0].args.to, to); + assert(logs[0].args.value.eq(amount)); + }); + }); + }); + + describe('when the recipient is the zero address', function () { + const to = ZERO_ADDRESS; + + it('reverts', async function () { + await assertRevert(this.token.transfer(to, 100, { from: owner })); + }); + }); + }); + + describe('approve', function () { + describe('when the spender is not the zero address', function () { + const spender = recipient; + + describe('when the sender has enough balance', function () { + const amount = 100; + + it('emits an approval event', async function () { + const { logs } = await this.token.approve(spender, amount, { from: owner }); + + assert.equal(logs.length, 1); + assert.equal(logs[0].event, 'Approval'); + assert.equal(logs[0].args.owner, owner); + assert.equal(logs[0].args.spender, spender); + assert(logs[0].args.value.eq(amount)); + }); + + describe('when there was no approved amount before', function () { + it('approves the requested amount', async function () { + await this.token.approve(spender, amount, { from: owner }); + + const allowance = await this.token.allowance(owner, spender); + assert.equal(allowance, amount); + }); + }); + + describe('when the spender had an approved amount', function () { + beforeEach(async function () { + await this.token.approve(spender, 1, { from: owner }); + }); + + it('approves the requested amount and replaces the previous one', async function () { + await this.token.approve(spender, amount, { from: owner }); + + const allowance = await this.token.allowance(owner, spender); + assert.equal(allowance, amount); + }); + }); + }); + + describe('when the sender does not have enough balance', function () { + const amount = 101; + + it('emits an approval event', async function () { + const { logs } = await this.token.approve(spender, amount, { from: owner }); + + assert.equal(logs.length, 1); + assert.equal(logs[0].event, 'Approval'); + assert.equal(logs[0].args.owner, owner); + assert.equal(logs[0].args.spender, spender); + assert(logs[0].args.value.eq(amount)); + }); + + describe('when there was no approved amount before', function () { + it('approves the requested amount', async function () { + await this.token.approve(spender, amount, { from: owner }); + + const allowance = await this.token.allowance(owner, spender); + assert.equal(allowance, amount); + }); + }); + + describe('when the spender had an approved amount', function () { + beforeEach(async function () { + await this.token.approve(spender, 1, { from: owner }); + }); + + it('approves the requested amount and replaces the previous one', async function () { + await this.token.approve(spender, amount, { from: owner }); + + const allowance = await this.token.allowance(owner, spender); + assert.equal(allowance, amount); + }); + }); + }); + }); + + describe('when the spender is the zero address', function () { + const amount = 100; + const spender = ZERO_ADDRESS; + + it('approves the requested amount', async function () { + await this.token.approve(spender, amount, { from: owner }); + + const allowance = await this.token.allowance(owner, spender); + assert.equal(allowance, amount); + }); + + it('emits an approval event', async function () { + const { logs } = await this.token.approve(spender, amount, { from: owner }); + + assert.equal(logs.length, 1); + assert.equal(logs[0].event, 'Approval'); + assert.equal(logs[0].args.owner, owner); + assert.equal(logs[0].args.spender, spender); + assert(logs[0].args.value.eq(amount)); + }); + }); + }); + + describe('transfer from', function () { + const spender = recipient; + + describe('when the recipient is not the zero address', function () { + const to = anotherAccount; + + describe('when the spender has enough approved balance', function () { + beforeEach(async function () { + await this.token.approve(spender, 100, { from: owner }); + }); + + describe('when the owner has enough balance', function () { + const amount = 100; + + it('transfers the requested amount', async function () { + await this.token.transferFrom(owner, to, amount, { from: spender }); + + const senderBalance = await this.token.balanceOf(owner); + senderBalance.should.be.bignumber.equal(new BigNumber(_totalSupply).sub(amount)); + + const recipientBalance = await this.token.balanceOf(to); + assert.equal(recipientBalance, amount); + }); + + it('decreases the spender allowance', async function () { + await this.token.transferFrom(owner, to, amount, { from: spender }); + + const allowance = await this.token.allowance(owner, spender); + assert(allowance.eq(0)); + }); + + it('emits a transfer event', async function () { + const { logs } = await this.token.transferFrom(owner, to, amount, { from: spender }); + + assert.equal(logs.length, 1); + assert.equal(logs[0].event, 'Transfer'); + assert.equal(logs[0].args.from, owner); + assert.equal(logs[0].args.to, to); + assert(logs[0].args.value.eq(amount)); + }); + }); + + describe('when the owner does not have enough balance', function () { + const amount = 101; + + it('reverts', async function () { + await assertRevert(this.token.transferFrom(owner, to, amount, { from: spender })); + }); + }); + }); + + describe('when the spender does not have enough approved balance', function () { + beforeEach(async function () { + await this.token.approve(spender, 99, { from: owner }); + }); + + describe('when the owner has enough balance', function () { + const amount = 100; + + it('reverts', async function () { + await assertRevert(this.token.transferFrom(owner, to, amount, { from: spender })); + }); + }); + + describe('when the owner does not have enough balance', function () { + const amount = 101; + + it('reverts', async function () { + await assertRevert(this.token.transferFrom(owner, to, amount, { from: spender })); + }); + }); + }); + }); + + describe('when the recipient is the zero address', function () { + const amount = 100; + const to = ZERO_ADDRESS; + + beforeEach(async function () { + await this.token.approve(spender, amount, { from: owner }); + }); + + it('reverts', async function () { + await assertRevert(this.token.transferFrom(owner, to, amount, { from: spender })); + }); + }); + }); + + describe('decrease approval', function () { + describe('when the spender is not the zero address', function () { + const spender = recipient; + + describe('when the sender has enough balance', function () { + const amount = 100; + + it('emits an approval event', async function () { + const { logs } = await this.token.decreaseApproval(spender, amount, { from: owner }); + + assert.equal(logs.length, 1); + assert.equal(logs[0].event, 'Approval'); + assert.equal(logs[0].args.owner, owner); + assert.equal(logs[0].args.spender, spender); + assert(logs[0].args.value.eq(0)); + }); + + describe('when there was no approved amount before', function () { + it('keeps the allowance to zero', async function () { + await this.token.decreaseApproval(spender, amount, { from: owner }); + + const allowance = await this.token.allowance(owner, spender); + assert.equal(allowance, 0); + }); + }); + + describe('when the spender had an approved amount', function () { + beforeEach(async function () { + await this.token.approve(spender, amount + 1, { from: owner }); + }); + + it('decreases the spender allowance subtracting the requested amount', async function () { + await this.token.decreaseApproval(spender, amount, { from: owner }); + + const allowance = await this.token.allowance(owner, spender); + assert.equal(allowance, 1); + }); + }); + }); + + describe('when the sender does not have enough balance', function () { + const amount = 101; + + it('emits an approval event', async function () { + const { logs } = await this.token.decreaseApproval(spender, amount, { from: owner }); + + assert.equal(logs.length, 1); + assert.equal(logs[0].event, 'Approval'); + assert.equal(logs[0].args.owner, owner); + assert.equal(logs[0].args.spender, spender); + assert(logs[0].args.value.eq(0)); + }); + + describe('when there was no approved amount before', function () { + it('keeps the allowance to zero', async function () { + await this.token.decreaseApproval(spender, amount, { from: owner }); + + const allowance = await this.token.allowance(owner, spender); + assert.equal(allowance, 0); + }); + }); + + describe('when the spender had an approved amount', function () { + beforeEach(async function () { + await this.token.approve(spender, amount + 1, { from: owner }); + }); + + it('decreases the spender allowance subtracting the requested amount', async function () { + await this.token.decreaseApproval(spender, amount, { from: owner }); + + const allowance = await this.token.allowance(owner, spender); + assert.equal(allowance, 1); + }); + }); + }); + }); + + describe('when the spender is the zero address', function () { + const amount = 100; + const spender = ZERO_ADDRESS; + + it('decreases the requested amount', async function () { + await this.token.decreaseApproval(spender, amount, { from: owner }); + + const allowance = await this.token.allowance(owner, spender); + assert.equal(allowance, 0); + }); + + it('emits an approval event', async function () { + const { logs } = await this.token.decreaseApproval(spender, amount, { from: owner }); + + assert.equal(logs.length, 1); + assert.equal(logs[0].event, 'Approval'); + assert.equal(logs[0].args.owner, owner); + assert.equal(logs[0].args.spender, spender); + assert(logs[0].args.value.eq(0)); + }); + }); + }); + + describe('increase approval', function () { + const amount = 100; + + describe('when the spender is not the zero address', function () { + const spender = recipient; + + describe('when the sender has enough balance', function () { + it('emits an approval event', async function () { + const { logs } = await this.token.increaseApproval(spender, amount, { from: owner }); + + assert.equal(logs.length, 1); + assert.equal(logs[0].event, 'Approval'); + assert.equal(logs[0].args.owner, owner); + assert.equal(logs[0].args.spender, spender); + assert(logs[0].args.value.eq(amount)); + }); + + describe('when there was no approved amount before', function () { + it('approves the requested amount', async function () { + await this.token.increaseApproval(spender, amount, { from: owner }); + + const allowance = await this.token.allowance(owner, spender); + assert.equal(allowance, amount); + }); + }); + + describe('when the spender had an approved amount', function () { + beforeEach(async function () { + await this.token.approve(spender, 1, { from: owner }); + }); + + it('increases the spender allowance adding the requested amount', async function () { + await this.token.increaseApproval(spender, amount, { from: owner }); + + const allowance = await this.token.allowance(owner, spender); + assert.equal(allowance, amount + 1); + }); + }); + }); + + describe('when the sender does not have enough balance', function () { + const amount = 101; + + it('emits an approval event', async function () { + const { logs } = await this.token.increaseApproval(spender, amount, { from: owner }); + + assert.equal(logs.length, 1); + assert.equal(logs[0].event, 'Approval'); + assert.equal(logs[0].args.owner, owner); + assert.equal(logs[0].args.spender, spender); + assert(logs[0].args.value.eq(amount)); + }); + + describe('when there was no approved amount before', function () { + it('approves the requested amount', async function () { + await this.token.increaseApproval(spender, amount, { from: owner }); + + const allowance = await this.token.allowance(owner, spender); + assert.equal(allowance, amount); + }); + }); + + describe('when the spender had an approved amount', function () { + beforeEach(async function () { + await this.token.approve(spender, 1, { from: owner }); + }); + + it('increases the spender allowance adding the requested amount', async function () { + await this.token.increaseApproval(spender, amount, { from: owner }); + + const allowance = await this.token.allowance(owner, spender); + assert.equal(allowance, amount + 1); + }); + }); + }); + }); + + describe('when the spender is the zero address', function () { + const spender = ZERO_ADDRESS; + + it('approves the requested amount', async function () { + await this.token.increaseApproval(spender, amount, { from: owner }); + + const allowance = await this.token.allowance(owner, spender); + assert.equal(allowance, amount); + }); + + it('emits an approval event', async function () { + const { logs } = await this.token.increaseApproval(spender, amount, { from: owner }); + + assert.equal(logs.length, 1); + assert.equal(logs[0].event, 'Approval'); + assert.equal(logs[0].args.owner, owner); + assert.equal(logs[0].args.spender, spender); + assert(logs[0].args.value.eq(amount)); + }); + }); + }); +}); diff --git a/test/AMNToken.js b/test/AMNToken.js index 44ff333..3ade01b 100644 --- a/test/AMNToken.js +++ b/test/AMNToken.js @@ -5,17 +5,21 @@ require('chai') .use(require('chai-bignumber')(BigNumber)) .should(); -const AMNTokenMock = artifacts.require('AMNToken'); +const AMNToken = artifacts.require('AMNToken'); +const ERC223ReceivingContract = artifacts.require('ERC223ReceivingContract'); -contract('AMNToken', accounts => { +contract('AMNToken', ([owner, account1, account2]) => { let amnToken = null; + let receivingContract = null; const _name = 'Amon'; const _symbol = 'AMN'; const _decimals = 18; + const _totalSupply = (1.6 * 10 ** 9) * (10 ** _decimals); beforeEach(async function () { - amnToken = await AMNTokenMock.new(); + amnToken = await AMNToken.new(); + receivingContract = await ERC223ReceivingContract.new(); }); it('has a name', async function () { @@ -32,4 +36,69 @@ contract('AMNToken', accounts => { const decimals = await amnToken.decimals(); decimals.should.be.bignumber.equal(_decimals); }); + + it('has a total supply', async function () { + const totalSupply = await amnToken.totalSupply(); + totalSupply.should.be.bignumber.equal(_totalSupply); + }); + + it('total given to owner', async function () { + const ownerBalance = await amnToken.balanceOf(owner); + ownerBalance.should.be.bignumber.equal(_totalSupply); + }); + + it('transfer', async function () { + const amount = 100; + let account1Balance = await amnToken.balanceOf(account1); + account1Balance.should.be.bignumber.equal(0); + + const { logs } = await amnToken.transfer(account1, amount, { from: owner }); + + account1Balance = await amnToken.balanceOf(account1); + account1Balance.should.be.bignumber.equal(amount); + const ownerBalance = await amnToken.balanceOf(owner); + ownerBalance.should.be.bignumber.equal(new BigNumber(_totalSupply).sub(amount)); + + assert.equal(logs.length, 1); + assert.equal(logs[0].event, 'Transfer'); + assert.equal(logs[0].args.from, owner); + assert.equal(logs[0].args.to, account1); + assert(logs[0].args.value.eq(amount)); + }); + + it('transfer to contract', function (done) { + + (async () => { + + const amount = 100; + let receivingContractBalance = await amnToken.balanceOf(receivingContract.address); + receivingContractBalance.should.be.bignumber.equal(0); + + const { logs } = await amnToken.transfer(receivingContract.address, amount, { from: owner }); + + receivingContractBalance = await amnToken.balanceOf(receivingContract.address); + receivingContractBalance.should.be.bignumber.equal(amount); + + assert.equal(logs.length, 1); + assert.equal(logs[0].event, 'Transfer'); + assert.equal(logs[0].args.from, owner); + assert.equal(logs[0].args.to, receivingContract.address); + assert(logs[0].args.value.eq(amount)); + + const events = receivingContract.TokenDeposit(null, (error, event) => { + + assert.equal(event.event, 'TokenDeposit'); + assert.equal(event.args.sender, owner); + assert.equal(event.args.token, amnToken.address); + assert.equal(event.args.data, undefined); + event.args.value.should.be.bignumber.equal(amount); + + events.stopWatching(); + done(); + }); + + })().catch(done); + + }); + }); From 28f90117218240a23fdcf8b1878160153eb25f21 Mon Sep 17 00:00:00 2001 From: Paco Date: Thu, 22 Feb 2018 17:41:56 +0100 Subject: [PATCH 3/4] test fail to send to non compatible contract --- .gitignore | 3 +- build/contracts/AMNToken.json | 1164 +++++ build/contracts/BasicToken.json | 1439 +++++++ build/contracts/DetailedERC20.json | 696 +++ build/contracts/ERC20.json | 745 ++++ build/contracts/ERC20Basic.json | 514 +++ build/contracts/ERC223BasicToken.json | 1969 +++++++++ build/contracts/ERC223Interface.json | 503 +++ build/contracts/ERC223ReceivingContract.json | 560 +++ build/contracts/ERC223ReceivingInterface.json | 209 + build/contracts/ERC223StandardToken.json | 2426 +++++++++++ build/contracts/ERC223Utils.json | 333 ++ build/contracts/EmptyContract.json | 129 + build/contracts/Migrations.json | 827 ++++ build/contracts/SafeMath.json | 1347 ++++++ build/contracts/StandardToken.json | 3736 +++++++++++++++++ contracts/EmptyContract.sol | 8 + migrations/2_deploy_contracts.js | 7 +- package-lock.json | 2064 ++++++++- package.json | 2 + test/AMNToken.js | 20 + truffle.js | 19 + 22 files changed, 18689 insertions(+), 31 deletions(-) create mode 100644 build/contracts/AMNToken.json create mode 100644 build/contracts/BasicToken.json create mode 100644 build/contracts/DetailedERC20.json create mode 100644 build/contracts/ERC20.json create mode 100644 build/contracts/ERC20Basic.json create mode 100644 build/contracts/ERC223BasicToken.json create mode 100644 build/contracts/ERC223Interface.json create mode 100644 build/contracts/ERC223ReceivingContract.json create mode 100644 build/contracts/ERC223ReceivingInterface.json create mode 100644 build/contracts/ERC223StandardToken.json create mode 100644 build/contracts/ERC223Utils.json create mode 100644 build/contracts/EmptyContract.json create mode 100644 build/contracts/Migrations.json create mode 100644 build/contracts/SafeMath.json create mode 100644 build/contracts/StandardToken.json create mode 100644 contracts/EmptyContract.sol diff --git a/.gitignore b/.gitignore index b3bcdf2..2ec1f9d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ -build node_modules .DS_Store package-lock.json +.env +.idea \ No newline at end of file diff --git a/build/contracts/AMNToken.json b/build/contracts/AMNToken.json new file mode 100644 index 0000000..e20aa99 --- /dev/null +++ b/build/contracts/AMNToken.json @@ -0,0 +1,1164 @@ +{ + "contractName": "AMNToken", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseApproval", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + }, + { + "name": "_data", + "type": "bytes" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + }, + { + "name": "_data", + "type": "bytes" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_addedValue", + "type": "uint256" + } + ], + "name": "increaseApproval", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "payable": false, + "stateMutability": "nonpayable", + "type": "fallback" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "name": "_to", + "type": "address" + }, + { + "indexed": true, + "name": "_value", + "type": "uint256" + }, + { + "indexed": false, + "name": "_data", + "type": "bytes" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + } + ], + "bytecode": "0x6060604052341561000f57600080fd5b604080519081016040908152600482527f416d6f6e0000000000000000000000000000000000000000000000000000000060208301528051908101604052600381527f414d4e000000000000000000000000000000000000000000000000000000000060208201526012600083805161008c9291602001906100e7565b5060018280516100a09291602001906100e7565b506002805460ff191660ff9290921691909117905550506b052b7d2dcc80cd2e40000000600481905533600160a060020a0316600090815260036020526040902055610182565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061012857805160ff1916838001178555610155565b82800160010185558215610155579182015b8281111561015557825182559160200191906001019061013a565b50610161929150610165565b5090565b61017f91905b80821115610161576000815560010161016b565b90565b610ced806101916000396000f3006060604052600436106100ab5763ffffffff60e060020a60003504166306fdde0381146100bb578063095ea7b31461014557806318160ddd1461017b57806323b872dd146101a0578063313ce567146101c857806366188463146101f157806370a082311461021357806395d89b4114610232578063a9059cbb14610245578063ab67aa5814610267578063be45fd62146102d3578063d73dd62314610338578063dd62ed3e1461035a575b34156100b657600080fd5b600080fd5b34156100c657600080fd5b6100ce61037f565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561010a5780820151838201526020016100f2565b50505050905090810190601f1680156101375780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015057600080fd5b610167600160a060020a036004351660243561041d565b604051901515815260200160405180910390f35b341561018657600080fd5b61018e610489565b60405190815260200160405180910390f35b34156101ab57600080fd5b610167600160a060020a036004358116906024351660443561048f565b34156101d357600080fd5b6101db6104ae565b60405160ff909116815260200160405180910390f35b34156101fc57600080fd5b610167600160a060020a03600435166024356104b7565b341561021e57600080fd5b61018e600160a060020a03600435166105b1565b341561023d57600080fd5b6100ce6105cc565b341561025057600080fd5b610167600160a060020a0360043516602435610637565b341561027257600080fd5b610167600160a060020a036004803582169160248035909116916044359160849060643590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061065495505050505050565b34156102de57600080fd5b61016760048035600160a060020a03169060248035919060649060443590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061094c95505050505050565b341561034357600080fd5b610167600160a060020a0360043516602435610bb8565b341561036557600080fd5b61018e600160a060020a0360043581169060243516610c5c565b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104155780601f106103ea57610100808354040283529160200191610415565b820191906000526020600020905b8154815290600101906020018083116103f857829003601f168201915b505050505081565b600160a060020a03338116600081815260056020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60045490565b6000610499610caf565b6104a585858584610654565b95945050505050565b60025460ff1681565b600160a060020a0333811660009081526005602090815260408083209386168352929052908120548083111561051457600160a060020a03338116600090815260056020908152604080832093881683529290529081205561054b565b610524818463ffffffff610c8716565b600160a060020a033381166000908152600560209081526040808320938916835292905220555b600160a060020a0333811660008181526005602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526003602052604090205490565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104155780601f106103ea57610100808354040283529160200191610415565b6000610641610caf565b61064c84848361094c565b949350505050565b600080600160a060020a038516151561066c57600080fd5b600160a060020a03861660009081526003602052604090205484111561069157600080fd5b600160a060020a03808716600090815260056020908152604080832033909416835292905220548411156106c457600080fd5b600160a060020a0386166000908152600360205260409020546106ed908563ffffffff610c8716565b600160a060020a038088166000908152600360205260408082209390935590871681522054610722908563ffffffff610c9916565b600160a060020a0380871660009081526003602090815260408083209490945589831682526005815283822033909316825291909152205461076a908563ffffffff610c8716565b600160a060020a0380881660009081526005602090815260408083203390941683529290528181209290925573__ERC223Utils___________________________91631627905591889190516020015260405160e060020a63ffffffff8416028152600160a060020a03909116600482015260240160206040518083038186803b15156107f657600080fd5b6102c65a03f4151561080757600080fd5b50505060405180519050156108f9575083600160a060020a03811663c0ee0b8a8786866040518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561089757808201518382015260200161087f565b50505050905090810190601f1680156108c45780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15156108e457600080fd5b6102c65a03f115156108f557600080fd5b5050505b84600160a060020a031686600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8660405190815260200160405180910390a350600195945050505050565b600080600160a060020a038516151561096457600080fd5b600160a060020a03331660009081526003602052604090205484111561098957600080fd5b600160a060020a0333166000908152600360205260409020546109b2908563ffffffff610c8716565b600160a060020a0333811660009081526003602052604080822093909355908716815220546109e7908563ffffffff610c9916565b600160a060020a0386166000908152600360205260408082209290925573__ERC223Utils___________________________916316279055918891516020015260405160e060020a63ffffffff8416028152600160a060020a03909116600482015260240160206040518083038186803b1515610a6357600080fd5b6102c65a03f41515610a7457600080fd5b5050506040518051905015610b66575083600160a060020a03811663c0ee0b8a3386866040518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610b04578082015183820152602001610aec565b50505050905090810190601f168015610b315780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1515610b5157600080fd5b6102c65a03f11515610b6257600080fd5b5050505b84600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8660405190815260200160405180910390a3506001949350505050565b600160a060020a033381166000908152600560209081526040808320938616835292905290812054610bf0908363ffffffff610c9916565b600160a060020a0333811660008181526005602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205490565b600082821115610c9357fe5b50900390565b600082820183811015610ca857fe5b9392505050565b602060405190810160405260008152905600a165627a7a723058207d082e8592e1229bddad9260bb41160d4727129189c7d8b486991f2dfea2064a0029", + "deployedBytecode": "0x6060604052600436106100ab5763ffffffff60e060020a60003504166306fdde0381146100bb578063095ea7b31461014557806318160ddd1461017b57806323b872dd146101a0578063313ce567146101c857806366188463146101f157806370a082311461021357806395d89b4114610232578063a9059cbb14610245578063ab67aa5814610267578063be45fd62146102d3578063d73dd62314610338578063dd62ed3e1461035a575b34156100b657600080fd5b600080fd5b34156100c657600080fd5b6100ce61037f565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561010a5780820151838201526020016100f2565b50505050905090810190601f1680156101375780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015057600080fd5b610167600160a060020a036004351660243561041d565b604051901515815260200160405180910390f35b341561018657600080fd5b61018e610489565b60405190815260200160405180910390f35b34156101ab57600080fd5b610167600160a060020a036004358116906024351660443561048f565b34156101d357600080fd5b6101db6104ae565b60405160ff909116815260200160405180910390f35b34156101fc57600080fd5b610167600160a060020a03600435166024356104b7565b341561021e57600080fd5b61018e600160a060020a03600435166105b1565b341561023d57600080fd5b6100ce6105cc565b341561025057600080fd5b610167600160a060020a0360043516602435610637565b341561027257600080fd5b610167600160a060020a036004803582169160248035909116916044359160849060643590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061065495505050505050565b34156102de57600080fd5b61016760048035600160a060020a03169060248035919060649060443590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061094c95505050505050565b341561034357600080fd5b610167600160a060020a0360043516602435610bb8565b341561036557600080fd5b61018e600160a060020a0360043581169060243516610c5c565b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104155780601f106103ea57610100808354040283529160200191610415565b820191906000526020600020905b8154815290600101906020018083116103f857829003601f168201915b505050505081565b600160a060020a03338116600081815260056020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60045490565b6000610499610caf565b6104a585858584610654565b95945050505050565b60025460ff1681565b600160a060020a0333811660009081526005602090815260408083209386168352929052908120548083111561051457600160a060020a03338116600090815260056020908152604080832093881683529290529081205561054b565b610524818463ffffffff610c8716565b600160a060020a033381166000908152600560209081526040808320938916835292905220555b600160a060020a0333811660008181526005602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526003602052604090205490565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104155780601f106103ea57610100808354040283529160200191610415565b6000610641610caf565b61064c84848361094c565b949350505050565b600080600160a060020a038516151561066c57600080fd5b600160a060020a03861660009081526003602052604090205484111561069157600080fd5b600160a060020a03808716600090815260056020908152604080832033909416835292905220548411156106c457600080fd5b600160a060020a0386166000908152600360205260409020546106ed908563ffffffff610c8716565b600160a060020a038088166000908152600360205260408082209390935590871681522054610722908563ffffffff610c9916565b600160a060020a0380871660009081526003602090815260408083209490945589831682526005815283822033909316825291909152205461076a908563ffffffff610c8716565b600160a060020a0380881660009081526005602090815260408083203390941683529290528181209290925573__ERC223Utils___________________________91631627905591889190516020015260405160e060020a63ffffffff8416028152600160a060020a03909116600482015260240160206040518083038186803b15156107f657600080fd5b6102c65a03f4151561080757600080fd5b50505060405180519050156108f9575083600160a060020a03811663c0ee0b8a8786866040518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561089757808201518382015260200161087f565b50505050905090810190601f1680156108c45780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15156108e457600080fd5b6102c65a03f115156108f557600080fd5b5050505b84600160a060020a031686600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8660405190815260200160405180910390a350600195945050505050565b600080600160a060020a038516151561096457600080fd5b600160a060020a03331660009081526003602052604090205484111561098957600080fd5b600160a060020a0333166000908152600360205260409020546109b2908563ffffffff610c8716565b600160a060020a0333811660009081526003602052604080822093909355908716815220546109e7908563ffffffff610c9916565b600160a060020a0386166000908152600360205260408082209290925573__ERC223Utils___________________________916316279055918891516020015260405160e060020a63ffffffff8416028152600160a060020a03909116600482015260240160206040518083038186803b1515610a6357600080fd5b6102c65a03f41515610a7457600080fd5b5050506040518051905015610b66575083600160a060020a03811663c0ee0b8a3386866040518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610b04578082015183820152602001610aec565b50505050905090810190601f168015610b315780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1515610b5157600080fd5b6102c65a03f11515610b6257600080fd5b5050505b84600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8660405190815260200160405180910390a3506001949350505050565b600160a060020a033381166000908152600560209081526040808320938616835292905290812054610bf0908363ffffffff610c9916565b600160a060020a0333811660008181526005602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205490565b600082821115610c9357fe5b50900390565b600082820183811015610ca857fe5b9392505050565b602060405190810160405260008152905600a165627a7a723058207d082e8592e1229bddad9260bb41160d4727129189c7d8b486991f2dfea2064a0029", + "sourceMap": "139:510:0:-;;;473:174;;;;;;;;515:4;;;;;;;;;;;;;;;;;;;521:6;;;;;;;;;;;;;;302:2;-1:-1:-1;248:5:10;;241:12;;;;;;;;:::i;:::-;-1:-1:-1;259:6:10;268:7;;259:16;;;;;;;;:::i;:::-;-1:-1:-1;281:8:10;:20;;-1:-1:-1;;281:20:10;;;;;;;;;;;;-1:-1:-1;;344:43:0;566:12;:29;;;612:10;-1:-1:-1;;;;;603:20:0;-1:-1:-1;603:20:0;;;:8;:20;;;;;:37;139:510;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;139:510:0;;;-1:-1:-1;139:510:0;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", + "deployedSourceMap": "139:510:0:-;;;;;;;;;-1:-1:-1;;;139:510:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;433:8:1;;;86:18:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:2;8:100;;;99:1;94:3;90;84:5;71:3;;;64:6;52:2;45:3;8:100;;;12:14;3:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1798:183:13;;;;;;;;;;-1:-1:-1;;;;;1798:183:13;;;;;;;;;;;;;;;;;;;;;;;;371:83:9;;;;;;;;;;;;;;;;;;;;;;;;;;;492:185:5;;;;;;;;;;-1:-1:-1;;;;;492:185:5;;;;;;;;;;;;132:21:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3602:398:13;;;;;;;;;;-1:-1:-1;;;;;3602:398:13;;;;;;;1189:107:9;;;;;;;;;;-1:-1:-1;;;;;1189:107:9;;;;;108:20:10;;;;;;;;;;;;584:152:1;;;;;;;;;;-1:-1:-1;;;;;584:152:1;;;;;;;1035:649:5;;;;;;;;;;-1:-1:-1;;;;;1035:649:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1035:649:5;;-1:-1:-1;1035:649:5;;-1:-1:-1;;;;;;1035:649:5;1015:541:1;;;;;;;;;;;;;-1:-1:-1;;;;;1015:541:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1015:541:1;;-1:-1:-1;1015:541:1;;-1:-1:-1;;;;;;1015:541:1;2883:257:13;;;;;;;;;;-1:-1:-1;;;;;2883:257:13;;;;;;;2300:126;;;;;;;;;;-1:-1:-1;;;;;2300:126:13;;;;;;;;;;86:18:10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1798:183:13:-;-1:-1:-1;;;;;1885:10:13;1877:19;;1865:4;1877:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;;:38;;;1865:4;;1877:29;:19;1921:38;;1909:6;;1921:38;;;;;;;;;;;;;-1:-1:-1;1972:4:13;1798:183;;;;:::o;371:83:9:-;437:12;;371:83;:::o;492:185:5:-;574:12;597:18;;:::i;:::-;630:39;643:5;650:3;655:6;663:5;630:12;:39::i;:::-;623:46;492:185;-1:-1:-1;;;;;492:185:5:o;132:21:10:-;;;;;;:::o;3602:398:13:-;-1:-1:-1;;;;;3721:10:13;3713:19;;3685:4;3713:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;3752:27;;;3748:164;;;-1:-1:-1;;;;;3797:10:13;3789:19;;3821:1;3789:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;:33;3748:164;;;3875:30;:8;3888:16;3875:30;:12;:30;:::i;:::-;-1:-1:-1;;;;;3851:10:13;3843:19;;;;;;:7;:19;;;;;;;;:29;;;;;;;;;:62;3748:164;-1:-1:-1;;;;;3926:10:13;3917:61;;3948:19;;;;:7;:19;;;;;;;;3917:61;;;3948:29;;;;;;;;;;;;3917:61;;;;;;;;;;;;;;;-1:-1:-1;3991:4:13;;3602:398;-1:-1:-1;;;3602:398:13:o;1189:107:9:-;-1:-1:-1;;;;;1275:16:9;1245:15;1275:16;;;:8;:16;;;;;;;1189:107::o;108:20:10:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;584:152:1;644:12;667:18;;:::i;:::-;700:28;709:3;714:6;722:5;700:8;:28::i;:::-;693:35;584:152;-1:-1:-1;;;;584:152:1:o;1035:649:5:-;1130:4;;-1:-1:-1;;;;;1152:17:5;;;;1144:26;;;;;;-1:-1:-1;;;;;1196:15:5;;;;;;:8;:15;;;;;;1186:25;;;1178:34;;;;;;-1:-1:-1;;;;;1238:14:5;;;;;;;:7;:14;;;;;;;;1253:10;1238:26;;;;;;;;;;1228:36;;;1220:45;;;;;;-1:-1:-1;;;;;1292:15:5;;;;;;:8;:15;;;;;;:27;;1312:6;1292:27;:19;:27;:::i;:::-;-1:-1:-1;;;;;1274:15:5;;;;;;;:8;:15;;;;;;:45;;;;1343:13;;;;;;;:25;;1361:6;1343:25;:17;:25;:::i;:::-;-1:-1:-1;;;;;1327:13:5;;;;;;;:8;:13;;;;;;;;:41;;;;1405:14;;;;;:7;:14;;;;;1420:10;1405:26;;;;;;;;;;;:38;;1436:6;1405:38;:30;:38;:::i;:::-;-1:-1:-1;;;;;1376:14:5;;;;;;;:7;:14;;;;;;;;1391:10;1376:26;;;;;;;;;;;:67;;;;1455:11;;:22;;1478:3;;1376:14;1455:27;;;;;;-1:-1:-1;;;1455:27:5;;;;;;-1:-1:-1;;;;;1455:27:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1452:170;;;-1:-1:-1;1555:3:5;-1:-1:-1;;;;;1569:22:5;;;1592:5;1599:6;1607:5;1569:44;;;;;-1:-1:-1;;;1569:44:5;;;;;;;-1:-1:-1;;;;;1569:44:5;-1:-1:-1;;;;;1569:44:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:2;8:100;;;99:1;94:3;90;84:5;71:3;;;64:6;52:2;45:3;8:100;;;12:14;3:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1452:170:5;1646:3;-1:-1:-1;;;;;1630:28:5;1639:5;-1:-1:-1;;;;;1630:28:5;;1651:6;1630:28;;;;;;;;;;;;;;-1:-1:-1;1673:4:5;;1035:649;-1:-1:-1;;;;;1035:649:5:o;1015:541:1:-;1088:12;;-1:-1:-1;;;;;1115:17:1;;;1111:32;;;1135:8;;;1111:32;-1:-1:-1;;;;;1172:10:1;1163:20;;;;;:8;:20;;;;;;1154:29;;1151:42;;;1185:8;;;1151:42;-1:-1:-1;;;;;1234:10:1;1225:20;;;;;:8;:20;;;;;;:32;;1250:6;1225:32;:24;:32;:::i;:::-;-1:-1:-1;;;;;1211:10:1;1202:20;;;;;;:8;:20;;;;;;:55;;;;1281:13;;;;;;;:25;;1299:6;1281:25;:17;:25;:::i;:::-;-1:-1:-1;;;;;1265:13:1;;;;;;:8;:13;;;;;;:41;;;;1318:11;;:22;;1274:3;;1318:27;;;;;;-1:-1:-1;;;1318:27:1;;;;;;-1:-1:-1;;;;;1318:27:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1315:175;;;-1:-1:-1;1418:3:1;-1:-1:-1;;;;;1432:22:1;;;1455:10;1467:6;1475:5;1432:49;;;;;-1:-1:-1;;;1432:49:1;;;;;;;-1:-1:-1;;;;;1432:49:1;-1:-1:-1;;;;;1432:49:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:2;8:100;;;99:1;94:3;90;84:5;71:3;;;64:6;52:2;45:3;8:100;;;12:14;3:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1315:175:1;1519:3;-1:-1:-1;;;;;1498:33:1;1507:10;-1:-1:-1;;;;;1498:33:1;;1524:6;1498:33;;;;;;;;;;;;;;-1:-1:-1;1546:4:1;;1015:541;-1:-1:-1;;;;1015:541:1:o;2883:257:13:-;-1:-1:-1;;;;;3013:10:13;3005:19;;2961:4;3005:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;:46;;3039:11;3005:46;:33;:46;:::i;:::-;-1:-1:-1;;;;;2981:10:13;2973:19;;;;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;;;:78;;;:29;;:19;;3057:61;;2973:78;3057:61;;;;;;;;;;;;;-1:-1:-1;3131:4:13;2883:257;;;;:::o;2300:126::-;-1:-1:-1;;;;;2396:15:13;;;2374:7;2396:15;;;:7;:15;;;;;;;;:25;;;;;;;;;;;;;2300:126::o;836:110:8:-;894:7;916:6;;;;909:14;;;;-1:-1:-1;936:5:8;;;836:110::o;1008:129::-;1066:7;1093:5;;;1111:6;;;;1104:14;;;;1131:1;1008:129;-1:-1:-1;;;1008:129:8:o;139:510:0:-;;;;;;;;;;;;;:::o", + "source": "pragma solidity ^0.4.19;\n\nimport \"zeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol\";\nimport './ERC223/ERC223_StandardToken.sol';\n\ncontract AMNToken is DetailedERC20, ERC223StandardToken {\n string constant NAME = \"Amon\";\n string constant SYMBOL = \"AMN\";\n uint8 constant DECIMALS = 18;\n uint256 constant INITIAL_SUPPLY = (1.6 * 10 ** 9) * (uint256(10) ** DECIMALS);\n\n /**\n *@dev Constructor that set the token initial parameters\n */\n function AMNToken()\n DetailedERC20(NAME, SYMBOL, DECIMALS)\n public\n {\n totalSupply_ = INITIAL_SUPPLY;\n balances[msg.sender] = INITIAL_SUPPLY;\n }\n}\n", + "sourcePath": "/Users/paco/Development/amon/token-contract/contracts/AMNToken.sol", + "ast": { + "attributes": { + "absolutePath": "/Users/paco/Development/amon/token-contract/contracts/AMNToken.sol", + "exportedSymbols": { + "AMNToken": [ + 52 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.4", + ".19" + ] + }, + "id": 1, + "name": "PragmaDirective", + "src": "0:24:0" + }, + { + "attributes": { + "SourceUnit": 702, + "absolutePath": "zeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol", + "file": "zeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol", + "scope": 53, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 2, + "name": "ImportDirective", + "src": "26:67:0" + }, + { + "attributes": { + "SourceUnit": 397, + "absolutePath": "/Users/paco/Development/amon/token-contract/contracts/ERC223/ERC223_StandardToken.sol", + "file": "./ERC223/ERC223_StandardToken.sol", + "scope": 53, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 3, + "name": "ImportDirective", + "src": "94:43:0" + }, + { + "attributes": { + "contractDependencies": [ + 178, + 205, + 396, + 667, + 701, + 744, + 776, + 1022 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 52, + 396, + 1022, + 178, + 667, + 701, + 744, + 205, + 776 + ], + "name": "AMNToken", + "scope": 53 + }, + "children": [ + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "DetailedERC20", + "referencedDeclaration": 701, + "type": "contract DetailedERC20" + }, + "id": 4, + "name": "UserDefinedTypeName", + "src": "160:13:0" + } + ], + "id": 5, + "name": "InheritanceSpecifier", + "src": "160:13:0" + }, + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "ERC223StandardToken", + "referencedDeclaration": 396, + "type": "contract ERC223StandardToken" + }, + "id": 6, + "name": "UserDefinedTypeName", + "src": "175:19:0" + } + ], + "id": 7, + "name": "InheritanceSpecifier", + "src": "175:19:0" + }, + { + "attributes": { + "constant": true, + "name": "NAME", + "scope": 52, + "stateVariable": true, + "storageLocation": "default", + "type": "string memory", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string storage pointer" + }, + "id": 8, + "name": "ElementaryTypeName", + "src": "201:6:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "416d6f6e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"Amon\"", + "value": "Amon" + }, + "id": 9, + "name": "Literal", + "src": "225:6:0" + } + ], + "id": 10, + "name": "VariableDeclaration", + "src": "201:30:0" + }, + { + "attributes": { + "constant": true, + "name": "SYMBOL", + "scope": 52, + "stateVariable": true, + "storageLocation": "default", + "type": "string memory", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string storage pointer" + }, + "id": 11, + "name": "ElementaryTypeName", + "src": "237:6:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "414d4e", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "string", + "type": "literal_string \"AMN\"", + "value": "AMN" + }, + "id": 12, + "name": "Literal", + "src": "263:5:0" + } + ], + "id": 13, + "name": "VariableDeclaration", + "src": "237:31:0" + }, + { + "attributes": { + "constant": true, + "name": "DECIMALS", + "scope": 52, + "stateVariable": true, + "storageLocation": "default", + "type": "uint8", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint8", + "type": "uint8" + }, + "id": 14, + "name": "ElementaryTypeName", + "src": "274:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3138", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 18", + "value": "18" + }, + "id": 15, + "name": "Literal", + "src": "302:2:0" + } + ], + "id": 16, + "name": "VariableDeclaration", + "src": "274:30:0" + }, + { + "attributes": { + "constant": true, + "name": "INITIAL_SUPPLY", + "scope": 52, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 17, + "name": "ElementaryTypeName", + "src": "310:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "*", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "int_const 1600000000" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_1600000000_by_1", + "typeString": "int_const 1600000000" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "*", + "type": "int_const 1600000000" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "312e36", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "rational_const 8/5", + "value": "1.6" + }, + "id": 18, + "name": "Literal", + "src": "345:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_1000000000_by_1", + "typeString": "int_const 1000000000" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "**", + "type": "int_const 1000000000" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3130", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 10", + "value": "10" + }, + "id": 19, + "name": "Literal", + "src": "351:2:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "39", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 9", + "value": "9" + }, + "id": 20, + "name": "Literal", + "src": "357:1:0" + } + ], + "id": 21, + "name": "BinaryOperation", + "src": "351:7:0" + } + ], + "id": 22, + "name": "BinaryOperation", + "src": "345:13:0" + } + ], + "id": 23, + "name": "TupleExpression", + "src": "344:15:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "operator": "**", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(uint256)", + "value": "uint256" + }, + "id": 24, + "name": "ElementaryTypeNameExpression", + "src": "363:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "3130", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 10", + "value": "10" + }, + "id": 25, + "name": "Literal", + "src": "371:2:0" + } + ], + "id": 26, + "name": "FunctionCall", + "src": "363:11:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 16, + "type": "uint8", + "value": "DECIMALS" + }, + "id": 27, + "name": "Identifier", + "src": "378:8:0" + } + ], + "id": 28, + "name": "BinaryOperation", + "src": "363:23:0" + } + ], + "id": 29, + "name": "TupleExpression", + "src": "362:25:0" + } + ], + "id": 30, + "name": "BinaryOperation", + "src": "344:43:0" + } + ], + "id": 31, + "name": "VariableDeclaration", + "src": "310:77:0" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": true, + "name": "AMNToken", + "payable": false, + "scope": 52, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 32, + "name": "ParameterList", + "src": "490:2:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 38, + "name": "ParameterList", + "src": "558:0:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 701, + "type": "type(contract DetailedERC20)", + "value": "DetailedERC20" + }, + "id": 33, + "name": "Identifier", + "src": "501:13:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 10, + "type": "string memory", + "value": "NAME" + }, + "id": 34, + "name": "Identifier", + "src": "515:4:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 13, + "type": "string memory", + "value": "SYMBOL" + }, + "id": 35, + "name": "Identifier", + "src": "521:6:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 16, + "type": "uint8", + "value": "DECIMALS" + }, + "id": 36, + "name": "Identifier", + "src": "529:8:0" + } + ], + "id": 37, + "name": "ModifierInvocation", + "src": "501:37:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 586, + "type": "uint256", + "value": "totalSupply_" + }, + "id": 39, + "name": "Identifier", + "src": "566:12:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 31, + "type": "uint256", + "value": "INITIAL_SUPPLY" + }, + "id": 40, + "name": "Identifier", + "src": "581:14:0" + } + ], + "id": 41, + "name": "Assignment", + "src": "566:29:0" + } + ], + "id": 42, + "name": "ExpressionStatement", + "src": "566:29:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 584, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 43, + "name": "Identifier", + "src": "603:8:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1034, + "type": "msg", + "value": "msg" + }, + "id": 44, + "name": "Identifier", + "src": "612:3:0" + } + ], + "id": 45, + "name": "MemberAccess", + "src": "612:10:0" + } + ], + "id": 46, + "name": "IndexAccess", + "src": "603:20:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 31, + "type": "uint256", + "value": "INITIAL_SUPPLY" + }, + "id": 47, + "name": "Identifier", + "src": "626:14:0" + } + ], + "id": 48, + "name": "Assignment", + "src": "603:37:0" + } + ], + "id": 49, + "name": "ExpressionStatement", + "src": "603:37:0" + } + ], + "id": 50, + "name": "Block", + "src": "558:89:0" + } + ], + "id": 51, + "name": "FunctionDefinition", + "src": "473:174:0" + } + ], + "id": 52, + "name": "ContractDefinition", + "src": "139:510:0" + } + ], + "id": 53, + "name": "SourceUnit", + "src": "0:650:0" + }, + "compiler": { + "name": "solc", + "version": "0.4.19+commit.c4cbbb05.Emscripten.clang" + }, + "networks": { + "42": { + "events": {}, + "links": { + "ERC223Utils": "0xd83d791f84e6c8ceaf9594d104131e1843e76f37" + }, + "address": "0x6b0a5651ff21cd2b8184d6bbc4d3cbf6102c5b34" + } + }, + "schemaVersion": "1.0.1", + "updatedAt": "2018-02-22T15:12:21.049Z" +} \ No newline at end of file diff --git a/build/contracts/BasicToken.json b/build/contracts/BasicToken.json new file mode 100644 index 0000000..98b41b7 --- /dev/null +++ b/build/contracts/BasicToken.json @@ -0,0 +1,1439 @@ +{ + "contractName": "BasicToken", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x6060604052341561000f57600080fd5b61025c8061001e6000396000f3006060604052600436106100565763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166318160ddd811461005b57806370a0823114610080578063a9059cbb1461009f575b600080fd5b341561006657600080fd5b61006e6100d5565b60405190815260200160405180910390f35b341561008b57600080fd5b61006e600160a060020a03600435166100db565b34156100aa57600080fd5b6100c1600160a060020a03600435166024356100f6565b604051901515815260200160405180910390f35b60015490565b600160a060020a031660009081526020819052604090205490565b6000600160a060020a038316151561010d57600080fd5b600160a060020a03331660009081526020819052604090205482111561013257600080fd5b600160a060020a03331660009081526020819052604090205461015b908363ffffffff61020816565b600160a060020a033381166000908152602081905260408082209390935590851681522054610190908363ffffffff61021a16565b60008085600160a060020a0316600160a060020a031681526020019081526020016000208190555082600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a350600192915050565b60008282111561021457fe5b50900390565b60008282018381101561022957fe5b93925050505600a165627a7a72305820313da8b75c8b33e4a94af7c25045b46884bd181cfada428af8a611319a630add0029", + "deployedBytecode": "0x6060604052600436106100565763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166318160ddd811461005b57806370a0823114610080578063a9059cbb1461009f575b600080fd5b341561006657600080fd5b61006e6100d5565b60405190815260200160405180910390f35b341561008b57600080fd5b61006e600160a060020a03600435166100db565b34156100aa57600080fd5b6100c1600160a060020a03600435166024356100f6565b604051901515815260200160405180910390f35b60015490565b600160a060020a031660009081526020819052604090205490565b6000600160a060020a038316151561010d57600080fd5b600160a060020a03331660009081526020819052604090205482111561013257600080fd5b600160a060020a03331660009081526020819052604090205461015b908363ffffffff61020816565b600160a060020a033381166000908152602081905260408082209390935590851681522054610190908363ffffffff61021a16565b60008085600160a060020a0316600160a060020a031681526020019081526020016000208190555082600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a350600192915050565b60008282111561021457fe5b50900390565b60008282018381101561022957fe5b93925050505600a165627a7a72305820313da8b75c8b33e4a94af7c25045b46884bd181cfada428af8a611319a630add0029", + "sourceMap": "180:1119:7:-;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "180:1119:7:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;371:83;;;;;;;;;;;;;;;;;;;;;;;;;;;1189:107;;;;;;;;;;-1:-1:-1;;;;;1189:107:7;;;;;608:379;;;;;;;;;;-1:-1:-1;;;;;608:379:7;;;;;;;;;;;;;;;;;;;;;;;;371:83;437:12;;371:83;:::o;1189:107::-;-1:-1:-1;;;;;1275:16:7;1245:15;1275:16;;;;;;;;;;;;1189:107::o;608:379::-;671:4;-1:-1:-1;;;;;691:17:7;;;;683:26;;;;;;-1:-1:-1;;;;;742:10:7;733:20;:8;:20;;;;;;;;;;;723:30;;;715:39;;;;;;-1:-1:-1;;;;;856:10:7;847:20;:8;:20;;;;;;;;;;;:32;;872:6;847:32;:24;:32;:::i;:::-;-1:-1:-1;;;;;833:10:7;824:20;;:8;:20;;;;;;;;;;;:55;;;;901:13;;;;;;;:25;;919:6;901:25;:17;:25;:::i;:::-;885:8;:13;894:3;-1:-1:-1;;;;;885:13:7;-1:-1:-1;;;;;885:13:7;;;;;;;;;;;;:41;;;;953:3;-1:-1:-1;;;;;932:33:7;941:10;-1:-1:-1;;;;;932:33:7;;958:6;932:33;;;;;;;;;;;;;;-1:-1:-1;978:4:7;608:379;;;;:::o;836:110:6:-;894:7;916:6;;;;909:14;;;;-1:-1:-1;936:5:6;;;836:110::o;1008:129::-;1066:7;1093:5;;;1111:6;;;;1104:14;;;;1131:1;1008:129;-1:-1:-1;;;1008:129:6:o", + "source": "pragma solidity ^0.4.18;\n\n\nimport \"./ERC20Basic.sol\";\nimport \"../../math/SafeMath.sol\";\n\n\n/**\n * @title Basic token\n * @dev Basic version of StandardToken, with no allowances.\n */\ncontract BasicToken is ERC20Basic {\n using SafeMath for uint256;\n\n mapping(address => uint256) balances;\n\n uint256 totalSupply_;\n\n /**\n * @dev total number of tokens in existence\n */\n function totalSupply() public view returns (uint256) {\n return totalSupply_;\n }\n\n /**\n * @dev transfer token for a specified address\n * @param _to The address to transfer to.\n * @param _value The amount to be transferred.\n */\n function transfer(address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[msg.sender]);\n\n // SafeMath.sub will throw if there is not enough balance.\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n Transfer(msg.sender, _to, _value);\n return true;\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param _owner The address to query the the balance of.\n * @return An uint256 representing the amount owned by the passed address.\n */\n function balanceOf(address _owner) public view returns (uint256 balance) {\n return balances[_owner];\n }\n\n}\n", + "sourcePath": "zeppelin-solidity/contracts/token/ERC20/BasicToken.sol", + "ast": { + "attributes": { + "absolutePath": "zeppelin-solidity/contracts/token/ERC20/BasicToken.sol", + "exportedSymbols": { + "BasicToken": [ + 420 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.4", + ".18" + ] + }, + "id": 326, + "name": "PragmaDirective", + "src": "0:24:7" + }, + { + "attributes": { + "SourceUnit": 453, + "absolutePath": "zeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol", + "file": "./ERC20Basic.sol", + "scope": 421, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 327, + "name": "ImportDirective", + "src": "27:26:7" + }, + { + "attributes": { + "SourceUnit": 325, + "absolutePath": "zeppelin-solidity/contracts/math/SafeMath.sol", + "file": "../../math/SafeMath.sol", + "scope": 421, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 328, + "name": "ImportDirective", + "src": "54:33:7" + }, + { + "attributes": { + "contractDependencies": [ + 452 + ], + "contractKind": "contract", + "documentation": "@title Basic token\n@dev Basic version of StandardToken, with no allowances.", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 420, + 452 + ], + "name": "BasicToken", + "scope": 421 + }, + "children": [ + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "ERC20Basic", + "referencedDeclaration": 452, + "type": "contract ERC20Basic" + }, + "id": 329, + "name": "UserDefinedTypeName", + "src": "203:10:7" + } + ], + "id": 330, + "name": "InheritanceSpecifier", + "src": "203:10:7" + }, + { + "children": [ + { + "attributes": { + "contractScope": null, + "name": "SafeMath", + "referencedDeclaration": 324, + "type": "library SafeMath" + }, + "id": 331, + "name": "UserDefinedTypeName", + "src": "224:8:7" + }, + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 332, + "name": "ElementaryTypeName", + "src": "237:7:7" + } + ], + "id": 333, + "name": "UsingForDirective", + "src": "218:27:7" + }, + { + "attributes": { + "constant": false, + "name": "balances", + "scope": 420, + "stateVariable": true, + "storageLocation": "default", + "type": "mapping(address => uint256)", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 334, + "name": "ElementaryTypeName", + "src": "257:7:7" + }, + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 335, + "name": "ElementaryTypeName", + "src": "268:7:7" + } + ], + "id": 336, + "name": "Mapping", + "src": "249:27:7" + } + ], + "id": 337, + "name": "VariableDeclaration", + "src": "249:36:7" + }, + { + "attributes": { + "constant": false, + "name": "totalSupply_", + "scope": 420, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 338, + "name": "ElementaryTypeName", + "src": "290:7:7" + } + ], + "id": 339, + "name": "VariableDeclaration", + "src": "290:20:7" + }, + { + "attributes": { + "constant": true, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "totalSupply", + "payable": false, + "scope": 420, + "stateMutability": "view", + "superFunction": 427, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 340, + "name": "ParameterList", + "src": "391:2:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 347, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 341, + "name": "ElementaryTypeName", + "src": "415:7:7" + } + ], + "id": 342, + "name": "VariableDeclaration", + "src": "415:7:7" + } + ], + "id": 343, + "name": "ParameterList", + "src": "414:9:7" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 343 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 339, + "type": "uint256", + "value": "totalSupply_" + }, + "id": 344, + "name": "Identifier", + "src": "437:12:7" + } + ], + "id": 345, + "name": "Return", + "src": "430:19:7" + } + ], + "id": 346, + "name": "Block", + "src": "424:30:7" + } + ], + "id": 347, + "name": "FunctionDefinition", + "src": "371:83:7" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "transfer", + "payable": false, + "scope": 420, + "stateMutability": "nonpayable", + "superFunction": 443, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_to", + "scope": 407, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 348, + "name": "ElementaryTypeName", + "src": "626:7:7" + } + ], + "id": 349, + "name": "VariableDeclaration", + "src": "626:11:7" + }, + { + "attributes": { + "constant": false, + "name": "_value", + "scope": 407, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 350, + "name": "ElementaryTypeName", + "src": "639:7:7" + } + ], + "id": 351, + "name": "VariableDeclaration", + "src": "639:14:7" + } + ], + "id": 352, + "name": "ParameterList", + "src": "625:29:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 407, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 353, + "name": "ElementaryTypeName", + "src": "671:4:7" + } + ], + "id": 354, + "name": "VariableDeclaration", + "src": "671:4:7" + } + ], + "id": 355, + "name": "ParameterList", + "src": "670:6:7" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 467, + "type": "function (bool) pure", + "value": "require" + }, + "id": 356, + "name": "Identifier", + "src": "683:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 349, + "type": "address", + "value": "_to" + }, + "id": 357, + "name": "Identifier", + "src": "691:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 358, + "name": "ElementaryTypeNameExpression", + "src": "698:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 359, + "name": "Literal", + "src": "706:1:7" + } + ], + "id": 360, + "name": "FunctionCall", + "src": "698:10:7" + } + ], + "id": 361, + "name": "BinaryOperation", + "src": "691:17:7" + } + ], + "id": 362, + "name": "FunctionCall", + "src": "683:26:7" + } + ], + "id": 363, + "name": "ExpressionStatement", + "src": "683:26:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 467, + "type": "function (bool) pure", + "value": "require" + }, + "id": 364, + "name": "Identifier", + "src": "715:7:7" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 351, + "type": "uint256", + "value": "_value" + }, + "id": 365, + "name": "Identifier", + "src": "723:6:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 337, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 366, + "name": "Identifier", + "src": "733:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 464, + "type": "msg", + "value": "msg" + }, + "id": 367, + "name": "Identifier", + "src": "742:3:7" + } + ], + "id": 368, + "name": "MemberAccess", + "src": "742:10:7" + } + ], + "id": 369, + "name": "IndexAccess", + "src": "733:20:7" + } + ], + "id": 370, + "name": "BinaryOperation", + "src": "723:30:7" + } + ], + "id": 371, + "name": "FunctionCall", + "src": "715:39:7" + } + ], + "id": 372, + "name": "ExpressionStatement", + "src": "715:39:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 337, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 373, + "name": "Identifier", + "src": "824:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 464, + "type": "msg", + "value": "msg" + }, + "id": 374, + "name": "Identifier", + "src": "833:3:7" + } + ], + "id": 375, + "name": "MemberAccess", + "src": "833:10:7" + } + ], + "id": 376, + "name": "IndexAccess", + "src": "824:20:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sub", + "referencedDeclaration": 299, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 337, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 377, + "name": "Identifier", + "src": "847:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 464, + "type": "msg", + "value": "msg" + }, + "id": 378, + "name": "Identifier", + "src": "856:3:7" + } + ], + "id": 379, + "name": "MemberAccess", + "src": "856:10:7" + } + ], + "id": 380, + "name": "IndexAccess", + "src": "847:20:7" + } + ], + "id": 381, + "name": "MemberAccess", + "src": "847:24:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 351, + "type": "uint256", + "value": "_value" + }, + "id": 382, + "name": "Identifier", + "src": "872:6:7" + } + ], + "id": 383, + "name": "FunctionCall", + "src": "847:32:7" + } + ], + "id": 384, + "name": "Assignment", + "src": "824:55:7" + } + ], + "id": 385, + "name": "ExpressionStatement", + "src": "824:55:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 337, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 386, + "name": "Identifier", + "src": "885:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 349, + "type": "address", + "value": "_to" + }, + "id": 387, + "name": "Identifier", + "src": "894:3:7" + } + ], + "id": 388, + "name": "IndexAccess", + "src": "885:13:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "add", + "referencedDeclaration": 323, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 337, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 389, + "name": "Identifier", + "src": "901:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 349, + "type": "address", + "value": "_to" + }, + "id": 390, + "name": "Identifier", + "src": "910:3:7" + } + ], + "id": 391, + "name": "IndexAccess", + "src": "901:13:7" + } + ], + "id": 392, + "name": "MemberAccess", + "src": "901:17:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 351, + "type": "uint256", + "value": "_value" + }, + "id": 393, + "name": "Identifier", + "src": "919:6:7" + } + ], + "id": 394, + "name": "FunctionCall", + "src": "901:25:7" + } + ], + "id": 395, + "name": "Assignment", + "src": "885:41:7" + } + ], + "id": 396, + "name": "ExpressionStatement", + "src": "885:41:7" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 451, + "type": "function (address,address,uint256)", + "value": "Transfer" + }, + "id": 397, + "name": "Identifier", + "src": "932:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 464, + "type": "msg", + "value": "msg" + }, + "id": 398, + "name": "Identifier", + "src": "941:3:7" + } + ], + "id": 399, + "name": "MemberAccess", + "src": "941:10:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 349, + "type": "address", + "value": "_to" + }, + "id": 400, + "name": "Identifier", + "src": "953:3:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 351, + "type": "uint256", + "value": "_value" + }, + "id": 401, + "name": "Identifier", + "src": "958:6:7" + } + ], + "id": 402, + "name": "FunctionCall", + "src": "932:33:7" + } + ], + "id": 403, + "name": "ExpressionStatement", + "src": "932:33:7" + }, + { + "attributes": { + "functionReturnParameters": 355 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 404, + "name": "Literal", + "src": "978:4:7" + } + ], + "id": 405, + "name": "Return", + "src": "971:11:7" + } + ], + "id": 406, + "name": "Block", + "src": "677:310:7" + } + ], + "id": 407, + "name": "FunctionDefinition", + "src": "608:379:7" + }, + { + "attributes": { + "constant": true, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "balanceOf", + "payable": false, + "scope": 420, + "stateMutability": "view", + "superFunction": 434, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_owner", + "scope": 419, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 408, + "name": "ElementaryTypeName", + "src": "1208:7:7" + } + ], + "id": 409, + "name": "VariableDeclaration", + "src": "1208:14:7" + } + ], + "id": 410, + "name": "ParameterList", + "src": "1207:16:7" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "balance", + "scope": 419, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 411, + "name": "ElementaryTypeName", + "src": "1245:7:7" + } + ], + "id": 412, + "name": "VariableDeclaration", + "src": "1245:15:7" + } + ], + "id": 413, + "name": "ParameterList", + "src": "1244:17:7" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 413 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 337, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 414, + "name": "Identifier", + "src": "1275:8:7" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 409, + "type": "address", + "value": "_owner" + }, + "id": 415, + "name": "Identifier", + "src": "1284:6:7" + } + ], + "id": 416, + "name": "IndexAccess", + "src": "1275:16:7" + } + ], + "id": 417, + "name": "Return", + "src": "1268:23:7" + } + ], + "id": 418, + "name": "Block", + "src": "1262:34:7" + } + ], + "id": 419, + "name": "FunctionDefinition", + "src": "1189:107:7" + } + ], + "id": 420, + "name": "ContractDefinition", + "src": "180:1119:7" + } + ], + "id": 421, + "name": "SourceUnit", + "src": "0:1300:7" + }, + "compiler": { + "name": "solc", + "version": "0.4.19+commit.c4cbbb05.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "1.0.1", + "updatedAt": "2018-02-22T16:06:59.987Z" +} \ No newline at end of file diff --git a/build/contracts/DetailedERC20.json b/build/contracts/DetailedERC20.json new file mode 100644 index 0000000..079b933 --- /dev/null +++ b/build/contracts/DetailedERC20.json @@ -0,0 +1,696 @@ +{ + "contractName": "DetailedERC20", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "who", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "name": "_name", + "type": "string" + }, + { + "name": "_symbol", + "type": "string" + }, + { + "name": "_decimals", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "sourceMap": "", + "deployedSourceMap": "", + "source": "pragma solidity ^0.4.18;\n\nimport \"./ERC20.sol\";\n\n\ncontract DetailedERC20 is ERC20 {\n string public name;\n string public symbol;\n uint8 public decimals;\n\n function DetailedERC20(string _name, string _symbol, uint8 _decimals) public {\n name = _name;\n symbol = _symbol;\n decimals = _decimals;\n }\n}\n", + "sourcePath": "zeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol", + "ast": { + "attributes": { + "absolutePath": "zeppelin-solidity/contracts/token/ERC20/DetailedERC20.sol", + "exportedSymbols": { + "DetailedERC20": [ + 701 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.4", + ".18" + ] + }, + "id": 669, + "name": "PragmaDirective", + "src": "0:24:10" + }, + { + "attributes": { + "SourceUnit": 745, + "absolutePath": "zeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "file": "./ERC20.sol", + "scope": 702, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 670, + "name": "ImportDirective", + "src": "26:21:10" + }, + { + "attributes": { + "contractDependencies": [ + 744, + 776 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": false, + "linearizedBaseContracts": [ + 701, + 744, + 776 + ], + "name": "DetailedERC20", + "scope": 702 + }, + "children": [ + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "ERC20", + "referencedDeclaration": 744, + "type": "contract ERC20" + }, + "id": 671, + "name": "UserDefinedTypeName", + "src": "76:5:10" + } + ], + "id": 672, + "name": "InheritanceSpecifier", + "src": "76:5:10" + }, + { + "attributes": { + "constant": false, + "name": "name", + "scope": 701, + "stateVariable": true, + "storageLocation": "default", + "type": "string storage ref", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string storage pointer" + }, + "id": 673, + "name": "ElementaryTypeName", + "src": "86:6:10" + } + ], + "id": 674, + "name": "VariableDeclaration", + "src": "86:18:10" + }, + { + "attributes": { + "constant": false, + "name": "symbol", + "scope": 701, + "stateVariable": true, + "storageLocation": "default", + "type": "string storage ref", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string storage pointer" + }, + "id": 675, + "name": "ElementaryTypeName", + "src": "108:6:10" + } + ], + "id": 676, + "name": "VariableDeclaration", + "src": "108:20:10" + }, + { + "attributes": { + "constant": false, + "name": "decimals", + "scope": 701, + "stateVariable": true, + "storageLocation": "default", + "type": "uint8", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint8", + "type": "uint8" + }, + "id": 677, + "name": "ElementaryTypeName", + "src": "132:5:10" + } + ], + "id": 678, + "name": "VariableDeclaration", + "src": "132:21:10" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": true, + "modifiers": [ + null + ], + "name": "DetailedERC20", + "payable": false, + "scope": 701, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_name", + "scope": 700, + "stateVariable": false, + "storageLocation": "default", + "type": "string memory", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string storage pointer" + }, + "id": 679, + "name": "ElementaryTypeName", + "src": "181:6:10" + } + ], + "id": 680, + "name": "VariableDeclaration", + "src": "181:12:10" + }, + { + "attributes": { + "constant": false, + "name": "_symbol", + "scope": 700, + "stateVariable": false, + "storageLocation": "default", + "type": "string memory", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "string", + "type": "string storage pointer" + }, + "id": 681, + "name": "ElementaryTypeName", + "src": "195:6:10" + } + ], + "id": 682, + "name": "VariableDeclaration", + "src": "195:14:10" + }, + { + "attributes": { + "constant": false, + "name": "_decimals", + "scope": 700, + "stateVariable": false, + "storageLocation": "default", + "type": "uint8", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint8", + "type": "uint8" + }, + "id": 683, + "name": "ElementaryTypeName", + "src": "211:5:10" + } + ], + "id": 684, + "name": "VariableDeclaration", + "src": "211:15:10" + } + ], + "id": 685, + "name": "ParameterList", + "src": "180:47:10" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 686, + "name": "ParameterList", + "src": "235:0:10" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "string storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 674, + "type": "string storage ref", + "value": "name" + }, + "id": 687, + "name": "Identifier", + "src": "241:4:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 680, + "type": "string memory", + "value": "_name" + }, + "id": 688, + "name": "Identifier", + "src": "248:5:10" + } + ], + "id": 689, + "name": "Assignment", + "src": "241:12:10" + } + ], + "id": 690, + "name": "ExpressionStatement", + "src": "241:12:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "string storage ref" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 676, + "type": "string storage ref", + "value": "symbol" + }, + "id": 691, + "name": "Identifier", + "src": "259:6:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 682, + "type": "string memory", + "value": "_symbol" + }, + "id": 692, + "name": "Identifier", + "src": "268:7:10" + } + ], + "id": 693, + "name": "Assignment", + "src": "259:16:10" + } + ], + "id": 694, + "name": "ExpressionStatement", + "src": "259:16:10" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint8" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 678, + "type": "uint8", + "value": "decimals" + }, + "id": 695, + "name": "Identifier", + "src": "281:8:10" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 684, + "type": "uint8", + "value": "_decimals" + }, + "id": 696, + "name": "Identifier", + "src": "292:9:10" + } + ], + "id": 697, + "name": "Assignment", + "src": "281:20:10" + } + ], + "id": 698, + "name": "ExpressionStatement", + "src": "281:20:10" + } + ], + "id": 699, + "name": "Block", + "src": "235:71:10" + } + ], + "id": 700, + "name": "FunctionDefinition", + "src": "158:148:10" + } + ], + "id": 701, + "name": "ContractDefinition", + "src": "50:258:10" + } + ], + "id": 702, + "name": "SourceUnit", + "src": "0:309:10" + }, + "compiler": { + "name": "solc", + "version": "0.4.19+commit.c4cbbb05.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "1.0.1", + "updatedAt": "2018-02-22T15:06:12.342Z" +} \ No newline at end of file diff --git a/build/contracts/ERC20.json b/build/contracts/ERC20.json new file mode 100644 index 0000000..aee9ba9 --- /dev/null +++ b/build/contracts/ERC20.json @@ -0,0 +1,745 @@ +{ + "contractName": "ERC20", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "who", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "sourceMap": "", + "deployedSourceMap": "", + "source": "pragma solidity ^0.4.18;\n\nimport \"./ERC20Basic.sol\";\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public view returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n", + "sourcePath": "zeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "ast": { + "attributes": { + "absolutePath": "zeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "exportedSymbols": { + "ERC20": [ + 744 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.4", + ".18" + ] + }, + "id": 703, + "name": "PragmaDirective", + "src": "0:24:11" + }, + { + "attributes": { + "SourceUnit": 777, + "absolutePath": "zeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol", + "file": "./ERC20Basic.sol", + "scope": 745, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 704, + "name": "ImportDirective", + "src": "26:26:11" + }, + { + "attributes": { + "contractDependencies": [ + 776 + ], + "contractKind": "contract", + "documentation": "@title ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/20", + "fullyImplemented": false, + "linearizedBaseContracts": [ + 744, + 776 + ], + "name": "ERC20", + "scope": 745 + }, + "children": [ + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "ERC20Basic", + "referencedDeclaration": 776, + "type": "contract ERC20Basic" + }, + "id": 705, + "name": "UserDefinedTypeName", + "src": "162:10:11" + } + ], + "id": 706, + "name": "InheritanceSpecifier", + "src": "162:10:11" + }, + { + "attributes": { + "body": null, + "constant": true, + "implemented": false, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "allowance", + "payable": false, + "scope": 744, + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "owner", + "scope": 715, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 707, + "name": "ElementaryTypeName", + "src": "196:7:11" + } + ], + "id": 708, + "name": "VariableDeclaration", + "src": "196:13:11" + }, + { + "attributes": { + "constant": false, + "name": "spender", + "scope": 715, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 709, + "name": "ElementaryTypeName", + "src": "211:7:11" + } + ], + "id": 710, + "name": "VariableDeclaration", + "src": "211:15:11" + } + ], + "id": 711, + "name": "ParameterList", + "src": "195:32:11" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 715, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 712, + "name": "ElementaryTypeName", + "src": "249:7:11" + } + ], + "id": 713, + "name": "VariableDeclaration", + "src": "249:7:11" + } + ], + "id": 714, + "name": "ParameterList", + "src": "248:9:11" + } + ], + "id": 715, + "name": "FunctionDefinition", + "src": "177:81:11" + }, + { + "attributes": { + "body": null, + "constant": false, + "implemented": false, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "transferFrom", + "payable": false, + "scope": 744, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "from", + "scope": 726, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 716, + "name": "ElementaryTypeName", + "src": "283:7:11" + } + ], + "id": 717, + "name": "VariableDeclaration", + "src": "283:12:11" + }, + { + "attributes": { + "constant": false, + "name": "to", + "scope": 726, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 718, + "name": "ElementaryTypeName", + "src": "297:7:11" + } + ], + "id": 719, + "name": "VariableDeclaration", + "src": "297:10:11" + }, + { + "attributes": { + "constant": false, + "name": "value", + "scope": 726, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 720, + "name": "ElementaryTypeName", + "src": "309:7:11" + } + ], + "id": 721, + "name": "VariableDeclaration", + "src": "309:13:11" + } + ], + "id": 722, + "name": "ParameterList", + "src": "282:41:11" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 726, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 723, + "name": "ElementaryTypeName", + "src": "340:4:11" + } + ], + "id": 724, + "name": "VariableDeclaration", + "src": "340:4:11" + } + ], + "id": 725, + "name": "ParameterList", + "src": "339:6:11" + } + ], + "id": 726, + "name": "FunctionDefinition", + "src": "261:85:11" + }, + { + "attributes": { + "body": null, + "constant": false, + "implemented": false, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "approve", + "payable": false, + "scope": 744, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "spender", + "scope": 735, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 727, + "name": "ElementaryTypeName", + "src": "366:7:11" + } + ], + "id": 728, + "name": "VariableDeclaration", + "src": "366:15:11" + }, + { + "attributes": { + "constant": false, + "name": "value", + "scope": 735, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 729, + "name": "ElementaryTypeName", + "src": "383:7:11" + } + ], + "id": 730, + "name": "VariableDeclaration", + "src": "383:13:11" + } + ], + "id": 731, + "name": "ParameterList", + "src": "365:32:11" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 735, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 732, + "name": "ElementaryTypeName", + "src": "414:4:11" + } + ], + "id": 733, + "name": "VariableDeclaration", + "src": "414:4:11" + } + ], + "id": 734, + "name": "ParameterList", + "src": "413:6:11" + } + ], + "id": 735, + "name": "FunctionDefinition", + "src": "349:71:11" + }, + { + "attributes": { + "anonymous": false, + "name": "Approval" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "owner", + "scope": 743, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 736, + "name": "ElementaryTypeName", + "src": "438:7:11" + } + ], + "id": 737, + "name": "VariableDeclaration", + "src": "438:21:11" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "spender", + "scope": 743, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 738, + "name": "ElementaryTypeName", + "src": "461:7:11" + } + ], + "id": 739, + "name": "VariableDeclaration", + "src": "461:23:11" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "value", + "scope": 743, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 740, + "name": "ElementaryTypeName", + "src": "486:7:11" + } + ], + "id": 741, + "name": "VariableDeclaration", + "src": "486:13:11" + } + ], + "id": 742, + "name": "ParameterList", + "src": "437:63:11" + } + ], + "id": 743, + "name": "EventDefinition", + "src": "423:78:11" + } + ], + "id": 744, + "name": "ContractDefinition", + "src": "144:359:11" + } + ], + "id": 745, + "name": "SourceUnit", + "src": "0:504:11" + }, + "compiler": { + "name": "solc", + "version": "0.4.19+commit.c4cbbb05.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "1.0.1", + "updatedAt": "2018-02-22T15:06:12.342Z" +} \ No newline at end of file diff --git a/build/contracts/ERC20Basic.json b/build/contracts/ERC20Basic.json new file mode 100644 index 0000000..31f7776 --- /dev/null +++ b/build/contracts/ERC20Basic.json @@ -0,0 +1,514 @@ +{ + "contractName": "ERC20Basic", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "who", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "sourceMap": "", + "deployedSourceMap": "", + "source": "pragma solidity ^0.4.18;\n\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n function totalSupply() public view returns (uint256);\n function balanceOf(address who) public view returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n", + "sourcePath": "zeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol", + "ast": { + "attributes": { + "absolutePath": "zeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol", + "exportedSymbols": { + "ERC20Basic": [ + 452 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.4", + ".18" + ] + }, + "id": 422, + "name": "PragmaDirective", + "src": "0:24:8" + }, + { + "attributes": { + "baseContracts": [ + null + ], + "contractDependencies": [ + null + ], + "contractKind": "contract", + "documentation": "@title ERC20Basic\n@dev Simpler version of ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/179", + "fullyImplemented": false, + "linearizedBaseContracts": [ + 452 + ], + "name": "ERC20Basic", + "scope": 453 + }, + "children": [ + { + "attributes": { + "body": null, + "constant": true, + "implemented": false, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "totalSupply", + "payable": false, + "scope": 452, + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 423, + "name": "ParameterList", + "src": "199:2:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 427, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 424, + "name": "ElementaryTypeName", + "src": "223:7:8" + } + ], + "id": 425, + "name": "VariableDeclaration", + "src": "223:7:8" + } + ], + "id": 426, + "name": "ParameterList", + "src": "222:9:8" + } + ], + "id": 427, + "name": "FunctionDefinition", + "src": "179:53:8" + }, + { + "attributes": { + "body": null, + "constant": true, + "implemented": false, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "balanceOf", + "payable": false, + "scope": 452, + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "who", + "scope": 434, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 428, + "name": "ElementaryTypeName", + "src": "254:7:8" + } + ], + "id": 429, + "name": "VariableDeclaration", + "src": "254:11:8" + } + ], + "id": 430, + "name": "ParameterList", + "src": "253:13:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 434, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 431, + "name": "ElementaryTypeName", + "src": "288:7:8" + } + ], + "id": 432, + "name": "VariableDeclaration", + "src": "288:7:8" + } + ], + "id": 433, + "name": "ParameterList", + "src": "287:9:8" + } + ], + "id": 434, + "name": "FunctionDefinition", + "src": "235:62:8" + }, + { + "attributes": { + "body": null, + "constant": false, + "implemented": false, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "transfer", + "payable": false, + "scope": 452, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "to", + "scope": 443, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 435, + "name": "ElementaryTypeName", + "src": "318:7:8" + } + ], + "id": 436, + "name": "VariableDeclaration", + "src": "318:10:8" + }, + { + "attributes": { + "constant": false, + "name": "value", + "scope": 443, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 437, + "name": "ElementaryTypeName", + "src": "330:7:8" + } + ], + "id": 438, + "name": "VariableDeclaration", + "src": "330:13:8" + } + ], + "id": 439, + "name": "ParameterList", + "src": "317:27:8" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 443, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 440, + "name": "ElementaryTypeName", + "src": "361:4:8" + } + ], + "id": 441, + "name": "VariableDeclaration", + "src": "361:4:8" + } + ], + "id": 442, + "name": "ParameterList", + "src": "360:6:8" + } + ], + "id": 443, + "name": "FunctionDefinition", + "src": "300:67:8" + }, + { + "attributes": { + "anonymous": false, + "name": "Transfer" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "from", + "scope": 451, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 444, + "name": "ElementaryTypeName", + "src": "385:7:8" + } + ], + "id": 445, + "name": "VariableDeclaration", + "src": "385:20:8" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "to", + "scope": 451, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 446, + "name": "ElementaryTypeName", + "src": "407:7:8" + } + ], + "id": 447, + "name": "VariableDeclaration", + "src": "407:18:8" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "value", + "scope": 451, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 448, + "name": "ElementaryTypeName", + "src": "427:7:8" + } + ], + "id": 449, + "name": "VariableDeclaration", + "src": "427:13:8" + } + ], + "id": 450, + "name": "ParameterList", + "src": "384:57:8" + } + ], + "id": 451, + "name": "EventDefinition", + "src": "370:72:8" + } + ], + "id": 452, + "name": "ContractDefinition", + "src": "155:289:8" + } + ], + "id": 453, + "name": "SourceUnit", + "src": "0:445:8" + }, + "compiler": { + "name": "solc", + "version": "0.4.19+commit.c4cbbb05.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "1.0.1", + "updatedAt": "2018-02-22T16:06:59.987Z" +} \ No newline at end of file diff --git a/build/contracts/ERC223BasicToken.json b/build/contracts/ERC223BasicToken.json new file mode 100644 index 0000000..8741c5b --- /dev/null +++ b/build/contracts/ERC223BasicToken.json @@ -0,0 +1,1969 @@ +{ + "contractName": "ERC223BasicToken", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "payable": false, + "stateMutability": "nonpayable", + "type": "fallback" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "name": "_to", + "type": "address" + }, + { + "indexed": true, + "name": "_value", + "type": "uint256" + }, + { + "indexed": false, + "name": "_data", + "type": "bytes" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + }, + { + "name": "_data", + "type": "bytes" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x6060604052341561000f57600080fd5b6104478061001e6000396000f3006060604052600436106100485763ffffffff60e060020a60003504166318160ddd811461005857806370a082311461007d578063a9059cbb1461009c578063be45fd62146100d2575b341561005357600080fd5b600080fd5b341561006357600080fd5b61006b610137565b60405190815260200160405180910390f35b341561008857600080fd5b61006b600160a060020a036004351661013d565b34156100a757600080fd5b6100be600160a060020a0360043516602435610158565b604051901515815260200160405180910390f35b34156100dd57600080fd5b6100be60048035600160a060020a03169060248035919060649060443590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061017595505050505050565b60015490565b600160a060020a031660009081526020819052604090205490565b6000610162610409565b61016d848483610175565b949350505050565b600080600160a060020a038516151561018d57600080fd5b600160a060020a0333166000908152602081905260409020548411156101b257600080fd5b600160a060020a0333166000908152602081905260409020546101db908563ffffffff6103e116565b600160a060020a033381166000908152602081905260408082209390935590871681522054610210908563ffffffff6103f316565b600160a060020a0386166000908152602081905260408082209290925573__ERC223Utils___________________________916316279055918891516020015260405160e060020a63ffffffff8416028152600160a060020a03909116600482015260240160206040518083038186803b151561028c57600080fd5b6102c65a03f4151561029d57600080fd5b505050604051805190501561038f575083600160a060020a03811663c0ee0b8a3386866040518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561032d578082015183820152602001610315565b50505050905090810190601f16801561035a5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b151561037a57600080fd5b6102c65a03f1151561038b57600080fd5b5050505b84600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8660405190815260200160405180910390a3506001949350505050565b6000828211156103ed57fe5b50900390565b60008282018381101561040257fe5b9392505050565b602060405190810160405260008152905600a165627a7a723058205ba0f54fb486baa3a199846be42561ccbf21cb0c3f88844027f1ae8ac688ce910029", + "deployedBytecode": "0x6060604052600436106100485763ffffffff60e060020a60003504166318160ddd811461005857806370a082311461007d578063a9059cbb1461009c578063be45fd62146100d2575b341561005357600080fd5b600080fd5b341561006357600080fd5b61006b610137565b60405190815260200160405180910390f35b341561008857600080fd5b61006b600160a060020a036004351661013d565b34156100a757600080fd5b6100be600160a060020a0360043516602435610158565b604051901515815260200160405180910390f35b34156100dd57600080fd5b6100be60048035600160a060020a03169060248035919060649060443590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061017595505050505050565b60015490565b600160a060020a031660009081526020819052604090205490565b6000610162610409565b61016d848483610175565b949350505050565b600080600160a060020a038516151561018d57600080fd5b600160a060020a0333166000908152602081905260409020548411156101b257600080fd5b600160a060020a0333166000908152602081905260409020546101db908563ffffffff6103e116565b600160a060020a033381166000908152602081905260408082209390935590871681522054610210908563ffffffff6103f316565b600160a060020a0386166000908152602081905260408082209290925573__ERC223Utils___________________________916316279055918891516020015260405160e060020a63ffffffff8416028152600160a060020a03909116600482015260240160206040518083038186803b151561028c57600080fd5b6102c65a03f4151561029d57600080fd5b505050604051805190501561038f575083600160a060020a03811663c0ee0b8a3386866040518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561032d578082015183820152602001610315565b50505050905090810190601f16801561035a5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b151561037a57600080fd5b6102c65a03f1151561038b57600080fd5b5050505b84600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8660405190815260200160405180910390a3506001949350505050565b6000828211156103ed57fe5b50900390565b60008282018381101561040257fe5b9392505050565b602060405190810160405260008152905600a165627a7a723058205ba0f54fb486baa3a199846be42561ccbf21cb0c3f88844027f1ae8ac688ce910029", + "sourceMap": "250:1309:0:-;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "250:1309:0:-;;;;;;;;;-1:-1:-1;;;250:1309:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;433:8;;;371:83:7;;;;;;;;;;;;;;;;;;;;;;;;;;;1189:107;;;;;;;;;;-1:-1:-1;;;;;1189:107:7;;;;;584:152:0;;;;;;;;;;-1:-1:-1;;;;;584:152:0;;;;;;;;;;;;;;;;;;;;;;;;1015:541;;;;;;;;;;;;;-1:-1:-1;;;;;1015:541:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1015:541:0;;-1:-1:-1;1015:541:0;;-1:-1:-1;;;;;;1015:541:0;371:83:7;437:12;;371:83;:::o;1189:107::-;-1:-1:-1;;;;;1275:16:7;1245:15;1275:16;;;;;;;;;;;;1189:107::o;584:152:0:-;644:12;667:18;;:::i;:::-;700:28;709:3;714:6;722:5;700:8;:28::i;:::-;693:35;584:152;-1:-1:-1;;;;584:152:0:o;1015:541::-;1088:12;;-1:-1:-1;;;;;1115:17:0;;;1111:32;;;1135:8;;;1111:32;-1:-1:-1;;;;;1172:10:0;1163:20;:8;:20;;;;;;;;;;;1154:29;;1151:42;;;1185:8;;;1151:42;-1:-1:-1;;;;;1234:10:0;1225:20;:8;:20;;;;;;;;;;;:32;;1250:6;1225:32;:24;:32;:::i;:::-;-1:-1:-1;;;;;1211:10:0;1202:20;;:8;:20;;;;;;;;;;;:55;;;;1281:13;;;;;;;:25;;1299:6;1281:25;:17;:25;:::i;:::-;-1:-1:-1;;;;;1265:13:0;;:8;:13;;;;;;;;;;;:41;;;;1318:11;;:22;;1274:3;;1318:27;;;;;;-1:-1:-1;;;1318:27:0;;;;;;-1:-1:-1;;;;;1318:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1315:175;;;-1:-1:-1;1418:3:0;-1:-1:-1;;;;;1432:22:0;;;1455:10;1467:6;1475:5;1432:49;;;;;-1:-1:-1;;;1432:49:0;;;;;;;-1:-1:-1;;;;;1432:49:0;-1:-1:-1;;;;;1432:49:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:2;8:100;;;99:1;94:3;90;84:5;71:3;;;64:6;52:2;45:3;8:100;;;12:14;3:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1315:175:0;1519:3;-1:-1:-1;;;;;1498:33:0;1507:10;-1:-1:-1;;;;;1498:33:0;;1524:6;1498:33;;;;;;;;;;;;;;-1:-1:-1;1546:4:0;;1015:541;-1:-1:-1;;;;1015:541:0:o;836:110:6:-;894:7;916:6;;;;909:14;;;;-1:-1:-1;936:5:6;;;836:110::o;1008:129::-;1066:7;1093:5;;;1111:6;;;;1104:14;;;;1131:1;1008:129;-1:-1:-1;;;1008:129:6:o;250:1309:0:-;;;;;;;;;;;;;:::o", + "source": "pragma solidity ^0.4.19;\n\nimport \"zeppelin-solidity/contracts/token/ERC20/BasicToken.sol\";\n\nimport './ERC223_Interface.sol';\nimport './ERC223_ReceivingInterface.sol';\nimport './ERC223_Utils.sol';\n\n/**\n * @title ERC223 basic token implementation.\n */\ncontract ERC223BasicToken is ERC223Interface, BasicToken {\n\n using SafeMath for uint256;\n\n function() public {\n //if ether is sent to this address, send it back.\n revert();\n }\n\n // Standard function transfer similar to ERC20 transfer with no _data .\n // Added due to backwards compatibility reasons .\n function transfer(address _to, uint _value) public returns (bool success) {\n\n bytes memory empty;\n return transfer(_to, _value, empty);\n\n }\n\n /**\n * @dev Transfer tokens to another from sender\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n * @param _data bytes data to attach that will be stored as event\n */\n function transfer(address _to, uint _value, bytes _data) public returns (bool success) {\n\n if((_to == address(0))) revert();\n if(_value > balances[msg.sender]) revert();\n\n balances[msg.sender] = balances[msg.sender].sub(_value);\n balances[_to] = balances[_to].add(_value);\n\n if(ERC223Utils.isContract(_to)) {\n ERC223ReceivingInterface receiver = ERC223ReceivingInterface(_to);\n receiver.tokenFallback(msg.sender, _value, _data);\n }\n\n Transfer(msg.sender, _to, _value);\n return true;\n\n }\n\n}\n", + "sourcePath": "/Users/paco/Development/amon/token-contract/contracts/ERC223/ERC223_BasicToken.sol", + "ast": { + "attributes": { + "absolutePath": "/Users/paco/Development/amon/token-contract/contracts/ERC223/ERC223_BasicToken.sol", + "exportedSymbols": { + "ERC223BasicToken": [ + 125 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.4", + ".19" + ] + }, + "id": 1, + "name": "PragmaDirective", + "src": "0:24:0" + }, + { + "attributes": { + "SourceUnit": 421, + "absolutePath": "zeppelin-solidity/contracts/token/ERC20/BasicToken.sol", + "file": "zeppelin-solidity/contracts/token/ERC20/BasicToken.sol", + "scope": 126, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 2, + "name": "ImportDirective", + "src": "26:64:0" + }, + { + "attributes": { + "SourceUnit": 153, + "absolutePath": "/Users/paco/Development/amon/token-contract/contracts/ERC223/ERC223_Interface.sol", + "file": "./ERC223_Interface.sol", + "scope": 126, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 3, + "name": "ImportDirective", + "src": "92:32:0" + }, + { + "attributes": { + "SourceUnit": 200, + "absolutePath": "/Users/paco/Development/amon/token-contract/contracts/ERC223/ERC223_ReceivingInterface.sol", + "file": "./ERC223_ReceivingInterface.sol", + "scope": 126, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 4, + "name": "ImportDirective", + "src": "125:41:0" + }, + { + "attributes": { + "SourceUnit": 220, + "absolutePath": "/Users/paco/Development/amon/token-contract/contracts/ERC223/ERC223_Utils.sol", + "file": "./ERC223_Utils.sol", + "scope": 126, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 5, + "name": "ImportDirective", + "src": "167:28:0" + }, + { + "attributes": { + "contractDependencies": [ + 152, + 420, + 452 + ], + "contractKind": "contract", + "documentation": "@title ERC223 basic token implementation.", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 125, + 420, + 152, + 452 + ], + "name": "ERC223BasicToken", + "scope": 126 + }, + "children": [ + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "ERC223Interface", + "referencedDeclaration": 152, + "type": "contract ERC223Interface" + }, + "id": 6, + "name": "UserDefinedTypeName", + "src": "279:15:0" + } + ], + "id": 7, + "name": "InheritanceSpecifier", + "src": "279:15:0" + }, + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "BasicToken", + "referencedDeclaration": 420, + "type": "contract BasicToken" + }, + "id": 8, + "name": "UserDefinedTypeName", + "src": "296:10:0" + } + ], + "id": 9, + "name": "InheritanceSpecifier", + "src": "296:10:0" + }, + { + "children": [ + { + "attributes": { + "contractScope": null, + "name": "SafeMath", + "referencedDeclaration": 324, + "type": "library SafeMath" + }, + "id": 10, + "name": "UserDefinedTypeName", + "src": "320:8:0" + }, + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 11, + "name": "ElementaryTypeName", + "src": "333:7:0" + } + ], + "id": 12, + "name": "UsingForDirective", + "src": "314:27:0" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "", + "payable": false, + "scope": 125, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 13, + "name": "ParameterList", + "src": "355:2:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 14, + "name": "ParameterList", + "src": "365:0:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 468, + "type": "function () pure", + "value": "revert" + }, + "id": 15, + "name": "Identifier", + "src": "433:6:0" + } + ], + "id": 16, + "name": "FunctionCall", + "src": "433:8:0" + } + ], + "id": 17, + "name": "ExpressionStatement", + "src": "433:8:0" + } + ], + "id": 18, + "name": "Block", + "src": "365:83:0" + } + ], + "id": 19, + "name": "FunctionDefinition", + "src": "347:101:0" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "transfer", + "payable": false, + "scope": 125, + "stateMutability": "nonpayable", + "superFunction": 407, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_to", + "scope": 38, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 20, + "name": "ElementaryTypeName", + "src": "602:7:0" + } + ], + "id": 21, + "name": "VariableDeclaration", + "src": "602:11:0" + }, + { + "attributes": { + "constant": false, + "name": "_value", + "scope": 38, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 22, + "name": "ElementaryTypeName", + "src": "615:4:0" + } + ], + "id": 23, + "name": "VariableDeclaration", + "src": "615:11:0" + } + ], + "id": 24, + "name": "ParameterList", + "src": "601:26:0" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 38, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 25, + "name": "ElementaryTypeName", + "src": "644:4:0" + } + ], + "id": 26, + "name": "VariableDeclaration", + "src": "644:12:0" + } + ], + "id": 27, + "name": "ParameterList", + "src": "643:14:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + null + ], + "initialValue": null + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "empty", + "scope": 38, + "stateVariable": false, + "storageLocation": "memory", + "type": "bytes memory", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes storage pointer" + }, + "id": 28, + "name": "ElementaryTypeName", + "src": "667:5:0" + } + ], + "id": 29, + "name": "VariableDeclaration", + "src": "667:18:0" + } + ], + "id": 30, + "name": "VariableDeclarationStatement", + "src": "667:18:0" + }, + { + "attributes": { + "functionReturnParameters": 27 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "overloadedDeclarations": [ + 38, + 124 + ], + "referencedDeclaration": 124, + "type": "function (address,uint256,bytes memory) returns (bool)", + "value": "transfer" + }, + "id": 31, + "name": "Identifier", + "src": "700:8:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 21, + "type": "address", + "value": "_to" + }, + "id": 32, + "name": "Identifier", + "src": "709:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 23, + "type": "uint256", + "value": "_value" + }, + "id": 33, + "name": "Identifier", + "src": "714:6:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 29, + "type": "bytes memory", + "value": "empty" + }, + "id": 34, + "name": "Identifier", + "src": "722:5:0" + } + ], + "id": 35, + "name": "FunctionCall", + "src": "700:28:0" + } + ], + "id": 36, + "name": "Return", + "src": "693:35:0" + } + ], + "id": 37, + "name": "Block", + "src": "658:78:0" + } + ], + "id": 38, + "name": "FunctionDefinition", + "src": "584:152:0" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "transfer", + "payable": false, + "scope": 125, + "stateMutability": "nonpayable", + "superFunction": 151, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_to", + "scope": 124, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 39, + "name": "ElementaryTypeName", + "src": "1033:7:0" + } + ], + "id": 40, + "name": "VariableDeclaration", + "src": "1033:11:0" + }, + { + "attributes": { + "constant": false, + "name": "_value", + "scope": 124, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 41, + "name": "ElementaryTypeName", + "src": "1046:4:0" + } + ], + "id": 42, + "name": "VariableDeclaration", + "src": "1046:11:0" + }, + { + "attributes": { + "constant": false, + "name": "_data", + "scope": 124, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes memory", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes storage pointer" + }, + "id": 43, + "name": "ElementaryTypeName", + "src": "1059:5:0" + } + ], + "id": 44, + "name": "VariableDeclaration", + "src": "1059:11:0" + } + ], + "id": 45, + "name": "ParameterList", + "src": "1032:39:0" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 124, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 46, + "name": "ElementaryTypeName", + "src": "1088:4:0" + } + ], + "id": 47, + "name": "VariableDeclaration", + "src": "1088:12:0" + } + ], + "id": 48, + "name": "ParameterList", + "src": "1087:14:0" + }, + { + "children": [ + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 40, + "type": "address", + "value": "_to" + }, + "id": 49, + "name": "Identifier", + "src": "1115:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 50, + "name": "ElementaryTypeNameExpression", + "src": "1122:7:0" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 51, + "name": "Literal", + "src": "1130:1:0" + } + ], + "id": 52, + "name": "FunctionCall", + "src": "1122:10:0" + } + ], + "id": 53, + "name": "BinaryOperation", + "src": "1115:17:0" + } + ], + "id": 54, + "name": "TupleExpression", + "src": "1114:19:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 468, + "type": "function () pure", + "value": "revert" + }, + "id": 55, + "name": "Identifier", + "src": "1135:6:0" + } + ], + "id": 56, + "name": "FunctionCall", + "src": "1135:8:0" + } + ], + "id": 57, + "name": "ExpressionStatement", + "src": "1135:8:0" + } + ], + "id": 58, + "name": "IfStatement", + "src": "1111:32:0" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 42, + "type": "uint256", + "value": "_value" + }, + "id": 59, + "name": "Identifier", + "src": "1154:6:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 337, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 60, + "name": "Identifier", + "src": "1163:8:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 464, + "type": "msg", + "value": "msg" + }, + "id": 61, + "name": "Identifier", + "src": "1172:3:0" + } + ], + "id": 62, + "name": "MemberAccess", + "src": "1172:10:0" + } + ], + "id": 63, + "name": "IndexAccess", + "src": "1163:20:0" + } + ], + "id": 64, + "name": "BinaryOperation", + "src": "1154:29:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "arguments": [ + null + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + null + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 468, + "type": "function () pure", + "value": "revert" + }, + "id": 65, + "name": "Identifier", + "src": "1185:6:0" + } + ], + "id": 66, + "name": "FunctionCall", + "src": "1185:8:0" + } + ], + "id": 67, + "name": "ExpressionStatement", + "src": "1185:8:0" + } + ], + "id": 68, + "name": "IfStatement", + "src": "1151:42:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 337, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 69, + "name": "Identifier", + "src": "1202:8:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 464, + "type": "msg", + "value": "msg" + }, + "id": 70, + "name": "Identifier", + "src": "1211:3:0" + } + ], + "id": 71, + "name": "MemberAccess", + "src": "1211:10:0" + } + ], + "id": 72, + "name": "IndexAccess", + "src": "1202:20:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sub", + "referencedDeclaration": 299, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 337, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 73, + "name": "Identifier", + "src": "1225:8:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 464, + "type": "msg", + "value": "msg" + }, + "id": 74, + "name": "Identifier", + "src": "1234:3:0" + } + ], + "id": 75, + "name": "MemberAccess", + "src": "1234:10:0" + } + ], + "id": 76, + "name": "IndexAccess", + "src": "1225:20:0" + } + ], + "id": 77, + "name": "MemberAccess", + "src": "1225:24:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 42, + "type": "uint256", + "value": "_value" + }, + "id": 78, + "name": "Identifier", + "src": "1250:6:0" + } + ], + "id": 79, + "name": "FunctionCall", + "src": "1225:32:0" + } + ], + "id": 80, + "name": "Assignment", + "src": "1202:55:0" + } + ], + "id": 81, + "name": "ExpressionStatement", + "src": "1202:55:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 337, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 82, + "name": "Identifier", + "src": "1265:8:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 40, + "type": "address", + "value": "_to" + }, + "id": 83, + "name": "Identifier", + "src": "1274:3:0" + } + ], + "id": 84, + "name": "IndexAccess", + "src": "1265:13:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "add", + "referencedDeclaration": 323, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 337, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 85, + "name": "Identifier", + "src": "1281:8:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 40, + "type": "address", + "value": "_to" + }, + "id": 86, + "name": "Identifier", + "src": "1290:3:0" + } + ], + "id": 87, + "name": "IndexAccess", + "src": "1281:13:0" + } + ], + "id": 88, + "name": "MemberAccess", + "src": "1281:17:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 42, + "type": "uint256", + "value": "_value" + }, + "id": 89, + "name": "Identifier", + "src": "1299:6:0" + } + ], + "id": 90, + "name": "FunctionCall", + "src": "1281:25:0" + } + ], + "id": 91, + "name": "Assignment", + "src": "1265:41:0" + } + ], + "id": 92, + "name": "ExpressionStatement", + "src": "1265:41:0" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "isContract", + "referencedDeclaration": 218, + "type": "function (address) view returns (bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 219, + "type": "type(library ERC223Utils)", + "value": "ERC223Utils" + }, + "id": 93, + "name": "Identifier", + "src": "1318:11:0" + } + ], + "id": 94, + "name": "MemberAccess", + "src": "1318:22:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 40, + "type": "address", + "value": "_to" + }, + "id": 95, + "name": "Identifier", + "src": "1341:3:0" + } + ], + "id": 96, + "name": "FunctionCall", + "src": "1318:27:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 98 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "receiver", + "scope": 124, + "stateVariable": false, + "storageLocation": "default", + "type": "contract ERC223ReceivingInterface", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "ERC223ReceivingInterface", + "referencedDeclaration": 199, + "type": "contract ERC223ReceivingInterface" + }, + "id": 97, + "name": "UserDefinedTypeName", + "src": "1357:24:0" + } + ], + "id": 98, + "name": "VariableDeclaration", + "src": "1357:33:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract ERC223ReceivingInterface", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 199, + "type": "type(contract ERC223ReceivingInterface)", + "value": "ERC223ReceivingInterface" + }, + "id": 99, + "name": "Identifier", + "src": "1393:24:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 40, + "type": "address", + "value": "_to" + }, + "id": 100, + "name": "Identifier", + "src": "1418:3:0" + } + ], + "id": 101, + "name": "FunctionCall", + "src": "1393:29:0" + } + ], + "id": 102, + "name": "VariableDeclarationStatement", + "src": "1357:65:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "tokenFallback", + "referencedDeclaration": 198, + "type": "function (address,uint256,bytes memory) external" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 98, + "type": "contract ERC223ReceivingInterface", + "value": "receiver" + }, + "id": 103, + "name": "Identifier", + "src": "1432:8:0" + } + ], + "id": 105, + "name": "MemberAccess", + "src": "1432:22:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 464, + "type": "msg", + "value": "msg" + }, + "id": 106, + "name": "Identifier", + "src": "1455:3:0" + } + ], + "id": 107, + "name": "MemberAccess", + "src": "1455:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 42, + "type": "uint256", + "value": "_value" + }, + "id": 108, + "name": "Identifier", + "src": "1467:6:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 44, + "type": "bytes memory", + "value": "_data" + }, + "id": 109, + "name": "Identifier", + "src": "1475:5:0" + } + ], + "id": 110, + "name": "FunctionCall", + "src": "1432:49:0" + } + ], + "id": 111, + "name": "ExpressionStatement", + "src": "1432:49:0" + } + ], + "id": 112, + "name": "Block", + "src": "1347:143:0" + } + ], + "id": 113, + "name": "IfStatement", + "src": "1315:175:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + 140, + 451 + ], + "referencedDeclaration": 451, + "type": "function (address,address,uint256)", + "value": "Transfer" + }, + "id": 114, + "name": "Identifier", + "src": "1498:8:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 464, + "type": "msg", + "value": "msg" + }, + "id": 115, + "name": "Identifier", + "src": "1507:3:0" + } + ], + "id": 116, + "name": "MemberAccess", + "src": "1507:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 40, + "type": "address", + "value": "_to" + }, + "id": 117, + "name": "Identifier", + "src": "1519:3:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 42, + "type": "uint256", + "value": "_value" + }, + "id": 118, + "name": "Identifier", + "src": "1524:6:0" + } + ], + "id": 119, + "name": "FunctionCall", + "src": "1498:33:0" + } + ], + "id": 120, + "name": "ExpressionStatement", + "src": "1498:33:0" + }, + { + "attributes": { + "functionReturnParameters": 48 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 121, + "name": "Literal", + "src": "1546:4:0" + } + ], + "id": 122, + "name": "Return", + "src": "1539:11:0" + } + ], + "id": 123, + "name": "Block", + "src": "1102:454:0" + } + ], + "id": 124, + "name": "FunctionDefinition", + "src": "1015:541:0" + } + ], + "id": 125, + "name": "ContractDefinition", + "src": "250:1309:0" + } + ], + "id": 126, + "name": "SourceUnit", + "src": "0:1560:0" + }, + "compiler": { + "name": "solc", + "version": "0.4.19+commit.c4cbbb05.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "1.0.1", + "updatedAt": "2018-02-22T16:06:59.984Z" +} \ No newline at end of file diff --git a/build/contracts/ERC223Interface.json b/build/contracts/ERC223Interface.json new file mode 100644 index 0000000..25eeb98 --- /dev/null +++ b/build/contracts/ERC223Interface.json @@ -0,0 +1,503 @@ +{ + "contractName": "ERC223Interface", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "who", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "name": "_to", + "type": "address" + }, + { + "indexed": true, + "name": "_value", + "type": "uint256" + }, + { + "indexed": false, + "name": "_data", + "type": "bytes" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + }, + { + "name": "_data", + "type": "bytes" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "sourceMap": "", + "deployedSourceMap": "", + "source": "pragma solidity ^0.4.19;\n\nimport \"zeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol\";\n\n/**\n * @title ERC223 standard token interface.\n */\n\ncontract ERC223Interface is ERC20Basic {\n\n /**\n * @dev triggered when transfer is successfully called.\n *\n * @param _from Sender address.\n * @param _to Receiver address.\n * @param _value Amount of tokens that will be transferred.\n * @param _data Transaction metadata.\n */\n event Transfer(address indexed _from, address indexed _to, uint256 indexed _value, bytes _data);\n\n /**\n * @dev Transfer the specified amount of tokens to the specified address.\n * Now with a new parameter _data.\n *\n * @param _to Receiver address.\n * @param _value Amount of tokens that will be transferred.\n * @param _data Transaction metadata.\n */\n function transfer(address _to, uint _value, bytes _data) public returns (bool);\n\n}\n", + "sourcePath": "/Users/paco/Development/amon/token-contract/contracts/ERC223/ERC223_Interface.sol", + "ast": { + "attributes": { + "absolutePath": "/Users/paco/Development/amon/token-contract/contracts/ERC223/ERC223_Interface.sol", + "exportedSymbols": { + "ERC223Interface": [ + 152 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.4", + ".19" + ] + }, + "id": 127, + "name": "PragmaDirective", + "src": "0:24:1" + }, + { + "attributes": { + "SourceUnit": 453, + "absolutePath": "zeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol", + "file": "zeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol", + "scope": 153, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 128, + "name": "ImportDirective", + "src": "26:64:1" + }, + { + "attributes": { + "contractDependencies": [ + 452 + ], + "contractKind": "contract", + "documentation": "@title ERC223 standard token interface.", + "fullyImplemented": false, + "linearizedBaseContracts": [ + 152, + 452 + ], + "name": "ERC223Interface", + "scope": 153 + }, + "children": [ + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "ERC20Basic", + "referencedDeclaration": 452, + "type": "contract ERC20Basic" + }, + "id": 129, + "name": "UserDefinedTypeName", + "src": "172:10:1" + } + ], + "id": 130, + "name": "InheritanceSpecifier", + "src": "172:10:1" + }, + { + "attributes": { + "anonymous": false, + "name": "Transfer" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "_from", + "scope": 140, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 131, + "name": "ElementaryTypeName", + "src": "478:7:1" + } + ], + "id": 132, + "name": "VariableDeclaration", + "src": "478:21:1" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "_to", + "scope": 140, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 133, + "name": "ElementaryTypeName", + "src": "501:7:1" + } + ], + "id": 134, + "name": "VariableDeclaration", + "src": "501:19:1" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "_value", + "scope": 140, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 135, + "name": "ElementaryTypeName", + "src": "522:7:1" + } + ], + "id": 136, + "name": "VariableDeclaration", + "src": "522:22:1" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "_data", + "scope": 140, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes memory", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes storage pointer" + }, + "id": 137, + "name": "ElementaryTypeName", + "src": "546:5:1" + } + ], + "id": 138, + "name": "VariableDeclaration", + "src": "546:11:1" + } + ], + "id": 139, + "name": "ParameterList", + "src": "477:81:1" + } + ], + "id": 140, + "name": "EventDefinition", + "src": "463:96:1" + }, + { + "attributes": { + "body": null, + "constant": false, + "implemented": false, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "transfer", + "payable": false, + "scope": 152, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_to", + "scope": 151, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 141, + "name": "ElementaryTypeName", + "src": "881:7:1" + } + ], + "id": 142, + "name": "VariableDeclaration", + "src": "881:11:1" + }, + { + "attributes": { + "constant": false, + "name": "_value", + "scope": 151, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 143, + "name": "ElementaryTypeName", + "src": "894:4:1" + } + ], + "id": 144, + "name": "VariableDeclaration", + "src": "894:11:1" + }, + { + "attributes": { + "constant": false, + "name": "_data", + "scope": 151, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes memory", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes storage pointer" + }, + "id": 145, + "name": "ElementaryTypeName", + "src": "907:5:1" + } + ], + "id": 146, + "name": "VariableDeclaration", + "src": "907:11:1" + } + ], + "id": 147, + "name": "ParameterList", + "src": "880:39:1" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 151, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 148, + "name": "ElementaryTypeName", + "src": "936:4:1" + } + ], + "id": 149, + "name": "VariableDeclaration", + "src": "936:4:1" + } + ], + "id": 150, + "name": "ParameterList", + "src": "935:6:1" + } + ], + "id": 151, + "name": "FunctionDefinition", + "src": "863:79:1" + } + ], + "id": 152, + "name": "ContractDefinition", + "src": "144:801:1" + } + ], + "id": 153, + "name": "SourceUnit", + "src": "0:946:1" + }, + "compiler": { + "name": "solc", + "version": "0.4.19+commit.c4cbbb05.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "1.0.1", + "updatedAt": "2018-02-22T16:06:59.985Z" +} \ No newline at end of file diff --git a/build/contracts/ERC223ReceivingContract.json b/build/contracts/ERC223ReceivingContract.json new file mode 100644 index 0000000..5d1addb --- /dev/null +++ b/build/contracts/ERC223ReceivingContract.json @@ -0,0 +1,560 @@ +{ + "contractName": "ERC223ReceivingContract", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "name": "token", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "name": "_data", + "type": "bytes" + } + ], + "name": "TokenDeposit", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + }, + { + "name": "_data", + "type": "bytes" + } + ], + "name": "tokenFallback", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x6060604052341561000f57600080fd5b6101c28061001e6000396000f3006060604052600436106100405763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663c0ee0b8a8114610045575b600080fd5b341561005057600080fd5b6100b76004803573ffffffffffffffffffffffffffffffffffffffff169060248035919060649060443590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506100b995505050505050565b005b6000821115610191573373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f55619005194c319e5c426456d42fe6417ad712ccbbf7753c4db10b0bffd9a396848460405182815260406020820181815290820183818151815260200191508051906020019080838360005b8381101561015557808201518382015260200161013d565b50505050905090810190601f1680156101825780820380516001836020036101000a031916815260200191505b50935050505060405180910390a35b5050505600a165627a7a723058208bae61a2e5ca2072bc54a1b7570a21cb4fef71abb280a9309687005586958e450029", + "deployedBytecode": "0x6060604052600436106100405763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663c0ee0b8a8114610045575b600080fd5b341561005057600080fd5b6100b76004803573ffffffffffffffffffffffffffffffffffffffff169060248035919060649060443590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506100b995505050505050565b005b6000821115610191573373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f55619005194c319e5c426456d42fe6417ad712ccbbf7753c4db10b0bffd9a396848460405182815260406020820181815290820183818151815260200191508051906020019080838360005b8381101561015557808201518382015260200161013d565b50505050905090810190601f1680156101825780820380516001836020036101000a031916815260200191505b50935050505060405180910390a35b5050505600a165627a7a723058208bae61a2e5ca2072bc54a1b7570a21cb4fef71abb280a9309687005586958e450029", + "sourceMap": "90:531:2:-;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "90:531:2:-;;;;;;;;;;;;;;;;;;;;;;;455:164;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;455:164:2;;-1:-1:-1;455:164:2;;-1:-1:-1;;;;;;455:164:2;;;;550:1;541:6;:10;537:74;;;585:10;565:46;;578:5;565:46;;;597:6;605:5;565:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:2;8:100;;;99:1;94:3;90;84:5;71:3;;;64:6;52:2;45:3;8:100;;;12:14;3:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;537:74:2;455:164;;;:::o", + "source": "pragma solidity ^0.4.19;\n\n /**\n * @title Contract that will work with ERC223 tokens.\n */\n\ncontract ERC223ReceivingContract {\n\n event TokenDeposit(address indexed sender, address indexed token, uint value, bytes _data);\n\n /**\n * @dev Standard ERC223 function that will handle incoming token transfers.\n *\n * @param _from Token sender address.\n * @param _value Amount of tokens.\n * @param _data Transaction metadata.\n */\n function tokenFallback(address _from, uint _value, bytes _data) public {\n\n if (_value > 0)\n TokenDeposit(_from, msg.sender, _value, _data);\n\n }\n}\n", + "sourcePath": "/Users/paco/Development/amon/token-contract/contracts/ERC223/ERC223_ReceivingContract.sol", + "ast": { + "attributes": { + "absolutePath": "/Users/paco/Development/amon/token-contract/contracts/ERC223/ERC223_ReceivingContract.sol", + "exportedSymbols": { + "ERC223ReceivingContract": [ + 187 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.4", + ".19" + ] + }, + "id": 154, + "name": "PragmaDirective", + "src": "0:24:2" + }, + { + "attributes": { + "baseContracts": [ + null + ], + "contractDependencies": [ + null + ], + "contractKind": "contract", + "documentation": "@title Contract that will work with ERC223 tokens.", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 187 + ], + "name": "ERC223ReceivingContract", + "scope": 188 + }, + "children": [ + { + "attributes": { + "anonymous": false, + "name": "TokenDeposit" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "indexed": true, + "name": "sender", + "scope": 164, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 155, + "name": "ElementaryTypeName", + "src": "149:7:2" + } + ], + "id": 156, + "name": "VariableDeclaration", + "src": "149:22:2" + }, + { + "attributes": { + "constant": false, + "indexed": true, + "name": "token", + "scope": 164, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 157, + "name": "ElementaryTypeName", + "src": "173:7:2" + } + ], + "id": 158, + "name": "VariableDeclaration", + "src": "173:21:2" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "value", + "scope": 164, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 159, + "name": "ElementaryTypeName", + "src": "196:4:2" + } + ], + "id": 160, + "name": "VariableDeclaration", + "src": "196:10:2" + }, + { + "attributes": { + "constant": false, + "indexed": false, + "name": "_data", + "scope": 164, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes memory", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes storage pointer" + }, + "id": 161, + "name": "ElementaryTypeName", + "src": "208:5:2" + } + ], + "id": 162, + "name": "VariableDeclaration", + "src": "208:11:2" + } + ], + "id": 163, + "name": "ParameterList", + "src": "148:72:2" + } + ], + "id": 164, + "name": "EventDefinition", + "src": "130:91:2" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "tokenFallback", + "payable": false, + "scope": 187, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_from", + "scope": 186, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 165, + "name": "ElementaryTypeName", + "src": "478:7:2" + } + ], + "id": 166, + "name": "VariableDeclaration", + "src": "478:13:2" + }, + { + "attributes": { + "constant": false, + "name": "_value", + "scope": 186, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 167, + "name": "ElementaryTypeName", + "src": "493:4:2" + } + ], + "id": 168, + "name": "VariableDeclaration", + "src": "493:11:2" + }, + { + "attributes": { + "constant": false, + "name": "_data", + "scope": 186, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes memory", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes storage pointer" + }, + "id": 169, + "name": "ElementaryTypeName", + "src": "506:5:2" + } + ], + "id": 170, + "name": "VariableDeclaration", + "src": "506:11:2" + } + ], + "id": 171, + "name": "ParameterList", + "src": "477:41:2" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 172, + "name": "ParameterList", + "src": "526:0:2" + }, + { + "children": [ + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 168, + "type": "uint256", + "value": "_value" + }, + "id": 173, + "name": "Identifier", + "src": "541:6:2" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 174, + "name": "Literal", + "src": "550:1:2" + } + ], + "id": 175, + "name": "BinaryOperation", + "src": "541:10:2" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 164, + "type": "function (address,address,uint256,bytes memory)", + "value": "TokenDeposit" + }, + "id": 176, + "name": "Identifier", + "src": "565:12:2" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 166, + "type": "address", + "value": "_from" + }, + "id": 177, + "name": "Identifier", + "src": "578:5:2" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 464, + "type": "msg", + "value": "msg" + }, + "id": 178, + "name": "Identifier", + "src": "585:3:2" + } + ], + "id": 179, + "name": "MemberAccess", + "src": "585:10:2" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 168, + "type": "uint256", + "value": "_value" + }, + "id": 180, + "name": "Identifier", + "src": "597:6:2" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 170, + "type": "bytes memory", + "value": "_data" + }, + "id": 181, + "name": "Identifier", + "src": "605:5:2" + } + ], + "id": 182, + "name": "FunctionCall", + "src": "565:46:2" + } + ], + "id": 183, + "name": "ExpressionStatement", + "src": "565:46:2" + } + ], + "id": 184, + "name": "IfStatement", + "src": "537:74:2" + } + ], + "id": 185, + "name": "Block", + "src": "526:93:2" + } + ], + "id": 186, + "name": "FunctionDefinition", + "src": "455:164:2" + } + ], + "id": 187, + "name": "ContractDefinition", + "src": "90:531:2" + } + ], + "id": 188, + "name": "SourceUnit", + "src": "0:622:2" + }, + "compiler": { + "name": "solc", + "version": "0.4.19+commit.c4cbbb05.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "1.0.1", + "updatedAt": "2018-02-22T16:06:59.985Z" +} \ No newline at end of file diff --git a/build/contracts/ERC223ReceivingInterface.json b/build/contracts/ERC223ReceivingInterface.json new file mode 100644 index 0000000..fc96120 --- /dev/null +++ b/build/contracts/ERC223ReceivingInterface.json @@ -0,0 +1,209 @@ +{ + "contractName": "ERC223ReceivingInterface", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + }, + { + "name": "_data", + "type": "bytes" + } + ], + "name": "tokenFallback", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "sourceMap": "", + "deployedSourceMap": "", + "source": "pragma solidity ^0.4.19;\n\n /**\n * @title Interface for ERC223 Receiving Contract.\n */\n\ncontract ERC223ReceivingInterface {\n\n function tokenFallback(address _from, uint _value, bytes _data) public;\n\n}\n", + "sourcePath": "/Users/paco/Development/amon/token-contract/contracts/ERC223/ERC223_ReceivingInterface.sol", + "ast": { + "attributes": { + "absolutePath": "/Users/paco/Development/amon/token-contract/contracts/ERC223/ERC223_ReceivingInterface.sol", + "exportedSymbols": { + "ERC223ReceivingInterface": [ + 199 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.4", + ".19" + ] + }, + "id": 189, + "name": "PragmaDirective", + "src": "0:24:3" + }, + { + "attributes": { + "baseContracts": [ + null + ], + "contractDependencies": [ + null + ], + "contractKind": "contract", + "documentation": "@title Interface for ERC223 Receiving Contract.", + "fullyImplemented": false, + "linearizedBaseContracts": [ + 199 + ], + "name": "ERC223ReceivingInterface", + "scope": 200 + }, + "children": [ + { + "attributes": { + "body": null, + "constant": false, + "implemented": false, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "tokenFallback", + "payable": false, + "scope": 199, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_from", + "scope": 198, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 190, + "name": "ElementaryTypeName", + "src": "151:7:3" + } + ], + "id": 191, + "name": "VariableDeclaration", + "src": "151:13:3" + }, + { + "attributes": { + "constant": false, + "name": "_value", + "scope": 198, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 192, + "name": "ElementaryTypeName", + "src": "166:4:3" + } + ], + "id": 193, + "name": "VariableDeclaration", + "src": "166:11:3" + }, + { + "attributes": { + "constant": false, + "name": "_data", + "scope": 198, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes memory", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes storage pointer" + }, + "id": 194, + "name": "ElementaryTypeName", + "src": "179:5:3" + } + ], + "id": 195, + "name": "VariableDeclaration", + "src": "179:11:3" + } + ], + "id": 196, + "name": "ParameterList", + "src": "150:41:3" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 197, + "name": "ParameterList", + "src": "198:0:3" + } + ], + "id": 198, + "name": "FunctionDefinition", + "src": "128:71:3" + } + ], + "id": 199, + "name": "ContractDefinition", + "src": "87:115:3" + } + ], + "id": 200, + "name": "SourceUnit", + "src": "0:203:3" + }, + "compiler": { + "name": "solc", + "version": "0.4.19+commit.c4cbbb05.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "1.0.1", + "updatedAt": "2018-02-22T16:06:59.985Z" +} \ No newline at end of file diff --git a/build/contracts/ERC223StandardToken.json b/build/contracts/ERC223StandardToken.json new file mode 100644 index 0000000..0650373 --- /dev/null +++ b/build/contracts/ERC223StandardToken.json @@ -0,0 +1,2426 @@ +{ + "contractName": "ERC223StandardToken", + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseApproval", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + }, + { + "name": "_data", + "type": "bytes" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_addedValue", + "type": "uint256" + } + ], + "name": "increaseApproval", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "payable": false, + "stateMutability": "nonpayable", + "type": "fallback" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "_from", + "type": "address" + }, + { + "indexed": true, + "name": "_to", + "type": "address" + }, + { + "indexed": true, + "name": "_value", + "type": "uint256" + }, + { + "indexed": false, + "name": "_data", + "type": "bytes" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + }, + { + "name": "_data", + "type": "bytes" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x6060604052341561000f57600080fd5b610af28061001e6000396000f30060606040526004361061008a5763ffffffff60e060020a600035041663095ea7b3811461009a57806318160ddd146100d057806323b872dd146100f5578063661884631461011d57806370a082311461013f578063a9059cbb1461015e578063ab67aa5814610180578063be45fd62146101ec578063d73dd62314610251578063dd62ed3e14610273575b341561009557600080fd5b600080fd5b34156100a557600080fd5b6100bc600160a060020a0360043516602435610298565b604051901515815260200160405180910390f35b34156100db57600080fd5b6100e3610304565b60405190815260200160405180910390f35b341561010057600080fd5b6100bc600160a060020a036004358116906024351660443561030a565b341561012857600080fd5b6100bc600160a060020a0360043516602435610329565b341561014a57600080fd5b6100e3600160a060020a0360043516610423565b341561016957600080fd5b6100bc600160a060020a036004351660243561043e565b341561018b57600080fd5b6100bc600160a060020a036004803582169160248035909116916044359160849060643590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061045b95505050505050565b34156101f757600080fd5b6100bc60048035600160a060020a03169060248035919060649060443590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061075195505050505050565b341561025c57600080fd5b6100bc600160a060020a03600435166024356109bd565b341561027e57600080fd5b6100e3600160a060020a0360043581169060243516610a61565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60015490565b6000610314610ab4565b6103208585858461045b565b95945050505050565b600160a060020a0333811660009081526002602090815260408083209386168352929052908120548083111561038657600160a060020a0333811660009081526002602090815260408083209388168352929052908120556103bd565b610396818463ffffffff610a8c16565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526020819052604090205490565b6000610448610ab4565b610453848483610751565b949350505050565b600080600160a060020a038516151561047357600080fd5b600160a060020a03861660009081526020819052604090205484111561049857600080fd5b600160a060020a03808716600090815260026020908152604080832033909416835292905220548411156104cb57600080fd5b600160a060020a0386166000908152602081905260409020546104f4908563ffffffff610a8c16565b600160a060020a038088166000908152602081905260408082209390935590871681522054610529908563ffffffff610a9e16565b600160a060020a038087166000908152602081815260408083209490945589831682526002815283822033909316825291909152205461056f908563ffffffff610a8c16565b600160a060020a0380881660009081526002602090815260408083203390941683529290528181209290925573__ERC223Utils___________________________91631627905591889190516020015260405160e060020a63ffffffff8416028152600160a060020a03909116600482015260240160206040518083038186803b15156105fb57600080fd5b6102c65a03f4151561060c57600080fd5b50505060405180519050156106fe575083600160a060020a03811663c0ee0b8a8786866040518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561069c578082015183820152602001610684565b50505050905090810190601f1680156106c95780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15156106e957600080fd5b6102c65a03f115156106fa57600080fd5b5050505b84600160a060020a031686600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8660405190815260200160405180910390a350600195945050505050565b600080600160a060020a038516151561076957600080fd5b600160a060020a03331660009081526020819052604090205484111561078e57600080fd5b600160a060020a0333166000908152602081905260409020546107b7908563ffffffff610a8c16565b600160a060020a0333811660009081526020819052604080822093909355908716815220546107ec908563ffffffff610a9e16565b600160a060020a0386166000908152602081905260408082209290925573__ERC223Utils___________________________916316279055918891516020015260405160e060020a63ffffffff8416028152600160a060020a03909116600482015260240160206040518083038186803b151561086857600080fd5b6102c65a03f4151561087957600080fd5b505050604051805190501561096b575083600160a060020a03811663c0ee0b8a3386866040518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156109095780820151838201526020016108f1565b50505050905090810190601f1680156109365780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b151561095657600080fd5b6102c65a03f1151561096757600080fd5b5050505b84600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8660405190815260200160405180910390a3506001949350505050565b600160a060020a0333811660009081526002602090815260408083209386168352929052908120546109f5908363ffffffff610a9e16565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600082821115610a9857fe5b50900390565b600082820183811015610aad57fe5b9392505050565b602060405190810160405260008152905600a165627a7a723058202c4a2e6140cbaf80699b043e126d35ee75471392db9382c931c57d78a053fca20029", + "deployedBytecode": "0x60606040526004361061008a5763ffffffff60e060020a600035041663095ea7b3811461009a57806318160ddd146100d057806323b872dd146100f5578063661884631461011d57806370a082311461013f578063a9059cbb1461015e578063ab67aa5814610180578063be45fd62146101ec578063d73dd62314610251578063dd62ed3e14610273575b341561009557600080fd5b600080fd5b34156100a557600080fd5b6100bc600160a060020a0360043516602435610298565b604051901515815260200160405180910390f35b34156100db57600080fd5b6100e3610304565b60405190815260200160405180910390f35b341561010057600080fd5b6100bc600160a060020a036004358116906024351660443561030a565b341561012857600080fd5b6100bc600160a060020a0360043516602435610329565b341561014a57600080fd5b6100e3600160a060020a0360043516610423565b341561016957600080fd5b6100bc600160a060020a036004351660243561043e565b341561018b57600080fd5b6100bc600160a060020a036004803582169160248035909116916044359160849060643590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061045b95505050505050565b34156101f757600080fd5b6100bc60048035600160a060020a03169060248035919060649060443590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061075195505050505050565b341561025c57600080fd5b6100bc600160a060020a03600435166024356109bd565b341561027e57600080fd5b6100e3600160a060020a0360043581169060243516610a61565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60015490565b6000610314610ab4565b6103208585858461045b565b95945050505050565b600160a060020a0333811660009081526002602090815260408083209386168352929052908120548083111561038657600160a060020a0333811660009081526002602090815260408083209388168352929052908120556103bd565b610396818463ffffffff610a8c16565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526020819052604090205490565b6000610448610ab4565b610453848483610751565b949350505050565b600080600160a060020a038516151561047357600080fd5b600160a060020a03861660009081526020819052604090205484111561049857600080fd5b600160a060020a03808716600090815260026020908152604080832033909416835292905220548411156104cb57600080fd5b600160a060020a0386166000908152602081905260409020546104f4908563ffffffff610a8c16565b600160a060020a038088166000908152602081905260408082209390935590871681522054610529908563ffffffff610a9e16565b600160a060020a038087166000908152602081815260408083209490945589831682526002815283822033909316825291909152205461056f908563ffffffff610a8c16565b600160a060020a0380881660009081526002602090815260408083203390941683529290528181209290925573__ERC223Utils___________________________91631627905591889190516020015260405160e060020a63ffffffff8416028152600160a060020a03909116600482015260240160206040518083038186803b15156105fb57600080fd5b6102c65a03f4151561060c57600080fd5b50505060405180519050156106fe575083600160a060020a03811663c0ee0b8a8786866040518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561069c578082015183820152602001610684565b50505050905090810190601f1680156106c95780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15156106e957600080fd5b6102c65a03f115156106fa57600080fd5b5050505b84600160a060020a031686600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8660405190815260200160405180910390a350600195945050505050565b600080600160a060020a038516151561076957600080fd5b600160a060020a03331660009081526020819052604090205484111561078e57600080fd5b600160a060020a0333166000908152602081905260409020546107b7908563ffffffff610a8c16565b600160a060020a0333811660009081526020819052604080822093909355908716815220546107ec908563ffffffff610a9e16565b600160a060020a0386166000908152602081905260408082209290925573__ERC223Utils___________________________916316279055918891516020015260405160e060020a63ffffffff8416028152600160a060020a03909116600482015260240160206040518083038186803b151561086857600080fd5b6102c65a03f4151561087957600080fd5b505050604051805190501561096b575083600160a060020a03811663c0ee0b8a3386866040518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156109095780820151838201526020016108f1565b50505050905090810190601f1680156109365780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b151561095657600080fd5b6102c65a03f1151561096757600080fd5b5050505b84600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8660405190815260200160405180910390a3506001949350505050565b600160a060020a0333811660009081526002602090815260408083209386168352929052908120546109f5908363ffffffff610a9e16565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600082821115610a9857fe5b50900390565b600082820183811015610aad57fe5b9392505050565b602060405190810160405260008152905600a165627a7a723058202c4a2e6140cbaf80699b043e126d35ee75471392db9382c931c57d78a053fca20029", + "sourceMap": "257:1430:5:-;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "257:1430:5:-;;;;;;;;;-1:-1:-1;;;257:1430:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;433:8:1;;;1798:183:13;;;;;;;;;;-1:-1:-1;;;;;1798:183:13;;;;;;;;;;;;;;;;;;;;;;;;371:83:9;;;;;;;;;;;;;;;;;;;;;;;;;;;492:185:5;;;;;;;;;;-1:-1:-1;;;;;492:185:5;;;;;;;;;;;;3602:398:13;;;;;;;;;;-1:-1:-1;;;;;3602:398:13;;;;;;;1189:107:9;;;;;;;;;;-1:-1:-1;;;;;1189:107:9;;;;;584:152:1;;;;;;;;;;-1:-1:-1;;;;;584:152:1;;;;;;;1035:649:5;;;;;;;;;;-1:-1:-1;;;;;1035:649:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1035:649:5;;-1:-1:-1;1035:649:5;;-1:-1:-1;;;;;;1035:649:5;1015:541:1;;;;;;;;;;;;;-1:-1:-1;;;;;1015:541:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1015:541:1;;-1:-1:-1;1015:541:1;;-1:-1:-1;;;;;;1015:541:1;2883:257:13;;;;;;;;;;-1:-1:-1;;;;;2883:257:13;;;;;;;2300:126;;;;;;;;;;-1:-1:-1;;;;;2300:126:13;;;;;;;;;;1798:183;-1:-1:-1;;;;;1885:10:13;1877:19;;1865:4;1877:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;;:38;;;1865:4;;1877:29;:19;1921:38;;1909:6;;1921:38;;;;;;;;;;;;;-1:-1:-1;1972:4:13;1798:183;;;;:::o;371:83:9:-;437:12;;371:83;:::o;492:185:5:-;574:12;597:18;;:::i;:::-;630:39;643:5;650:3;655:6;663:5;630:12;:39::i;:::-;623:46;492:185;-1:-1:-1;;;;;492:185:5:o;3602:398:13:-;-1:-1:-1;;;;;3721:10:13;3713:19;;3685:4;3713:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;3752:27;;;3748:164;;;-1:-1:-1;;;;;3797:10:13;3789:19;;3821:1;3789:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;:33;3748:164;;;3875:30;:8;3888:16;3875:30;:12;:30;:::i;:::-;-1:-1:-1;;;;;3851:10:13;3843:19;;;;;;:7;:19;;;;;;;;:29;;;;;;;;;:62;3748:164;-1:-1:-1;;;;;3926:10:13;3917:61;;3948:19;;;;:7;:19;;;;;;;;3917:61;;;3948:29;;;;;;;;;;;;3917:61;;;;;;;;;;;;;;;-1:-1:-1;3991:4:13;;3602:398;-1:-1:-1;;;3602:398:13:o;1189:107:9:-;-1:-1:-1;;;;;1275:16:9;1245:15;1275:16;;;;;;;;;;;;1189:107::o;584:152:1:-;644:12;667:18;;:::i;:::-;700:28;709:3;714:6;722:5;700:8;:28::i;:::-;693:35;584:152;-1:-1:-1;;;;584:152:1:o;1035:649:5:-;1130:4;;-1:-1:-1;;;;;1152:17:5;;;;1144:26;;;;;;-1:-1:-1;;;;;1196:15:5;;:8;:15;;;;;;;;;;;1186:25;;;1178:34;;;;;;-1:-1:-1;;;;;1238:14:5;;;;;;;:7;:14;;;;;;;;1253:10;1238:26;;;;;;;;;;1228:36;;;1220:45;;;;;;-1:-1:-1;;;;;1292:15:5;;:8;:15;;;;;;;;;;;:27;;1312:6;1292:27;:19;:27;:::i;:::-;-1:-1:-1;;;;;1274:15:5;;;:8;:15;;;;;;;;;;;:45;;;;1343:13;;;;;;;:25;;1361:6;1343:25;:17;:25;:::i;:::-;-1:-1:-1;;;;;1327:13:5;;;:8;:13;;;;;;;;;;;:41;;;;1405:14;;;;;:7;:14;;;;;1420:10;1405:26;;;;;;;;;;;:38;;1436:6;1405:38;:30;:38;:::i;:::-;-1:-1:-1;;;;;1376:14:5;;;;;;;:7;:14;;;;;;;;1391:10;1376:26;;;;;;;;;;;:67;;;;1455:11;;:22;;1478:3;;1376:14;1455:27;;;;;;-1:-1:-1;;;1455:27:5;;;;;;-1:-1:-1;;;;;1455:27:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1452:170;;;-1:-1:-1;1555:3:5;-1:-1:-1;;;;;1569:22:5;;;1592:5;1599:6;1607:5;1569:44;;;;;-1:-1:-1;;;1569:44:5;;;;;;;-1:-1:-1;;;;;1569:44:5;-1:-1:-1;;;;;1569:44:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:2;8:100;;;99:1;94:3;90;84:5;71:3;;;64:6;52:2;45:3;8:100;;;12:14;3:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1452:170:5;1646:3;-1:-1:-1;;;;;1630:28:5;1639:5;-1:-1:-1;;;;;1630:28:5;;1651:6;1630:28;;;;;;;;;;;;;;-1:-1:-1;1673:4:5;;1035:649;-1:-1:-1;;;;;1035:649:5:o;1015:541:1:-;1088:12;;-1:-1:-1;;;;;1115:17:1;;;1111:32;;;1135:8;;;1111:32;-1:-1:-1;;;;;1172:10:1;1163:20;:8;:20;;;;;;;;;;;1154:29;;1151:42;;;1185:8;;;1151:42;-1:-1:-1;;;;;1234:10:1;1225:20;:8;:20;;;;;;;;;;;:32;;1250:6;1225:32;:24;:32;:::i;:::-;-1:-1:-1;;;;;1211:10:1;1202:20;;:8;:20;;;;;;;;;;;:55;;;;1281:13;;;;;;;:25;;1299:6;1281:25;:17;:25;:::i;:::-;-1:-1:-1;;;;;1265:13:1;;:8;:13;;;;;;;;;;;:41;;;;1318:11;;:22;;1274:3;;1318:27;;;;;;-1:-1:-1;;;1318:27:1;;;;;;-1:-1:-1;;;;;1318:27:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1315:175;;;-1:-1:-1;1418:3:1;-1:-1:-1;;;;;1432:22:1;;;1455:10;1467:6;1475:5;1432:49;;;;;-1:-1:-1;;;1432:49:1;;;;;;;-1:-1:-1;;;;;1432:49:1;-1:-1:-1;;;;;1432:49:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:2;8:100;;;99:1;94:3;90;84:5;71:3;;;64:6;52:2;45:3;8:100;;;12:14;3:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1315:175:1;1519:3;-1:-1:-1;;;;;1498:33:1;1507:10;-1:-1:-1;;;;;1498:33:1;;1524:6;1498:33;;;;;;;;;;;;;;-1:-1:-1;1546:4:1;;1015:541;-1:-1:-1;;;;1015:541:1:o;2883:257:13:-;-1:-1:-1;;;;;3013:10:13;3005:19;;2961:4;3005:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;:46;;3039:11;3005:46;:33;:46;:::i;:::-;-1:-1:-1;;;;;2981:10:13;2973:19;;;;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;;;:78;;;:29;;:19;;3057:61;;2973:78;3057:61;;;;;;;;;;;;;-1:-1:-1;3131:4:13;2883:257;;;;:::o;2300:126::-;-1:-1:-1;;;;;2396:15:13;;;2374:7;2396:15;;;:7;:15;;;;;;;;:25;;;;;;;;;;;;;2300:126::o;836:110:8:-;894:7;916:6;;;;909:14;;;;-1:-1:-1;936:5:8;;;836:110::o;1008:129::-;1066:7;1093:5;;;1111:6;;;;1104:14;;;;1131:1;1008:129;-1:-1:-1;;;1008:129:8:o;257:1430:5:-;;;;;;;;;;;;;:::o", + "source": "pragma solidity ^0.4.19;\n\nimport \"zeppelin-solidity/contracts/token/ERC20/StandardToken.sol\";\n\nimport './ERC223_BasicToken.sol';\nimport './ERC223_ReceivingInterface.sol';\nimport './ERC223_Utils.sol';\n\n/**\n * @title ERC223 standard token implementation.\n */\ncontract ERC223StandardToken is ERC223BasicToken, StandardToken {\n\n using SafeMath for uint256;\n\n\n // Standard function transfer similar to ERC20 transfer with no _data .\n // Added due to backwards compatibility reasons .\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {\n\n bytes memory empty;\n return transferFrom(_from, _to, _value, empty);\n\n }\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n * @param _data bytes data to attach that will be stored as event\n */\n function transferFrom(address _from, address _to, uint256 _value, bytes _data) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n\n if(ERC223Utils.isContract(_to)) {\n ERC223ReceivingInterface receiver = ERC223ReceivingInterface(_to);\n receiver.tokenFallback(_from, _value, _data);\n }\n\n Transfer(_from, _to, _value);\n return true;\n }\n\n}\n", + "sourcePath": "/Users/paco/Development/amon/token-contract/contracts/ERC223/ERC223_StandardToken.sol", + "ast": { + "attributes": { + "absolutePath": "/Users/paco/Development/amon/token-contract/contracts/ERC223/ERC223_StandardToken.sol", + "exportedSymbols": { + "ERC223StandardToken": [ + 396 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.4", + ".19" + ] + }, + "id": 254, + "name": "PragmaDirective", + "src": "0:24:5" + }, + { + "attributes": { + "SourceUnit": 1023, + "absolutePath": "zeppelin-solidity/contracts/token/ERC20/StandardToken.sol", + "file": "zeppelin-solidity/contracts/token/ERC20/StandardToken.sol", + "scope": 397, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 255, + "name": "ImportDirective", + "src": "26:67:5" + }, + { + "attributes": { + "SourceUnit": 179, + "absolutePath": "/Users/paco/Development/amon/token-contract/contracts/ERC223/ERC223_BasicToken.sol", + "file": "./ERC223_BasicToken.sol", + "scope": 397, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 256, + "name": "ImportDirective", + "src": "95:33:5" + }, + { + "attributes": { + "SourceUnit": 253, + "absolutePath": "/Users/paco/Development/amon/token-contract/contracts/ERC223/ERC223_ReceivingInterface.sol", + "file": "./ERC223_ReceivingInterface.sol", + "scope": 397, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 257, + "name": "ImportDirective", + "src": "129:41:5" + }, + { + "attributes": { + "SourceUnit": 417, + "absolutePath": "/Users/paco/Development/amon/token-contract/contracts/ERC223/ERC223_Utils.sol", + "file": "./ERC223_Utils.sol", + "scope": 397, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 258, + "name": "ImportDirective", + "src": "171:28:5" + }, + { + "attributes": { + "contractDependencies": [ + 178, + 205, + 667, + 744, + 776, + 1022 + ], + "contractKind": "contract", + "documentation": "@title ERC223 standard token implementation.", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 396, + 1022, + 178, + 667, + 744, + 205, + 776 + ], + "name": "ERC223StandardToken", + "scope": 397 + }, + "children": [ + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "ERC223BasicToken", + "referencedDeclaration": 178, + "type": "contract ERC223BasicToken" + }, + "id": 259, + "name": "UserDefinedTypeName", + "src": "289:16:5" + } + ], + "id": 260, + "name": "InheritanceSpecifier", + "src": "289:16:5" + }, + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "StandardToken", + "referencedDeclaration": 1022, + "type": "contract StandardToken" + }, + "id": 261, + "name": "UserDefinedTypeName", + "src": "307:13:5" + } + ], + "id": 262, + "name": "InheritanceSpecifier", + "src": "307:13:5" + }, + { + "children": [ + { + "attributes": { + "contractScope": null, + "name": "SafeMath", + "referencedDeclaration": 571, + "type": "library SafeMath" + }, + "id": 263, + "name": "UserDefinedTypeName", + "src": "334:8:5" + }, + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 264, + "name": "ElementaryTypeName", + "src": "347:7:5" + } + ], + "id": 265, + "name": "UsingForDirective", + "src": "328:27:5" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "transferFrom", + "payable": false, + "scope": 396, + "stateMutability": "nonpayable", + "superFunction": 876, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_from", + "scope": 287, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 266, + "name": "ElementaryTypeName", + "src": "514:7:5" + } + ], + "id": 267, + "name": "VariableDeclaration", + "src": "514:13:5" + }, + { + "attributes": { + "constant": false, + "name": "_to", + "scope": 287, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 268, + "name": "ElementaryTypeName", + "src": "529:7:5" + } + ], + "id": 269, + "name": "VariableDeclaration", + "src": "529:11:5" + }, + { + "attributes": { + "constant": false, + "name": "_value", + "scope": 287, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 270, + "name": "ElementaryTypeName", + "src": "542:7:5" + } + ], + "id": 271, + "name": "VariableDeclaration", + "src": "542:14:5" + } + ], + "id": 272, + "name": "ParameterList", + "src": "513:44:5" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "success", + "scope": 287, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 273, + "name": "ElementaryTypeName", + "src": "574:4:5" + } + ], + "id": 274, + "name": "VariableDeclaration", + "src": "574:12:5" + } + ], + "id": 275, + "name": "ParameterList", + "src": "573:14:5" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + null + ], + "initialValue": null + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "empty", + "scope": 287, + "stateVariable": false, + "storageLocation": "memory", + "type": "bytes memory", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes storage pointer" + }, + "id": 276, + "name": "ElementaryTypeName", + "src": "597:5:5" + } + ], + "id": 277, + "name": "VariableDeclaration", + "src": "597:18:5" + } + ], + "id": 278, + "name": "VariableDeclarationStatement", + "src": "597:18:5" + }, + { + "attributes": { + "functionReturnParameters": 275 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "overloadedDeclarations": [ + 287, + 395 + ], + "referencedDeclaration": 395, + "type": "function (address,address,uint256,bytes memory) returns (bool)", + "value": "transferFrom" + }, + "id": 279, + "name": "Identifier", + "src": "630:12:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 267, + "type": "address", + "value": "_from" + }, + "id": 280, + "name": "Identifier", + "src": "643:5:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 269, + "type": "address", + "value": "_to" + }, + "id": 281, + "name": "Identifier", + "src": "650:3:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 271, + "type": "uint256", + "value": "_value" + }, + "id": 282, + "name": "Identifier", + "src": "655:6:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 277, + "type": "bytes memory", + "value": "empty" + }, + "id": 283, + "name": "Identifier", + "src": "663:5:5" + } + ], + "id": 284, + "name": "FunctionCall", + "src": "630:39:5" + } + ], + "id": 285, + "name": "Return", + "src": "623:46:5" + } + ], + "id": 286, + "name": "Block", + "src": "588:89:5" + } + ], + "id": 287, + "name": "FunctionDefinition", + "src": "492:185:5" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "transferFrom", + "payable": false, + "scope": 396, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_from", + "scope": 395, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 288, + "name": "ElementaryTypeName", + "src": "1057:7:5" + } + ], + "id": 289, + "name": "VariableDeclaration", + "src": "1057:13:5" + }, + { + "attributes": { + "constant": false, + "name": "_to", + "scope": 395, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 290, + "name": "ElementaryTypeName", + "src": "1072:7:5" + } + ], + "id": 291, + "name": "VariableDeclaration", + "src": "1072:11:5" + }, + { + "attributes": { + "constant": false, + "name": "_value", + "scope": 395, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 292, + "name": "ElementaryTypeName", + "src": "1085:7:5" + } + ], + "id": 293, + "name": "VariableDeclaration", + "src": "1085:14:5" + }, + { + "attributes": { + "constant": false, + "name": "_data", + "scope": 395, + "stateVariable": false, + "storageLocation": "default", + "type": "bytes memory", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bytes", + "type": "bytes storage pointer" + }, + "id": 294, + "name": "ElementaryTypeName", + "src": "1101:5:5" + } + ], + "id": 295, + "name": "VariableDeclaration", + "src": "1101:11:5" + } + ], + "id": 296, + "name": "ParameterList", + "src": "1056:57:5" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 395, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 297, + "name": "ElementaryTypeName", + "src": "1130:4:5" + } + ], + "id": 298, + "name": "VariableDeclaration", + "src": "1130:4:5" + } + ], + "id": 299, + "name": "ParameterList", + "src": "1129:6:5" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1037, + "type": "function (bool) pure", + "value": "require" + }, + "id": 300, + "name": "Identifier", + "src": "1144:7:5" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 291, + "type": "address", + "value": "_to" + }, + "id": 301, + "name": "Identifier", + "src": "1152:3:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 302, + "name": "ElementaryTypeNameExpression", + "src": "1159:7:5" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 303, + "name": "Literal", + "src": "1167:1:5" + } + ], + "id": 304, + "name": "FunctionCall", + "src": "1159:10:5" + } + ], + "id": 305, + "name": "BinaryOperation", + "src": "1152:17:5" + } + ], + "id": 306, + "name": "FunctionCall", + "src": "1144:26:5" + } + ], + "id": 307, + "name": "ExpressionStatement", + "src": "1144:26:5" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1037, + "type": "function (bool) pure", + "value": "require" + }, + "id": 308, + "name": "Identifier", + "src": "1178:7:5" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 293, + "type": "uint256", + "value": "_value" + }, + "id": 309, + "name": "Identifier", + "src": "1186:6:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 584, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 310, + "name": "Identifier", + "src": "1196:8:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 289, + "type": "address", + "value": "_from" + }, + "id": 311, + "name": "Identifier", + "src": "1205:5:5" + } + ], + "id": 312, + "name": "IndexAccess", + "src": "1196:15:5" + } + ], + "id": 313, + "name": "BinaryOperation", + "src": "1186:25:5" + } + ], + "id": 314, + "name": "FunctionCall", + "src": "1178:34:5" + } + ], + "id": 315, + "name": "ExpressionStatement", + "src": "1178:34:5" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1037, + "type": "function (bool) pure", + "value": "require" + }, + "id": 316, + "name": "Identifier", + "src": "1220:7:5" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 293, + "type": "uint256", + "value": "_value" + }, + "id": 317, + "name": "Identifier", + "src": "1228:6:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 790, + "type": "mapping(address => mapping(address => uint256))", + "value": "allowed" + }, + "id": 318, + "name": "Identifier", + "src": "1238:7:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 289, + "type": "address", + "value": "_from" + }, + "id": 319, + "name": "Identifier", + "src": "1246:5:5" + } + ], + "id": 320, + "name": "IndexAccess", + "src": "1238:14:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1034, + "type": "msg", + "value": "msg" + }, + "id": 321, + "name": "Identifier", + "src": "1253:3:5" + } + ], + "id": 322, + "name": "MemberAccess", + "src": "1253:10:5" + } + ], + "id": 323, + "name": "IndexAccess", + "src": "1238:26:5" + } + ], + "id": 324, + "name": "BinaryOperation", + "src": "1228:36:5" + } + ], + "id": 325, + "name": "FunctionCall", + "src": "1220:45:5" + } + ], + "id": 326, + "name": "ExpressionStatement", + "src": "1220:45:5" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 584, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 327, + "name": "Identifier", + "src": "1274:8:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 289, + "type": "address", + "value": "_from" + }, + "id": 328, + "name": "Identifier", + "src": "1283:5:5" + } + ], + "id": 329, + "name": "IndexAccess", + "src": "1274:15:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sub", + "referencedDeclaration": 546, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 584, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 330, + "name": "Identifier", + "src": "1292:8:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 289, + "type": "address", + "value": "_from" + }, + "id": 331, + "name": "Identifier", + "src": "1301:5:5" + } + ], + "id": 332, + "name": "IndexAccess", + "src": "1292:15:5" + } + ], + "id": 333, + "name": "MemberAccess", + "src": "1292:19:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 293, + "type": "uint256", + "value": "_value" + }, + "id": 334, + "name": "Identifier", + "src": "1312:6:5" + } + ], + "id": 335, + "name": "FunctionCall", + "src": "1292:27:5" + } + ], + "id": 336, + "name": "Assignment", + "src": "1274:45:5" + } + ], + "id": 337, + "name": "ExpressionStatement", + "src": "1274:45:5" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 584, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 338, + "name": "Identifier", + "src": "1327:8:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 291, + "type": "address", + "value": "_to" + }, + "id": 339, + "name": "Identifier", + "src": "1336:3:5" + } + ], + "id": 340, + "name": "IndexAccess", + "src": "1327:13:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "add", + "referencedDeclaration": 570, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 584, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 341, + "name": "Identifier", + "src": "1343:8:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 291, + "type": "address", + "value": "_to" + }, + "id": 342, + "name": "Identifier", + "src": "1352:3:5" + } + ], + "id": 343, + "name": "IndexAccess", + "src": "1343:13:5" + } + ], + "id": 344, + "name": "MemberAccess", + "src": "1343:17:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 293, + "type": "uint256", + "value": "_value" + }, + "id": 345, + "name": "Identifier", + "src": "1361:6:5" + } + ], + "id": 346, + "name": "FunctionCall", + "src": "1343:25:5" + } + ], + "id": 347, + "name": "Assignment", + "src": "1327:41:5" + } + ], + "id": 348, + "name": "ExpressionStatement", + "src": "1327:41:5" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 790, + "type": "mapping(address => mapping(address => uint256))", + "value": "allowed" + }, + "id": 349, + "name": "Identifier", + "src": "1376:7:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 289, + "type": "address", + "value": "_from" + }, + "id": 350, + "name": "Identifier", + "src": "1384:5:5" + } + ], + "id": 353, + "name": "IndexAccess", + "src": "1376:14:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1034, + "type": "msg", + "value": "msg" + }, + "id": 351, + "name": "Identifier", + "src": "1391:3:5" + } + ], + "id": 352, + "name": "MemberAccess", + "src": "1391:10:5" + } + ], + "id": 354, + "name": "IndexAccess", + "src": "1376:26:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sub", + "referencedDeclaration": 546, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 790, + "type": "mapping(address => mapping(address => uint256))", + "value": "allowed" + }, + "id": 355, + "name": "Identifier", + "src": "1405:7:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 289, + "type": "address", + "value": "_from" + }, + "id": 356, + "name": "Identifier", + "src": "1413:5:5" + } + ], + "id": 357, + "name": "IndexAccess", + "src": "1405:14:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1034, + "type": "msg", + "value": "msg" + }, + "id": 358, + "name": "Identifier", + "src": "1420:3:5" + } + ], + "id": 359, + "name": "MemberAccess", + "src": "1420:10:5" + } + ], + "id": 360, + "name": "IndexAccess", + "src": "1405:26:5" + } + ], + "id": 361, + "name": "MemberAccess", + "src": "1405:30:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 293, + "type": "uint256", + "value": "_value" + }, + "id": 362, + "name": "Identifier", + "src": "1436:6:5" + } + ], + "id": 363, + "name": "FunctionCall", + "src": "1405:38:5" + } + ], + "id": 364, + "name": "Assignment", + "src": "1376:67:5" + } + ], + "id": 365, + "name": "ExpressionStatement", + "src": "1376:67:5" + }, + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "bool", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "isContract", + "referencedDeclaration": 415, + "type": "function (address) view returns (bool)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 416, + "type": "type(library ERC223Utils)", + "value": "ERC223Utils" + }, + "id": 366, + "name": "Identifier", + "src": "1455:11:5" + } + ], + "id": 367, + "name": "MemberAccess", + "src": "1455:22:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 291, + "type": "address", + "value": "_to" + }, + "id": 368, + "name": "Identifier", + "src": "1478:3:5" + } + ], + "id": 369, + "name": "FunctionCall", + "src": "1455:27:5" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 371 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "receiver", + "scope": 395, + "stateVariable": false, + "storageLocation": "default", + "type": "contract ERC223ReceivingInterface", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "ERC223ReceivingInterface", + "referencedDeclaration": 252, + "type": "contract ERC223ReceivingInterface" + }, + "id": 370, + "name": "UserDefinedTypeName", + "src": "1494:24:5" + } + ], + "id": 371, + "name": "VariableDeclaration", + "src": "1494:33:5" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract ERC223ReceivingInterface", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 252, + "type": "type(contract ERC223ReceivingInterface)", + "value": "ERC223ReceivingInterface" + }, + "id": 372, + "name": "Identifier", + "src": "1530:24:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 291, + "type": "address", + "value": "_to" + }, + "id": 373, + "name": "Identifier", + "src": "1555:3:5" + } + ], + "id": 374, + "name": "FunctionCall", + "src": "1530:29:5" + } + ], + "id": 375, + "name": "VariableDeclarationStatement", + "src": "1494:65:5" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "tokenFallback", + "referencedDeclaration": 251, + "type": "function (address,uint256,bytes memory) external" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 371, + "type": "contract ERC223ReceivingInterface", + "value": "receiver" + }, + "id": 376, + "name": "Identifier", + "src": "1569:8:5" + } + ], + "id": 378, + "name": "MemberAccess", + "src": "1569:22:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 289, + "type": "address", + "value": "_from" + }, + "id": 379, + "name": "Identifier", + "src": "1592:5:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 293, + "type": "uint256", + "value": "_value" + }, + "id": 380, + "name": "Identifier", + "src": "1599:6:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 295, + "type": "bytes memory", + "value": "_data" + }, + "id": 381, + "name": "Identifier", + "src": "1607:5:5" + } + ], + "id": 382, + "name": "FunctionCall", + "src": "1569:44:5" + } + ], + "id": 383, + "name": "ExpressionStatement", + "src": "1569:44:5" + } + ], + "id": 384, + "name": "Block", + "src": "1484:138:5" + } + ], + "id": 385, + "name": "IfStatement", + "src": "1452:170:5" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + 193, + 775 + ], + "referencedDeclaration": 775, + "type": "function (address,address,uint256)", + "value": "Transfer" + }, + "id": 386, + "name": "Identifier", + "src": "1630:8:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 289, + "type": "address", + "value": "_from" + }, + "id": 387, + "name": "Identifier", + "src": "1639:5:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 291, + "type": "address", + "value": "_to" + }, + "id": 388, + "name": "Identifier", + "src": "1646:3:5" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 293, + "type": "uint256", + "value": "_value" + }, + "id": 389, + "name": "Identifier", + "src": "1651:6:5" + } + ], + "id": 390, + "name": "FunctionCall", + "src": "1630:28:5" + } + ], + "id": 391, + "name": "ExpressionStatement", + "src": "1630:28:5" + }, + { + "attributes": { + "functionReturnParameters": 299 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 392, + "name": "Literal", + "src": "1673:4:5" + } + ], + "id": 393, + "name": "Return", + "src": "1666:11:5" + } + ], + "id": 394, + "name": "Block", + "src": "1136:548:5" + } + ], + "id": 395, + "name": "FunctionDefinition", + "src": "1035:649:5" + } + ], + "id": 396, + "name": "ContractDefinition", + "src": "257:1430:5" + } + ], + "id": 397, + "name": "SourceUnit", + "src": "0:1688:5" + }, + "compiler": { + "name": "solc", + "version": "0.4.19+commit.c4cbbb05.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "1.0.1", + "updatedAt": "2018-02-22T15:06:12.341Z" +} \ No newline at end of file diff --git a/build/contracts/ERC223Utils.json b/build/contracts/ERC223Utils.json new file mode 100644 index 0000000..10f43c3 --- /dev/null +++ b/build/contracts/ERC223Utils.json @@ -0,0 +1,333 @@ +{ + "contractName": "ERC223Utils", + "abi": [ + { + "constant": true, + "inputs": [ + { + "name": "_addr", + "type": "address" + } + ], + "name": "isContract", + "outputs": [ + { + "name": "is_contract", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x6060604052341561000f57600080fd5b60aa8061001d6000396000f300606060405260043610603e5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631627905581146043575b600080fd5b606273ffffffffffffffffffffffffffffffffffffffff600435166076565b604051901515815260200160405180910390f35b6000903b11905600a165627a7a7230582096bbc09b7e21404e08b99b03d484d446e709fc3ae26f2f8a83730e9c4a3a5ea00029", + "deployedBytecode": "0x606060405260043610603e5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631627905581146043575b600080fd5b606273ffffffffffffffffffffffffffffffffffffffff600435166076565b604051901515815260200160405180910390f35b6000903b11905600a165627a7a7230582096bbc09b7e21404e08b99b03d484d446e709fc3ae26f2f8a83730e9c4a3a5ea00029", + "sourceMap": "81:396:4:-;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "81:396:4:-;;;;;;;;;;;;;;;;;;;;;;;200:274;;;;;;;;;;;;;;;;;;;;;;;;;;256:16;417:11;;458:8;;200:274::o", + "source": "pragma solidity ^0.4.19;\n\n/**\n * @title ERC223Utils\n * @dev Detect contracts\n */\nlibrary ERC223Utils {\n\n //assemble the given address bytecode. If bytecode exists then the _addr is a contract.\n function isContract(address _addr) public view returns (bool is_contract) {\n uint length;\n assembly {\n //retrieve the size of the code on target address, this needs assembly\n length := extcodesize(_addr)\n }\n return (length>0);\n }\n\n}\n", + "sourcePath": "/Users/paco/Development/amon/token-contract/contracts/ERC223/ERC223_Utils.sol", + "ast": { + "attributes": { + "absolutePath": "/Users/paco/Development/amon/token-contract/contracts/ERC223/ERC223_Utils.sol", + "exportedSymbols": { + "ERC223Utils": [ + 219 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.4", + ".19" + ] + }, + "id": 201, + "name": "PragmaDirective", + "src": "0:24:4" + }, + { + "attributes": { + "baseContracts": [ + null + ], + "contractDependencies": [ + null + ], + "contractKind": "library", + "documentation": "@title ERC223Utils\n@dev Detect contracts", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 219 + ], + "name": "ERC223Utils", + "scope": 220 + }, + "children": [ + { + "attributes": { + "constant": true, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "isContract", + "payable": false, + "scope": 219, + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_addr", + "scope": 218, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 202, + "name": "ElementaryTypeName", + "src": "220:7:4" + } + ], + "id": 203, + "name": "VariableDeclaration", + "src": "220:13:4" + } + ], + "id": 204, + "name": "ParameterList", + "src": "219:15:4" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "is_contract", + "scope": 218, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 205, + "name": "ElementaryTypeName", + "src": "256:4:4" + } + ], + "id": 206, + "name": "VariableDeclaration", + "src": "256:16:4" + } + ], + "id": 207, + "name": "ParameterList", + "src": "255:18:4" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + null + ], + "initialValue": null + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "length", + "scope": 218, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 208, + "name": "ElementaryTypeName", + "src": "282:4:4" + } + ], + "id": 209, + "name": "VariableDeclaration", + "src": "282:11:4" + } + ], + "id": 210, + "name": "VariableDeclarationStatement", + "src": "282:11:4" + }, + { + "attributes": { + "externalReferences": [ + { + "length": { + "declaration": 209, + "isOffset": false, + "isSlot": false, + "src": "407:6:4", + "valueSize": 1 + } + }, + { + "_addr": { + "declaration": 203, + "isOffset": false, + "isSlot": false, + "src": "429:5:4", + "valueSize": 1 + } + } + ], + "operations": "{\n length := extcodesize(_addr)\n}" + }, + "children": [], + "id": 211, + "name": "InlineAssembly", + "src": "301:155:4" + }, + { + "attributes": { + "functionReturnParameters": 207 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 209, + "type": "uint256", + "value": "length" + }, + "id": 212, + "name": "Identifier", + "src": "458:6:4" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 213, + "name": "Literal", + "src": "465:1:4" + } + ], + "id": 214, + "name": "BinaryOperation", + "src": "458:8:4" + } + ], + "id": 215, + "name": "TupleExpression", + "src": "457:10:4" + } + ], + "id": 216, + "name": "Return", + "src": "450:17:4" + } + ], + "id": 217, + "name": "Block", + "src": "274:200:4" + } + ], + "id": 218, + "name": "FunctionDefinition", + "src": "200:274:4" + } + ], + "id": 219, + "name": "ContractDefinition", + "src": "81:396:4" + } + ], + "id": 220, + "name": "SourceUnit", + "src": "0:478:4" + }, + "compiler": { + "name": "solc", + "version": "0.4.19+commit.c4cbbb05.Emscripten.clang" + }, + "networks": { + "42": { + "events": {}, + "links": {}, + "address": "0xd83d791f84e6c8ceaf9594d104131e1843e76f37" + } + }, + "schemaVersion": "1.0.1", + "updatedAt": "2018-02-22T16:06:59.986Z" +} \ No newline at end of file diff --git a/build/contracts/EmptyContract.json b/build/contracts/EmptyContract.json new file mode 100644 index 0000000..13f6730 --- /dev/null +++ b/build/contracts/EmptyContract.json @@ -0,0 +1,129 @@ +{ + "contractName": "EmptyContract", + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + } + ], + "bytecode": "0x60606040523415600e57600080fd5b603580601b6000396000f3006060604052600080fd00a165627a7a72305820337a0ca4796ece7166fb7713d2a23b767a7a7c70fb716c51e2eee35446a34b9e0029", + "deployedBytecode": "0x6060604052600080fd00a165627a7a72305820337a0ca4796ece7166fb7713d2a23b767a7a7c70fb716c51e2eee35446a34b9e0029", + "sourceMap": "26:72:5:-;;;56:39;;;;;;;;26:72;;;;;;", + "deployedSourceMap": "26:72:5:-;;;;;", + "source": "pragma solidity ^0.4.19;\n\ncontract EmptyContract {\n\n function EmptyContract() public {\n }\n\n}\n", + "sourcePath": "/Users/paco/Development/amon/token-contract/contracts/EmptyContract.sol", + "ast": { + "attributes": { + "absolutePath": "/Users/paco/Development/amon/token-contract/contracts/EmptyContract.sol", + "exportedSymbols": { + "EmptyContract": [ + 226 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.4", + ".19" + ] + }, + "id": 221, + "name": "PragmaDirective", + "src": "0:24:5" + }, + { + "attributes": { + "baseContracts": [ + null + ], + "contractDependencies": [ + null + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 226 + ], + "name": "EmptyContract", + "scope": 227 + }, + "children": [ + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": true, + "modifiers": [ + null + ], + "name": "EmptyContract", + "payable": false, + "scope": 226, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 222, + "name": "ParameterList", + "src": "78:2:5" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 223, + "name": "ParameterList", + "src": "88:0:5" + }, + { + "attributes": { + "statements": [ + null + ] + }, + "children": [], + "id": 224, + "name": "Block", + "src": "88:7:5" + } + ], + "id": 225, + "name": "FunctionDefinition", + "src": "56:39:5" + } + ], + "id": 226, + "name": "ContractDefinition", + "src": "26:72:5" + } + ], + "id": 227, + "name": "SourceUnit", + "src": "0:99:5" + }, + "compiler": { + "name": "solc", + "version": "0.4.19+commit.c4cbbb05.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "1.0.1", + "updatedAt": "2018-02-22T16:06:59.983Z" +} \ No newline at end of file diff --git a/build/contracts/Migrations.json b/build/contracts/Migrations.json new file mode 100644 index 0000000..5e58c73 --- /dev/null +++ b/build/contracts/Migrations.json @@ -0,0 +1,827 @@ +{ + "contractName": "Migrations", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "last_completed_migration", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "constant": false, + "inputs": [ + { + "name": "completed", + "type": "uint256" + } + ], + "name": "setCompleted", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "new_address", + "type": "address" + } + ], + "name": "upgrade", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x6060604052341561000f57600080fd5b60008054600160a060020a033316600160a060020a03199091161790556101e78061003b6000396000f3006060604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f0108114610066578063445df0ac146100875780638da5cb5b146100ac578063fdacd576146100db575b600080fd5b341561007157600080fd5b610085600160a060020a03600435166100f1565b005b341561009257600080fd5b61009a610186565b60405190815260200160405180910390f35b34156100b757600080fd5b6100bf61018c565b604051600160a060020a03909116815260200160405180910390f35b34156100e657600080fd5b61008560043561019b565b6000805433600160a060020a03908116911614156101825781905080600160a060020a031663fdacd5766001546040517c010000000000000000000000000000000000000000000000000000000063ffffffff84160281526004810191909152602401600060405180830381600087803b151561016d57600080fd5b6102c65a03f1151561017e57600080fd5b5050505b5050565b60015481565b600054600160a060020a031681565b60005433600160a060020a03908116911614156101b85760018190555b505600a165627a7a72305820dbb7939d61d74c72b13b03c2279b818a9ee213b7c3d7c1566461d25f6d5e1f070029", + "deployedBytecode": "0x6060604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630900f0108114610066578063445df0ac146100875780638da5cb5b146100ac578063fdacd576146100db575b600080fd5b341561007157600080fd5b610085600160a060020a03600435166100f1565b005b341561009257600080fd5b61009a610186565b60405190815260200160405180910390f35b34156100b757600080fd5b6100bf61018c565b604051600160a060020a03909116815260200160405180910390f35b34156100e657600080fd5b61008560043561019b565b6000805433600160a060020a03908116911614156101825781905080600160a060020a031663fdacd5766001546040517c010000000000000000000000000000000000000000000000000000000063ffffffff84160281526004810191909152602401600060405180830381600087803b151561016d57600080fd5b6102c65a03f1151561017e57600080fd5b5050505b5050565b60015481565b600054600160a060020a031681565b60005433600160a060020a03908116911614156101b85760018190555b505600a165627a7a72305820dbb7939d61d74c72b13b03c2279b818a9ee213b7c3d7c1566461d25f6d5e1f070029", + "sourceMap": "26:488:0:-;;;178:58;;;;;;;;213:5;:18;;-1:-1:-1;;;;;221:10:0;213:18;-1:-1:-1;;;;;;213:18:0;;;;;;26:488;;;;;;", + "deployedSourceMap": "26:488:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;347:165;;;;;;;;;;-1:-1:-1;;;;;347:165:0;;;;;;;74:36;;;;;;;;;;;;;;;;;;;;;;;;;;;50:20;;;;;;;;;;;;;;;-1:-1:-1;;;;;50:20:0;;;;;;;;;;;;;;240:103;;;;;;;;;;;;;;347:165;409:19;161:5;;147:10;-1:-1:-1;;;;;147:19:0;;;161:5;;147:19;143:26;;;442:11;409:45;;460:8;-1:-1:-1;;;;;460:21:0;;482:24;;460:47;;;;;;;;;;;;;;;;;;-1:-1:-1;460:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;143:26;347:165;;:::o;74:36::-;;;;:::o;50:20::-;;;-1:-1:-1;;;;;50:20:0;;:::o;240:103::-;161:5;;147:10;-1:-1:-1;;;;;147:19:0;;;161:5;;147:19;143:26;;;302:24;:36;;;143:26;240:103;:::o", + "source": "pragma solidity ^0.4.19;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n modifier restricted() {\n if (msg.sender == owner) _;\n }\n\n function Migrations() public {\n owner = msg.sender;\n }\n\n function setCompleted(uint completed) public restricted {\n last_completed_migration = completed;\n }\n\n function upgrade(address new_address) public restricted {\n Migrations upgraded = Migrations(new_address);\n upgraded.setCompleted(last_completed_migration);\n }\n}\n", + "sourcePath": "/Users/paco/Development/amon/token-contract/contracts/Migrations.sol", + "ast": { + "attributes": { + "absolutePath": "/Users/paco/Development/amon/token-contract/contracts/Migrations.sol", + "exportedSymbols": { + "Migrations": [ + 56 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.4", + ".19" + ] + }, + "id": 1, + "name": "PragmaDirective", + "src": "0:24:0" + }, + { + "attributes": { + "baseContracts": [ + null + ], + "contractDependencies": [ + null + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "linearizedBaseContracts": [ + 56 + ], + "name": "Migrations", + "scope": 57 + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "owner", + "scope": 56, + "stateVariable": true, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 2, + "name": "ElementaryTypeName", + "src": "50:7:0" + } + ], + "id": 3, + "name": "VariableDeclaration", + "src": "50:20:0" + }, + { + "attributes": { + "constant": false, + "name": "last_completed_migration", + "scope": 56, + "stateVariable": true, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 4, + "name": "ElementaryTypeName", + "src": "74:4:0" + } + ], + "id": 5, + "name": "VariableDeclaration", + "src": "74:36:0" + }, + { + "attributes": { + "name": "restricted", + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 6, + "name": "ParameterList", + "src": "134:2:0" + }, + { + "children": [ + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 68, + "type": "msg", + "value": "msg" + }, + "id": 7, + "name": "Identifier", + "src": "147:3:0" + } + ], + "id": 8, + "name": "MemberAccess", + "src": "147:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3, + "type": "address", + "value": "owner" + }, + "id": 9, + "name": "Identifier", + "src": "161:5:0" + } + ], + "id": 10, + "name": "BinaryOperation", + "src": "147:19:0" + }, + { + "id": 11, + "name": "PlaceholderStatement", + "src": "168:1:0" + } + ], + "id": 12, + "name": "IfStatement", + "src": "143:26:0" + } + ], + "id": 13, + "name": "Block", + "src": "137:37:0" + } + ], + "id": 14, + "name": "ModifierDefinition", + "src": "115:59:0" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": true, + "modifiers": [ + null + ], + "name": "Migrations", + "payable": false, + "scope": 56, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 15, + "name": "ParameterList", + "src": "197:2:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 16, + "name": "ParameterList", + "src": "207:0:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 3, + "type": "address", + "value": "owner" + }, + "id": 17, + "name": "Identifier", + "src": "213:5:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 68, + "type": "msg", + "value": "msg" + }, + "id": 18, + "name": "Identifier", + "src": "221:3:0" + } + ], + "id": 19, + "name": "MemberAccess", + "src": "221:10:0" + } + ], + "id": 20, + "name": "Assignment", + "src": "213:18:0" + } + ], + "id": 21, + "name": "ExpressionStatement", + "src": "213:18:0" + } + ], + "id": 22, + "name": "Block", + "src": "207:29:0" + } + ], + "id": 23, + "name": "FunctionDefinition", + "src": "178:58:0" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "name": "setCompleted", + "payable": false, + "scope": 56, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "completed", + "scope": 35, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 24, + "name": "ElementaryTypeName", + "src": "262:4:0" + } + ], + "id": 25, + "name": "VariableDeclaration", + "src": "262:14:0" + } + ], + "id": 26, + "name": "ParameterList", + "src": "261:16:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 29, + "name": "ParameterList", + "src": "296:0:0" + }, + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 14, + "type": "modifier ()", + "value": "restricted" + }, + "id": 27, + "name": "Identifier", + "src": "285:10:0" + } + ], + "id": 28, + "name": "ModifierInvocation", + "src": "285:10:0" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5, + "type": "uint256", + "value": "last_completed_migration" + }, + "id": 30, + "name": "Identifier", + "src": "302:24:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 25, + "type": "uint256", + "value": "completed" + }, + "id": 31, + "name": "Identifier", + "src": "329:9:0" + } + ], + "id": 32, + "name": "Assignment", + "src": "302:36:0" + } + ], + "id": 33, + "name": "ExpressionStatement", + "src": "302:36:0" + } + ], + "id": 34, + "name": "Block", + "src": "296:47:0" + } + ], + "id": 35, + "name": "FunctionDefinition", + "src": "240:103:0" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "name": "upgrade", + "payable": false, + "scope": 56, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "new_address", + "scope": 55, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 36, + "name": "ElementaryTypeName", + "src": "364:7:0" + } + ], + "id": 37, + "name": "VariableDeclaration", + "src": "364:19:0" + } + ], + "id": 38, + "name": "ParameterList", + "src": "363:21:0" + }, + { + "attributes": { + "parameters": [ + null + ] + }, + "children": [], + "id": 41, + "name": "ParameterList", + "src": "403:0:0" + }, + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 14, + "type": "modifier ()", + "value": "restricted" + }, + "id": 39, + "name": "Identifier", + "src": "392:10:0" + } + ], + "id": 40, + "name": "ModifierInvocation", + "src": "392:10:0" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 43 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "upgraded", + "scope": 55, + "stateVariable": false, + "storageLocation": "default", + "type": "contract Migrations", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "Migrations", + "referencedDeclaration": 56, + "type": "contract Migrations" + }, + "id": 42, + "name": "UserDefinedTypeName", + "src": "409:10:0" + } + ], + "id": 43, + "name": "VariableDeclaration", + "src": "409:19:0" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "contract Migrations", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 56, + "type": "type(contract Migrations)", + "value": "Migrations" + }, + "id": 44, + "name": "Identifier", + "src": "431:10:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 37, + "type": "address", + "value": "new_address" + }, + "id": 45, + "name": "Identifier", + "src": "442:11:0" + } + ], + "id": 46, + "name": "FunctionCall", + "src": "431:23:0" + } + ], + "id": 47, + "name": "VariableDeclarationStatement", + "src": "409:45:0" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "setCompleted", + "referencedDeclaration": 35, + "type": "function (uint256) external" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 43, + "type": "contract Migrations", + "value": "upgraded" + }, + "id": 48, + "name": "Identifier", + "src": "460:8:0" + } + ], + "id": 50, + "name": "MemberAccess", + "src": "460:21:0" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 5, + "type": "uint256", + "value": "last_completed_migration" + }, + "id": 51, + "name": "Identifier", + "src": "482:24:0" + } + ], + "id": 52, + "name": "FunctionCall", + "src": "460:47:0" + } + ], + "id": 53, + "name": "ExpressionStatement", + "src": "460:47:0" + } + ], + "id": 54, + "name": "Block", + "src": "403:109:0" + } + ], + "id": 55, + "name": "FunctionDefinition", + "src": "347:165:0" + } + ], + "id": 56, + "name": "ContractDefinition", + "src": "26:488:0" + } + ], + "id": 57, + "name": "SourceUnit", + "src": "0:515:0" + }, + "compiler": { + "name": "solc", + "version": "0.4.19+commit.c4cbbb05.Emscripten.clang" + }, + "networks": { + "42": { + "events": {}, + "links": {}, + "address": "0x30e976adaa571b63673ad6971d6b7d4dd8a1d6c8" + } + }, + "schemaVersion": "1.0.1", + "updatedAt": "2018-02-22T15:12:21.047Z" +} \ No newline at end of file diff --git a/build/contracts/SafeMath.json b/build/contracts/SafeMath.json new file mode 100644 index 0000000..6dba25e --- /dev/null +++ b/build/contracts/SafeMath.json @@ -0,0 +1,1347 @@ +{ + "contractName": "SafeMath", + "abi": [], + "bytecode": "0x60606040523415600e57600080fd5b603580601b6000396000f3006060604052600080fd00a165627a7a723058205fd5367235934514c03161931018c81790dedcd28f9c80677934aebbea71a3b70029", + "deployedBytecode": "0x6060604052600080fd00a165627a7a723058205fd5367235934514c03161931018c81790dedcd28f9c80677934aebbea71a3b70029", + "sourceMap": "117:1022:6:-;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "117:1022:6:-;;;;;", + "source": "pragma solidity ^0.4.18;\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n\n /**\n * @dev Multiplies two numbers, throws on overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n uint256 c = a * b;\n assert(c / a == b);\n return c;\n }\n\n /**\n * @dev Integer division of two numbers, truncating the quotient.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n /**\n * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n /**\n * @dev Adds two numbers, throws on overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n}\n", + "sourcePath": "zeppelin-solidity/contracts/math/SafeMath.sol", + "ast": { + "attributes": { + "absolutePath": "zeppelin-solidity/contracts/math/SafeMath.sol", + "exportedSymbols": { + "SafeMath": [ + 324 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.4", + ".18" + ] + }, + "id": 228, + "name": "PragmaDirective", + "src": "0:24:6" + }, + { + "attributes": { + "baseContracts": [ + null + ], + "contractDependencies": [ + null + ], + "contractKind": "library", + "documentation": "@title SafeMath\n@dev Math operations with safety checks that throw on error", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 324 + ], + "name": "SafeMath", + "scope": 325 + }, + "children": [ + { + "attributes": { + "constant": true, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "mul", + "payable": false, + "scope": 324, + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 261, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 229, + "name": "ElementaryTypeName", + "src": "216:7:6" + } + ], + "id": 230, + "name": "VariableDeclaration", + "src": "216:9:6" + }, + { + "attributes": { + "constant": false, + "name": "b", + "scope": 261, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 231, + "name": "ElementaryTypeName", + "src": "227:7:6" + } + ], + "id": 232, + "name": "VariableDeclaration", + "src": "227:9:6" + } + ], + "id": 233, + "name": "ParameterList", + "src": "215:22:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 261, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 234, + "name": "ElementaryTypeName", + "src": "261:7:6" + } + ], + "id": 235, + "name": "VariableDeclaration", + "src": "261:7:6" + } + ], + "id": 236, + "name": "ParameterList", + "src": "260:9:6" + }, + { + "children": [ + { + "attributes": { + "falseBody": null + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 230, + "type": "uint256", + "value": "a" + }, + "id": 237, + "name": "Identifier", + "src": "280:1:6" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 238, + "name": "Literal", + "src": "285:1:6" + } + ], + "id": 239, + "name": "BinaryOperation", + "src": "280:6:6" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 236 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 240, + "name": "Literal", + "src": "303:1:6" + } + ], + "id": 241, + "name": "Return", + "src": "296:8:6" + } + ], + "id": 242, + "name": "Block", + "src": "288:23:6" + } + ], + "id": 243, + "name": "IfStatement", + "src": "276:35:6" + }, + { + "attributes": { + "assignments": [ + 245 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "c", + "scope": 261, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 244, + "name": "ElementaryTypeName", + "src": "316:7:6" + } + ], + "id": 245, + "name": "VariableDeclaration", + "src": "316:9:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "*", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 230, + "type": "uint256", + "value": "a" + }, + "id": 246, + "name": "Identifier", + "src": "328:1:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 232, + "type": "uint256", + "value": "b" + }, + "id": 247, + "name": "Identifier", + "src": "332:1:6" + } + ], + "id": 248, + "name": "BinaryOperation", + "src": "328:5:6" + } + ], + "id": 249, + "name": "VariableDeclarationStatement", + "src": "316:17:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 455, + "type": "function (bool) pure", + "value": "assert" + }, + "id": 250, + "name": "Identifier", + "src": "339:6:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "==", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "/", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 245, + "type": "uint256", + "value": "c" + }, + "id": 251, + "name": "Identifier", + "src": "346:1:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 230, + "type": "uint256", + "value": "a" + }, + "id": 252, + "name": "Identifier", + "src": "350:1:6" + } + ], + "id": 253, + "name": "BinaryOperation", + "src": "346:5:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 232, + "type": "uint256", + "value": "b" + }, + "id": 254, + "name": "Identifier", + "src": "355:1:6" + } + ], + "id": 255, + "name": "BinaryOperation", + "src": "346:10:6" + } + ], + "id": 256, + "name": "FunctionCall", + "src": "339:18:6" + } + ], + "id": 257, + "name": "ExpressionStatement", + "src": "339:18:6" + }, + { + "attributes": { + "functionReturnParameters": 236 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 245, + "type": "uint256", + "value": "c" + }, + "id": 258, + "name": "Identifier", + "src": "370:1:6" + } + ], + "id": 259, + "name": "Return", + "src": "363:8:6" + } + ], + "id": 260, + "name": "Block", + "src": "270:106:6" + } + ], + "id": 261, + "name": "FunctionDefinition", + "src": "203:173:6" + }, + { + "attributes": { + "constant": true, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "div", + "payable": false, + "scope": 324, + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 279, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 262, + "name": "ElementaryTypeName", + "src": "471:7:6" + } + ], + "id": 263, + "name": "VariableDeclaration", + "src": "471:9:6" + }, + { + "attributes": { + "constant": false, + "name": "b", + "scope": 279, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 264, + "name": "ElementaryTypeName", + "src": "482:7:6" + } + ], + "id": 265, + "name": "VariableDeclaration", + "src": "482:9:6" + } + ], + "id": 266, + "name": "ParameterList", + "src": "470:22:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 279, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 267, + "name": "ElementaryTypeName", + "src": "516:7:6" + } + ], + "id": 268, + "name": "VariableDeclaration", + "src": "516:7:6" + } + ], + "id": 269, + "name": "ParameterList", + "src": "515:9:6" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 271 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "c", + "scope": 279, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 270, + "name": "ElementaryTypeName", + "src": "605:7:6" + } + ], + "id": 271, + "name": "VariableDeclaration", + "src": "605:9:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "/", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 263, + "type": "uint256", + "value": "a" + }, + "id": 272, + "name": "Identifier", + "src": "617:1:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 265, + "type": "uint256", + "value": "b" + }, + "id": 273, + "name": "Identifier", + "src": "621:1:6" + } + ], + "id": 274, + "name": "BinaryOperation", + "src": "617:5:6" + } + ], + "id": 275, + "name": "VariableDeclarationStatement", + "src": "605:17:6" + }, + { + "attributes": { + "functionReturnParameters": 269 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 271, + "type": "uint256", + "value": "c" + }, + "id": 276, + "name": "Identifier", + "src": "717:1:6" + } + ], + "id": 277, + "name": "Return", + "src": "710:8:6" + } + ], + "id": 278, + "name": "Block", + "src": "525:198:6" + } + ], + "id": 279, + "name": "FunctionDefinition", + "src": "458:265:6" + }, + { + "attributes": { + "constant": true, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "sub", + "payable": false, + "scope": 324, + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 299, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 280, + "name": "ElementaryTypeName", + "src": "849:7:6" + } + ], + "id": 281, + "name": "VariableDeclaration", + "src": "849:9:6" + }, + { + "attributes": { + "constant": false, + "name": "b", + "scope": 299, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 282, + "name": "ElementaryTypeName", + "src": "860:7:6" + } + ], + "id": 283, + "name": "VariableDeclaration", + "src": "860:9:6" + } + ], + "id": 284, + "name": "ParameterList", + "src": "848:22:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 299, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 285, + "name": "ElementaryTypeName", + "src": "894:7:6" + } + ], + "id": 286, + "name": "VariableDeclaration", + "src": "894:7:6" + } + ], + "id": 287, + "name": "ParameterList", + "src": "893:9:6" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 455, + "type": "function (bool) pure", + "value": "assert" + }, + "id": 288, + "name": "Identifier", + "src": "909:6:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 283, + "type": "uint256", + "value": "b" + }, + "id": 289, + "name": "Identifier", + "src": "916:1:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 281, + "type": "uint256", + "value": "a" + }, + "id": 290, + "name": "Identifier", + "src": "921:1:6" + } + ], + "id": 291, + "name": "BinaryOperation", + "src": "916:6:6" + } + ], + "id": 292, + "name": "FunctionCall", + "src": "909:14:6" + } + ], + "id": 293, + "name": "ExpressionStatement", + "src": "909:14:6" + }, + { + "attributes": { + "functionReturnParameters": 287 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "-", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 281, + "type": "uint256", + "value": "a" + }, + "id": 294, + "name": "Identifier", + "src": "936:1:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 283, + "type": "uint256", + "value": "b" + }, + "id": 295, + "name": "Identifier", + "src": "940:1:6" + } + ], + "id": 296, + "name": "BinaryOperation", + "src": "936:5:6" + } + ], + "id": 297, + "name": "Return", + "src": "929:12:6" + } + ], + "id": 298, + "name": "Block", + "src": "903:43:6" + } + ], + "id": 299, + "name": "FunctionDefinition", + "src": "836:110:6" + }, + { + "attributes": { + "constant": true, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "add", + "payable": false, + "scope": 324, + "stateMutability": "pure", + "superFunction": null, + "visibility": "internal" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "a", + "scope": 323, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 300, + "name": "ElementaryTypeName", + "src": "1021:7:6" + } + ], + "id": 301, + "name": "VariableDeclaration", + "src": "1021:9:6" + }, + { + "attributes": { + "constant": false, + "name": "b", + "scope": 323, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 302, + "name": "ElementaryTypeName", + "src": "1032:7:6" + } + ], + "id": 303, + "name": "VariableDeclaration", + "src": "1032:9:6" + } + ], + "id": 304, + "name": "ParameterList", + "src": "1020:22:6" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 323, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 305, + "name": "ElementaryTypeName", + "src": "1066:7:6" + } + ], + "id": 306, + "name": "VariableDeclaration", + "src": "1066:7:6" + } + ], + "id": 307, + "name": "ParameterList", + "src": "1065:9:6" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 309 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "c", + "scope": 323, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 308, + "name": "ElementaryTypeName", + "src": "1081:7:6" + } + ], + "id": 309, + "name": "VariableDeclaration", + "src": "1081:9:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "+", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 301, + "type": "uint256", + "value": "a" + }, + "id": 310, + "name": "Identifier", + "src": "1093:1:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 303, + "type": "uint256", + "value": "b" + }, + "id": 311, + "name": "Identifier", + "src": "1097:1:6" + } + ], + "id": 312, + "name": "BinaryOperation", + "src": "1093:5:6" + } + ], + "id": 313, + "name": "VariableDeclarationStatement", + "src": "1081:17:6" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 455, + "type": "function (bool) pure", + "value": "assert" + }, + "id": 314, + "name": "Identifier", + "src": "1104:6:6" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 309, + "type": "uint256", + "value": "c" + }, + "id": 315, + "name": "Identifier", + "src": "1111:1:6" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 301, + "type": "uint256", + "value": "a" + }, + "id": 316, + "name": "Identifier", + "src": "1116:1:6" + } + ], + "id": 317, + "name": "BinaryOperation", + "src": "1111:6:6" + } + ], + "id": 318, + "name": "FunctionCall", + "src": "1104:14:6" + } + ], + "id": 319, + "name": "ExpressionStatement", + "src": "1104:14:6" + }, + { + "attributes": { + "functionReturnParameters": 307 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 309, + "type": "uint256", + "value": "c" + }, + "id": 320, + "name": "Identifier", + "src": "1131:1:6" + } + ], + "id": 321, + "name": "Return", + "src": "1124:8:6" + } + ], + "id": 322, + "name": "Block", + "src": "1075:62:6" + } + ], + "id": 323, + "name": "FunctionDefinition", + "src": "1008:129:6" + } + ], + "id": 324, + "name": "ContractDefinition", + "src": "117:1022:6" + } + ], + "id": 325, + "name": "SourceUnit", + "src": "0:1140:6" + }, + "compiler": { + "name": "solc", + "version": "0.4.19+commit.c4cbbb05.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "1.0.1", + "updatedAt": "2018-02-22T16:06:59.988Z" +} \ No newline at end of file diff --git a/build/contracts/StandardToken.json b/build/contracts/StandardToken.json new file mode 100644 index 0000000..b9e5d0b --- /dev/null +++ b/build/contracts/StandardToken.json @@ -0,0 +1,3736 @@ +{ + "contractName": "StandardToken", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_addedValue", + "type": "uint256" + } + ], + "name": "increaseApproval", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseApproval", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x6060604052341561000f57600080fd5b6106fb8061001e6000396000f30060606040526004361061008d5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461009257806318160ddd146100c857806323b872dd146100ed578063661884631461011557806370a0823114610137578063a9059cbb14610156578063d73dd62314610178578063dd62ed3e1461019a575b600080fd5b341561009d57600080fd5b6100b4600160a060020a03600435166024356101bf565b604051901515815260200160405180910390f35b34156100d357600080fd5b6100db61022b565b60405190815260200160405180910390f35b34156100f857600080fd5b6100b4600160a060020a0360043581169060243516604435610231565b341561012057600080fd5b6100b4600160a060020a03600435166024356103b1565b341561014257600080fd5b6100db600160a060020a03600435166104ab565b341561016157600080fd5b6100b4600160a060020a03600435166024356104c6565b341561018357600080fd5b6100b4600160a060020a03600435166024356105d8565b34156101a557600080fd5b6100db600160a060020a036004358116906024351661067c565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60015490565b6000600160a060020a038316151561024857600080fd5b600160a060020a03841660009081526020819052604090205482111561026d57600080fd5b600160a060020a03808516600090815260026020908152604080832033909416835292905220548211156102a057600080fd5b600160a060020a0384166000908152602081905260409020546102c9908363ffffffff6106a716565b600160a060020a0380861660009081526020819052604080822093909355908516815220546102fe908363ffffffff6106b916565b600160a060020a0380851660009081526020818152604080832094909455878316825260028152838220339093168252919091522054610344908363ffffffff6106a716565b600160a060020a03808616600081815260026020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b600160a060020a0333811660009081526002602090815260408083209386168352929052908120548083111561040e57600160a060020a033381166000908152600260209081526040808320938816835292905290812055610445565b61041e818463ffffffff6106a716565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526020819052604090205490565b6000600160a060020a03831615156104dd57600080fd5b600160a060020a03331660009081526020819052604090205482111561050257600080fd5b600160a060020a03331660009081526020819052604090205461052b908363ffffffff6106a716565b600160a060020a033381166000908152602081905260408082209390935590851681522054610560908363ffffffff6106b916565b60008085600160a060020a0316600160a060020a031681526020019081526020016000208190555082600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a350600192915050565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054610610908363ffffffff6106b916565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b6000828211156106b357fe5b50900390565b6000828201838110156106c857fe5b93925050505600a165627a7a72305820d627272bd86b1ab297458e1f5a9aa9fb2504766ddbc7018a8655b84429364f380029", + "deployedBytecode": "0x60606040526004361061008d5763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b3811461009257806318160ddd146100c857806323b872dd146100ed578063661884631461011557806370a0823114610137578063a9059cbb14610156578063d73dd62314610178578063dd62ed3e1461019a575b600080fd5b341561009d57600080fd5b6100b4600160a060020a03600435166024356101bf565b604051901515815260200160405180910390f35b34156100d357600080fd5b6100db61022b565b60405190815260200160405180910390f35b34156100f857600080fd5b6100b4600160a060020a0360043581169060243516604435610231565b341561012057600080fd5b6100b4600160a060020a03600435166024356103b1565b341561014257600080fd5b6100db600160a060020a03600435166104ab565b341561016157600080fd5b6100b4600160a060020a03600435166024356104c6565b341561018357600080fd5b6100b4600160a060020a03600435166024356105d8565b34156101a557600080fd5b6100db600160a060020a036004358116906024351661067c565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60015490565b6000600160a060020a038316151561024857600080fd5b600160a060020a03841660009081526020819052604090205482111561026d57600080fd5b600160a060020a03808516600090815260026020908152604080832033909416835292905220548211156102a057600080fd5b600160a060020a0384166000908152602081905260409020546102c9908363ffffffff6106a716565b600160a060020a0380861660009081526020819052604080822093909355908516815220546102fe908363ffffffff6106b916565b600160a060020a0380851660009081526020818152604080832094909455878316825260028152838220339093168252919091522054610344908363ffffffff6106a716565b600160a060020a03808616600081815260026020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b600160a060020a0333811660009081526002602090815260408083209386168352929052908120548083111561040e57600160a060020a033381166000908152600260209081526040808320938816835292905290812055610445565b61041e818463ffffffff6106a716565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526020819052604090205490565b6000600160a060020a03831615156104dd57600080fd5b600160a060020a03331660009081526020819052604090205482111561050257600080fd5b600160a060020a03331660009081526020819052604090205461052b908363ffffffff6106a716565b600160a060020a033381166000908152602081905260408082209390935590851681522054610560908363ffffffff6106b916565b60008085600160a060020a0316600160a060020a031681526020019081526020016000208190555082600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a350600192915050565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054610610908363ffffffff6106b916565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b6000828211156106b357fe5b50900390565b6000828201838110156106c857fe5b93925050505600a165627a7a72305820d627272bd86b1ab297458e1f5a9aa9fb2504766ddbc7018a8655b84429364f380029", + "sourceMap": "344:3659:13:-;;;;;;;;;;;;;;;;;", + "deployedSourceMap": "344:3659:13:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1798:183;;;;;;;;;;-1:-1:-1;;;;;1798:183:13;;;;;;;;;;;;;;;;;;;;;;;;371:83:9;;;;;;;;;;;;;;;;;;;;;;;;;;;736:439:13;;;;;;;;;;-1:-1:-1;;;;;736:439:13;;;;;;;;;;;;3602:398;;;;;;;;;;-1:-1:-1;;;;;3602:398:13;;;;;;;1189:107:9;;;;;;;;;;-1:-1:-1;;;;;1189:107:9;;;;;608:379;;;;;;;;;;-1:-1:-1;;;;;608:379:9;;;;;;;2883:257:13;;;;;;;;;;-1:-1:-1;;;;;2883:257:13;;;;;;;2300:126;;;;;;;;;;-1:-1:-1;;;;;2300:126:13;;;;;;;;;;1798:183;-1:-1:-1;;;;;1885:10:13;1877:19;;1865:4;1877:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;;:38;;;1865:4;;1877:29;:19;1921:38;;1909:6;;1921:38;;;;;;;;;;;;;-1:-1:-1;1972:4:13;1798:183;;;;:::o;371:83:9:-;437:12;;371:83;:::o;736:439:13:-;818:4;-1:-1:-1;;;;;838:17:13;;;;830:26;;;;;;-1:-1:-1;;;;;880:15:13;;:8;:15;;;;;;;;;;;870:25;;;862:34;;;;;;-1:-1:-1;;;;;920:14:13;;;;;;;:7;:14;;;;;;;;935:10;920:26;;;;;;;;;;910:36;;;902:45;;;;;;-1:-1:-1;;;;;972:15:13;;:8;:15;;;;;;;;;;;:27;;992:6;972:27;:19;:27;:::i;:::-;-1:-1:-1;;;;;954:15:13;;;:8;:15;;;;;;;;;;;:45;;;;1021:13;;;;;;;:25;;1039:6;1021:25;:17;:25;:::i;:::-;-1:-1:-1;;;;;1005:13:13;;;:8;:13;;;;;;;;;;;:41;;;;1081:14;;;;;:7;:14;;;;;1096:10;1081:26;;;;;;;;;;;:38;;1112:6;1081:38;:30;:38;:::i;:::-;-1:-1:-1;;;;;1052:14:13;;;;;;;:7;:14;;;;;;;;1067:10;1052:26;;;;;;;;;;;:67;;;;1125:28;;;;;;1146:6;;1125:28;;;;;;;;;;;;;-1:-1:-1;1166:4:13;736:439;;;;;:::o;3602:398::-;-1:-1:-1;;;;;3721:10:13;3713:19;;3685:4;3713:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;3752:27;;;3748:164;;;-1:-1:-1;;;;;3797:10:13;3789:19;;3821:1;3789:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;:33;3748:164;;;3875:30;:8;3888:16;3875:30;:12;:30;:::i;:::-;-1:-1:-1;;;;;3851:10:13;3843:19;;;;;;:7;:19;;;;;;;;:29;;;;;;;;;:62;3748:164;-1:-1:-1;;;;;3926:10:13;3917:61;;3948:19;;;;:7;:19;;;;;;;;3917:61;;;3948:29;;;;;;;;;;;;3917:61;;;;;;;;;;;;;;;-1:-1:-1;3991:4:13;;3602:398;-1:-1:-1;;;3602:398:13:o;1189:107:9:-;-1:-1:-1;;;;;1275:16:9;1245:15;1275:16;;;;;;;;;;;;1189:107::o;608:379::-;671:4;-1:-1:-1;;;;;691:17:9;;;;683:26;;;;;;-1:-1:-1;;;;;742:10:9;733:20;:8;:20;;;;;;;;;;;723:30;;;715:39;;;;;;-1:-1:-1;;;;;856:10:9;847:20;:8;:20;;;;;;;;;;;:32;;872:6;847:32;:24;:32;:::i;:::-;-1:-1:-1;;;;;833:10:9;824:20;;:8;:20;;;;;;;;;;;:55;;;;901:13;;;;;;;:25;;919:6;901:25;:17;:25;:::i;:::-;885:8;:13;894:3;-1:-1:-1;;;;;885:13:9;-1:-1:-1;;;;;885:13:9;;;;;;;;;;;;:41;;;;953:3;-1:-1:-1;;;;;932:33:9;941:10;-1:-1:-1;;;;;932:33:9;;958:6;932:33;;;;;;;;;;;;;;-1:-1:-1;978:4:9;608:379;;;;:::o;2883:257:13:-;-1:-1:-1;;;;;3013:10:13;3005:19;;2961:4;3005:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;:46;;3039:11;3005:46;:33;:46;:::i;:::-;-1:-1:-1;;;;;2981:10:13;2973:19;;;;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;;;:78;;;:29;;:19;;3057:61;;2973:78;3057:61;;;;;;;;;;;;;-1:-1:-1;3131:4:13;2883:257;;;;:::o;2300:126::-;-1:-1:-1;;;;;2396:15:13;;;2374:7;2396:15;;;:7;:15;;;;;;;;:25;;;;;;;;;;;;;2300:126::o;836:110:8:-;894:7;916:6;;;;909:14;;;;-1:-1:-1;936:5:8;;;836:110::o;1008:129::-;1066:7;1093:5;;;1111:6;;;;1104:14;;;;1131:1;1008:129;-1:-1:-1;;;1008:129:8:o", + "source": "pragma solidity ^0.4.18;\n\nimport \"./BasicToken.sol\";\nimport \"./ERC20.sol\";\n\n\n/**\n * @title Standard ERC20 token\n *\n * @dev Implementation of the basic standard token.\n * @dev https://github.com/ethereum/EIPs/issues/20\n * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol\n */\ncontract StandardToken is ERC20, BasicToken {\n\n mapping (address => mapping (address => uint256)) internal allowed;\n\n\n /**\n * @dev Transfer tokens from one address to another\n * @param _from address The address which you want to send tokens from\n * @param _to address The address which you want to transfer to\n * @param _value uint256 the amount of tokens to be transferred\n */\n function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {\n require(_to != address(0));\n require(_value <= balances[_from]);\n require(_value <= allowed[_from][msg.sender]);\n\n balances[_from] = balances[_from].sub(_value);\n balances[_to] = balances[_to].add(_value);\n allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);\n Transfer(_from, _to, _value);\n return true;\n }\n\n /**\n * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.\n *\n * Beware that changing an allowance with this method brings the risk that someone may use both the old\n * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this\n * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n * @param _spender The address which will spend the funds.\n * @param _value The amount of tokens to be spent.\n */\n function approve(address _spender, uint256 _value) public returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n /**\n * @dev Function to check the amount of tokens that an owner allowed to a spender.\n * @param _owner address The address which owns the funds.\n * @param _spender address The address which will spend the funds.\n * @return A uint256 specifying the amount of tokens still available for the spender.\n */\n function allowance(address _owner, address _spender) public view returns (uint256) {\n return allowed[_owner][_spender];\n }\n\n /**\n * @dev Increase the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To increment\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _addedValue The amount of tokens to increase the allowance by.\n */\n function increaseApproval(address _spender, uint _addedValue) public returns (bool) {\n allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n /**\n * @dev Decrease the amount of tokens that an owner allowed to a spender.\n *\n * approve should be called when allowed[_spender] == 0. To decrement\n * allowed value is better to use this function to avoid 2 calls (and wait until\n * the first transaction is mined)\n * From MonolithDAO Token.sol\n * @param _spender The address which will spend the funds.\n * @param _subtractedValue The amount of tokens to decrease the allowance by.\n */\n function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {\n uint oldValue = allowed[msg.sender][_spender];\n if (_subtractedValue > oldValue) {\n allowed[msg.sender][_spender] = 0;\n } else {\n allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);\n }\n Approval(msg.sender, _spender, allowed[msg.sender][_spender]);\n return true;\n }\n\n}\n", + "sourcePath": "zeppelin-solidity/contracts/token/ERC20/StandardToken.sol", + "ast": { + "attributes": { + "absolutePath": "zeppelin-solidity/contracts/token/ERC20/StandardToken.sol", + "exportedSymbols": { + "StandardToken": [ + 1022 + ] + } + }, + "children": [ + { + "attributes": { + "literals": [ + "solidity", + "^", + "0.4", + ".18" + ] + }, + "id": 778, + "name": "PragmaDirective", + "src": "0:24:13" + }, + { + "attributes": { + "SourceUnit": 668, + "absolutePath": "zeppelin-solidity/contracts/token/ERC20/BasicToken.sol", + "file": "./BasicToken.sol", + "scope": 1023, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 779, + "name": "ImportDirective", + "src": "26:26:13" + }, + { + "attributes": { + "SourceUnit": 745, + "absolutePath": "zeppelin-solidity/contracts/token/ERC20/ERC20.sol", + "file": "./ERC20.sol", + "scope": 1023, + "symbolAliases": [ + null + ], + "unitAlias": "" + }, + "id": 780, + "name": "ImportDirective", + "src": "53:21:13" + }, + { + "attributes": { + "contractDependencies": [ + 667, + 744, + 776 + ], + "contractKind": "contract", + "documentation": "@title Standard ERC20 token\n * @dev Implementation of the basic standard token.\n@dev https://github.com/ethereum/EIPs/issues/20\n@dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol", + "fullyImplemented": true, + "linearizedBaseContracts": [ + 1022, + 667, + 744, + 776 + ], + "name": "StandardToken", + "scope": 1023 + }, + "children": [ + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "ERC20", + "referencedDeclaration": 744, + "type": "contract ERC20" + }, + "id": 781, + "name": "UserDefinedTypeName", + "src": "370:5:13" + } + ], + "id": 782, + "name": "InheritanceSpecifier", + "src": "370:5:13" + }, + { + "attributes": { + "arguments": [ + null + ] + }, + "children": [ + { + "attributes": { + "contractScope": null, + "name": "BasicToken", + "referencedDeclaration": 667, + "type": "contract BasicToken" + }, + "id": 783, + "name": "UserDefinedTypeName", + "src": "377:10:13" + } + ], + "id": 784, + "name": "InheritanceSpecifier", + "src": "377:10:13" + }, + { + "attributes": { + "constant": false, + "name": "allowed", + "scope": 1022, + "stateVariable": true, + "storageLocation": "default", + "type": "mapping(address => mapping(address => uint256))", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "type": "mapping(address => mapping(address => uint256))" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 785, + "name": "ElementaryTypeName", + "src": "402:7:13" + }, + { + "attributes": { + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 786, + "name": "ElementaryTypeName", + "src": "422:7:13" + }, + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 787, + "name": "ElementaryTypeName", + "src": "433:7:13" + } + ], + "id": 788, + "name": "Mapping", + "src": "413:28:13" + } + ], + "id": 789, + "name": "Mapping", + "src": "393:49:13" + } + ], + "id": 790, + "name": "VariableDeclaration", + "src": "393:66:13" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "transferFrom", + "payable": false, + "scope": 1022, + "stateMutability": "nonpayable", + "superFunction": 726, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_from", + "scope": 876, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 791, + "name": "ElementaryTypeName", + "src": "758:7:13" + } + ], + "id": 792, + "name": "VariableDeclaration", + "src": "758:13:13" + }, + { + "attributes": { + "constant": false, + "name": "_to", + "scope": 876, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 793, + "name": "ElementaryTypeName", + "src": "773:7:13" + } + ], + "id": 794, + "name": "VariableDeclaration", + "src": "773:11:13" + }, + { + "attributes": { + "constant": false, + "name": "_value", + "scope": 876, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 795, + "name": "ElementaryTypeName", + "src": "786:7:13" + } + ], + "id": 796, + "name": "VariableDeclaration", + "src": "786:14:13" + } + ], + "id": 797, + "name": "ParameterList", + "src": "757:44:13" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 876, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 798, + "name": "ElementaryTypeName", + "src": "818:4:13" + } + ], + "id": 799, + "name": "VariableDeclaration", + "src": "818:4:13" + } + ], + "id": 800, + "name": "ParameterList", + "src": "817:6:13" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1037, + "type": "function (bool) pure", + "value": "require" + }, + "id": 801, + "name": "Identifier", + "src": "830:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "!=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 794, + "type": "address", + "value": "_to" + }, + "id": 802, + "name": "Identifier", + "src": "838:3:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": true, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "address", + "type_conversion": true + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "type": "type(address)", + "value": "address" + }, + "id": 803, + "name": "ElementaryTypeNameExpression", + "src": "845:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 804, + "name": "Literal", + "src": "853:1:13" + } + ], + "id": 805, + "name": "FunctionCall", + "src": "845:10:13" + } + ], + "id": 806, + "name": "BinaryOperation", + "src": "838:17:13" + } + ], + "id": 807, + "name": "FunctionCall", + "src": "830:26:13" + } + ], + "id": 808, + "name": "ExpressionStatement", + "src": "830:26:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1037, + "type": "function (bool) pure", + "value": "require" + }, + "id": 809, + "name": "Identifier", + "src": "862:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 796, + "type": "uint256", + "value": "_value" + }, + "id": 810, + "name": "Identifier", + "src": "870:6:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 584, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 811, + "name": "Identifier", + "src": "880:8:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 792, + "type": "address", + "value": "_from" + }, + "id": 812, + "name": "Identifier", + "src": "889:5:13" + } + ], + "id": 813, + "name": "IndexAccess", + "src": "880:15:13" + } + ], + "id": 814, + "name": "BinaryOperation", + "src": "870:25:13" + } + ], + "id": 815, + "name": "FunctionCall", + "src": "862:34:13" + } + ], + "id": 816, + "name": "ExpressionStatement", + "src": "862:34:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1037, + "type": "function (bool) pure", + "value": "require" + }, + "id": 817, + "name": "Identifier", + "src": "902:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "<=", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 796, + "type": "uint256", + "value": "_value" + }, + "id": 818, + "name": "Identifier", + "src": "910:6:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 790, + "type": "mapping(address => mapping(address => uint256))", + "value": "allowed" + }, + "id": 819, + "name": "Identifier", + "src": "920:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 792, + "type": "address", + "value": "_from" + }, + "id": 820, + "name": "Identifier", + "src": "928:5:13" + } + ], + "id": 821, + "name": "IndexAccess", + "src": "920:14:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1034, + "type": "msg", + "value": "msg" + }, + "id": 822, + "name": "Identifier", + "src": "935:3:13" + } + ], + "id": 823, + "name": "MemberAccess", + "src": "935:10:13" + } + ], + "id": 824, + "name": "IndexAccess", + "src": "920:26:13" + } + ], + "id": 825, + "name": "BinaryOperation", + "src": "910:36:13" + } + ], + "id": 826, + "name": "FunctionCall", + "src": "902:45:13" + } + ], + "id": 827, + "name": "ExpressionStatement", + "src": "902:45:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 584, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 828, + "name": "Identifier", + "src": "954:8:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 792, + "type": "address", + "value": "_from" + }, + "id": 829, + "name": "Identifier", + "src": "963:5:13" + } + ], + "id": 830, + "name": "IndexAccess", + "src": "954:15:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sub", + "referencedDeclaration": 546, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 584, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 831, + "name": "Identifier", + "src": "972:8:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 792, + "type": "address", + "value": "_from" + }, + "id": 832, + "name": "Identifier", + "src": "981:5:13" + } + ], + "id": 833, + "name": "IndexAccess", + "src": "972:15:13" + } + ], + "id": 834, + "name": "MemberAccess", + "src": "972:19:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 796, + "type": "uint256", + "value": "_value" + }, + "id": 835, + "name": "Identifier", + "src": "992:6:13" + } + ], + "id": 836, + "name": "FunctionCall", + "src": "972:27:13" + } + ], + "id": 837, + "name": "Assignment", + "src": "954:45:13" + } + ], + "id": 838, + "name": "ExpressionStatement", + "src": "954:45:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 584, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 839, + "name": "Identifier", + "src": "1005:8:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 794, + "type": "address", + "value": "_to" + }, + "id": 840, + "name": "Identifier", + "src": "1014:3:13" + } + ], + "id": 841, + "name": "IndexAccess", + "src": "1005:13:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "add", + "referencedDeclaration": 570, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 584, + "type": "mapping(address => uint256)", + "value": "balances" + }, + "id": 842, + "name": "Identifier", + "src": "1021:8:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 794, + "type": "address", + "value": "_to" + }, + "id": 843, + "name": "Identifier", + "src": "1030:3:13" + } + ], + "id": 844, + "name": "IndexAccess", + "src": "1021:13:13" + } + ], + "id": 845, + "name": "MemberAccess", + "src": "1021:17:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 796, + "type": "uint256", + "value": "_value" + }, + "id": 846, + "name": "Identifier", + "src": "1039:6:13" + } + ], + "id": 847, + "name": "FunctionCall", + "src": "1021:25:13" + } + ], + "id": 848, + "name": "Assignment", + "src": "1005:41:13" + } + ], + "id": 849, + "name": "ExpressionStatement", + "src": "1005:41:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 790, + "type": "mapping(address => mapping(address => uint256))", + "value": "allowed" + }, + "id": 850, + "name": "Identifier", + "src": "1052:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 792, + "type": "address", + "value": "_from" + }, + "id": 851, + "name": "Identifier", + "src": "1060:5:13" + } + ], + "id": 854, + "name": "IndexAccess", + "src": "1052:14:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1034, + "type": "msg", + "value": "msg" + }, + "id": 852, + "name": "Identifier", + "src": "1067:3:13" + } + ], + "id": 853, + "name": "MemberAccess", + "src": "1067:10:13" + } + ], + "id": 855, + "name": "IndexAccess", + "src": "1052:26:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sub", + "referencedDeclaration": 546, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 790, + "type": "mapping(address => mapping(address => uint256))", + "value": "allowed" + }, + "id": 856, + "name": "Identifier", + "src": "1081:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 792, + "type": "address", + "value": "_from" + }, + "id": 857, + "name": "Identifier", + "src": "1089:5:13" + } + ], + "id": 858, + "name": "IndexAccess", + "src": "1081:14:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1034, + "type": "msg", + "value": "msg" + }, + "id": 859, + "name": "Identifier", + "src": "1096:3:13" + } + ], + "id": 860, + "name": "MemberAccess", + "src": "1096:10:13" + } + ], + "id": 861, + "name": "IndexAccess", + "src": "1081:26:13" + } + ], + "id": 862, + "name": "MemberAccess", + "src": "1081:30:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 796, + "type": "uint256", + "value": "_value" + }, + "id": 863, + "name": "Identifier", + "src": "1112:6:13" + } + ], + "id": 864, + "name": "FunctionCall", + "src": "1081:38:13" + } + ], + "id": 865, + "name": "Assignment", + "src": "1052:67:13" + } + ], + "id": 866, + "name": "ExpressionStatement", + "src": "1052:67:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 775, + "type": "function (address,address,uint256)", + "value": "Transfer" + }, + "id": 867, + "name": "Identifier", + "src": "1125:8:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 792, + "type": "address", + "value": "_from" + }, + "id": 868, + "name": "Identifier", + "src": "1134:5:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 794, + "type": "address", + "value": "_to" + }, + "id": 869, + "name": "Identifier", + "src": "1141:3:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 796, + "type": "uint256", + "value": "_value" + }, + "id": 870, + "name": "Identifier", + "src": "1146:6:13" + } + ], + "id": 871, + "name": "FunctionCall", + "src": "1125:28:13" + } + ], + "id": 872, + "name": "ExpressionStatement", + "src": "1125:28:13" + }, + { + "attributes": { + "functionReturnParameters": 800 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 873, + "name": "Literal", + "src": "1166:4:13" + } + ], + "id": 874, + "name": "Return", + "src": "1159:11:13" + } + ], + "id": 875, + "name": "Block", + "src": "824:351:13" + } + ], + "id": 876, + "name": "FunctionDefinition", + "src": "736:439:13" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "approve", + "payable": false, + "scope": 1022, + "stateMutability": "nonpayable", + "superFunction": 735, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_spender", + "scope": 904, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 877, + "name": "ElementaryTypeName", + "src": "1815:7:13" + } + ], + "id": 878, + "name": "VariableDeclaration", + "src": "1815:16:13" + }, + { + "attributes": { + "constant": false, + "name": "_value", + "scope": 904, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 879, + "name": "ElementaryTypeName", + "src": "1833:7:13" + } + ], + "id": 880, + "name": "VariableDeclaration", + "src": "1833:14:13" + } + ], + "id": 881, + "name": "ParameterList", + "src": "1814:34:13" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 904, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 882, + "name": "ElementaryTypeName", + "src": "1865:4:13" + } + ], + "id": 883, + "name": "VariableDeclaration", + "src": "1865:4:13" + } + ], + "id": 884, + "name": "ParameterList", + "src": "1864:6:13" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 790, + "type": "mapping(address => mapping(address => uint256))", + "value": "allowed" + }, + "id": 885, + "name": "Identifier", + "src": "1877:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1034, + "type": "msg", + "value": "msg" + }, + "id": 886, + "name": "Identifier", + "src": "1885:3:13" + } + ], + "id": 887, + "name": "MemberAccess", + "src": "1885:10:13" + } + ], + "id": 889, + "name": "IndexAccess", + "src": "1877:19:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 878, + "type": "address", + "value": "_spender" + }, + "id": 888, + "name": "Identifier", + "src": "1897:8:13" + } + ], + "id": 890, + "name": "IndexAccess", + "src": "1877:29:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 880, + "type": "uint256", + "value": "_value" + }, + "id": 891, + "name": "Identifier", + "src": "1909:6:13" + } + ], + "id": 892, + "name": "Assignment", + "src": "1877:38:13" + } + ], + "id": 893, + "name": "ExpressionStatement", + "src": "1877:38:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 743, + "type": "function (address,address,uint256)", + "value": "Approval" + }, + "id": 894, + "name": "Identifier", + "src": "1921:8:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1034, + "type": "msg", + "value": "msg" + }, + "id": 895, + "name": "Identifier", + "src": "1930:3:13" + } + ], + "id": 896, + "name": "MemberAccess", + "src": "1930:10:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 878, + "type": "address", + "value": "_spender" + }, + "id": 897, + "name": "Identifier", + "src": "1942:8:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 880, + "type": "uint256", + "value": "_value" + }, + "id": 898, + "name": "Identifier", + "src": "1952:6:13" + } + ], + "id": 899, + "name": "FunctionCall", + "src": "1921:38:13" + } + ], + "id": 900, + "name": "ExpressionStatement", + "src": "1921:38:13" + }, + { + "attributes": { + "functionReturnParameters": 884 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 901, + "name": "Literal", + "src": "1972:4:13" + } + ], + "id": 902, + "name": "Return", + "src": "1965:11:13" + } + ], + "id": 903, + "name": "Block", + "src": "1871:110:13" + } + ], + "id": 904, + "name": "FunctionDefinition", + "src": "1798:183:13" + }, + { + "attributes": { + "constant": true, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "allowance", + "payable": false, + "scope": 1022, + "stateMutability": "view", + "superFunction": 715, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_owner", + "scope": 920, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 905, + "name": "ElementaryTypeName", + "src": "2319:7:13" + } + ], + "id": 906, + "name": "VariableDeclaration", + "src": "2319:14:13" + }, + { + "attributes": { + "constant": false, + "name": "_spender", + "scope": 920, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 907, + "name": "ElementaryTypeName", + "src": "2335:7:13" + } + ], + "id": 908, + "name": "VariableDeclaration", + "src": "2335:16:13" + } + ], + "id": 909, + "name": "ParameterList", + "src": "2318:34:13" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 920, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint256", + "type": "uint256" + }, + "id": 910, + "name": "ElementaryTypeName", + "src": "2374:7:13" + } + ], + "id": 911, + "name": "VariableDeclaration", + "src": "2374:7:13" + } + ], + "id": 912, + "name": "ParameterList", + "src": "2373:9:13" + }, + { + "children": [ + { + "attributes": { + "functionReturnParameters": 912 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 790, + "type": "mapping(address => mapping(address => uint256))", + "value": "allowed" + }, + "id": 913, + "name": "Identifier", + "src": "2396:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 906, + "type": "address", + "value": "_owner" + }, + "id": 914, + "name": "Identifier", + "src": "2404:6:13" + } + ], + "id": 915, + "name": "IndexAccess", + "src": "2396:15:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 908, + "type": "address", + "value": "_spender" + }, + "id": 916, + "name": "Identifier", + "src": "2412:8:13" + } + ], + "id": 917, + "name": "IndexAccess", + "src": "2396:25:13" + } + ], + "id": 918, + "name": "Return", + "src": "2389:32:13" + } + ], + "id": 919, + "name": "Block", + "src": "2383:43:13" + } + ], + "id": 920, + "name": "FunctionDefinition", + "src": "2300:126:13" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "increaseApproval", + "payable": false, + "scope": 1022, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_spender", + "scope": 961, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 921, + "name": "ElementaryTypeName", + "src": "2909:7:13" + } + ], + "id": 922, + "name": "VariableDeclaration", + "src": "2909:16:13" + }, + { + "attributes": { + "constant": false, + "name": "_addedValue", + "scope": 961, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 923, + "name": "ElementaryTypeName", + "src": "2927:4:13" + } + ], + "id": 924, + "name": "VariableDeclaration", + "src": "2927:16:13" + } + ], + "id": 925, + "name": "ParameterList", + "src": "2908:36:13" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 961, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 926, + "name": "ElementaryTypeName", + "src": "2961:4:13" + } + ], + "id": 927, + "name": "VariableDeclaration", + "src": "2961:4:13" + } + ], + "id": 928, + "name": "ParameterList", + "src": "2960:6:13" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 790, + "type": "mapping(address => mapping(address => uint256))", + "value": "allowed" + }, + "id": 929, + "name": "Identifier", + "src": "2973:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1034, + "type": "msg", + "value": "msg" + }, + "id": 930, + "name": "Identifier", + "src": "2981:3:13" + } + ], + "id": 931, + "name": "MemberAccess", + "src": "2981:10:13" + } + ], + "id": 933, + "name": "IndexAccess", + "src": "2973:19:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 922, + "type": "address", + "value": "_spender" + }, + "id": 932, + "name": "Identifier", + "src": "2993:8:13" + } + ], + "id": 934, + "name": "IndexAccess", + "src": "2973:29:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "add", + "referencedDeclaration": 570, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 790, + "type": "mapping(address => mapping(address => uint256))", + "value": "allowed" + }, + "id": 935, + "name": "Identifier", + "src": "3005:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1034, + "type": "msg", + "value": "msg" + }, + "id": 936, + "name": "Identifier", + "src": "3013:3:13" + } + ], + "id": 937, + "name": "MemberAccess", + "src": "3013:10:13" + } + ], + "id": 938, + "name": "IndexAccess", + "src": "3005:19:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 922, + "type": "address", + "value": "_spender" + }, + "id": 939, + "name": "Identifier", + "src": "3025:8:13" + } + ], + "id": 940, + "name": "IndexAccess", + "src": "3005:29:13" + } + ], + "id": 941, + "name": "MemberAccess", + "src": "3005:33:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 924, + "type": "uint256", + "value": "_addedValue" + }, + "id": 942, + "name": "Identifier", + "src": "3039:11:13" + } + ], + "id": 943, + "name": "FunctionCall", + "src": "3005:46:13" + } + ], + "id": 944, + "name": "Assignment", + "src": "2973:78:13" + } + ], + "id": 945, + "name": "ExpressionStatement", + "src": "2973:78:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 743, + "type": "function (address,address,uint256)", + "value": "Approval" + }, + "id": 946, + "name": "Identifier", + "src": "3057:8:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1034, + "type": "msg", + "value": "msg" + }, + "id": 947, + "name": "Identifier", + "src": "3066:3:13" + } + ], + "id": 948, + "name": "MemberAccess", + "src": "3066:10:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 922, + "type": "address", + "value": "_spender" + }, + "id": 949, + "name": "Identifier", + "src": "3078:8:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 790, + "type": "mapping(address => mapping(address => uint256))", + "value": "allowed" + }, + "id": 950, + "name": "Identifier", + "src": "3088:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1034, + "type": "msg", + "value": "msg" + }, + "id": 951, + "name": "Identifier", + "src": "3096:3:13" + } + ], + "id": 952, + "name": "MemberAccess", + "src": "3096:10:13" + } + ], + "id": 953, + "name": "IndexAccess", + "src": "3088:19:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 922, + "type": "address", + "value": "_spender" + }, + "id": 954, + "name": "Identifier", + "src": "3108:8:13" + } + ], + "id": 955, + "name": "IndexAccess", + "src": "3088:29:13" + } + ], + "id": 956, + "name": "FunctionCall", + "src": "3057:61:13" + } + ], + "id": 957, + "name": "ExpressionStatement", + "src": "3057:61:13" + }, + { + "attributes": { + "functionReturnParameters": 928 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 958, + "name": "Literal", + "src": "3131:4:13" + } + ], + "id": 959, + "name": "Return", + "src": "3124:11:13" + } + ], + "id": 960, + "name": "Block", + "src": "2967:173:13" + } + ], + "id": 961, + "name": "FunctionDefinition", + "src": "2883:257:13" + }, + { + "attributes": { + "constant": false, + "implemented": true, + "isConstructor": false, + "modifiers": [ + null + ], + "name": "decreaseApproval", + "payable": false, + "scope": 1022, + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + "children": [ + { + "children": [ + { + "attributes": { + "constant": false, + "name": "_spender", + "scope": 1021, + "stateVariable": false, + "storageLocation": "default", + "type": "address", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "address", + "type": "address" + }, + "id": 962, + "name": "ElementaryTypeName", + "src": "3628:7:13" + } + ], + "id": 963, + "name": "VariableDeclaration", + "src": "3628:16:13" + }, + { + "attributes": { + "constant": false, + "name": "_subtractedValue", + "scope": 1021, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 964, + "name": "ElementaryTypeName", + "src": "3646:4:13" + } + ], + "id": 965, + "name": "VariableDeclaration", + "src": "3646:21:13" + } + ], + "id": 966, + "name": "ParameterList", + "src": "3627:41:13" + }, + { + "children": [ + { + "attributes": { + "constant": false, + "name": "", + "scope": 1021, + "stateVariable": false, + "storageLocation": "default", + "type": "bool", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "bool", + "type": "bool" + }, + "id": 967, + "name": "ElementaryTypeName", + "src": "3685:4:13" + } + ], + "id": 968, + "name": "VariableDeclaration", + "src": "3685:4:13" + } + ], + "id": 969, + "name": "ParameterList", + "src": "3684:6:13" + }, + { + "children": [ + { + "attributes": { + "assignments": [ + 971 + ] + }, + "children": [ + { + "attributes": { + "constant": false, + "name": "oldValue", + "scope": 1021, + "stateVariable": false, + "storageLocation": "default", + "type": "uint256", + "value": null, + "visibility": "internal" + }, + "children": [ + { + "attributes": { + "name": "uint", + "type": "uint256" + }, + "id": 970, + "name": "ElementaryTypeName", + "src": "3697:4:13" + } + ], + "id": 971, + "name": "VariableDeclaration", + "src": "3697:13:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 790, + "type": "mapping(address => mapping(address => uint256))", + "value": "allowed" + }, + "id": 972, + "name": "Identifier", + "src": "3713:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1034, + "type": "msg", + "value": "msg" + }, + "id": 973, + "name": "Identifier", + "src": "3721:3:13" + } + ], + "id": 974, + "name": "MemberAccess", + "src": "3721:10:13" + } + ], + "id": 975, + "name": "IndexAccess", + "src": "3713:19:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 963, + "type": "address", + "value": "_spender" + }, + "id": 976, + "name": "Identifier", + "src": "3733:8:13" + } + ], + "id": 977, + "name": "IndexAccess", + "src": "3713:29:13" + } + ], + "id": 978, + "name": "VariableDeclarationStatement", + "src": "3697:45:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": ">", + "type": "bool" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 965, + "type": "uint256", + "value": "_subtractedValue" + }, + "id": 979, + "name": "Identifier", + "src": "3752:16:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 971, + "type": "uint256", + "value": "oldValue" + }, + "id": 980, + "name": "Identifier", + "src": "3771:8:13" + } + ], + "id": 981, + "name": "BinaryOperation", + "src": "3752:27:13" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 790, + "type": "mapping(address => mapping(address => uint256))", + "value": "allowed" + }, + "id": 982, + "name": "Identifier", + "src": "3789:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1034, + "type": "msg", + "value": "msg" + }, + "id": 983, + "name": "Identifier", + "src": "3797:3:13" + } + ], + "id": 984, + "name": "MemberAccess", + "src": "3797:10:13" + } + ], + "id": 986, + "name": "IndexAccess", + "src": "3789:19:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 963, + "type": "address", + "value": "_spender" + }, + "id": 985, + "name": "Identifier", + "src": "3809:8:13" + } + ], + "id": 987, + "name": "IndexAccess", + "src": "3789:29:13" + }, + { + "attributes": { + "argumentTypes": null, + "hexvalue": "30", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "number", + "type": "int_const 0", + "value": "0" + }, + "id": 988, + "name": "Literal", + "src": "3821:1:13" + } + ], + "id": 989, + "name": "Assignment", + "src": "3789:33:13" + } + ], + "id": 990, + "name": "ExpressionStatement", + "src": "3789:33:13" + } + ], + "id": 991, + "name": "Block", + "src": "3781:48:13" + }, + { + "children": [ + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "operator": "=", + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 790, + "type": "mapping(address => mapping(address => uint256))", + "value": "allowed" + }, + "id": 992, + "name": "Identifier", + "src": "3843:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1034, + "type": "msg", + "value": "msg" + }, + "id": 993, + "name": "Identifier", + "src": "3851:3:13" + } + ], + "id": 994, + "name": "MemberAccess", + "src": "3851:10:13" + } + ], + "id": 996, + "name": "IndexAccess", + "src": "3843:19:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 963, + "type": "address", + "value": "_spender" + }, + "id": 995, + "name": "Identifier", + "src": "3863:8:13" + } + ], + "id": 997, + "name": "IndexAccess", + "src": "3843:29:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "uint256", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sub", + "referencedDeclaration": 546, + "type": "function (uint256,uint256) pure returns (uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 971, + "type": "uint256", + "value": "oldValue" + }, + "id": 998, + "name": "Identifier", + "src": "3875:8:13" + } + ], + "id": 999, + "name": "MemberAccess", + "src": "3875:12:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 965, + "type": "uint256", + "value": "_subtractedValue" + }, + "id": 1000, + "name": "Identifier", + "src": "3888:16:13" + } + ], + "id": 1001, + "name": "FunctionCall", + "src": "3875:30:13" + } + ], + "id": 1002, + "name": "Assignment", + "src": "3843:62:13" + } + ], + "id": 1003, + "name": "ExpressionStatement", + "src": "3843:62:13" + } + ], + "id": 1004, + "name": "Block", + "src": "3835:77:13" + } + ], + "id": 1005, + "name": "IfStatement", + "src": "3748:164:13" + }, + { + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "isStructConstructorCall": false, + "lValueRequested": false, + "names": [ + null + ], + "type": "tuple()", + "type_conversion": false + }, + "children": [ + { + "attributes": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 743, + "type": "function (address,address,uint256)", + "value": "Approval" + }, + "id": 1006, + "name": "Identifier", + "src": "3917:8:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1034, + "type": "msg", + "value": "msg" + }, + "id": 1007, + "name": "Identifier", + "src": "3926:3:13" + } + ], + "id": 1008, + "name": "MemberAccess", + "src": "3926:10:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 963, + "type": "address", + "value": "_spender" + }, + "id": 1009, + "name": "Identifier", + "src": "3938:8:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "uint256" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "type": "mapping(address => uint256)" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 790, + "type": "mapping(address => mapping(address => uint256))", + "value": "allowed" + }, + "id": 1010, + "name": "Identifier", + "src": "3948:7:13" + }, + { + "attributes": { + "argumentTypes": null, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "member_name": "sender", + "referencedDeclaration": null, + "type": "address" + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 1034, + "type": "msg", + "value": "msg" + }, + "id": 1011, + "name": "Identifier", + "src": "3956:3:13" + } + ], + "id": 1012, + "name": "MemberAccess", + "src": "3956:10:13" + } + ], + "id": 1013, + "name": "IndexAccess", + "src": "3948:19:13" + }, + { + "attributes": { + "argumentTypes": null, + "overloadedDeclarations": [ + null + ], + "referencedDeclaration": 963, + "type": "address", + "value": "_spender" + }, + "id": 1014, + "name": "Identifier", + "src": "3968:8:13" + } + ], + "id": 1015, + "name": "IndexAccess", + "src": "3948:29:13" + } + ], + "id": 1016, + "name": "FunctionCall", + "src": "3917:61:13" + } + ], + "id": 1017, + "name": "ExpressionStatement", + "src": "3917:61:13" + }, + { + "attributes": { + "functionReturnParameters": 969 + }, + "children": [ + { + "attributes": { + "argumentTypes": null, + "hexvalue": "74727565", + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "subdenomination": null, + "token": "bool", + "type": "bool", + "value": "true" + }, + "id": 1018, + "name": "Literal", + "src": "3991:4:13" + } + ], + "id": 1019, + "name": "Return", + "src": "3984:11:13" + } + ], + "id": 1020, + "name": "Block", + "src": "3691:309:13" + } + ], + "id": 1021, + "name": "FunctionDefinition", + "src": "3602:398:13" + } + ], + "id": 1022, + "name": "ContractDefinition", + "src": "344:3659:13" + } + ], + "id": 1023, + "name": "SourceUnit", + "src": "0:4004:13" + }, + "compiler": { + "name": "solc", + "version": "0.4.19+commit.c4cbbb05.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "1.0.1", + "updatedAt": "2018-02-22T15:06:12.343Z" +} \ No newline at end of file diff --git a/contracts/EmptyContract.sol b/contracts/EmptyContract.sol new file mode 100644 index 0000000..f64621a --- /dev/null +++ b/contracts/EmptyContract.sol @@ -0,0 +1,8 @@ +pragma solidity ^0.4.19; + +contract EmptyContract { + + function EmptyContract() public { + } + +} diff --git a/migrations/2_deploy_contracts.js b/migrations/2_deploy_contracts.js index 7289094..f145f02 100644 --- a/migrations/2_deploy_contracts.js +++ b/migrations/2_deploy_contracts.js @@ -10,8 +10,7 @@ const ERC223Utils = artifacts.require('ERC223/ERC223Utils'); const AMNToken = artifacts.require('AMNToken'); module.exports = function (deployer) { - deployer.deploy(ERC223Utils).then(() => { - deployer.deploy(AMNToken); - }); - deployer.link(ERC223Utils, AMNToken); + deployer.deploy(ERC223Utils); + deployer.link(ERC223Utils, AMNToken); + deployer.deploy(AMNToken); }; diff --git a/package-lock.json b/package-lock.json index 3a1bae8..48e0cc1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,16 +4,220 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "abstract-leveldown": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz", + "integrity": "sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA==", + "requires": { + "xtend": "4.0.1" + } + }, + "aes-js": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-0.2.4.tgz", + "integrity": "sha1-lLiBq3FyhtAV+iGeCPtmcJ3aWj0=" + }, + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "requires": { + "co": "4.6.0", + "fast-deep-equal": "1.0.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "asn1": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", + "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, "assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==" }, + "async": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", + "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", + "requires": { + "lodash": "4.17.5" + } + }, + "async-eventemitter": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz", + "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==", + "requires": { + "async": "2.6.0" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", + "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base-x": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-1.1.0.tgz", + "integrity": "sha1-QtPXF0dPnqAiB/bRqh9CaRPut6w=" + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", + "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "bignumber.js": { + "version": "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2" + }, + "bindings": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.3.0.tgz", + "integrity": "sha512-DpLh5EzMR2kzvX1KIlVC0VkC3iZtHKTgdtZ0a3pglBZdaQFjt5S9g9xd1lE+YvXyfd6mtCeRnrUfOLYiTMlNSw==" + }, + "bip39": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/bip39/-/bip39-2.5.0.tgz", + "integrity": "sha512-xwIx/8JKoT2+IPJpFEfXoWdYwP7UVAoUxxLNfGCfVowaJE7yg1Y5B1BVPqlUNsBq5/nGwmFkwRJ8xDW4sX8OdA==", + "requires": { + "create-hash": "1.1.3", + "pbkdf2": "3.0.14", + "randombytes": "2.0.6", + "safe-buffer": "5.1.1", + "unorm": "1.4.1" + } + }, + "bip66": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", + "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", + "requires": { + "safe-buffer": "5.1.1" + } + }, "bn.js": { "version": "4.11.6", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" }, + "boom": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", + "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", + "requires": { + "hoek": "4.2.1" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "1.0.0", + "concat-map": "0.0.1" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "browserify-aes": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.1.1.tgz", + "integrity": "sha512-UGnTYAnB2a3YuYKIRy1/4FB2HdM866E0qC46JXvVTYKlBlZlnvfpSfY6OKfXZAkv70eJ2a1SqzpAo5CRhZGDFg==", + "requires": { + "buffer-xor": "1.0.3", + "cipher-base": "1.0.4", + "create-hash": "1.1.3", + "evp_bytestokey": "1.0.3", + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "browserify-sha3": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/browserify-sha3/-/browserify-sha3-0.0.1.tgz", + "integrity": "sha1-P/NKMAbvFcD7NWflQbkaI0ASPRE=", + "requires": { + "js-sha3": "0.3.1" + }, + "dependencies": { + "js-sha3": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.3.1.tgz", + "integrity": "sha1-hhIoAhQvCChQKg0d7h2V4lO7AkM=" + } + } + }, + "bs58": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-3.1.0.tgz", + "integrity": "sha1-1MJjiL9IBMrHFBQbGUWqR+XrJI4=", + "requires": { + "base-x": "1.1.0" + } + }, + "bs58check": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-1.3.4.tgz", + "integrity": "sha1-xSVABzdJEXcU+gQsMEfrj5FRy/g=", + "requires": { + "bs58": "3.1.0", + "create-hash": "1.1.3" + } + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" + }, + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, "chai": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chai/-/chai-4.1.2.tgz", @@ -45,6 +249,142 @@ "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=" }, + "checkpoint-store": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/checkpoint-store/-/checkpoint-store-1.1.0.tgz", + "integrity": "sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY=", + "requires": { + "functional-red-black-tree": "1.0.1" + } + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wrap-ansi": "2.1.0" + } + }, + "clone": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.1.tgz", + "integrity": "sha1-0hfR6WERjjrJpLi7oyhVU79kfNs=" + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "coinstring": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/coinstring/-/coinstring-2.3.0.tgz", + "integrity": "sha1-zbYzY6lhUCQEolr7gsLibV/2J6Q=", + "requires": { + "bs58": "2.0.1", + "create-hash": "1.1.3" + }, + "dependencies": { + "bs58": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/bs58/-/bs58-2.0.1.tgz", + "integrity": "sha1-VZCNWPGYKrogCPob7Y+RmYopv40=" + } + } + }, + "combined-stream": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "requires": { + "delayed-stream": "1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "create-hash": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", + "integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=", + "requires": { + "cipher-base": "1.0.4", + "inherits": "2.0.3", + "ripemd160": "2.0.1", + "sha.js": "2.4.10" + } + }, + "create-hmac": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.6.tgz", + "integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=", + "requires": { + "cipher-base": "1.0.4", + "create-hash": "1.1.3", + "inherits": "2.0.3", + "ripemd160": "2.0.1", + "safe-buffer": "5.1.1", + "sha.js": "2.4.10" + } + }, + "cryptiles": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", + "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", + "requires": { + "boom": "5.2.0" + }, + "dependencies": { + "boom": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", + "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", + "requires": { + "hoek": "4.2.1" + } + } + } + }, + "crypto-js": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.8.tgz", + "integrity": "sha1-cV8HC/YBTyrpkqmLOSkli3E/CNU=" + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "1.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, "deep-eql": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", @@ -53,10 +393,265 @@ "type-detect": "4.0.8" } }, + "deep-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", + "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" + }, + "deferred-leveldown": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", + "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==", + "requires": { + "abstract-leveldown": "2.6.3" + } + }, + "define-properties": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", + "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", + "requires": { + "foreach": "2.0.5", + "object-keys": "1.0.11" + }, + "dependencies": { + "object-keys": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", + "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=" + } + } + }, + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "dom-walk": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz", + "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=" + }, "dotenv": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-4.0.0.tgz", - "integrity": "sha1-hk7xN5rO1Vzm+V3r7NzhefegzR0=" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-5.0.0.tgz", + "integrity": "sha512-p4A7snaxI9Hnj3GDWhTpckHYcd9WwZDmGPcvJJV3CoRFq0Dvsp96eYgXBl9WbmbJfuxqiZ2WenNaeWSs675ghQ==" + }, + "drbg.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/drbg.js/-/drbg.js-1.0.1.tgz", + "integrity": "sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs=", + "requires": { + "browserify-aes": "1.1.1", + "create-hash": "1.1.3", + "create-hmac": "1.1.6" + } + }, + "ecc-jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", + "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "elliptic": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", + "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", + "requires": { + "bn.js": "4.11.6", + "brorand": "1.1.0", + "hash.js": "1.1.3", + "hmac-drbg": "1.0.1", + "inherits": "2.0.3", + "minimalistic-assert": "1.0.0", + "minimalistic-crypto-utils": "1.0.1" + } + }, + "encoding": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", + "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "requires": { + "iconv-lite": "0.4.19" + } + }, + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "requires": { + "prr": "1.0.1" + } + }, + "error-ex": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", + "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", + "requires": { + "is-arrayish": "0.2.1" + } + }, + "es-abstract": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.10.0.tgz", + "integrity": "sha512-/uh/DhdqIOSkAWifU+8nG78vlQxdLckUdI/sPgy0VhuXi2qJ7T8czBmqIYtLQVpCIFYafChnsRsB5pyb1JdmCQ==", + "requires": { + "es-to-primitive": "1.1.1", + "function-bind": "1.1.1", + "has": "1.0.1", + "is-callable": "1.1.3", + "is-regex": "1.0.4" + } + }, + "es-to-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", + "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", + "requires": { + "is-callable": "1.1.3", + "is-date-object": "1.0.1", + "is-symbol": "1.0.1" + } + }, + "ethereum-common": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.2.0.tgz", + "integrity": "sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA==" + }, + "ethereumjs-account": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.4.tgz", + "integrity": "sha1-+MMCMby3B/RRTYoFLB+doQNiTUc=", + "requires": { + "ethereumjs-util": "4.5.0", + "rlp": "2.0.0" + } + }, + "ethereumjs-block": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz", + "integrity": "sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg==", + "requires": { + "async": "2.6.0", + "ethereum-common": "0.2.0", + "ethereumjs-tx": "1.3.3", + "ethereumjs-util": "5.1.4", + "merkle-patricia-tree": "2.3.0" + }, + "dependencies": { + "ethereumjs-util": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.1.4.tgz", + "integrity": "sha512-wbeTc5prEzIWFSQUcEsCAZbqubtJKy6yS+oZMY1cGG6GLYzLjm4YhC2RNrWIg8hRYnclWpnZmx2zkiufQkmd3w==", + "requires": { + "bn.js": "4.11.6", + "create-hash": "1.1.3", + "ethjs-util": "0.1.4", + "keccak": "1.4.0", + "rlp": "2.0.0", + "safe-buffer": "5.1.1", + "secp256k1": "3.5.0" + } + } + } + }, + "ethereumjs-tx": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.3.tgz", + "integrity": "sha1-7OBR0+/b53GtKlGNYWMsoqt17Ls=", + "requires": { + "ethereum-common": "0.0.18", + "ethereumjs-util": "5.1.4" + }, + "dependencies": { + "ethereum-common": { + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", + "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=" + }, + "ethereumjs-util": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.1.4.tgz", + "integrity": "sha512-wbeTc5prEzIWFSQUcEsCAZbqubtJKy6yS+oZMY1cGG6GLYzLjm4YhC2RNrWIg8hRYnclWpnZmx2zkiufQkmd3w==", + "requires": { + "bn.js": "4.11.6", + "create-hash": "1.1.3", + "ethjs-util": "0.1.4", + "keccak": "1.4.0", + "rlp": "2.0.0", + "safe-buffer": "5.1.1", + "secp256k1": "3.5.0" + } + } + } + }, + "ethereumjs-util": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-4.5.0.tgz", + "integrity": "sha1-PpQosxfuvaPXJg2FT93alUsfG8Y=", + "requires": { + "bn.js": "4.11.6", + "create-hash": "1.1.3", + "keccakjs": "0.2.1", + "rlp": "2.0.0", + "secp256k1": "3.5.0" + } + }, + "ethereumjs-vm": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.3.3.tgz", + "integrity": "sha512-yIWJqTEcrF9vJTCvNMxacRkAx6zIZTOW0SmSA+hSFiU1x8JyVZDi9o5udwsRVECT5RkPgQzm62kpL6Pf4qemsw==", + "requires": { + "async": "2.6.0", + "async-eventemitter": "0.2.4", + "ethereum-common": "0.2.0", + "ethereumjs-account": "2.0.4", + "ethereumjs-block": "1.7.1", + "ethereumjs-util": "5.1.4", + "fake-merkle-patricia-tree": "1.0.1", + "functional-red-black-tree": "1.0.1", + "merkle-patricia-tree": "2.3.0", + "rustbn.js": "0.1.2", + "safe-buffer": "5.1.1" + }, + "dependencies": { + "ethereumjs-util": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.1.4.tgz", + "integrity": "sha512-wbeTc5prEzIWFSQUcEsCAZbqubtJKy6yS+oZMY1cGG6GLYzLjm4YhC2RNrWIg8hRYnclWpnZmx2zkiufQkmd3w==", + "requires": { + "bn.js": "4.11.6", + "create-hash": "1.1.3", + "ethjs-util": "0.1.4", + "keccak": "1.4.0", + "rlp": "2.0.0", + "safe-buffer": "5.1.1", + "secp256k1": "3.5.0" + } + } + } + }, + "ethereumjs-wallet": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-0.6.0.tgz", + "integrity": "sha1-gnY7Fpfuenlr5xVdqd+0my+Yz9s=", + "requires": { + "aes-js": "0.2.4", + "bs58check": "1.3.4", + "ethereumjs-util": "4.5.0", + "hdkey": "0.7.1", + "scrypt.js": "0.2.0", + "utf8": "2.1.2", + "uuid": "2.0.3" + } }, "ethjs-abi": { "version": "0.2.1", @@ -68,48 +663,1458 @@ "number-to-bn": "1.7.0" } }, + "ethjs-util": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.4.tgz", + "integrity": "sha1-HItoeSV0RO9NPz+7rC3tEs2ZfZM=", + "requires": { + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" + } + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "requires": { + "md5.js": "1.3.4", + "safe-buffer": "5.1.1" + } + }, + "extend": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", + "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fake-merkle-patricia-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz", + "integrity": "sha1-S4w6z7Ugr635hgsfFM2M40As3dM=", + "requires": { + "checkpoint-store": "1.1.0" + } + }, + "fast-deep-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", + "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "requires": { + "path-exists": "2.1.0", + "pinkie-promise": "2.0.1" + } + }, + "for-each": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.2.tgz", + "integrity": "sha1-LEBFC5NI6X8oEyJZO6lnBLmr1NQ=", + "requires": { + "is-function": "1.0.1" + } + }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", + "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.6", + "mime-types": "2.1.18" + } + }, + "fs-extra": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", + "requires": { + "graceful-fs": "4.1.11", + "jsonfile": "2.4.0", + "klaw": "1.3.1", + "path-is-absolute": "1.0.1", + "rimraf": "2.6.2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" + }, + "get-caller-file": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz", + "integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U=" + }, "get-func-name": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=" }, - "is-hex-prefixed": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", - "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "1.0.0" + } }, - "js-sha3": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.5.tgz", - "integrity": "sha1-uvDA6MVK1ZA0R9+Wreekobynmko=" + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } }, - "number-to-bn": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", - "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", + "global": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", + "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", "requires": { - "bn.js": "4.11.6", - "strip-hex-prefix": "1.0.0" + "min-document": "2.19.0", + "process": "0.5.2" } }, - "pathval": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", - "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=" + "graceful-fs": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", + "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" }, - "strip-hex-prefix": { + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", + "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "requires": { + "ajv": "5.5.2", + "har-schema": "2.0.0" + } + }, + "has": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", + "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", + "requires": { + "function-bind": "1.1.1" + } + }, + "hash-base": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", + "integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=", + "requires": { + "inherits": "2.0.3" + } + }, + "hash.js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", + "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", + "requires": { + "inherits": "2.0.3", + "minimalistic-assert": "1.0.0" + } + }, + "hawk": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", + "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", + "requires": { + "boom": "4.3.1", + "cryptiles": "3.1.2", + "hoek": "4.2.1", + "sntp": "2.1.0" + } + }, + "hdkey": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/hdkey/-/hdkey-0.7.1.tgz", + "integrity": "sha1-yu5L6BqneSHpCbjSKN0PKayu5jI=", + "requires": { + "coinstring": "2.3.0", + "secp256k1": "3.5.0" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "1.1.3", + "minimalistic-assert": "1.0.0", + "minimalistic-crypto-utils": "1.0.1" + } + }, + "hoek": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", + "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==" + }, + "hosted-git-info": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", + "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==" + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "1.0.0", + "jsprim": "1.4.1", + "sshpk": "1.13.1" + } + }, + "iconv-lite": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", + "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" + }, + "immediate": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.2.3.tgz", + "integrity": "sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "invert-kv": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", - "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "requires": { - "is-hex-prefixed": "1.0.0" + "builtin-modules": "1.1.1" } }, - "type-detect": { + "is-callable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", + "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=" + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-function": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-function/-/is-function-1.0.1.tgz", + "integrity": "sha1-Es+5i2W1fdPRk6MSH19uL0N2ArU=" + }, + "is-hex-prefixed": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", + "integrity": "sha1-fY035q135dEnFIkTxXPggtd39VQ=" + }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "requires": { + "has": "1.0.1" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-symbol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", + "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "isomorphic-fetch": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", + "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", + "requires": { + "node-fetch": "1.7.3", + "whatwg-fetch": "2.0.3" + } + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "js-sha3": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.5.tgz", + "integrity": "sha1-uvDA6MVK1ZA0R9+Wreekobynmko=" + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "requires": { + "graceful-fs": "4.1.11" + } + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "keccak": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/keccak/-/keccak-1.4.0.tgz", + "integrity": "sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw==", + "requires": { + "bindings": "1.3.0", + "inherits": "2.0.3", + "nan": "2.8.0", + "safe-buffer": "5.1.1" + } + }, + "keccakjs": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/keccakjs/-/keccakjs-0.2.1.tgz", + "integrity": "sha1-HWM6+QfvMFu/ny+mFtVsRFYd+k0=", + "requires": { + "browserify-sha3": "0.0.1", + "sha3": "1.2.0" + } + }, + "klaw": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", + "requires": { + "graceful-fs": "4.1.11" + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "1.0.0" + } + }, + "level-codec": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz", + "integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ==" + }, + "level-errors": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.0.5.tgz", + "integrity": "sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig==", + "requires": { + "errno": "0.1.7" + } + }, + "level-iterator-stream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz", + "integrity": "sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0=", + "requires": { + "inherits": "2.0.3", + "level-errors": "1.0.5", + "readable-stream": "1.1.14", + "xtend": "4.0.1" + }, + "dependencies": { + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + } + } + }, + "level-ws": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz", + "integrity": "sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos=", + "requires": { + "readable-stream": "1.0.34", + "xtend": "2.1.2" + }, + "dependencies": { + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "0.0.1", + "string_decoder": "0.10.31" + } + }, + "xtend": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", + "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", + "requires": { + "object-keys": "0.4.0" + } + } + } + }, + "levelup": { + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz", + "integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==", + "requires": { + "deferred-leveldown": "1.2.2", + "level-codec": "7.0.1", + "level-errors": "1.0.5", + "level-iterator-stream": "1.3.1", + "prr": "1.0.1", + "semver": "5.4.1", + "xtend": "4.0.1" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "requires": { + "graceful-fs": "4.1.11", + "parse-json": "2.2.0", + "pify": "2.3.0", + "pinkie-promise": "2.0.1", + "strip-bom": "2.0.0" + } + }, + "lodash": { + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", + "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" + }, + "lodash.assign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=" + }, + "ltgt": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.0.tgz", + "integrity": "sha1-tlul/LNJopkkyOMz98alVi8uSEI=" + }, + "md5.js": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", + "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "requires": { + "hash-base": "3.0.4", + "inherits": "2.0.3" + }, + "dependencies": { + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + } + } + }, + "memdown": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/memdown/-/memdown-1.4.1.tgz", + "integrity": "sha1-tOThkhdGZP+65BNhqlAPMRnv4hU=", + "requires": { + "abstract-leveldown": "2.7.2", + "functional-red-black-tree": "1.0.1", + "immediate": "3.2.3", + "inherits": "2.0.3", + "ltgt": "2.2.0", + "safe-buffer": "5.1.1" + }, + "dependencies": { + "abstract-leveldown": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", + "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", + "requires": { + "xtend": "4.0.1" + } + } + } + }, + "memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=" + }, + "merkle-patricia-tree": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.0.tgz", + "integrity": "sha512-LKd2OoIT9Re/OG38zXbd5pyHIk2IfcOUczCwkYXl5iJIbufg9nqpweh66VfPwMkUlrEvc7YVvtQdmSrB9V9TkQ==", + "requires": { + "async": "1.5.2", + "ethereumjs-util": "5.1.4", + "level-ws": "0.0.0", + "levelup": "1.3.9", + "memdown": "1.4.1", + "readable-stream": "2.3.4", + "rlp": "2.0.0", + "semaphore": "1.1.0" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + }, + "ethereumjs-util": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.1.4.tgz", + "integrity": "sha512-wbeTc5prEzIWFSQUcEsCAZbqubtJKy6yS+oZMY1cGG6GLYzLjm4YhC2RNrWIg8hRYnclWpnZmx2zkiufQkmd3w==", + "requires": { + "bn.js": "4.11.6", + "create-hash": "1.1.3", + "ethjs-util": "0.1.4", + "keccak": "1.4.0", + "rlp": "2.0.0", + "safe-buffer": "5.1.1", + "secp256k1": "3.5.0" + } + } + } + }, + "mime-db": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", + "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" + }, + "mime-types": { + "version": "2.1.18", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", + "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", + "requires": { + "mime-db": "1.33.0" + } + }, + "min-document": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", + "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", + "requires": { + "dom-walk": "0.1.1" + } + }, + "minimalistic-assert": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", + "integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "1.1.11" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "nan": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.8.0.tgz", + "integrity": "sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=" + }, + "node-fetch": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", + "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", + "requires": { + "encoding": "0.1.12", + "is-stream": "1.1.0" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "requires": { + "hosted-git-info": "2.5.0", + "is-builtin-module": "1.0.0", + "semver": "5.4.1", + "validate-npm-package-license": "3.0.1" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "number-to-bn": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/number-to-bn/-/number-to-bn-1.7.0.tgz", + "integrity": "sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA=", + "requires": { + "bn.js": "4.11.6", + "strip-hex-prefix": "1.0.0" + } + }, + "oauth-sign": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" + }, + "object-inspect": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.5.0.tgz", + "integrity": "sha512-UmOFbHbwvv+XHj7BerrhVq+knjceBdkvU5AriwLMvhv2qi+e7DJzxfBeFpILEjVzCp+xA+W/pIf06RGPWlZNfw==" + }, + "object-keys": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", + "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1.0.2" + } + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "1.0.0" + } + }, + "parse-headers": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/parse-headers/-/parse-headers-2.0.1.tgz", + "integrity": "sha1-aug6eqJanZtwCswoaYzR8e1+lTY=", + "requires": { + "for-each": "0.3.2", + "trim": "0.0.1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "requires": { + "error-ex": "1.3.1" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "requires": { + "pinkie-promise": "2.0.1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-parse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", + "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=" + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "requires": { + "graceful-fs": "4.1.11", + "pify": "2.3.0", + "pinkie-promise": "2.0.1" + } + }, + "pathval": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=" + }, + "pbkdf2": { + "version": "3.0.14", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.14.tgz", + "integrity": "sha512-gjsZW9O34fm0R7PaLHRJmLLVfSoesxztjPjE9o6R+qtVJij90ltg1joIovN9GKrRW3t1PzhDDG3UMEMFfZ+1wA==", + "requires": { + "create-hash": "1.1.3", + "create-hmac": "1.1.6", + "ripemd160": "2.0.1", + "safe-buffer": "5.1.1", + "sha.js": "2.4.10" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "requires": { + "pinkie": "2.0.4" + } + }, + "process": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", + "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "qs": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" + }, + "randombytes": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", + "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "requires": { + "load-json-file": "1.1.0", + "normalize-package-data": "2.4.0", + "path-type": "1.1.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "requires": { + "find-up": "1.1.2", + "read-pkg": "1.1.0" + } + }, + "readable-stream": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.4.tgz", + "integrity": "sha512-vuYxeWYM+fde14+rajzqgeohAI7YoJcHE7kXDAc4Nk0EbuKnJfqtY9YtRkLo/tqkuF7MsBQRhPnPeyjYITp3ZQ==", + "requires": { + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.1", + "string_decoder": "1.0.3", + "util-deprecate": "1.0.2" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "requires": { + "safe-buffer": "5.1.1" + } + } + } + }, + "request": { + "version": "2.83.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", + "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", + "requires": { + "aws-sign2": "0.7.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.6", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.3.2", + "har-validator": "5.0.3", + "hawk": "6.0.2", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.18", + "oauth-sign": "0.8.2", + "performance-now": "2.1.0", + "qs": "6.5.1", + "safe-buffer": "5.1.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.3", + "tunnel-agent": "0.6.0", + "uuid": "3.2.1" + }, + "dependencies": { + "uuid": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", + "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" + } + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-from-string": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz", + "integrity": "sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=" + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" + }, + "resolve": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.5.0.tgz", + "integrity": "sha512-hgoSGrc3pjzAPHNBg+KnFcK2HwlHTs/YrAGUr6qgTVUZmXv1UEXXl0bZNBKMA9fud6lRYFdPGz0xXxycPzmmiw==", + "requires": { + "path-parse": "1.0.5" + } + }, + "resumer": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", + "integrity": "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=", + "requires": { + "through": "2.3.8" + } + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "requires": { + "glob": "7.1.2" + } + }, + "ripemd160": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", + "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=", + "requires": { + "hash-base": "2.0.2", + "inherits": "2.0.3" + } + }, + "rlp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.0.0.tgz", + "integrity": "sha1-nbOE/0uJqPYVY9kjldhiWxjzr7A=" + }, + "rustbn.js": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.1.2.tgz", + "integrity": "sha512-bAkNqSHYdJdFsBC7Z11JgzYktL31HIpB2o70jZcGiL1U1TVtPyvaVhDrGWwS8uZtaqwW2k6NOPGZCqW/Dgh5Lg==" + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" + }, + "scrypt": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/scrypt/-/scrypt-6.0.3.tgz", + "integrity": "sha1-BOAUpWgrU/pQwtXM4WfXGcBthw0=", + "requires": { + "nan": "2.8.0" + } + }, + "scrypt.js": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/scrypt.js/-/scrypt.js-0.2.0.tgz", + "integrity": "sha1-r40UZbcemZARC+38WTuUeeA6ito=", + "requires": { + "scrypt": "6.0.3", + "scryptsy": "1.2.1" + } + }, + "scryptsy": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/scryptsy/-/scryptsy-1.2.1.tgz", + "integrity": "sha1-oyJfpLJST4AnAHYeKFW987LZIWM=", + "requires": { + "pbkdf2": "3.0.14" + } + }, + "secp256k1": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.5.0.tgz", + "integrity": "sha512-e5QIJl8W7Y4tT6LHffVcZAxJjvpgE5Owawv6/XCYPQljE9aP2NFFddQ8OYMKhdLshNu88FfL3qCN3/xYkXGRsA==", + "requires": { + "bindings": "1.3.0", + "bip66": "1.1.5", + "bn.js": "4.11.6", + "create-hash": "1.1.3", + "drbg.js": "1.0.1", + "elliptic": "6.4.0", + "nan": "2.8.0", + "safe-buffer": "5.1.1" + } + }, + "semaphore": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/semaphore/-/semaphore-1.1.0.tgz", + "integrity": "sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA==" + }, + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "sha.js": { + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.10.tgz", + "integrity": "sha512-vnwmrFDlOExK4Nm16J2KMWHLrp14lBrjxMxBJpu++EnsuBmpiYaM/MEs46Vxxm/4FvdP5yTwuCTO9it5FSjrqA==", + "requires": { + "inherits": "2.0.3", + "safe-buffer": "5.1.1" + } + }, + "sha3": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/sha3/-/sha3-1.2.0.tgz", + "integrity": "sha1-aYnxtwpJhwWHajc+LGKs6WqpOZo=", + "requires": { + "nan": "2.8.0" + } + }, + "sntp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", + "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", + "requires": { + "hoek": "4.2.1" + } + }, + "solc": { + "version": "0.4.20", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.4.20.tgz", + "integrity": "sha512-LrP3Jp4FS3y8sduIR67y8Ss1riR3fggk5sMnx4OSCcU88Ro0e51+KVXyfH3NP6ghLo7COrLx/lGUaDDugCzdgA==", + "requires": { + "fs-extra": "0.30.0", + "memorystream": "0.3.1", + "require-from-string": "1.2.1", + "semver": "5.4.1", + "yargs": "4.8.1" + } + }, + "spdx-correct": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", + "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "requires": { + "spdx-license-ids": "1.2.2" + } + }, + "spdx-expression-parse": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", + "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=" + }, + "spdx-license-ids": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", + "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=" + }, + "sshpk": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", + "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string.prototype.trim": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz", + "integrity": "sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo=", + "requires": { + "define-properties": "1.1.2", + "es-abstract": "1.10.0", + "function-bind": "1.1.1" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "stringstream": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", + "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "requires": { + "is-utf8": "0.2.1" + } + }, + "strip-hex-prefix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", + "integrity": "sha1-DF8VX+8RUTczd96du1iNoFUA428=", + "requires": { + "is-hex-prefixed": "1.0.0" + } + }, + "tape": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/tape/-/tape-4.9.0.tgz", + "integrity": "sha512-j0jO9BiScfqtPBb9QmPLL0qvxXMz98xjkMb7x8lKipFlJZwNJkqkWPou+NU4V6T9RnVh1kuSthLE8gLrN8bBfw==", + "requires": { + "deep-equal": "1.0.1", + "defined": "1.0.0", + "for-each": "0.3.2", + "function-bind": "1.1.1", + "glob": "7.1.2", + "has": "1.0.1", + "inherits": "2.0.3", + "minimist": "1.2.0", + "object-inspect": "1.5.0", + "resolve": "1.5.0", + "resumer": "0.0.0", + "string.prototype.trim": "1.1.2", + "through": "2.3.8" + } + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "tough-cookie": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", + "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", + "requires": { + "punycode": "1.4.1" + } + }, + "trim": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", + "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=" + }, + "truffle-hdwallet-provider": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/truffle-hdwallet-provider/-/truffle-hdwallet-provider-0.0.3.tgz", + "integrity": "sha1-Dh3gIQS3PTh14c9wkzBbTqii2EM=", + "requires": { + "bip39": "2.5.0", + "ethereumjs-wallet": "0.6.0", + "web3": "0.18.4", + "web3-provider-engine": "8.6.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "5.1.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "optional": true + }, + "type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" }, + "unorm": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/unorm/-/unorm-1.4.1.tgz", + "integrity": "sha1-NkIA1fE2RsqLzURJAnEzVhR5IwA=" + }, + "utf8": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/utf8/-/utf8-2.1.2.tgz", + "integrity": "sha1-H6DZJw6b6FDZsFAn9jUZv0ZFfZY=" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", + "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=" + }, + "validate-npm-package-license": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", + "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "requires": { + "spdx-correct": "1.0.2", + "spdx-expression-parse": "1.0.4" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "1.3.0" + } + }, + "web3": { + "version": "0.18.4", + "resolved": "https://registry.npmjs.org/web3/-/web3-0.18.4.tgz", + "integrity": "sha1-gewXhBRUkfLqqJVbMcBgSeB8Xn0=", + "requires": { + "bignumber.js": "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2", + "crypto-js": "3.1.8", + "utf8": "2.1.2", + "xhr2": "0.1.4", + "xmlhttprequest": "1.8.0" + } + }, + "web3-provider-engine": { + "version": "8.6.1", + "resolved": "https://registry.npmjs.org/web3-provider-engine/-/web3-provider-engine-8.6.1.tgz", + "integrity": "sha1-TYbhnjDKr5ffNRUR7A9gE25bMOs=", + "requires": { + "async": "2.6.0", + "clone": "2.1.1", + "ethereumjs-block": "1.7.1", + "ethereumjs-tx": "1.3.3", + "ethereumjs-util": "5.1.4", + "ethereumjs-vm": "2.3.3", + "isomorphic-fetch": "2.2.1", + "request": "2.83.0", + "semaphore": "1.1.0", + "solc": "0.4.20", + "tape": "4.9.0", + "web3": "0.16.0", + "xhr": "2.4.1", + "xtend": "4.0.1" + }, + "dependencies": { + "bignumber.js": { + "version": "git+https://github.com/debris/bignumber.js.git#c7a38de919ed75e6fb6ba38051986e294b328df9" + }, + "ethereumjs-util": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.1.4.tgz", + "integrity": "sha512-wbeTc5prEzIWFSQUcEsCAZbqubtJKy6yS+oZMY1cGG6GLYzLjm4YhC2RNrWIg8hRYnclWpnZmx2zkiufQkmd3w==", + "requires": { + "bn.js": "4.11.6", + "create-hash": "1.1.3", + "ethjs-util": "0.1.4", + "keccak": "1.4.0", + "rlp": "2.0.0", + "safe-buffer": "5.1.1", + "secp256k1": "3.5.0" + } + }, + "web3": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/web3/-/web3-0.16.0.tgz", + "integrity": "sha1-pFVBdc1GKUMDWx8dOUMvdBxrYBk=", + "requires": { + "bignumber.js": "git+https://github.com/debris/bignumber.js.git#c7a38de919ed75e6fb6ba38051986e294b328df9", + "crypto-js": "3.1.8", + "utf8": "2.1.2", + "xmlhttprequest": "1.8.0" + } + } + } + }, + "whatwg-fetch": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz", + "integrity": "sha1-nITsLc9oGH/wC8ZOEnS0QhduHIQ=" + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=" + }, + "window-size": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.2.0.tgz", + "integrity": "sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=" + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "1.0.2", + "strip-ansi": "3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "xhr": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/xhr/-/xhr-2.4.1.tgz", + "integrity": "sha512-pAIU5vBr9Hiy5cpFIbPnwf0C18ZF86DBsZKrlsf87N5De/JbA6RJ83UP/cv+aljl4S40iRVMqP4pr4sF9Dnj0A==", + "requires": { + "global": "4.3.2", + "is-function": "1.0.1", + "parse-headers": "2.0.1", + "xtend": "4.0.1" + } + }, + "xhr2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/xhr2/-/xhr2-0.1.4.tgz", + "integrity": "sha1-f4dliEdxbbUCYyOBL4GMras4el8=" + }, + "xmlhttprequest": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", + "integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=" + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + }, + "yargs": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-4.8.1.tgz", + "integrity": "sha1-wMQpJMpKqmsObaFznfshZDn53cA=", + "requires": { + "cliui": "3.2.0", + "decamelize": "1.2.0", + "get-caller-file": "1.0.2", + "lodash.assign": "4.2.0", + "os-locale": "1.4.0", + "read-pkg-up": "1.0.1", + "require-directory": "2.1.1", + "require-main-filename": "1.0.1", + "set-blocking": "2.0.0", + "string-width": "1.0.2", + "which-module": "1.0.0", + "window-size": "0.2.0", + "y18n": "3.2.1", + "yargs-parser": "2.4.1" + } + }, + "yargs-parser": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-2.4.1.tgz", + "integrity": "sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ=", + "requires": { + "camelcase": "3.0.0", + "lodash.assign": "4.2.0" + } + }, "zeppelin-solidity": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/zeppelin-solidity/-/zeppelin-solidity-1.7.0.tgz", @@ -117,6 +2122,13 @@ "requires": { "dotenv": "4.0.0", "ethjs-abi": "0.2.1" + }, + "dependencies": { + "dotenv": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-4.0.0.tgz", + "integrity": "sha1-hk7xN5rO1Vzm+V3r7NzhefegzR0=" + } } } } diff --git a/package.json b/package.json index f1ee335..909ee07 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,8 @@ "chai": "^4.1.2", "chai-as-promised": "^7.1.1", "chai-bignumber": "^2.0.2", + "dotenv": "^5.0.0", + "truffle-hdwallet-provider": "0.0.3", "zeppelin-solidity": "^1.7.0" } } diff --git a/test/AMNToken.js b/test/AMNToken.js index 3ade01b..4d1b1fe 100644 --- a/test/AMNToken.js +++ b/test/AMNToken.js @@ -7,10 +7,12 @@ require('chai') const AMNToken = artifacts.require('AMNToken'); const ERC223ReceivingContract = artifacts.require('ERC223ReceivingContract'); +const EmptyContract = artifacts.require('EmptyContract'); contract('AMNToken', ([owner, account1, account2]) => { let amnToken = null; let receivingContract = null; + let emptyContract = null; const _name = 'Amon'; const _symbol = 'AMN'; @@ -20,6 +22,7 @@ contract('AMNToken', ([owner, account1, account2]) => { beforeEach(async function () { amnToken = await AMNToken.new(); receivingContract = await ERC223ReceivingContract.new(); + emptyContract = await EmptyContract.new(); }); it('has a name', async function () { @@ -64,6 +67,7 @@ contract('AMNToken', ([owner, account1, account2]) => { assert.equal(logs[0].args.from, owner); assert.equal(logs[0].args.to, account1); assert(logs[0].args.value.eq(amount)); + }); it('transfer to contract', function (done) { @@ -101,4 +105,20 @@ contract('AMNToken', ([owner, account1, account2]) => { }); + it('cannot transfer to empty contract', async function () { + + const amount = 100; + let emptyContractBalance = await amnToken.balanceOf(emptyContract.address); + emptyContractBalance.should.be.bignumber.equal(0); + + try { + await amnToken.transfer(emptyContract.address, amount, { from: owner }); + } catch(error) { + assert(error.message.includes('revert')); + emptyContractBalance = await amnToken.balanceOf(emptyContract.address); + emptyContractBalance.should.be.bignumber.equal(0); + } + + }); + }); diff --git a/truffle.js b/truffle.js index b4c661b..55c8a41 100644 --- a/truffle.js +++ b/truffle.js @@ -1,9 +1,28 @@ +const HDWalletProvider = require("truffle-hdwallet-provider"); +require('dotenv').config(); + module.exports = { networks: { development: { host: "127.0.0.1", port: 8545, network_id: "*" // Match any network id + }, + kovan_infura: { + provider: () => new HDWalletProvider(process.env.MNEMONIC, `https://kovan.infura.io/${process.env.INFURA_KEY}`), + network_id: '42', + gasPrice: 20000000000, + }, + rinkeby_infura: { + provider: () => new HDWalletProvider(process.env.MNEMONIC, `https://rinkeby.infura.io/${process.env.INFURA_KEY}`), + network_id: '4', + gasPrice: 2400000000, + }, + }, + solc: { + optimizer: { + enabled: true, + runs: 200 } } }; From ff78798f93faada2827d4ba9e5bf42d6cc731101 Mon Sep 17 00:00:00 2001 From: Paco Date: Thu, 22 Feb 2018 18:21:58 +0100 Subject: [PATCH 4/4] test asert throw --- test/AMNToken.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/AMNToken.js b/test/AMNToken.js index 4d1b1fe..fa1e1b3 100644 --- a/test/AMNToken.js +++ b/test/AMNToken.js @@ -111,14 +111,18 @@ contract('AMNToken', ([owner, account1, account2]) => { let emptyContractBalance = await amnToken.balanceOf(emptyContract.address); emptyContractBalance.should.be.bignumber.equal(0); + let thrown = false; try { await amnToken.transfer(emptyContract.address, amount, { from: owner }); } catch(error) { + thrown = true; assert(error.message.includes('revert')); emptyContractBalance = await amnToken.balanceOf(emptyContract.address); emptyContractBalance.should.be.bignumber.equal(0); } + assert(thrown); + }); });